Please have a look a the Code:
I gave each sprite a category and then Tried to get the sprite number of certain category (in this case first sprite). but when the mouse rollover,
it seems that am getting the all sprite numbers as the command is not using the mask.
EDIT:
Problem solved. (sorry for throwing the post)
SetWindowTitle( "sprites" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetClearColor(75,0,0)
#constant Circle 1
LoadImage(Circle, "cir.png")
_Sprite(2, Circle, 150,GetDeviceHeight()/2.0,100, 200,0,0,255) : SetSpriteCategoryBit(2, %0000000000000001, 1)
_Sprite(3, Circle, 300,GetDeviceHeight()/2.0,100,0,200,0,255) : SetSpriteCategoryBit(3, %0000000010000000, 1)
_Sprite(4, Circle, 450,GetDeviceHeight()/2.0,100,0,0,200,255) : SetSpriteCategoryBit(4, %0001000000000000, 1)
do
print(GetSpriteHitCategory(%0000000000000001, GetPointerX(), GetPointery()))
Sync()
loop
function _Sprite(num, img, x#, y#, size#, Cr, Cg, Cb, Ca)
CreateSprite(num, img)
SetSpritePositionByOffset(num, x#, y#)
SetSpriteColor(num, Cr, Cg, Cb, Ca)
setSpriteSize(num, size#, size#)
Endfunction