Flex ÖÐÐèÒª¼ÇסµÄһЩ¶«Î÷
Ò»¡¢Application³£ÓõÄʼþ
initialize=============>³õʼ»¯
createcomplate==========>ÔªËؼÓÔØÍê
initialize·¢ÉúÔÚcreatecomplate֮ǰ¡£
¶þ¡¢Êý¾ÝÇëÇó˵Ã÷
HTTPService==========>httpÊý¾ÝÇëÇó¡£
SOAP(Simple Object Access Protocal)=======> webService
AMF(Adobe Action Message Format)========>Remote Object
Èý¡¢Httpservice result¸ñʽ
object
xml
flashvars
text
e4x
array
ËÄ¡¢HTTPServiceµÄ´íÎó·µ»Øֵ˵Ã÷
faultDetail´íÎóϸ½Ú£¬faultCode´íÎó´úÂ룬faultString´íÎóÎÄ×ÖÃèÊö¡£
messageÊÇÒÔÉÏÈý¸öÊôÐԵļ¯ºÏ¡£
Îå¡¢×Ô¶¨Òå×é¼þÖеÄÊý¾Ý²»ÒªÖ±½ÓÒýÓø¸ÈÝÆ÷µÄ±äÁ¿ £¬¶øÊÇÒªÔÚ¸¸ÈÝÆ÷Öиø×Ô¶¨Òå×é¼þÉèÖÃÊôÐÔ¡£È磺
¸¸ÈÝÆ÷µÄÒ»¸ö±äÁ¿ÊÇÄܹýhttpserviceÈ¡µÃµÄ£¬ÔÝÇҽРgoodList£¬
ÔÚ×Ô¶¨Òå×é¼þÖÐÒªÉùÃ÷Ò»¸öpublicµÄ±äÁ¿£¬È»ºó°ó¶¨µ½×é¼þÖеÄij¸ö¿Ø¼þÉÏ¡£
public var dataList:ArrrayCollection
<mx:datagrid dataprovider="dataList"/>
ÔÚ¸¸ÈÝÆ÷ÖÐÒýÓÃʱ£º <comp:mycomp dataList="goodList"/>
Áù¡¢ÀûÓñêÇ©µÄÐÎʽ´´½¨×Ô¶¨Òåʼþ
1¡¢Ê×ÏÈÔÚ<metadata>±êÇ©ÖÐÉùÃûʼþ£¬È磺
<mx:MetaData>
(Event(name="clickevent", type="flash.event.Event"))
</mx:MetaData>
2¡¢ÅÉ·¢Ê¼þ¡£
3¡¢Ö±½ÓÔÚmx±êÇ©ÖÐ×öΪÊôÐÔ¼àÌý´Ëʼþ£¬È磺
<mx:datagrid clickevent="clickHandler(event)">
4¡¢ÒªÔÚ×Ô¶¨ÒåʼþÖд«µÝ²ÎÊý£¬ÐèÒªÖØдclone·½·¨£¬È磺
>> ¹¹Ô캯Êý¶¨Òåʼþ·½·¨
clickevent(type:string,param1:string)
>> ÖØдclone·½·¨
override public function clone():Event{
return new clickevent(type,param1);
}
Æß¡¢äÖȾ(ItemRenderer)
1¡¢ÄÚÁªäÖȾµÄд·¨
<mx:datagrid>
<mx:itemrenderer>
<mx:Component>
<mx:Image/> //ÕâÀïÊÇÒªäÖȾµÄÔªËØ
</mx:Component>
</mx:itemrenderer>
</mx:datagrid>
2¡¢¶ÔÓÚ¶ÀÁ¢µÄäÖȾÀ࣬Ҫ¸üÐÂÊý¾Ý£¬¿ÉÒÔÖØдdata·½·¨£¬È磺
override public function set data(value:object)
¿ÉÒÔÓÃÓÚ×Ö¶ÎΪ¿Õʱ£¬ÏÔʾµÄÄÚÈݵÈ
°Ë¡¢¼ì²âͼƬÊÇ·ñ´æÔڵķ½·¨
ÓÃUrlLoader£¬¼àÌýCompleate(ͼƬ´æÔÚ)µÄIOError(ͼƬ²»´æÔÚ)ʼþ£¬²»´æÔÚʱ¿ÉÒÔÓÃĬÈÏͼƬ´úÌæ
¾Å¡¢FB³£Óü¼ÇÉ
ctrl+shift+c ×¢ÊÍMXML´úÂë¶Î£¬¼°as´úÂë¶Î
ctrl+shift+p Ìøתµ½
Ïà¹ØÎĵµ£º
CategoryAxisÓÐÒ»¸ö½Ð×ölabelFunctionµÄÊôÐÔ£¬Õâ¸öÊôÐԵĶ¨Ò壺ָ¶¨Ò»¸öº¯Êý£¬ÓÃÓÚ¶¨ÒåΪCategoryAxisµÄdataProviderÖеĸ÷¸öÏîÄ¿Éú³ÉµÄ±êÇ©¡£
ËùÒÔÐ޸ĵÄÔÀí£º¿ÉÒÔÀûÓÃlabelFunctionµÃµ½Ã¿¸öLabel£¬È»ºóÔÙ¶ÔÆä½øÐÐÐ޸ġ£
Ƭ¶Î´úÂ룺
<mx:horizontalAxis>
<mx:CategoryAxis id="ca"
&nbs ......
<?xml version="1.0"?>
<!-- charts/PredefinedAxisStyles.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<!--[CDATA[
//µ¼ÈëÏà¹Ø°ü
import mx.collections.ArrayCollection;
import mx.charts.*;
import mx.charts.ser ......
MyEclipse FlexµÄÅäÖÃÖ®³õÎÒÃÇ¿´¿´ÔµÓÉ£ºÒ»¿ªÊ¼Ñ§Ï°Ê¹ÓÃFlexµÄʱºò,ÎÒÊÇÓõĵ¥¶ÀµÄFlexBuilder3,×öЩ´¿FlexµÄÓ¦ÓóÌÐò»¹¿ÉÒÔ.µ«ÊÇÈç¹ûÒªºÍJava½áºÏÔÚÒ»ÆðʹÓÃ,¼´ÀûÓÃFLEX³äµ±Ò»¸öÍêÕûµÄJ2EEϵͳµÄWEB²ãµÄ»°,ÄÇôµ¥¶ÀʹÓÃFlexBuilder3ºÍMYECLIPSEÊǺܲ»·½±ãµÄ,´ó´óÓ°ÏìÁË¿ª·¢Ð§ÂÊ,Òò´Ë×öÁËÏÂMyEclipse+FlexµÄÅäÖÃ,´ïµ½Ö±½ÓÔÚ ......
Ê×ÏȽ¨Ò»¸önetbeansµÄjava webÏîÄ¿
È»ºó´ÓÍøÉÏ°Éblazeds.war ÏÂÔØÏÂÀ´ÓÃrar ½âѹ °Ñweb-inf Ìæ»»µôÔÚnetbeans\web ÏÂÃæµÄweb-infÖеÄÈ«²¿Îļþ
È»ºó ²¿ÊðÏÂ
ÔÚ´ò¿ªflex builder н¨Ò»¸öflex project дÉÏÃû×ÖºÍÏîĿ·¾¶
ÔÚApplication server type Ñ¡ÖÐj2ee
µã»÷ ÏÂÒ»²½
È»ºó Root folderÑ¡ÖÐnet ......
ÏÖÔÚ¸»webÓ¦ÓÃÒѾÊǸö´óÇ÷ÊÆ£¬Ô½À´Ô½¶àµÄ´«Í³¿Í»§¶ËÓ¦Óö¼Ïà¼Ì±»webÓ¦ÓÃËùÌæ´ú¡£µ«ÊǼøÓÚwebÓ¦ÓõÄÈõ½»»¥ÐÔ£¬ºÜ¶àÒµÎñ¸ºÔð¡¢ÈË»ú½»»¥Ç¿µÄÓ¦Óô¿js»¹ÊDz»ÄܺܺÃʤÈΣ¬Õâ¿ÖÊÇÄ¿Ç°»¹Óкܶà»îÔ¾csÓ¦ÓôæÔÚµÄÒ»¸öÖ÷ÒªÔÒò¡£Ç°²»¾Ã£¬¹«Ë¾Ò²ÔÚ×ö¼èÄѵÄÑ¡ÔñwebÓ¦ÓÃǰ̨¿ª·¢¿ò¼ÜÑ¡ÐÍÎÊÌ⣬×îº ......