# unable to remove movieclip itself from stage as3

**URL:** <https://forum.kirupa.com/t/unable-to-remove-movieclip-itself-from-stage-as3/635082>\
**Category:** flash\
**Created:** [August 8, 2016, 5:40pm UTC](https://forum.kirupa.com/t/unable-to-remove-movieclip-itself-from-stage-as3/635082 "2016-08-08T17:40:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonnyelangbam](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bonnyelangbam](https://forum.kirupa.com/u/bonnyelangbam)\
**Post date:** [August 8, 2016, 5:40pm UTC](https://forum.kirupa.com/t/unable-to-remove-movieclip-itself-from-stage-as3/635082/1 "2016-08-08T17:40:14Z")

</div>

I had a button, with that button a movieclip is called on the stage and it is working fine with the below script

```
var mc:mc_lemon
var btn: btn_Lemon

mc=new mc_lemon();
btn = new btn_Lemon();

addChild(btn);

btn.x = 304.45;
btn.y = 209.8;
mc.x=304.45;
mc.y=209.8;

btn.addEventListener(MouseEvent.CLICK, addF);

function addF(e:MouseEvent):void{
    addChild(mc);
}

```

Now I am trying to remove the movieclip itself from the stage after reaching its last frame, but failed.

I was trying to remove it by placing this script at its last frame `this.parent.removeChild(this);` but failed

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [August 8, 2016, 5:42pm UTC](https://forum.kirupa.com/t/unable-to-remove-movieclip-itself-from-stage-as3/635082/2 "2016-08-08T17:42:47Z")

</div>

What about it is failing? Are you seeing an error message?
