messages to buttons when the mouse is already down

Ken Norris (dialup) pixelbird at interisland.net
Tue Jan 22 04:22:15 EST 2002


on 1/21/02 9:48 PM, Ken Norris (dialup) at pixelbird at interisland.net wrote:

> on mouseEnter -- you can put the rest of this in an offscreen handler
> repeat until the mouseClick
> if the mouseLoc is within the rect of the target then
> set the hilite of the target to true
> else
> set the hilite of the target to false
> end if
> -- do your thing here when the mouse is released
> end mouseEnter
----------
OOPS! Not only did I forget 'end repeat', but I misread that the mouse is
already 'down'. SORREEE! Let me try again, please.

1) If your buttons are in a grid (or matrix as it's sometimes referred to),
and are all equal in size, I think I may be able to meld a couple handlers
written by Mark Schonewille and DunbarX from the HC list, using mouseMove.

2) If the above isn't so, you may have to use an idle handler as others have
suggested, unless you just have a few buttons




More information about the use-livecode mailing list