Flex»ù±¾ÔÀí
Á˽âFlex³ÌÐòµÄÉúÃüÖÜÆÚ
Flex³ÌÐò´Ó±¾ÖÊÉϽ²£¬¾ÍÊÇʹÓÃÁË£¨ÓÉAS±àдµÄ£©Flex¿ò¼ÜµÄFlash³ÌÐò¡£
µ«ÔÚFlex³ÌÐòÖпÉÒÔºöÂÔtimelineÕâ¸ö¸ÅÄËùÓеÄÄÚÈݶ¼¼¯ÓÚÒ»Ö¡¡£
ÊÂʵÉÏFlex³ÌÐòÖеĸù£¬ÊǼ̳Ðflash.display.MovieClipµÄmx.managers.SystemManager¡£
SystemManagerÓÐÁ½Ö¡¡£µÚÒ»Ö¡ÊÇÔ¤¼ÓÔسÌÐò£¬µÚ¶þÖ¡ÊÇÖ÷³ÌÐò¡£
Òò´Ë£¬ËùÓгÌÐòÔÚÕæÕý¿ªÊ¼ÔËÐÐÇ°£¬ÐèÒª¾¹ýÈçϹý³Ì:
Ô¤³õʼ(preinitialize)
³ÌÐòÔÚÕâ¸ö¹ý³Ìºó£¬ÒѾ±»ÊµÀý»¯£¬µ«»¹Î´´´½¨ÈκÎÄÚÈÝ¡£
³õʼ»¯(initialize)
³ÌÐòÔÚÕâ¸ö¹ý³Ìºó£¬ÒÑ´´½¨ºÃÄÚÈÝ£¬µ«»¹Î´Íê³É²¼¾Ö¡£
´´½¨Íê³É(creationComplete)
³ÌÐòÔÚÕâ¸ö¹ý³Ìºó£¬ÒÑÍê³É°üÀ¨²¼¾ÖÔÚÄÚµÄËùÓд´½¨¡£
ÔÚ˳ÀûÍê³ÉÒÔÉÏ3¸ö¹ý³Ìºó£¬SystemManager¹ã²¥applicationCompleteʼþ£¬Òâζ×ųÌÐòÕû×°´ý·¢ÁË¡£
SystemManager»¹¹ÜÀí×ÅËùÓÐÏÔʾÔÚÇ°¶ËµÄÄÚÈÝ¡£°üÀ¨µ¯³ö´°£¬Êó±êÖ¸Õ룬¹¤¾ßÌáʾµÈ¡£
SystemManager
ÓÐÒ»¸ö½ÐtotelLevelSystemManagerµÄÊôÐÔ¡£µ±Flex³ÌÐòÊÇÒ»¸ö¶ÀÁ¢³ÌÐòʱ£¬¸ÃÊôÐÔÖ¸ÏòSystemManagerµÄʵÀý£¬¶øµ±
Flex³ÌÐòÊDZ»¼ÓÔص½±ðµÄFlex³ÌÐòʱ£¬¸ÃÊôÐÔÖ¸Ïò¼ÓÔØÕßµÄSystemManagerʵÀý¡£
ËùÓÐUIComponents¶¼ÓÐÒ»¸ösystemManagerµÄÊôÐÔ£¬Ö¸Ïò³ÌÐòµÄSystemManagerʵÀý¡£
Á˽âÔ¤¼ÓÔØÆ÷
Ô¤¼ÓÔØÆ÷ÓÉSystemManagerÔÚµÚÒ»Ö¡×Ô¶¯´´½¨£¬µ±Íê³Éºó·¢²¼completeʼþ£¬²¢½øÈëµÚ¶þÖ¡£¬ÔÙÓÉSystemManagerɾ³ý¡£
³ýÁËcompleteÒÔÍ⣬»¹ÓÐÈçÏÂʼþ£º
progress£º³ÌÐòÏÂÔعý³Ì
rslError£ºÔËÐÐÆÚ¹²Ïí¿âÏÂÔØʧ°Ü
rslProgress£ºÔËÐÐÆÚ¹²Ïí¿âÏÂÔعý³Ì
rslComplete£ºÔËÐÐÆÚ¹²Ïí¿âÏÂÔØÍê³É
initProgress£º³ÌÐò³õʼ»¯¹ý³Ì
initComplete£º³ÌÐò³õʼ»¯Íê³É
ÔÚFlex³ÌÐòÖмÓÔØÁíÒ»¸öFlex³ÌÐò
±»¼ÓÔصÄFlex³ÌÐò£¬ÔÚ¼ÓÔØÍê±Ïºó£¬×ÔÉíÄÚ²¿»á¾ÀúÉÏÊö3¸ö¹ý³Ì¡£×îÖÕ£¬Ö÷³ÌÐò²ÅÄܶԸóÌÐò½øÐÐÓÐЧµÄ·ÃÎÊ¡£
<!--
------------------------------------
B.mxml Éú³É B.swf
--------------------------------------
-->
<?
xml version="1.0" encoding="utf-8"
?>
<
mx:Application
xmlns:mx
="http://www.adobe.com/2006/mxml"
layout
="absolute"
>
<
mx:Script
>
<![C
Ïà¹ØÎĵµ£º
public function submit():void{
//ÒªÇëÇóµÄURL
var request:URLRequest = new URLRequest("
http://localhost:8086/test.do
") ;
var load:URLLoader = new URLLoader() ;
//URL²ÎÊý
& ......
Ê×ÏÈ´´½¨Ò»¸ö×é¼þµÄMXMLÎļþ
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
[CDATA[
[Bindable]
public var myFirstName:String;
[Bindable]
public var myLastName:String;
]]
</mx:Script>
<mx:La ......
×î½üÔÚÏîÄ¿ÖÐÒªÓõ½flv²¥·ÅÆ÷£¬ÓÉÓÚflex×Ô´øµÄVideoDisplay×é¼þ²»ÊǺܺÃÓ㬾Í×Ô¼º¼òµ¥ÊµÏÖÁËÒ»¸ö£¬½çÃæ²»ÊǺÜÃÀ¹Û£¬µ«¹¦Äܶ¼ÓÐÁË£¬Õý¿ÉνÂéȸËäСÎåÔà¾ãÈ«¡£ÏÂÃæÊDz¥·ÅÆ÷µÄ´úÂ룬»¹²»»áÓÃflash×öflv²¥·ÅÆ÷µÄÅóÓÑ£¬¿ÉÒԲο¼²Î¿¼¡£
Player.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="ht ......
×î½ü×öÓÎÏ·µÄʱºò£¬·¢ÏÖÍ˳öµÇ½ʱURLÉÏ»á×Ô¶¯¼ÓÉÏÒ»¸ö“#”×Ö·û£¬ºÜÆæ¹Ö£¬Google+BaiduÎÞÊý´Î¶¼Ã»ÓÐÕÒµ½´ð°¸¡£½ñÌìÎÞÒâ¼ä¿´µ½¼¸¸ö
ȺÓÑÔÚ˵ͨ¹ý“BrowserManager”»ñÈ¡URL£¬ÓÚÊÇ×Ðϸ²é¿´ÁËAPI£¬ÓÖ·¢ÏÖÁË“HistoryManager”£¬Õâ¸öÎÊÌâÖÕÓÚÃ÷°×ÁË¡£
ÎÒÃÇͨ³£¿´µÄWebÒ³Ãæ
¿ÉÒÔͨ¹ýä¯ÀÀÆ÷µ ......
ÔÚÓ¦ÓÃÖУ¬ºÜ¶à¶¼ÏëʵÏÖflexµÄ¿Ø¼þûÓйö¶¯ ¶øÊÇͨ¹ýÆäËûµÄ°´Å¥·½Ê½½øÐпؼþÄÚÈݵĹö¶¯£¬ÕâÑùʵÏֵĿªÊ¼µ±È»ÊÇÒªÉèÖÃhorizontalScrollPolicy="off" verticalScrollPolicy="off"ÁË£¬È»ºóͨ¹ýcontainerµÄhorizontalScrollPosition »òverticalScrollPositionµÄ¼Ó ¼õÀ´ÊµÏÖÄÚÈÝ×óÓÒ¡¢ÉÏϹö¶¯¡£Ë¼Â··½·¨ÍêÈ«ÕýÈ·£¬µ«ÊÇÔÚÕâÑùµÄÇ ......