46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<loc:WeatherApp xmlns:mx="http://www.adobe.com/2006/mxml"
|
||
|
xmlns:loc="*"
|
||
|
backgroundColor="#FFFFFF"
|
||
|
backgroundAlpha="0"
|
||
|
horizontalAlign="left"
|
||
|
verticalGap="15" horizontalGap="15">
|
||
|
|
||
|
<mx:HTTPService
|
||
|
id="weatherService"
|
||
|
url="http://weather.yahooapis.com/forecastrss"
|
||
|
resultFormat="e4x"
|
||
|
result="resultHandler(event)" />
|
||
|
|
||
|
<mx:Text text="1. Basic Form + HTTPService Retrieval" />
|
||
|
|
||
|
<mx:Form width="400">
|
||
|
<mx:FormItem label="Zip Code">
|
||
|
<mx:TextInput id="zip" />
|
||
|
<mx:Button label="Get Weather"
|
||
|
click="requestWeather()" />
|
||
|
</mx:FormItem>
|
||
|
</mx:Form>
|
||
|
|
||
|
<mx:Text text="Raw RSS Feed" />
|
||
|
|
||
|
<mx:TextArea id="resultFld"
|
||
|
text="{myResult}"
|
||
|
width="400" height="152" />
|
||
|
|
||
|
<mx:Text text="1. List w/ Image Item Renderer (Drop-In)" />
|
||
|
|
||
|
<mx:List dataProvider="{listContents}"
|
||
|
labelField="imgsource"
|
||
|
width="400" height="100"
|
||
|
itemRenderer="mx.controls.Image" />
|
||
|
|
||
|
<mx:Text text="2. List w/ HBoxWeatherDisplay itemRenderer" />
|
||
|
|
||
|
<mx:List dataProvider="{listContents}"
|
||
|
labelField="zip"
|
||
|
width="400" height="100"
|
||
|
itemRenderer="HBoxWeatherDisplay" />
|
||
|
|
||
|
</loc:WeatherApp>
|