this might shed some light on the subject for you.
alter to suit your needs.
`Initialize the program
SET DISPLAY MODE 640, 480, 16
HIDE MOUSE
`CLS
SYNC ON
`Load the source bitmap file
`LOAD BITMAP "F15.bmp", 1
rem make a temp image from inside DB
cls
ink rgb(255,255,0),1
box 0,0,256,256
get image 1,0,0,256,256,1
cls
`Draw the sprite
SPRITE 1,1,1,1
rem disable escapekey
disable escapekey
rem start a loop
while escapekey()=0
rem capture the mouse co ordinates to mx,my
mx = mousex()
my = mousey()
rem place the sprite
sprite 1,mx-128,my-128,1
rem sync the loop
sync
rem end the loop
endwhile
rem cleanup
delete image 1
delete sprite 1
end