A simplistic method. Checks if a button is down and 10 ticks have elapsed, if so changes to next animation frame (in this case that's just sprite 0 or 2) and moves sprite by 1 pixel: You could add more animation frames and change the value of 'f' being checked. Hope that's some use...
x=10
y=80
t=0 - ticks
f=0 -- animation frame
function TIC()
cls(7)
spr(f,x,y,1,1,0,0,2,3)
if btn(2)and t%10==0 then
f=f-2
x=x-1
if f==-2 then f=2 end -- wrap around
elseif btn(3) and t%10==0 then
f=f+2
x=x+1
if f==4 then f=0 end -- wrap
end
t=t+1
end