You can detect whether a sprite is under the pointer and whether the pointer is being pressed. Also you can detect where the pointer is on the screen. Using this information is not a big step after that:
if getPointerPressed()=1
hit = getSpriteHitTest(spr, getPointerX(), getPointerY())
if hit>0
rem sprite picked up
picked = spr
pX = getPointerX()
pY = getPointerY()
endif
else
if picked>0
if getPointerState()>0
rem Sprite being dragged
cX = getPointerX()
cY = getPointerY()
setSpritePosition(picked,getSpriteX()+cX-pX,getSpriteY()+cY-pY)
pX = cX
pY = cY
else
rem Sprite Dropped
picked=0
endif
endif
endif
Of course if you want to check whether the drop off point is valid that's extra code!