# Add Child and Remove Child on same button

**URL:** <https://forum.kirupa.com/t/add-child-and-remove-child-on-same-button/295545>\
**Category:** flash\
**Created:** [September 1, 2009, 4:29am UTC](https://forum.kirupa.com/t/add-child-and-remove-child-on-same-button/295545 "2009-09-01T04:29:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aesthetics7](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@aesthetics7](https://forum.kirupa.com/u/aesthetics7)\
**Post date:** [September 1, 2009, 4:29am UTC](https://forum.kirupa.com/t/add-child-and-remove-child-on-same-button/295545/1 "2009-09-01T04:29:48Z")

</div>

Okay, so I have a movieclip on the stage(lets call that selection movieclip) that once a button is clicked is going to open another movieclip(call this slideshow) I am trying to remove the selection movieclip when you launch the slideshow movieclip.

```auto

citithmb_mc.addEventListener(MouseEvent.CLICK, clickHandler3);
function clickHandler3 (event:Event){
var workss_mc = new mc_workss();
var work_mc = new mc_work();
addChild(workss_mc);
removeChild(work_mc);
}

```
