Mouse Events and Modifier Keys : MouseEvent : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » MouseEvent »

 

Mouse Events and Modifier Keys


 

package {
  import flash.display.*;
  import flash.events.*;

  public class Main extends Sprite {
    public function Main() {
      stage.addEventListener(MouseEvent.CLICK, clickListener);
    }

    private function clickListener (e:MouseEvent):void {
      if (e.shiftKey) {
        trace("Shift+click detected");
      }
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Development
» MouseEvent