check it's coordinates and reposition it if it moves too far (need to start at least 2x as big as the screen on any axis it is moving (for a complete movement - smaller if not going all the way of course)
i.e.
do
if getspritex(backround) <= -getvirtualscreenwidth()
setspriteposition(background,getvirtualscreenwidth(),0)
endif
sync()
loop
would move the sprite defined as 'background' from right to left until it reaches the edge of the screen and then go back to it's original point (in my case 0,0)
life's one big game
spec= 2.6ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
