# Stopping a 'wait x seconds' action

**URL:** https://forum.kirupa.com/t/stopping-a-wait-x-seconds-action/287570
**Category:** flash
**Created:** [May 3, 2009, 9:20pm UTC](https://forum.kirupa.com/t/stopping-a-wait-x-seconds-action/287570 "2009-05-03T21:20:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sjames](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sjames](https://forum.kirupa.com/u/sjames)
#### Post date: [May 3, 2009, 9:20pm UTC](https://forum.kirupa.com/t/stopping-a-wait-x-seconds-action/287570/1 "2009-05-03T21:20:53Z")

</div>

Hello!

At the first frame in my movie, I have a movieclip that has the below actionscript to make it continually fade between the latest news images (just plays, then I have a ‘stop’ on the next frame, and the same wait actionscript again). But it keeps going every 9 seconds even when i’m in a different part of the timeline that doesn’t even have the movieclip within it.

\*var interval = setInterval(playFrame,9000,1);  
function playFrame(frame) {  
play();  
clearInterval(interval);  
} \*

How do I make it ONLY effect what is inside the movie clip, and not the main timeline?

Thanks so much.
