# Move to X and Y?

**URL:** <https://forum.kirupa.com/t/move-to-x-and-y/264309>\
**Category:** flash\
**Created:** [June 24, 2008, 9:17pm UTC](https://forum.kirupa.com/t/move-to-x-and-y/264309 "2008-06-24T21:17:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrmariner7484](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mrmariner7484](https://forum.kirupa.com/u/mrmariner7484)\
**Post date:** [June 24, 2008, 9:17pm UTC](https://forum.kirupa.com/t/move-to-x-and-y/264309/1 "2008-06-24T21:17:43Z")

</div>

Hi all,

I am wondering if there is a way to make the stage move to specific coordinates on the release of a button. Here is an example:

The stage is 400 x 400 with a graphic that overlays by 200 on each side (meaning the graphic is 600 x 600) - is there a way to have a button clicked, and then slide the graphic or stage to a point that was previously unseen?

It is like tweening the graphic so that it becomes visible, but with the application I am looking to build, tweening for every movement would be beyond tedious.

Any help?

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 24, 2008, 11:30pm UTC](https://forum.kirupa.com/t/move-to-x-and-y/264309/2 "2008-06-24T23:30:58Z")

</div>

Hmm…you cant move the stage. Why dont you just move your 600x600 graphic?

---

<div class="post-metadata">

**Author:** ![npgames](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/npgames/32/2914_2.png) [@npgames](https://forum.kirupa.com/u/npgames)\
**Post date:** [June 26, 2008, 5:40am UTC](https://forum.kirupa.com/t/move-to-x-and-y/264309/3 "2008-06-26T05:40:40Z")

</div>

on(release){  
\_root.\_x = ???  
\_root.\_y = ???  
}

---

<div class="post-metadata">

**Author:** ![npgames](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/npgames/32/2914_2.png) [@npgames](https://forum.kirupa.com/u/npgames)\
**Post date:** [June 26, 2008, 5:54pm UTC](https://forum.kirupa.com/t/move-to-x-and-y/264309/4 "2008-06-26T17:54:25Z")

</div>

[quote=bataglia;2349497]nick…with this action you cannot move the stage…in fact you can’t move the stage with any action you want, this is very clear. also you did not define what object will move these actions… a simple example is to move an object from the stage…

my\_btn.onPress = function() {  
my\_mc.\_x = 10;  
my\_mc.\_y = 10;  
}[/quote]

open an empty flash file, draw something on the stage, and copy this code

onMouseDown = function(){  
\_root.\_x += 10  
}

it move the stage

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 27, 2008, 1:04pm UTC](https://forum.kirupa.com/t/move-to-x-and-y/264309/5 "2008-06-27T13:04:48Z")

</div>

[quote=nick P;2349755]open an empty flash file, draw something on the stage, and copy this code

onMouseDown = function(){  
\_root.\_x += 10  
}

it move the stage[/quote]

it can’t be true… it is! :stare:

---

<div class="post-metadata">

**Author:** ![npgames](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/npgames/32/2914_2.png) [@npgames](https://forum.kirupa.com/u/npgames)\
**Post date:** [June 27, 2008, 10:22pm UTC](https://forum.kirupa.com/t/move-to-x-and-y/264309/6 "2008-06-27T22:22:30Z")

</div>

> [@bataglia;2350140](#):
>
> yes nick, my mistake. sorry, we still learn even when we think we know all 🙂

dont woory, this happens to me more than id like to admit

---

<div class="post-metadata">

**Author:** ![mrmariner7484](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mrmariner7484](https://forum.kirupa.com/u/mrmariner7484)\
**Post date:** [June 27, 2008, 11:44pm UTC](https://forum.kirupa.com/t/move-to-x-and-y/264309/7 "2008-06-27T23:44:08Z")

</div>

Thanks so much everyone! Great starting point for me. I appreciate the help.
