Arrow Keys

Im making a game that involves moving the character with the arrow keys. I want to know the code to make him be able to move move at a set speed on the X and Y axis.

Thank you

Okay, I have another question.

How can I make walls, or blocks that the character cannot go past.


this.onEnterFrame = function(){
    if (Key.isDown(Key.LEFT)) {
            _x -= speed;
     }
    if (Key.isDown(Key.RIGHT)) {
            _x += speed;
    }
}

Check the tuts on kirupa.com first …
http://www.kirupa.com/developer/actionscript/rpgprogramming4.htm
http://www.kirupa.com/developer/mx2004/platform_game.htm

I guess reading the first tutorial would help you out just fine…