home *** CD-ROM | disk | FTP | other *** search
/ FCE Gold Plus / GOLD.iso / pc / fscommand / linux / main.swf / scripts / __Packages / com / screen / FIB4.as < prev    next >
Encoding:
Text File  |  2007-09-06  |  22.6 KB  |  651 lines

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