How do i create a button that shows the coordinates of all the objects on the screen

eg if i was to have 20 duplicates of the same object, how can i see their co-ordinates with the touch of one button instead of having to click on each one seperatly.

Hi,

Lets say you’ve named them “object0” …to…“object19”
[AS]
for(var i=0; i<20; i++){
TheObj = eval(“pathToObject.object”+i);
trace("TheObj : “+TheObj+” TheObjX: “+TheObj._x+” TheObjY: "+TheObj._y);
}

[/AS]

SHO