PDA

View Full Version : Silly Question



slinkyart
June 30th, 2006, 12:26 PM
The answer to this is probably ridiculously easy...but I am having a serious brain fart!!!! It's way too early in the morning.

I want my movie to play through and when it gets to the end, jump back to a certain key frame and then play again and stop when it gets to the end.

So basically I want my movie to play twice then stop.

Thanks.

Jpao17
June 30th, 2006, 02:07 PM
On the first frame set a variable to false

var Replay:Boolean = false;

On the last frame set that same variable to true (meaning it has replayed), and use an If to say if not replay gotoAndPlay(2), otherwise stop.

if(!Replay) {
Replay = true;
gotoAndPlay(2);
}
else
stop();

Beware, if you use gotoAndPlay(1) meaning u play it back from the beginning, it will reset the variable to false. So to counter that you would use an if statement.

Chris