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

  1. function SetHelpText(strText)
  2. {
  3.    if(!HelpControlInstance.SetDisplayText(strText))
  4.    {
  5.       HelpControlInstance.defaultText = strText;
  6.    }
  7. }
  8. function SetHintText(strText)
  9. {
  10.    if(!HintBoxInstance.SetDisplayText(strText))
  11.    {
  12.       HintBoxInstance.defaultText = strText;
  13.    }
  14. }
  15. function ToggleHelp()
  16. {
  17.    HelpControlInstance.ToggleVisibility();
  18. }
  19. function SetInputBoxVars(pInputBox, title, defaultInputText, hintEnter, hintExit, AmPassword, ExpCheck)
  20. {
  21.    pInputBox.title = title;
  22.    pInputBox.defaultInputText = defaultInputText;
  23.    pInputBox.hintEnter = hintEnter;
  24.    pInputBox.hintExit = hintExit;
  25.    pInputBox.AmPassword = AmPassword;
  26.    pInputBox.ExpCheck = ExpCheck;
  27. }
  28. function AddToValidation(strTarget)
  29. {
  30.    if(_root.TheInputValidator == undefined)
  31.    {
  32.       this.attachMovie("INPUT_VALIDATOR_WRAPPER","TheInputValidator",this.CurrentStackingOrder);
  33.       _root.TheInputValidator.InputList = new Array();
  34.       _root.TheInputValidator.CallBackFunction = "OnValidInputs";
  35.       this.CurrentStackingOrder = this.CurrentStackingOrder + 1;
  36.    }
  37.    _root.TheInputValidator.InputList.push(strTarget);
  38. }
  39. function OnValidInputs(bValid)
  40. {
  41.    ChildSwf.OnValidInputs(bValid);
  42. }
  43. function ShowInputBox(BoxTitle, DefaultText, OnEnter, OnLeave, bPassword, RegExp, bValidate)
  44. {
  45.    var TempInputName;
  46.    if(this.InputBoxNumber == undefined)
  47.    {
  48.       this.InputBoxNumber = 1;
  49.    }
  50.    TempInputName = "InputControl" add this.InputBoxNumber;
  51.    this.attachMovie("INPUT_BOX_EXPORT",TempInputName,CurrentStackingOrder);
  52.    CurrentStackingOrder++;
  53.    var tempObject = eval("this." add TempInputName);
  54.    tempObject._x = 202.4;
  55.    tempObject._y = 135 + 41 * (this.InputBoxNumber - 1);
  56.    SetInputBoxVars(tempObject.InputBox,BoxTitle,DefaultText,OnEnter,OnLeave,bPassword,RegExp);
  57.    if(bValidate)
  58.    {
  59.       AddToValidation(tempObject.InputBox._target add "/InputField");
  60.    }
  61.    this.InputBoxNumber = this.InputBoxNumber + 1;
  62.    return this.InputBoxNumber - 1;
  63. }
  64. function GetInputReference(nId)
  65. {
  66.    return eval("InputControl" add nId add ".InputBox");
  67. }
  68. function GetInputFieldPath(nID)
  69. {
  70.    var tempOb = eval("InputControl" add nID);
  71.    return targetPath(tempOb) add ".InputBox.InputField.Input";
  72. }
  73. function SetText(strTextID, strText)
  74. {
  75.    this[strTextID] = strText;
  76.    return true;
  77. }
  78. function RequestAutoFill(nWatchID, nFillID, strHeader, strFooter)
  79. {
  80.    if(this.AutoFillCounter == undefined)
  81.    {
  82.       this.AutoFillCounter = 1;
  83.    }
  84.    var tempAutoFillName = "AutoFill" add this.AutoFillCounter;
  85.    var tempObject;
  86.    this.attachMovie("AUTO_FILL_WRAPPER",tempAutoFillName,CurrentStackingOrder);
  87.    CurrentStackingOrder++;
  88.    this.AutoFillCounter = this.AutoFillCounter + 1;
  89.    tempObject = eval(tempAutoFillName);
  90.    tempObject.FieldToWatch = GetInputFieldPath(nWatchID);
  91.    tempObject.FieldToFill = GetInputFieldPath(nFillID);
  92.    tempObject.InputHeader = strHeader;
  93.    tempObject.InputFooter = strFooter;
  94. }
  95. _level0.BackgroundCreationCallback(_target);
  96. CurrentStackingOrder = 100;
  97.