I would think you could do a mousedown event handler linked to a setInterval timer that is caneled by a mouseup event handler if it takes place prior to the end a second.
 
var timerID = null;  // in body main to initialize.
 
var timeID = setInterval('mymousedownevent();',1000);        //call this within eventlistener
 
if (booleanFlag > myTimelimit) {        // wrap this in mouseup eventlistener.
  clearInterval(loaderID);
  }
 
// the mousedown could change a flag from false to true on the setInterval().  A mouseup would either 1) clear the timer if prior to 1000ms, or 2) reset the boolean flag to false if after 1000ms.
 
Something like that, sure I missed some minor detail
 
Cheers,
 
Ray
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Matthew Shirey
Sent: Tuesday, May 15, 2001 12:20 PM
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] Holding Mouse Down

Hey all, I think I have an easy question.  Sure do hope so.  How can I make something continuously happen while the mouse button is being held down on a given layer (button)?  I am making my own version of a scroll pane and I need it to continue to scroll while the mouse button is held down.  Also is there a way to make it so this repetitive action does not happen until the mouse button has been help down for at least 1 second?

 

Thanks in advance,

 

M.

Reply via email to