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-SearchForm.mx

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


  <?xml version="1.0" encoding="utf-8"?>
  <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
          xmlns:utils="com.wiley.proflex2.chapter21.utils.*">
          
          <mx:Metadata>
                  [Event("change", type="mx.events.Event")]
          </mx:Metadata>
          
          <mx:Script>
                  <![CDATA[
                          
                          import com.wiley.proflex2.chapter21.events.GetWeatherEvent;
                          import com.adobe.cairngorm.control.CairngormEventDispatcher;
                          
                  ]]>
          </mx:Script>
          
          <mx:Form id="searchForm">
                  <mx:FormItem label="City, State or Zip Code" direction="horizontal" color="#FFFFFF">
                          <mx:TextInput id="locationId" text="SFXX0010" color="#000000" />
                          <mx:ComboBox id="units" color="#000000">
                                  <mx:dataProvider>
                                          <mx:Array>
                                                  <mx:Object label="C" data="c" />
                                                  <mx:Object label="F" data="f" />
                                          </mx:Array>
                                  </mx:dataProvider>
                          </mx:ComboBox>
                  </mx:FormItem>
                  <mx:FormItem>
                          <mx:LinkButton id="myButton" label="Get Weather"
                                  click="CairngormEventDispatcher.getInstance().dispatchEvent(new GetWeatherEvent(locationId.text, units.selectedItem.data));
                                                  dispatchEvent(new Event(Event.CHANGE))" />
                  </mx:FormItem>
          </mx:Form>
          
  </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.