# Rotation Question

**URL:** https://forum.kirupa.com/t/rotation-question/62485
**Category:** flash
**Created:** [August 28, 2004, 6:20am UTC](https://forum.kirupa.com/t/rotation-question/62485 "2004-08-28T06:20:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Darkslide632](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@Darkslide632](https://forum.kirupa.com/u/Darkslide632)
#### Post date: [August 28, 2004, 6:20am UTC](https://forum.kirupa.com/t/rotation-question/62485/1 "2004-08-28T06:20:02Z")

</div>

I’m messing around with a top down RPG, and I am trying to get my characters to rotate depending on what buttons are pushed etc as seen here:

```auto
onClipEvent (load){movespeed = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
play();
_rotation = 90;
_x+= movespeed;
}
if (Key.isDown(Key.LEFT)) {
play();
_rotation = 270;
_x-= movespeed;
}
if (Key.isDown(Key.UP)) {
play();
_rotation = 0;
_y-= movespeed;
}
if (Key.isDown(Key.DOWN)) {
play();
_rotation = 180;
_y+= movespeed;
}
}

```

When I push up, it’s fine. When I push anything else, it warps away. Any suggestions?

Thanks
