Loop 3 times and stop

Tuesday, September 29th, 2009

This is just some code for myself for future reference, when you need a flash file to loop 3 times and stop toss this in your actions layer on the final key frame.

if (!loop) {
var loop:Number = 0;
}
loop++;
if (loop >= 3) {
this.stop();
}