# How to removeChild from a class file

**URL:** <https://forum.kirupa.com/t/how-to-removechild-from-a-class-file/251967>\
**Category:** flash\
**Created:** [February 14, 2008, 1:40pm UTC](https://forum.kirupa.com/t/how-to-removechild-from-a-class-file/251967 "2008-02-14T13:40:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fs\_tigre](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://forum.kirupa.com/u/fs_tigre)\
**Post date:** [February 14, 2008, 1:40pm UTC](https://forum.kirupa.com/t/how-to-removechild-from-a-class-file/251967/1 "2008-02-14T13:40:00Z")

</div>

[FONT=Calibri][SIZE=3]I am trying to remove a movie Clip using a class attached to it. This is what I have, a Movie Clip with a button inside. What I want to do is that when the button (close\_btn - inside the movie clip) is clicked this removes the movie clip and of course the button itself. Again this class is attached to the movieclip.[/SIZE][/FONT]

[FONT=Calibri][SIZE=3]The movie clip is added to the stage using code (addChild() )in the timeline.[/SIZE][/FONT]

[FONT=Calibri][SIZE=3]Thanks,[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]fs\_tigre[/SIZE][/FONT]
