hmmm it's probaly a loose connection seeing as a mouse moves alot.....
Maybe the outlet(?) you connected to isn't functioning too well, maybe connecting it to another would fix it.
Or if you are using Windows XP go to control panel, then "Printers and Other Hardware" and then mouse.
Then you click on hardware and proprieties then go to advanced settings and uncheck fast initialization if it`s checked. That helped me.