I think you'll have to use an interval, but you don't have to constantly check the mouse. Pseudo-code below:
this.onMouseMove = function(){ // When the mouse is moved, clear any pending "not moved" timeout // interval so the callback *isn't* called (Note // "clearMouseNotMoveTimeout isn't a real API function)... clearMouseNotMoveTimeout(); // Do processing for mouse movement... moving=true; // Reset the "not moved" timeout interval callback (note this would be // a call to something like setInterval(); "setMouseNotMoveTimeout" // isn't a real API function)... setMouseNotMoveTimeout(notMoveTimeoutCallback); } function notMoveTimeoutCallback(){ // Handle code for mouse not moving in specified timeframe... } Hope this helps... -Chris -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mick Gow Sent: Thursday, November 10, 2005 11:05 PM To: Flashcoders mailing list Subject: [Flashcoders] onMouseMove false Is there an efficient way to trigger an onMouseNOTMove without having to run an interval or do an onEnterFrame to constantly check the mouse? I want to set a varialble when mouse is moving and reset it when mouse is still. ie. something like if it were possible: this.onMouseMove = function(){ moving=true; } this.onMouseStop = function(){ moving=false; } _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders