域卡的卜 Vicker’s Blog

Hong Kong Adobe Flash platform (Flex, Flash and AIR) developer
  • rss
  • Home
  • About
  • Resume
  • Flickr
  • Contact

Flex FAQ #5: 點樣做 Full Screen Application

Vicker | July 12, 2008 | 2:23 am

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:


AC_FL_RunContent(
	"src", "${swf}",
	"width", "${width}",
	"height", "${height}",
	"align", "middle",
	"id", "${application}",
	"quality", "high",
	"bgcolor", "${bgcolor}",
	"name", "${application}",
	"allowScriptAccess","sameDomain",
	"type", "application/x-shockwave-flash",
	"pluginspage", "http://www.adobe.com/go/getflashplayer"
);

 

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


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="${application}" width="${width}" height="${height}"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
	<param name="movie" value="${swf}.swf" />
	<param name="quality" value="high" />
	<param name="bgcolor" value="${bgcolor}" />
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="true" />
	<embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
		width="${width}" height="${height}" name="${application}" align="middle"
		play="true"
		loop="false"
		quality="high"
		allowScriptAccess="sameDomain"
		allowFullScreen="true"
		type="application/x-shockwave-flash"
		pluginspage="http://www.adobe.com/go/getflashplayer">
	</embed>
</object>

 

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


stage.displayState = StageDisplayState.FULL_SCREEN;

 

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


if (stage.displayState == StageDisplayState.NORMAL)
{
	stage.displayState = StageDisplayState.FULL_SCREEN;
}
else
{
	stage.displayState = StageDisplayState.NORMAL;
}

 

 

但係要留意一點~ 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:Flash_Player:9:Update:Full-Screen_Mode#Why_suspend_key_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

Related posts

  • 時光倒流第一集 - Adobe Flex Workshop (0)
  • Sometimes I hate Flex… Sometimes (0)
  • Flex FAQ #3: 點樣用 Flex FileReference 下載檔案 (0)
Categories
Flex, RIA
Tags
Adobe, AIR, displayState, Flex, Flex Builder, Flex FAQ, full screen, stage, StageDisplayState
Comments rss
Comments rss
Trackback
Trackback

« Adobe MAX 2008 Sometimes I hate Flex… Sometimes »

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Certification


Adobe MAX 2008

Categories

Archives

Recent Comments

  • Vicker on 25 了~
  • Felix on 25 了~
  • Vicker on 時光倒流第四集 - MAC makes me stupid
  • paul on 時光倒流第四集 - MAC makes me stupid

Tag Cloud

PHP algorithm Molyx form assembly John Koch stylesheet prototype ActionScript form Mac job hunting color selector VideoDisplay flv YouTube Andy Chun Flex Builder OO HTML AdvancedDataGrid music freelance FLABER FYP validation hea bobby blog W3C design pattern Eva Shi birthday WCAG XML bt Battlenet Experts Exchange Densha Otoko textfield Gary Wong meta sitemap Google Macromedia MOV component Apple ACSS protoype webxact flash video encoder Misaki Ito Flex WarCraft flysforum the core WYSIWYG AIR exhibition Cyber Formula Yahoo WMV JAWS APICTA UI business Web Usability include presentation PS2 OSS gundam Flash hyperlink CityU Munsang College Tim Shiu Laszlo Adobe MAX Flex FAQ Adobe good dog u SEO XHTML flysbookmark braille Hacken Lee family color web page textformat frame accessibility depth manager Chris Liang HKICTA MovieClip CSS suck Lego

Flickr

actionscript1.jpg 467149871_292083b8cc_o munsang1.jpg eagles.jpg DSCN4411 467138530_19ab43538e_o 07082007082.jpg 11092007102.jpg msc_bio_v3_4.png DSCN4320 DSCF0016 csgame4.jpg 469790470_55a3908526_b msc_bio_v3_1.png cciv2.jpg english2.jpg csgame3.jpg 0703_flaber_2.png 0511_web_usability_asg_b.jpg 11092007101.jpg

RSS FxAIR.org

  • Mojave Experiment by Microsoft
  • FotoViewr beta
  • RIAJobs
  • Cairngorm on opensource.adobe.com
  • Flex Builder 3 JVM Terminated Exit Code=-1
  • How to auto-update of website
  • Lynda free one-month subscription
  • Flex 4 SDK Gumbo Nightly build available
  • Flex FAQ #5: 點樣做 Full Screen Application
  • Default 個 loading 有沒有方法改呢?
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox