FlexÓëºǫ́½»»¥µÄ4ÖÖ·½·¨
Ò»¡¢HTTPService
³ÌÐò´úÂ룺
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)">
<mx:Script>
<!--[CDATA[
private function initializeHandler(event:Event):void {
countriesService.send();
}
private function changeHandler(event:Event):void {
statesService.send();
}
]]>
</mx:Script>
<!-- ÔØÈë´¿¾²Ì¬µÄxmlÊý¾Ý -->
<mx:HTTPService id="countriesService" url="http://www.rightactionscript.com/states/xml/countries.xml" />
<!-- ÔØÈëÓÉphpÉú³ÉµÄxmlÊý¾Ý -->
<mx:HTTPService id="statesService" url="http://www.rightactionscript.com/states/xml/states.php">
<!-- ÒÔϱêÇ©¾ÍÊÇÒª·¢Ë͵½·þÎñ¶ËµÄÊý¾ÝÁË,¿ÉÒÔÕâÑùÀí½â:ÓÐÒ»¸öÃûΪcountryµÄ±äÁ¿,ËüµÄֵΪ»¨À¨ºÅ{}ÀïµÄÄÚÈÝ -->
<mx:request>
<country>{country.value}</country>
</mx:request>
</mx:HTTPService>
<mx:VBox>
<!-- ´Ë¿Ø¼þµÄÊý¾ÝÓɵÚÒ»¸ö<mx:HTTPService/>¿Ø¼þ½ÓÊÕµÄÄÚÈÝÌṩ,²¢ÇÒÓÉÕâ¸öComboBox¿ØÖÆ×ŵڶþ¸öComboBoxËùÒªÏÔʾµÄÄÚÈÝ -->
<mx:ComboBox id="country" dataProvider="{countriesService.lastResult.countries.country}"
change="changeHandler(event)" />
<!-- ÏÂÃæµÄComboBoxÒѾ°ó¶¨ÁË{statesService.lastResult.states.state},ËæËüµÄÊý¾Ý¸Ä±ä¶ø¸Ä±ä -->
<mx:ComboBox dataProvider="{statesService.lastResult.states.state}" />
</mx:VBox>
</mx:Application>
¶þ¡¢URLLoader
³ÌÐò´úÂ룺
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)">
<mx:Script>
<!--[CDATA[
private var _countriesService:URLLoader;
private var _statesService:URLLoader;
private function initializeHandler(event:Event):void {
_countriesService = new URLLoader();
_countriesService.addEventListener(Event.COMPLETE, countriesCompleteHandler);
_countriesService.load(new URLRequest("http://www.rightactionsc
Ïà¹ØÎĵµ£º
×òÌìÍíÉÏÒ»Ö±ÔÚ×ÁÄ¥Flex,Ïëͨ¹ýDataGrid°ÑMySQLÀïÃæµÄÊý¾Ý¸ø¶Á³öÀ´£¬ÆÚ¼ä³öÏÖÁ˼¸¸öСÎÊÌ⣬¼Ç¼ÏÂ~~
1.µÚÒ»´Î½øÐÐÁ¬½ÓÊý¾Ý·þÎñ(Data-Connect to Data/Service-PHP-Browse)ʱ,»á³öÏÖ°²×°Zend FrameWork,Ñ¡Ôñok,²»ÒªÊºóÔÙÈ¥ÍøÕ¾ÏÂÔØZendAMF,Õâ¸öÀïÃæ»áÉÙһЩ¶«Î÷.
2.Data-Bind to DataÊ ......
ÒòΪÎÞÂÛÊÇFLEX£¬»¹ÊÇSilverlight¡¢AJAX£¬ËûÃǶ¼ÎÞ·¨Ö±½Ó²Ù×÷Êý¾Ý¿â£¨¾Ý×îÐÂÏûÏ¢£¬Î¢ÈíÓÐÁËMicrosoft .NET RIA Services£¬Ëü¿ÉÒÔÖ±½Ó²Ù×÷Êý¾Ý¿â£¬ÎÒÆÚ´ý×ÅËýÄÜÔÚVS2010ÖгöÏÖ£©£¬Í¨³£ÓÃWEBSERVICEµÈÖмäÈ˵ķ½Ê½À´½øÐÐSOAPÐÒéµÄµÄÎı¾´«Ê䣬ЧÂʺܵͣ¨´ó¼ÒÊÔһϾͻáÖªµÀ¼òÖ±ÎÞ·¨ÈÌÊÜ£©£¬FLEXΪÁ˼ӿ촫ÊäËٶȣ¬ÓÚÊÇÖƶ¨ÁË ......
ÐÂÊÖÈëÃŲο¼:
Adobe Flex 3 - adobe.com
Adobe Flex Sample Applications - adobe.com
Video Training (Learn Flex in a Week) - adobe.com
RSS Feeds (Get regular updates about Flex) - adobe.com
Learn about Flex Open Source - adobe.com
Get Flex 3 SDK - adobe.com
Get Flex Builder 3 - adobe.com ......
ʹÓÃflexµÄ³É±¾
FLexÓïÑÔ±¾ÉíÃâ·Ñ¿ªÔ´
LCDS:
×ö remote object access serviceµÄ,˵¼òµ¥µã¾ÍÊǹµÍ¨ºǫ́javaºÍǰ̨flexÖ±½ÓµÄÇÅÁº
adobe¹Ù·½µÄ¶«Î÷,ÊÕ·Ñ,ºÜ¹ó
BDS: ¿ªÔ´Ãâ·Ñ,»ù±¾ÉÏ¿ÉÒÔÍêÈ«Ìæ´úLCDS,Ò²ÊÇadobe¹Ù·½µÄ¶«Î÷,¹À¼ÆÊÇLCDSûÈËÓÃ,ËûÓÖ²»ºÃÒâ˼ֱ½ÓÃâ·Ñ¸ã³öÀ´µÄ¶«Î÷
JRUN: Ó¦Ó÷þÎñÆ÷,Ò²ºÜ ......