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

  1. function LayoutFrame()
  2. {
  3.    _root.ListBoxSelected = true;
  4.    _root.InputsComplete = false;
  5.    _level0.SetText("Title0",_root.RetailCodeEntry_main_title,_root.RetailCodeEntry_Identifier);
  6.    _level0.SetText("Text3",_root.RetailCodeEntry_main_p_default,_root.RetailCodeEntry_Identifier);
  7.    this.nRetailCodeID = _level0.ShowInputBox(_root.RetailCodeEntry_main_p_retailcode,_root.retail_code,_root.RetailCodeEntry_hint_p_retailcode,_root.RetailCodeEntry_hint_p_default,false,_root.RetailCodeEntry_main_textinput_retailcode_regexp_value,true,_root.RetailCodeEntry_Identifier);
  8.    _level0.SetHintText(_root.RetailCodeEntry_hint_p_default,_root.RetailCodeEntry_Identifier);
  9.    _level0.SetHelpText(_root.RetailCodeEntry_help_p_default,_root.RetailCodeEntry_Identifier);
  10.    var CancelButton = _level0.RequestButton("CancelBtn","CancelButtonPlacement",_root.RetailCodeEntry_Identifier);
  11.    var MoreButton = _level0.RequestButton("MoreBtn","MoreButtonPlacement",_root.RetailCodeEntry_Identifier);
  12.    _root.NextBtn = _level0.RequestButton("NextBtn","NextButtonPlacement",_root.RetailCodeEntry_Identifier);
  13.    CancelButton.TextBox.Text = _root.RetailCodeEntry_nav_button_cancel;
  14.    MoreButton.TextBox.Text = _root.RetailCodeEntry_nav_button_more;
  15.    _root.NextBtn.TextBox.Text = _root.RetailCodeEntry_nav_button_next;
  16.    CancelButton.OnRelease = function()
  17.    {
  18.       CancelButtonAction();
  19.    };
  20.    MoreButton.OnRelease = function()
  21.    {
  22.       _level0.ToggleHelp(_root.RetailCodeEntry_Identifier);
  23.    };
  24.    _root.NextBtn.OnRelease = function()
  25.    {
  26.       NextButtonAction();
  27.    };
  28.    _level0.AddTabOrder(_level0.GetInputFieldPath(this.nRetailCodeID,_root.RetailCodeEntry_Identifier),_root.RetailCodeEntry_Identifier);
  29.    _level0.AddTabOrder("NextBtn",_root.RetailCodeEntry_Identifier);
  30.    _level0.AddTabOrder("CancelBtn",_root.RetailCodeEntry_Identifier);
  31.    _level0.RequestAutoFill(nUserNameID,nEmailAddressID,undefined,_root.RetailCodeEntry_main_textinput_emailaddress_autofill_append,_root.RetailCodeEntry_Identifier);
  32. }
  33. function LoadRetailCodeEntryVars()
  34. {
  35.    _root.RetailCodeEntry_Identifier = _level0.SetLayoutObject("Inp",_target,"LayoutFrame",_root.RetailCodeEntry_Identifier);
  36. }
  37. function OnSelectionChange(pSelection)
  38. {
  39.    _level0.SetText("Text0",_root.RetailCodeEntry_main_p_default add " " add pSelection.Item,_root.RetailCodeEntry_Identifier);
  40.    _root.state_selection = pSelection.Item;
  41.    if(pSelection)
  42.    {
  43.       _root.ListBoxSelected = true;
  44.    }
  45.    if(_root.InputsComplete)
  46.    {
  47.       _root.NextBtn.SetDisabled(false);
  48.    }
  49. }
  50. function OnValidInputs(bValid)
  51. {
  52.    if(bValid)
  53.    {
  54.       _root.InputsComplete = true;
  55.       if(_root.ListBoxSelected)
  56.       {
  57.          _root.NextBtn.SetDisabled(false);
  58.       }
  59.    }
  60. }
  61. function InputsValid()
  62. {
  63.    _root.retail_code = _level0.GetInputReference(this.nRetailCodeID,_root.RetailCodeEntry_Identifier).GetInputText();
  64.    _level0.FireSignal(_root.RetailCodeEntry_Identifier,"next");
  65. }
  66. function CancelbuttonAction()
  67. {
  68.    _root.retail_code = _level0.GetInputReference(this.nRetailCodeID,_root.RetailCodeEntry_Identifier).GetInputText();
  69.    _level0.FireSignal(_root.RetailCodeEntry_Identifier,"exit");
  70. }
  71. function ShowingSwf()
  72. {
  73.    RetailCodePic._visible = true;
  74. }
  75. function NextButtonAction()
  76. {
  77.    var arRegExpArray = new Array();
  78.    arRegExpArray.push(_level0.CreateRegularExpressionObject(_level0.GetInputReference(this.nRetailCodeID,_root.RetailCodeEntry_Identifier).GetInputText(),_level0.GetInputReference(this.nRetailCodeID,_root.RetailCodeEntry_Identifier).GetRegExp(),_root.RetailCodeEntry_main_textinput_retailcode_regexp_errorhint,_root.RetailCodeEntry_main_textinput_retailcode_regexp_errorhelp,_level0.GetInputFieldPath(this.nRetailCodeID,_root.RetailCodeEntry_Identifier)));
  79.    _level0.CheckRegularExpressions(arRegExpArray,this,"InputsValid",_root.RetailCodeEntry_Identifier);
  80. }
  81.