I don't think so, cos it's mouseLeave that isn't being called.
If both rectangles are black and I move the mouse back and forth between them, all works as it should. If I mouseDown in either of the rectangles and then move the mouse to the other recangle, the Rectangle moved to changes to blue BUT the rectangle that has just been left DOES NOT get the mouseLeave message. Once this has happened once, the behaviour goes back to normal again, e.g. the rectangles change color and you would expect again!
This really seems to be to do with interaction between mouseUp and/or mouseDown and maybe mouseStillDown. If anyone could shed some light on this I would be really gratefull I just can't seem to work out why this doesn't work???!!!
Thanks in advance for any help Dave
Could it have to do with the fact that mouseenter is not sent if the mouse button is already down when you enter an object?
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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 set foregroundColor of me to black pass mouseLeave 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
This works fine most of the time, however if I have two rectangle that overlap each other on the display, then when I move the mouse from one to the other, the mouseLeave handler does not seem to get called ***IF* I have moused-down in one of these objects. For instance:
Both rectangles are set to black I move the mouse into into Rectangle A which is in front of Rectangle B. Everything works ok. The rectangles change from black to blue as expected. However if I do this:
Both rectangles are set to black Move into Rectangle A - Changes to Blue Move into Rectangle B - A changes to Black and B changes to Blue (but B says behind A) MouseDown in Rectangle B - B moves in in front of A MouseUp in Rectangle B - (mouseStillDown may have been called) (Now Rectangle B is in Front and set to Blue, rectangle A is black) Move into Rectangle A - B does NOT go to black, the mouseLeave handler is NOT called, A gets changed to Blue, so both are set to Blue!!!
Any ideas why mouseLeave is not being called? Seems to be after a MouseDown/Up sequence?
Thanks a lot Dave
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
