Colonel_Klink is right. You have to redraw the tile map every time you use a sprite. Sprites are treated like 3D plains so the blue screen will always be seen if you don't update the background too.
Here's an example:
set display mode 800,600,32
sync rate 0
sync on
hide mouse
randomize timer()
` Dimensionalize a map array
dim Map(100,100)
` Create 20 tile sprites
for t=1 to 20
ink rgb(rnd(255),rnd(255),rnd(255)),0
box 0,0,25,25
get image t,0,0,25,25,1
next t
` Create the mouse image
cls
ink rgb(255,255,255),0
box 25,0,50,25
center text 37,30,"Sprite"
get image 500,0,0,60,60,1
` Randomly pick tiles for the map
for y=0 to 100
for x=0 to 100
Map(x,y)=rnd(19)+1
next x
next y
` Set the starting map coordinates
MapX=0:MapY=0
do
` Show the mouse sprite
sprite 1,mousex(),mousey(),500
` Show the map
ShowMap(MapX,MapY)
sync
loop
end
function ShowMap(StartX,StartY)
` Set a reset variable
ResetX=StartX
` Go through each tile on the map
for y=0 to 600 step 25
` Reset StartX to initial map position
StartX=ResetX
for x=0 to 800 step 25
` Show the map tile
paste image Map(StartX,StartY),x,y,1
inc StartX
next x
inc StartY
next y
endfunction