3 Replies Latest reply on Feb 6, 2011 9:31 PM by Flex harUI

    Activate fullscreen within Timer

    Joao Galli

      Hi guys,

       

      I have an flex project that must be fullscreen all the time, but windows always remove this fullscreen.

       

      What I would like to do is to activate full screen in a timer, I have all the code to do it but the screen just doesn't redraw.

      If I push any button it does redraw.

       

      I need to know how to activate this redraw automatically inside the Timer execution without any human interaction.

       

      Does someone knows how?

        • 1. Re: Activate fullscreen within Timer
          saisri2k2 Level 4

          can yu post the code.. i'm guessing that ther is invalidateXX method to do that, if ou can post, i can analyse it.

          • 2. Re: Activate fullscreen within Timer
            Joao Galli Level 1

            Hi and thanks for your time,

             

            I already tried to use this invalidate...(), redraw...(), reprint. But nothing happens.

             

            My code is simple, one part of it is to set FULLSCREEN, and it works because I already use it in a Button action. The other part is a Timer that I know it is working because of logs.

             

            package project.flex.timers
            {
                 import flash.display.StageDisplayState;
                 import flash.events.TimerEvent;
                 import flash.utils.Timer;
                 
                 public class FullScreenTimer extends Timer
                 {
                      private var main:Main;
                      
                      public function FullScreenTimer(main:Main)
                      {
                           this.main = main;
                           super(60000, 0);
                           addEventListener(TimerEvent.TIMER, action);
                      }
                      
                      public function action(e:TimerEvent):void {
                           main.stage.displayState = StageDisplayState.FULL_SCREEN;
                      }
            }
            

             

            Thanks again for your help.

            • 3. Re: Activate fullscreen within Timer
              Flex harUI Adobe Employee

              If this is a web app (not AIR) security rules prevent going to FULLSCREEN

              except on mouse or keyboard activity.