# Pause timeline for a duration

**URL:** <https://forum.kirupa.com/t/pause-timeline-for-a-duration/307242>\
**Category:** Uncategorized\
**Created:** [March 31, 2010, 9:22am UTC](https://forum.kirupa.com/t/pause-timeline-for-a-duration/307242 "2010-03-31T09:22:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JulyChurches](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@JulyChurches](https://forum.kirupa.com/u/JulyChurches)\
**Post date:** [March 31, 2010, 9:22am UTC](https://forum.kirupa.com/t/pause-timeline-for-a-duration/307242/1 "2010-03-31T09:22:10Z")

</div>

Hi guys,

Is there any way to stop the timeline at given frames for varying set times?

This is a AS2 one I used in the past (I think I saw it here on this forum)

[COLOR=#333300]this.createEmptyMovieClip (“timer”,50);  
timer.onEnterFrame = function () {  
if (this.startTime \> 0) {  
var difference = getTimer () - this.startTime;  
if (difference \> this.timerLength) {  
this.target.play ();  
this.startTime = 0;  
}  
}  
};  
function pauseFor (theTime) {  
stop ();  
timer.timerLength = theTime;  
timer.startTime = getTimer ();  
timer.target = this;  
}[/COLOR]

Any ideas how to do this with AS3?
