Well i have got the space craft on top of the stars, trial and error (but looking good). I have found that the sync and sync rate has took away my animation. can anyone tell me why?
REM /////////////////////////////////////////////////////////////
REM ///////////////////// Load SCROLLING STARS //////////////////
REM /////////////////////////////////////////////////////////////
sync
sync on
n=500
dim x(n,3)
for i=1 to n
x(i,1)=rnd(639)+1
x(i,2)=rnd(479)+ 1
x(i,3)=rnd(9)+1
next i
DO
cls 0
for i=1 to n
x(i,1)=x(i,1)-x(i,3)
if x(i,1)<=1
x(i,1)=640
x(i,2)=rnd(479)+1
endif
col=x(i,3)*30
ink rgb(col,col,col),1
dot x(i,1),x(i,2)
next i
LOAD BITMAP "craft.bmp",1
FOR y=0 TO 1
FOR x=0 TO 2
REM Grab images for spaceship animation
GET IMAGE 1+x+(y*3),(x*50),(y*54),(x*50)+50,(y*54)+54
NEXT x
NEXT y
REM Delete spaceship bitmap
DELETE BITMAP 1
REM Set spaceship variables
xpos=0:ypos=300
image=1
REM Activate manual syncronization
FOR y=0 TO 1
FOR x=0 TO 2
REM Grab images for spaceship animation
GET IMAGE 1+x+(y*3),(x*50),(y*54),(x*50)+50,(y*54)+54
NEXT x
NEXT y
REM Delete spaceship bitmap
DELETE BITMAP 1
REM Set spaceship variables
xpos=0:ypos=300
image=1
REM Activate manual syncronization
sync on
REM Begin loop
SPRITE 1,posx,posy,image
DO
REM Declare Key Movement Functions for craft
if rightkey() = 1 then inc xpos
if leftkey() = 1 then dec xpos
if upkey() = 1 then dec ypos
if downkey() = 1 then inc ypos
rem Spaceship constraints to stay onscreen
rem RIGHT
if xpos>400-sprite width(1) then xpos=600-sprite width(1)
rem LEFT
if xpos<10 then xpos=10
rem TOP
if ypos<10 then ypos=10
Rem Animate craft and wrap
image=image+1 : IF image>3 THEN image=1
REM Update sprite
sprite 1,xpos,ypos,image
REM Begin loop
SPRITE 1,posx,posy,image
REM Declare Key Movement Functions for craft
if rightkey() = 1 then inc xpos
if leftkey() = 1 then dec xpos
if upkey() = 1 then dec ypos
if downkey() = 1 then inc ypos
rem Spaceship constraints to stay onscreen
rem RIGHT
if xpos>400-sprite width(1) then xpos=600-sprite width(1)
rem LEFT
if xpos<10 then xpos=10
rem TOP
if ypos<10 then ypos=10
Rem Animate craft and wrap
image=image+1 : IF image>3 THEN image=1
REM Update sprite
sprite 1,xpos,ypos,image
REM End Loop
loop
sync
CLS