/ Published in: ActionScript 3

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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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)); }
Comments
