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
Ïà¹ØÎĵµ£º
¡¾±àÒë²ÎÊý¡¿
-default-background-color int
-default-frame-rate int
-default-size width height
ÉèÖÃSWFµÄ±³¾°É«£¬Ö¡ÆµÓë¿í¸ß£¬Õâ¸öÒ²¿ÉÒÔͨ¹ýÔª±êÇ©ÉèÖã¬ÖîÈç
[SWF(width="720",height="560",backgroundColor="#000000")]
-default-script-limits
-max-recursion-depth
-max-execution-time
¶¨ÒåÓ¦Óýű¾³ÌÐ ......
XMLºÍActionScriptÔÚ´´½¨×é¼þ·½Ãæ¸÷ÓÐÓÅȱµã£º
ÔÚ´´½¨¸´ºÏ×é¼þʱ£¬MXML¿ÉÒÔʱ´´½¨¹ý³Ì±äµÃºÜÈÝÒ×£¬²¢ÇÒ·½±ãÓÚ¶Ô×ӿؼþ½øÐв¼¾Ö¡£
ÔÚÐÞ¸Ä×é¼þÐÐΪʱ£¬ÎÒÃÇ¿ÉÒÔÓÃActionScriptÀ´ÐÞ¸ÄËûÃǵķ½·¨¡£
´ó¶àÊýʱºò£¬ÎÒÃÇ»áʹÓÃMXMLºÍActionScript½áºÏµÄ·½Ê½À´´´½¨Flex×é¼þºÍÓ¦Óá£
FlexÌṩÁ˶àÖÖ·½Ê½À´½áºÏʹÓÃMXMLºÍActionS ......
ÔÚÓ¦ÓÃÖУ¬ºÜ¶à¶¼ÏëʵÏÖflexµÄ¿Ø¼þûÓйö¶¯ ¶øÊÇͨ¹ýÆäËûµÄ°´Å¥·½Ê½½øÐпؼþÄÚÈݵĹö¶¯£¬ÕâÑùʵÏֵĿªÊ¼µ±È»ÊÇÒªÉèÖÃhorizontalScrollPolicy="off" verticalScrollPolicy="off"ÁË£¬È»ºóͨ¹ýcontainerµÄhorizontalScrollPosition »òverticalScrollPositionµÄ¼Ó ¼õÀ´ÊµÏÖÄÚÈÝ×óÓÒ¡¢ÉÏϹö¶¯¡£Ë¼Â··½·¨ÍêÈ«ÕýÈ·£¬µ«ÊÇÔÚÕâÑùµÄÇ ......
Flex ÖпÉÄܵ¼ÖÂÄÚ´æй¶µÄµØ·½
ÊÕ¼¯Á˲»ÉٵĻᵼÖÂÄÚ´æ鶵ÄÇé¿ö£º
ʼþ¼àÌý£º
¶Ô¸¸¼¶¶ÔÏó¼ÓÁ˼àÌýº¯Êý£¬»áÔì³ÉÄÚ´æй¶£¬Àý£º
override protected function mouseDownHandler(…):void
{
systemManager.addEventListener(“mouseUp”, mouseUpHandler);
......
½â¾ö£º
ÔÚÏú»Ù¶ÔÏóµÄʱºò£ ......
Ç°ÑÔ
×î½ü£¬Õý½ß˹µ×ÀïµØÖع¹flex¼¼Êõƽ̨¿ª·¢µÄ²úÆ·¡¾wizBuilder CS¡¿¡£ÒÔǰΪ¸Ï¹¦ÄÜ£¬½çÃ沿·Ö´úÂ붼дµÃºÃÂÒ£¬ÏÖÔÚÊÇʱºòÐÞÀíÏÂ×Ô¼º×÷µÄÄõÁË£¬Ë³±ãΪ²úÆ·Ìí¼Ó¶àÓïÑÔÖ§³Ö(Localization)¡£
Ö÷ÒªÈÎÎñ
´úÂëÖع¹
¶àÓïÑÔÖ§³Ö
Ìí¼Óй¦ÄÜ¡¢ÐÞ¸ÄÏÖÓй¦ÄÜ¡¢È¥µô²»ºÏÀíµÄ¹¦ÄÜ
ÐÞÕýÖع¹¹ý³ÌÖз¢ÏÖµÄ ......