1 Reply Latest reply on Sep 7, 2007 11:28 AM by hanchan07

    removeChild problem

    hanchan07 Level 1
      Im making a class that has some moving text in it, and I want the text to be removed when it goes off the screen, but when I call the removeChild on the object I get this error:
      ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
      at flash.display::DisplayObjectContainer/removeChild()
      at Velocity/::onEnterFrameRight2()

      And there is one for onEnterFrameLeft2() as well. Here is my code, all I want to do is successfully remove the object and delete it as well. I coundnt get the delete() funciton to work on the object as well so i left it out and tired to get the removeChild to work.

      Here is my code: