1 Reply Latest reply on Sep 30, 2010 6:53 AM by Neobox75

    block ESC in fullscreen

    FlashGodThe2nd

      Hi,

       

      how can I turn off the ESC key in fullscreenmode. So that the user isn't able to exit fullscreen on my kiosk system.

       

      TIA

        • 1. Re: block ESC in fullscreen
          Neobox75 Level 3

          Hi, you can use this code to switch on FullScreen at creationComplete event:

           

          stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

          stage.addEventListener(KeyboardEvent.KEY_DOWN, fullScreenHandler, false, 99999999);

           

          And to block the escape:

           

          private function fullScreenHandler(e:KeyboardEvent) :void
          {
               if (e.keyCode == 27) e.preventDefault();
          }