# Add more of removed children of same namewithout displaying previously removed

**URL:** <https://forum.kirupa.com/t/add-more-of-removed-children-of-same-namewithout-displaying-previously-removed/321014>\
**Category:** Uncategorized\
**Created:** [April 7, 2011, 10:36pm UTC](https://forum.kirupa.com/t/add-more-of-removed-children-of-same-namewithout-displaying-previously-removed/321014 "2011-04-07T22:36:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xandat](https://avatars.discourse-cdn.com/v4/letter/x/9de0a6/32.png) [@Xandat](https://forum.kirupa.com/u/Xandat)\
**Post date:** [April 7, 2011, 10:36pm UTC](https://forum.kirupa.com/t/add-more-of-removed-children-of-same-namewithout-displaying-previously-removed/321014/1 "2011-04-07T22:36:12Z")

</div>

I want to remove all children of the name (mc1) but be able to add new one when I call the add function again  
Heres what I have

// Draws the squares

```auto
function drawIt(e:Event=null):void{
            mc1.graphics.lineStyle(1);
            mc1.graphics.beginFill(ITsColor);
            mc1.graphics.drawRect(w,h,10, 10);
            this.addEventListener("enterFrame",enterFrame_handler);
            this.addChild(mc1);mc1.graphics.endFill();
            //superMovieclip.mask = mc1;
            superMovieclip.visible=true
}

```

//removes squares

```auto
function killIt(e:Event):void{
            removeChild(mc1);
            this.removeEventListener("enterFrame",enterFrame_handler);
}

```

//eventFrame\_handler just calls drawIt(); and adds to the position int.

Removing all the (mc1) movieclips works fine, but when i click on the butotn to call drawIt again, all previous mc1’s are displayed again with the new ones
