Feed data from web service to ComboBox
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)"> <mx:Script> private function initializeHandler(event:Event):void { statesService.getCountries( ); } private function changeHandler(event:Event):void { statesService.getStates(country.value); } </mx:Script> <mx:WebService id="statesService" wsdl="http://www.rightactionscript.com/states/webservice/StatesService.php?wsdl"> <mx:operation name="getCountries" /> <mx:operation name="getStates" /> </mx:WebService> <mx:VBox> <mx:ComboBox id="country" dataProvider="{statesService.getCountries.lastResult}" change="changeHandler(event)" /> <mx:ComboBox dataProvider="{statesService.getStates.lastResult}" /> </mx:VBox> </mx:Application>