box-o-sand/flex-practice/custom-03d2-item-renderers/HBoxWeatherDisplay.mxml

32 lines
872 B
XML

<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="100"
xmlns:me="components.*" >
<mx:Script>
<![CDATA[
private var _data:Object;
override public function set data(value:Object):void {
_data = value;
if (data != null) {
zip.text = _data.zip;
city.text = _data.city;
temp.text = _data.temp + 'F';
img.source = _data.imgsource;
}
}
override public function get data():Object {
return _data;
}
]]>
</mx:Script>
<mx:Image id="img" />
<mx:VBox height="100%">
<mx:Text id="zip" />
<mx:Text id="city" />
<mx:Text id="temp" />
</mx:VBox>
</mx:HBox>