PDA

View Full Version : loadMovie goto a specific label in new swf


StephBeez
09-24-2001, 10:21 PM
Ok, I'm loading movies from my menu on level_0 into level_1, they all load into level_1 (so there's never 2 of anything on the screen). I'm trying to make a button work that is essentially a "next" button that will go to a frame label in a swf that will replace the swf it's going from. I understand how to load and unload the swfs, but I can't get a gotoAndPlay to work to a frame label in that new swf level. Any suggestions? If I'm unclear please e-mail or post back... :)

red penguin
09-25-2001, 11:16 AM
this gotoAndPlay, is it in the button that loads the swf? If so, you can't tell it that until the movie is fully loaded...

You might have a three frame timeline loop to check when it is fully loaded, then when it is you can target it!

That it?

StephBeez
09-25-2001, 02:41 PM
Oh, I see... duh moment. how would I check if it's loaded?

red penguin
09-25-2001, 04:16 PM
getBytesLoaded() and get BytesTotal()...

You're gonna compare the two...when they are "==", you know the swf is fully loaded...

//load your swf...frame one for example

//empty frame

//next frame
if(getBytesLoaded() == getBytesTotal()){
_root.target.gotoAndPlay("frameLabel");
} else {
gotoAndPlay(_currentFrame - 1);
}

you can do it with buttons, clipEvents, etc...yeah?

StephBeez
09-25-2001, 05:00 PM
Okay, I see where your going. I'll give it a shot!

Thank you very much!

Stephanie