hi i’d like to count and get position of instance of the same type in the stage.
i have tried:
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("----------------"); } }
but it says access to property _root undefined, and instanceof deprecated
how can i make it?
thanks
in as3 you can loop through all children of your stage (or parent movieclip):