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

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