Help with looping

Hi-
I Have two movies on the stage of my main time line, both placed in the first and only frame of the main timeline. One runs only once, and I want the other to loop 3 times and then stop. I have tried EVERYTHING. I can only get it to either run once or keep looping forever. I tried the set variable loop=1, loop while loop <= 3 and then set variable loop= loop +1 and end loop. But this doesnt work. Please help I need an answer yesterday!

Thanks

Hello stephanieparis,
You can edit that movie to go to a certain frame after the loop has reached 3. Go to the last frame on your movie clip. In that frame, add the following action:

loop = loop + 1

if (loop == 3) {
gotoandStop(30);
} else {
gotoandPlay(1);
}

Now, add another keyframe after the keyframe you added the above action to. Add a stop action to this keyframe. Check to see what the frame number that keyframe lies under. In the code, enter the frame number that the keyframe is found in the place of the ‘30’. That should help you to control the looping of a movie.

Still having problems - here’s the deal.
I am using flash 4 so maybe its not working cause i translated it wrong fromt he flash 5 code. It stops indeed, but only after 1 repeat. I need 3. Also, when that movie stops it goes blank. I want all images/embedded movies within this movie that are seen in the last frame of its timeline to stop but remain visible. Can you help?

Thanks

are you possative that you have two equal signs in the if statement, as is shown above.

If x==1, is very different than x=1 and it’s a mistake I make all the time.

Perhaps if you furnished the FLA file one of us could take a look at it. My e-mail is [email protected] and I’m happy to look at stuff. :slight_smile: