Detecting a "grabEnter"?
scott at tactilemedia.com
Thu Sep 4 13:58:47 CDT 2008
Recently, dfepstein at comcast.net wrote:
> My question about "grabEnter" has led to an interesting broader discussion of
> the relative merits of grab vs mouseMove..
> I would be happy to write a more complicated "mouseMove"-controlled script,
> but as far as I can tell that won't solve the problem I posed. If the user is
> dragging an object, whether using "grab" or by a script reacting to
> "mouseMove" events, no objects beneath that object receive a mouseEnter or
> mouseLeave message, because the mouse remains within the object being dragged.
In the drag_sample stack I've referenced in previous posts, a solution to
your problem can be provided by the mouseMove handler: it runs through a
list of objects to be tested using the intersect function. So it is
possible to check whether the dragged object is within an object on the card
and send messages to those objects as needed. Of course you can't send
mouse-related messages because, as you found, the mouse is occupied by the
dragged object. But given that the grab command effectively blocks any
messages, the mouseMove routine could be an option for you.
Tactile Media, Multimedia & Design
More information about the use-livecode