Distinguishing Events Targeted at an Object from Events Targeted at That Object's Descendants : Stage : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Stage »

 

Distinguishing Events Targeted at an Object from Events Targeted at That Object's Descendants


 

package{
    import flash.display.GradientType;
    import flash.display.Sprite;
    import flash.geom.Matrix;
    import flash.events.*;  
    public class Main extends Sprite {
    
         public function Main() {
            stage.addEventListener(MouseEvent.CLICK, clickListener);
    
         }
        private function clickListener (e:MouseEvent):void {
          if (e.eventPhase == EventPhase.AT_TARGET) {
          }
        }
    }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» Stage