At 6/14/07 04:17 PM, LCurtis wrote:
Can someone tell me how the fuck you removeMovieClips that were created using a class?
Easy peasy, once you know (it took me a loooong time to figure this out). Ok, this is what I've got:
function coinoef (evnt:Event){
if(evnt.target.scaleX > 2.3){ //dont worry bout this
evnt.target.removeEventListener(Event.ENTER_F RAME, coinoef)
evnt.target.parent.removeChild(DisplayObject(
evnt.target))
}
}
The main reason why you need so much more, is that you have to refer to the targets parent, then call the removeChild thing; and you need to show that its a displayObject.
That code also gets rid of the object's event listener.
I think I'll write a tutorial on this...