home *** CD-ROM | disk | FTP | other *** search
/ Adephia Powerlink / AdephiaPowerlink-030102.iso / pc / Install / WorkFlow / Gui / UsrInput.swf / scripts / frame_2 / DoAction.as
Encoding:
Text File  |  2002-04-02  |  5.6 KB  |  98 lines

  1. function LayoutFrame()
  2. {
  3.    _root.DropDownSelected = true;
  4.    _level0.SetText("Title0",_root.AccountInfoReentry_main_title,_root.UserInputFrame4_Identifier);
  5.    _level0.SetText("Text0",_root.AccountInfoReentry_main_p_emaildomain,_root.UserInputFrame4_Identifier);
  6.    this.nUserNameID = _level0.ShowInputBox(_root.AccountInfoReentry_main_p_username,_root.user_name,_root.AccountInfoReentry_hint_p_username,_root.AccountInfoReentry_hint_p_default,false,_root.AccountInfoReentry_main_textinput_username_regexp_value,true,_root.UserInputFrame4_Identifier);
  7.    this.nPasswordID = _level0.ShowInputBox(_root.AccountInfoReentry_main_p_password,_root.password,_root.AccountInfoReentry_hint_p_password,_root.AccountInfoReentry_hint_p_default,true,_root.AccountInfoReentry_main_textinput_password_regexp_value,true,_root.UserInputFrame4_Identifier);
  8.    var arTemp = new Array();
  9.    var nCounter = 0;
  10.    var tempObject;
  11.    arTemp[0] = _root.AccountInfoReentry_control_ListBoxOne_titletext;
  12.    while(nCounter < _root.AccountInfoReentry_control_ListBoxOne_numitems)
  13.    {
  14.       tempObject = new Object();
  15.       tempObject.item = eval("_root.AccountInfoReentry_control_ListBoxOne_item_" add (nCounter + 1));
  16.       arTemp.push(tempObject);
  17.       nCounter++;
  18.    }
  19.    _level0.SetDropBox(0,arTemp,_root.UserInputFrame4_Identifier,_root.email_domain);
  20.    _level0.SetHintText(_root.AccountInfoReentry_hint_p_default,_root.UserInputFrame4_Identifier);
  21.    _level0.SetHelpText(_root.AccountInfoReentry_help_p_default,_root.UserInputFrame4_Identifier);
  22.    var CancelButton = _level0.RequestButton("CancelBtn","CancelButtonPlacement",_root.UserInputFrame4_Identifier);
  23.    var MoreButton = _level0.RequestButton("MoreBtn","MoreButtonPlacement",_root.UserInputFrame4_Identifier);
  24.    _root.NextBtn = _level0.RequestButton("NextBtn","NextButtonPlacement",_root.UserInputFrame4_Identifier);
  25.    CancelButton.TextBox.Text = _root.AccountInfoReentry_nav_button_cancel;
  26.    MoreButton.TextBox.Text = _root.AccountInfoReentry_nav_button_more;
  27.    _root.NextBtn.TextBox.Text = _root.AccountInfoReentry_nav_button_next;
  28.    CancelButton.OnRelease = function()
  29.    {
  30.       CancelButtonAction();
  31.    };
  32.    MoreButton.OnRelease = function()
  33.    {
  34.       _level0.ToggleHelp(_root.UserInputFrame4_Identifier);
  35.    };
  36.    _root.NextBtn.OnRelease = function()
  37.    {
  38.       NextButtonAction();
  39.    };
  40.    _level0.AddTabOrder(_level0.GetInputFieldPath(this.nUserNameID,_root.UserInputFrame4_Identifier),_root.UserInputFrame4_Identifier,true);
  41.    _level0.AddTabOrder(_level0.GetInputFieldPath(this.nPasswordID,_root.UserInputFrame4_Identifier),_root.UserInputFrame4_Identifier);
  42.    _level0.AddTabOrder(_level0.GetInputFieldPath(this.nEmailAddressID,_root.UserInputFrame4_Identifier),_root.UserInputFrame4_Identifier);
  43.    _level0.AddTabOrder("NextBtn",_root.UserInputFrame4_Identifier);
  44.    _level0.AddTabOrder("CancelBtn",_root.UserInputFrame4_Identifier);
  45.    _level0.RequestAutoFill(nUserNameID,nEmailAddressID,undefined,_root.AccountInfoReentry_main_textinput_emailaddress_autofill_append,_root.UserInputFrame4_Identifier);
  46.    _root.NextBtn.DefaultDisabled = 1;
  47. }
  48. function LoadUserInputFrame4Vars()
  49. {
  50.    _root.UserInputFrame4_Identifier = _level0.SetLayoutObject("InpLayout",_target,"LayoutFrame",_root.UserInputFrame4_Identifier);
  51. }
  52. function OnValidInputs(bValid)
  53. {
  54.    if(bValid)
  55.    {
  56.       _root.InputsComplete = true;
  57.       if(_root.DropDownSelected)
  58.       {
  59.          _root.NextBtn.SetDisabled(false);
  60.       }
  61.    }
  62.    else
  63.    {
  64.       _root.InputsComplete = false;
  65.       _root.NextBtn.SetDisabled(true);
  66.    }
  67. }
  68. function OnSelectionChange(pSelection, tempID)
  69. {
  70.    _root.email_domain = pSelection.Item;
  71.    _root.DropDownSelected = true;
  72.    if(_root.InputsComplete)
  73.    {
  74.       _root.NextBtn.SetDisabled(false);
  75.    }
  76. }
  77. function InputsValid()
  78. {
  79.    _root.user_name = _level0.GetInputReference(this.nUserNameID,_root.UserInputFrame4_Identifier).GetInputText();
  80.    _root.password = _level0.GetInputReference(this.nPasswordID,_root.UserInputFrame4_Identifier).GetInputText();
  81.    _root.email_address = _root.user_name add _root.email_domain;
  82.    _level0.FireSignal(_root.UserInputFrame4_Identifier,"next");
  83. }
  84. function CancelButtonAction()
  85. {
  86.    _root.user_name = _level0.GetInputReference(this.nUserNameID,_root.UserInputFrame4_Identifier).GetInputText();
  87.    _root.password = _level0.GetInputReference(this.nPasswordID,_root.UserInputFrame4_Identifier).GetInputText();
  88.    _root.email_address = _root.user_name add _root.email_domain;
  89.    _level0.FireSignal(_root.UserInputFrame4_Identifier,"exit");
  90. }
  91. function NextButtonAction()
  92. {
  93.    var arRegExpArray = new Array();
  94.    arRegExpArray.push(_level0.CreateRegularExpressionObject(_level0.GetInputReference(this.nUserNameID,_root.UserInputFrame4_Identifier).GetInputText(),_level0.GetInputReference(this.nUserNameID,_root.UserInputFrame4_Identifier).GetRegExp(),_root.AccountInfoReentry_main_textinput_username_regexp_errorhint,_root.AccountInfoReentry_main_textinput_username_regexp_errorhelp,_level0.GetInputFieldPath(this.nUserNameID,_root.UserInputFrame4_Identifier)));
  95.    arRegExpArray.push(_level0.CreateRegularExpressionObject(_level0.GetInputReference(this.nPasswordID,_root.UserInputFrame4_Identifier).GetInputText(),_level0.GetInputReference(this.nPasswordID,_root.UserInputFrame4_Identifier).GetRegExp(),_root.AccountInfoReentry_main_textinput_password_regexp_errorhint,_root.AccountInfoReentry_main_textinput_password_regexp_errorhelp,_level0.GetInputFieldPath(this.nPasswordID,_root.UserInputFrame4_Identifier)));
  96.    _level0.CheckRegularExpressions(arRegExpArray,this,"InputsValid",_root.UserInputFrame4_Identifier);
  97. }
  98.