Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Broken Switch ?



Hi,

it seems that MX converts this script
switch(a++) {
case 1: /* do something */ break;
case 2: /* do something else */ break;
}
into
if(a++ == 1) { /* do something */ }
else if(a++ == 2) { /* do something else */ }

Or am I just dreaming a bad dream?

Musicman



FlashKit > Flash Help > Flash ActionScript
Posted on: 12-16-2002, 05:15 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Simple Q: Can You Nest A Switch Inside A Switch?
Hi all,

I have a switch/case/break testing if the Key.RIGHT or Key.LEFT is pressed, then nested inside each of these cases a switch/case/break testing for the _currentframe of the main timeline.

The first few key presses trigger 1 trace comment each (as designed) but after multiple key presses I start to see more than one comment.

So my question is whether switches can be nested as below or whether something else is at fault here.

Paste the code below into the first frame of a 4-frame movie.

code: stop();
//
var myListener:Object = new Object();
myListener.onKeyDown = function() {
currentFrame = _root._currentframe;
trace("currentFrame is " add currentFrame);
switch (Key.getCode()) {
case Key.RIGHT :
trace("You pressed RIGHT key.");
switch (currentFrame) {
case 1 :
nextFrame();
trace("right 1");
break;
case 2 :
nextFrame();
trace("right 2");
break;
case 3 :
nextFrame();
trace("right 3");
break;
default :
trace("default case on Key.RIGHT");
break;
}
break;
case Key.LEFT :
trace("You pressed LEFT key.");
switch (currentFrame) {
case 4 :
prevFrame();
trace("left 4");
break;
case 3 :
prevFrame();
trace("left 3");
break;
case 2 :
prevFrame();
trace("left 2");
break;
default :
trace("default case on Key.LEFT");
break;
}
break;
default :
trace("default case called");
}
};
Key.addListener(myListener);

Broken .fla
Hi there!

I`m a web designer... every day I go to work and play with flash, flash related.. and whatever it takes..

A few days ago... when workin` on a flash header... well i save the document... i shut down the computer... i go home .. and the next day i go to work to find my Fla ..all messed up.. the shapes mix themselves... everything is a mess ...
i thought it was just a happening .. but it happened again ...and again ..and again ... and it pisses me off ... i have to decompile my swf everytime. This happened only on 2 specific documents.... ONLY these two got issues...

oh.. and i get this error message



help?

GC Is Broken In Fp 9.0.124.0
does anyone think this is working in the latest flash player?

Swf Broken In FF
Hi,

I have created the image gallery with xml using the tutorial on the site. I did the part with the thumbnails but they don't show up in IE however the pictures does and I can flip thorugh them. But if I try to view the site in Firefox the images dosn't get loaded at all. Also, the loader bar dosn't animate in eather browser. I would really appriciate it if someone would help me fix it. thx in advance.

btw, here's my site, www.bryggeriet.tk click on 'velkommen' to be taken to the site, the gallery is located under 'Gutta'

Swf With Broken Key
I am real new to Flash and I have read numerous tutorials but can't seem to find the answer, possibly I don't understand what I am reading. My flash movie comes up with a broken key on the internet, although you right click, view image and the movie plays fine. What is wrong? If someone could direct me to a tutorial or advise me, I would deeply appreciate the information.

To elaborate a little farther, I make postcards, the html page is made viewing the different postcards, when they select one it goes into a perl script, if they happen to select the swf file, it comes up with a broken key. How can I correct this? There has been many late nights trying to figure this one out.

Broken Fla
Hello all..
Ok, I have a big FLA that i have been working on for about a 10 weeks.
Its a flash presentation. A lot of timeline animation etc...

Anyway, all of a sudden I cant edit the AS.
If I open a MC, its seems to grab one random frame of code from somewhere in the timeline and shows that on every frame.
So say i have some code on frame 2,13,24 and 100. All very different code. It renders the same code on all of the frames.
It even renders that code in the AS panel, if i simply select the MC in the library.

It happened to me a week ago, but i restarted flash and it was fine after that. Today, its not working. I restarted my computer as well.

Has anybody ran into this?

Im ready to kill myself.

Broken Tweens
new to flash... for some reason my tweens have stopped working,... (motion and shape). im pretty sure im making them right (make keyframe, go a couple frames over, insert key frame and move object, click on create motion tween). everything still looks the same, the frames turn purple with the dotted line though them..... but there is no animation, just the object jumping at the end of the "tween" to the last frame.

WHAT THE HELL DID I SCREW UP???

Broken Tweens
I have an animation with several tweens. Everything worked fine and I saved a good version of the .fla file. I then tried some new stuff out on it, saving it with a different name. When I went back to my last good version of the animation, most of my tweens are broken!! The shape hints are all in place (at least they are the green and yellow colors, not red). This has affected the first 1/2 to 2/3 of my tweens in the time line. The last 1/2 to 1/3 of the tweens work fine.

ALL the tweens show unbroken "working tween" arrows in the time line.

Has anyone else had this sort of trouble? I have about 5-7 shape hints per shape.

That's not the strangest thing, though. Now, ALL the SAME TWEENS from ALL the different files are broken! These are files with different names and some stored on different drives!

Oh, and I am not 100% sure, but I think one tween didn't work at first, then after poking around trying to figure out what went wrong, it suddenly worked!

AUGH!
Any help?

Christopher Ferro
cferro@cet.edu
[Edited by Cacambo on 04-09-2002 at 08:59 AM]

Why Movieclip:<broken>]
can someone tell me how a movieclip can break?

thx a lot in advance

marcel

Broken Font...
Hi all, I've got a slight problem. I had a font that was broken so when I viewed my movie the A's and Q's where filled completely instead of having the blank islands in the middle. Anyway, I fixed the font (trust me, it's fixed). Usually when I have this problem I select the text giving problems and check "Use Device Fonts", I tried this but once I checked "Use Device Fonts" flash didnt show the text at all when viewing the movie. After I fixed the font the problem was identical. So what do I do now? The font is fixed but it still previews wrong, "Use Device Fonts" just doesnt work....

Any help would be great, I'm stumped :/

P.S: the text is in a movie clip, but even when I place the text on the stage it shows up wrong.

Broken Site.
I am publishing a site, with the HTML and the movie comes on and will not advance past the first frame.

WTF?

Broken Link?
Hello,
I have a link within a (.swf) scene file, that is called within the main scene using (load movie function). I need the link to "go to and play" a certain frame label within the main scene/ timeline. So far I have tried the codes below but it still does not work. Any suggestions?
___________________________________

on(release) {
_root.gotoAndPlay("framelabel");
}

and

on(release) {
main.gotoAndPlay("framelabel");
}

___________________________________

Thanks in advance for your help!

My Broken Menu
I dumped the last menu and am trying this new one, problem is I can't get the buttons to work.

I have it set up so the first frame has a stop action and a button to gotoandplay frame 2. When I publish preview it, I can click the button but all it does is make button "dissapear" but wont play the rest of the movie till the next stop.

Will someone please look at it and figure out what I am doing wrong. Gracias.

GotoAndPlay Broken In IE?
I'm having an odd problem where gotoAndPlay is broken in IE. I'm passing some variables to flash via FlashVars, but I've also tried query strings:

<param name="FlashVars" value="sec=about&subsec=intro">
<embed src="/rn15.swf" flashvars="sec=about&subsec=intro" ....

I use these variables to decide what section and subsection to go to in the movie, with this code:

