Skip to main content
Inspiring
July 10, 2009
Question

how can we detect mouse is not moving in a onMouseMove Listener

  • July 10, 2009
  • 1 reply
  • 596 views

Hi,

          how can we detect mouse is not moving in a onMouseMove Listener.

This topic has been closed for replies.

1 reply

SreelashAuthor
Inspiring
July 10, 2009

I willl discuss the application that i am trying to develop.Its an image rotator. Now onMouseMove listener, i am rotating the image clockwise or anticlockwise. What I want is that onMouseMove event, some times the mouse remains in the same position, that is mouse not moving. In such cases i want to  stop the rotation. Can anybody help me to do this. If anybody do not understand, please tell me, i ll explain more.

Inspiring
July 10, 2009

Like I said in your other post there is no way to detect if the mouse is not moving with and onMouseMove event.

But if the code in the onMouseMove is making the clip rotate it won't move when no onMouseMove events occur so that should take care of the problem.

If you want to do other things with the clip then generally you would use an onEnterFrame or a setInterval to check the mouse position, not an onMouseMove.