Newer
Older
AIR-TUve / src / Login.mxml
@reddawg reddawg on 5 Dec 2007 1 KB *** empty log message ***
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" alpha="1.0" backgroundAlpha="1.0" cornerRadius="7" borderColor="#808080" title="Login" height="220" width="426">
  <mx:Script>
  <![CDATA[
    import mx.managers.PopUpManager;
    import mx.controls.Alert;
  
    public var funcs:Object;
    [Bindable]
    public var tvMaster:Master;
    
    
    public function doAuth():void {
      if ((username.text.length > 0) && (tvMaster.validateNick(username.text) == true))  {
      	loginButton.enabled = false;
      	tvMaster.masterObject.selChan.selectedIndex = selChan.selectedIndex;
        funcs.authUser(username.text,selChan.selectedItem.@data);
        }
      else
        Alert.show("Please enter a valid nick before continuing.");
      }
  ]]>
  </mx:Script>
<mx:Label id="logErr"  x="232" width="160" y="10"/>
    <mx:Label text="Channel:"  x="168" y="78"/>
    <mx:ComboBox id="selChan" width="123" dataProvider="{tvMaster.chanList}" labelField="@label"  x="232" y="76"/>

    <mx:Image width="160" height="140" source="http://www.ubixonline.com/UbixCube.swf" autoLoad="true" y="0"/>
<mx:Label text="*"  x="160" y="42" width="10" fontSize="10" color="#ff0000"/>
        <mx:Label text="Nick:"  x="168" y="42"/>
        <mx:TextInput id="username"  text="" x="232" y="40"/>

  <mx:ControlBar horizontalAlign="right" x="0" y="114">
  <mx:Button id="loginButton" label="Login" click="doAuth()" />
  </mx:ControlBar>
</mx:Panel>