if (_root.sec != undefined) {
currsec = _root.sec;
if (_root.subsec != undefined) {
currsub = _root.sec + "_" + _root.subsec;
}
gotoAndPlay(currsec + "_frm");
}

I've used both gotoAndPlay and _root.gotoAndPlay, and also tried with and without a stop before to gotoAndPlay. It seems to work in every browser but IE (I'm using 6.0).

I was thinking it was a problem with the FlashVars, but I can see that they are taking affect. The variables are only initialized in the first frame, afterwards currsec and currsub are used. These variables are used to "snap back" to the current section if you rollover another, and this does happen.

Anyone have any idea?

John

Broken Link
I am new to flash and brought a site that had a flash header, when you click on a label it should open the new page in the same window but it has broken the link please help

Broken Preloader... Please Help
Hoy Everybody!

Ok I have a problem with my main preloader and can't figure it out, I have used the AS/TWEEN Preloader from the Kirupa tutorial located here. This preloader is embedded in my main.swf and seems to load the external file movingbg.swf, but it does not go back to the root so it can complete the outro animation... therefore leaving the preloader hanging in the background of my main movie. I hope this isn't a dumb question...

Attached is the .fla so you can see what I am talking about.

Thanks in advance for the help!

Help File Broken
My Flash help file now just displays the drop down index and no content, some sort of corrupt file I imagine. Anyone know how to fix this?

I Seem To Have Broken Flash
Its displaying the layers, the timeline, and the work area as 3 columns rather than the timeline on top.

How do you make it go back to having thee timeline on the top. Its driving me insane, and ive no idea how i did it, or how o change it back!!

?

Broken Help File
My Flashelp File is broken, can open it drop open directories but no help files will trigger. Anyone know of a fix other than reloading it from the install disc?

Help File Broken
My Flashelp File is broken, can open it drop open directories but no help files will trigger. Anyone know of a fix other than reloading it from the install disc?

Oh Please Someone Have The Answer...f12's Broken
Hi guys...and hello.. im a relative newbie to flash while ive just been getting to know the ropes ive experienced a major problem with browsers not opening when i try to publish or preview my work via f12 or file>publish etc.

I use both firefox and IE and neither will open when i publish preview with f12 or shift f12. All worked fine yesterday and ive made no changes to my comp.
Ive been trying to figure this out all day... ive reisntalled flash..and both browsers and still no luck.

If anyone can help and stop me going mad.. it would be greatly appreciated. thanks...

My Ad Is Broken On Linux
Hey all,

I have a problem, and I was hoping someone might be able to point me in the right direction!

I created the flash ad on the right centre of this page:

http://www.gamesindustry.biz/content_page.php?aid=20556

(You may have to refresh - the ads are random. Mine features a cartoon character on a staircase, and is an ad for Free Radical).

The problem is that the vector character doesn't appear on all Flash / browser configurations. In some setups, the character doesn't appear at all!

I suspect the problem platform appears to be Firefox on Linux, running Flash 7. All others appear ok.

Has anyone experienced this before? Have any idea why a MC (which contains multiple MCs itself) might not appear on some configurations?

Thanks in advance,

Lewis

[F8] IS Flash Broken?
I have a question, I am working in Flash8 using ActionScript 2.0, document is set up as a 2.0 document, so that shouldn't be the problem. I am scripting a simple preloader. This EXACT script has worked on other animations so I am not sure what the problem is.

within my first scene i have a 1 frame layer for the action stop();
and on the layer below it i have a 1 frame movieclip called preloader

within preloader i have a dynamic text field called pc_txt with the variable "pc"
on a script layer i have the following:

var pc = 0;
this.onEnterFrame = function(){
pc = Math.floor((_root.getBytesLoaded() /_root.getBytesTotal()) *100);
this.pc_txt.text = pc+"%";
if (pc>99) {_root.play();}}


IT WILL NOT PLAY THE MOVIE!, the dynamic text field updates fine, but when it gets to 100% the movie will not play, it will not go to the next scene no matter what I do, unless I rightclick and press play. What could be the problem?



**edit : nothing will play this movie except for eliminating the stop on the first scene... I even tried scrapping the preloader and just having a simple button that advances to the next scene. it does not work either...

Is It Me Or Is My Flash Broken?
Hi,

As from yesterday, whenever I click a tool in the tool menu (selection,oval, rectangle, line) the 'options' at the bottom of the tools menu (where u find the snap to object, and object drawing mode) dont change! Its frustrating because I need to be able to turn object drawing mode off but my object drawing mode isnt there!

Is my flash broken or have i hidden them?

Please Help!!

My Counter Is Broken
Hi. I am making a flash shooter with enemies running across the screen. All the code has been working perfectly until now. I added a counter for how many enemies you allow to get away and run past the right side of the screen. I have a dynamic text box called "escaped".

I have this code for the enemies. If they make it past the right side of the screen it resets them and adds one to the escaped counter:

if (this._x>550) {
this.reset();
_root.escaped += 1;
}

It works fine, except every few seconds the counter randomely will increase by one when it shouldn't.

I also have this code on the frame to duplicate the amount of enemies. (I have the enemies known as "face") :

for(i=1;i<=5;i++)
{
_root["face"].duplicateMovieClip("face"+i,i+1000,face);
}

What is making the counter randomly increase?

Broken SetVariable
I created an offline presentation communicating from javascript to Flash using SetVariable. Everything worked fine using Flash Player 7 however when updating to Flash Player 8, none of the 5 variables are passed. I have 2 Flash menus that are communicating with an IFRAME through the javascript.

The following code used to work no problem:
window.document.statustext.SetVariable("statusbar. itemcount", itemcount);

How would I go about fixing this?

Thanks.

Jason

Broken Buttons
If I create a swf with a simple button on it the button works fine as you would expect. Up over and down states operating correctly. If I then create another swf and then load the swf with the button on it into this new swf, the button ceases to function correctly. Roll over works ok and the first button press works ok, but then the hand icon changes to an arrow as if you are no longer over a button so further clicks no longer work until you move the mouse which triggers the over state once more. So basically you cannot do multiple button presses unless you move the mouse between each press. Is this a bug in flash and is there a workaround.

MouseWheelEnabled 'Broken'
Is it just as simple as adding the bold line into my code to get the scrollwheel to work on the mouse for a text field? If so it aint working!


Code:
function loadTxt(theTxt){
var lv:LoadVars = new LoadVars();
lv.onLoad = function(success:Boolean){

if (success){
my_text.html = true;
my_text.htmlText = lv.txt;
my_text.mouseWheelEnabled = true;
}else{
trace ("cannot load text!");
}
};
lv.load(theTxt);
}

Broken Script Help
I am trying to create a scrolling console like information banner. That has one event pop up after another.

However, I have never really done something this complex in action script and have been having all sorts of problems. Now the entire thing breaks when it gets down to a certain event.

I have linked the flash file bellow if anyone wants to help. You can see what I am talking about if you open the file and go up to control>>test movie

Just wait for it to get down to GUI-1 Analyzing and then entire thing stops. There is several other events that should have followed, but I can't figure out why it's stopping.

If anyone has any advice or better way to achieve the same effect it would REALLY help me out.

(please ignore the overlapping text, that was done intentionally because I am using software called gameswf to play the final file and the value for the text box gets reset so I needed to refill at the end)

Also any scripting help I get needs to be flash 5 or lower. The software I use doesn't support higher than that!

www.cggart.com/fposts/need_help.zip

Broken Preloader
Hi,

I'm trying to create a simple preloader. I've gotten the basic preloading functionality to work, but for some reason I can't it to draw a progress bar during the ProgressEvents.

