Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Flex£ºÊ¹ÓÃ@EmbedǶÈëÔªËØ

¿ÉÒÔÔÚFlexÓ¦ÓóÌÐòÖÐǶÈë¸÷ÖÖÔªËØ¡£±»Ç¶ÈëµÄÔªËؽ«±àÒë½øSWFÎļþ¡£ËüÃDz»ÊÇÔÚÔËÐÐʱÔØÈëµÄ£¬ËùÒÔ²»±ØΪӦÓóÌÐò²¿ÊðÔ­ÔªËØ¡£
 
¿ÉÒÔǶÈëµÄͼÏñ¸ñʽÓÐPNG¡¢JPEG¡¢GIF¡£Ç¶Èëºó¿ÉÒÔͬʱʹÓÃËüµÄ¶à¸öʵÀý¡£
ÏÂÃæµÄÀý×ÓʹÓÃ[Embed]Ô­±êÇ©¾­imageǶÈëÓ¦ÓóÌÐò£¬²¢ÇÒ²ÉÓðó¶¨ActionScriptÀàµÄÐÎʽ¡£Õâ¾Í¿ÉÒÔ°ó¶¨Image¿Ø¼þµÄsourceÊôÐÔµ½LogoÀà¡£¿ÉÒÔ°ó¶¨LogoÀൽÈκοÉÒÔʹÓÃimageµÄ×é¼þÊôÐÔÉÏ£¬±ÈÈçButton¿Ø¼þµÄiconÊôÐÔ¡£
Àý×Ó£º
<?xml version="1.0" encoding="utf-8"?>
<!-- http://yecon.blog.hexun.com/29628260_d.html -->
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    viewSourceURL="src/EmbeddingImages/index.html"
    layout="horizontal" width="350" height="250">
    
    <mx:Script>
        <![CDATA[
            [Embed(source="assets/logo.png")]
            [Bindable]
            public var Logo:Class;            
        ]]>
    </mx:Script>
    <mx:Image id="myLogo" source="{Logo}"/>
    <mx:Image id="myLogo2" source="{Logo}"/>
</mx:Application>
-----------------------------------------------------------------
Èç¹ûÏëֻʹÓÃÒ»¸öʵÀýµÄ»°£¬¿ÉÒÔʹÓÃÄÚ²¿@EmbedÖ±½Ó½«Í¼ÏñǶÈëFlexÓ¦ÓóÌÐò¡£
ÏÂÃæµÄÀý×ÓÌí¼ÓÁËÒ»¸öImage×é¼þ£¬²¢ÇÒʹÓÃ@EmbedÖ±½Ó¶¨ÒµÁËËüµÄsourceÊôÐÔ¡£ÒªÊ¹ÓÃÏàͬµÄimage£¬¾Í±ØÐëÔٴν«´ËimageǶÈëµ½ÄǸö×é¼þÖС£
Èç¹ûÏëÏÔʾһ¸öǶÈëimageµÄ¶à¸öʵÀý£¬¿ÉÒÔÓÃ[Embed]Ô­±êÇ©´úÌæ¡£
Àý×Ó£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
<!-- http://yeco


Ïà¹ØÎĵµ£º

ÔÚflash builderµÄ´¿actionscript¹¤³ÌÖе¼Èëflex×é¼þ

flashbuilderÖпÉÒÔ½¨Á¢flex¹¤³ÌÓëactionscript¹¤³Ì.
flex¹¤³ÌÄÚ¿ÉÒÔʹÓÃmxmlÊÇÍê³ÉÉè¼Æ¹¤×÷.
actionscript¹¤³Ì½¨Á¢Ê±Ä¬ÈÏÖ»ÓÐ:
playerglobal.swc
flex.swc
utilities.sec
playerglobal.swc
Õ⼸¸öÀà¿â.ûÓÐframework.swc,¾ÍÎÞ·¨Ê¹ÓÃButtonµÈ¿Ø¼þÁË.
½â¾ö·½°¸ÊÇ actionscript¹¤³ÌÖмÓÈëframework.swc.
·¾¶ÊÇ x:/A ......

Bug!Flex֡Ƶ×Ô¶¯1000!

ÓÃFlex4¼ÓÔØFlex3µÄ×é¼þʱ£¬·¢ÏÖÁËÕâ¸öÎÊÌ⣺
µ±ÓÃsparkÌí¼ÓÒ»¸ömx×é¼þʱ²»»áÓÐÎÊÌ⣬µ«µ±Õâ¸ömx×é¼þÖл¹ÓÐÆäËû×é¼þ
ÀýÈç<mx:HBox><mx:Canvas/></mx:HBox>±»Ìí¼Óµ½<s:Group></s:Group>
(×¢£ºÍ¨¹ýAS´úÂëʹÓÃaddElement()Ìí¼Ó£¬¶ø²»ÊÇÖ±½Óдµ½mxmlÖÐ)
stage.frameRate»á˲¼ä´ïµ½1000£¡
Ö® ......

Flex LogÄ£¿éÈëÃż°À©Õ¹

£¨Ò»£©ÈëÃÅ
Flex¼¯³ÉÒ»¸öLog¿ò¼Ü£¬¿ÉÒÔÍê³ÉºÜ¶àÓÃtrace()×ödebugʱÍê³É²»Á˵ŦÄÜ
Êä³ölogʱ¿ÉÒÔʵÏֵַȼ¶£¨¹²5+1¼¶£©£¬ÓùýÂËÆ÷Ö¸¶¨Êä³öµÄÀ࣬ÒÔ¼°Êä³ö·½Ê½£¨Ä¬ÈÏΪtrace£©
ÐèÒªÓõ½µÄÀà
¸ÃÀàλÓÚmx.logging°üÖУ¬
¹²ÐèÒªÈý¸öÀàºÍÒ»¸ö½Ó¿Ú
mx.logging.Log – Ö÷À࣬Óм¸¸ö¾²Ì¬·½·¨£¬Ìí¼Ó/ÒƳýTraceTargetºÍ»ñÈ ......

Flex±à³Ì×¢ÒâÖ®Flex Complier²ÎÊý

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±à³Ì×¢ÒâÖ®Flex Complier²ÎÊý

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