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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loop 3 times?

Status
Not open for further replies.

greengrassbrian

Technical User
Mar 26, 2004
33
US
does anyone know what kind of actions i would use to have a movie loop three times and then stop? -thanks!
 
You would need a blank first keyframe with...

_global.loop++;

Then on a last keyframe add this...

if (_global.loop == 3){
stop();
} else {
_global.loop++;
gotoAndPlay(2);
}

Another way...

First frame...

this.onEnterFrame = function(){
if(_global.loop == 3){
this.stop();
delete this.onEnterFrame;
}
};

And on the PREVIOUS frame than the last one...

_global.loop++;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top