I'm trying to make a panning function for an image viewer, and currently a user has to click a button multiple times to pan the image. Is there some way I can make this fire repetivily if the user holds their mouse down over the button?
you could seperate the event in to the two smaller events: onmousedown and onmouseup. then just have a repeating function (with setTimeout or setInterval) triggered onmousedown and clear the timeout or interval onmouseup. Robert Carpenter
questions? comments? thanks? email me!
eclipse_web@hotmail.com
Icq: 124408594
also, you probably should set the onmouseout handler to clear the timeout, so that if the user drags off the button it also clears. Robert Carpenter
questions? comments? thanks? email me!
eclipse_web@hotmail.com
Icq: 124408594
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.