a little message path issue
Richard Gaskin
ambassador at fourthworld.com
Fri May 6 18:42:27 EDT 2005
Chris Sheffield wrote:
> Dear List,
>
> Okay, let's see if I can explain this.
>
> I have a group that contains an image as a background and several
> custom buttons placed on the top of it. The background image has a
> "stick out tab sort of thing" on it's left side. The idea is to place
> the group on the right side of the window so that only the tab is
> showing. When the user moves the mouse over that tab, I want the group
> to slide out revealing the buttons. When the user moves the mouse out
> of the group, I want it to slide back so that only the tab is visible
> again. Okay, so far so good.
>
> So I place mouseEnter (to slide the button panel out) and mouseLeave
> (to slide it back in) handlers in the group's script. Worked great
> until I placed my buttons in the group. This is what happens now. I
> move the cursor over the tab. The group slides out fine. But as I
> move up and down over my buttons, mouseEnter and mouseLeave messages
> get sent, including those to the background image, which triggers my
> moving action. So if I mouseEnter one of my buttons, I mouseLeave my
> background image, which slides the group back. That's not the behavior
> I want. As long as I'm within the group, I want it to be slid out,
> even as I'm moving up and down over the buttons.
>
> Does that make sense? Should I be handling different messages besides
> mouseEnter and mouseLeave? A mouseWithin perhaps? I'm kind of stuck.
> Can someone help?
I'm not sure this will help, but I recently made a very complex nested
group thang with lots of mouse interactions and I now have a rule for
such things:
Whenever you're moving objects with scripts and those objects are within
groups, more often than not you'll do well to set the lockLoc of both
the object and the group.
--
Richard Gaskin
Fourth World Media Corporation
__________________________________________________
Rev tools and more: http://www.fourthworld.com/rev
More information about the use-livecode
mailing list