Flex SDK 4(Gumbo)ÃüÃû¿Õ¼ä£¨NameSpace£©¸ÅÊö
±¾ÆªÎÄÕÂÊÇ¡¶Flash Builder 4 beta (Gumbo) UI¡¢¹¦ÄܵÄÐÂÌåÑé¡·µÚÈýƪÎÄÕ£¬×ÅÖؽéÉܵÄFlex SDK 4(Gumbo)ÐÂÔö¼ÓµÄÃüÃû¿Õ¼ä£¨NameSpace£©¡£
ÖÚËùÖÜÖª£¬Flex SDK 4(Gumbo)Ôö¼ÓÁËһЩÃüÃû¿Õ¼ä£¬Çë¿´ÈçÏ£º
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/halo"
xmlns:s="library://ns.adobe.com/flex/spark"
1¡¢xmlns:fx="http://ns.adobe.com/mxml/2009"
¶¨ÒåÁ˶¥¼¶µÄActionScript 3.0һЩ¶¥¼¶µÄ·½·¨¡¢È«¾Öº¯ÊýºÍÈ«¾Ö³£Á¿µÈÄÚÈÝ¡£
ÀýÈçÎÒÃdz£ÓõÄһЩÊý¾ÝÀàÐÍ£ºNumber¡¢int¡¢Boolean¡¢Array¡¢StringµÈ¡£
ÔÚ¡¶Adobe Flex 4 Beta Language Reference¡·ÀïÃæµÄÕâ¸öÁ´½ÓÖлáÓÐÏêϸÃèÊö¡£
¹ØÓÚÕâ¸öÃüÃû¿Õ¼äµÄÄÚÈÝ£¬È«²¿¶¨ÒåÔÚFlash Builder°²×°Ä¿Â¼ÏÂÃæµÄsdks\4.0.0\frameworks\mxml-2009-manifest.xmlÀïÃæ¡£
2¡¢xmlns:mx="library://ns.adobe.com/flex/halo"
ʹÓùýFlex SDK 2 ºÍ Flex SDK 3µÄÅóÓѾͲ»»áÄ°ÉúÁË£¬Õâ¸öÃüÃû¿Õ¼ä£¨NameSpace£©ÀïÃæµÄÄÚÈÝÊÇmx.*ÏÂÃæµÄÈ«²¿ÄÚÈÝ£¬Çë×¢Òâһϣ¬ÆäÖÐhaloµÄÃû×Ö¾ÍÊÇFlex SDK 2 ºÍ Flex SDK 3ÀïÃæĬÈϵÄCSSÑùʽ¡£
¹ØÓÚÕâ¸öÃüÃû¿Õ¼äµÄÄÚÈÝ£¬È«²¿¶¨ÒåÔÚFlash Builder°²×°Ä¿Â¼ÏÂÃæµÄsdks\4.0.0\frameworks\halo-manifest.xmlÀïÃæ¡£
3¡¢xmlns:s="library://ns.adobe.com/flex/spark"
ÕâÊÇFlex SDK 4(Gumbo)ÀïÃæÐÂÔö¼ÓµÄ×é¼þ¿â¡£°üº¬ÁËFlex SDK 4(Gumbo)ÀïÃæÈ«²¿µÄspark.* ºÍ flashx.* packagesÀïÃæµÄ²¿·ÖÄÚÈÝ£¨text framework class£©
¹ØÓÚÕâ¸öÃüÃû¿Õ¼äµÄÄÚÈÝ£¬È«²¿¶¨ÒåÔÚFlash Builder°²×°Ä¿Â¼ÏÂÃæµÄsdks\4.0.0\frameworks\spark-manifest.xmlÀïÃæ¡£
ÆäÖеÄһЩÎÒÈÏΪ±ØÒªÁ˽âµÄÄÚÈÝ£º
1¡¢xmlns:mx="library://ns.adobe.com/flex/halo" ºÍ xmlns:s="library://ns.adobe.com/flex/spark"ÊÇƽ¼¶µÄ£¬¶øxmlns:fx="http://ns.adobe.com/mxml/2009"ÊÇActionScript 3.0¶¥¼¶µÄÄÚÈÝ¡£Ò²¾ÍÊÇ˵£¬Èç¹ûÔÚijһ¸öProjectÀïÃæֻʹÓÃhaloµÄ»°£¬Ôò¿ÉÒÔÔÚApplicationÀïÃæÈ¥µôsparkµÄ¶¨Òå¡££¨·´Ö®ÒàÈ»£©
2¡¢xmlns:mx="library://ns.adobe.com/flex/halo" ºÍ xmlns:s="library://ns.adobe.com/flex/spark"ÆäÖÐÓÐÒ»²¿·ÖÊǹ«Óõģ¬ÕâµãÇë´ó¼Ò×¢Òâһϣ¨¹ØÓÚΪʲôÊǹ«Óõģ¬ÎҲ²âÊÇΪÁËÈÃFlex SDK 2 ºÍ Flex SDK 3ǨÒƵ½Flex SDK 4(Gumbo)µÄ¹ý³Ì¸ü·½±ãһЩÔì³ÉµÄ¡££©
3¡¢xmlns:fx="http://ns.adobe.com/mxml/2009"±£Áô
Ïà¹ØÎĵµ£º
Ò»¡¢Application³£ÓõÄʼþ
initialize=============>³õʼ»¯
createcomplate==========>ÔªËؼÓÔØÍê
initialize·¢ÉúÔÚcreatecomplate֮ǰ¡£
¶þ¡¢Êý¾ÝÇëÇó˵Ã÷
HTTPService==========>httpÊý¾ÝÇëÇó¡£
SOAP(Simple Object Access Protocal)=======> webService
AMF(Adobe Action Message Format)========&g ......
¹ØÓÚFlex»òFlashµÄ¿çÓò·ÃÎʵĽâ¾ö·½°¸£¬ÊÂÇéµÄÆðÒòÊÇ£¬ÓÉÎÒ¹«¿ªµÄÒ»¸öwebservice£¨²»Çå³þÕâ¸öwebservice¸ÉʲôµÄÇë¿´ÕâÀ¿ªÊ¼µÄ£¬kenshinµÄÅóÓÑsensunÔÚÕâ¸ö¹«¿ªµÄwebserviceµÄ»ù´¡ÉÏÖÆ×÷ÁËÒ»¸öweather²éѯµÄ£¬ÔÚ±¾»ú²âÊÔok£¬Ò»Äõ½ÍøÉÏ£¬¾Í»á³öÏÖerror£¨ÊÇ¿çÓò·ÃÎʵĴíÎ󣩣¬ºóÀ´£¬kenshinÖÕÓÚÕÒµ½ÁËÕâ¸öÎÊÌâµÄ½â¾ö·½° ......
Summary(¸ÅÊö)£º Adobe Flex µÄ dataGrid ÓкÜÇ¿´óµÄ¹¦ÄÜ£¬±ÈÈçItemRenderer,headerRendererµÈ£¬¿ÉÒÔ·½±ãµØʵÏÖ×Ô¼ºÏëÒªµÄ¹¦ÄÜ¡£µ«¶ÔdataGridÖ±½Ó±à¼²¢±£´æµ½Service¶Ë£¬¾ÍÓеãÂé·³ÁË¡£
Requirement(ÐèÇó)£º ¶ÔdataGrid½øÐе¥Î»¸ñ±à¼£¬ÈôÓб仯£¬±£´æµ½Service; ·ñÔò²»±£´æ¡£
Solution(½â¾ö·½°¸): ÔËÓÃDataGrid µÄ  ......
flash.util.TimerÀà
flash.util.TimerÀàÔÊÐíͨ¹ýÌí¼Óʱ¼äʼþ»òÑÓʱÀ´µ÷Ó÷½·¨¡£Í¨¹ýTimer¹¹ÔìÆ÷´´½¨ÊµÀý¶ÔÏ󣬴«µÝÒ»¸öºÁÃëÊý×Ö×÷Ϊ¹¹Ôì²ÎÊý×÷Ϊ¼ä¸ôʱ
¼ä£¬ÏÂÃæµÄÀý×ÓʵÀý»¯Ò»¸öTimer¶ÔÏóÿ¸ö1ÃëÖÓ·¢³öʼþÐźţº
var timer.Timer = new Timer(1000);
......
ÍøÉÏÄܲ鵽ºÜ¶àÀàËÆ×ÊÁÏ£¬µ«ÍêÕûÐÔ²»¸Ò¹§Î¬¡£ÒÔÏÂÊǽâ¾ö·½°¸¼°Òªµã£º
·½·¨Ò»£º
ͨ¹ýurlµÄ·½Ê½Ïòflex´«²ÎÊý
µÚ1²½£ºÔÚÍøÒ³ÖÐÉèÖÃÒ»¸öÁ´½Ó£¬Èç <a
href="test.jsp?p1=test1&p2=test2">²âÊÔÁ´½ÓÒ»</a>£¬ÆäÖÐtest.jspǶÈëÁË
flash
µÚ2²½£º»ñÈ¡²ÎÊý
var params:Object
=URLUtil.parseUrlPara ......