# Finding the x,y of an object on screen

**URL:** <https://forum.kirupa.com/t/finding-the-x-y-of-an-object-on-screen/224528>\
**Category:** flash\
**Created:** [May 3, 2007, 2:15am UTC](https://forum.kirupa.com/t/finding-the-x-y-of-an-object-on-screen/224528 "2007-05-03T02:15:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eudora](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@eudora](https://forum.kirupa.com/u/eudora)\
**Post date:** [May 3, 2007, 2:15am UTC](https://forum.kirupa.com/t/finding-the-x-y-of-an-object-on-screen/224528/1 "2007-05-03T02:15:31Z")

</div>

The current .x and .y is local to its parent, I tried to work my way back by adding this.parent.x to its this.x to find the global .x and .y

But this seems to be not working… anyone can help me a bit on this? I need the x,y coordinates on screen of the object…

AH… okie…

My mistake was I created a canvas by drawRect(pos\_x, pos\_y…)  
When I should have drawn with 0,0 and then manually set the .x and .y of that canvas… To me this is counter initiative… ☹
