HELP: Little help on "if then" statement

Hello again,

Supposing you have an movieclip nested on your main stage and you want that clip to move to a particular frame when a button is clicked, and if it has already moved to that specified frame, it will just PAUSE.

I was thinking of this:


if myClip = frame 5
then gotoAndPlay(“label”);
else
gotoAndStop(currentFrame);


I tried to make the script but I get errors :). I’ve been looking for a TUT here at Kirupa but didn’t found one so far.

Thanks

just think that you want to move to 5th frame of root time line. the code would be

for button’s onPress event :

on(press){
gotoAndStop(5);
}
thats all,

Hi

Try using this:

if (myClip._currentframe == 5){
gotoAndPlay(“label”);
}else{
gotoAndStop(currentFrame);
}


aShIsH