if you are using as2 you want to set a variable for running and walking and attach it to different keys same idea with as3 too