My script is loading an external SWF. Everything runs smoothly during the load. But when the packet arrives, I noticed that something else is inside: insanity.
How to reproduce:
- Create two flas
- In the first one, write the following in the first (and unique) frame: //
- In the second one, write the code to load the first:
trace("1") var loader:Loader = new Loader() loader.load(new URLRequest("Untitled-1.swf")) stop()
Run the first to produce the swf, then the second. The output will be an endless stream of "1"s, clearly showing that it’s looping. But the loader wasn’t even added to stage yet and it has no action to play the main movie!
And now, for the craziness coup de grace: remove the “//” from the first fla and export it again. Bingo, no more endless loops. Did you hear that? Removing an EMPTY COMMENT fixed the problem.
It might be (and I hope that it is) a corruption in my Flash IDE, so I’m attaching the two flas and two swfs created here.
What the heck is happening? Known bug? Expected counter-logical behavior? Ghosts haunting my code?
And better yet, how do I fix this?