Mouse polling answers for Scott

Ken Norris (dialup) pixelbird at interisland.net
Fri Mar 1 02:13:01 EST 2002


on 2/28/02 6:32 PM, Geoff Canyon at gcanyon at inspiredlogic.com wrote:

> repeat while the mouse is down
> --do something
> end repeat
> 
> repeat
> if the mouse is down then exit repeat
> --do something
> end repeat
> 
> The second simply makes it clearer what is happening.If the loop takes a while
> to execute, for example:
> 
> repeat while the mouse is down
> repeat with i = 5000 down to 1
> put i
> end repeat
> end repeat
----------
I won't have time to play with it until Monday or Tuesday, but how about:

on mouseDown
  repeat until the mouse is up -- instead of 'while the mouse is down'
    keepStuffInAHoldingPattern
  end repeat
  doOtherStuffLikeAMouseUpDoes
end mouseDown

...?

Best regards,
Ken N.
  




More information about the use-livecode mailing list