# Restrict timeline actions to inside a child movieclip?

**URL:** https://forum.kirupa.com/t/restrict-timeline-actions-to-inside-a-child-movieclip/320479
**Category:** flash
**Created:** [March 24, 2011, 3:02pm UTC](https://forum.kirupa.com/t/restrict-timeline-actions-to-inside-a-child-movieclip/320479 "2011-03-24T15:02:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![BottleShock](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@BottleShock](https://forum.kirupa.com/u/BottleShock)
#### Post date: [March 24, 2011, 3:02pm UTC](https://forum.kirupa.com/t/restrict-timeline-actions-to-inside-a-child-movieclip/320479/1 "2011-03-24T15:02:47Z")

</div>

I’ve done a website with different pages using the Loader component. On one page I have a movieclip that has different images (like a slideshow) that fade between each other. I’m trying to add an action to make the movieclip pause for a few seconds between each fade. So I’ve added this action between each fade (in a layer, above the graphics layers, that only holds actionscript):

```auto
stop();
function restart(){
clearInterval(timeInt);
play();
};

timeInt = setInterval(restart,5000); // 5000ms = 5 secs 

```

It works well, except if I reload the page which has the movieclip in it. Suddenly that child movieclip action is applied to the entire (like \_root) website! Any ideas? :puzzled:

\*using flash cs4, but actionscript 2.0.
