# Movement using \_x and \_y

**URL:** <https://forum.kirupa.com/t/movement-using--x-and--y/13738>\
**Category:** Uncategorized\
**Created:** [February 17, 2003, 4:48pm UTC](https://forum.kirupa.com/t/movement-using--x-and--y/13738 "2003-02-17T16:48:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gencoglu27](https://avatars.discourse-cdn.com/v4/letter/g/3e96dc/32.png) [@gencoglu27](https://forum.kirupa.com/u/gencoglu27)\
**Post date:** [February 17, 2003, 4:48pm UTC](https://forum.kirupa.com/t/movement-using--x-and--y/13738/1 "2003-02-17T16:48:34Z")

</div>

hi,  
following codes are for making a “circle” move along all four edgesof the screen…but some codes are missing…please add some more codes so that my circle(MC) finish its journey…1…go right…2 go down…3 go left and finally go up…to where it first started…  
thanks

onClipEvent (load) {  
this.\_x = 10;  
this.\_y = 10;  
}  
onClipEvent (enterFrame)  
{  
if (this.\_x\<400) {  
this.\_x += 10;  
} else {  
this.\_y += 10;  
}

---

<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:** [February 17, 2003, 5:03pm UTC](https://forum.kirupa.com/t/movement-using--x-and--y/13738/2 "2003-02-17T17:03:10Z")

</div>

[http://www.kirupaforum.com/showthread.php?s=&threadid=7457](http://www.kirupaforum.com/showthread.php?s=&threadid=7457)
