# Movie Clip Time Out/Wait Function - Flash 8

**URL:** https://forum.kirupa.com/t/movie-clip-time-out-wait-function-flash-8/285231
**Category:** flash
**Created:** [March 29, 2009, 1:01am UTC](https://forum.kirupa.com/t/movie-clip-time-out-wait-function-flash-8/285231 "2009-03-29T01:01:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pacificm](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@pacificm](https://forum.kirupa.com/u/pacificm)
#### Post date: [March 29, 2009, 1:01am UTC](https://forum.kirupa.com/t/movie-clip-time-out-wait-function-flash-8/285231/1 "2009-03-29T01:01:46Z")

</div>

Hello,

I have a Flash 8 movie where I need to have a movie clip that will periodically appear on stage in certain frames. After reaching a frame containing the movie clip -the movie clip needs to time out/wait for five seconds before it plays.

What ActionScript would accomplish this? Should the ActionScript be located in the first frame of the movie or embedded within the movie clip?

I attempted to use the following code within the movie clip and although it worked to control the movie clip, it interfered with cue point .flv goToAndStop functions on the main timeline:

```auto

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

```

Thanks!

James
