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.