I know the ProgressEvent handler is being called, because I can see the progress via trace(). However, repeated calls to graphics.drawRect() only shows the first drawing, and then never updates it. Can anyone see why this is happening?

Below is my code. I'm compiling with mxmlc. Note "bigpic-1.jpg" is just some arbitrarily large image, to give the preloader enough work to actually show some progress.

Preloader.as

ActionScript Code:
&#65279;package {



    import flash.display.DisplayObject;

    import flash.display.MovieClip;

    import flash.display.StageAlign;

    import flash.display.StageScaleMode;
    import flash.external.ExternalInterface
    import flash.events.*
    import flash.text.TextField;

    import flash.utils.getDefinitionByName;


    public class Preloader extends MovieClip {

        private var statusText:TextField;


        public function Preloader() {

            //We stop the timeline

            //stop();

            //stage.scaleMode=StageScaleMode.NO_SCALE;

            stage.align=StageAlign.TOP_LEFT;

            this.statusText = new TextField();
            this.statusText.text = "PROGRESS?"
            this.addChild(this.statusText);

            trace('preloader init')
            ExternalInterface.call("console.log", 'preloader init')


            //Set an eventlistener for the animation
            loaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
            loaderInfo.addEventListener(Event.COMPLETE, showLoadResult);


        }

        public function showProgress(evt:ProgressEvent):void {
            var percent:Number=root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal;

            ExternalInterface.call("console.log", 'loading:'+percent)
            statusText.text = "PROGRESS: "+(percent*100)+"%"


            graphics.clear();

            graphics.beginFill(0xff0000);

            graphics.drawRect(0, (stage.stageHeight / 2 - 10), (stage.stageWidth * percent), 20);

            graphics.endFill();
        }

        public function showLoadResult(evt:Event):void {

            //Move to the next frame when we're done

            nextFrame();

            //And initialize our main class

            init();
        }


        private function init():void {

            //Get our main class

            var mainClass:Class=Class(getDefinitionByName("Main"));

            if (mainClass) {

                //And instantiate it

                var app:Object=new mainClass;

                //finally we add it to the DisplayList

                addChild(app  as  DisplayObject);

            }

        }


    }

}

Main.as

ActionScript Code:
&#65279;package {

    import flash.display.Sprite;

    import mx.core.BitmapAsset;



    //This tells the compiler to create a frame before our main class

    [Frame(factoryClass="Preloader")]

    public class Main extends Sprite {

        // When using Flex instead.


        [Embed(source="bigpic-1.jpg")]
        public var picture1:Class;


        public function Main() {

            init();

        }

        private function init():void {

            addChild(new picture1);

        }

    }

}

Actionscript Broken On Mac
For some reason my actionscript breaks when the .swf file is played on a mac.

It seems like none of my actionscript works at all.

The main scene has about 5 frames and 9 layers.
In frame1 of Scene1 i have:

stop();
img3.visible = false;
img2.visible = false;

*Those commands are not working on the mac side. I can still see img2 & 3 and the movie doesn't stop. It loops.

On layer 3 i have a maskClip_mc that has a stop() command on frame 1, but for some reason that mask keeps looping over and over.

I'm using Flash CS3 and AS3.

Help is greatly appreciated!!

Preloader Broken
I'm having issues with my preloader... when my site loads up.. all i see is a black screen for a while.. and then the frame loads with the preloader for a blip, and then on to my movie.. like.. the whole purpose of the preloader is blown. I don't know if I screwed something up.. or if there's a better way to code this preloader... here's my code

onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded / total * 100);
text = percent + "%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay("play");
}
}
where "play" is my frame 2 framelabel, and frame 1 is where the preloader is.
Example Page

Any help would be much appreciated.

Actionscript Broken On Mac. HELP
I have been doing this game on both Mac and PC. I brought my work from the PC to Mac and when I played the .swf some of my actionscript wont work but was working earlier today on my PC. I sent a friend the file from my Mac to his PC and it worked fine. This is the actionscript that isnt working:

