# How to remove a movieclip once its done playing

**URL:** <https://forum.kirupa.com/t/how-to-remove-a-movieclip-once-its-done-playing/300383>\
**Category:** flash\
**Created:** [November 20, 2009, 4:38am UTC](https://forum.kirupa.com/t/how-to-remove-a-movieclip-once-its-done-playing/300383 "2009-11-20T04:38:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kratosaurion](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@kratosaurion](https://forum.kirupa.com/u/kratosaurion)\
**Post date:** [November 20, 2009, 4:38am UTC](https://forum.kirupa.com/t/how-to-remove-a-movieclip-once-its-done-playing/300383/1 "2009-11-20T04:38:51Z")

</div>

I need to know how to removed a movieclip when its done playing, I attancht it like this, to play, but it just keeps playing, here is the code con the main timeline:

```php
if( mob.hitTestPoint(hero.x,hero.y,true)){
		var boom:MovieClip = new explosion();
     boom.x=mob.x;
     boom.y=mob.y;
     stage.addChild(boom);
     if(this.contains(mob)){
     removeChild(mob);
							 }
		}

```

And the other thing is I need my hero to go to the next frame (a new level) when it hits another thing… (All of this in Actionscript 3.0)  
Please help me!!
