# Pausing the loaded movie 5 secs

**URL:** <https://forum.kirupa.com/t/pausing-the-loaded-movie-5-secs/52168>\
**Category:** Uncategorized\
**Created:** [May 20, 2004, 6:52pm UTC](https://forum.kirupa.com/t/pausing-the-loaded-movie-5-secs/52168 "2004-05-20T18:52:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![z3r0](https://avatars.discourse-cdn.com/v4/letter/z/cdc98d/32.png) [@z3r0](https://forum.kirupa.com/u/z3r0)\
**Post date:** [May 20, 2004, 6:52pm UTC](https://forum.kirupa.com/t/pausing-the-loaded-movie-5-secs/52168/1 "2004-05-20T18:52:05Z")

</div>

This script pauses 5 secs the timeline… if I put that on a frame in main  
timeline  
works ok…

// Set the following two values for how long you want to  
// loop, and how many frames to loop:  
pauseDuration = 5\*1000;  
framesInLoop = 1;  
if (startTime == null) {  
startTime = getTimer();  
gotoAndPlay (\_currentframe-framesInLoop);  
} else {  
lapsedTime = getTimer()-startTime;  
if (lapsedTime\<pauseDuration) {  
gotoAndPlay (\_currentframe-framesInLoop);  
} else { startTime = null;  
}  
}

However I need to pause a swf loaded into level1 when a button is pressed…  
I couldn’t customize it to make it work…  
I thought that changing the gotoAndPlay for level1.gotoAndPlay would be  
enough  
but it is not… can someone help me please?

Thank you!
