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

**URL:** https://forum.kirupa.com/t/how-do-i-create-a-button-that-shows-the-coordinates-of-all-the-objects-on-the-screen/28383
**Category:** Uncategorized
**Created:** [August 13, 2003, 6:20am UTC](https://forum.kirupa.com/t/how-do-i-create-a-button-that-shows-the-coordinates-of-all-the-objects-on-the-screen/28383 "2003-08-13T06:20:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![smiddy](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@smiddy](https://forum.kirupa.com/u/smiddy)
#### Post date: [August 13, 2003, 6:20am UTC](https://forum.kirupa.com/t/how-do-i-create-a-button-that-shows-the-coordinates-of-all-the-objects-on-the-screen/28383/1 "2003-08-13T06:20:47Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2003, 10:03am UTC](https://forum.kirupa.com/t/how-do-i-create-a-button-that-shows-the-coordinates-of-all-the-objects-on-the-screen/28383/2 "2003-08-13T10:03:10Z")

</div>

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
