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
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
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