im getting the following error
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild()
at guide_fla::memb2_13/frame1()
at flash.display::MovieClip/gotoAndStop()
at guide_fla::memb3_14/active()
from this section of code
var mem2:m2 = new m2();
stop();
if(MovieClip(root).c>0){
this.parent.removeChild(mem2);
}
this.addEventListener(MouseEvent.MOUSE_DOWN, active);
function active (e:MouseEvent):void {
this.gotoAndStop(2);
MovieClip(parent).memb1.gotoAndStop(1);
MovieClip(parent).memb3.gotoAndStop(1);
MovieClip(parent).memb4.gotoAndStop(1);
MovieClip(parent).addChild(mem2);
mem2.x = 280;
mem2.y = 140;
var c:int = 0;
MovieClip(root).c = 1;
}
there is also a variable c on the root timeline.
can anyone tell me why im getting this error?