mouseEnter/mouseLeave Problem

David Burgun dburgun at dsl.pipex.com
Wed Apr 13 09:49:24 EDT 2005


>Hi Jonathan,
>
>>-----Original Message-----
>>From: use-revolution-bounces at lists.runrev.com
>>[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of David
>>Burgun
>>Sent: Wednesday, April 13, 2005 7:08 AM
>>To: How to use Revolution
>>Subject: mouseEnter/mouseLeave Problem
>>
>>Hi,
>>
>>I have a script on a graphic rectangle object that does the following:
>>
>>on mouseEnter
>>set foregroundColor of me to blue
>>pass mouseEnter
>>end mouseEnter
>>
>>on mouseLeave
>>...
>>Any ideas why mouseLeave is not being called? Seems to be after a
>>MouseDown/Up sequence?
>
>wild and quick guess:
>Did you try a "mouserelease" handler with the same script as the "mouseleave"?
>
>>Thanks a lot
>>Dave

Yes, the Script of the object is as follows (I have modified it since 
I first posted):

on mouseEnter
set foregroundColor of me to blue
end mouseEnter

on mouseLeave
set foregroundColor of me to black
end mouseLeave

on mouseDown
--set the layer of me to top
end mouseDown

on mouseStillDown
-- Move the object via the mouse, sets a new rect for the object
based on mouse movement
end mouseStillDown

If you look in the mouseDown handler, if I comment out the:

--set the layer of me to top

All the rectangles work as they should, if I uncomment it, I lose the 
mouseLeave message. Any one have any ideas???

Thanks
Dave



More information about the use-livecode mailing list