Flex FAQ #5: 點樣做 Full Screen Application

Flex application 有一個特點就係可以完全跳出 web browser o既框架
Adobe AIR 當然係其中一種做法~
但係 Flash player 本身 support full screen mode 所以直接用 full screen mode 就比起 AIR 直接同快喇~!

要用 full screen mode 首先要改動 SWFObject 或者 Object tag 主要係加入 allowFullScreen 呢個 parameter 以 Flex Builder o既 HTML template 為例

SWFObject:

Object tag: (要留意加左兩個地方~!)

之後 within Flex application 就可以利用 stage.displayState 開動 full screen

如果想做到 toggle full screen effect 可以利用簡單既 if… else… statement

但係要留意一點~ Full screen mode o既所有 text field 係唔可以 edit 架… 講真… 咁o既 limitation 可以話將個 application 廢左武功… 暫時都無解決辦法… Astro 都唔得…

Adobe Labs - Flash Player 10 Beta Release Notes
http://labs.adobe.com/technologies/flashplayer10/releasenotes.html

Limited Fullscreen Keyboard Access — In Flash Player 10, key events are supported for non-printing keys such as arrows, shift, enter, tab, space, etc. Limited access to the keyboard will allow fullScreen games and video controls with keyboard access in a secure way.

背後o既原因係擔心有人 develop 假既 OS login page… 都好無奈… 如果咁既話所有 web browser o既 full screen mode 都應該 disable text input…

Adobe Labs - Talk:Flash Player:9:Update:Full-Screen Mode
http://labs.adobe.com/wiki/index.php/Talk:FlashPlayer:9:Update:Full-ScreenMode#Whysuspendkey_input.3F

When considering this feature, several security concerns impacted our decisions for this first release. The reason keyboard input was blocked was to help prevent phishing attacks using Flash, where full-screen is used to simulate a log-in screen, someone else’s website, etc. This also impacted our decision to add the overlay to visually inform the user that something had changed and they were in a new state.

English title: How to develop full screen application