AS3:获取指定对象的所有子对象
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AS3:获取指定对象的所有子对象相关的知识,希望对你有一定的参考价值。
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.
for (var i:uint = 0; i < YOUR_OBJECT.numChildren; i++) { trace (' | ' +i+'. name:' + YOUR_OBJECT.getChildAt(i).name + ' type:' + typeof (YOUR_OBJECT.getChildAt(i))+ ' ' + YOUR_OBJECT.getChildAt(i)); }
以上是关于AS3:获取指定对象的所有子对象的主要内容,如果未能解决你的问题,请参考以下文章
如何从 AS3 NetStream 对象获取 HTTP 状态码?