# Movieclip Timeline control

**URL:** <https://forum.kirupa.com/t/movieclip-timeline-control/248557>\
**Category:** flash\
**Created:** [January 9, 2008, 5:45pm UTC](https://forum.kirupa.com/t/movieclip-timeline-control/248557 "2008-01-09T17:45:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmsjazz](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@rmsjazz](https://forum.kirupa.com/u/rmsjazz)\
**Post date:** [January 9, 2008, 5:45pm UTC](https://forum.kirupa.com/t/movieclip-timeline-control/248557/1 "2008-01-09T17:45:44Z")

</div>

Hi, new to AS3.

I’m trying to animate a MC on the stage before moving to a named stage frame. i want the MC to finish all 27 frames before it advances stage frames. It loops, and traces 1-27, but doesn’t advance the MC framehead. The instance name is correct.  
How do I:  
MC.play();  
wait until MC is finished;  
gotoAndStop(“StageFrame”);  
?  
thanks.

[FONT=Courier New]function gotoLabeledFrame(Event:MouseEvent) {  
for (var x:uint=1; xframe\<=27; xframe++) {  
doorhandle.gotoAndStop(doorhandle.currentFrame+1);  
trace(x);  
}  
gotoAndStop(“LabeledFrame”);  
}[/FONT]
