[Flex 2] 04 ÈÝÆ÷ºÍ×é¼þ
///
Ç°ÃæµÄ¼¸ºõ¶¼ÊÇÔÚ³Ê飬ÊÇÒª¸ÄÒ»ÏÂÁË
Tips:
1¡¢Flex
BuilderÏîÄ¿»òActionScriptÏîÄ¿»á×÷Ϊһ¸öÈÝÆ÷£¬ÈÝÄÉËùÓÐ×ʲú¡£×ʲú¼´ÏîÄ¿ÔËÐÐËùÐèµÄ¸÷ÖÖ¸÷ÑùµÄÎļþ£¨MXML¡¢AS¡¢Í¼Æ¬ºÍXMLµÈ£©¡£Flex
Builder»áΪÎÒÃǸú×ÙÕâЩ²»Í¬µÄ×ʲú£¬¹ÊFlex
BuilderÒªÇóÎÒÃÇÖ»ÄÜÔÚÏîÄ¿ÄÚ´´½¨»òµ¼ÈëÕâЩ×ʲú¡£
2¡¢Í¨³£Ö»ÓÐÒ»¸öMXMLÎļþ£¬Ëü³äµ±×ÅͨÍùÆäËûËùÓÐÎļþµÄ“¹Ø¿Ú(gateway)“¡£ÒòΪËüÊÇÓû§¶¨Î»µ½Íøվʱ³öÏÖµÄÎļþ£¬¹ÊÀàËƱê×¼WebÉè¼ÆµÄindex.htmÎļþ¡£
3¡¢½¨Òé²»ÒªÐÞ¸ÄÖ÷ÎļþÊä³öĿ¼bin£¬·ñÔò´óÁ¿²âÊÔÄÜÁ¦½«»áɥʧ£»µ«Èç¹ûÐèÒªÔÚÒ»¸ö²»Í¬Ä¿Â¼½á¹¹µÄ·þÎñÆ÷ÉϲâÊÔ£¬¾ÍÐèÒªÐ޸ĴËÄ¿µÄµØ¡£
################
#
Ö÷Ó¦ÓóÌÐòÎļþ
################
Ó¦ÓóÌÐò´ÓÆðʼApplication±êÇ©¿ªÊ¼£¬È»ºóÒÔ½áβApplication±êÇ©Í˳ö£»ÆäËûËùÓÐÊÂÇé±ØÐëÖ±½Ó»ò¼ä½Ó·¢ÉúÔÚÁ½±êÇ©Ö®¼ä¡£
ÿ¸öFlexÏîÄ¿¶¼Ó¦Ö»ÓÐÒ»¸öº¬ÓÐApplication±êÇ©µÄÎļþ£¬¼´Ö÷Ó¦ÓóÌÐòÎļþ£¨main
application file£©¡£
Èç°ÑÏîÄ¿±È×÷½»ÏìÀÖÍÅ£¬ÔòApplication±êÇ©¾ÍÊÇÖ¸»ÓÕß¡£Ã»ÓÐËû·¢ºÅÊ©ÁһÇж¼²»»á·¢Éú¡£
£¨Application±êÇ©ÀàËÆÓÚJava¡¢C++¡¢C#.NETÖеÄÖ÷·½·¨(main
method)£¬ÔÚFlashÖÐÀàËÆÓÚÖ÷ʱ¼äÖá¡££©
FlexÄ¿µÄÔÚÓÚ³ÊÏÖÊý¾Ý£¨³ÊÏÖ·þÎñÆ÷£©£¬ÆäÓ¦ÓóÌÐòͨ¹ýÔÚÈÝÆ÷ÄÚµÄÈÝÆ÷Àï´´½¨ÈÝÆ÷À´¹¹½¨¡£¿É°Ñ±êÇ©¿´³É×îÍâÃæµÄÈÝÆ÷»ò˵Ö÷ÈÝÆ÷£¬ËùÓÐÆäËûÈÝÆ÷¶¼·ÅÔÚ´ËÈÝÆ÷ÄÚ¡££¨´Ë¸ÅÄîÀàËÆÓÚJava¹¹½¨ÆäÓû§½çÃæµÄ·½Ê½£©
ËùÓÐFlex´íÎó¿É¹é½áΪÁ½Àࣺ±àÒë´íÎó(compiler
error)¡¢ÔËÐÐʱ´íÎó(runtime
error)¡£ÔÚ´ó¶àÊý³ÌÐòÖУ¬±àÒëÖ¸°Ñ±àдµÄ´úÂëת±ä³É¼ÆËã»ú´¦ÀíÆ÷¿ÉÇáËɶÁÈ¡µÄ¶þ½øÖÆÎļþ¡£²»¹ýÔÚFlexÖУ¨ÈçFlashÖУ©£¬Ëü°Ñ´úÂëת±äΪSWF(small
web format£¬Ð¡Web¸ñʽ)Îļþ¡£
³£Óò¼¾ÖÈÝÆ÷£¨¹²16¸ö£©£º
*
HBox: ´Ó×óµ½ÓÒˮƽ°Ú·Å×ӿؼþ£»
*
VBox: ´ÓÉϵ½Ï¾ÓÖаڷÅ×ӿؼþ£»
*
Canvas: ʹÓþø¶Ô²¼¾Ö£¬¹Ê±ØÐëÖ¸¶¨x¡¢yÊôÐÔ¡£
*
Panel: ¿É×÷HBox¡¢VBox»òCanvas£¬ÇÒ¾ßÓÐÒ»¿ÉÌí¼ÓÎı¾µÄ±êÌâÀ¸ÇøÓò¡£
*
Tile: ÒÔ´¹Ö±ÁлòˮƽÐÐÅÅÁÐ×ӿؼþ£¬ÇÒÿ¸öµ¥Ôª¸ñ´óСÏàͬ¡£ÇÒͬPanelÒ»Ñù£¬ÒàÓÐÒ»±êÌâÀ¸ÇøÓò
Ïà¹ØÎĵµ£º
»ùÔªÊý¾ÝÀàÐÍ°üÀ¨ Boolean¡¢int¡¢Null¡¢Number¡¢String¡¢uint ºÍ void¡£ActionScript ºËÐÄÀ໹¶¨ÒåÏÂÁи´ÔÓÊý¾ÝÀàÐÍ£º
Object¡¢ Array¡¢Date¡¢Error¡¢Function¡¢RegExp¡¢XML ºÍ XMLList¡£
Boolean Êý¾ÝÀàÐÍ
Boolean Êý¾ÝÀàÐÍ°üº¬Á½¸öÖµ£ºtrue ºÍ false¡£¶ÔÓÚ Boolean ÀàÐ͵ıäÁ¿£¬ÆäËüÈκÎÖµ¶¼ÊÇÎÞЧµÄ¡£Ò ......
ÔÎÄ£ºHow to dispatch an event from a custom item renderer
´Ó MXML ×é¼þÖзÖÅÉʼþ²¢²»À§ÄÑ£¬µ«ÊÇÏëÒª´Ó itemRenderer ÖзÖÅÉʼþ¾ÍûÓÐÄÇôֱ½ÓÁË¡£ÏÂÎÄÖУ¬ÎÒÃǽ«»Ø¹ËÒ»ÏÂÕâÁ½ÖÖÇé¿öµÄ´¦Àí·½Ê½²¢ÕÒ³öÒ»¸öºÏÊʵĽâ¾ö·½°¸¡£
Õý³£Çé¿öÏ£¬µ±ÄãÏë´Ó MXML ×é¼þÖзÖÅÉÒ»¸öʼþʱ»áʹÓÃÈçϵÄÔªÊý¾Ý±êÇ©£º
<!-- дÔÚÄ ......
ÔÚeclipseÖÐн¨ÁËÒ»¸öwebÏîÄ¿ È»ºóÔÚwebÏîÄ¿ÖÐÏëÌí¼Óflex ¿ª·¢Ç°Ì¨¡£ÔÚwebÏîÄ¿ÃûÉϵã»÷ÓÒ¼ü ----flex project Nature ----- Add flex project Nature ÔÚµ¯³öµÄ¶Ô»°¿òÖÐ ÉèÖÃÈçͼ£º
È»ºó µã»÷ next
Flex WAR file £º Ñ¡Ôñ ÄãµÄblazeds µÄ·¾¶ È»ºóµã»÷ Finish
½á¹û ÏîÄ¿ÏÔʾº ......