topical media & game development

talk show tell print

explorer-containers-SimpleTitleWindowExample.mx

explorer-containers-SimpleTitleWindowExample.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?>
  <!-- Simple custom MXML TitleWindow component.
       The TitleWindowApp application displays this component. 
       You cannot run it independently. -->
       
  <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" 
      title="Title Window" x="168" y="86">
  
      <mx:Script>
          <![CDATA[       
              import mx.managers.PopUpManager;
              import mx.controls.Text;
                 
              // A reference to the TextInput control in which to put the result.
              public var loginName:Text;
                     
              // Event handler for the OK button.
              private function returnName():void {
                  loginName.text="Name entered: " + userName.text; 
                  PopUpManager.removePopUp(this);
              }
          ]]>
      </mx:Script>
  
      <mx:HBox>
          <mx:Label text="Enter Name: "/>
          <mx:TextInput id="userName" width="100%"/>
      </mx:HBox>
  
      <mx:HBox>
          <mx:Button label="OK" click="returnName();"/>
          <mx:Button label="Cancel" click="PopUpManager.removePopUp(this);"/>
      </mx:HBox>
  
  </mx:TitleWindow>  
  


(C) Æliens 27/08/2009

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.