Thursday, April 16, 2009

Using HttpService to read the contents of an external file

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="getMenuData.send()">
<mx:HTTPService id="getMenuData" url="menudata.txt" resultFormat="flashvars"/>
<mx:ComboBox x="269" y="134" dataProvider="{getMenuData.lastResult.currencies.split('|')}"></mx:ComboBox>
</mx:WindowedApplication>


The menudata.txt file

label=currency&currencies=Dollar|Rupee|Dinar|Pound|Sterling

No comments:

Post a Comment