if(ASnative(800,2)(1)) {
_root.gunHand_mc.gotoAndPlay(2);
trace("what");

It will not pull up my trace either. I am on a PM with Tiger. Is anyone else experiencing this problem??? I need to fix this ASAP!!!!!!!!!!! I have a deadline for friday.

Thanks.

Broken Compiler
Hey,

Alright I know its not broken.. but the thing wont recognise I've made changes to my imported actionscript files, so when I publish it, and then preview it I get results from old actionscript versions of my files. So it must be using old cache's of my file.

Right now I keep getting these trace messages that DO NOT exist in my .as file, they used to, but not anymore. This is very annoying. Its probably the reason I couldn't track this bug that popped out of no where last night.

Anyone mind explaining?

Thanks

EDIT: Nevermind. Apparently even if you overwrite some files with some other backups, and then compile the other fla, it wont use those files. It wont use any files until they have been saved to that directory - I guess flash makes a copy of them or something. So I had to make a few spaces somewhere and save the files again for flash to realize they are new.

Broken Sounnnndd
Updated to flash 9.0, no sound works, Ive updated all of my codecs, Windows Updates, Checked my drivers(although all other sound works), scanned for malware/spyware/viruses. Did a registry fix.

Apparently the wavemapper fix was supposed to work when added to registry, but it didnt. Anyyy Ideas?

SharedObject Broken?
var so = SharedObject.getLocal('onj');
trace(so.data.blah);
so.data.blah = "hi";
trace(so.data.blah);

Should that produce "undefined" & "hi" the first time, and "hi" & "hi" the second time? For some reason I can't get any SharedObject to save data. Using Flash 8, publishing to Flash 6/7/8, AS1/2

Arrays Broken
i've taken an xml file and turned it into a couple of arrays. the problem is the variables seem to be storing the information odly. At the bottom i have listed 1. What shows up when i test the movie then go Debug -> List Variables and 2. The actionscript i used.
There is also a highlight from the variables section. The problem to note is that if i type:
trace(diagnosticMenuLayer[1][2]);
at the end of my actionscript, the output says:
undefined.

Am i doing something wrong?
Thanks in advance.


Here's all the attached code:









Attach Code

---------------- HIGHLIGHT ----------------
Variable _level0.diagnosticMenuLayer = [object #89, class 'Array'] [
1:[object #90, class 'Array'] [
0:"1",
1:"2",
...
-----------------------------------------------------




1. -------- VARIABLES --------


Level #0:
Variable _level0.$version = "WIN 8,0,22,0"
Variable _level0.diagnostic = [object #1] {
<?xml version="1.0" encoding="ISO-8859-1" ?>

<menu>
<menuItem>
<label>
Ski-slope
</label>
<type>
item
</type>
<location>
1
</location>
<image>
Ski slope spectrum.bmp
</image>
<rtfTitles>
::Ski-slope::
</rtfTitles>
<gifName>
Accel
</gifName>
<moduleName>
va3
</moduleName>
<slideName>
#27 Scene
</slideName>
</menuItem>
(There are a fair few other <menuItem>’s but I don’t think listing the entire XML is relevant.)
</menu>
}
Variable _level0.diagnosticLength = 86
Variable _level0.diagnosticMenuPlace = 86
Variable _level0.diagnosticMenuItem = [object #2, class 'Array'] [
0:[object #3, class 'Array'] [
0:"Ski-slope",
1:"item",
2:"1",
3:"Ski slope spectrum.bmp",
4:"::Ski-slope::",
5:"Accel",
6:"va3",
7:"#27 Scene"
],
1:[object #4, class 'Array'] [
0:"High noise floor",
1:"item",
2:"2",
3:"Noise floor spectrum.bmp",
4:"::Raised noise floor::",
5:"Bearing2",
6:"va3",
7:"#104 Scene"
],
2:[object #5, class 'Array'] [
0:"Most common fault conditions",
1:"sub",
2:"3.0"
],
3:[object #6, class 'Array'] [
0:"Strong 1x",
1:"sub",
2:"3.1.0"
],
4:[object #7, class 'Array'] [
0:"Strongest in vertical and horizontal [imbalance]",
1:"item",
2:"3.1.1",
3:"Imbalance statis spectrum VH.bmp",
4:"::Static imbalance::",
5:"Bal static",
6:"dmf1",
7:"#33 Scene|GBal static"
],
5:[object #8, class 'Array'] [
0:"Strongest in horizontal [flexibility]",
1:"item",
2:"3.1.2",
3:"Looseness Structural spectrum VH.bmp",
4:"::Structural looseness::",
5:"Flexibility",
6:"dmf2",
7:"#61 |GFlexibility"
],
6:[object #9, class 'Array'] [
0:"Strongest in axial (overhung machine) [imbalance]",
1:"item",
2:"3.1.3",
3:"Imbalance overhung spectrum VHA.bmp",
4:"::Imbalance: Overhung machines::",
5:"Bal overhung",
6:"dmf1",
7:"#45 Scene|GBal Overhungy"
],
7:[object #10, class 'Array'] [
0:"Strongest in axial (NOT overhung) [angular misalignment]",
1:"item",
2:"3.1.4",
3:"Angular misalignment spectrum Axial.bmp",
4:"::Angular Misalignment::",
5:"Align angular",
6:"dmf2",
7:"#6 Scene"
],
8:[object #11, class 'Array'] [
0:"Strong 2x",
1:"sub",
2:"3.2.0"
],
9:[object #12, class 'Array'] [
0:"Strongest vertical and horizontal [parallel misalignment]",
1:"item",
2:"3.2.1",
3:"Parallel misalignment spectrum VH.bmp",
4:"::Parallel Misalignment::",
5:"Align parallel",
6:"dmf2",
7:"#10 Scene|GAlign parallel"
],
10:[object #13, class 'Array'] [
0:"Strong Harmonics",
1:"sub",
2:"3.3.0"
],
11:[object #14, class 'Array'] [
0:"1X harmonics [rotating looseness]",
1:"item",
2:"3.3.1",
3:"Looseness Bearing worse spectrum VH.bmp",
4:"::Rotating looseness::",
5:"Brg looseness",
6:"dmf2",
7:"#49 Scene|GBrg looseness"
],
12:[object #15, class 'Array'] [
0:"Non-synchronous harmonics [bearing wear]",
1:"item",
2:"3.3.2",
3:"Bearings stage five.bmp",
4:"::Rolling element bearings::",
5:"Brg inner race",
6:"dmf3",
7:"#14 Scene|GBearing1|"
],
13:[object #16, class 'Array'] [
0:"Sub-synchronous peak (less than 1X)",
1:"sub",
2:"4.0"
],
14:[object #17, class 'Array'] [
0:"There is a single peak",
1:"sub",
2:"4.1.0"
],
15:[object #18, class 'Array'] [
0:"Machine is a turbine [oil whirl]",
1:"item",
2:"4.1.1",
3:"Journal oil whirl spectrum VH.bmp",
4:"::Oil whirl::",
5:"Oil whirl",
6:"dmf2",
7:"#81 Scene"
],
16:[object #19, class 'Array'] [
0:"Machine has rolling element bearings [cage fault]",
1:"item",
2:"4.1.2",
3:"Bearings stage five.bmp",
4:"::Rolling element bearings::",
5:"Brg inner race",
6:"dmf3",
7:"#14 Scene|GBearing1|"
],
17:[object #20, class 'Array'] [
0:"From gearbox [hunting tooth frequency]",
1:"item",
2:"4.1.3",
3:"Hunting tooth spectrum VH.bmp",
4:"::Hunting tooth frequency::",
5:"Gear single",
6:"dmf6",
7:"#36 Scene"
],
18:[object #21, class 'Array'] [
0:"Reciprocating machine [4-stroke engine]",
1:"item",
2:"4.1.4",
3:"Reciprocating 4-stroke engine spectrum VH.bmp",
4:"::Reciprocating machines::",
5:"Piston",
6:"dmf4",
7:"#26 Scene"
],
19:[object #22, class 'Array'] [
0:"There are a series of harmonics",
1:"sub",
2:"4.2.0"
],
20:[object #23, class 'Array'] [
0:"Belt driven machine [belt wear]",
1:"item",
2:"4.2.1",
3:"Belts worn spectrum VH.bmp",
4:"::Worn or loose belts::",
5:"Sheaves per",
6:"dmf6",
7:"#45 Scene|GSheaves per"
],
21:[object #24, class 'Array'] [
0:"Harmonics of 0.5X [severe looseness]",
1:"item",
2:"4.2.2",
3:"Looseness Bearing severe spectrum VH.bmp",
4:"::Rotating looseness::",
5:"Brg looseness",
6:"dmf2",
7:"#49 Scene|GBrg looseness"
],
22:[object #25, class 'Array'] [
0:"From gearbox [hunting tooth frequency]",
1:"item",
2:"4.2.2",
3:"Hunting tooth spectrum VH.bmp",
4:"::Hunting tooth frequency::",
5:"Gear single",
6:"dmf6",
7:"#36 Scene"
],
23:[object #26, class 'Array'] [
0:"There is a broad peak",
1:"sub",
2:"4.3.0"
],
24:[object #27, class 'Array'] [
0:"Machine is a pump or fan [flow noise]",
1:"item",
2:"4.3.1",
3:"Turbulence spectrum VH.bmp",
4:"::Flow turbulence::",
5:"Pump flow",
6:"dmf4",
7:"#5 Scene"
],
25:[object #28, class 'Array'] [
0:"Peak at 1X",
1:"sub",
2:"5.0"
],
26:[object #29, class 'Array'] [
0:"There is a single strong peak",
1:"sub",
2:"5.1.0"
],
27:[object #30, class 'Array'] [
0:"Stronger in vertical and horizontal [imbalance]",
1:"item",
2:"5.1.1",
3:"Imbalance static spectrum VH.bmp",
4:"::Static imbalance::",
5:"Bal static",
6:"dmf1",
7:"#33 Scene|GBal static"
],
28:[object #31, class 'Array'] [
0:"Strong in vertical and horizontal on motor [rotor bow]",
1:"item",
2:"5.1.2",
3:"Rotor bow spectrum VH.bmp",
4:"::Rotor bow::",
5:"Motor",
6:"dmf5",
7:"#29 Scene"
],
29:[object #32, class 'Array'] [
0:"Observed on both sheaves of a belt driven machine [belt resonance]",
1:"item",
2:"5.1.3",
3:"Belt resonance spectrum VH.bmp",
4:"::Belt resonance::",
5:"Sheaves per",
6:"dmf6",
7:"#58 Scene"
],
30:[object #33, class 'Array'] [
0:"Stronger in horizontal [flexibility]",
1:"item",
2:"5.1.4",
3:"Looseness Structural spectrum VH.bmp",
4:"::Structural looseness::",
5:"Flexibility",
6:"dmf2",
7:"#61 |GFlexibility"
],
31:[object #34, class 'Array'] [
0:"Stronger in axial (overhung machine) [imbalance]",
1:"item",
2:"5.1.5",
3:"Imbalance overhung spectrum VHA.bmp",
4:"::Imbalance: Overhung machines::",
5:"Bal overhung",
6:"dmf1",
7:"#45 Scene|GBal Overhung"
],
32:[object #35, class 'Array'] [
0:"Stronger in axial (NOT overhung) [angular misalignment]",
1:"item",
2:"5.1.6",
3:"Angular misalignment spectrum Axial.bmp",
4:"::Angular Misalignment::",
5:"Align angular",
6:"dmf2",
7:"#6 Scene"
],
33:[object #36, class 'Array'] [
0:"There are harmonics",
1:"sub",
2:"5.2.0"
],
34:[object #37, class 'Array'] [
0:"1X, 2X and 3X high in axial [cocked bearing]",
1:"item",
2:"5.2.1",
3:"Cocked bearing spectrum Axial.bmp",
4:"::Cocked bearing::",
5:"Brg cocked",
6:"dmf2",
7:"#45 Scene|GBrg cocked"
],
35:[object #38, class 'Array'] [
0:"1X, 2X and 3X high in vertical [loose pedestal brg]",
1:"item",
2:"5.2.2",
3:"Looseness Pillow block Bearing spectrum VH.bmp",
4:"::Pedestal bearing looseness::",
5:"Pillowblock loose",
6:"dmf2",
7:"#65 Scene|GPillowblock loose"
],
36:[object #39, class 'Array'] [
0:"Many harmonics [rotating looseness]",
1:"item",
2:"5.2.3",
3:"Looseness Bearing worse spectrum VH.bmp",
4:"::Rotating looseness::",
5:"Brg looseness",
6:"dmf2",
7:"#49 Scene|GBrg looseness"
],
37:[object #40, class 'Array'] [
0:"Electric motor [loose rotor]",
1:"item",
2:"5.2.4",
3:"Loose rotor spectrum VH.bmp",
4:"::Loose rotor::",
5:"Motor",
6:"dmf5",
7:"#33 Scene"
],
38:[object #41, class 'Array'] [
0:"There are sidebands",
1:"sub",
2:"5.3.0"
],
39:[object #42, class 'Array'] [
0:"1X has a "skirt" of sidebands and 100/120 Hz peak [shorted laminations]",
1:"item",
2:"5.3.1",
3:"Shorted laminations spectrum VH.bmp",
4:"::Lamination problems::",
5:"Motor",
6:"dmf5",
7:"#35 Scene"
],
40:[object #43, class 'Array'] [
0:"1X and 100/120 Hz have a "skirt" of sidebands [rotor eccentricity]",
1:"item",
2:"5.3.2",
3:"Rotor eccentricity spectrum VH.bmp",
4:"::Eccentric rotor::",
5:"Motor",
6:"dmf5",
7:"#25 Scene"
],
41:[object #44, class 'Array'] [
0:"1X and harmonics have a "skirt" of sidebands [cracked rotor bar]",
1:"item",
2:"5.3.3",
3:"Cracked rotor bar spectrum VH.bmp",
4:"::Cracked or broken rotor bars::",
5:"Motor",
6:"dmf5",
7:"#30 Scene"
],
42:[object #45, class 'Array'] [
0:"A 100/120 Hz peak also exists",
1:"sub",
2:"5.4.0"
],
43:[object #46, class 'Array'] [
0:"1X and 100/120 Hz have a "skirt" of sidebands [rotor eccentricity]",
1:"item",
2:"5.4.1",
3:"Rotor eccentricity spectrum VH.bmp",
4:"::Eccentric rotor::",
5:"Motor",
6:"dmf5",
7:"#25 Scene"
],
44:[object #47, class 'Array'] [
0:"High 1X and high 100/120 Hz [stator eccentricity]",
1:"item",
2:"5.4.2",
3:"Stator eccentricity spectrum VH.bmp",
4:"::Stator Eccentricity::",
5:"Motor",
6:"dmf5",
7:"#23 Scene"
],
45:[object #48, class 'Array'] [
0:"The peak is broad",
1:"sub",
2:"5.5.0"
],
46:[object #49, class 'Array'] [
0:"Broad peak [resonance]",
1:"item",
2:"5.5.1",
3:"Resonance spectrum VH.bmp",
4:"::Resonance::",
5:"Flexibility",
6:"dmf2",
7:"#2 Scene|GFlexibility"
],
47:[object #50, class 'Array'] [
0:"Peak at 2X (not part of harmonic series)",
1:"sub",
2:"6.0"
],
48:[object #51, class 'Array'] [
0:"Stronger in vertical and horizontal [parallel misalignment]",
1:"item",
2:"6.1",
3:"Parallel misalignment spectrum VH.bmp",
4:"::Parallel Misalignment::",
5:"Align parallel",
6:"dmf2",
7:"#10 Scene|GAlign parallel"
],
49:[object #52, class 'Array'] [
0:"Broad peak [resonance]",
1:"item",
2:"6.2",
3:"Resonance spectrum VH.bmp",
4:"::Resonance::",
5:"Flexibility",
6:"dmf2",
7:"#2 Scene|GFlexibility"
],
50:[object #53, class 'Array'] [
0:"1X and harmonics",
1:"sub",
2:"7.0"
],
51:[object #54, class 'Array'] [
0:"1X, 2X and 3X high in axial [cocked bearing]",
1:"item",
2:"7.1",
3:"Cocked bearing spectrum Axial.bmp",
4:"::Cocked bearing::",
5:"Brg cocked",
6:"dmf2",
7:"#45 Scene|GBrg cocked"
],
52:[object #55, class 'Array'] [
0:"1X, 2X and 3X high in vertical [loose pedestal brg]",
1:"item",
2:"7.2",
3:"Looseness Pillow block Bearing spectrum VH.bmp",
4:"::Pedestal bearing looseness::",
5:"Pillowblock loose",
6:"dmf2",
7:"#65 Scene|GPillowblock loose"
],
53:[object #56, class 'Array'] [
0:"Many harmonics [rotating looseness]",
1:"item",
2:"7.3",
3:"Looseness Bearing worse spectrum VH.bmp",
4:"::Rotating looseness::",
5:"Brg looseness",
6:"dmf2",
7:"#49 Scene|GBrg looseness"
],
54:[object #57, class 'Array'] [
0:"Electric motor [loose rotor]",
1:"item",
2:"7.4",
3:"Loose rotor spectrum VH.bmp",
4:"::Loose rotor::",
5:"Motor",
6:"dmf5",
7:"#33 Scene"
],
55:[object #58, class 'Array'] [
0:"1X and harmonics have a "skirt" of sidebands [cracked rotor bar]",
1:"item",
2:"7.5",
3:"Cracked rotor bar spectrum VH.bmp",
4:"::Cracked or broken rotor bars::",
5:"Motor",
6:"dmf5",
7:"#30 Scene"
],
56:[object #59, class 'Array'] [
0:"Synchronous peak(s) (3X, 4X, 5X...)",
1:"sub",
2:"8.0"
],
57:[object #60, class 'Array'] [
0:"Machine is pump/fan/compressor [blade or vane wear]",
1:"item",
2:"8.1",
3:"Blade pass spectrum VH.bmp",
4:"::Pumps/Fans Blade/Vane pass::",
5:"Pump flow",
6:"dmf4",
7:"#2 Scene"
],
58:[object #61, class 'Array'] [
0:"Broad peak [resonance]",
1:"item",
2:"8.2",
3:"Resonance spectrum VH.bmp",
4:"::Resonance::",
5:"Flexibility",
6:"dmf2",
7:"#2 Scene|GFlexibility"
],
59:[object #62, class 'Array'] [
0:"Peak at twice line frequency (100/120 Hz)",
1:"sub",
2:"9.0"
],
60:[object #63, class 'Array'] [
0:"High 100/120 Hz [loose stator windings]",
1:"item",
2:"9.1",
3:"Loose stator windings spectrum VH.bmp",
4:"::Loose stator windings::",
5:"Motor",
6:"dmf5",
7:"#34 Scene"
],
61:[object #64, class 'Array'] [
0:"High 100/120 Hz plus 1X and 2X peaks [stator eccentricity]",
1:"item",
2:"9.2",
3:"Stator eccentricity spectrum VH.bmp",
4:"::Stator Eccentricity::",
5:"Motor",
6:"dmf5",
7:"#23 Scene"
],
62:[object #65, class 'Array'] [
0:"High 100/120 Hz with 1/3X sidebands [loose connections]",
1:"item",
2:"9.3",
3:"Loose connectors spectrum VH.bmp",
4:"::Loose connections::",
5:"Motor",
6:"dmf5",
7:"#37 Scene"
],
63:[object #66, class 'Array'] [
0:"100/120 Hz peak has a "skirt" of sidebands [rotor eccentricity]",
1:"item",
2:"9.4",
3:"Rotor eccentricity spectrum VH.bmp",
4:"::Eccentric rotor::",
5:"Motor",
6:"dmf5",
7:"#25 Scene"
],
64:[object #67, class 'Array'] [
0:"100/120 Hz peak and 1X has a "skirt" of sidebands [shorted laminations]",
1:"item",
2:"9.5",
3:"Shorted laminations spectrum VH.bmp",
4:"::Lamination problems::",
5:"Motor",
6:"dmf5",
7:"#35 Scene"
],
65:[object #68, class 'Array'] [
0:"Non-synchronous peaks",
1:"sub",
2:"10.0"
],
66:[object #69, class 'Array'] [
0:"Single frequency [external noise]",
1:"item",
2:"10.1",
3:"External noise spectrum.bmp",
4:"::External noise::",
5:"XX",
6:"va3",
7:"#27 Scene"
],
67:[object #70, class 'Array'] [
0:"Non-synchronous harmonics [bearing wear]",
1:"item",
2:"10.2",
3:"Bearings stage five.bmp",
4:"::Rolling element bearings::",
5:"Brg inner race",
6:"dmf3",
7:"#14 Scene|GBearing1|"
],
68:[object #71, class 'Array'] [
0:"Gearbox measurement (natural frequency excited)",
1:"sub",
2:"10.3.0"
],
69:[object #72, class 'Array'] [
0:"Sidebands around gearmesh also high [tooth wear]",
1:"item",
2:"10.3.1",
3:"Gear mesh with nat freq spectrum VH.bmp",
4:"::Gear tooth wear::",
5:"Gear single",
6:"dmf6",
7:"#24 Scene"
],
70:[object #73, class 'Array'] [
0:"Load effects levels [gear backlash]",
1:"item",
2:"10.3.2",
3:"Gear backlash spectrum VH.bmp",
4:"::Gear backlash::",
5:"Gear single",
6:"dmf6",
7:"#27 Scene"
],
71:[object #74, class 'Array'] [
0:"High 1X and 1X sidebands of gearmesh [cracked/broken tooth]",
1:"item",
2:"10.3.3",
3:"Gear cracked or broken spectrum VH.bmp",
4:"::Cracked or broken tooth::",
5:"Gear single",
6:"dmf6",
7:"#34 Scene"
],
72:[object #75, class 'Array'] [
0:"High frequency peaks",
1:"sub",
2:"11.0"
],
73:[object #76, class 'Array'] [
0:"Non-synchonous with harmonics",
1:"sub",
2:"11.1.0"
],
74:[object #77, class 'Array'] [
0:"Rolling element bearings [bearing wear]",
1:"item",
2:"11.1.1",
3:"Bearings stage five.bmp",
4:"::Rolling element bearings::",
5:"Brg inner race",
6:"dmf3",
7:"#14 Scene|GBearing1|"
],
75:[object #78, class 'Array'] [
0:"Synchronous peak(s)",
1:"sub",
2:"11.2.0"
],
76:[object #79, class 'Array'] [
0:"Pump/fan/compressor/turbine [blade or vane wear]",
1:"item",
2:"11.2.1",
3:"Blade pass spectrum VH.bmp",
4:"::Pumps/Fans Blade/Vane pass::",
5:"Pump flow",
6:"dmf4",
7:"#2 Scene"
],
77:[object #80, class 'Array'] [
0:"Electric motor",
1:"sub",
2:"11.3.0"
],
78:[object #81, class 'Array'] [
0:"Rotor bar rate with sidebands of 100/120 Hz [loose rotor bars]",
1:"item",
2:"11.3.1",
3:"Loose rotor bar spectrum VH.bmp",
4:"::Loose rotor bars::",
5:"Motor",
6:"dmf5",
7:"#32 Scene"
],
79:[object #82, class 'Array'] [
0:"Gearbox measurement - peak at gearmesh (GM)",
1:"sub",
2:"11.4.0"
],
80:[object #83, class 'Array'] [
0:"1X sidebands of GM [tooth wear]",
1:"item",
2:"11.4.1",
3:"Gear mesh with nat freq spectrum VH.bmp",
4:"::Gear tooth wear::",
5:"Gear single",
6:"dmf6",
7:"#24 Scene"
],
81:[object #84, class 'Array'] [
0:"1X sidebands of GM [gear backlash]",
1:"item",
2:"11.4.2",
3:"Gear backlash spectrum VH.bmp",
4:"::Gear backlash::",
5:"Gear single",
6:"dmf6",
7:"#27 Scene"
],
82:[object #85, class 'Array'] [
0:"High GM peak [tooth load]",
1:"item",
2:"11.4.3",
3:"Gear tooth load spectrum VH.bmp",
4:"::Gear tooth load::",
5:"Gear single",
6:"dmf6",
7:"#26 Scene"
],
83:[object #86, class 'Array'] [
0:"GM and harmonics with 1X sidebands",
1:"item",
2:"11.4.4",
3:"Gear misalignment spectrum VH.bmp",
4:"::Misaligned gears::",
5:"Gear single",
6:"dmf6",
7:"#29 Scene"
],
84:[object #87, class 'Array'] [
0:"Noise floor raised",
1:"sub",
2:"11.5.0"
],
85:[object #88, class 'Array'] [
0:"Noise floor raised [cavitation]",
1:"item",
2:"11.5.1",
3:"Cavitation spectrum VH.bmp",
4:"::Cavitation::",
5:"Pump flow",
6:"dmf4",
7:"#7 Scene"
]
]
Variable _level0.counterx = 2
Variable _level0.countera = 2
Variable _level0.diagnosticMenuLayer = [object #89, class 'Array'] [
1:[object #90, class 'Array'] [
0:"1",
1:"2",
2:"3.0",
3:"4.0",
4:"5.0",
5:"6.0",
6:"7.0",
7:"8.0",
8:"9.0"
],
2:[object #91, class 'Array'] [
0:"3.1.0",
1:"3.2.0",
2:"3.3.0",
3:"4.1.0",
4:"4.2.0",
5:"4.3.0",
6:"5.1.0",
7:"5.2.0",
8:"5.3.0",
9:"5.4.0",
10:"5.5.0",
11:"6.1",
12:"6.2",
13:"7.1",
14:"7.2",
15:"7.3",
16:"7.4",
17:"7.5",
18:"8.1",
19:"8.2",
20:"9.1",
21:"9.2",
22:"9.3",
23:"9.4",
24:"9.5"
],
3:[object #92, class 'Array'] [
0:"3.1.1",
1:"3.1.2",
2:"3.1.3",
3:"3.1.4",
4:"3.2.1",
5:"3.3.1",
6:"3.3.2",
7:"4.1.1",
8:"4.1.2",
9:"4.1.3",
10:"4.1.4",
11:"4.2.1",
12:"4.2.2",
13:"4.2.2",
14:"4.3.1",
15:"5.1.1",
16:"5.1.2",
17:"5.1.3",
18:"5.1.4",
19:"5.1.5",
20:"5.1.6",
21:"5.2.1",
22:"5.2.2",
23:"5.2.3",
24:"5.2.4",
25:"5.3.1",
26:"5.3.2",
27:"5.3.3",
28:"5.4.1",
29:"5.4.2",
30:"5.5.1"
],
4:[object #93, class 'Array'] []
]
Variable _level0.coordinateCheck = 9








2. -------- ACTIONSCRIPT --------

var diagnostic:XML = new XML();
diagnostic.ignoreWhite=true;
diagnostic.load("diagnostic.xml");

diagnostic.onLoad = function(success){
diagnosticLength = diagnostic.firstChild.childNodes.length;
diagnosticMenuPlace = 0;
iagnosticMenuItem = new Array();

while(diagnosticMenuPlace < diagnosticLength) {
diagnosticMenuItem[diagnosticMenuPlace] = new Array();
diagnosticMenuItem[diagnosticMenuPlace][0] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[0].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][1] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[1].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][2] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[2].firstChild.nodeValue;
if (diagnosticMenuItem[diagnosticMenuPlace][1] == "item"){
diagnosticMenuItem[diagnosticMenuPlace][3] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[3].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][4] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[4].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][5] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[5].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][6] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[6].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][7] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[7].firstChild.nodeValue;
}

