; HandleImage Example ; ------------------- Graphics 640,480,0,2 SetBuffer BackBuffer() player=LoadImage("media/player.bmp") ; a 32x36 ship sprite hx=0 hy=0 While Not KeyDown(1) Cls ; Arrow keys move the handle point around inside the image If KeyDown(203) And hx>0 Then hx=hx-1 If KeyDown(205) And hx<32 Then hx=hx+1 If KeyDown(200) And hy>0 Then hy=hy-1 If KeyDown(208) And hy<36 Then hy=hy+1 ; HandleImage sets the point the image is drawn from HandleImage player,hx,hy ; The ship is always drawn AT the crosshair - watch it shift DrawImage player,320,240 Color 255,255,0 Line 310,240,330,240 Line 320,230,320,250 Text 0,0,"Arrow keys: move the image handle Esc: exit" Text 0,20,"HandleImage player,"+hx+","+hy Flip Wend End