# Timeline Removing a Movie Clip

**URL:** <https://forum.kirupa.com/t/timeline-removing-a-movie-clip/263347>\
**Category:** flash\
**Created:** [June 14, 2008, 9:53pm UTC](https://forum.kirupa.com/t/timeline-removing-a-movie-clip/263347 "2008-06-14T21:53:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Septenary](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@Septenary](https://forum.kirupa.com/u/Septenary)\
**Post date:** [June 14, 2008, 9:53pm UTC](https://forum.kirupa.com/t/timeline-removing-a-movie-clip/263347/1 "2008-06-14T21:53:07Z")

</div>

Hello,

I am making a timeline-based game in AS3. On one frame of the main timeline I have the game menu, contained in a movie clip, and on the second, I have the actual game screen, again contained in a movie clip.

I have always thought that when the timeline advances to a frame that a child movie clip is not on, that movie clip stops existing. So, in my case, when I tell the main timeline to gotoAndStop() to the “game screen” keyframe, I want it to remove the menu movie clip completely.

However, when I create and run a Timer object in the menu movie clip, the timer continues to run, even after I gotoAndStop() to the game screen. Here’s what the timer does:

```auto
function gogogo(e:TimerEvent):void{
    trace("I EXIST!", this, parent.eUM);
}
var t:Timer = new Timer(500);
t.addEventListener(TimerEvent.TIMER, gogogo);
t.start();

```

The main menu movie clip has an instance name of “eUM” on the main timeline. When the main timeline is on the “menu” frame, the timer traces\* “I EXIST! [object mcMainMenu\_241] [object mcMainMenu\_241]” \*as expected. However, when the main timeline is on the “game screen” frame the timer still runs, and traces _“I EXIST! [object mcEditUnitMenu\_241] null”_. So, “this” – the main menu – still exists, but when referenced from the parent, it does not.

So, it looks like I was wrong about a movie clip ceasing to exist when it is no longer on the timeline? I want it so that all of the main menu’s child objects and script stop when it is no longer on the main timeline.

Sorry for my newbie-ish questions.

---

<div class="post-metadata">

**Author:** ![DiamondDog](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@DiamondDog](https://forum.kirupa.com/u/DiamondDog)\
**Post date:** [June 15, 2008, 5:39am UTC](https://forum.kirupa.com/t/timeline-removing-a-movie-clip/263347/2 "2008-06-15T05:39:47Z")

</div>

Why not remove the menu (and stop the timer, too, if it’s not needed anymore) just before  
going to the main game screen?

```auto
removeChild(menu movie clip);
t.stop();
gotoAndStop("game screen")

```
