First problem I noticed is you are going through all of your frames in each loop. It probebly won't be a problem right now since animating your sprite is the only thing your program is doing right now. But it will definitly be a problem when you add other elements to your game. Here's what I would do.
take out the FOR ... NEXT in your loop. and do the following.
sync on
ink rgb(244,214,210),1
load image "run1.bmp",1
load image "run2.bmp",2
load image "run3.bmp",3
load image "run4.bmp",4
load image "run5.bmp",5
load image "run6.bmp",6
runtimer = timer()
d = 120
i = 1
sprite 1,d,126,1
do
cls
if rightkey()=1
d = d + 20
if timer() - runtimer > 100
if i > 6 then i = 1
inc i, 1
runtimer = timer()
endif
endif
sprite 1,d,340,i
sync
loop
I slowed the framerate by using a timer. I'm not sure if this is the most efficient, but it works well for me. You can adjust the spead of the animation by chaning the following line.
if timer() - runtimer > 100
I hope that helps you out.