Thanks marc,
I did actually work it out yesterday and was trying to get on to the forum to reply but couldn't get it to load.
Here is some basic code for calling some functions in Flex if anyone is interested.
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="*" creationComplete="retrieve_CountryList()">
<mx:Script>
<![CDATA[
private var sCountryCode:String;
private function retrieve_CountryList():void {
countryInfo.send();
}
private function retrieve_Country():void {
countryDetails.text="";
countryInfo2.send();
}
]]>
</mx:Script>
<mx:DataGrid id="dgCountryList" x="10" y="10" dataProvider="{countryInfo.lastResult.country}" width="386" height="287" click="retrieve_Country()">
<mx:columns>
<mx:DataGridColumn headerText="Code" dataField="countryCode" width="60" textAlign="center"/>
<mx:DataGridColumn headerText="Name" dataField="countryName" textAlign="left"/>
</mx:columns>
</mx:DataGrid>
<mx:TextArea x="10" y="305" width="386" height="297" wordWrap="true" editable="false" id="countryDetails" text="{countryInfo2.lastResult.country}"/>
<mx:HTTPService id="countryInfo" url="http://ws.geonames.org/countryInfo?" useProxy="false" method="GET" showBusyCursor="true" resultFormat="e4x">
<mx:request xmlns=""/>
</mx:HTTPService>
<mx:HTTPService id="countryInfo2" url="http://ws.geonames.org/countryInfo?" useProxy="false" method="GET" showBusyCursor="true" resultFormat="e4x">
<mx:request xmlns="">
<country>{dgCountryList.selectedItem.countryCode}</country>
</mx:request>
</mx:HTTPService>
</mx:Application>