# Moving an Object (X, Y) with a button

**URL:** <https://forum.kirupa.com/t/moving-an-object-x-y-with-a-button/125238>\
**Category:** Uncategorized\
**Created:** [October 11, 2004, 9:52pm UTC](https://forum.kirupa.com/t/moving-an-object-x-y-with-a-button/125238 "2004-10-11T21:52:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmannix](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jmannix](https://forum.kirupa.com/u/jmannix)\
**Post date:** [October 11, 2004, 9:52pm UTC](https://forum.kirupa.com/t/moving-an-object-x-y-with-a-button/125238/1 "2004-10-11T21:52:07Z")

</div>

There’s a number of tutorials that talk about moving an object (x,y) with keyPress, but none get into moving an object with a button.

[http://www.kirupa.com/developer/actionscript/xymove.htm](http://www.kirupa.com/developer/actionscript/xymove.htm)

I have a map that I’d like to move left to right with arrow buttons. Can the same approach be taken with the above tutorial, but add a variable to the map, and call it on each button
