PDA

View Full Version : ifFrameLoaded vs getBytesTotal


Chilton
08-19-2002, 10:21 PM
I've got a Flash movie with 5 levels. I'm checking to see if they are fully loaded by using the following...


///
x = int( (_level3.getBytesLoaded()/_level3.getBytesTotal())*100);
if (_level3.getBytesLoaded()!=_level3.getBytesTotal() ){
_root.progress.gotoAndStop(x);
gotoAndPlay("notloadedyet");
} else {
_root.progress.gotoAndStop(x);
gotoAndPlay("myframeisloaded");
}

////

(I changed the names a bit to make more sense out of context)

Now, when I run this, some frames routinely ARE NOT LOADED even though they pass this test.

Should I be using _framesloaded/ifFrameLoaded instead?

-Chilton

xxlm
08-20-2002, 01:35 AM
This post has been identified as a 'crosspost', that is, it has been posted multiple times on the forums. Please post each question just once and we will do our best to answer it. Thanks.

Chilton
08-20-2002, 01:37 AM
I realize that now. I'd posted it, but couldn't find it where I thought I had posted it, so I posted it again and it appeared to work. Sorry.

-Chilton

BEANZ
08-20-2002, 08:04 AM
i think you should try the ifFrameLoaded thing

or maybe at the beginnig of each level you have a preloader, so for example right at the start of the movie it loads level 1 and that has its own preloader and when it gets to the end and 100% has loaded it loads level 2 with its own preloader and so on. but then that would only look right if like one level had animation and the other level(s) have sound/summin else so then it could say loading sound for level 1 and after thats done say loading animation for level 2 or whatever. just a thought :)

Chilton
08-21-2002, 07:33 PM
I have more info on this. It happens only with newer releases of the Flash plug-in and on slow connections. Happens on both platforms. I'll try to create an example and post it (my client is very secretive regarding his project right now or I'd just post the link to it).

-Chilton

pixelwit
08-22-2002, 12:40 AM
In the sample code above, what happens if bytesLoaded = 0 and bytesTotal = 0?

Just wondering,

-PiXELWiT
http://www.pixelwit.com

Chilton
08-22-2002, 02:15 AM
GOOD QUESTION. I'll look into it.

-Chilton