PDA

View Full Version : If movie is loaded


fspaiva
03-18-2003, 07:33 PM
Hi,

I want to verify if the movie.swf, that was loaded by a empty mc target, is already loaded. Something like this:

if (target.mymovie.isLoaded) {
do something;
}
else {
target.mymovie.loadMovie("movie.swf");
}

Of course, isLoaded was invented by me (I think).

Thks!

farafiro
03-19-2003, 10:41 AM
//a lotta ways for that
//MX code
this.onEnterFrame = function(){
if(holder_mc.getBytesLoaded()>=holder_mc.getBytesTotal()){
//do something
}
}
//**********OR
this.onEnterFrame = function(){
if(holder_mc._framesloaded>=holder_mc_totalframes){
//do something
}
}
also, u can do that with the setInterval() function ,better that onEnterFrame()

skee
03-19-2003, 02:48 PM
farfiro,
Out of curiosity, why do you say that the setInterval() function is a better approach than the onEnterFrame()
thanks,
skee

farafiro
03-20-2003, 05:32 AM
fast >> time controled with millisecond, but the onEnterFrame follows the fps
easier to be deleted after finishing the loading than the onEnterFrame
more accurate