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

Flex ×Ö·û´®´¦Àí»ã×Ü


1.Á¬½Ó×Ö·û´®:Á¬½Ó×Ö·û´®Ö¸Á½¸ö¼°Á½¸öÒÔÉϵÄ×Ö·û´®ºÏ²¢³ÉΪһ¸ö×Ö·û´®.
1.1."+"²Ù×÷·ûÁ¬½Ó×Ö·û´®
¸ñʽ:×Ö·û´®1+×Ö·û´®2+...;
//½á¹ûΪ"Thisworks"
var example:String="This"+"works";
//½á¹ûΪ"There are 24 people"
var attendance:int=24;
var output:String="There are "+attendance+" people";//ÔÚÕâÀï±àÒëÆ÷»á°Ñattendance×Ô¶¯×ª»»Îª×Ö·û´®.
µ«ÊÇ+ºÅÁ½±ß¶¼ÊÇÊý×ÖÀàÐ;ÍÐèҪǿÖÆת»»ÀàÐͺó²Å¿ÉÏà¼Ó.
1.2."+="²Ù×÷·ûÁ¬½Ó×Ö·û´®:±íʾÏȽøÐÔÁ¬½Ó²Ù×÷È»ºóÔٰѽá¹û¸³¸øµÚÒ»¸ö×Ö·û´®.
¸ñʽ:×Ö·û´®+=×Ö·û´®2+×Ö·û´®3+...;
var s1:String="11";
trace(s1+="22"+"33"); //ÏÔʾ"112233"
2.תÒå×Ö·û
×Ö·ûÃû
תÒå×Ö·û
ÐÂÐзû
\n
Tab·û
\t
»ØÍË·û
\b
ÖƱí·û
\f
»Ø³µ·û
\r
3.ËÑË÷Æ¥ÅäµÄ×Ö·û´®:ʹÓÃindexOf»òlastIndexOf·½·¨
3.1.˳ÐòËÑË÷×Ö·û´®indexOf:´ÓÖ¸¶¨×Ö·û´®¿ªÊ¼Ï±꿪ʼÍùºóËÑË÷×Ö·û´®,ÈôÕÒµ½Ôò·µ»ØµÚÒ»¸öÆ¥ÅäµÄ×Ö·û´®Î»Ö÷ñÔò·µ»Ø-1.
 ¸ñʽ:×Ö·û´®Ãû.indexOf(ÒªËÑË÷µÄ×Ö·û´®,¿ªÊ¼µÄϱê);  //¿ªÊ¼Ï±êĬÈÏΪ0
var example:String="This string contains the word cool twice.very cool."
var index:int=example.indexOf("cool",0);
if(index!=-1)
{
    trace("cool index"+index);//ÏÔʾΪ:cool index 30
}
3.2.ÄæÐòËÑË÷×Ö·û´®lastIndexOf
¸ñʽ:×Ö·û´®Ãû.indexOf(ÒªËÑË÷µÄ×Ö·û´®,×Ö·û´®½áÊøµÄλÖÃ);
 4.   È¡×Ö·û´®µÄ×Ó´®
4.1 substr·½·¨:´Ó¿ªÊ¼Ï°àÆ÷½ØÈ¡Ò»¶¨³¤¶ÈµÄ×÷Ϊ×Ó´®.
¸ñʽ:×Ö·û´®Ãû.substr(¿ªÊ¼Ï±ê,×Ó´®³¤¶È);
Code
var example:String="bunnies";
trace(example.substr(0));//ÏÔʾ:bunnies
trace(example.substr(0,3));//ÏÔʾ:bun
trace(example.substr(3,3));//ÏÔʾ:nie
trace(example.substr(-1));//ÏÔʾ:s
trace(example.substr(-2,5));//ÏÔʾ:es
4.2 substring·½·¨:´Ó¿ªÊ¼Ï±êÖÁ½áÊøϱêΪֹ½ØÈ¡×Ö·û´®×÷Ϊ×Ó´®.
¸ñʽ:×Ö·û´®Ãû.substring(¿ªÊ¼Ï±ê,½áÊøϱê);
var example:String="rabbits";
trace(example.substring(0,3));//ÏÔʾ:rabb
4.3.slice·½·¨:Óësubstring·½·¨¹¦ÄܺͲÎÊýÒ»Ñù,µ«ÊÇÓÐÁ½µãÇø±ð:1.substring·½·¨µÄ²ÎÊýÈç¹ûΪ¸ºÊý»á×Ô¶¯×ª»¯Îª0,¶øslice·½·¨Ôò»á¿´³Éµ¹ÊýµÚ¼¸¸ö.
 &nbs


Ïà¹ØÎĵµ£º

FLEXѧϰ½¨Òé[ת]

