; LoadImage Example ; ----------------- Graphics 640,480,0,2 SetBuffer BackBuffer() ; LoadImage reads an image file and returns a handle for drawing player=LoadImage("media/player.bmp") ; A small star sprite for the backdrop star=LoadImage("media/star1.bmp") ; Scatter the stars at fixed random positions SeedRnd MilliSecs() Dim star_x(19) Dim star_y(19) For i=0 To 19 star_x(i)=Rand(0,639) star_y(i)=Rand(0,479) Next While Not KeyDown(1) Cls ; Draw the starfield backdrop For i=0 To 19 DrawImage star,star_x(i),star_y(i) Next ; Fly the loaded ship wherever the mouse points DrawImage player,MouseX(),MouseY() Text 0,0,"Move the mouse to fly the ship Esc: exit" Text 0,20,"LoadImage returned image handle "+player Flip Wend End