Three mouse state buttons (was: Rollover Mouse effects)
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Sun Jan 8 10:41:10 EST 2006
Hi Tom,
I prefer to use a single button the autoHilite of which is false.
I specify the hiliteIcon in the properties inspector and the two
other icons (armed and normal) as custom properties.
Then I have no group and all code (very simple) is, as expected, in
the button's script:
on mouseDown
set the hilite of the target to true
end mouseDown
------------------------------
on mouseUp
set the hilite of the target to false
end mouseUp
------------------------------
on mouseRelease
set the hilite of the target to false
end mouseRelease
------------------------------
on mouseEnter
set the icon of the target to the uArmedIcon of the target
end mouseEnter
------------------------------
on mouseLeave
set the icon of the target to the uIcon of the target
end mouseLeave
Le 8 janv. 06 à 16:08, Thomas McGrath III a écrit :
> The three mouse state is very difficult to achieve using the icon/
> armed icon method. I have had success using a second button over
> top of the first button (armed with two icons) and not using the
> armed state on the second button so that it also can accept
> mouseDowns then finally grouping the two buttons. The three states
> are then handled by the either the group script or top button
> script for all three states/icons. It is a hack for sure but it works.
Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------
----------------------
http://www.sosmartsoftware.com/ eric.chatonet at sosmartsoftware.com/
More information about the use-livecode
mailing list