Found this great wee piece of code that’ll let you return all the items in a movieclip.
var target_mc:MovieClip = this; for (var i:uint = 0; i < target_mc.numChildren; i++){ trace ('\t|\t ' +i+'.\t name:' + target_mc.getChildAt(i).name + '\t type:' + typeof (target_mc.getChildAt(i))+ '\t' + target_mc.getChildAt(i)); }
Source: http://www.matthijskamstra.nl/blog/index.php/2008/04/30/as2-to-as3-get-all-objects-in-a-movieclip/
Tech Reference: AS3
Leave a Reply