View Full Version : how to loop a flash piece 3 times and stop after 3 times?
joecannes
May 11th, 2005, 10:34 AM
HI,
I am in need of some help.
I have a flash piece that I want to loop 3 times and then stop.
HOw do i do that?
kBisk
May 11th, 2005, 10:59 AM
put this in the first frame of the loop:
_root.loops_played = 0;
if (_root.loops_played >= 3){
stop(); //*
} else {
play();
}
and then this in the last frame of the loop:
_root.loops_played += 1;
which adds one to the loops_played variable, initially defined as zero. When the variable = 3, the loop will stop on the first frame. If you need it to do some else after the three loops, just add a different code to the line //*.
3pinter
May 11th, 2005, 02:12 PM
Or just search first before posting (!!!!!)...
http://www.kirupa.com/forum/showthread.php?t=95230
And welcome to the forums ;)
3Pinter
:smirk:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.