topical media & game development
[] readme course(s) preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthought(s) appendix reference(s) example(s) resource(s) _

talk show tell print

professional-flex-code-21-com-wiley-proflex2-chapter21-view-WeatherView.mx

professional-flex-code-21-com-wiley-proflex2-chapter21-view-WeatherView.mx (swf ) [ flash ]


  <?xml version="1.0" encoding="utf-8"?>
  <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
          xmlns:filters="flash.filters.*"
          xmlns:utils="com.rictus.utils.*"
          verticalGap="0">
          
          <mx:Script>
                  <![CDATA[
                  
                          import com.wiley.proflex2.chapter21.model.ModelLocator;
                          import com.wiley.proflex2.chapter21.events.GetWeatherEvent;
                          import com.adobe.cairngorm.control.CairngormEventDispatcher;
                          import com.wiley.proflex2.chapter21.vo.WeatherVO;
                          
                          [Bindable]
                          public var weather:WeatherVO;
                          
                          [Bindable]
                          public var model:ModelLocator = ModelLocator.getInstance();
                          
                  ]]>
          </mx:Script>
          
          <mx:Canvas id="myCanvas" backgroundColor="#333333" borderColor="#333333" borderStyle="solid" cornerRadius="6">
                  <mx:Image source="http://us.i1.yimg.com/us.yimg.com/i/us/nws/weather/gr/{weather.code}d.png" />
                  <mx:Label text="{weather.temp} {weather.units.temperature}" fontSize="40" color="#FFFFFF" right="10" top="20">
                          <mx:filters>
                                  <filters:GlowFilter strength="1" color="#555555" />
                          </mx:filters>
                  </mx:Label>
                  <mx:HBox bottom="60" right="20">
                          <mx:Label text="High: {weather.highTemp} Low: {weather.lowTemp}" color="#FFFFFF" />
                   </mx:HBox>
                   <mx:Label text="{weather.location}" fontWeight="bold" fontSize="11" color="#EEEEEE" left="10" bottom="10" />
          </mx:Canvas>
          <utils:Reflector id="myReflector" target="{myCanvas}" alpha="{0.6}" falloff="{0.9}" blurAmount="{0.2}" />
          
  </mx:VBox>
  


(C) A. Eliëns 2/9/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.