home *** CD-ROM | disk | FTP | other *** search
/ FCE Gold Plus / GOLD.iso / pc / shell.swf / scripts / __Packages / com / screen / DropDown.as < prev    next >
Text File  |  2007-10-16  |  22KB  |  638 lines

  1. class com.screen.DropDown
  2. {
  3.    var iLineSp = 22;
  4.    var iLevel = 1;
  5.    var btnNo = 0;
  6.    var tempID = 9;
  7.    function DropDown()
  8.    {
  9.    }
  10.    function init(_objRef, _objSection, _wth, x, y, _mcName, _type, _group, _navRef)
  11.    {
  12.       var _loc1_ = this;
  13.       var _loc2_ = _objSection;
  14.       _loc1_.objRef = _objRef;
  15.       _loc1_.c_objSection = _loc2_;
  16.       _loc1_.strTitle = _loc1_.getTitle(_loc2_);
  17.       _loc1_.strText = _loc1_.getText(_loc2_);
  18.       _loc1_.strHeaderTxt = _loc1_.getHeaderText(_loc2_);
  19.       _loc1_.iWidth = _wth;
  20.       _loc1_.xLoc = x;
  21.       _loc1_.yLoc = y;
  22.       _loc1_.c_strAthMC = _mcName;
  23.       _loc1_.c_strType = _type;
  24.       _loc1_.c_iGroup = _group;
  25.       _loc1_.c_objNavRef = _navRef;
  26.       _loc1_.c_objRefPoi = _loc1_.getRefTest(_loc2_);
  27.       _loc1_.c_strMode = _loc1_.c_objNavRef.c_objTestRef.c_strMode;
  28.       _loc1_.c_strSkill = _loc1_.c_objNavRef.c_objTestRef.c_strSkill;
  29.       _loc1_.c_objHMObj = _loc1_.c_objNavRef.c_objTestRef.c_hQuestionState;
  30.       _loc1_.startProcess();
  31.    }
  32.    function startProcess()
  33.    {
  34.       var _loc1_ = this;
  35.       var _loc2_ = _loc1_.c_objSection.question;
  36.       var objRefPoints = _loc1_.c_objSection.ReferencePoints;
  37.       var _loc3_ = _loc1_.objRef.mc_ScrollSize._width;
  38.       var iScrollSizeHeight = _loc1_.objRef.mc_ScrollSize._height;
  39.       var iScrollSizeX = _loc1_.objRef.mc_ScrollSize._x;
  40.       var iScrollSizeY = _loc1_.objRef.mc_ScrollSize._y;
  41.       _loc1_.objRef.mc_ParagraphSP.setScrollContent("SP_content_con");
  42.       _loc1_.objRef.createEmptyMovieClip("fib",_loc1_.iLevel);
  43.       _loc1_.objRef.mc_ParagraphSP.setSize(_loc3_ - 1,iScrollSizeHeight - 1);
  44.       _loc1_.objRef.mc_ParagraphSP._x = iScrollSizeX;
  45.       _loc1_.objRef.mc_ParagraphSP._y = iScrollSizeY;
  46.       _loc1_.fib = _loc1_.objRef.mc_ParagraphSP.getScrollContent();
  47.       _loc1_.fib._x = _loc1_.xLoc;
  48.       _loc1_.fib._y = _loc1_.yLoc;
  49.       _loc1_.displayTitle(_loc3_);
  50.       if(_loc1_.strHeaderTxt != null || _loc1_.strHeaderTxt != undefined || _loc1_.strHeaderTxt != "")
  51.       {
  52.          _loc1_.displayHeaderText();
  53.       }
  54.       _loc1_.displayText();
  55.       _loc1_.fillComboData(_loc1_.fib,_loc2_);
  56.       _loc1_.setComboValues(_loc2_);
  57.       _loc1_.displaySelectionClip(_loc1_.fib);
  58.       _loc1_.objRef.mc_ParagraphSP.refreshPane();
  59.       _loc1_.showReferenceSection(objRefPoints);
  60.    }
  61.    function showReferenceSection(objRefPoints)
  62.    {
  63.       var _loc1_ = this;
  64.       _loc1_.objRef.mc_SPMCQ5.setScrollContent("SP_content_con");
  65.       _loc1_.objRefContainer = _loc1_.objRef.mc_SPMCQ5.getScrollContent();
  66.       _loc1_.objRef.mc_SPMCQ5.setSize(_loc1_.objRef.mc_RefScrollSize._width,_loc1_.objRef.mc_RefScrollSize._height);
  67.       _loc1_.objRef.mc_SPMCQ5._x = _loc1_.objRef.mc_RefScrollSize._x;
  68.       _loc1_.objRef.mc_SPMCQ5._y = _loc1_.objRef.mc_RefScrollSize._y;
  69.       _loc1_.showReferenceText(_loc1_.objRefContainer,objRefPoints);
  70.       _loc1_.showFeedback(false);
  71.       _loc1_.objRef.mc_SPMCQ5.refreshPane();
  72.    }
  73.    function displayTitle()
  74.    {
  75.       var _loc3_ = this;
  76.       var iTitleWidth = _loc3_.objRef.mc_ParagraphSP._width;
  77.       _loc3_.fib.createTextField("title",10000,0,0,iTitleWidth,20);
  78.       var _loc1_ = _loc3_.fib.title;
  79.       var strEnvironment = com.controller.UICoordinator.getInstance().getOSEnvironment();
  80.       var _loc2_ = new TextFormat();
  81.       _loc2_.font = "Verdana";
  82.       _loc2_.size = 11;
  83.       _loc2_.color = "0x000000";
  84.       if(strEnvironment == "Linux")
  85.       {
  86.          _loc1_.embedFonts = true;
  87.       }
  88.       _loc1_.html = true;
  89.       _loc1_.autoSize = true;
  90.       _loc1_.htmlText = _loc3_.strTitle;
  91.       _loc1_.selectable = false;
  92.       _loc1_.autoSize = "left";
  93.       _loc1_.setTextFormat(_loc2_);
  94.       false;
  95.       delete strEnvironment;
  96.    }
  97.    function displayHeaderText()
  98.    {
  99.       var _loc3_ = this;
  100.       var iHeaderTxtWidth = _loc3_.objRef.mc_ParagraphSP._width;
  101.       var iHeaderY = _loc3_.fib.title._y + 10;
  102.       _loc3_.fib.createTextField("headerTxt",10005,15,13,370,20);
  103.       var _loc1_ = _loc3_.fib.headerTxt;
  104.       var strEnvironment = com.controller.UICoordinator.getInstance().getOSEnvironment();
  105.       var _loc2_ = new TextFormat();
  106.       _loc2_.font = "Verdana";
  107.       _loc2_.size = 11;
  108.       _loc2_.color = "0x000000";
  109.       if(strEnvironment == "Linux")
  110.       {
  111.          _loc1_.embedFonts = true;
  112.       }
  113.       _loc1_.html = true;
  114.       _loc1_.multiline = true;
  115.       _loc1_.wordWrap = true;
  116.       _loc1_.htmlText = _loc3_.strHeaderTxt;
  117.       _loc1_.selectable = false;
  118.       _loc1_.autoSize = true;
  119.       _loc1_.text.align = "center";
  120.       _loc1_.setTextFormat(_loc2_);
  121.       false;
  122.       delete strEnvironment;
  123.    }
  124.    function displayText()
  125.    {
  126.       var _loc1_ = this;
  127.       _loc1_.c_arrQuesNos = new Array();
  128.       var arrData = _loc1_.arrangetext();
  129.       var iMC_Width = 7;
  130.       var iMC_X = 0;
  131.       var iMC_Y = _loc1_.fib.title._y + _loc1_.fib.title._height + 10;
  132.       var strEnvironment = com.controller.UICoordinator.getInstance().getOSEnvironment();
  133.       var objTF = new TextFormat();
  134.       objTF.font = "Verdana";
  135.       objTF.size = 11;
  136.       var mcComboHolder = _loc1_.fib.createEmptyMovieClip("mcComboHolder",1);
  137.       var mcTextFieldHolder = _loc1_.fib.createEmptyMovieClip("mcTextFieldHolder",2);
  138.       var i = 0;
  139.       while(i < arrData.length)
  140.       {
  141.          var strText = arrData[i];
  142.          if(i % 2 == 1)
  143.          {
  144.             if(strText != "")
  145.             {
  146.                var _loc3_ = _loc1_.fib.attachMovie(_loc1_.c_strAthMC,"Box" + _loc1_.btnNo,i);
  147.                _loc1_.c_arrQuesNos.push(strText);
  148.                _loc3_._x = iMC_X;
  149.                _loc3_._y = iMC_Y;
  150.                _loc3_.setSize(45,22);
  151.                _loc3_.strCorrectAnswer = _loc1_.getCorrectAnswer(_loc1_.btnNo);
  152.                _loc3_.queNumber = _loc1_.getQueNo(_loc1_.btnNo);
  153.                _loc3_.answered = "no";
  154.                var iBoxWith = _loc3_._width;
  155.                iMC_X += iBoxWith;
  156.                iMC_Width += iBoxWith;
  157.                if(iMC_X > _loc1_.iWidth)
  158.                {
  159.                   iMC_X = iBoxWith;
  160.                   iMC_Width = iBoxWith;
  161.                   iMC_Y += _loc1_.iLineSp;
  162.                   _loc3_._x = 7;
  163.                   _loc3_._y = iMC_Y;
  164.                }
  165.                _loc1_.addEventToDropDown(_loc3_,_loc1_.objRef);
  166.                _loc1_.btnNo = _loc1_.btnNo + 1;
  167.             }
  168.          }
  169.          else if(i % 2 == 0)
  170.          {
  171.             var arrTmp = strText.split(" ");
  172.             var tmpWidth = iMC_Width;
  173.             var strNewLine = false;
  174.             _loc1_.fib.createTextField("text" + i,i,iMC_X,iMC_Y,10,20);
  175.             var _loc2_ = _loc1_.fib["text" + i];
  176.             _loc2_.text = "";
  177.             var objOutput = _loc1_.populateText(arrTmp,_loc2_,objTF,iMC_Width,tmpWidth,strNewLine,strEnvironment);
  178.             strNewLine = objOutput.strNewLine;
  179.             var j = objOutput.j;
  180.             iMC_Width = objOutput.iMC_Width;
  181.             _loc2_.text = _loc2_.text.substr(0,_loc2_.text.length - 1);
  182.             _loc2_.autoSize = true;
  183.             _loc2_.multiline = true;
  184.             var strTmp = "";
  185.             arrData = _loc1_.updateTextField(j,arrTmp,strTmp,strNewLine,_loc2_,arrData,i,strEnvironment);
  186.             if(strEnvironment == "Linux")
  187.             {
  188.                _loc2_.embedFonts = true;
  189.             }
  190.             delete j;
  191.             _loc2_._width = 10;
  192.             _loc2_.html = true;
  193.             _loc2_.htmlText = _loc2_.text;
  194.             _loc2_.multiline = true;
  195.             _loc2_.autoSize = true;
  196.             _loc2_.setTextFormat(objTF);
  197.             iMC_X += _loc2_._width;
  198.             if(iMC_Width > _loc1_.iWidth || strNewLine)
  199.             {
  200.                iMC_X = 7;
  201.                iMC_Width = 0;
  202.                iMC_Y += _loc1_.iLineSp;
  203.             }
  204.          }
  205.          i++;
  206.       }
  207.       _loc1_.c_iDepth = arrData.length;
  208.       delete objTF;
  209.    }
  210.    function updateTextField(in_j, arrTmp, strTmp, strNewLine, tField, arrData, in_iIndex, strEnvironment)
  211.    {
  212.       var _loc1_ = in_j;
  213.       var _loc2_ = strTmp;
  214.       var _loc3_ = arrTmp;
  215.       _loc1_;
  216.       while(_loc1_ < _loc3_.length)
  217.       {
  218.          _loc2_ = _loc2_ + _loc3_[_loc1_] + " ";
  219.          _loc1_ = _loc1_ + 1;
  220.       }
  221.       _loc2_ = _loc2_.substr(0,_loc2_.length - 1);
  222.       if(_loc2_.length > 0)
  223.       {
  224.          if(strEnvironment == "Linux")
  225.          {
  226.             tField.embedFonts = true;
  227.          }
  228.          if(!strNewLine)
  229.          {
  230.             tField.text = tField.text.substr(0,tField.text.length - _loc2_.split(" ")[0].length);
  231.          }
  232.          else
  233.          {
  234.             tField.text = tField.text.substr(0,tField.text.length - 2);
  235.          }
  236.          arrData = this.updateArray(arrData,_loc2_,in_iIndex);
  237.       }
  238.       return arrData;
  239.    }
  240.    function populateText(arrTmp, tField, objTF, iMC_Width, tmpWidth, strNewLine, strEnvironment)
  241.    {
  242.       var _loc1_ = tField;
  243.       var _loc3_ = arrTmp;
  244.       var objOutput = new Object();
  245.       var _loc2_ = 0;
  246.       while(_loc2_ < _loc3_.length)
  247.       {
  248.          if(strEnvironment == "Linux")
  249.          {
  250.             _loc1_.embedFonts = true;
  251.          }
  252.          _loc1_.text = _loc1_.text + _loc3_[_loc2_] + " ";
  253.          _loc1_.type = "dynamic";
  254.          _loc1_.selectable = false;
  255.          _loc1_.setTextFormat(objTF);
  256.          _loc1_.autoSize = true;
  257.          _loc1_.multiline = true;
  258.          iMC_Width = tmpWidth + _loc1_._width;
  259.          if(iMC_Width > this.iWidth)
  260.          {
  261.             break;
  262.          }
  263.          if(_loc3_[_loc2_] == "<p></p>")
  264.          {
  265.             _loc2_ = _loc2_ + 1;
  266.             strNewLine = true;
  267.             break;
  268.          }
  269.          _loc2_ = _loc2_ + 1;
  270.       }
  271.       objOutput.j = _loc2_;
  272.       objOutput.strNewLine = strNewLine;
  273.       objOutput.iMC_Width = iMC_Width;
  274.       return objOutput;
  275.    }
  276.    function displaySelectionClip()
  277.    {
  278.       var iTotalQuestions = this.c_arrQuesNos.length;
  279.       var mcSelectionClipHolder = this.fib.createEmptyMovieClip("mcSelectionClipHolder",this.c_iDepth + 1);
  280.       var _loc1_ = 1;
  281.       while(_loc1_ <= iTotalQuestions)
  282.       {
  283.          var _loc2_ = mcSelectionClipHolder.attachMovie("mcComboSelection","mcSelectionRect_" + _loc1_,_loc1_);
  284.          var _loc3_ = this.fib["Box" + (_loc1_ - 1)];
  285.          _loc2_._x = _loc3_._x - 1;
  286.          _loc2_._y = _loc3_._y - 1;
  287.          _loc1_ = _loc1_ + 1;
  288.       }
  289.       this.deselectAllCombo();
  290.    }
  291.    function addEventToDropDown(box, objRef)
  292.    {
  293.       var _loc1_ = this;
  294.       box.objBoxCombo = new Object();
  295.       box.objBoxCombo.objRef = _loc1_;
  296.       box.onSetFocus = function()
  297.       {
  298.          box.pCustomFocus = true;
  299.          var _loc1_ = Number(box._name.substr(-1));
  300.          box.objBoxCombo.objRef.showComboSelection(_loc1_ + 1);
  301.          box.objBoxCombo.objRef.showNavigationSelection(_loc1_,this.objRef);
  302.       };
  303.       box.objBoxCombo.change = function(evt)
  304.       {
  305.          var _loc1_ = box.getSelectedIndex();
  306.          this.objRef.onComboChanged(box,this.objRef,_loc1_);
  307.          box.pCustomFocus = false;
  308.       };
  309.       box.setChangeHandler("change",box.objBoxCombo);
  310.    }
  311.    function showComboSelection(iBoxNumber)
  312.    {
  313.       this.deselectAllCombo();
  314.       this.fib.mcSelectionClipHolder["mcSelectionRect_" + iBoxNumber].gotoAndStop("_SELECT");
  315.    }
  316.    function showNavigationSelection(iBoxNumber, objRef)
  317.    {
  318.       var _loc1_ = this;
  319.       var _loc2_ = iBoxNumber;
  320.       _loc1_.fileNo = _loc2_;
  321.       _loc1_.c_objNavRef.c_iSeleID = _loc1_.c_arrQuesNos[_loc2_];
  322.       _loc1_.c_objNavRef.c_preSelecetd = _loc1_.c_objNavRef.c_strSelecetd;
  323.       _loc1_.c_objNavRef.c_strSelecetd = "_" + _loc1_.c_iGroup + "_" + _loc1_.fileNo;
  324.       _loc1_.objRef.txt_QuestionNo.text = _loc1_.c_objSection.question[_loc2_].attributes.number;
  325.       _loc1_.c_objNavRef.navClickedfunction();
  326.    }
  327.    function deselectAllCombo()
  328.    {
  329.       var _loc3_ = this;
  330.       var _loc2_ = _loc3_.c_arrQuesNos.length;
  331.       var _loc1_ = 1;
  332.       while(_loc1_ <= _loc2_)
  333.       {
  334.          _loc3_.fib.mcSelectionClipHolder["mcSelectionRect_" + _loc1_].gotoAndStop("_DESELECT");
  335.          _loc1_ = _loc1_ + 1;
  336.       }
  337.    }
  338.    function arrangetext()
  339.    {
  340.       this.strText = this.strText.split("<p></p>").join(" <p></p> ");
  341.       var _loc3_ = this.strText.split("<gap type=\'dropdown\'>");
  342.       var arrData = new Array();
  343.       arrData.push(_loc3_[0]);
  344.       var _loc1_ = 1;
  345.       while(_loc1_ < _loc3_.length)
  346.       {
  347.          var _loc2_ = _loc3_[_loc1_].split("</gap>");
  348.          arrData.push(_loc2_[0]);
  349.          arrData.push(_loc2_[1]);
  350.          false;
  351.          _loc1_ = _loc1_ + 1;
  352.       }
  353.       false;
  354.       false;
  355.       return arrData;
  356.    }
  357.    function updateArray(_arr, _str, _iPos)
  358.    {
  359.       var _loc2_ = _arr;
  360.       var _loc3_ = new Array();
  361.       var _loc1_ = undefined;
  362.       _loc1_ = 0;
  363.       while(_loc1_ < _iPos + 1)
  364.       {
  365.          _loc3_.push(_loc2_[_loc1_]);
  366.          _loc1_ = _loc1_ + 1;
  367.       }
  368.       _loc3_.push("");
  369.       _loc3_.push(_str);
  370.       _loc1_;
  371.       while(_loc1_ < _loc2_.length)
  372.       {
  373.          _loc3_.push(_loc2_[_loc1_]);
  374.          _loc1_ = _loc1_ + 1;
  375.       }
  376.       false;
  377.       false;
  378.       delete _str;
  379.       delete _iPos;
  380.       return _loc3_;
  381.    }
  382.    function onComboChanged(box, objRef, iSelectedIndex)
  383.    {
  384.       var _loc1_ = this;
  385.       if(box.pCustomFocus)
  386.       {
  387.          var _loc3_ = box._name.substr(-1);
  388.          var _loc2_ = new Object();
  389.          var _strCorrAns = Number(box.strCorrectAnswer) - 1;
  390.          box.answered = "yes";
  391.          _loc2_.attempted = iSelectedIndex;
  392.          if(iSelectedIndex == _strCorrAns)
  393.          {
  394.             _loc2_.correct = 1;
  395.          }
  396.          else
  397.          {
  398.             _loc2_.correct = 0;
  399.          }
  400.          _loc1_.c_objNavRef.c_objTestRef.c_strCurrSelected = _loc3_;
  401.          _loc1_.c_objNavRef.c_objTestRef.c_iCurrQuestion = _loc1_.c_objSection.question[_loc3_].attributes.number;
  402.          _loc1_.objRef.txt_QuestionNo.text = _loc1_.c_objSection.question[_loc3_].attributes.number;
  403.          _loc1_.c_objNavRef.markAttempted();
  404.          _loc1_.c_objNavRef.c_objTestRef.appendQuesObject(_loc2_);
  405.          _loc1_.showNextButton();
  406.       }
  407.    }
  408.    function showNextButton()
  409.    {
  410.       var _loc2_ = this;
  411.       if(_loc2_.c_objNavRef.c_objTestRef.c_objScreenData.DOC.section.length - 1 != _loc2_.c_objNavRef.c_objTestRef.c_iPartNo)
  412.       {
  413.          if(_loc2_.c_strMode == "Review")
  414.          {
  415.             _loc2_.objRef.btn_next._visible = true;
  416.          }
  417.          else
  418.          {
  419.             var _loc1_ = 0;
  420.             while(_loc1_ < _loc2_.c_arrQuesNos.length)
  421.             {
  422.                _loc2_.objRef.btn_next._visible = true;
  423.                if(_loc2_.fib["Box" + _loc1_].answered == "no")
  424.                {
  425.                   _loc2_.objRef.btn_next._visible = false;
  426.                   break;
  427.                }
  428.                _loc1_ = _loc1_ + 1;
  429.             }
  430.          }
  431.       }
  432.    }
  433.    function navBtnClicked(_iCurrQuestion)
  434.    {
  435.       var _loc1_ = this;
  436.       var _loc3_ = _iCurrQuestion;
  437.       var _loc2_ = _loc1_.c_strMode == "Review";
  438.       _loc1_.fileNo = _loc3_;
  439.       _loc1_.showNextButton();
  440.       _loc1_.showComboSelection(_loc3_ + 1);
  441.       _loc1_.freeze(_loc2_);
  442.       _loc1_.showFeedback(_loc2_);
  443.       _loc1_.setScrollBarPosition(_loc3_);
  444.    }
  445.    function setScrollBarPosition(_iCurrQuestion)
  446.    {
  447.       var _loc2_ = this.fib["Box" + _iCurrQuestion];
  448.       var boxTargetX = _loc2_._x;
  449.       var _loc1_ = _loc2_._y;
  450.       if(_iCurrQuestion == 0)
  451.       {
  452.          _loc1_ = 0;
  453.       }
  454.       else
  455.       {
  456.          _loc1_ -= 75;
  457.       }
  458.       this.objRef.mc_ParagraphSP.setScrollPosition(0,_loc1_);
  459.    }
  460.    function freeze(_blnFreeze)
  461.    {
  462.       var _loc2_ = this;
  463.       var _loc3_ = _blnFreeze;
  464.       var _loc1_ = 0;
  465.       while(_loc1_ < _loc2_.c_arrQuesNos.length)
  466.       {
  467.          _loc2_.fib["Box" + _loc1_].enabled = !_loc3_;
  468.          _loc1_ = _loc1_ + 1;
  469.       }
  470.    }
  471.    function showFeedback(_bIfReview)
  472.    {
  473.       var _loc1_ = this;
  474.       _loc1_.hideAllFeedback();
  475.       if(_bIfReview)
  476.       {
  477.          var strCorrectID = _loc1_.getCorrectAnswer(_loc1_.fileNo);
  478.          var strQuestionID = _loc1_.getQueNo(_loc1_.fileNo);
  479.          var _loc2_ = _loc1_.c_objHMObj["get"](String(_loc1_.c_strSkill + "_" + strQuestionID));
  480.          var _loc3_ = Number(_loc2_.attempted);
  481.          if(_loc2_.correct == "0")
  482.          {
  483.             _loc1_.objRefContainer["mc_TickCross_" + (_loc3_ + 1)].gotoAndStop("INCORRECT");
  484.          }
  485.          _loc1_.objRefContainer["mc_TickCross_" + strCorrectID].gotoAndStop("CORRECT");
  486.       }
  487.    }
  488.    function hideAllFeedback()
  489.    {
  490.       var _loc3_ = this;
  491.       var _loc2_ = _loc3_.c_objSection.ReferencePoints.point.length;
  492.       var _loc1_ = 0;
  493.       while(_loc1_ < _loc2_)
  494.       {
  495.          _loc3_.objRefContainer["mc_TickCross_" + (_loc1_ + 1)].gotoAndStop("BLANK");
  496.          _loc1_ = _loc1_ + 1;
  497.       }
  498.    }
  499.    function fillComboData(objScrollContent, arrQuestions)
  500.    {
  501.       var _loc3_ = arrQuestions;
  502.       var iQueLen = _loc3_.length;
  503.       var _loc1_ = 0;
  504.       while(_loc1_ < iQueLen)
  505.       {
  506.          var arrComboData = new Array();
  507.          var queTextNo = _loc3_[_loc1_].attributes.number;
  508.          var queTextCorrectAns = _loc3_[_loc1_].attributes.correct;
  509.          var queTextChoicesLen = _loc3_[_loc1_].choices.choice.length;
  510.          var queNumber = _loc3_[_loc1_].attributes.number;
  511.          var _loc2_ = 0;
  512.          while(_loc2_ < queTextChoicesLen)
  513.          {
  514.             var queData = _loc3_[_loc1_].choices.choice[_loc2_].data;
  515.             var queID = _loc3_[_loc1_].choices.choice[_loc2_].attributes.id;
  516.             arrComboData.push({label:queData,data:queID});
  517.             _loc2_ = _loc2_ + 1;
  518.          }
  519.          objScrollContent["Box" + _loc1_].setDataProvider(arrComboData);
  520.          _loc1_ = _loc1_ + 1;
  521.       }
  522.    }
  523.    function setComboValues(arrQuestions)
  524.    {
  525.       var _loc3_ = this;
  526.       _level101.txt_Tracer1.text += "";
  527.       _level101.txt_Tracer1.text += "\n Inside - setComboValues";
  528.       _level101.txt_Tracer1.text += "\n arrQuestions.length : " + arrQuestions.length;
  529.       var _loc1_ = 0;
  530.       while(_loc1_ < arrQuestions.length)
  531.       {
  532.          var strQuestionID = arrQuestions[_loc1_].attributes.number;
  533.          _level101.txt_Tracer1.text += "\n Inside Loop strQuestionID : " + strQuestionID;
  534.          var _loc2_ = _loc3_.c_objHMObj["get"](String(_loc3_.c_strSkill + "_" + strQuestionID));
  535.          _level101.txt_Tracer1.text += "\n objHMObject : " + _loc2_;
  536.          if(_loc2_.attempted != null || _loc2_.attempted != undefined)
  537.          {
  538.             _loc3_.fib["Box" + _loc1_].answered = "yes";
  539.             _loc3_.fib["Box" + _loc1_].setSelectedIndex(_loc2_.attempted);
  540.          }
  541.          else
  542.          {
  543.             _level101.txt_Tracer1.text += "\n objHMObject.attempted == null or undefined or blank";
  544.             _loc3_.fib["Box" + _loc1_].setSelectedIndex(_loc2_.attempted);
  545.          }
  546.          _loc1_ = _loc1_ + 1;
  547.       }
  548.    }
  549.    function showReferenceText(mcScrollContent, objRefPoints)
  550.    {
  551.       var _loc3_ = mcScrollContent;
  552.       _loc3_.txt_RefText.htmlText = true;
  553.       var iTotalRefPoints = objRefPoints.point.length;
  554.       var iRPtext_xpos;
  555.       var iRPtext_ypos;
  556.       var iPlace;
  557.       var _loc2_ = 1;
  558.       while(_loc2_ <= iTotalRefPoints)
  559.       {
  560.          var strRefText = objRefPoints.point[_loc2_ - 1].text.data;
  561.          var strRefId = objRefPoints.point[_loc2_ - 1].id.data;
  562.          var _loc1_ = _loc3_.attachMovie("mc_RefText","mc_RefText_" + _loc2_,_loc2_);
  563.          _loc1_.txt_RefText.autoSize = true;
  564.          _loc1_.txt_RefText.multiline = true;
  565.          _loc1_.txt_RefText.autoSize = true;
  566.          _loc1_.txt_RefText.html = true;
  567.          _loc1_.txt_RefText.htmlText = strRefText;
  568.          _loc1_.txt_RefTextID.autoSize = true;
  569.          _loc1_.txt_RefTextID.html = true;
  570.          _loc1_.txt_RefTextID.htmlText = strRefId;
  571.          iPlace += _loc3_["mc_RefText_" + (_loc2_ - 1)].txt_RefText._y + _loc3_["mc_RefText_" + (_loc2_ - 1)]._height - 25;
  572.          _loc1_._y = iPlace;
  573.          var mcTickCross = _loc3_.attachMovie("mc_TickCrossL","mc_TickCross_" + _loc2_,950 + _loc2_);
  574.          mcTickCross._x = _loc1_._x + _loc1_._width + 1;
  575.          mcTickCross._y = _loc1_._y + 13;
  576.          _loc2_ = _loc2_ + 1;
  577.       }
  578.       var objResizeBox = new com.comp.ResizableBox();
  579.       var iHeaderHeight = objResizeBox.getHeaderHeight(this.objRef.mc_textcont);
  580.       var iHeight = iHeaderHeight + this.objRef.mc_RefScrollSize._height + 1;
  581.       var iWidth = this.objRef.mc_RefScrollSize._width;
  582.       objResizeBox.resizeBox(iWidth,iHeight,this.objRef.mc_textcont);
  583.    }
  584.    function getTitle(objSection)
  585.    {
  586.       var _loc1_ = undefined;
  587.       _loc1_ = objSection.title.data;
  588.       return _loc1_;
  589.    }
  590.    function getHeaderText(objSection)
  591.    {
  592.       var _loc1_ = undefined;
  593.       _loc1_ = objSection.headerText.data;
  594.       return _loc1_;
  595.    }
  596.    function getText(objSection)
  597.    {
  598.       var _loc1_ = undefined;
  599.       _loc1_ = objSection.text.data;
  600.       return _loc1_;
  601.    }
  602.    function getRefTest(objSection)
  603.    {
  604.       var _loc1_ = undefined;
  605.       _loc1_ = objSection.ReferencePoints;
  606.       return _loc1_;
  607.    }
  608.    function getCorrectAnswer(iComboNo)
  609.    {
  610.       var _loc2_ = this.c_objSection.question;
  611.       var queLength = _loc2_.length;
  612.       var _loc1_ = 0;
  613.       while(_loc1_ <= queLength)
  614.       {
  615.          if(_loc2_[_loc1_] == _loc2_[iComboNo])
  616.          {
  617.             var _loc3_ = _loc2_[_loc1_].attributes.correct;
  618.             return _loc3_;
  619.          }
  620.          _loc1_ = _loc1_ + 1;
  621.       }
  622.    }
  623.    function getQueNo(iComboNo)
  624.    {
  625.       var _loc2_ = this.c_objSection.question;
  626.       var _loc1_ = 0;
  627.       while(_loc1_ <= _loc2_.length)
  628.       {
  629.          if(_loc2_[_loc1_] == _loc2_[iComboNo])
  630.          {
  631.             var _loc3_ = _loc2_[_loc1_].attributes.number;
  632.             return _loc3_;
  633.          }
  634.          _loc1_ = _loc1_ + 1;
  635.       }
  636.    }
  637. }
  638.