diagnosticMenuPlace++;
}

counterx = 1;
countera = 2;
diagnosticMenuLayer = new Array();
coordinateCheck = 1;
while (countera != counterx) {
counterx = 1;
countera = 2;
diagnosticMenuPlace = 0;
diagnosticMenuLayer[((coordinateCheck+1)/2)] = new Array();

while (diagnosticMenuPlace < diagnosticLength) {
if((length(diagnosticMenuItem[diagnosticMenuPlace][2]) == coordinateCheck)
& (diagnosticMenuItem[diagnosticMenuPlace][2].charAt(coordinateCheck-1) != 0)) {
diagnosticMenuLayer[((coordinateCheck+1)/2)].push(diagnosticMenuItem[diagnosticMenuPlace][2]);
countera++;
}else if((length(diagnosticMenuItem[diagnosticMenuPlace][2]) == coordinateCheck + 2)
& (diagnosticMenuItem[diagnosticMenuPlace][2].charAt(coordinateCheck+1) == 0)){
diagnosticMenuLayer[((coordinateCheck+1)/2)].push(diagnosticMenuItem[diagnosticMenuPlace][2]);
countera++;
}
diagnosticMenuPlace++;
}
counterx++;
coordinateCheck+= 2;
}

}

Is ComputeSpectrum() Broken?
I've been having trouble with my audio visualizer that uses computeSpectrum() ever since the latest update.

