Created
April 30, 2012 08:54
-
-
Save mandarinx/2556690 to your computer and use it in GitHub Desktop.
Remove all children (AS3)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (this.numChildren > 0) | |
{ | |
removeChild(this.getChildAt(0)); | |
} | |
// Remove children as part of an event handler | |
private function eventHandler(e:Event):void | |
{ | |
e.target.parent.removeChild(e.target); | |
} | |
// When using Flex | |
someObject.removeAllChildren(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment