Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In need of some loops...

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi there...

I have been racking my brains over what seems like a simple problem. I'm making a flash banner that needs to loop 3 times and stop on the last frame. To me this sounds like an action script or a setting that I'm not aware of. I know you can do this with animated gifs, but I want to make an swf with this function. If someone knows how to achieve this please walk me through it! I'm using Flash 5, also have 4 if it's easier to do in that version.

THANKS!
Soleileve
 
Add a variable that counts how many times the movie loops, put it in the last frame of your movie, then check to see how many times it's gone through.

So if your variable was called "loop"...

if (loop<3){
loop+=1;
gotoAndPlay(1);
} else{
stop();
}

...would do it.
 
Just wanted to say thanks for responding....
I ended up using this formula instead which
seemed to work:

counter=counter+1

Start out with 0 in the Dynamic Text Box field.
It will check itself the first time through and add 1 to the 0.
The second time through the counter will then be one and add 1 to make
2.
The third time through the counter will then be 2 and add 1 to make 3.

If counter=3
Stop

Else GoToAndPlay Frame Number 1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top