ActionScript 3 ºÍ Flex¿ò¼ÜµÄÐÔÄÜÓÅ»¯
¼¸ÈÕǰ±»ÀÏ×ÜÍÆ¼öÎÄÕÂһƪ£¬À´×Ô7yueÐÖµÄblog,×÷ÕßÊÇSean Moore ,
ÔÎĵØÖ·£ºhttp://www.insideria.com/2009/04/51-actionscript-30-and-flex-op.html
ÓëÆäÔÚ³ÌÐòдÍêÁËÖ®ºóÓ·Ö×µÃÅܲ»¶¯£¬²»ÈçÆ½Ê±×¢ÒâÕâЩ¹Ø¼üµã£¬Ê±Ê±ÌáÐÑ×Ô¼º¡£·Òë³öÀ´£¬ÒÔ±ãÒÔºóʱʱ²éÔÄ¡£
1 ´´½¨ÐÂÊý×éʱ±ÜÃâʹÓÃËüµÄ¹¹Ô캯Êý¡£
ÕâÑù×ö£ºvar a = [];
¶ø²»ÒªÕâÑù×ö£ºvar a = new Array();
2 ´´½¨Êý×éÊÇÒ»¸öÏûºÄÁ¿ºÜ´óµÄ²Ù×÷£¬ËùÒÔÇë½÷É÷½øÐÐÒÔÏÂÀàÐ͵IJÙ×÷£º
var vanityCollection01 : Array = new Array();
var vanityCollection02 : Array = new Array();
var vanityCollection03 : Array = new Array();
var vanityCollection04 : Array = new Array();
3 ¸´ÖÆÒ»¸öÊý×é×î¿ìµÄ·½Ê½ÊÇ£º
var copy : Array = sourceArray.concat();
4 ÎÞÂÛÄãÓÃÄÄÖÖ·½Ê½£¬ÎªÊý×éµÄÔªËØÉèÖÃÖµ¶¼ÊÇÒ»¸öÂýµÄ²Ù×÷¡£
employees.push( employee );
employees[2] = employee;
5 ÔÚÊý×éÖлñµÃÒ»¸öÖµµÄËÙ¶ÈÊÇÉèÖÃÒ»¸öÖµµÄ¶þ±¶¡£
var employee : Employee = employees[2];
6 ½«ÊôÐÔº¯ÊýÉèÖÃΪ¾²Ì¬º¯Êý£¬ÕâÑùÄãÔÚʹÓÃËüµÄʱºò¾Í²»ÓÃʵÀý»¯Ò»¸ö¸ÃÀàµÄ¶ÔÏó¡£
StringUtils.trim( "text with space at end " );
ÀඨÒå:
package
{
public final class StringUtils
{
public static function trim( s : String ) : String
{
var trimmed : String;
// Â߼ʵÏÖ´úÂë
return trimmed;
}
}
}
7 ʹÓó£Á¿¹Ø¼ü×ÖconstÀ´¶¨ÒåÄÇЩÔÚ³ÌÐòÔËÐÐÖÜÆÚÄÚ¶¼²»»á·¢ÉúÖµ¸Ä±äµÄÊôÐÔ¡£
public const APPLICATION_PUBLISHER : String = "Comp
Ïà¹ØÎĵµ£º
³õѧflex£¬Óöµ½Ò»¸öÎÊÌâ‘ÔÚdatagridµÄÒ»ÁÐÖÐÀûÓÃËüµÄֵת»»ÏÔʾ²»Í¬µÄͼƬ’£¬ÔÚÍøÉÏËÑÁËËÑÎÊÁËÎÊ£¬½â¾öÁ˰¥,½â¾ö°ì·¨Ìù³öÀ´£¬Ï£Íû¶ÔÆäËûÈËÓаïÖú£¬
ÀûÓÃdatagridµÄlabelFunction½â¾öµÄ£¬ÈçÏ£º
ÔÚdatagridµÄ
<mx:DataGridColumn dataField="level" labelFunction="formatiImg"/>
/* ......
µÚÒ»²½£º *.mxmlÎļþÖÐ
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"
creationComplete="playLoad()" color="#0F7085" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]">
<m ......
À´Ô´£ºhttp://blogs.adobe.com/tomsugden/2009/12/writing_genuinely_reusable_fle.html
ÔÚÆóÒµµÄ´óÏîÄ¿À¾³£ÒªÎªFlex Àà¿âдһϵÁпÉÖØÓõÄ×é¼þ¡£ÀíÂÛÉÏһЩÏàͬµÄ×é¼þ¿ÉÒÔÖØ¸´ÓÃÔÚ²»Í¬µÄÄ£¿éºÍ×ÓÄ£¿éµÄFlex »ò AIR ³ÌÐòÖУ¬´øÀ´Ò»ÖÂÐԺͿìËÙ¿ª·¢µÄºÃ´¦¡£È»¶øÔÚʵ¼ÊÖУ¬´æÔÚЩ´íÎóÓ÷¨ÏÞÖÆÁË×é¼þµÄÖØÓÃÐÔ¡£±¾ÎÄÕ½âÊÍÊ ......
1¡¢¿ª·¢»·¾³£ºÔÚmyeclipse7.0ÖÐÕûºÏflex plup3.0, °²×°flex plup3.0ʱ,Ñ¡myeclipse ÖÐeclipseµÄĿ¼£¬È»
ÕÒµ½flex µÄ°²×°ºÃµÄĿ¼£¬½«pluginsºÍfeatures¶ÔÓ¦µ½¿½µ½myeclipseÀïÃæ eclipseÏàÓ¦µÄĿ¼Ï¡£
2¡¢´´½¨ flexºÍ java (Web)µÄ¹¤³Ì(ͨÐÅ¿ò¼ÜÓÃblazeds.war)£º
&nb ......
²âÊÔÆäʵûÓÐÌ«¶àµÄ¿É±È½ÏÐÔ£¬ÎÒÖ÷ÒªÏë±È½ÏÏ໥֮¼ä¶ÔÊý¾Ý·ÃÎʵÄËٶȺÍÊý¾Ý´«Êä´óСµÄ±È½Ï,FlexµÄÐÔÄÜÉϳöºõÎÒµÄÒâÁÏÖ®Íâ
ÎÒ²ÉÓõÄÊÇFlexÖ±½Ó·ÃÎÊJava·þÎñ£¬ºÍSilverlight ·ÃÎÊwebservice
´ÓͬÑùµÄSQLÓï¾äµÃµ½µÄÊý¾Ý´óС¿´£¬flex¶ÁÈ¡Êý¾ÝÁ÷Á¿µÄ±ÈsilverlightС5±¶£¬ÔÒòÊÇflex·ÃÎÊÊý¾Ýʱ¶ÔÊý¾Ý½øÐÐÁËѹËõ
´ÓÏÔʾÊý¾ÝµÄÐÔ ......