Text input fields in flex when full screened does not work

折月煮酒 提交于 2019-12-10 19:22:00

问题


Hi all i have a problem where if my application is full screen i cannot click on any text input component and i cannot input any text into the fields. i have tried creating the text input fields at run time and i have tried creating them on the canvas when on the gui design window in flex builder. however they both give the same results and do not let me pick them and enter text. Any thoughts Regards Mark


回答1:


As you said in the comment (just writing this answer for anyone that stumbles across this question), the keyboard is disabled when you are in Full Screen Mode.

This is due to security restrictions, in that someone could build a swf that spoofs some action on your machine... for instance displaying a mimic desktop that has a dialogue up asking the user to enter their live ID and password. There are probably loads of other sinister uses that adobe want to avoid by disabling keyboard input. There is no way around this I'm afraid.

J




回答2:


If you're okay with using AIR instead of Flex you can run in full-screen mode with full keyboard input enabled:

Setting the displayState property of the Stage to StageDisplayState.FULL_SCREEN_INTERACTIVE places the window in full-screen mode, and keyboard input is permitted in this mode. (In SWF content running in a browser, keyboard input is not permitted). To exit full-screen mode, the user presses the Escape key.

http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e06.html




回答3:


stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

this will do the above line of code is in action script 3 just add it to your code



来源:https://stackoverflow.com/questions/1176639/text-input-fields-in-flex-when-full-screened-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!