2 Replies Latest reply: Sep 22, 2010 2:04 PM by BrianatArena RSS

    Layered objects and functions

    BrianatArena Community Member

      I have two movie clips on the stage: mcA and mcB, each have a function when rolled over:

       

      mcA.addEventListener(MouseEvent.ROLL_OVER , aActivated);
      function aActivated (event:MouseEvent):void
      {
           trace('mcA was rolled over');
      }

      mcB.addEventListener(MouseEvent.ROLL_OVER , bActivated);
      function bActivated (event:MouseEvent):void
      {
           trace('mcB was rolled over');
      }

       

      Under certain circumstances mcA may overlap mcB. When the cursor rolls over their intersecting area I would like both functions to launch, how do I do that? Currently, the problem is that only the object on the top will launch its function.

       

      Thanks for the help.