Wednesday, 27 October 2010

AS3 removeAllChildren() shortcut code

AS3 doesn't have a function removeAllChildren() like AS2, but I found a neat alternative:

while(movieClipInstanceName.numChildren)
{
movieClipInstanceName.removeChildAt(0);
}

No comments:

Post a Comment