3 Replies Latest reply on Apr 4, 2008 10:08 AM by Gregory Lafrance

    mouse over event

    Misenko Level 1

      I have two objects. First object (1) has event listener MOUSE_OVER. On this object is another object (2) without listener. When I move with the mouse on second object, mouse over event on object 1 is not dispatched. I don't know why. How can I do it ??

        • 1. Re: mouse over event
          Gregory Lafrance Level 6
          I read that you can't listen for events fired on another object. You could listen in the object's container though, as events cascade and bubble.
          • 2. Re: mouse over event
            Misenko Level 1
            Hi, thanks for reply. Could you please explain it litle bit more :) Maybe some example... Problem is that if one object is laying on second object and I move with mouse on the second object with no event listener, no event is dispatched at all, even I have physically mouse cursor on both of object.....
            • 3. Re: mouse over event
              Gregory Lafrance Level 6
              If both objects are in a VBox, with the second object (no listener) overlapping the first object (has listener), when you hover over second object, if you have a listener on the container you should be able to see if the target for the event is the second object and then take action.

              This is because events first "cascade" down from the top of the display list, through all containers until they reach the target (targetting phase), and then they bubble back up to the top of the display list (bubling phase).