CLEAR ALL
BITMAP 1 LOAD "Floyd3.bmp"
SPRITE 1 BIND BITMAP 1
SPRITE 1 SHOW
SPRITE 1 TINT RGB(255,255,255)
SPRITE 1 CIRCLE ,RGB(255,255,0)
SPRITE 2 BIND BITMAP 1
SPRITE 2 SHOW
SPRITE 2 TINT RGB(255,255,255,128)
SPRITE 2 CIRCLE 105,RGB(255,255,0)
x=640:y=400
DO
    SPRITE 2 MOVE x,y
    IF SPRITE.CLICKED(2) THEN
        x=MOUSE.X
        y=MOUSE.Y
    END IF
    LOCATE 1,1
    h=SPRITE.HIT(2,1)
    PRINT "Inside    : ";BIT.GET(h,3);"    "
    PRINT "Intersect : ";BIT.GET(h,2);"    "
    PRINT "Touch     : ";BIT.GET(h,1);"    "
    PRINT
    PRINT "Click on the sprite to drag it."
    PAUSE
LOOP WHILE INKEY$=""
