flex ÓÅ»¯¼¼ÇÉ ÊÕ¼¯[ÌáÉýÐÔÄÜ]
1¡¢µ±´´½¨Ò»¸öÊý×éµÄʱºò±ÜÃâÓÃnew²Ù×÷·û,Óà var a:Array = [];¶ø²»ÓÃvar a:Array = new Array();
2¡¢¿ìËٵĸ´ÖÆÒ»¸öÊý×飺
var copy : Array = sourceArray.concat ();
3¡¢ÉèÖÃÒ»¸öÊý×éµÄÖµÊǷdz£Ã¦µÄ£º
employees.push ( employee ); employees[2] = employee;
4¡¢´ÓÒ»¸öÊý×éÖÐÈ¡µÃÖµµÄËÙ¶ÈÊÇÉèÖÃÒ»¸öÊý×éÖµµÄÁ½±¶¿ì£º
var employee : Employee = employees[2];
5¡¢µ±²»ÐèÒªÒ»¸öÀàµÄʵÀýµÄʱºò¾¡Á¿Óþ²Ì¬µÄÊôÐÔ»ò·½·¨£º
package
{
public final class StringUtils
{
public static function trim(s:String):String
{
var trimmed:String; // implementation...
return trimmed;
}
}
}
6¡¢ÔÚÕû¸ö³ÌÐòµÄÉúÃüÖÜÆÚÖж¼²»»á¸Ä±äµÄ±äÁ¿ÓÃconst¶¨Òå³£Á¿£º
public const APPLICATION_PUBLISHER : String = "Company, Inc. ";
7¡¢µ±Ò»¸öÀ಻ÐèÒªÓÐ×ÓÀàµÄʱºòÓ¦¸Ã½«¸ÃÀàÉùÃ÷ΪfinalÀàÐ͵ģº
public final class StringUtils
8¡¢±äÁ¿ºÍ·½·¨µÄ³¤¶ÈÔÚAs3Öв¢²»Ó°ÏìʲôÐÔÄÜ£¬µ«ÔÚ±ðµÄÓïÑÔÖпÉÄܾÍÓÐÓ°Ï죺
someCrazyLongMethodNameDoesntReallyImpactPerformanceTooMuch();
9¡¢½«Óï¾äдÔÚÒ»ÐÐÉÏÃæ²¢²»»áÓ°ÏìAS3³ÌÐòµÄÐÔÄÜ£¬µ«ÔÚ±ðµÄÓïÑÔÖÐÈ´ÓÐÓ°Ï죺
var i=0; j=10; k=200;
10¡¢ÔÚÄÚ´æÕ¼ÓÃÉÏÃæifÓï¾äºÍswitchÓï¾ä²¢Ã»ÓÐÊ²Ã´Çø±ð:
Óï¾ä£º
if ( condition ) {
// handle condition
}
ºÍÓï¾ä£º
switch ( co
Ïà¹ØÎĵµ£º
Ô´xmlÎļþ
<?xml version="1.0" encoding="iso-8859-1"?>
<books>
<stock>
<name>The Picasso Code</name>
<author>Dan Blue</author>
<category>Fiction</category>
<description>Cubist paintings reveal a secret society of people ......
×î½üÔÚÏîÄ¿ÖÐÒªÓõ½flv²¥·ÅÆ÷£¬ÓÉÓÚflex×Ô´øµÄVideoDisplay×é¼þ²»ÊǺܺÃÓ㬾Í×Ô¼º¼òµ¥ÊµÏÖÁËÒ»¸ö£¬½çÃæ²»ÊǺÜÃÀ¹Û£¬µ«¹¦Äܶ¼ÓÐÁË£¬Õý¿ÉνÂéȸËäСÎåÔà¾ãÈ«¡£ÏÂÃæÊDz¥·ÅÆ÷µÄ´úÂ룬»¹²»»áÓÃflash×öflv²¥·ÅÆ÷µÄÅóÓÑ£¬¿ÉÒԲο¼²Î¿¼¡£
Player.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="ht ......
Á˽âFlex³ÌÐòµÄÉúÃüÖÜÆÚ
Flex³ÌÐò´Ó±¾ÖÊÉϽ²£¬¾ÍÊÇʹÓÃÁË£¨ÓÉAS±àдµÄ£©Flex¿ò¼ÜµÄFlash³ÌÐò¡£
µ«ÔÚFlex³ÌÐòÖпÉÒÔºöÂÔtimelineÕâ¸ö¸ÅÄËùÓеÄÄÚÈݶ¼¼¯ÓÚÒ»Ö¡¡£
ÊÂʵÉÏFlex³ÌÐòÖеĸù£¬ÊǼ̳Ðflash.display.MovieClipµÄmx.managers.SystemManager¡£
SystemManagerÓÐÁ½Ö¡¡£µÚÒ»Ö¡ÊÇÔ¤¼ÓÔØ³ÌÐò£¬µÚ¶þÖ¡ÊÇÖ÷³ÌÐò¡£
Òò´Ë ......
ÔÚflex ¿ª·¢ÏîÄ¿ÖУ¬ºÜ¶à¶¼»áʹÓÃModuleÀ´¼õÉÙapplication¼ÓÔØ¹ý´óµÄÎÊÌâ¡£ModuleҲȷʵ½â¾öÁËÕâ¸öÎÊÌâ¡£
µ«ÊÇÔÚʹÓÃModule¹ý³ÌÖÐÐèҪעÒâµÄÒ»µã ·Ç³£¹Ø¼üµÄÒ»µãÄǾÍÊÇ ¶¨ÒåÒ»¸öIModuleInfoµÄʱºò Ò»¶¨Òª¼ÇµÃ°Ñ¶¨Òå³ÉÈ«¾Ö±äÁ¿Å¶¡£²»È»¾Í»á³öÏÖ µÚÒ»´Î¼ÓÔØ²»ÁË ¶þµÚ¶þ´Î µÚÈý´Î¡£¡£¡£¡£¶¼¿ÉÒÔµÄЧ¹û¡£²»×¢ÒâÕâµãÕÒËÀÁ˶¼ÕÒ² ......