home *** CD-ROM | disk | FTP | other *** search
/ Adephia Powerlink / AdephiaPowerlink-030102.iso / pc / Install / WorkFlow / Gui / InpLyt.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2002-04-02  |  3.9 KB  |  128 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 SetDropBox(strMClip, arListItems, curVar)
  16. {
  17.    var NewMClip;
  18.    var TempPlaceHolder;
  19.    var NewID;
  20.    NewMClip = "DDList" add strMClip;
  21.    TempPlaceHolder = eval("DDBoxPlacement" add strMClip);
  22.    NewID = "Control" add strMClip;
  23.    this.attachMovie("DROP_LIST_WRAPPER",NewMClip,CurrentStackingOrder + 100);
  24.    CurrentStackingOrder++;
  25.    this[NewMClip]._x = TempPlaceHolder._x;
  26.    this[NewMClip]._y = TempPlaceHolder._y;
  27.    this[NewMClip].DDBox.ListItems = arListItems;
  28.    this[NewMClip].TempName = NewID;
  29.    if(curVar != undefined)
  30.    {
  31.       this[NewMClip].CurrentSelection = curVar;
  32.    }
  33.    return strMClip;
  34. }
  35. function OnSelectionChange(pSelection, tempID)
  36. {
  37.    ChildSWF.OnSelectionChange(pSelection,tempID);
  38. }
  39. function ToggleHelp()
  40. {
  41.    HelpControlInstance.ToggleVisibility();
  42. }
  43. function SetInputBoxVars(pInputBox, title, defaultInputText, hintEnter, hintExit, AmPassword, ExpCheck)
  44. {
  45.    pInputBox.title = title;
  46.    pInputBox.defaultInputText = defaultInputText;
  47.    pInputBox.hintEnter = hintEnter;
  48.    pInputBox.hintExit = hintExit;
  49.    pInputBox.AmPassword = AmPassword;
  50.    pInputBox.ExpCheck = ExpCheck;
  51. }
  52. function AddToValidation(strTarget)
  53. {
  54.    if(_root.TheInputValidator == undefined)
  55.    {
  56.       this.attachMovie("INPUT_VALIDATOR_WRAPPER","TheInputValidator",this.CurrentStackingOrder);
  57.       _root.TheInputValidator.InputList = new Array();
  58.       _root.TheInputValidator.CallBackFunction = "OnValidInputs";
  59.       this.CurrentStackingOrder = this.CurrentStackingOrder + 1;
  60.    }
  61.    _root.TheInputValidator.InputList.push(strTarget);
  62. }
  63. function OnValidInputs(bValid)
  64. {
  65.    ChildSwf.OnValidInputs(bValid);
  66. }
  67. function ShowInputBox(BoxTitle, DefaultText, OnEnter, OnLeave, bPassword, RegExp, bValidate, bSize)
  68. {
  69.    var TempInputName;
  70.    if(this.InputBoxNumber == undefined)
  71.    {
  72.       this.InputBoxNumber = 1;
  73.    }
  74.    TempInputName = "InputControl" add this.InputBoxNumber;
  75.    if(bSize)
  76.    {
  77.       this.attachMovie("SMALL_INPUT_BOX_EXPORT",TempInputName,CurrentStackingOrder);
  78.    }
  79.    else
  80.    {
  81.       this.attachMovie("INPUT_BOX_EXPORT",TempInputName,CurrentStackingOrder);
  82.    }
  83.    CurrentStackingOrder++;
  84.    var tempObject = eval("this." add TempInputName);
  85.    tempObject._x = 194;
  86.    tempObject._y = 108.3 + 32.3 * (this.InputBoxNumber - 1);
  87.    SetInputBoxVars(tempObject.InputBox,BoxTitle,DefaultText,OnEnter,OnLeave,bPassword,RegExp);
  88.    if(bValidate)
  89.    {
  90.       AddToValidation(tempObject.InputBox._target add "/InputField");
  91.    }
  92.    this.InputBoxNumber = this.InputBoxNumber + 1;
  93.    return this.InputBoxNumber - 1;
  94. }
  95. function GetInputReference(nId)
  96. {
  97.    return eval("InputControl" add nId add ".InputBox");
  98. }
  99. function GetInputFieldPath(nID)
  100. {
  101.    var tempOb = eval("InputControl" add nID);
  102.    return targetPath(tempOb) add ".InputBox.InputField.Input";
  103. }
  104. function SetText(strTextID, strText)
  105. {
  106.    this[strTextID] = strText;
  107.    return true;
  108. }
  109. function RequestAutoFill(nWatchID, nFillID, strHeader, strFooter)
  110. {
  111.    if(this.AutoFillCounter == undefined)
  112.    {
  113.       this.AutoFillCounter = 1;
  114.    }
  115.    var tempAutoFillName = "AutoFill" add this.AutoFillCounter;
  116.    var tempObject;
  117.    this.attachMovie("AUTO_FILL_WRAPPER",tempAutoFillName,CurrentStackingOrder);
  118.    CurrentStackingOrder++;
  119.    this.AutoFillCounter = this.AutoFillCounter + 1;
  120.    tempObject = eval(tempAutoFillName);
  121.    tempObject.FieldToWatch = GetInputFieldPath(nWatchID);
  122.    tempObject.FieldToFill = GetInputFieldPath(nFillID);
  123.    tempObject.InputHeader = strHeader;
  124.    tempObject.InputFooter = strFooter;
  125. }
  126. _level0.BackgroundCreationCallback(_target);
  127. CurrentStackingOrder = 100;
  128.