Thanks Juan Pablo and Steven for the solution, it was very helpful!
I'm struggling now with a weird problem:

I've put an animation on frame 1 that keeps running in loop until the whole
SWF file is loaded and the player moves to frame 2. Here is the code:

trace (" hello ");
addEventListener(Event.ENTER_FRAME, loading);

function loading(event:Event) {
var bytestotal=stage.loaderInfo.bytesTotal;
var bytesloaded=stage.loaderInfo.bytesLoaded;
if (bytesloaded>=bytestotal) {
removeEventListener(Event.ENTER_FRAME, loading);


When I simulate download and play the program, the screen remains blank for
some seconds, even though the file is already loading:
The loading animation only appears on the screen (as well as the word
"hello" is traced) when the file it's about 70% loaded, and then I see the
percentage moving up in the Output panel.
Why does it happens? The size of the file is 80kb. I've already tried
putting this code into a different scene in the same swf file but the same
thing happens. Someone has a clue?

thanks a lot!
Flashcoders mailing list

Reply via email to