# Mc inside mc to be used as a 'close' button not working

**URL:** <https://forum.kirupa.com/t/mc-inside-mc-to-be-used-as-a-close-button-not-working/256173>\
**Category:** Uncategorized\
**Created:** [March 31, 2008, 4:45pm UTC](https://forum.kirupa.com/t/mc-inside-mc-to-be-used-as-a-close-button-not-working/256173 "2008-03-31T16:45:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyler\_j](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tyler\_j](https://forum.kirupa.com/u/tyler_j)\
**Post date:** [March 31, 2008, 4:45pm UTC](https://forum.kirupa.com/t/mc-inside-mc-to-be-used-as-a-close-button-not-working/256173/1 "2008-03-31T16:45:40Z")

</div>

Hi there,

I have a movieclip, and there is a movieclip inside of it that is being used as a button to close the parent movieclip. the idea is that this is a text box that appears, and then you hit the close mc to close the textbox.

As far as i can tell closeME() is where i’m lost. any suggestions would be great!

thanks in advance

```auto

public function closeME(e:MouseEvent) {
            e.target.parent.removeChild(this);
            // this is where its not working!!!!!
}
        
public function doM0(e:MouseEvent):void {
            var TB0:intro_mc = new intro_mc();
            TB0.x = stage.stageWidth / 2;
            TB0.y = stage.stageHeight / 2;
            
            TB0.CLOSES.buttonMode = true;
            TB0.CLOSES.addEventListener(MouseEvent.CLICK, closeME);
            parent.addChild(TB0);
}

```
