AS3: How to get full screen and keyboard input?

Since the flash does not allow you to enter the keyboard during full-screen mode, I wonder if there is a workaround?

I have a flash memory that will work in full screen mode in the browser and will require different types of keyboard input. I read something about AIR, but I do not quite understand it and would like it to be possible, even if it is possible.

Somebody knows?

+6
actionscript-3 fullscreen keyboard
source share
7 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 FULL_SCREEN_INTERACTIVE

+6
source share

Now it is possible in Flash Player 11.3 +

Just compile the application to support the minimum version 11.3.0, and it will work if you use:

 stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; 

in your html, you should put:

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

You will see a prompt when entering 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

+4
source share

Unable to get input key in full screen mode in browser.

Air is for desktop applications only, so if your application should run in a browser, you don't need Air.

If you need to enter full-screen mode, you can try to create a virtual keyboard ( example ), and the user will use the mouse to press the keyboard key.

+2
source share

This is really possible in Flash 10, but only for a few keys. See This Page: Overview of Security Changes in Flash Player 10

Flash Player 9 does not allow keyboard input when displaying content in full screen mode. Flash Player 10 changes this, the number of keys that can be used in full screen mode. These include Tab, Space, and (Up, Down, Left, Right).

+2
source share

Another option is to simply use the built-in full-screen browser mode. All major browsers offer this as far as I know (IE, Firefox, Chrome, etc.). Usually it is in view mode β†’ Full screen mode, F11 hotkey. Depending on the browser, it will either give you the whole screen, or maybe leave a small bar at the top and bottom. Then you just need to expand the Flash application to fill the entire HTML page.

+1
source share
Patrick is right. Due to security risks, you will have a difficult time when your goal is reached. Adobe AIR is your best solution and will be easily achieved in your state.

Here's a great video to start with Lee Brimelou. http://theflashblog.com/?p=403 (creating AIR applications in Flash CS3)

Since AIR applications are built correctly in Flash or Flex, all you need to do is set up a way to compile the application, and you have an Adobe AIR application that can use the keyboard while working as a cross-platform desktop application.

0
source share

Ahh, AIR is not for browsers? Very sorry. It seems like I won’t be able to get everything I want: p I have functions for the most important things without keyboard functions, but I would have liked them anyway.

I will look in Silverlight and see if this is an option.

Thanks guys!:)

0
source share

All Articles