Ô­Ìû£ºhttp://hi.baidu.com/flex2/blog/item/3501c1622af2b1dde6113aef.html
ÏÖÔÚ²»ÉÙÈË¿ªÊ¼¹Ø×¢²¢Ñ§Ï°FlexÁË£¨ÖÁÉÙ±ÈÒÔÇ°¶àÁË£©£¬µ«ÊÇÏÖÔÚ¹ØÓÚFlexµÄ×ÊÁϲ¢²»¶à£¬¹úÄÚµÄ×ÊÁϾ͸üÉÙÁË£¬¶øÇÒFlexµÄÂÛ̳ÈËÆø¶¼²îµÄºÜ£¬Ò»ÑÛÍûȥȫ¶¼ÊÇÌáÎÊÌû×Ó£¬»ØÌû³¬¹ý5¸öµÄÁÈÁÈÎÞ¼¸£¬²Ò²»È̶ð¡¡£ÎÒ·­ÒëһЩ¶«Î÷Ò²ÊÇΪÁËÔö¼ÓÖÐÎÄѧϰ×ÊÁÏ£¬ ......

¹ØÓÚflexÔÚ×öÏîÄ¿ÖÐÓöµ½µÄÎÊÌâ

×î½üÓÃflexÀ´×öÒ»¸ö¹¤×÷Á÷¶¨Òå±à¼­Æ÷¡£ÔÚÍøÉÏÕÒÁ˺ܶàÀý×Ó£¬Ò²Ñ§µ½Á˲»ÉÙ¶«Î÷¡£
flexÊÇadobe¹«Ë¾³öµÄ¶ÔÓÚflashµÄÒ»¸ö²úÆ·¡£¶ÔÓÚѧ¹ýjavaµÄÈËÀ´ËµÔÙ¼òµ¥²»¹ýÁË¡£ÕâÀïÒ²²»¶à˵ÁË£¬¾Í¶ÔÓÚÕ⼸ÌìÔÚÏîÄ¿ÖÐÓöµ½µÄÎÊÌâ̸һÏÂ×Ô¼ºµÄ½â¾ö·½·¨ÓëÈÏʶ¡£
Ò»¡¢flexÖн«×Ô¼ºµÄÒ»¸öCanvas±ä³ÉΪͼƬ£¬±£´æµ½±¾µØ¡£
 var bitmapData ......

Flex ¿ª·¢¸¨Öú¹¤¾ß Flex Explorer(4ºÏ1)

 Flex3ÑùʽÉè¼Æ¹¤¾ß(Flex  Explorer) ˵Ã÷£º
Flex  Explorer·Ç³£ÊʺϳõѧÕßʹÓã¬Ëû¿ÉÒÔÈÃÄã¿ìËÙÉÏÊÖFLEXÉè¼Æ¡£AIRIA
½« Flex3 component  Explorer ,Flex Style Explorer,Flex Filter Explorer,Flex Primitive Explorer´ò°üÌṩÏÂÔØ¡£ÆäÖРFlex3 component  Explorer
°üº¬ÁËFLEX¾­ ......

Flexʼþ´¦Àí

»ù±¾Ê¼þ´¦Àí
ÓÃÓÚÖ¸¶¨ÎªÏìÓ¦Ìض¨Ê¼þ¶øÓ¦Ö´ÐеÄÌض¨²Ù×÷µÄ¼¼Êõ³ÆΪʼþ´¦Àí¡£ÔÚ±àдִÐÐʼþ´¦ÀíµÄ ActionScript ´úÂëʱ£¬ÄúÐèҪʶ
±ðÈý¸öÖØÒªÔªËØ£º
• ʼþÔ´£º·¢Éú¸ÃʼþµÄÊÇÄĸö¶ÔÏó£¿ÀýÈ磬Äĸö°´Å¥»á±»µ¥»÷£¬»òÄĸö Loader ¶ÔÏóÕýÔÚ¼ÓÔØͼÏñ£¿Ê¼þÔ´Ò²³ÆΪʼþÄ¿
±ê£¬ÒòΪ Flash Player »ò AIR ½«´Ë¶ÔÏó×÷Ϊ ......

Êý¾ÝÀàÐÍ˵Ã÷£¨FLEX£©


»ùÔªÊý¾ÝÀàÐÍ°üÀ¨ Boolean¡¢int¡¢Null¡¢Number¡¢String¡¢uint ºÍ void¡£ActionScript ºËÐÄÀ໹¶¨ÒåÏÂÁи´ÔÓÊý¾ÝÀàÐÍ£º
Object¡¢ Array¡¢Date¡¢Error¡¢Function¡¢RegExp¡¢XML ºÍ XMLList¡£ 
Boolean Êý¾ÝÀàÐÍ 
Boolean Êý¾ÝÀàÐÍ°üº¬Á½¸öÖµ£ºtrue ºÍ false¡£¶ÔÓÚ Boolean ÀàÐ͵ıäÁ¿£¬ÆäËüÈκÎÖµ¶¼ÊÇÎÞЧµÄ¡£Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