I want to create a character animation that the user controls. I want my user to be able to press a key and have the animation walking in the correct direction.

I know how to use as3 to move a direction when I press a key, however, the character just skids across the ground. Can someone point me in the right direction to get my characters legs to move as the key is pressed?