Showing/Hiding Images on mouseLeave...

John J. Theobald mailjjt at bellsouth.net
Fri Feb 7 23:51:01 EST 2003


erik hansen wrote:

>>I simply put a transparent graphic behind my
>>"freeform" shaped button. 
>>This graphic extends beyond the borders of my
>>button. I then put this handler in the graphic.
>>
>>on mouseEnter
>>   put image "normalstate" into image "goback"
>>end mouseEnter
>>
>>"goback" is the name of my "freeform" button,
>>"normalstate" is the image 
>>I want displayed when I do a mouseLeave.  Since
>>leaving the button does 
>>not generate a mouseLeave (as you discovered),
>>entering the transparent 
>>graphic DOES generate a mouseEnter and the
>>opportunity to change the 
>>graphic.
>>
> 
> if the mouse enters the transparent graphic from
> the card, NOT from freeform btn "goback"?
> 
> =====
> erik at erikhansen.org    http://www.erikhansen.org
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

When the mouse enters the transparent graphic from the card, it 
naturally sends the same "put" to the freeform button.  But, the 
"normalstate" is what already exists, so it does a "put" that is not 
needed. In my case I use imported images, so it is a memory copy, no 
disk I/O. IMHO this is negligible overhead while accomplishing the 
desired result.  If you wanted to eliminate the "put", just check the 
state of the image.  Either way, the handler has to do some processing.

John Theobald




More information about the use-livecode mailing list