I haven't made any changes in the code for the audio visualizer, but after the last Adobe Update I downloaded, it seems that not only my visualizer is broken, but every visualizer I look at online is displaying waveform data that is not what it should be. I'm wondering if any other Flash users are having this problem, or if there's some way I could have broken it...

Also, I don't have any other streaming .swf's open at the time I'm viewing the visualizers, so it couldn't really be that problem.

Thanks in advance for any thoughts or input, because I'm completely lost...

EDIT:

It seems that other visualizers are working, but mine still aren't, I have a version online that I haven't messed with since the update, and even that one is broken though.





























Edited: 10/05/2008 at 04:42:34 PM by Jorgon

Help With Broken Preloader
I can never seem to get preloaders working....

This is one attempt that im quite certain I want to work, but me and a friend can't work out why the smeg it's not working...


ActionScript Code:
stop();total = getBytesTotal();done = getBytesLoaded();percent = loader/total*100;if (total == done) {    gotoAndPlay(3);} else {    _root.load_square._width = percent*5.5;/*whatever number is needed to times 100 to equal to stage width*/    _root.load_square._height = percent*4;/*whatever number is needed to times 100 to equal to stage height*/    gotoAndPlay(1);}


Thats the code on frame 1, frame 3 is some music (so i cant post the fla for copyright (and size) reasons).
There is a movieclip called load_square which is a 1pixel sqaure that is in the center of the stage, it's meant to get bigger and will fill the stage up when its fully loaded.

