# Change xy position of an object using buttons

**URL:** <https://forum.kirupa.com/t/change-xy-position-of-an-object-using-buttons/288046>\
**Category:** flash\
**Created:** [May 10, 2009, 1:49am UTC](https://forum.kirupa.com/t/change-xy-position-of-an-object-using-buttons/288046 "2009-05-10T01:49:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MK74](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@MK74](https://forum.kirupa.com/u/MK74)\
**Post date:** [May 10, 2009, 1:49am UTC](https://forum.kirupa.com/t/change-xy-position-of-an-object-using-buttons/288046/1 "2009-05-10T01:49:23Z")

</div>

Hello all! I started using Flash again after a “brief” hiatus (the last time I used it, Flash was on it’s MX version :puzzle:)  
See, I am trying to create an animation in which I can move across the stage a simple object (a circle, a square or a star, for example) using buttons (left, right, up and down)  
This was fairly simple using AS 1, even when I was no expert. The thing is that those simple ways are no longer working with AS 3.  
I spent a few hours doing some research until I found this nice tutorial on this same site:

```auto
http://www.kirupa.com/developer/actionscript/xymove.htm

```

I followed the tutorial, and all was working nicely, but when I attempted to do the animation _from scratch,_ it simply didn’t work ;(  
I even used the same names for all the objects and instances, but still nothiing. I know that this tutorial uses AS 1, I’d just like to find a way to do it in AS 3 (or maybe AS 2)  
I’m open to sugestions 😛

Thank you all in advance.

Cheers!  
MK74
