# Need help creating time based movie control

**URL:** <https://forum.kirupa.com/t/need-help-creating-time-based-movie-control/205485>\
**Category:** flash\
**Created:** [October 30, 2006, 6:04am UTC](https://forum.kirupa.com/t/need-help-creating-time-based-movie-control/205485 "2006-10-30T06:04:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atris](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@Atris](https://forum.kirupa.com/u/Atris)\
**Post date:** [October 30, 2006, 6:04am UTC](https://forum.kirupa.com/t/need-help-creating-time-based-movie-control/205485/1 "2006-10-30T06:04:11Z")

</div>

Hello all.

I’m trying to create “Time based movie control” (in the first frame of my movie) via the code below. I’m trying to advance the playhead to frame 2 once 5000 milliseconds have gone by. I’m able to trace getTimer but I am unable to advance the playhead to the next frame.  
Any thoughts?  
stop();  
function myTimer():Void {  
trace(getTimer());  
if(myTimer \> 5000){  
gotoAndStop(2);  
}  
}  
var intervalID:Number = setInterval(myTimer, 1000);  
myTimer();  
Cheers,

-A
