Pages

Friday, January 8, 2010

removing a child

To make a child remove itself in a class file:
1. Use "removeChild();" on itself.
e.g. this.parent.removeChild(this);

2. Remove the freaking event listener which controls the first function:
e.g. this.removeEventListener(Event.ENTER_FRAME, theFunctionsName);

Replace "theFunctionsName" with your function's name... sounds kinda weird :)


No comments: