The last time I had a problem like that I had an optical touch pad. When I would turn down the the lights in my computer room to work on something the cursor would come to life and do what ever it felt like moving all over on its own. I found that the optical touch pad only worked correctly in low to no shadow situations.
The first time I had the problem, I was using a cordless mouse and the batteries were getting low and the cursor did the same thing.
Now I find that I have another cursor problem in PhotoShop, when working within certian colors and shades the cursor disapears altogether blending into the photo or image that I'm working on.
Is there away to change the color or contrast of the cursor?