ÔËÐÐÎÒÃǵĵÚÒ»¸öFlex³ÌÐò
ÔÚ¹Ù·½ÍøÕ¾adobeÉÏ¿ÉÒÔÏÂÔص½±àдFlex³ÌÐòµÄ»ù±¾¹¤¾ß,Ê×ÏÈÎÒÃÇ»¹ÊÇÔËÓÃtextµÄ·½Ê½À´¿ª·¢ÎÒÃǵĵÚÒ»¸ö³ÌÐò£¬²¢ÇÒ½¨ÒéÔËÓÃAnt¹¤¾ßÀ´²¿ÊðÔËÐÐÎÒÃǵijÌÐò¡£¾ßÌåÇé¿öÈçÏ£º
ÉèÖû·¾³±äÁ¿path=D:\FreeFlex\sdks\3.2.0\bin
ÎļþÃû³Æ£ºmxmlc HelloWorld.mxml
mxmlc -keep-generated-actionscript HelloWorld.mxml
ÉÏÊöÖ±½ÓÓÃÊÖ¶¯µÄÈ¥²¿Êð£¬Ö»ÓÐÒ»¸öÎļþµÄʱºò£¬»¹¿ÉÒÔ¡£µ«Èç¹ûÄãµÄ¹¤³ÌÓÐÉÏ°Ù¸öÄØ£¿»áºÜÂé·³£¬ÎÒÃÇ»¹ÊÇÓÃAntÕâ¸ö¹¤¾ß°É¡£
¼´Ê¹ÊÇÒ»¸öºÜ¼òµ¥µÄ¹¤³Ì£¬±ÈÈçHelloWorld.mxmlÎļþ£¬Ò²Ó¦¸ÃÑϸñ×ñÕÕÈçϵIJ½Ö裺
1.ÓÃmxmlc±àÒëÆ÷°ÑHelloWorld.mxmlÎļþ±àÒëΪ.swfÎļþ
2.´´½¨Ò»¸öHTMLÎļþ°ü
3.´´½¨Ò»¸öHelloWorld½«Òª·¢²¼µ½WEB·þÎñÆ÷ÉϵÄ·¾¶
4.È»ºó°Ñ.swfÎļþ¿½±´µ½µÚ3²½Ëù´´½¨µÄ·¾¶
ÓÃantÓïÑԹ淶°ÑÉÏÊöµÄ²½ÖèʵʩÈçÏ£º
<project name="HelloWorld" default="compile">
<property name="flex.mxmlc" location="D:\FreeFlex\sdks\3.2.0\bin\mxmlc.exe"/>
<property name="dest.dir" value="bin"/>
<target name="init">
<delete dir="${dest.dir}"/>
<mkdir dir="${dest.dir}"/>
<attrib file="${dest.dir}"/>
</target>
<target name="compile" depends="init">
<exec executable="${flex.mxmlc}" failonerror="true">
<arg line="-output '${dest.dir}/HelloWorld.swf'"/>
<arg line="HelloWorld.mxml"/>
</exec>
</target>
</project>
ÔËÓÃAntÀ´¹¹½¨ÎÒÃÇÐèÒªµÄbuild.xmlÎļþ¼´¿É.
C:\Documents and Settings\Administrator\×ÀÃæ\Flex3MDmodel\FlexPractice1>ant
Buildfile: build.xml
init:
[delete] Deleting directory C:\Documents and Settings\Administrator\×ÀÃæ\Flex
3\CMD model\FlexPractice1\bin
[mkdir] Created dir: C:\Documents and Settings\Administrator\×ÀÃæ\Flex3CMD
model\FlexPractice1\bin
compile:
[exec]
Ïà¹ØÎĵµ£º
eclipseÒ»¸öÏîÄ¿ÖÐͬʱ¿ª·¢flexºÍj2eeµÄ»·¾³ÅäÖÃ
ÒòΪ¹¤×÷ÐèÒª£¬Ñ§ÁËÒ»ÖÜflex½ñÌ쿪ʼÑо¿Óë·þÎñÆ÷ͨÐÅ£¬Ñ¡ÔñÁËÃâ·ÑµÄBlazeDS¡£ÓÉÓÚ֮ǰ×öÏîÄ¿ÓõÄÊÇeclipse europa£¬¾Í°Ñflex builder 3 pluginÖ±½Ó°²×°µ½ÔÓеÄeclipseÉÏÁË£¬ÕâÑùÔÙÅäÖõÄʱºò¿Í»§¶Ë±à³ÌÓõÄflexºÍ·þÎñÆ÷¶ËµÄJ2EE¾ÍÄÜÕûºÏµ½Ò»¸ö¹¤³ÌÏÂÁË£¬Ï£Íû¶ÔÓÚÔÝʱÓÉjs ......
֮ǰһֱûÔÚÒ⸸ÈÝÆ÷ºÍ×ÓÈÝÆ÷¸÷×ÔµÄÉú³É´ÎÐò£¬ÖªµÀÔÚÏîÄ¿ÖÐÓöµ½Ò»ÖÖcase:³õʼ»¯½çÃæʱ¸¸ÈÝÆ÷³õʼ»¯µÄÄÚÈÝÓÉ×ÓÈÝÆ÷Ïȳõʼ»¯ÔÙ´¥·¢£¬µ«ÊǸ¸ÈÝÆ÷±ØÐëÔÚ³õʼ»¯Ê±¾ÍÒѾ¼ÓÉÏÁ˶Ô×ÓÈÝÆ÷µÄ¼à¿Ø¡£Õâ¾ÍÔì³ÉÒ»¶Ôì¶Ü£¬¼ÈÏëÏÈÉú³É×ÓÈÝÆ÷ÓÖÏëÏÈÉú³É¸¸ÈÝÆ÷¡£
ÏÈ×Ô¼ºÐ´¶Î´úÂë²âÊÔÒ»ÏÂÉú³É˳Ðò£¬¸¸ÈÝÆ÷
<?xml version="1.0" ......
£¨Ò»£©ÈëÃÅ
Flex¼¯³ÉÒ»¸öLog¿ò¼Ü£¬¿ÉÒÔÍê³ÉºÜ¶àÓÃtrace()×ödebugʱÍê³É²»Á˵ŦÄÜ
Êä³ölogʱ¿ÉÒÔʵÏֵַȼ¶£¨¹²5+1¼¶£©£¬ÓùýÂËÆ÷Ö¸¶¨Êä³öµÄÀ࣬ÒÔ¼°Êä³ö·½Ê½£¨Ä¬ÈÏΪtrace£©
ÐèÒªÓõ½µÄÀà
¸ÃÀàλÓÚmx.logging°üÖУ¬
¹²ÐèÒªÈý¸öÀàºÍÒ»¸ö½Ó¿Ú
mx.logging.Log – Ö÷À࣬Óм¸¸ö¾²Ì¬·½·¨£¬Ìí¼Ó/ÒƳýTraceTargetºÍ»ñÈ ......
http://www.k-zone.cn/zblog/post/flex-compiler-parameter.html
ÏÂÃæµÄÁбíÌṩÁËmxmlcµÄһЩ¿ÉÑ¡²ÎÊý£º
ÊôÐÔ
ÃèÊö
accessible=true|false
ÊÇ·ñ¾ßÓпÉÀí½âÐÔ
actionscript-file-encoding
ÉèÖÃÎļþ±àÂë
advanced | mxmlc -help advanced
¼ìË÷mxmlc¸ß¼¶²ÎÊý
allow-source-path-overlap=true|false
ÑéÖ¤source-pat ......
Ç°Ò»ÕóÔÚÂÛ̳ÉÏ¿´µ½Ò»¸öÐֵܣ¬ÏëÔÚFlex ChartÖÐΪͼÀýÉèÖÃ3DЧ¹û,½ü¼¸Ìì²éÕÒÁËЩ×ÊÁÏ£¬¶¯ÊÖ×öÁ˸öDEMO¹©´ó¼Ò²Î¿¼!
DEMOÑÝʾµØÖ·http://xingjunli.webs.com/flash/flexChartDemo.swf,ÏÈÀ´¸öͼƬ¿´¿´×îÖÕЧ¹û:
Ïà¹Ø֪ʶµã
1¡¢Í¼±íʹÓÃµÄ ......