a little message path issue

J. Landman Gay jacque at hyperactivesw.com
Sat May 7 11:36:13 EDT 2005


On 5/6/05 5:33 PM, Chris Sheffield wrote:

> 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.
<snip>
> 
> P.S.  Here's my group's script:
> 
> on mouseEnter
>     if "ButtonBar" is in the name of the target then
>         move me to 580,241
>     end if
> end mouseEnter
> 
> on mouseLeave
>     if "ButtonBar" is in the name of the target then
>         move me to 668,241
>     end if
> end mouseLeave



Try changing your mouseleave condition:

   if the mousecontrol is empty or "buttonBar" is not in the long name 
of the mousecontrol then

That way, it should execute only when the mouse leaves the whole group 
area. You'll get an error if the mouse is over the card itself, which is 
why you have to check for empty too.


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list