messages to buttons when the mouse is already down

Ken Norris (dialup) pixelbird at interisland.net
Thu Jan 24 03:32:13 EST 2002


on 1/22/02 2:36 PM, Michael J. Lew at michaell at unimelb.edu.au wrote:

> Thanks for all of the helpful suggestions. It is a more interesting
> exercise than I expected in that the messages that one might expect
> to use are blocked when the mouse is down. Perhaps they shouldn't
> be...
----------
Michael,

You're welcome, I'm sure, even though most of it wouldn't work. It's really
difficult to interleave even a simulated mouseEnter with other mouse
messages simultaneously with the button hilite. It's asking more than you'd
think.

When the mouse is up, there's more idletime for the system to have for other
things in xCard environments, so the cursor position relative to an object
is much easier to retrieve. You really ought to consider whether or not you
have to have the mouse down. It isn't really the same as a 'drag' type
situation.

Another simple thing you might wish to consider for your game.

1) Tie a button to the mouseLoc or mouseMove. You can drag it anywhere, and
if its loc is within the rect of another button or field, well...you take it
from there. I have a boundary handler somewhere, too, if you want it.

Best regards,
Ken N.

   




More information about the use-livecode mailing list