# Flash as2 Moving Character With Arror Keys

**URL:** https://forum.kirupa.com/t/flash-as2-moving-character-with-arror-keys/331337
**Category:** flash
**Created:** [July 9, 2013, 1:40pm UTC](https://forum.kirupa.com/t/flash-as2-moving-character-with-arror-keys/331337 "2013-07-09T13:40:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Jason\_Scholz](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@Jason\_Scholz](https://forum.kirupa.com/u/Jason_Scholz)
#### Post date: [July 9, 2013, 1:40pm UTC](https://forum.kirupa.com/t/flash-as2-moving-character-with-arror-keys/331337/1 "2013-07-09T13:40:04Z")

</div>

The code I use for moving my character with the arror keys is this:  
if (Key.isDown(Key.RIGHT)) {  
var speed = 2;  
char\_mc.\_x += speed;  
}

What I don’t like, is when you hold down the key, the character keeps moving. I want to disable this. I don’t want the character to move and keep moving when your holding the key down.

I want a simple movement each time the key is pressed. So you have to physically keep tapping the key to move the character “x” amount to the right.
