ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller error - AS

Posted by Dimitree on Stack Overflow See other posts from Stack Overflow or by Dimitree
Published on 2010-03-22T12:09:01Z Indexed on 2010/03/22 12:11 UTC
Read the original article Hit count: 297

Filed under:
|
|

I have this code snippet inside a function that checks if an object exists on stage and removes it:

public function closeContent(e:MouseEvent):void{ removeChild(txt); removeChild(ldr.content); removeChild(_closeButton); container_mc.visible = false; statusText.text=""; if (contains(submitButton)) { removeChild(submitButton); } if(contains(saveinfoButton)) { removeChild(saveinfoButton);}

I tried to change stage with this and root but alawys get this error ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller

© Stack Overflow or respective owner

Related posts about removechild

Related posts about as3