Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-26-2005, 11:39 PM   #1
markfuno
Registered User
 
Join Date: Jan 2005
Posts: 5
Default looping a banner ad like 3 times!??!?

i need to loop a banner ad like 3 times or so. i use this code in the last frame.

var i = 0;
while (i<3) {
gotoAndPlay(1);
i++;
}

i figured it would stop after playing 3 times. but it keeps repeating. what am i doing wrong???
markfuno is offline   Reply With Quote
Old 01-27-2005, 05:45 AM   #2
Taff
Old git!
 
Join Date: Dec 2004
Posts: 406
Default

The easiest way would probably be to put some code on the last frame of the banner mC.
ActionScript Code:
if(_root.myVar<2){     this.gotoAndPlay(1);     _root.myVar++; }else{     //do whatever we want to happen after its finished looping. }
Remember to put
ActionScript Code:
myVar=0;
on your main timeline too :-)
Taff is offline   Reply With Quote
Old 01-27-2005, 01:09 PM   #3
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: Egyptian in UAE
Posts: 12,436
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

[crosspost]: http://www.actionscript.org/forums/s...ewpost&t=63653
__________________
‚€* GOD Is Near ‚€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:18 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.