1 Reply Latest reply on Mar 25, 2010 8:30 AM by adamgeework

    switching states issue


      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?