0
您好我想要統計並獲取舞臺中同一類型實例的位置。 我曾嘗試:獲取舞臺中同一類型實例的位置
var target;
for(var item in _root){
if(_root[item] instanceof MovieClip || _root[item] instanceof TextField){
target = _root[item];
trace("ITEM: "+target);
trace("X: "+target._x);
trace("Y: "+target._y);
trace("----------------"); } }
,但它說,獲得財產_root不確定和不推薦使用的instanceof我 怎麼能做到嗎? 感謝
使用`stage`,而不是`_root`。 – 2011-02-03 17:13:20