Try changing this code
rem **************PLAYER MOVEMENT****************
rem If no key is pressed, the player is static
if upkey()=downkey()=leftkey()=rightkey()=spacekey()=0
image=image+1
if image>4 then image=1
sprite 1,x,y,image
endif
to this
rem **************PLAYER MOVEMENT****************
rem If no key is pressed, the player is static
if upkey()=0 and downkey()=0 and leftkey()=0 and rightkey()=0 and spacekey()=0
image=image+1
if image>4 then image=1
sprite 1,x,y,image
endif
or this
rem **************PLAYER MOVEMENT****************
rem If no key is pressed, the player is static
if upkey()=0
if downkey()=0
if leftkey()=0
if rightkey()=0
if spacekey()=0
image=image+1
if image>4 then image=1
sprite 1,x,y,image
endif
endif
endif
endif
endif
This was resetting the frame. I think using an if var=var=var=var is illegal. At least it acts wierd in DBP.
[edit] The second yet longer code will take less scan time because it will start at the top and if any are false it will not check the others. The first version seems to check all conditions even if some are false.