moving between states I get an error in Flex.

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2010-03-24T16:06:25Z Indexed on 2010/03/24 16:13 UTC
Read the original article Hit count: 234

Filed under:
|
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

so i have a function that runs in state1 and has a

while(myCanvas.rawChildren.numChildren > 0){
 myCanvas.rawChildren.removeChildAt(0); 
}
//this code is definitely the problem....

I can move to state2, but when I move back to state1 i get the error.

why? the function that has the while loop only runs when something is searched in state1, so why is it running when coming back from state2?

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript-3