; dxFreeImage command ; Global, as always, for graphics Global gfxPlayer ; Enter graphics mode and start double buffering Graphics 640,480,16 dxSetBuffer dxBackBuffer() ; Load the image-assign the handle to gfxPlayer gfxPlayer=LoadImage("player.bmp") ; draw the image at random until ESC pressed While Not dxKeyHit(1) dxCls DrawImage gfxPlayer,dxRnd(640),dxRnd(480) dxFlip Wend ; Erase the image from memory! dxFreeImage gfxPlayer