# Remove movie clip with a button inside another movieclip

**URL:** <https://forum.kirupa.com/t/remove-movie-clip-with-a-button-inside-another-movieclip/287429>\
**Category:** Uncategorized\
**Created:** [April 30, 2009, 9:38pm UTC](https://forum.kirupa.com/t/remove-movie-clip-with-a-button-inside-another-movieclip/287429 "2009-04-30T21:38:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterr](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@peterr](https://forum.kirupa.com/u/peterr)\
**Post date:** [April 30, 2009, 9:38pm UTC](https://forum.kirupa.com/t/remove-movie-clip-with-a-button-inside-another-movieclip/287429/1 "2009-04-30T21:38:35Z")

</div>

(Flash AS3)  
I’m relatively new to flash so any help would be greatly appreciated. Basically I have a movieclip that when I roll\_over it reveals two buttons that I then need to use to remove movieclips that are on the same stage as the original movie clip. So the button inside the movieclip needs to remove a different movieclip that is also up on level.

I’ve tried this many different ways, none seem to work. The error that I keep getting is undefined property of “grey\_mc.” And yes I made sure it has an instance name of grey\_mc on the main stage. my code looks like:

```auto
removeButton.addEventListener(MouseEvent.CLICK, clickHandler);

function clickHandler(event:MouseEvent) {
    parent.removeChild(grey_mc)

}

```

i’ve also tried with other variations:

```auto
  MovieClip(this.root).removeChild(grey_mc);

```

any help or suggestions would be very much appreciated. thanks.
