Looping a MC in the main timeline

I’m slowly climbing the AS stairway to glory … but for now, here’s another elementary inquiry:

How do I force my movie clip animation to LOOP – say oh, 5 times – before the main timeline advances to the next frame? Right now, I’ve got a STOP on the frame, and the clip repeats indefinitely (I’ve got a gotoAndPlay(1) goin’ on in the last frame of the MC’s timeline.)

Input is greatly appreciated!

Jeff

on your first keyframe put the actions:
inc=0;

then on the frame where you want to loop at put:
gotoAndPlay(2);
inc+=1;
if(inc==5)gotoAndPlay(“nextAnimation”);

you can replace 2 with whatever frame your first animation starts at and “nextAnimation” with a frame label or the frame number of what you want after your first animation loops!

hope that helps…if not I have an .fla]
-brian2

Thanks for the reply, Brian2!

Just to clarify … This code appears on the MAIN timeline, right? It puts the MAIN timeline into this designated loop, and won’t move on until the loop releases the hounds, correct?

yes, that is correct

:frowning:

Can I get that FLA from ya?

sure. here you go.