Repeats and mouse events

Philip Usher usher at iqcisp.com
Tue Feb 12 14:29:01 EST 2002


Charles,
   I think the problem in your script is the "wait until the mouse is up"
command inside the mouseUp handler.  Not sure if this is exactly what you
wanted or not but this soultion requires handlers in both the card and the
button:

--card script:
global gWait
on mouseUp
  if gWait is true then
    put "" into fld 1
    put false into gWait
  end if
end mouseUp

--button script:
global gWait
on mouseUp
  if gWait is true then pass mouseUp
  Put the seconds into tStartHere
  repeat
    if (the seconds - tStartHere) > 15 then exit repeat
    if the mouse is down then
      put "You got It" into fld 1
      put true into gWait
      exit mouseUp
    end if
  end repeat
End mouseUp





More information about the use-livecode mailing list