home *** CD-ROM | disk | FTP | other *** search
/ Adephia Powerlink / AdephiaPowerlink-030102.iso / pc / Install / WorkFlow / Gui / TipLyt.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2002-04-02  |  4.6 KB  |  148 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.    if(tempID != undefined)
  38.    {
  39.       ChildSWF.OnDDBoxChange(pSelection,tempID);
  40.    }
  41.    else
  42.    {
  43.       ChildSWF.OnSelectionChange(pSelection);
  44.    }
  45. }
  46. function ShowSmallListBox(nPlacementLocation, arListItems, curVar)
  47. {
  48.    var NewMClip;
  49.    var TempPlaceHolder;
  50.    var Bounds;
  51.    NewMClip = "ListBoxSmall" add nPlacementLocation;
  52.    TempPlaceHolder = eval("LBPlacementSmall" add nPlacementLocation);
  53.    this.attachMovie("LISTBOXSMALL_CONTROL_WRAPPER",NewMClip,CurrentStackingOrder);
  54.    CurrentStackingOrder++;
  55.    Bounds = TempPlaceHolder.getBounds(_root);
  56.    this[NewMClip]._x = Bounds.xMin;
  57.    this[NewMClip]._y = Bounds.yMin;
  58.    this[NewMClip].LBControlSmall.arItems = arListItems;
  59.    this[NewMClip].LBControlSmall.RowSize = Math.round(TempPlaceHolder._height / 25) + 1;
  60.    if(curVar != undefined)
  61.    {
  62.       this[NewMClip].CurrentSelection = curVar;
  63.    }
  64.    return nPlacementLocation;
  65. }
  66. function ToggleHelp()
  67. {
  68.    HelpControlInstance.ToggleVisibility();
  69. }
  70. function SetInputBoxVars(pInputBox, title, defaultInputText, hintEnter, hintExit, AmPassword, ExpCheck)
  71. {
  72.    pInputBox.title = title;
  73.    pInputBox.defaultInputText = defaultInputText;
  74.    pInputBox.hintEnter = hintEnter;
  75.    pInputBox.hintExit = hintExit;
  76.    pInputBox.AmPassword = AmPassword;
  77.    pInputBox.ExpCheck = ExpCheck;
  78. }
  79. function AddToValidation(strTarget)
  80. {
  81.    if(_root.TheInputValidator == undefined)
  82.    {
  83.       this.attachMovie("INPUT_VALIDATOR_WRAPPER","TheInputValidator",this.CurrentStackingOrder);
  84.       _root.TheInputValidator.InputList = new Array();
  85.       _root.TheInputValidator.CallBackFunction = "OnValidInputs";
  86.       this.CurrentStackingOrder = this.CurrentStackingOrder + 1;
  87.    }
  88.    _root.TheInputValidator.InputList.push(strTarget);
  89. }
  90. function OnValidInputs(bValid)
  91. {
  92.    ChildSwf.OnValidInputs(bValid);
  93. }
  94. function ShowInputBox(BoxTitle, DefaultText, OnEnter, OnLeave, bPassword, RegExp, bValidate)
  95. {
  96.    var TempInputName;
  97.    if(this.InputBoxNumber == undefined)
  98.    {
  99.       this.InputBoxNumber = 1;
  100.    }
  101.    TempInputName = "InputControl" add this.InputBoxNumber;
  102.    this.attachMovie("INPUT_BOX_EXPORT",TempInputName,CurrentStackingOrder);
  103.    CurrentStackingOrder++;
  104.    var tempObject = eval("this." add TempInputName);
  105.    tempObject._x = 200;
  106.    tempObject._y = 100 + 23 * (this.InputBoxNumber - 1);
  107.    SetInputBoxVars(tempObject.InputBox,BoxTitle,DefaultText,OnEnter,OnLeave,bPassword,RegExp);
  108.    if(bValidate)
  109.    {
  110.       AddToValidation(tempObject.InputBox._target add "/InputField");
  111.    }
  112.    this.InputBoxNumber = this.InputBoxNumber + 1;
  113.    return this.InputBoxNumber - 1;
  114. }
  115. function GetInputReference(nId)
  116. {
  117.    return eval("InputControl" add nId add ".InputBox");
  118. }
  119. function GetInputFieldPath(nID)
  120. {
  121.    var tempOb = eval("InputControl" add nID);
  122.    return targetPath(tempOb) add ".InputBox.InputField.Input";
  123. }
  124. function SetText(strTextID, strText)
  125. {
  126.    this[strTextID] = strText;
  127.    return true;
  128. }
  129. function RequestAutoFill(nWatchID, nFillID, strHeader, strFooter)
  130. {
  131.    if(this.AutoFillCounter == undefined)
  132.    {
  133.       this.AutoFillCounter = 1;
  134.    }
  135.    var tempAutoFillName = "AutoFill" add this.AutoFillCounter;
  136.    var tempObject;
  137.    this.attachMovie("AUTO_FILL_WRAPPER",tempAutoFillName,CurrentStackingOrder);
  138.    CurrentStackingOrder++;
  139.    this.AutoFillCounter = this.AutoFillCounter + 1;
  140.    tempObject = eval(tempAutoFillName);
  141.    tempObject.FieldToWatch = GetInputFieldPath(nWatchID);
  142.    tempObject.FieldToFill = GetInputFieldPath(nFillID);
  143.    tempObject.InputHeader = strHeader;
  144.    tempObject.InputFooter = strFooter;
  145. }
  146. _level0.BackgroundCreationCallback(_target);
  147. CurrentStackingOrder = 100;
  148.