Messages problem
Jim Hurley
jhurley at infostations.com
Sat Jul 24 11:06:48 EDT 2004
I need help with flushing messages, at least I think it is a messages problem.
In the handler below "checkMouse" repeatedly does "some stuff", and,
if the mouse was clicked ("if the mouse is down"), it does "something
else as well".
The problem is that the something else often happens more than once,
I assume because there is a "checkMouse" message hanging around.
Is there a better way to prevent the repetition of the "something
else" than waiting 5 ticks?
on checkMouse
(do some stuff) --Puts the mouseLoc into a field.
if the mouse is down then
(do something else as well) -- Places a marker at the mouseLoc.
wait 5 ticks --I am using this line to keep ""something else"
from happening more than once.
end if
send "checkMouse" to me in 10 millisec
--This loop is halted with a "mouseDoubleDown" in the card script.
end checkMouse
Jim
More information about the use-livecode
mailing list