# Pause main timeline with AS3?

**URL:** <https://forum.kirupa.com/t/pause-main-timeline-with-as3/321385>\
**Category:** flash\
**Created:** [April 18, 2011, 6:38pm UTC](https://forum.kirupa.com/t/pause-main-timeline-with-as3/321385 "2011-04-18T18:38:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgjr712](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@sgjr712](https://forum.kirupa.com/u/sgjr712)\
**Post date:** [April 18, 2011, 6:38pm UTC](https://forum.kirupa.com/t/pause-main-timeline-with-as3/321385/1 "2011-04-18T18:38:12Z")

</div>

Hey guys,

I was wondering how I might pause my main time line with AS3, currently I’m using the following code for AS2 and it does exactly what I need it to do.

* * *

function wait() {  
stop();  
var myInterval = setInterval(function () {  
play();  
clearInterval(myInterval);  
}, 5\*1000); // stop for in seconds  
}

## wait(); // This goes on the fame I want to pause

Any help would be much appreciated.

Thanks,  
SG
