# Please help with x and y movement

**URL:** <https://forum.kirupa.com/t/please-help-with-x-and-y-movement/189112>\
**Category:** Uncategorized\
**Created:** [May 13, 2006, 10:23pm UTC](https://forum.kirupa.com/t/please-help-with-x-and-y-movement/189112 "2006-05-13T22:23:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![indiasfinest](https://avatars.discourse-cdn.com/v4/letter/i/5e9695/32.png) [@indiasfinest](https://forum.kirupa.com/u/indiasfinest)\
**Post date:** [May 13, 2006, 10:23pm UTC](https://forum.kirupa.com/t/please-help-with-x-and-y-movement/189112/1 "2006-05-13T22:23:29Z")

</div>

so i am making my first game, in other words, i am a noob. i want an enemy to come towards me. so to do this, i compare the x and y values.  
cir is one of my objects names. enemy is the others’.  
so on the enemies actions, what do i right,  
onClipEvent (enterFrame) {  
if (???\_x \> \_x) {  
\_x + 3  
}}  
how do i reference another objects x and y coordinates.
