This snippet just deals with the changing of the animation, not with movement of the character, but I think it should help you.
`Variables to make to program more readable
swatModel=1: `Object number of the object you wish to animate
swatIdle=1: `First frame of idle animation
swatMove=26: `First frame of move animation
swatAttack=51: `First frame of attack animation
do
`If no button is pressed, play idle animation
if upkey()=0 and downkey()=0 then play object swatModel,swatIdle,swatIdle+25
`If the upkey only is pressed, play the move animation
if upkey()=1 and downkey()=0 then play object swatModel,swatMove,swatMove+25
`If the downkey is pressed, play the attack animation
if downkey()=1 then play object swatModel,swatAttack,swatAttack+25
loop
Cheers
Kentaree
Whatever I did I didn't do it!