When it's run, the square doesnt grow, but when the movie is loaded it does go onto play the music.
I have tryed _yscale and _xscale as well, that doesnt work either, and my friend came up with this:


ActionScript Code:
stop();bytes_loaded = Math.round(this.getBytesLoaded());bytes_total = Math.round(this.getBytesTotal());getPercent = bytes_loaded/bytes_total;this.load_sqaure._width = getPercent*550;this.load_sqaure._height = getPercent*400;if (bytes_loaded == bytes_total) {    this.gotoAndPlay(3);}


Which does nothing at all...


Can anyone help me? I can't see whats going wrong at all...

Broken Preloader... Please Help
Ok I have a problem with my main preloader and can't figure it out, I have used the AS/TWEEN Preloader from the Kirupa tutorial located here. I have tweaked this preloader by embedding it in my main.swf so I can load external movies and it seems to give accurate readouts for loading the external file movingbg.swf, but it does not go back to the root so it can complete the outro animation... therefore leaving the preloader hanging in the background of my main movie.

Attached is the .fla so you can see what I am talking about.

Thanks in advance for the help!

Is There A Way That Movies Can Be Broken Apart?
Is there a way that you can break apart a movie into individual pictures that are in a sequence? I'm trying to help a friend make a vectorish snowboarding video clip.
Thanks,
-Alex K

Broken Image
Sometimes, when I make an image to go from alpha zero to 100%, the image gets broken, not smooth like the original.
How to overcome this?

thanks

Broken SetVariable
I created an offline presentation communicating from javascript to Flash using SetVariable. Everything worked fine using Flash Player 7 however when updating to Flash Player 8, none of the 5 variables are passed. I have 2 Flash menus that are communicating with an IFRAME through the javascript.

The following code used to work no problem:
window.document.statustext.SetVariable("statusbar. itemcount", itemcount);

How would I go about fixing this?

Thanks.

Jason

Broken Preloader?
I made this super long (2m30s) Flash intro for my website.

Because it's so long and thus high file size, I created a preloader for it.

The movie itself has music to it, with visual elements coinciding with specific audio elements in sync. Because of this, I wanted the movie to be 100% loaded so a visitor would press Play and watch the movie without lag interrupting the synchronization.

Last night I uploaded this to test it out.... and it doesn't work right.

The preloader counts to the 100% (very quickly though), and I can then press play, but the visual elements lag far behind the audio elements they are intended to be synchronized with.

However, when I preview the Flash movie within Flash, they are all synched up fine.

Why isn't it like that on the web? And how can I fix it?

For the record, the preloader code used is identical to the tutorial on this site.

