3 Replies Latest reply on Jul 10, 2007 9:03 PM by kglad

    removing an instance from within it's class

    tag_digital Level 1
      I have a class that represents a symbol in the library. Inside the class I set a timer to create a fade effect. I create the instance from main and add it to a layer, like this. fadeLayer.addChild(fadeSymbol);
      Everything works fine. What I want to do is have the symbol remove itself after it is finished fading. My problem is I can't figure out how to remove it from inside the class. something like this....?? this.parent.removeChild(this). I know that's a mess but it shows what I want to do. Also I want to delete it so there are not multiple invisible instances of this object around. So after I remove it from its parent I want to delete it.