Return to Snippet

Revision: 7846
at August 17, 2008 15:06 by benwasilewski


Initial Code
for (var i:uint = 0; i < YOUR_OBJECT.numChildren; i++)
{
     trace ('\t|\t ' +i+'.\t name:' + YOUR_OBJECT.getChildAt(i).name + '\t type:' + typeof (YOUR_OBJECT.getChildAt(i))+ '\t' + YOUR_OBJECT.getChildAt(i));

}

Initial URL


Initial Description
This takes whatever object you want (called YOUR_OBJECT in the source) and traces out each child of that object. Pretty useful for debugging an add/removeChild issue.

Initial Title
AS3: Get all children of specified object

Initial Tags
list, actionscript, debug, 3

Initial Language
ActionScript 3