Issue in snapping object

Hi,

Please help to make snap object on the mouse movement.

As, I have made the code but getting issue on removing from snapping.

I have attached the file.

Thanks in advance…

you can look in the http://www.kirupa.com/forum/attachment.php?attachmentid=50182&d=1245863988