Here is the code:

<mx:Script>
        <![CDATA[
                import mx.containers.Canvas;
            import flash.system.fscommand
           // Event handler function to set the value of the 
          // ProgressBar control.
          private function fscreen():void
          {
               
                        fscommand("showmenu","false");
                        fscommand("fullscreen","true");
                       
aplication.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);
                application.setFocus()
          }
          
        private function keyHandler(event:KeyboardEvent):void
          {
                //Handle ESC
                if(event.keyCode==27) {
                        fscommand("showmenu","false");
                        fscommand("fullscreen","true");
                }
                
          }
       ]]>    
</mx:Script>


--- In [email protected], "Bogdan BALAJ" <[EMAIL PROTECTED]>
wrote:
>
> Yes, you're right. The ESC key will switch FS off. 
> 
> The idea is to switch back on if I detect that the application is not
> in fullscreen. This is something I can't manage to solve  in Flex.
> 
> 
> B.
> --- In [email protected], "arpitmathur_80" <arpitflex@> wrote:
> >
> > I think there may not be an option to alter that behavior since adobe
> > is worried that people may use the feature to take away the user's
> > navigation and ability to move out of the experience. So the esc key
> > is permanently tied to escaping the fullscreen experience, as far as I
> > know.
> > 
> > 
> > --- In [email protected], "Bogdan BALAJ" <bogdan.balaj@>
> > wrote:
> > >
> > > Hi,
> > > 
> > > we are looking to build a standalone app that will run in full
screen.
> > > To go to fullscreen on start is easy, the only problem that I
have is
> > > that when the user is pressing ESC, the player is getting back
to it's
> > > window size. 
> > > 
> > > This might be easy also to solve with an addEventListener function.
> > > However, all of my tries are not succesfull with this particular
> issue. 
> > > 
> > > Anyone have managed to solved it? Can you share a working
example for
> > > this issue?
> > > 
> > > Thank you,
> > > Bogdan
> > >
> >
>


Reply via email to