And, for reference, the URL to my flash intro is http://www.wes-ide.com/intro.html

The actual FLA file?
http://www.wes-ide.com/intro5d.fla

Please help me if you can. My site's scheduled launch is 9-1-06 and I am worried I won't have a correctly functioning intro by then

Thank you in advance for any help you can supply!

Why Is This Array Broken?
Hello!

I have an array of 50 movieclips with 5 rows and 10 columns.

Here is how I wanted it to look

and

Here is how it currently looks

I have a flaw in the logic that is repeating the same row over and over, instead of increasing the value correctly.

Any ideas?!

Here is the code:


HTML Code:
//init variables
spacingx = 78;
spacingy = 78;
character._visible = 0;

//open more info
function DisplayInfo() {
menu_mc._visible = false;
infobox_mc._visible = true;
infobox_mc.content_txt.text = this.location_text;
}

//close more info
infobox_mc.close_btn.onRelease = function() {
menu_mc._visible = true;
infobox_mc._visible = false;
infobox_mc.content_txt.text = "";
};

//create character array
infobox_mc._visible = false;
var item_count = 0;
function CreateMenu(menu_xml) {
var items = menu_xml.firstChild.firstChild.childNodes;
for (var i = 0; i<items.length; i++) {
for (var j = 0; j<5; j++) {
if (items[i].attributes.type == "user") {
var species = items[i].firstChild;
var location = items[i].childNodes[1];
var item_mc = menu_mc.attachMovie("character", "item"+item_count, item_count);
item_mc._x = spacingx*i;
item_mc._y = spacingy*j;
item_count++;
item_mc.species_txt.text = species.firstChild.nodeValue;
item_mc.main_btn.location_text = location.firstChild.nodeValue;
item_mc.main_btn.onRelease = DisplayInfo;
}
}
}
}

//load xml
var feed_xml = new XML();
feed_xml.ignoreWhite = true;
feed_xml.onLoad = function(success) {
if (success) {
CreateMenu(this);
} else {
trace("Error loading XML file");
}
};
feed_xml.load("feed.xml");
Thanks!!

Broken Mp3 Player?
Hi all,

I've got an mp3 player component that I found several years ago on flashcomponents I think. Anyways, an odd thing is happening. When I click the back button, I get an 'undefined' message instead of the different track names. A quick search of these forums turned up a thread relating to the path specified in the .xml document. I have tried placing the songs in both a separate 'songs' folder, as well as in the same folder as the .swf file.

Can anyone take a look at this and perhaps help me out?
fla

Thanks

Oh, also, the reason I'm digging this thing up anyways, is to hopefully replace the volume up and volume down buttons with a single 'speaker off' button. Is that something that's easy to do w/ this current .fla?

MouseWheelEnabled 'Broken'
Is it just as simple as adding the bold line into my code to get the scrollwheel to work on the mouse for a text field? If so it aint working!


Code:
function loadTxt(theTxt){
var lv:LoadVars = new LoadVars();
lv.onLoad = function(success:Boolean){

if (success){
my_text.html = true;
my_text.htmlText = lv.txt;
my_text.mouseWheelEnabled = true;
}else{
trace ("cannot load text!");
}
};
lv.load(theTxt);
}

Embed Broken?
Hi

I have used the embed tutorial on Kirupa and it have always worked (http://www.kirupa.com/developer/flash8/flash_fix.htm)
But today when i tried to use it it suddenly dosnt work. I insert the kode into a TD and it becomes just emty :S

So i tried the swfobject solution, and then i just get a white box instead of the flash?

u can see the kod below


HTML Code:
<td width="220">

<script type="text/javascript" src="flashobject.js"></script>
<div id="MySite" style="width: 220px; height: 300px"></div>
<script type="text/javascript">
var fo = new FlashObject("menu2.swf","MySite","220", "300", "0","#ffffff");
fo.addParam("allowScriptAccess", "sameDomain");
fo.addParam("quality", "high");
fo.addParam("scale", "noscale");
fo.write("MySite");
</script>

</td>

really hope anyone have a clue whats going on cuz i dont :/

Both the js file and the swf is in the same dir ofc as the html page

GlobalToLocal Broken?
I have some displayObjects and some instances of Tooltip class. The position is counted by
ActionScript Code:
var coordinates:Point=globalToLocal(new Point(stage.mouseX,stage.mouseY));
The first invoking works perfect, the second something else, third ok, 4th again not. Sometimes when I invoke this method in different instances this method gives me RANDOM!? values after some invokes
Here is trace:
Code:
(x=184, y=48) (x=584, y=298)
(x=-1, y=1) (x=583, y=299)
(x=185, y=46) (x=584, y=297)
(x=-3, y=-1) (x=582, y=295)
(x=185, y=47) (x=582, y=296)
(x=-3, y=1) (x=582, y=298)
(x=183, y=48) (x=580, y=299)
(x=157, y=-30.650000000000002) (x=198, y=407)
(x=0, y=4) (x=198, y=411)
(x=161, y=-21.650000000000002) (x=202, y=420)
(x=-16, y=4) (x=186, y=420)
(x=170, y=-18.650000000000002) (x=195, y=423)
(x=-23, y=3) (x=188, y=422)
(x=226, y=-23.650000000000002) (x=244, y=417)
(x=13, y=9) (x=280, y=423)
(x=-42, y=-12) (x=541, y=286)
(x=149, y=15) (x=549, y=265)
(x=183, y=62) (x=541, y=300)
(x=2, y=-1) (x=551, y=264)
(x=152, y=10) (x=554, y=259)
(x=-59, y=-17) (x=524, y=295)
(x=3, y=5) (x=555, y=265)
(x=153, y=3) (x=556, y=258)
(x=155, y=69) (x=496, y=302)
(x=-23, y=14) (x=530, y=267)
(x=25, y=-28) (x=580, y=291)
(x=202, y=1) (x=579, y=265)
(x=150, y=69) (x=575, y=291)
(x=-64, y=17) (x=538, y=268)
(x=-12, y=-21) (x=538, y=298)
(x=202, y=0) (x=538, y=267)
(x=148, y=59) (x=536, y=288)
(x=-67, y=15) (x=535, y=265)
(x=-14, y=-16) (x=534, y=293)
of this:
ActionScript Code:
trace(globalToLocal(new Point(stage.mouseX,stage.mouseY)),new Point(stage.mouseX,stage.mouseY));
Here are Mouse handlers:
ActionScript Code:
protected function showTooltip(event:MouseEvent):void {   this.dictionary[event.target].showDelayed();  }  protected function hideTooltip(event:MouseEvent):void {   this.dictionary[event.target].hide();  }
Here methods of Tooltip class
ActionScript Code:
public function showDelayed(time=400):void {   this._intervalId=setTimeout(show,time);  }  public function show():void {   this._intervalId=0;   trace(globalToLocal(new Point(stage.mouseX,stage.mouseY)),new Point(stage.mouseX,stage.mouseY));   var coordinates:Point=globalToLocal(new Point(stage.mouseX,stage.mouseY));   this.x=coordinates.x;   this.y=coordinates.y;   invalidate();   if (this._soundURL) _playSound();   this._tweenAlpha.removeEventListener(TweenEvent.MOTION_FINISH,_clear);   this._tweenAlpha.start();   this._tweenSize.start();  }
To see what i mean see link below and rollOver and Out couple of times SzybkieNewsy window or one of textFields in ControlPanel, I want tooltips always show under cursor.

Copyright © 2005-08 www.BigResource.com, All rights reserved