Is it possible to identify when the cursor is within a group?
Howard Bornstein
bornstein at designeq.com
Thu Jul 15 19:14:11 EDT 2004
On Jul 15, 2004, at 5:38 PM, Devin Asay wrote:
> How about this, off the top of my head, not tested:
>
> on mouseEnter -- in the card script
> get the name of target
> if it contains "group" and the number of target = number of groups
> then
> -- do stuff here
> end if
> end mouseEnter
Thanks, Devin.
I've tried all kinds of variations of this, particularly with the
powerful "on mousemove". The problem is that the engine apparently
won't respond with any message (mouseEnter, MouseWithin, MouseMove)
unless the mouse is over an *object* within the group. If it's just
within the group's rectangle, but not over an object, no message gets
sent.
I can use the test <if the mouseloc is within the rect of group
"whatever"> and get the correct response, but I have to already know
that the group is called "whatever".
Since I'm creating and destroying a variety of groups randomly, I need
to know which group the mouse is over via some kind of test (the very
thing I'm stumped on). Unfortunately, I can't seem to find a way to do
this if the mouse is simply within the group rect but not over an
object. There are some fairly extreme approaches to solving this
problem, but I'm hoping for a simple solution.
Regards,
Howard Bornstein
-----------------------
D E S I G N E Q
www.designeq.com
More information about the use-livecode
mailing list