You can make a very small sprite at position it at the mouse pointer and check for colision between the mouse sprite and other sprites.
create bitmap 1,50,50
box 0,0,50,50
`get box image
get image 1,0,0,50,50,1
delete bitmap 1
cls
`get mouse cursor image
get image 10,0,0,1,1,1
randomize timer()
score as integer
do
cls
if sprite exist(1)
if sprite collision(10,1) and mouseclick() = 1
delete sprite 1
inc score
endif
else
sprite 1,rnd(640),rnd(480),1
endif
sprite 10,mousex(),mousey(),10
text 0,0,"Score :"+str$(score)
loop
Or because you can get the positions of the sprite, SPRITE X(), SPRITE Y(), SPRITE WIDTH() and SPRITE HEIGHT(). And you can get the postion and state of the mouse MOUSEX(), MOUSEY() and MOUSECLICK() you just need a bit of maths to work out if the mouse pointer is over the sprite.
dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard