//Stops after three timeline iterations.
var counter:uint;
stage.addEventListener(Event.ENTER_FRAME, stopLastFrame);
function stopLastFrame(event:Event):void{
if(this.currentFrame == this.totalFrames){
if(counter >= 11){
stop();
}else{
counter++;
}
}
}