¹ØÓÚflexÐÔÄܵ÷ÓÅÏà¹ØµÄһЩ×ܽá
1.Performace°üº¬4µã£º
£¨1£©Latency·´Ó¦Ê±¼ä£¨2£©Scalability:¿¹Ñ¹ÄÜÁ¦£¨3£©Reliablity£ºÎȶ¨ÐÔ£¨4£©Availability£º¿ÉÓÃÐÔ
2.ÔËÐÐʱÉúÃüÖÜÆÚ£º
FlexÖ»ÓÐÁ½Ö¡frames£ºPreload frame ºÍ application frame¡£
ÿһ¸öflex application ÊÇÒ»¸öMovieClip£¬ÒòΪÿ¸öflex application¶¼ÓÐSystemManager£¬ËûÊǼ̳Ð×Ô
flash.display.MovieClip.
Flex applicationµÄÈë¿ÚÊÇApplication layoutµÄÈÝÆ÷£¬ËûÊǼ̳Ð×ÔUIComponent¡£
UIComponent->Container->LayoutContainer->Application->WindowedApplication
3.µäÐ͵ÄÉúÃüÖÜÆÚʼþ£º
add: ×é¼þ±»Ìí¼Óµ½ÈÝÆ÷ÉÏ(addChild, addChildAt)ʱ·¢³ö
preinitialize: Ô¤³õʼ»¯Ê±·¢³ö
initialize: Íê³É¹¹Ô죬ËùÓÐÊôÐÔ¶¼±»ÉèÖÃÍê³Éºó·¢³ö
creationComplete: Íê³É¹¹Ô죬ÊôÐÔ£¬²âÁ¿£¬²¼¾Ö£¬»æÖƺ󷢳ö
applicationComplete: Dispatched after the Application has been initialized, processed by the LayoutManager,
and attached to the display list.
0£ºApplication 1£ºinner Container 2£ºcomponent
preinitializeHandler0 called!
childAddHandler0 called!
preinitializeHandler1 called!
initializeHandler1 called!
childAddHandler1 called!
preinitializeHandler2 called!
initializeHandler2 called!
initializeHandler0 called!
creationCompleteHandler2 called!
updateCompleteHandler2 called!
creationCompleteHandler1 called!
updateCompleteHandler1 called!
creationCompleteHandler0 called!
updateCompleteHandler0 called!
4.´´½¨²ßÂÔ£º
ÿ¸öÈÝÆ÷¶¼ÓÐÈçϵĴ´½¨²ßÂÔ£º
all£º´´½¨ËùÓеÄ×é¼þ
auto£º°´ÕÕĬÈϲßÂÔ
none£º²»´´½¨£¬Ö±µ½µ÷ÓÃcreateComponentfromDescriptors·½·¨±»µ÷ÓÃ
queued£ºÊ×ÏÈ´´½¨ËùÓеÄÈÝÆ÷£¬È»ºó°Ñº¢×ÓÒÀ´Î´´½¨£¬creationIndex¾ö¶¨³õʼ»¯Ë³Ðò£¬Ð¡ÕßÓÅÏÈ¡£
5.¼ì²âÆô¶¯µÄʱ¼ä
var recordedTime:Number = getTimer();
6.ÑÓ³ÙºÍ˳Ðò´´½¨×é¼þ
7.ÔÚflex ApplicationÖаüº¬ÁíÍâÒ»¸öApplication
<mx:SWFLoader source="FlexApp2.swf" />
ÎÒÃǾ³£Òª°ÑÒ»¸öswf°üº¬½øÀ´£¬²¢ÇÒµ÷ÓÃËüµÄ·½·¨¡£µ±Ò»¸öswf±»°üº¬½øÀ´ºó£¬¾Í¿ÉÒÔÁË¡£SWFLoaderÓÐÒÔϼ¸¸öʼþ
complete£¬init£¬progress£¬unload¡£
£¨1£©¸÷×Ô¸ôÀë var loaderContext:LoaderContext;
loaderContext.applicationDomain = new ApplicationDomain(
Ïà¹ØÎĵµ£º
FlexÍÏק-Á½¸öListÖ®¼äÍÏק
¹Ø¼ü×Ö: flexÍÏק, list
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="creationHandler();">
<mx:Script>
<![CDATA[
import mx.events.DragEvent;
imp ......
flex ºÍjavascript»¥Ïàµ÷Óá£
Ò»¡¢flex µ÷ÓÃjavascript
Ö»ÐèʹÓþ²Ì¬µÄExternalInterface.call¾Í¿ÉÒÔÁË¡£
call ·½·¨ÖÁÉÙÒªÇóÒ»¸ö²ÎÊý£¬¾ÍËùµ÷ÓöÊýµÄÃû³Æ¡£
Ò²¿ÉÒÔ´«µÝ²ÎÊý¡£
È磺
ExternalInterface.call("alert","hello");
"hello"¾ÍÊÇ×÷Ϊalertµ ......
mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:cmp="com.render.*"
height="100%" width="100%" paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0">
<cmp:AutoSizeTree
&n ......
¼¸ÖÖµ¼º½Ñ¡Ï
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:ButtonBar dataProvider="myPages">
</mx:ButtonBar>
<mx:ToggleButtonBar dataProvider="myPages">
</mx:ToggleButto ......
Silverlight×÷ΪһÃÅм¼ÊõÍƳöÒѾÈýÄ꣬ÔÚSilverlightÔçÆÚ°æ±¾£¬´ó¼Ò¶¼ÈÏΪSilverlightµÄ¹¦ÄÜÎÞ·¨ºÍFlex½øÐжԱȣ¬¸üÊÇÎÞ·¨³¬Ô½Flex£¬ÔÚ2009Äê11Ô£¬Î¢ÈíÍƳöÁËSilverlight 4²âÊÔ°æ±¾£¬ÒÔÆäÇ¿´óµÄ¹¦ÄÜÓÖÒ»´ÎÎüÒýÁËÖڶ࿪·¢ÈËÔ±µÄÑÛÇò£¬Ðí¶àÔø¾ÔÚFlexÏÂÖ§³ÖµÄ¹¦ÄÜ£¬ÏÖÔÚSilverlightÏÂÒѾ¿ÉÒÔʵÏÖ£¬¶øÇÒ»¹ÓÐһЩÐµĹ¦ÄÜ£ ......