PDA

View Full Version : simple loop not working


Gregory Dean
07-23-2005, 02:40 AM
I have a rather lengthly movie that i have created a preloader (first 10 frames) for. It has a small animation for the "loading part" this is the code i am using in the first frame of layer 2 (actions).

Layer 1 is preloader -frame 1 is labeled "intro" frame 11 is labeled "start"
Layer 2 is actions

the code is not looping? I am missing at stop somewhere or what?

if (_framesloaded>=_totalframes) {
gotoAndPlay("start", 11);
} else {
gotoAndPlay("intro", 1);
}
fscommand("showmenu", false);
fscommand("fullscreen", false);
fscommand("allowscale", false);
fscommand("trapallkeys", false);

any help will be appreciated

csdstudio
07-23-2005, 04:35 AM
Try this, use one or the other in the gotoAndPlay statement:

if (_framesloaded>=_totalframes) {
gotoAndPlay(11);
} else {
gotoAndPlay(1);
}
fscommand("showmenu", false);
fscommand("fullscreen", false);
fscommand("allowscale", false);
fscommand("trapallkeys", false);

or..

if (_framesloaded>=_totalframes) {
gotoAndPlay("start");
} else {
gotoAndPlay("intro");
}
fscommand("showmenu", false);
fscommand("fullscreen", false);
fscommand("allowscale", false);
fscommand("trapallkeys", false);