# \_x and \_y coordinates help

**URL:** <https://forum.kirupa.com/t/-x-and--y-coordinates-help/201633>\
**Category:** programming\
**Created:** [September 23, 2006, 11:39am UTC](https://forum.kirupa.com/t/-x-and--y-coordinates-help/201633 "2006-09-23T11:39:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stilianos](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@Stilianos](https://forum.kirupa.com/u/Stilianos)\
**Post date:** [September 23, 2006, 11:39am UTC](https://forum.kirupa.com/t/-x-and--y-coordinates-help/201633/1 "2006-09-23T11:39:54Z")

</div>

I am trying to get (this) to equal the \_x and \_y coordinates of P1

onClipEvent(enterFrame){  
if(this.hitTest(\_root.P1)){  
this.\_x = \_root.P1.\_x  
this.\_y = \_root.P1.\_y  
}  
}

i used to know how to do it but i forgot.

Anyone w/a solution please post it.

Thanx in advance
