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 >
<![CDATA[
&
Ïà¹ØÎĵµ£º
ת£ºhttp://www.k-zone.cn/zblog/post/flex-flash-player-gc.html
Flex±à³Ì×¢ÒâÖ®ÐÔÄÜÓÅ»¯¡¢À¬»ø»ØÊÕµÄһЩ×ܽá
×Ô´Ó¿ªÊ¼×öFlex¡¢ActionScript 3.0µÄÏîÄ¿£¬ÎÒ¾ÍÒ»Ö±ÓëÀ¬»ø»ØÊÕ¡¢ÐÔÄÜÓÅ»¯ÕâЩÎÊÌâ´ò½»µÀ£¬Òò´ËÒ²×ܽáÁËһЩÓÅ»¯µÄ·½°¸£¬Í¬Ê±ÔÚһЩQQȺÖÐÒ²µÃµ½ÁËһЩ“¸ßÈË”µÄÖ¸µã£¬Òò´Ë½«´ËÄÚÈݼǼһÏ¡£
ÒÔÏ ......
<mx:DataGrid id="dg" click="select()" dataProvider= "{modelLocator.resultList}" borderStyle="none"
verticalGridLines="false" horizontalGridLines="false" verticalScrollPolicy="off" rowCount="10"
fontSize="16" fontStyle="normal" fontThickness="0" width="100%" height="100%">
<mx:columns& ......
FlexÖÐÈçºÎͨ¹ýstrokeWidth, strokeColorºÍshadowColorÑùʽ£¬´´½¨Ò»¸ö×Ô¶¨Òå·ç¸ñµÄHRule»òVRule
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
&nbs ......
<?xml version="1.0"?>
<!-- Simple example to demonstrate the Alert control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script& ......