ok first make all the animation in one row
then this code
[u]FOR i = 0 TO 5
rem the 5 is the amount of frams you have(how many images in your row)
GET IMAGE i+1, X1+(45*i), X2, Y1+(45*i),Y2
NEXT i
PlayerAnimationFrame = 1
PlayerANimationFrameOffset = 0
DO
IF RightKey() = 1
ZeroDirection = 1
PlayerX = PlayerX +5
PlayerAnimationFrame = 1 + PlayerAnimationframeOffset
INC PlayerAnimationFrameOffset
IF PlayerAnimationFrame > 5 THEN PlayerAnimationFrameOffset = 0
ENDIF
SYNC
LOOP
this means when you press rightkey the animation will start
make sure all images are same width apart
this code works so if you have any other questions feel free to ask
hope that helped