S
stef
Hello:
I would like a process to continue as long as the mouse is held down on
a button and to stop as soon as it is released. Something ideally like
this:
"while (ButtonIsDown) {i+ = 1}"
I tried the following in the button tag:
onMouseDown = "isDown = true; while(isDown) {i+=1}"
onMouseUp = "isDown = false"
but the mouseup event does not interrupt the onMouseDown process, so the
loop will continue endlessly.
The same kind of thing happens in the <body> events; one will not
interrupt the other.
I would appreciate any suggestions.
(e-mail address removed)
I would like a process to continue as long as the mouse is held down on
a button and to stop as soon as it is released. Something ideally like
this:
"while (ButtonIsDown) {i+ = 1}"
I tried the following in the button tag:
onMouseDown = "isDown = true; while(isDown) {i+=1}"
onMouseUp = "isDown = false"
but the mouseup event does not interrupt the onMouseDown process, so the
loop will continue endlessly.
The same kind of thing happens in the <body> events; one will not
interrupt the other.
I would appreciate any suggestions.
(e-mail address removed)