You need to use the command PLAY SPRITE in order to animate it. After an arrow key is pressed, tell it to play the sprite. Like this
REM Sync and create sprite, set sprite transparent
SYNC ON
CREATE ANIMATED SPRITE 1,"mario.bmp",3,1,1
SET SPRITE 1, 1, 1
REM Draw Sprite
xpos = 100
ypos = 200
SPRITE 1,xpos,ypos,1
DO
REM Control input
IF UPKEY() = 1 THEN ypos = ypos - 1 : play sprite 1,1,3,100
IF DOWNKEY() = 1 THEN ypos = ypos + 1 : play sprite 1,1,3,100
IF RIGHTKEY() = 1 THEN xpos = xpos + 1 : play sprite 1,1,3,100
IF LEFTKEY() = 1 THEN xpos = xpos - 1 : play sprite 1,1,3,100
REM Set Boundry
IF xpos > 600 THEN xpos = xpos - 1
IF xpos < 1 THEN xpos = xpos + 1
IF ypos > 400 THEN ypos = ypos - 1
IF ypos < 1 THEN ypos = ypos + 1
REM display sprite
sprite 1,xpos,ypos,1
REM Refresh screen
SYNC
LOOP
You should list a sync rate after the SYNC ON command. You'll notice that I slowed it down to 1 with each move instead of 5, because Mario simply flew across the screen so fast that you couldn't see any animation anyway (my computer is pretty fast).
I would suggest moving the sprite command to near the end of your main loop. That way, it gets drawn after all of the changes have been made to xpos and ypos.
LB