armedIcon behavior

Rob Cozens rcozens at
Fri Jul 9 08:35:31 CDT 2004

Morning John.

>I've been messing with the armedIcon setting, and it doesn't seem logical.
>My expectations are that I can simply have an image show when the mouse is
>over the button. I had several unexpected (and fairly annoying) results:

I created a one card stack with one button.

I set the button's icon & armedIcon properties.

I included in the button script:

on mouseDown
    put "The mouse is down"
end mouseUp

>- It didn't actually do anything until I had 'autoArm' and 'traversal' set
>to 'true'.

Both settings are necessary if you want the button to automatically 
change icon image on mouseEnter & mouseLeave.  Neither setting is 
required if one scripts the action:

on mouseEnter
    if word 1 of the long name of the target is "button" then set the 
armed of the target to true
end mouseEnter

on mouseLeave
    if word 1 the long name of the target is "button" then set the 
armed of the target to false
end mouseLeave

>- It automatically triggered the 'mouseDown' script.

Not here (RR 2.1.2, Mac OS 10.2.3)

>- 'Resuming' the stack automatically arms (and triggers) the last button
>that had the focus. This was really annoying!

When I select another Revolution stack and then resume the original 
stack, the button is not armed.

When I select another application and then resume the stack, the 
button "flashes" as it is armed and then disarmed. (RR 2.1.2, Mac OS 
10.2.3); however the armed state does not persist and mouseDown is 
NOT triggered.

>Is this the correct behavior? All I wanted to do was create a
>'rollover'...maybe I will switch to a simple 'mouseEnter/Leave' routine of
>my own.

As noted, I am unable to trigger mouseDown (except by physically 
clicking the mouse while it is over the button); however, I agree 
that the arming/disarming of the button when Rev is resumed after 
another application was brought to the front doesn't seem right.  But 
the triggering of mouseDown is caused by something else, IMFO.

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)

More information about the use-livecode mailing list