PDA

View Full Version : looping a banner ad like 3 times!??!?


markfuno
01-26-2005, 11:39 PM
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??? :mad:

Taff
01-27-2005, 05:45 AM
The easiest way would probably be to put some code on the last frame of the banner mC.

if(_root.myVar<2){
this.gotoAndPlay(1);
_root.myVar++;
}else{
//do whatever we want to happen after its finished looping.
}

Remember to put

myVar=0;

on your main timeline too :-)

farafiro
01-27-2005, 01:09 PM
[crosspost]: http://www.actionscript.org/forums/showthread.php3?goto=newpost&t=63653