Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AS3: How to get fullscreen and keyboard input?

Since flash doesn't allow keyboard input while in fullscreen mode I'm wondering if there is a workaround to that?

I have a flash that is going to run fullscreen in a browser and needs different kinds of keyboard input. I have read something about AIR, but I don't fully understand it and would like another way if thats even possible.

Anybody knows?

like image 328
Tinelise Avatar asked Mar 09 '10 14:03

Tinelise


2 Answers

public function setFullScreen():void
            {
                this.width = Capabilities.screenResolutionX;
                this.height = Capabilities.screenResolutionY;
                this.stage.align = StageAlign.TOP_LEFT;
                this.stage.scaleMode = StageScaleMode.NO_SCALE;
                this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

            }

Use the FULL_SCREEN_INTERACTIVE

like image 190
micksatana Avatar answered Sep 26 '22 19:09

micksatana


This is now possible in Flash Player 11.3+

Simply compile your application to support a minimum version of 11.3.0 and it will work if you use:

stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

in your html you must put:

<param name="allowFullScreenInteractive" value="true" />

you will see a prompt when you enter full screen:

Permission Overlay

you can see an example on this official adobe blog: http://www.leebrimelow.com/wp-content/uploads/2012/04/overlay.gif

like image 32
David Coleman Avatar answered Sep 24 '22 19:09

David Coleman