ÍøÒ³ÖÐ Flex È«ÆÁ Àý×Ó
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/07/creating-full-screen-flex-applications/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init(event)" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import flash.display.StageDisplayState;
private function init(evt:Event):void {
/* Set up full screen handler. */
Application.application.stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenHandler);
dispState = Application.application.stage.displayState;
}
private function fullScreenHandler(evt:FullScreenEvent):void {
dispState = Application.application.stage.displayState + " (fullScreen=" + evt.fullScreen.toString() + ")";
if (evt.fullScreen) {
/* Do something specific here if we switched to full screen mode. */
} else {
/* Do something specific here if we switched to normal mode. */
}
}
private function toggleFullScreen():void {
try {
switch (Application.application.stage.displayState) {
case StageDisplayState.FULL_SCREEN:
/* If already in full screen mode, switch to normal mode. */
Application.application.stage.displayState = StageDisplayState.NORMAL;
break;
default:
/* If not in full screen mode, switch to full screen mode. */
Application.application.stage.displayState = StageDisplayState.FULL_SCREEN;
break;
}
} catch (err:SecurityError) {
// ignore
}
Ïà¹ØÎĵµ£º
ͨ³£´ó¼Ò¶¼»áÉèÖÃvisibleÊôÐÔΪfalse¡£µ«ÕâÑù×ö»¹ÊÇ»áÓÐÎÊÌ⣺×é¼þÈÔȻռÓÃÔÀ´µÄλÖá£
×îºóͬʱʹÓÃincludeInLayoutÓëvisibleÊôÐÔÀ´½â¾ö¡£
ʵÏÖЧ¹ûͼÈçÏ£º
ʵÏÖµÄЧ¹ûÊǵ±µã»÷hide textµÄʱºò£¬ÖмäÎÄ×Ö½«Ïûʧ£¬Í¬Ê±show text°´Å¥×Ô¶¯ÏòÉÏÒƶ¯¶ÔÆë(ÒòΪApplicationµÄlayoutÊôÐÔΪvertical)
......
1:µ±ÓÃhttp://xxxxx/xxx.mxml?name=hermit·½Ê½·ÃÎÊ ¿ÉÒÔÓÃthis.parameters.nameÕâÖÖ·½Ê½ÔÚflexÀïÃæÈ¡url²ÎÊý
2:µ±ÓÃhttp://xxxxx/xxx.swf?name=hermit·½Ê½·ÃÎÊ ¿ÉÒÔÓÃthis.parameters.nameÕâÖÖ·½Ê½ÔÚflexÀïÃæÈ¡url²ÎÊý
3:µ±ÓÃhttp://xxxxx/xxx.html?name=hermit·½Ê½·ÃÎÊ ¿ÉÒÔÓÃthis.parameters.nameÕâÖÖ·½Ê½ÔÚflexÀïÃæÈ ......
ä¯ÀÀÆ÷¼ÓÔØswfºó£¬Flex×é¼þ×Ô¶¯»ñÈ¡ÊäÈë½¹µã¡£
1.ÔÚflexÖÐÉèÖý¹µã
as3 ´úÂë
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationCom ......
½â¾öʹÓÃFlex ÎÞ·¨Ê¹ÓÃtraceµÄÎÊÌâ
³öÏÖÁËʹÓÃDebug¹¦ÄܳöÏÖÁËÎÞ·¨Ê¹ÓÃtraceµÄÎÊÌâ
Õâ¸öÎÊÌâ˵Ã÷ÄãµÄFlash Player 10 ²»Êǵ÷ÊÔ°æ±¾
ÌṩһÏÂAdobe Flas Player 10µ÷ÊÔ°æ±¾µÄµØÖ·....
Ï£ÍûÄܶԴó¼ÒÓаïÖú
http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_ax_debug.exe
......
Ê×ÏÈ×¢ÒâÒ»ÏÂ.
ÕâÀï˵µÄÊÇÔÚ"FLEX"Éú³ÉµÄ"SWF"Ö±½ÓÔËÐÐʱ,ʹÓÃ"stage.displayState"ÆôÓÃÈ«ÆÁʱËùÓöµ½µÄÎÊÌâ...
×¢ÒâÉÏÃæ""ºÅËùÌáµ½µÄ¹Ø½¡´Ê..
ÏÖÔÚÎÒÃÇÏÈ¿´¿´´úÂë,ÏÂÃæµÄ´úÂë×°ÔÚcreationCompleteʼþÖе÷ÓÃinit()À´Æô¶¯È«ÆÁ.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www ......