Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mouse not moving

Status
Not open for further replies.

duponty

Instructor
Oct 25, 2000
101
CA
Hi,

how can I detect that the mouse is not moving? I know it refers to a temp variable and substract temp-_xmouse but I cannot do it...

thanks
 
You can achieve this with a pair of clip events, one is triggered on mouse moves, the other checks every frame to see if the first clip is triggered.

onClipEvent(mouseMove){
_root.moved=true;
}

onClipEvent(enterFrame){
if (!_root.moved){
trace("Mouse is not moving");
} else {
trace("Mouse just moved");
_root.moved=false;
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top