in Flash Player

Flash Player 11.3 fullscreen keyboard input

One of the greatest features in Flash Player 11.3 is the ability to accept full keyboard input while in fullscreen mode. This is really important for fullscreen games that need chat or other keyboard input. You can implement this feature very easily by using the FULL_SCREEN_INTERACTIVE mode. See below for the ActionScript code:

1
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

Much like regular fullscreen mode, you need to add a parameter to your HTML code. See the code below:

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

When your application goes fullscreen, the user will be presented with an overlay at the top of the screen telling them that they are in fullscreen. They need to click the Allow button in order to be able to accept keyboard input. See the overlay below.

You can see a working demo of this new fullscreen mode here. Just be sure to have Flash Player 11.3 installed from Adobe Labs.

Write a Comment

Comment

47 Comments

  1. Great to see you’re already Beta on 11.3. Wow, quick dev cycle. I’m really hoping you guys at Adobe can put Flash back on top of the games market. Working with JavaScript is painful.

  2. This is great! The only issue I have with this is the allow button doesn’t really say anything. It’s great that it’s there but it should say something like “Allow Keyboard Access” or something of that nature. My wife looked at the demo (gamer, but not a programmer) and asked “Why would I click ‘allow’ if I don’t know what I’m ‘allow’ing?”

  3. This is one of the most requested features for our game, thanks guys :) And I second Alex’s comment. The speed at which you guys are innovating on Flash/AIR is phenomenal. It has not gone unnoticed in the dev community and we really appreciate it..

  4. Great! One minor feedback: first 3 people I showed it to didn’t notice the overlay, it’s to slick. So they we’re trying to use focus and type into the input field but of course they needed allow it first… Maybe put it in vertical center too?

    I believe the old fullscreen notice was centered too (and maybe it also was bigger?) Or a nice icon maybe.. put in a little unobtrusive Flash logo so we see it’s from the flash player and not the browser, also let’s people see what they use and how it’s giving them awesome.

  5. @Lee: Is there a way to know when the user clicks the ‘allow’ button? Is there a way to hide/show the message after some time? This is a great feature that I will definitely add to some of my projects, but it is unacceptable for some clients to have this message visible all the time.

    Otherwise I agree with what has been said already, great speed of innovation of Flash/Air runtime. How sad it is coming this late. :( This feature in particular should had been implemented a looooooong time ago. Anyway, keep the features coming!

  6. Thanks, Tom. Will we also be able to hide/show this message? Let’s imagine a very simple scenario:
    Video player, can open an in-player “window” for sharing the link; the user can write a message (publish it on FB, send as email, whatever).
    -most of the users will never do this but still they have to click the button to disappear the message
    -some users may do it so the interactivity is required

  7. Hello lee, a question to ask. What if I only need mouse interaction and no need keyboard input at all, but don’t want to show that ‘allow’ button? The problem with that button is that I’m planning to create free educational content for Indonesian children and don’t think a lot of these children understand English yet. Simple few second notification of full-screen state (just like how chrome browser did) is no problem.

    So, simple mouse-interaction in full-screen without the ‘allow’ button (just few second notification of full screen), can we do that with future flash player?

    please advice, if can’t we’ll go with unity for this project as they have simpler full-screen rules.

  8. @widhi

    “StageDisplayState.FULL_SCREEN_INTERACTIVE” Is the only mode that prompts the user.

    You can still use the normal “StageDisplayState.FULL_SCREEN”.

  9. This has been in AIR for, dare I say, years? Not really anything amazing, should have been available a long time ago.

    How about Adobe now add StageVideo to AIR – then I’ll be happy.

  10. Great feature Lee, love to see Adobe now work on tighter integration and more control over StageWebView class like sending and receiving a wider range of events with paramaters, looks like adobe webkit team are doing some cool things and many AIR apps are loading HTML windows via StageWebView as part of the application.

  11. I see, thank you P4INKiller. I thought adobe will change “StageDisplayState.FULL_SCREEN” behavior also. I’ll go with flash for this project then.

    Another question to Lee or anyone who understand. Will flash player 11.3 give us the ability to fully use rightclick button without any “about flash player …” context menu? I’ve tried searching but haven’t found any real samples of it.

  12. @widhi

    Yes; actually, Flash Player 11.2 — the current release — already lets you disable the right-click context menu. It also adds the ability to register for right-click and middle-click mouse events. So you just need to listen for right-click events, and you’ll disable the right-click context menu.

  13. Is FULL_SCREEN_INTERACTIVE backwards compatible? In other words, if someone has Flash Player 10.x-11.2, will they still go full screen but have restricted input as if the FULL_SCREEN parameter was used?

    I hope this is the case, because it would mean that we don’t have to detect their flash version and use the correct function just for 11.3+ users.

  14. @joe,

    you can test :
    if( stage.allowsFullScreenInteractive ) {/*…*/}else{/*…*/}

    And many thanks for this feature, now it’s possible to fill a form in full screen :)

  15. good news ofc, but I can’t seem to make peace with the idea , this took up until flash player 11.3

    I wonder how much more features (that are awesome) from the suggestion boards, adobe will FINALLY add.

    I might even cheer then, sorry for my banter… but its sad to see so much good ideas (in terms of workflow, etc) on the suggestion forums, and then you see flash CS 6, and none! are added…

    sad!
    but hey…

  16. Hi, I share Geremy Tilton’s concerns: “Why would I click ‘allow’ if I don’t know what I’m ‘allow’ing?”
    The fullscreen text input feature is great, but the message to the user is not clear. Our users have no clue why typing isn’t working and why they have to click “allow”. Also, our website is targeted at a Dutch and German audience. So, Adobe, can you please improve the message and make it translatable?

  17. Hello, this is a great feature but I ran into a glaring issue. When enabling FULL_SCREEN_INTERACTIVE and adjusting “stage.fullScreenSourceRect” to the size of my game, it resizes the “Allow” overlay to about half the size of the game, making it illegible, although you can still click on it. Any way around this?

    Thanks!

  18. I’m using FULL_SCREEN_INTERACTIVE along with mouseLock to make a FPS game. But It seems there is a problem in onMouseMove() event when a keyboard key is down. It returns big values for movementX and movementY values making the camera jumpy. The issue is very noticeable at higher frame rates. Any ideas why this happens? or a workaround?

  19. I was really excited until I realized that the user has to click “allow”. I’d rather have no full screen keyboard support at all than to provide this half-implemented solution. Especially when, as Arie and Tilton said, the user has no idea why the keyboard doesn’t work or why they have to click the “allow” button. It seems buggy. Please make the message customizable, at least.

  20. Allow? Allow what? Seriously, nobody is going to click that. There is no point for a permission to access keyboard either. what can possibly happen in fullscreen that can’t happen in normal mode? we already have keyboard access in HTML. I hope Adobe removes it. or just let the user know that the application has keyborad access and they can press escape to exit.

  21. I would just like to point out as a follow-up to my previous comment that after the official 11.3 release I no longer experience any input lag in full screen mode.

    Also, for the people complaining about the message up top, there’s nothing stopping you from placing instructions in your flash application.

  22. P4INKiller, I’m still having the input lag with flashplayer 11.3.300.257 on both Chrome and FF. and it’s not just input lag, there is also lag in frame rate when a key is down. Is there anything I’m doing wrong?

  23. Hi, I need to use keyboard interaction in full screen Mode.So i try to update flash player but I couldn’t update Flash Player 11.2 to 11.3 in adobe flash cs6. I have tried a lot from more links. Please give me some solutions to upgrade to flash player 11.3.

  24. I would like to use the keyboard interactivity in full screen mode and
    I had been googled over lot of site’s to upgrade flash player 11.3 from 11.2 but i could’t find
    anything useful .
    There may be a issue while working with firefox and i hope you will give a rite solution for those problems

  25. Hi!
    I have a problem regarding fullscreen interactive and internet explorer.
    As soon as the internet explorer is loading my swf file from the browsercache, it is throwing the error “#2152″ . When loading the page the first time or after clearing the browsercache everything works fine (see http://forums.adobe.com/thread/1028735?tstart=0 for details).
    All other browser are working fine as well.
    What am I doing wrong? I tried compiling with SDK 4.5.1A and 4.6 in FDT.
    Has anybody an idea or suggestion?
    Thanks in advance!
    Stephan

  26. Hi , i have added the fullscreen keyboard input functionality in one of my projects . When i first click the fullscreen button the allow message pops up and when i allow i am able to enter text in my input boxes. If i click esc after that then go back and click the fullscreen button nothing happens i dont get the allow popup. its almost as if its caching that allow. I seem to have this problem with IE9 but on firefox i havent experienced it. If anyone knows something about this please help.

  27. Hi Lee and thanks for the demo.

    I’ve tried to reproduce your application creating a very simple Flex 3 application but I always encounter the SecurityError (at the line setting the stage’s displayState property to fullScreen or fullScreenInteractive), either in Internet Explorer or in Firefox. I have adapted your HTML code to embed my Flash application, so I think the container configuration is not the problem.

    I’m using Flex Builder 3, Flex framework 3.6.0.16995A (but tried with other Flex 3 framework with no luck) and my FlashPlayer version is 11.3.300.257.

    Can you please post the Flex code (and the actionscript version you use) ?

    Thanks.

  28. @Rico

    You need to have Flex framework 4.5.1A and you need to add “-swf-version=16″ in the compiler options to stop that error.

  29. Could u provide the code, the html and the as? please? :-)
    Going through a difficult time trying to implement it on my actionscript
    kind regards

  30. Thanks, here’s where I run an error of EMI.

    When running the script we get the following flex error:
    Error: Error #2063: Error attempting to execute IME command.
    at flash.system::IME$/set enabled()
    at mx.managers::FocusManager/focusInHandler()

    How do to solve? Thanks for the help

  31. Is it possible to make this notification dismissible with the enter button? Before I click this button I am still allowed to use the arrow keys, but no other parts of the keyboard. Is there a way to select “allow” without using the mouse?