home *** CD-ROM | disk | FTP | other *** search
/ FCE Gold Plus / GOLD.iso / pc / fscommand / assets / swfs / base.swf / scripts / __Packages / com / screen / Test.as < prev    next >
Encoding:
Text File  |  2007-10-10  |  83.9 KB  |  2,059 lines

  1. class com.screen.Test
  2. {
  3.    var c_objScreenData;
  4.    var c_objNavigator;
  5.    var c_iStartQuestion;
  6.    var c_strMode;
  7.    var c_arrToNavigator;
  8.    var c_arrAttepmtedToNav;
  9.    var objRef;
  10.    var c_strSkill;
  11.    var c_hQuestionState;
  12.    var c_objSourceRef;
  13.    var c_iPartNo;
  14.    var _parent;
  15.    var useHandCursor;
  16.    var gotoAndStop;
  17.    var objTimer;
  18.    var c_iTotalTestQuestions;
  19.    var c_objOptName;
  20.    function Test()
  21.    {
  22.    }
  23.    function init(_objScreenData, _objSourceRef)
  24.    {
  25.       var _loc1_ = this;
  26.       _loc1_.c_strMode = com.controller.UICoordinator.getInstance().currentMode;
  27.       _loc1_.c_arrToNavigator = new Array();
  28.       _loc1_.c_arrAttepmtedToNav = new Array();
  29.       _loc1_.c_objOptName = new Array();
  30.       _loc1_.c_objScreenData = _objScreenData["get"]("Test");
  31.       _loc1_.c_objSourceRef = _objSourceRef;
  32.       _loc1_.c_blnOnce = true;
  33.       _loc1_.c_iLastQustion = 0;
  34.       _loc1_.c_blnOnceMCQ2 = true;
  35.       _loc1_.c_blnOnceMCQ3 = true;
  36.       _loc1_.c_blnOnceMCQ4 = true;
  37.       _loc1_.c_blnOnceMCQ5 = true;
  38.       _loc1_.c_blnOnceMCQ7 = true;
  39.       _loc1_.c_blnAttachNext = true;
  40.       _loc1_.c_blnSoundController = false;
  41.       _loc1_.c_blnFIB2_2 = false;
  42.       _loc1_.c_blnUOEFIB3 = false;
  43.       _loc1_.c_blnPairedMCQExtract = false;
  44.       _loc1_.c_blnPairedDropDown = false;
  45.       _loc1_.c_blnDDCollection = false;
  46.       _loc1_.c_blnOnceMCQ8 = true;
  47.       _loc1_.c_blnAutoFillFib = true;
  48.       _loc1_.c_iStartQuestion = 1;
  49.       _loc1_.c_blnInitL1 = false;
  50.       _loc1_.c_blnInitL2 = false;
  51.       _loc1_.c_blnInitL4 = false;
  52.       _loc1_.c_blnPairedScrolling = true;
  53.       _loc1_.c_strEnvironment = com.controller.UICoordinator.getInstance().getOSEnvironment();
  54.       _loc1_.c_objMCQContainer = new Object();
  55.       _loc1_.countTotalQuestions(_loc1_.c_objScreenData);
  56.       _loc1_.countTotalTestMark();
  57.       _loc1_.c_hQuestionState = new com.util.HashMap();
  58.       if(_loc1_.c_strMode == "Continue" || _loc1_.c_strMode == "Review")
  59.       {
  60.          if(_objScreenData["get"]("Result") != undefined && _objScreenData["get"]("Result") != null)
  61.          {
  62.             var _loc3_ = new Object();
  63.             _loc3_ = _objScreenData["get"]("Result").result;
  64.             var objTemp = new Object();
  65.             var arrAttemptedQNos = new Array();
  66.             var strQuestionExists = _loc3_.question.attributes.number.split("_")[1];
  67.             if((_loc3_.question.length == null || _loc3_.question.length == undefined) && (strQuestionExists != null || strQuestionExists != undefined))
  68.             {
  69.                var strQuestionNumber = _loc3_.question.attributes.number;
  70.                var objTemp = new Object();
  71.                objTemp.attempted = _loc3_.question.attemptedoption.data;
  72.                objTemp.correct = _loc3_.question.correct.data;
  73.                objTemp.answeroption = _loc3_.question.answeroption.data;
  74.                _loc1_.arrForNavigator(objTemp,strQuestionNumber,arrAttemptedQNos);
  75.             }
  76.             var _loc2_ = 0;
  77.             while(_loc2_ < _loc3_.question.length)
  78.             {
  79.                var objTemp = new Object();
  80.                objTemp.attempted = _loc3_.question[_loc2_].attemptedoption.data;
  81.                objTemp.correct = _loc3_.question[_loc2_].correct.data;
  82.                objTemp.answeroption = _loc3_.question[_loc2_].answeroption.data;
  83.                var strQuestionNumber = _loc3_.question[_loc2_].attributes.number;
  84.                _loc1_.arrForNavigator(objTemp,strQuestionNumber,arrAttemptedQNos);
  85.                _loc2_ = _loc2_ + 1;
  86.             }
  87.             if(_loc1_.c_strMode == "Continue")
  88.             {
  89.                _loc1_.c_iStartQuestion = _loc1_.getFirstUnattempted(arrAttemptedQNos);
  90.             }
  91.          }
  92.       }
  93.       _loc1_.c_arrQuestionTypes = new Array();
  94.       _loc1_.c_iScore = 0;
  95.       _loc1_.loadScreen();
  96.    }
  97.    function countTotalQuestions(_objScreenData)
  98.    {
  99.       var _loc2_ = undefined;
  100.       var iTotalSections = _objScreenData.DOC.section.length;
  101.       var iTotalQuestions = 0;
  102.       if(iTotalSections == undefined || iTotalSections == null || iTotalSections == "")
  103.       {
  104.          iTotalSections = 1;
  105.       }
  106.       var _loc3_ = 0;
  107.       while(_loc3_ < iTotalSections)
  108.       {
  109.          _loc2_ = _objScreenData.DOC.section[_loc3_];
  110.          if(_loc2_ == undefined || _loc2_ == null)
  111.          {
  112.             _loc2_ = _objScreenData.DOC.section;
  113.          }
  114.          var _loc1_ = _loc2_.question.length;
  115.          !(_loc1_ == undefined || _loc1_ == null || _loc1_ == "") ? (iTotalQuestions += _loc1_) : iTotalQuestions++;
  116.          _loc3_ = _loc3_ + 1;
  117.       }
  118.       this.setTotalTestQuestions(iTotalQuestions);
  119.    }
  120.    function countTotalTestMark()
  121.    {
  122.       var iTotalSections = this.c_objScreenData.DOC.section.length;
  123.       var iTotalMark = 0;
  124.       var _loc1_ = undefined;
  125.       if(iTotalSections == undefined || iTotalSections == null || iTotalSections == "")
  126.       {
  127.          iTotalSections = 1;
  128.       }
  129.       var _loc3_ = 0;
  130.       while(_loc3_ < iTotalSections)
  131.       {
  132.          _loc1_ = this.c_objScreenData.DOC.section[_loc3_];
  133.          if(_loc1_ == null || _loc1_ == undefined)
  134.          {
  135.             _loc1_ = this.c_objScreenData.DOC.section;
  136.          }
  137.          if(_loc1_.attributes.assessed == "true")
  138.          {
  139.             var _loc2_ = _loc1_.question.length;
  140.             if(_loc2_ == undefined || _loc2_ == null || _loc2_ == "")
  141.             {
  142.                iTotalMark += _loc1_.attributes.maxMark * 1;
  143.             }
  144.             else
  145.             {
  146.                iTotalMark += _loc1_.attributes.maxMark * _loc2_;
  147.             }
  148.          }
  149.          _loc3_ = _loc3_ + 1;
  150.       }
  151.       com.controller.UICoordinator.getInstance().setTotalTestMark(iTotalMark);
  152.    }
  153.    function arrForNavigator(objTemp, strQuestionNumber, arrAttemptedQNos)
  154.    {
  155.       var _loc1_ = strQuestionNumber;
  156.       var _loc2_ = this;
  157.       var _loc3_ = objTemp;
  158.       _loc2_.c_hQuestionState.put(_loc1_,_loc3_);
  159.       _loc2_.c_arrToNavigator[Number(_loc1_.split("_")[1]) - 1] = _loc3_.correct;
  160.       _loc2_.c_arrAttepmtedToNav[Number(_loc1_.split("_")[1]) - 1] = _loc3_.attempted;
  161.       arrAttemptedQNos.push(Number(_loc1_.split("_")[1]));
  162.    }
  163.    function getFirstUnattempted(_arrAttemptedQNos)
  164.    {
  165.       var _loc2_ = _arrAttemptedQNos;
  166.       var _loc3_ = 0;
  167.       var iStartNo = 1;
  168.       if(_loc2_[0] > iStartNo)
  169.       {
  170.          return 1;
  171.       }
  172.       var _loc1_ = 1;
  173.       while(_loc1_ <= _loc2_.length)
  174.       {
  175.          if(_loc2_[_loc1_] != _loc2_[_loc1_ - 1] + 1)
  176.          {
  177.             break;
  178.          }
  179.          _loc3_ = _loc3_ + 1;
  180.          _loc1_ = _loc1_ + 1;
  181.       }
  182.       return _loc2_[_loc3_] + 1;
  183.    }
  184.    function loadScreen()
  185.    {
  186.       var _loc1_ = this;
  187.       _level101.gotoAndStop("TEST");
  188.       _level101.txt_UserName.text = "Name: " + _loc1_.c_objSourceRef.c_objUICoodInstance.userName;
  189.       _level101.btn_submitTest._visible = false;
  190.       _loc1_.attachPopUp();
  191.       _loc1_.setEvents();
  192.       _loc1_.attachAllClips();
  193.       _loc1_.c_iInterval = setInterval(_loc1_.loadScreenInterval,50,_loc1_);
  194.    }
  195.    function loadScreenInterval(objRef)
  196.    {
  197.       var _loc1_ = objRef;
  198.       clearInterval(_loc1_.c_iInterval);
  199.       _loc1_.arrangeNavigation();
  200.       if(_loc1_.c_strMode != "Review")
  201.       {
  202.          _loc1_.displayTimer();
  203.       }
  204.       else
  205.       {
  206.          _level101.mc_Timer._visible = false;
  207.          _level101.btn_quitTest._visible = false;
  208.          _level101.btn_submitTest._visible = false;
  209.          _level101.btn_quit._visible = false;
  210.          _level101.btn_backToMenu._visible = true;
  211.       }
  212.    }
  213.    function arrangeRubric()
  214.    {
  215.       var _loc2_ = this;
  216.       var _loc3_ = _loc2_.c_objScreenData.DOC.section[_loc2_.c_iPartNo].attributes.rubricClip;
  217.       var _loc1_ = _level101.attachMovie(_loc3_,"rubricBox",_level101.getNextHighestDepth(),{_x:8,_y:34.5});
  218.       _loc1_.txt_rubric.html = true;
  219.       _loc1_.txt_rubric.htmlText = _loc2_.c_objScreenData.DOC.section[_loc2_.c_iPartNo].rubric.data;
  220.    }
  221.    function displayTimer()
  222.    {
  223.       var _loc1_ = this;
  224.       _level101.mc_Timer._visible = true;
  225.       _level101.btn_quitTest._visible = true;
  226.       _level101.btn_quit._visible = true;
  227.       _level101.btn_backToMenu._visible = false;
  228.       if(_loc1_.c_strMode == "Continue")
  229.       {
  230.          var _loc2_ = com.controller.UICoordinator.getInstance().timeLeft;
  231.          var _iMinLeft = _loc2_.split(".")[0];
  232.          var _loc3_ = _loc2_.split(".")[1];
  233.          _loc1_.objTimer = new com.comp.Timer(_level101,Number(_iMinLeft) + 1,Number(_loc3_),"mc_timer","txt_time",_loc1_);
  234.       }
  235.       else
  236.       {
  237.          var _iTotalTime = com.controller.UICoordinator.getInstance().getTestTime();
  238.          _loc1_.objTimer = new com.comp.Timer(_level101,_iTotalTime,60,"mc_timer","txt_time",_loc1_);
  239.       }
  240.    }
  241.    function attachAllClips()
  242.    {
  243.       var _loc3_ = this;
  244.       var iTotalSections = _loc3_.c_objScreenData.DOC.section.length;
  245.       var _loc1_ = 0;
  246.       while(_loc1_ < iTotalSections)
  247.       {
  248.          var _loc2_ = _loc3_.c_objScreenData.DOC.section[_loc1_].attributes.templateType;
  249.          var iXPos = Number(_loc3_.c_objScreenData.DOC.section[_loc1_].attributes.XPos);
  250.          var iYPos = Number(_loc3_.c_objScreenData.DOC.section[_loc1_].attributes.YPos);
  251.          var mcQuestion = _level101.attachMovie(_loc2_,_loc2_,151 + _loc1_,{_x:iXPos,_y:iYPos});
  252.          mcQuestion._visible = false;
  253.          _loc1_ = _loc1_ + 1;
  254.       }
  255.    }
  256.    function arrangeNavigation()
  257.    {
  258.       var arrNav = new Array();
  259.       var _loc3_ = this.c_objScreenData.DOC.section;
  260.       var _loc1_ = 0;
  261.       while(_loc1_ < _loc3_.length)
  262.       {
  263.          var _loc2_ = "";
  264.          if(_loc3_[_loc1_].question.length != undefined)
  265.          {
  266.             var i = 0;
  267.             while(i < _loc3_[_loc1_].question.length)
  268.             {
  269.                _loc2_ = _loc2_ + _loc3_[_loc1_].question[i].attributes.number + ",";
  270.                i++;
  271.             }
  272.             _loc2_ = _loc2_.substr(0,_loc2_.length - 1);
  273.             arrNav.push({id:_loc2_,type:_loc3_[_loc1_].attributes.navType,skill:_loc3_[_loc1_].attributes.skill});
  274.          }
  275.          else
  276.          {
  277.             _loc2_ = _loc3_[_loc1_].question.attributes.number;
  278.             arrNav.push({id:_loc2_,type:_loc3_[_loc1_].attributes.navType,skill:_loc3_[_loc1_].attributes.skill});
  279.          }
  280.          false;
  281.          _loc1_ = _loc1_ + 1;
  282.       }
  283.       var SkillType;
  284.       SkillType = this.c_objScreenData.DOC.section[0].attributes.skill;
  285.       var iNavYPos = this.c_objScreenData.DOC.attributes.YPos;
  286.       this.c_objNavigator = new com.comp.Navigator(_level101,arrNav,SkillType,490,380,iNavYPos,this,this.c_iStartQuestion);
  287.       this.c_objNavigator.showResult();
  288.       if(this.c_strMode == "Review" || this.c_strMode == "Continue")
  289.       {
  290.          this.c_objNavigator.reviewNav(this.c_arrToNavigator,this.c_strMode,this.c_arrAttepmtedToNav);
  291.       }
  292.    }
  293.    function handleSound11()
  294.    {
  295.       var _loc1_ = this;
  296.       if(!_loc1_.c_objSoundController)
  297.       {
  298.       }
  299.       _loc1_.c_objSoundController = new com.comp.Soundconroller(_level101,604,47,null,1,"soundBtn");
  300.       if(!_loc1_.c_objVolumeController)
  301.       {
  302.       }
  303.       if(!_loc1_.c_blnSoundController)
  304.       {
  305.          var _loc2_ = com.controller.UICoordinator.getInstance().volumeLevel;
  306.          if(_loc2_ == "" or _loc2_ == undefined or _loc2_ == null)
  307.          {
  308.             _loc2_ = 50;
  309.          }
  310.          _loc1_.c_objVolumeController = new com.comp.Volumecontroller(_level101,534,5.5,_loc2_);
  311.          _loc1_.c_blnSoundController = true;
  312.       }
  313.       else
  314.       {
  315.          _loc1_.c_objSoundController.c_icount = 0;
  316.          _loc1_.c_objSoundController.c_ivolume = _loc1_.c_objVolumeController.getLevel();
  317.       }
  318.       _loc1_.c_objSoundController.c_selfRef = _loc1_.c_objVolumeController;
  319.       _loc1_.c_objSoundController.setVolumeValue(_loc1_.c_objVolumeController.getLevel());
  320.    }
  321.    function showScreen(_strTemplateType, _strSelected, _iCurrQuestion, _strSkill)
  322.    {
  323.       var _loc1_ = this;
  324.       var _loc2_ = _strSelected;
  325.       _loc1_.c_iCurrQuestion = _iCurrQuestion;
  326.       _loc1_.c_strSelected = _loc2_;
  327.       _loc1_.c_strSkill = _strSkill;
  328.       switch(_strTemplateType)
  329.       {
  330.          case "MCQType_1":
  331.             _loc1_.initMCQType1();
  332.             break;
  333.          case "MCQType_2":
  334.             _loc1_.initMCQType2();
  335.             break;
  336.          case "MCQType_3":
  337.             _loc1_.initMCQType3(_loc2_);
  338.             break;
  339.          case "MCQType_4":
  340.             _loc1_.initMCQType4(_loc2_);
  341.             break;
  342.          case "PairedMCQScrolling":
  343.             _loc1_.initPairedMCQScrolling();
  344.             break;
  345.          case "MCQType_5":
  346.             _loc1_.initMCQType5();
  347.             break;
  348.          case "FIBType_1":
  349.             _loc1_.initFIB1();
  350.             break;
  351.          case "AutoFillFib":
  352.             _loc1_.initAutoFillFib();
  353.             break;
  354.          case "FIBType_2":
  355.             _loc1_.initWordCount();
  356.             break;
  357.          case "FIBType_3":
  358.             _loc1_.initMCQType7();
  359.             break;
  360.          case "MCQType_6":
  361.             _loc1_.initMCQTypeL1();
  362.             break;
  363.          case "PairedMCQExtract":
  364.             _loc1_.initPairedMCQExtract();
  365.             break;
  366.          case "MCQType_7":
  367.             _loc1_.initMCQTypeL2();
  368.             break;
  369.          case "MCQType_8":
  370.             _loc1_.initMCQType8();
  371.             break;
  372.          case "FIBType_6":
  373.             _loc1_.initFIBType6();
  374.             break;
  375.          case "FIBType_4":
  376.             _loc1_.initMCQTypeL3();
  377.             break;
  378.          case "FIBType_5":
  379.             _loc1_.initFIBType5();
  380.             break;
  381.          case "UOEFIBType_5":
  382.             _loc1_.initUOEFIBType5();
  383.             break;
  384.          case "PairedDropDown":
  385.             _loc1_.initPairedDropDown();
  386.             break;
  387.          case "DropDownCollection":
  388.             _loc1_.initDDCollection();
  389.       }
  390.    }
  391.    function commonToAllMCQs()
  392.    {
  393.       var _loc1_ = this;
  394.       _level101.MCQ_Q1.init();
  395.       _loc1_.c_objMCQ = new com.screen.MCQ(_loc1_);
  396.       _level101.MCQ_Q1.objTimelineRef = _loc1_.c_objMCQ;
  397.    }
  398.    function commonToAllQs()
  399.    {
  400.       var _loc1_ = this;
  401.       _loc1_.c_iPartNo = Number(_loc1_.c_strSelected.split("_")[1]);
  402.       _loc1_.arrangeRubric();
  403.       _loc1_.c_iQuestionNo = Number(_loc1_.c_strSelected.split("_")[2]) + 1;
  404.       var _loc2_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].attributes.templateType;
  405.       _level101[_loc2_]._visible = true;
  406.       return _loc2_;
  407.    }
  408.    function initNext(_strQuesType)
  409.    {
  410.       var _loc1_ = this;
  411.       var _iSectionLength = Number(_loc1_.c_objScreenData.DOC.section.length);
  412.       var _objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question;
  413.       var _loc3_ = Number(_loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question.length);
  414.       var _loc2_ = _level101[_strQuesType];
  415.       if(_loc1_.c_strMode == "Review")
  416.       {
  417.          if(_loc1_.c_objNavigator.c_iSeleID == _loc3_ && _loc1_.c_iPartNo == _iSectionLength - 1)
  418.          {
  419.             _loc2_.btn_next._visible = false;
  420.          }
  421.          else
  422.          {
  423.             _loc2_.btn_next._visible = true;
  424.          }
  425.       }
  426.       else
  427.       {
  428.          _loc2_.btn_next._visible = false;
  429.       }
  430.       _loc2_.btn_next.objRef = _loc1_;
  431.       _loc2_.btn_next.onRelease = function()
  432.       {
  433.          this.objRef.c_objNavigator.nextBtn();
  434.       };
  435.    }
  436.    function selectAndFreeze()
  437.    {
  438.       var _loc1_ = this;
  439.       if(_loc1_.c_objHMObject != undefined && _loc1_.c_objHMObject != null)
  440.       {
  441.          _level101.MCQ_Q1.setSelect(String(_loc1_.c_objHMObject.attempted));
  442.       }
  443.       if(_loc1_.c_strMode == "Review")
  444.       {
  445.          _level101.MCQ_Q1.freeze(true);
  446.       }
  447.    }
  448.    function initMCQType1()
  449.    {
  450.       var _loc1_ = this;
  451.       var _loc2_ = _loc1_.commonToAllQs();
  452.       _loc1_.commonToAllMCQs();
  453.       _loc1_.initNext(_loc2_);
  454.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  455.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  456.       var iTotalChoices = _loc3_.choice.length;
  457.       var iCorrectAnswer = _loc3_.attributes.correct;
  458.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  459.       _loc1_.c_objMCQ.init(iTotalChoices,iCorrectAnswer,_loc3_,_level101[_loc2_],451,"1",null,_loc1_.c_strSkill,true);
  460.       _loc1_.selectAndFreeze();
  461.    }
  462.    function initMCQTypeL1()
  463.    {
  464.       var _loc1_ = this;
  465.       var _loc3_ = _loc1_.commonToAllQs();
  466.       _loc1_.commonToAllMCQs();
  467.       _loc1_.initNext(_loc3_);
  468.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc3_;
  469.       var _loc2_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  470.       var iTotalChoices = _loc2_.choice.length;
  471.       var iCorrectAnswer = _loc2_.attributes.correct;
  472.       _loc1_.handleSound11();
  473.       var strSoundName = _loc2_.audio.data;
  474.       _loc1_.c_objSoundController.setSoundFile("tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName);
  475.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  476.       _loc1_.c_objMCQ.init(iTotalChoices,iCorrectAnswer,_loc2_,_level101[_loc3_],680,"MCQType_6",null,_loc1_.c_strSkill,false);
  477.       _loc1_.selectAndFreeze();
  478.    }
  479.    function initMCQType2()
  480.    {
  481.       var _loc1_ = this;
  482.       var strClipName = _loc1_.commonToAllQs();
  483.       var _loc3_ = _level101[strClipName];
  484.       _loc1_.commonToAllMCQs();
  485.       var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  486.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  487.       var iTotalChoices = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].paragraph.length;
  488.       var iTotalQuestionChoices = objQuestion.choice.length;
  489.       var strCorrectAnswer = objQuestion.attributes.correct.toLowerCase().charCodeAt(0);
  490.       var iCorrectAnswer = objQuestion.attributes.correct;
  491.       if(_loc1_.c_blnOnceMCQ2)
  492.       {
  493.          _loc3_.mc_ScrollPaneContent.setScrollContent("mc_ScrollContent");
  494.          _loc3_.mc_ScrollContent = _level101[strClipName].mc_ScrollPaneContent.getScrollContent();
  495.          _loc3_.mc_ScrollPaneContent.setSize(_level101[strClipName].mc_ScrollReference._width,_level101[strClipName].mc_ScrollReference._height);
  496.          _loc3_.mc_ScrollPaneContent._x = _level101[strClipName].mc_ScrollReference._x;
  497.          _loc3_.mc_ScrollPaneContent._y = _level101[strClipName].mc_ScrollReference._y;
  498.          _loc3_.mc_ScrollContent.txt_Description.selectable = false;
  499.          _loc1_.c_blnOnceMCQ2 = false;
  500.       }
  501.       if(objSection.paragraphTitle.data.length > 0)
  502.       {
  503.          _loc3_.mc_ScrollContent.txt_Description.htmlText = "<p align=\'center\'><b>" + objSection.paragraphTitle.data + "<br><br></b>";
  504.       }
  505.       else
  506.       {
  507.          _loc3_.mc_ScrollContent.txt_Description.htmlText = "";
  508.       }
  509.       var _loc2_ = 1;
  510.       while(_loc2_ <= iTotalChoices)
  511.       {
  512.          var strTitle = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].paragraph[_loc2_ - 1].title.data;
  513.          var strText = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].paragraph[_loc2_ - 1].text.data;
  514.          _loc3_.mc_ScrollContent.txt_Description.autoSize = true;
  515.          _loc3_.mc_ScrollContent.txt_Description.htmlText += "<b>" + String.fromCharCode(64 + _loc2_) + " - " + strTitle + "</b>" + "<p></p>" + strText + "<p></p>" + "<p></p>";
  516.          _loc2_ = _loc2_ + 1;
  517.       }
  518.       _loc3_.mc_ScrollPaneContent.refreshPane();
  519.       _loc1_.initNext(strClipName);
  520.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = strClipName;
  521.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  522.       _loc1_.c_objMCQ.init(iTotalQuestionChoices,iCorrectAnswer,objQuestion,_level101[strClipName],331.9,"MCQType_2",objSection,_loc1_.c_strSkill,true);
  523.       _loc1_.selectAndFreeze();
  524.    }
  525.    function initMCQTypeL2()
  526.    {
  527.       var _loc1_ = this;
  528.       var strClipName = _loc1_.commonToAllQs();
  529.       var iTotalQuestions = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question.length;
  530.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  531.       var strSoundName = objSection.audio.data;
  532.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = strClipName;
  533.       if(!_loc1_.c_blnInitL2)
  534.       {
  535.          var _loc2_ = 0;
  536.          while(_loc2_ < iTotalQuestions)
  537.          {
  538.             var strInstanceName = "MCQ_Q_" + (_loc2_ + 1);
  539.             var _loc3_ = new com.comp.ComponentMCQ();
  540.             _loc3_.init();
  541.             var objMCQ = new com.screen.MCQ(_loc1_);
  542.             _loc3_.objTimelineRef = objMCQ;
  543.             _loc1_.c_objMCQContainer[strInstanceName] = objMCQ;
  544.             _loc2_ = _loc2_ + 1;
  545.          }
  546.          _loc1_.handleSound11();
  547.          _loc1_.c_blnInitL2 = true;
  548.       }
  549.       var strSound = "tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName;
  550.       if(_loc1_.c_objNavigator.c_blnPartChange)
  551.       {
  552.          _loc1_.c_objSoundController.setSoundFile(strSound);
  553.          _loc1_.c_objNavigator.c_blnPartChange = false;
  554.       }
  555.       _loc1_.initNext(strClipName);
  556.       var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  557.       var iTotalChoices = objQuestion.choice.length;
  558.       var iCorrectAnswer = objQuestion.attributes.correct;
  559.       _loc1_.c_objMCQContainer["MCQ_Q_" + _loc1_.c_iQuestionNo].init(iTotalChoices,iCorrectAnswer,objSection,_level101[strClipName],493,"MCQType_7",objSection,_loc1_.c_strSkill,false);
  560.       _loc1_.showSectionData(objSection);
  561.       var bFreeze = _loc1_.c_strMode == "Review";
  562.       _loc1_.setFreezeMode(objSection,bFreeze);
  563.       if(_loc1_.c_strMode == "Review")
  564.       {
  565.          var bLastPart = _loc1_.c_iPartNo == _loc1_.c_objScreenData.DOC.section.length - 1;
  566.          _level101[strClipName].btn_Next._visible = !bLastPart;
  567.       }
  568.    }
  569.    function showSectionData(objSection)
  570.    {
  571.       var iQuesCount = objSection.question.length;
  572.       var _loc1_ = 0;
  573.       while(_loc1_ < iQuesCount)
  574.       {
  575.          var _loc3_ = objSection.question[_loc1_].attributes.number;
  576.          var _loc2_ = this.c_hQuestionState["get"](String(this.c_strSkill + "_" + _loc3_));
  577.          if(_loc2_ != null || _loc2_ != undefined)
  578.          {
  579.             _level101["ComponentMCQ_" + (_loc1_ + 1)].setSelect(String(_loc2_.attempted));
  580.          }
  581.          _loc1_ = _loc1_ + 1;
  582.       }
  583.    }
  584.    function setFreezeMode(objSection, bFreeze)
  585.    {
  586.       var _loc3_ = bFreeze;
  587.       var _loc2_ = objSection.question.length;
  588.       var _loc1_ = 1;
  589.       while(_loc1_ <= _loc2_)
  590.       {
  591.          _level101["ComponentMCQ_" + _loc1_].freeze(_loc3_);
  592.          _loc1_ = _loc1_ + 1;
  593.       }
  594.    }
  595.    function initMCQType3()
  596.    {
  597.       var _loc1_ = this;
  598.       var strClipName = _loc1_.commonToAllQs();
  599.       _loc1_.commonToAllMCQs();
  600.       var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  601.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  602.       var iTotalChoices = objQuestion.choice.length;
  603.       var iCorrectAnswer = objQuestion.attributes.correct;
  604.       if(_loc1_.c_blnOnceMCQ3)
  605.       {
  606.          var _loc2_ = 1;
  607.          while(_loc2_ <= iTotalChoices)
  608.          {
  609.             var strTitle = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].textTitle.data;
  610.             var strText = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].text.data;
  611.             var _loc3_ = new com.comp.WordWrap();
  612.             _loc3_.init(_level101[strClipName],strTitle,strText,575,9,480);
  613.             _loc2_ = _loc2_ + 1;
  614.          }
  615.          _loc1_.c_blnOnceMCQ3 = false;
  616.       }
  617.       _loc1_.initNext(strClipName);
  618.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = strClipName;
  619.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  620.       _loc1_.c_objMCQ.init(iTotalChoices,iCorrectAnswer,objQuestion,_level101[strClipName],214,"3",objSection,_loc1_.c_strSkill,false);
  621.       _loc1_.selectAndFreeze();
  622.    }
  623.    function initMCQType4()
  624.    {
  625.       var _loc1_ = this;
  626.       var _loc3_ = _loc1_.commonToAllQs();
  627.       _loc1_.commonToAllMCQs();
  628.       var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  629.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  630.       var iTotalChoices = objQuestion.choice.length;
  631.       var iCorrectAnswer = objQuestion.attributes.correct;
  632.       if(_loc1_.c_blnOnceMCQ4)
  633.       {
  634.          var strTitle = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].title.data;
  635.          var strText = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].text.data;
  636.          var _iCurrentQuestion = Number(objQuestion.attributes.number);
  637.          var _iTotalQuestions = Number(objSection.question.length);
  638.          _loc1_.c_iLastQustion = Number(_iTotalQuestions + _iCurrentQuestion - 1);
  639.          var mcScrollPane = _level101[_loc3_].attachMovie("FScrollPaneSymbol","mcReadingScroll",_level101[_loc3_].getNextHighestDepth());
  640.          var iScrollPaneW = _level101[_loc3_].mc_ScrollBarRef._width;
  641.          var iScrollPaneH = _level101[_loc3_].mc_ScrollBarRef._height;
  642.          var iScrollPaneX = _level101[_loc3_].mc_ScrollBarRef._x;
  643.          var iScrollPaneY = _level101[_loc3_].mc_ScrollBarRef._y;
  644.          mcScrollPane.setSize(iScrollPaneW - 1,iScrollPaneH - 2);
  645.          mcScrollPane._x = iScrollPaneX;
  646.          mcScrollPane._y = iScrollPaneY + 1;
  647.          var strTextFormat = new TextFormat();
  648.          strTextFormat.leftMargin = 7;
  649.          mcScrollPane.setScrollContent("mc_ScrollContent");
  650.          var _loc2_ = mcScrollPane.getScrollContent();
  651.          _loc2_.txt_Description.autoSize = true;
  652.          _loc2_.titleTxt.autoSize = true;
  653.          _loc2_.txt_Description.htmlText = strText;
  654.          _loc2_.txt_Description.setTextFormat(strTextFormat);
  655.          if(strTitle != null && strTitle != "")
  656.          {
  657.             _loc2_.createTextField("titleTxt",15000,0,0,0,0);
  658.             _loc1_.displayTitleText(_loc2_,strTitle);
  659.             if(_loc1_.c_strEnvironment == "Linux")
  660.             {
  661.                _loc2_.titleTxt.embedFonts = true;
  662.             }
  663.             _loc2_.titleTxt.autoSize = "left";
  664.             _loc2_.txt_Description._y = _loc2_.titleTxt.textHeight + 8;
  665.          }
  666.          mcScrollPane.refreshPane();
  667.          _loc1_.c_blnOnceMCQ4 = false;
  668.       }
  669.       _loc1_.initNext(_loc3_);
  670.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc3_;
  671.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  672.       _loc1_.c_objMCQ.init(iTotalChoices,iCorrectAnswer,objQuestion,_level101[_loc3_],330,"MCQType_4",objSection,_loc1_.c_strSkill,false);
  673.       _loc1_.selectAndFreeze();
  674.    }
  675.    function displayTitleText(mcScrollContent, strTitle)
  676.    {
  677.       var _loc2_ = mcScrollContent;
  678.       var _loc1_ = new TextFormat();
  679.       _loc1_.font = "Verdana";
  680.       _loc1_.size = 11;
  681.       _loc1_.color = "0x000000";
  682.       _loc1_.align = "center";
  683.       _loc2_.titleTxt.autoSize = true;
  684.       _loc2_.titleTxt.html = true;
  685.       _loc2_.titleTxt.htmlText = strTitle;
  686.       _loc2_.titleTxt.multiline = true;
  687.       _loc2_.titleTxt.selectable = false;
  688.       _loc2_.titleTxt.text.autoSize = true;
  689.       _loc2_.titleTxt.setTextFormat(_loc1_);
  690.       false;
  691.    }
  692.    function initPairedMCQExtract()
  693.    {
  694.       var _loc2_ = this;
  695.       var strClipName = _loc2_.commonToAllQs();
  696.       _loc2_.commonToAllMCQs();
  697.       _loc2_.c_arrQuestionTypes[_loc2_.c_iPartNo] = strClipName;
  698.       var objSection = _loc2_.c_objScreenData.DOC.section[_loc2_.c_iPartNo];
  699.       var objQuestion = _loc2_.c_objScreenData.DOC.section[_loc2_.c_iPartNo].question[_loc2_.c_iQuestionNo - 1];
  700.       var _loc3_ = Number(objQuestion.attributes.number);
  701.       var iTotalChoices = objQuestion.choice.length;
  702.       var iCorrectAnswer = objQuestion.attributes.correct;
  703.       _loc2_.initNext(strClipName);
  704.       _loc2_.c_objMCQ.init(iTotalChoices,iCorrectAnswer,objQuestion,_level101[strClipName],680,"PairedMCQExtract",objSection,_loc2_.c_strSkill,false,_loc3_);
  705.       if(_loc3_ % 2 == 0)
  706.       {
  707.          _loc2_.showSectionDataMCQ(_loc3_ - 1,_loc3_);
  708.       }
  709.       if(_loc3_ % 2 == 1)
  710.       {
  711.          _loc2_.showSectionDataMCQ(_loc3_,_loc3_ + 1);
  712.       }
  713.       if(!_loc2_.c_blnPairedMCQExtract)
  714.       {
  715.          _loc2_.c_blnPairedMCQExtract = true;
  716.       }
  717.       if(_loc2_.c_iPairID != null || _loc2_.c_iPairID != undefined)
  718.       {
  719.          if(_loc2_.c_iPairID != _loc2_.c_iPrevPairID || _loc2_.c_objNavigator.c_blnPartChange)
  720.          {
  721.             _loc2_.handleSound11();
  722.             var strSoundName = objSection.extract[_loc2_.c_iPairID].audio.data;
  723.             var strSound = "tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName;
  724.             _loc2_.c_objSoundController.setSoundFile(strSound);
  725.             _loc2_.c_iPrevPairID = _loc2_.c_iPairID;
  726.             _loc2_.c_objNavigator.c_blnPartChange = false;
  727.          }
  728.       }
  729.       if(_loc2_.c_strMode == "Review")
  730.       {
  731.          var queObj = objSection.question;
  732.          var _loc1_ = 0;
  733.          while(_loc1_ < queObj.length)
  734.          {
  735.             _level101.MCQ_Q1["ComponentMCQ_" + _loc1_].freeze(true);
  736.             _loc1_ = _loc1_ + 1;
  737.          }
  738.       }
  739.    }
  740.    function initPairedMCQScrolling()
  741.    {
  742.       var _loc2_ = this;
  743.       var strClipName = _loc2_.commonToAllQs();
  744.       _loc2_.commonToAllMCQs();
  745.       var objQuestion = _loc2_.c_objScreenData.DOC.section[_loc2_.c_iPartNo].question[_loc2_.c_iQuestionNo - 1];
  746.       var objSection = _loc2_.c_objScreenData.DOC.section[_loc2_.c_iPartNo];
  747.       var iTotalChoices = objQuestion.choice.length;
  748.       var iCorrectAnswer = objQuestion.attributes.correct;
  749.       var iPairId = objQuestion.attributes.Pair;
  750.       var _loc3_ = Number(objQuestion.attributes.number);
  751.       _loc2_.initNext(strClipName);
  752.       _loc2_.c_arrQuestionTypes[_loc2_.c_iPartNo] = strClipName;
  753.       _loc2_.c_objHMObject = _loc2_.c_hQuestionState["get"](String(_loc2_.c_strSkill + "_" + _loc2_.c_iCurrQuestion));
  754.       _loc2_.c_objMCQ.init(iTotalChoices,iCorrectAnswer,objQuestion,_level101[strClipName],340,"PairedMCQScrolling",objSection,_loc2_.c_strSkill,false,_loc3_);
  755.       if(_loc2_.c_iPairID != null || _loc2_.c_iPairID != undefined)
  756.       {
  757.          if(_loc2_.c_iPairID != _loc2_.c_iPrevPairID)
  758.          {
  759.             _loc2_.c_blnPairedScrolling = true;
  760.             _loc2_.c_iPrevPairID = _loc2_.c_iPairID;
  761.          }
  762.       }
  763.       if(_loc3_ % 2 == 0)
  764.       {
  765.          _loc2_.showSectionDataMCQ(_loc3_ - 1,_loc3_);
  766.       }
  767.       if(_loc3_ % 2 == 1)
  768.       {
  769.          _loc2_.showSectionDataMCQ(_loc3_,_loc3_ + 1);
  770.       }
  771.       if(_loc2_.c_strMode == "Review")
  772.       {
  773.          var _loc1_ = 1;
  774.          while(_loc1_ <= 2)
  775.          {
  776.             _level101.MCQ_Q1["ComponentMCQ_" + _loc1_].freeze(true);
  777.             _loc1_ = _loc1_ + 1;
  778.          }
  779.       }
  780.    }
  781.    function showSectionDataMCQ(iFirstQues, iLastQues)
  782.    {
  783.       var iQuesCount = iLastQues - iFirstQues + 1;
  784.       var _loc3_ = iFirstQues;
  785.       var _loc2_ = 0;
  786.       while(_loc2_ < iQuesCount)
  787.       {
  788.          var _loc1_ = this.c_hQuestionState["get"](String(this.c_strSkill + "_" + _loc3_));
  789.          if(_loc1_.attempted != null || _loc1_.attempted != undefined)
  790.          {
  791.             _level101.MCQ_Q1["ComponentMCQ_" + (_loc2_ + 1)].setSelect(String(_loc1_.attempted));
  792.          }
  793.          _loc3_ = _loc3_ + 1;
  794.          _loc2_ = _loc2_ + 1;
  795.       }
  796.    }
  797.    function initMCQTypeL4()
  798.    {
  799.       var _loc1_ = this;
  800.       var _loc2_ = _loc1_.commonToAllQs();
  801.       var iTotalQuestions = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question.length;
  802.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  803.       var strSoundName = objSection.audio.data;
  804.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  805.       if(!_loc1_.c_blnInitL4)
  806.       {
  807.          _loc1_.commonToAllMCQs();
  808.          _loc1_.handleSound11();
  809.          _loc1_.c_objSoundController.setSoundFile("tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName);
  810.          _loc1_.c_blnInitL4 = true;
  811.       }
  812.       _loc1_.initNext(_loc2_);
  813.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  814.       var iTotalChoices = _loc3_.choice.length;
  815.       var iCorrectAnswer = _loc3_.attributes.correct;
  816.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  817.       _loc1_["c_objMCQ_1" + _loc1_.c_iQuestionNo].init(iTotalChoices,iCorrectAnswer,_loc3_,_level101[_loc2_],300,"4",objSection,_loc1_.c_strSkill,false);
  818.       if(_loc1_.c_objHMObject != undefined && _loc1_.c_objHMObject != null)
  819.       {
  820.          _level101["MCQ_Q_1" + _loc1_.c_iQuestionNo].setSelect(String(_loc1_.c_objHMObject.attempted));
  821.       }
  822.       if(_loc1_.c_strMode == "Review")
  823.       {
  824.          _level101["MCQ_Q_1" + _loc1_.c_iQuestionNo].freeze(true);
  825.       }
  826.    }
  827.    function initMCQType5()
  828.    {
  829.       var _loc1_ = this;
  830.       var _loc2_ = _loc1_.commonToAllQs();
  831.       _loc1_.commonToAllMCQs();
  832.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  833.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  834.       var iTotalChoices = _loc3_.choice.length;
  835.       var iCorrectAnswer = _loc3_.attributes.correct;
  836.       if(_loc1_.c_blnOnceMCQ5)
  837.       {
  838.          var strTitle = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].title;
  839.          var strText = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].text.data;
  840.          _loc1_.c_objFIB2 = new com.screen.FIB2();
  841.          _loc1_.c_objFIB2.init(_level101[_loc2_],strTitle,strText,500,294.6,10,"fibbox","Button",1,_loc1_.c_objNavigator);
  842.          _loc1_.c_blnOnceMCQ5 = false;
  843.       }
  844.       _loc1_.c_objFIB2.navBtnClicked(_loc1_.c_iQuestionNo - 1);
  845.       _loc1_.initNext(_loc2_);
  846.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  847.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  848.       _loc1_.c_objMCQ.init(iTotalChoices,iCorrectAnswer,_loc3_,_level101[_loc2_],195.9,"MCQType_5",objSection,_loc1_.c_strSkill,false);
  849.       _loc1_.selectAndFreeze();
  850.       if(_loc1_.c_strMode == "Review")
  851.       {
  852.          _loc1_.c_objFIB2.freeze(true);
  853.       }
  854.    }
  855.    function initMCQType7()
  856.    {
  857.       var _loc1_ = this;
  858.       var strClipName = _loc1_.commonToAllQs();
  859.       _loc1_.commonToAllMCQs();
  860.       var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question;
  861.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  862.       var iTotalChoices = objQuestion.text.length;
  863.       var iCorrectAnswer = objQuestion.attributes.correct;
  864.       if(_loc1_.c_blnOnceMCQ7)
  865.       {
  866.          _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.type = "dynamic";
  867.          _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.selectable = false;
  868.          _loc1_.c_blnOnceMCQ7 = false;
  869.       }
  870.       _loc1_.initNext(strClipName);
  871.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = strClipName;
  872.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  873.       _level101.FIBType_3.mc_ScrollContent.txt_wordLimit.text = objSection.attributes.rubricLimit;
  874.       _loc1_.c_objMCQ.init(iTotalChoices,iCorrectAnswer,objQuestion,_level101[strClipName],214,"FIBType_3",objSection,_loc1_.c_strSkill,false);
  875.       _loc1_.c_objMCQ.resetMcq7();
  876.       if(_loc1_.c_strMode != "Review")
  877.       {
  878.          _loc1_.c_objMCQ.displayPreviousSelection();
  879.       }
  880.       if(_loc1_.c_objHMObject != undefined && _loc1_.c_objHMObject != null && _loc1_.c_objHMObject != "")
  881.       {
  882.          if(_loc1_.c_objHMObject.answeroption != null && _loc1_.c_objHMObject.answeroption != undefined && _loc1_.c_objHMObject.answeroption != "")
  883.          {
  884.             _level101.MCQ_Q1.setSelect(String(_loc1_.c_objHMObject.answeroption - 1));
  885.             var mcScrollContent = _level101.MCQ_Q1.mc_ScrollPane.getScrollContent();
  886.             _level101.txt_Tracer.text += mcScrollContent["mc_MCQ7Choice" + (_loc1_.c_objHMObject.answeroption - 1)].mc_textcont;
  887.             var _loc3_ = 1;
  888.             while(_loc3_ <= iTotalChoices)
  889.             {
  890.                mcScrollContent["mc_MCQ7Choice" + _loc3_].mc_textcont.gotoAndStop("_desel");
  891.                _loc3_ = _loc3_ + 1;
  892.             }
  893.             mcScrollContent["mc_MCQ7Choice" + (_loc1_.c_objHMObject.answeroption - 1)].mc_textcont.gotoAndStop("_sel");
  894.          }
  895.          if(_loc1_.c_objHMObject.attempted != null && _loc1_.c_objHMObject.attempted != undefined && _loc1_.c_objHMObject.attempted != "")
  896.          {
  897.             if(_level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.maxscroll > 1)
  898.             {
  899.                _level101.FIBType_3.mc_ScrollContent.cmp_ScrollBar._visible = true;
  900.                _level101.FIBType_3.mc_ScrollContent.cmp_ScrollBar1._visible = true;
  901.             }
  902.             _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.type = "input";
  903.          }
  904.       }
  905.       if(_loc1_.c_strMode == "Review")
  906.       {
  907.          _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.text = "";
  908.          _level101.FIBType_3.mc_ScrollContent.dyntxt_WC._visible = false;
  909.          _level101.FIBType_3.mc_ScrollContent.txt_Statement._visible = false;
  910.          _level101.FIBType_3.mc_ScrollContent.txt_wordLimit._visible = false;
  911.          _level101.FIBType_3.mc_ScrollContent.txt_WCHeading._visible = false;
  912.          var _iCurrentOptionID = Number(_loc1_.c_objHMObject.answeroption);
  913.          var _strSaparator = "";
  914.          _level101.FIBType_3.mc_ScrollContent.cmp_ScrollBar1._visible = true;
  915.          if(_level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.maxscroll > 2 || _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.scroll > 1)
  916.          {
  917.             _level101.FIBType_3.mc_ScrollContent.cmp_ScrollBar._visible = true;
  918.          }
  919.          _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.html = true;
  920.          _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.selectable = false;
  921.          var tempBoolean = false;
  922.          var _loc2_ = 0;
  923.          while(_loc2_ <= iTotalChoices - 1)
  924.          {
  925.             if(_loc1_.c_objHMObject.attempted != null || _loc1_.c_objHMObject.attempted != undefined)
  926.             {
  927.                if(!tempBoolean)
  928.                {
  929.                   _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.htmlText = _loc1_.c_objHMObject.attempted;
  930.                   tempBoolean = true;
  931.                }
  932.                _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.htmlText += "<br/><b>Sample Answer -- " + (_loc2_ + 2) + "</b>" + "<br/><br/>" + unescape(objQuestion.sampleAnswer[_loc2_].data) + "<br/>";
  933.                var _arrSplitedspace = _loc1_.c_objHMObject.attempted.split(String.fromCharCode(13)).join(" ").split(" ");
  934.             }
  935.             else
  936.             {
  937.                _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.htmlText += "<b>Sample Answer --" + (_loc2_ + 2) + "</b><br/><br/>" + objQuestion.sampleAnswer[_loc2_].data + "<br/><br/>";
  938.             }
  939.             _loc2_ = _loc2_ + 1;
  940.          }
  941.          _level101.MCQ_Q1.freeze(true);
  942.          _loc1_.c_objWordCountText.freeze();
  943.       }
  944.       if(_loc1_.c_strMode == "Continue")
  945.       {
  946.          _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.htmlText = _loc1_.c_objHMObject.attempted;
  947.          var txtBox = _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.text;
  948.          if(_level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.maxscroll > 2 || _level101.FIBType_3.mc_ScrollContent.inptxt_WCtxt.scroll > 1)
  949.          {
  950.             _level101.FIBType_3.mc_ScrollContent.cmp_ScrollBar._visible = true;
  951.          }
  952.          if(_loc1_.c_objHMObject.attempted != null || _loc1_.c_objHMObject.attempted != undefined)
  953.          {
  954.             var _arrSplitedspace = _loc1_.c_objHMObject.attempted.split(String.fromCharCode(13)).join(" ").split(" ");
  955.             var ctr = 0;
  956.             _loc3_ = 0;
  957.             while(_loc3_ < _arrSplitedspace.length)
  958.             {
  959.                if(_arrSplitedspace[_loc3_] != "")
  960.                {
  961.                   ctr += 1;
  962.                }
  963.                _loc3_ = _loc3_ + 1;
  964.             }
  965.             _level101.FIBType_3.mc_ScrollContent.dyntxt_WC.text = ctr.toString();
  966.             _level101.FIBType_3.mc_ScrollContent.dyntxt_WC.selectable = false;
  967.          }
  968.          else
  969.          {
  970.             _level101.FIBType_3.mc_ScrollContent.dyntxt_WC.text = 0;
  971.          }
  972.          var strLen = String(_loc1_.c_objHMObject.attempted).length;
  973.          Selection.setFocus();
  974.          Selection.setSelection(0,strLen);
  975.       }
  976.    }
  977.    function initMCQType8()
  978.    {
  979.       var _loc1_ = this;
  980.       var _loc2_ = _loc1_.commonToAllQs();
  981.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  982.       _loc1_.commonToAllMCQs();
  983.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  984.       var objQuestions = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question;
  985.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  986.       var iTotalChoices = _loc3_.choices.length;
  987.       var iCorrectAnswer = _loc3_.attributes.correct;
  988.       if(_loc1_.c_blnOnceMCQ8)
  989.       {
  990.          _loc1_.c_objDropDown = new com.screen.DropDown();
  991.          _loc1_.c_objDropDown.init(_level101[_loc2_],objSection,400,294.6,10,"FComboBoxSymbol","Button",_loc1_.c_iPartNo,_loc1_.c_objNavigator);
  992.          _loc1_.c_blnOnceMCQ8 = false;
  993.       }
  994.       _level101[_loc2_].txt_QuestionNo.text = _loc3_.attributes.number;
  995.       _loc1_.initNext(_loc2_);
  996.       _loc1_.c_objDropDown.navBtnClicked(_loc1_.c_iQuestionNo - 1);
  997.       if(_loc1_.c_objScreenData.DOC.section.length - 1 == _loc1_.c_iPartNo)
  998.       {
  999.          _level101[_loc2_].btn_Next._visible = false;
  1000.       }
  1001.    }
  1002.    function initFIB1(_strFibType, _strQuesSelected)
  1003.    {
  1004.       var _loc1_ = this;
  1005.       var _loc2_ = _loc1_.commonToAllQs();
  1006.       var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  1007.       var strTitle = objQuestion.text.data;
  1008.       var strText = objQuestion.text2.data;
  1009.       var objText = objQuestion.text2;
  1010.       var iQuesNumber;
  1011.       iQuesNumber = Number(_loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1].attributes.number);
  1012.       var _iX = 180;
  1013.       var _iY = 250;
  1014.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  1015.       _loc1_.c_objFIB2_1 = new com.screen.FIB2();
  1016.       _loc1_.c_objFIB2_1.init(_level101[_loc2_],"",strText,400,0,0,"mc_FIBquestion","textField",_loc1_.c_iPartNo);
  1017.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  1018.       var _loc3_ = new com.screen.FIB1();
  1019.       var firstBoxRefY = _loc1_.c_objFIB2_1.getFibRefY();
  1020.       _loc3_.init(_level101,iQuesNumber,_loc2_,_loc1_.c_objFIB2_1.getHeight(),_loc1_.c_objFIB2_1.getFibRefY(),objText,_loc1_.c_iPartNo,_loc1_);
  1021.       _loc1_.initNext(_loc2_);
  1022.       if(_loc1_.c_strMode == "Review")
  1023.       {
  1024.          _loc3_.c_objFIB.freeze();
  1025.       }
  1026.       if(_loc1_.c_objHMObject != undefined && _loc1_.c_objHMObject != null)
  1027.       {
  1028.          _loc3_.c_objFIB.c_txtInpRef.text = _loc1_.c_objHMObject.attempted;
  1029.          if(_loc1_.c_objScreenData.DOC.section[_loc1_.c_objScreenData.DOC.section.length - 1].question.length != _loc1_.c_iQuestionNo)
  1030.          {
  1031.             _level101[_loc2_].btn_Next._visible = true;
  1032.          }
  1033.          else
  1034.          {
  1035.             _level101[_loc2_].btn_Next._visible = false;
  1036.          }
  1037.       }
  1038.       if(_loc1_.c_strMode == "Review")
  1039.       {
  1040.          if(_loc1_.c_objScreenData.DOC.section[_loc1_.c_objScreenData.DOC.section.length - 1].question.length != _loc1_.c_iQuestionNo)
  1041.          {
  1042.             _level101[_loc2_].btn_Next._visible = true;
  1043.          }
  1044.          else
  1045.          {
  1046.             _level101[_loc2_].btn_Next._visible = false;
  1047.          }
  1048.       }
  1049.    }
  1050.    function initAutoFillFib()
  1051.    {
  1052.       var _loc1_ = this;
  1053.       var _loc2_ = _loc1_.commonToAllQs();
  1054.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  1055.       var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question[_loc1_.c_iQuestionNo - 1];
  1056.       var strText = objQuestion.text.data;
  1057.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  1058.       _loc1_.c_objFIB2_1 = new com.screen.FIB2();
  1059.       _loc1_.c_objFIB2_1.init(_level101[_loc2_],"",strText,500,0,0,"mc_FIB_Answer","textField",_loc1_.c_iPartNo);
  1060.       var arrFib = _loc1_.c_objFIB2_1.getNumberOfBox();
  1061.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  1062.       var _loc3_ = new com.screen.AutoFillFib();
  1063.       _loc3_.init(_level101[_loc2_],objSection,objQuestion,_loc1_.c_objFIB2_1.getHeight(),arrFib,_loc1_);
  1064.       _loc1_.initNext(_loc2_);
  1065.       if(_loc1_.c_strMode == "Review")
  1066.       {
  1067.          _loc3_.freeze();
  1068.       }
  1069.       if(_loc1_.c_objHMObject != undefined && _loc1_.c_objHMObject != null)
  1070.       {
  1071.          _level101.txt_Tracer7.text += "TTTTTTTTTT APEND OBJECT";
  1072.          _loc3_.c_txtInpRef.text = _loc1_.c_objHMObject.attempted;
  1073.          _loc3_.c_txtInpRef_1.text = _loc1_.c_objHMObject.attempted;
  1074.          _loc3_.c_txtInpRef_2.text = _loc1_.c_objHMObject.attempted;
  1075.          if(_loc1_.c_objScreenData.DOC.section[_loc1_.c_objScreenData.DOC.section.length - 1].question.length != _loc1_.c_iQuestionNo)
  1076.          {
  1077.             _level101[_loc2_].btn_Next._visible = true;
  1078.          }
  1079.          else
  1080.          {
  1081.             _level101[_loc2_].btn_Next._visible = false;
  1082.          }
  1083.       }
  1084.       if(_loc1_.c_strMode == "Review")
  1085.       {
  1086.          if(_loc1_.c_objScreenData.DOC.section[_loc1_.c_objScreenData.DOC.section.length - 1].question.length != _loc1_.c_iQuestionNo)
  1087.          {
  1088.             _level101[_loc2_].btn_Next._visible = true;
  1089.          }
  1090.          else
  1091.          {
  1092.             _level101[_loc2_].btn_Next._visible = false;
  1093.          }
  1094.       }
  1095.    }
  1096.    function initWordCount()
  1097.    {
  1098.       var _loc1_ = this;
  1099.       var strClipName = _loc1_.commonToAllQs();
  1100.       var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question;
  1101.       _loc1_.c_objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  1102.       var maxWordLimit = Number(_loc1_.c_objSection.attributes.maxWords);
  1103.       _level101[strClipName].txt_wordLimit.text = _loc1_.c_objSection.attributes.rubricLimit;
  1104.       var strQuestionNo = _loc1_.c_iCurrQuestion;
  1105.       var strText = objQuestion.text.data;
  1106.       var headerText = objQuestion.headerText.data;
  1107.       var imageData = objQuestion.image.data;
  1108.       _loc1_.c_objHMObject = _loc1_.c_hQuestionState["get"](String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion));
  1109.       _loc1_.c_objWordCountText = new com.screen.WordCountText();
  1110.       _loc1_.c_objWordCountText.init(_level101[strClipName],strQuestionNo,strText,_loc1_,headerText,imageData,maxWordLimit);
  1111.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = strClipName;
  1112.       _loc1_.initNext(strClipName);
  1113.       if(_loc1_.c_objHMObject != undefined && _loc1_.c_objHMObject != null)
  1114.       {
  1115.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.inptxt_WCtxt.text = _loc1_.c_objHMObject.attempted;
  1116.          var _arrSplitedspace = _loc1_.c_objHMObject.attempted.split(String.fromCharCode(13)).join(" ").split(" ");
  1117.          _level101[strClipName].btn_Next._visible = true;
  1118.          var _loc3_ = 0;
  1119.          var _loc2_ = 0;
  1120.          while(_loc2_ < _arrSplitedspace.length)
  1121.          {
  1122.             if(_arrSplitedspace[_loc2_] != "")
  1123.             {
  1124.                _loc3_ += 1;
  1125.             }
  1126.             _loc2_ = _loc2_ + 1;
  1127.          }
  1128.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.dyntxt_WC.text = _loc3_.toString();
  1129.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.dyntxt_WC.selectable = false;
  1130.          var strLen = _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.inptxt_WCtxt.text;
  1131.          Selection.setFocus();
  1132.          Selection.setSelection(0,strLen.length);
  1133.       }
  1134.       if(_loc1_.c_strMode == "Review")
  1135.       {
  1136.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.dyntxt_WC._visible = false;
  1137.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.txt_wordLimit._visible = false;
  1138.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.txtFooter._visible = false;
  1139.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.headerWord._visible = false;
  1140.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.mc_bottomText._visible = false;
  1141.          var _arrSplitedspace = _loc1_.c_objHMObject.attempted.split(String.fromCharCode(13)).join(" ").split(" ");
  1142.          _loc1_.c_objWordCountText.freeze();
  1143.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.inptxt_WCtxt.html = true;
  1144.          _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.inptxt_WCtxt.htmlText = _loc1_.c_objHMObject.attempted + "\n\n<b>Sample Answer -- </b><br/><br/>" + objQuestion.sampleAnswer.data;
  1145.          if(_loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.inptxt_WCtxt.textHeight > _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.inptxt_WCtxt.height)
  1146.          {
  1147.             _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.wcTextScroller._visible = true;
  1148.          }
  1149.          else
  1150.          {
  1151.             _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.wcTextScroller._visible = false;
  1152.          }
  1153.       }
  1154.       if(_loc1_.c_strMode == "Continue")
  1155.       {
  1156.          if(_loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.inptxt_WCtxt.textHeight > _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.inptxt_WCtxt.height)
  1157.          {
  1158.             _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.wcTextScroller._visible = true;
  1159.          }
  1160.          else
  1161.          {
  1162.             _loc1_.c_objWordCountText.c_SourceClip.mc_WordInp.wcTextScroller._visible = false;
  1163.          }
  1164.       }
  1165.    }
  1166.    function initFIBType6()
  1167.    {
  1168.       var _loc2_ = this;
  1169.       var strClipName = _loc2_.commonToAllQs();
  1170.       var _loc3_ = _loc2_.c_objScreenData.DOC.section[_loc2_.c_iPartNo];
  1171.       var strTitle = _loc3_.textTitle.data;
  1172.       var strText = _loc3_.text.data;
  1173.       var strSoundName = _loc3_.audio.data;
  1174.       _loc2_.c_arrQuestionTypes[_loc2_.c_iPartNo] = strClipName;
  1175.       if(!_loc2_.c_blnFIB4)
  1176.       {
  1177.          _loc2_.c_objFIB4 = new com.screen.FIB4();
  1178.          _loc2_.c_objFIB4.c_iExtID = _loc3_.question[0].attributes.number;
  1179.          var totalQuestion = _loc3_.question[0].attributes.totalQuestion;
  1180.          var _loc1_ = 0;
  1181.          while(_loc1_ < totalQuestion)
  1182.          {
  1183.             _loc2_.c_objFIB4.c_hintArray[_loc1_] = _loc3_.question[_loc1_].ansHint.data;
  1184.             _loc1_ = _loc1_ + 1;
  1185.          }
  1186.          _loc2_.c_objFIB4.init(_level101[strClipName],_loc3_," ",strText,470,14,10,"FComboBoxSymbol","MovieClip",_loc2_.c_iPartNo,_loc2_.c_objNavigator);
  1187.          _loc2_.handleSound11();
  1188.          _loc2_.c_blnFIB4 = true;
  1189.       }
  1190.       if(_loc2_.c_objNavigator.c_blnPartChange)
  1191.       {
  1192.          _loc2_.c_objSoundController.setSoundFile("tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName);
  1193.          _loc2_.c_objNavigator.c_blnPartChange = false;
  1194.       }
  1195.       _loc2_.initNext(strClipName);
  1196.       _loc2_.c_objFIB4.navBtnClicked(_loc2_.c_iQuestionNo - 1);
  1197.    }
  1198.    function initMCQTypeL3()
  1199.    {
  1200.       var _loc1_ = this;
  1201.       var _loc3_ = _loc1_.commonToAllQs();
  1202.       var _loc2_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  1203.       var strTitle = _loc2_.textTitle;
  1204.       var strText = _loc2_.text.data;
  1205.       var strSoundName = _loc2_.audio.data;
  1206.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc3_;
  1207.       if(!_loc1_.c_blnFIB3)
  1208.       {
  1209.          _loc1_.c_objFIB2_2 = new com.screen.FIB2();
  1210.          _loc1_.c_objFIB2_2.c_iExtID = _loc2_.question[0].attributes.number;
  1211.          _loc1_.c_objFIB2_2.init(_level101[_loc3_],strTitle,strText,470,14,10,"mc_FIBL","MovieClip",_loc1_.c_iPartNo,_loc1_.c_objNavigator);
  1212.          _loc1_.handleSound11();
  1213.          _loc1_.c_blnFIB3 = true;
  1214.       }
  1215.       if(_loc1_.c_objNavigator.c_blnPartChange)
  1216.       {
  1217.          _loc1_.c_objSoundController.setSoundFile("tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName);
  1218.          _loc1_.c_objNavigator.c_blnPartChange = false;
  1219.       }
  1220.       _loc1_.initNext(_loc3_);
  1221.       _loc1_.c_objFIB2_2.navBtnClicked(_loc1_.c_iQuestionNo - 1);
  1222.    }
  1223.    function initUOEFIBType5()
  1224.    {
  1225.       var _loc1_ = this;
  1226.       var _loc2_ = _loc1_.commonToAllQs();
  1227.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  1228.       var strTitle = _loc3_.textTitle;
  1229.       var strText = _loc3_.text.data;
  1230.       var strSoundName = _loc3_.audio.data;
  1231.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  1232.       if(!_loc1_.c_blnUOEFIB3)
  1233.       {
  1234.          _loc1_.c_objUOEFIB3 = new com.screen.FIB2();
  1235.          _loc1_.c_objUOEFIB3.c_iExtID = _loc3_.question[0].attributes.number;
  1236.          _loc1_.c_objUOEFIB3.init(_level101[_loc2_],strTitle,strText,425,14,10,"mc_FIBL","MovieClip",_loc1_.c_iPartNo,_loc1_.c_objNavigator);
  1237.          _loc1_.c_blnUOEFIB3 = true;
  1238.       }
  1239.       _loc1_.initNext(_loc2_);
  1240.       _loc1_.c_objUOEFIB3.navBtnClicked(_loc1_.c_iQuestionNo - 1);
  1241.       if(_loc1_.c_objScreenData.DOC.section.length - 1 == _loc1_.c_iPartNo)
  1242.       {
  1243.          _level101[_loc2_].btn_Next._visible = false;
  1244.       }
  1245.    }
  1246.    function initPairedDropDown()
  1247.    {
  1248.       var _loc1_ = this;
  1249.       var _loc2_ = _loc1_.commonToAllQs();
  1250.       var objSection = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  1251.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  1252.       var strTitle = _loc3_.textTitle.data;
  1253.       var strText = _loc3_.text.data;
  1254.       var strSoundName = _loc3_.audio.data;
  1255.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  1256.       if(!_loc1_.c_blnPairedDropDown)
  1257.       {
  1258.          _loc1_.c_objPairedDropDown = new com.screen.PairedDropDown();
  1259.          _loc1_.c_objPairedDropDown.init(_level101[_loc2_],objSection,strTitle,strText,520,14,10,"FComboBoxSymbol","Button",_loc1_.c_iPartNo,_loc1_.c_objNavigator);
  1260.          _loc1_.c_blnPairedDropDown = true;
  1261.       }
  1262.       _loc1_.initNext(_loc2_);
  1263.       _loc1_.c_objPairedDropDown.navBtnClicked(_loc1_.c_iQuestionNo - 1);
  1264.       if(_loc1_.c_objScreenData.DOC.section.length - 1 == _loc1_.c_iPartNo)
  1265.       {
  1266.          _level101[_loc2_].btn_Next._visible = false;
  1267.       }
  1268.    }
  1269.    function initDDCollection()
  1270.    {
  1271.       var _loc1_ = this;
  1272.       var _loc2_ = _loc1_.commonToAllQs();
  1273.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo];
  1274.       var strSoundName = _loc3_.audio.data;
  1275.       _loc1_.c_arrQuestionTypes[_loc1_.c_iPartNo] = _loc2_;
  1276.       if(!_loc1_.c_blnDDCollection)
  1277.       {
  1278.          _loc1_.c_objDDCollection = new com.screen.DropDownCollection();
  1279.          var totalQuestion = _loc3_.question[0].attributes.totalQuestion;
  1280.          _loc1_.c_objDDCollection.init(_level101[_loc2_],_loc3_,425,14,10,"FComboBoxSymbol",_loc1_.c_iPartNo,_loc1_.c_objNavigator);
  1281.          _loc1_.handleSound11();
  1282.          _loc1_.c_blnDDCollection = true;
  1283.       }
  1284.       var strSound = "tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName;
  1285.       if(_loc1_.c_objNavigator.c_blnPartChange)
  1286.       {
  1287.          _loc1_.c_objSoundController.setSoundFile("tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName);
  1288.          _loc1_.c_objNavigator.c_blnPartChange = false;
  1289.       }
  1290.       _loc1_.initNext(_loc2_);
  1291.       _loc1_.c_objDDCollection.navBtnClicked(_loc1_.c_iQuestionNo - 1);
  1292.       if(_loc1_.c_objScreenData.DOC.section.length - 1 == _loc1_.c_iPartNo)
  1293.       {
  1294.          _level101[_loc2_].btn_Next._visible = false;
  1295.       }
  1296.    }
  1297.    function initFIBType5()
  1298.    {
  1299.       var _loc2_ = this;
  1300.       var strClipName = _loc2_.commonToAllQs();
  1301.       var _loc3_ = _loc2_.c_objScreenData.DOC.section[_loc2_.c_iPartNo];
  1302.       var strTitle = _loc3_.textTitle;
  1303.       var strText = _loc3_.text.data;
  1304.       var strSoundName = _loc3_.audio.data;
  1305.       _loc2_.c_arrQuestionTypes[_loc2_.c_iPartNo] = strClipName;
  1306.       if(!_loc2_.c_blnFIB2_2)
  1307.       {
  1308.          _loc2_.c_objFIB3_1 = new com.screen.FIB3();
  1309.          _loc2_.c_objFIB3_1.c_iExtID = _loc3_.question[0].attributes.number;
  1310.          var totalQuestion = _loc3_.question[0].attributes.totalQuestion;
  1311.          _loc2_.c_objFIB3_1.exampleText = _loc3_.question[0].attributes.dummyText;
  1312.          var _loc1_ = 0;
  1313.          while(_loc1_ < totalQuestion)
  1314.          {
  1315.             _loc2_.c_objFIB3_1.c_hintArray[_loc1_] = _loc3_.question[_loc1_].ansHint.data;
  1316.             _loc1_ = _loc1_ + 1;
  1317.          }
  1318.          _loc2_.c_objFIB3_1.init(_level101[strClipName],strTitle,strText,425,14,10,"mc_FIBLarge","MovieClip",_loc2_.c_iPartNo,_loc2_.c_objNavigator);
  1319.          _loc2_.c_blnFIB2_2 = true;
  1320.       }
  1321.       _loc2_.initNext(strClipName);
  1322.       _loc2_.c_objFIB3_1.navBtnClicked(_loc2_.c_iQuestionNo - 1);
  1323.       if(_loc2_.c_objScreenData.DOC.section.length - 1 == _loc2_.c_iPartNo)
  1324.       {
  1325.          _level101[strClipName].btn_Next._visible = false;
  1326.       }
  1327.    }
  1328.    function arrangeButtons()
  1329.    {
  1330.       if(this.c_objSourceRef.c_blnXMLLoaded)
  1331.       {
  1332.       }
  1333.    }
  1334.    function appendQuesObject(_objQuesData)
  1335.    {
  1336.       var _loc1_ = this;
  1337.       _loc1_.c_hQuestionState.put(String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion),_objQuesData);
  1338.       if(_loc1_.c_hQuestionState.getlength() == _loc1_.getTotalTestQuestions())
  1339.       {
  1340.          if(_loc1_.c_strMode != "Review")
  1341.          {
  1342.             _level101.btn_quitTest._visible = false;
  1343.             _level101.btn_submitTest._visible = true;
  1344.          }
  1345.       }
  1346.    }
  1347.    function removeQuesObject()
  1348.    {
  1349.       var _loc1_ = this;
  1350.       var _loc2_ = String(_loc1_.c_strSkill + "_" + _loc1_.c_iCurrQuestion);
  1351.       _loc1_.c_hQuestionState.deleteKey(_loc2_);
  1352.       _level101.btn_quitTest._visible = true;
  1353.       _level101.btn_submitTest._visible = false;
  1354.    }
  1355.    function onPartChange(_iPrePart, _iCurrPart)
  1356.    {
  1357.       var _loc1_ = this;
  1358.       _loc1_.c_objNavigator.setTopNavPosition();
  1359.       var _loc2_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].attributes.templateType;
  1360.       if(_loc2_ == "PairedDropDown" || _loc2_ == "MCQType_4")
  1361.       {
  1362.          _level101.PairedDropDown.mc_textOnlyScrollBar.setScrollPosition(0,0);
  1363.          _loc1_.c_blnOnceMCQ4 = true;
  1364.          _loc1_.c_blnPairedScrolling = true;
  1365.       }
  1366.       _level101.mc_Nav._y = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].attributes.navYPos;
  1367.       var strPreviousTemplate = _loc1_.c_objScreenData.DOC.section[_iPrePart].attributes.templateType;
  1368.       switch(strPreviousTemplate)
  1369.       {
  1370.          case "UOEFIBType_5":
  1371.             _loc1_.c_objUOEFIB3.removedMovieObject();
  1372.             break;
  1373.          case "FIBType_5":
  1374.             _loc1_.c_objFIB3_1.removedMovieObject();
  1375.             break;
  1376.          case "FIBType_1":
  1377.             _loc1_.c_objFIB2_1.removedMovieObject();
  1378.             break;
  1379.          case "AutoFillFib":
  1380.             _loc1_.c_objFIB2_1.removedMovieObject();
  1381.             break;
  1382.          case "FIBType_4":
  1383.             _loc1_.c_objFIB2_2.removedMovieObject();
  1384.             break;
  1385.          case "FIBType_6":
  1386.             _loc1_.c_objFIB4.removedMovieObject();
  1387.       }
  1388.       var strClip = _loc1_.c_arrQuestionTypes[_iPrePart];
  1389.       _level101[strClip]._visible = false;
  1390.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].attributes.navType;
  1391.       if(_loc1_.c_strSkillName.toLowerCase() == "listening" && _loc3_ == "2")
  1392.       {
  1393.          var strSoundName = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].audio.data;
  1394.          _loc1_.handleSound11();
  1395.          _loc1_.c_objSoundController.setSoundFile("tests/test" + com.controller.UICoordinator.getInstance().currentTestNumber + "/sound/" + strSoundName);
  1396.       }
  1397.       else
  1398.       {
  1399.          _level101[_loc1_.c_arrQuestionTypes[_iCurrPart]]._visible = true;
  1400.       }
  1401.    }
  1402.    function setFirstUnattemptedL(_objNavData)
  1403.    {
  1404.       var _loc1_ = this;
  1405.       if(!_loc1_.c_blnContinueL)
  1406.       {
  1407.          var objQuestion = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question;
  1408.          var _iQPartTwo = objQuestion[0].attributes.number;
  1409.          if(_loc1_.c_iStartQuestion >= _iQPartTwo)
  1410.          {
  1411.             var _loc2_ = 0;
  1412.             while(_loc2_ < objQuestion.length)
  1413.             {
  1414.                var _loc3_ = Number(objQuestion[_loc2_].attributes.number);
  1415.                if(_loc3_ == _loc1_.c_iStartQuestion)
  1416.                {
  1417.                   _loc1_.c_objNavigator.c_preSelecetd = _loc1_.c_objNavigator.c_strSelecetd;
  1418.                   _loc1_.c_objNavigator.c_strSelecetd = "_" + _loc1_.c_iPartNo + "_" + _loc2_;
  1419.                   _loc1_.c_objNavigator.c_iSeleID = _loc1_.c_iStartQuestion;
  1420.                   _level101.txt_Tracer20.text += "\n navClickedfunction::::TEST Class::::called ------     ";
  1421.                   _loc1_.c_objNavigator.navClickedfunction();
  1422.                   break;
  1423.                }
  1424.                _loc2_ = _loc2_ + 1;
  1425.             }
  1426.          }
  1427.          else
  1428.          {
  1429.             _loc1_.c_objNavigator.c_preSelecetd = _loc1_.c_objNavigator.c_strSelecetd;
  1430.             _loc1_.c_objNavigator.c_strSelecetd = _objNavData.navCurrSel;
  1431.             _loc1_.c_objNavigator.c_iSeleID = _objNavData.navSelID;
  1432.             _level101.txt_Tracer20.text += "\n navClickedfunction::::TEST Class::::called ------     ";
  1433.             _loc1_.c_objNavigator.navClickedfunction();
  1434.          }
  1435.          _loc1_.c_blnContinueL = true;
  1436.       }
  1437.       else
  1438.       {
  1439.          _loc1_.c_objNavigator.c_preSelecetd = _loc1_.c_objNavigator.c_strSelecetd;
  1440.          _loc1_.c_objNavigator.c_strSelecetd = _objNavData.navCurrSel;
  1441.          _loc1_.c_objNavigator.c_iSeleID = _objNavData.navSelID;
  1442.          _level101.txt_Tracer20.text += "\n navClickedfunction::::TEST Class::::called ------     ";
  1443.          _loc1_.c_objNavigator.navClickedfunction();
  1444.       }
  1445.    }
  1446.    function setMCQSelection(_mcChoice)
  1447.    {
  1448.       var _loc1_ = this;
  1449.       var _loc2_ = Number(_mcChoice._name.split("_")[2]);
  1450.       var _loc3_ = _loc1_.c_objScreenData.DOC.section[_loc1_.c_iPartNo].question;
  1451.       _loc1_.resetPanelState();
  1452.       _mcChoice.gotoAndStop("_SELECTED");
  1453.       _loc1_.c_iQuestionNo = _loc2_;
  1454.       if(_loc1_.c_strMode == "Take" || _loc1_.c_strMode == "Retake" || _loc1_.c_strMode == "Continue")
  1455.       {
  1456.          _loc1_.c_objNavigator.c_preSelecetd = _loc1_.c_objNavigator.c_strSelecetd;
  1457.          _loc1_.c_objNavigator.c_strSelecetd = "_" + _loc1_.c_iPartNo + "_" + (_loc2_ - 1);
  1458.          _loc1_.c_objNavigator.c_iSeleID = _loc3_[_loc1_.c_iQuestionNo - 1].attributes.number;
  1459.          _level101.txt_Tracer20.text += "\n navClickedfunction::::TEST Class::::called ------     ";
  1460.          _loc1_.c_objNavigator.navClickedfunction();
  1461.       }
  1462.    }
  1463.    function updateHeader(_str)
  1464.    {
  1465.       var _loc1_ = new TextFormat();
  1466.       _loc1_.bold = true;
  1467.       var _loc2_ = String(this.c_objScreenData.DOC.section[this.c_iPartNo].attributes.header + " Test" + ": " + _str);
  1468.       _level101.txt_Screenheader.html = true;
  1469.       _level101.txt_Screenheader.htmlText = _loc2_;
  1470.       _level101.txt_Screenheader.setTextFormat(_loc1_);
  1471.    }
  1472.    function setEvents()
  1473.    {
  1474.       var _loc1_ = this;
  1475.       if(_loc1_.c_strMode == "Review")
  1476.       {
  1477.          _level101.btn_Instruction._visible = false;
  1478.       }
  1479.       else
  1480.       {
  1481.          _level101.btn_Instruction._visible = true;
  1482.       }
  1483.       _level101.btn_quitTest.objRef = _loc1_;
  1484.       _level101.btn_quitTest.onRelease = function()
  1485.       {
  1486.          var _loc1_ = this;
  1487.          trace("c_strEnvironment:  " + _loc1_.objRef.c_strEnvironment);
  1488.          if(_loc1_.objRef.c_strEnvironment == "Windows" || _loc1_.objRef.c_strEnvironment == "Macintosh")
  1489.          {
  1490.             _loc1_.objRef.btn_quitTest();
  1491.          }
  1492.          else if(_loc1_.objRef.c_strEnvironment == "Linux")
  1493.          {
  1494.             _loc1_.objRef.popupYes();
  1495.          }
  1496.       };
  1497.       _level101.btn_submitTest.objRef = _loc1_;
  1498.       _level101.btn_submitTest.onRelease = function()
  1499.       {
  1500.          this.objRef.btn_submitTest();
  1501.       };
  1502.       _level101.btn_backToMenu.objRef = _loc1_;
  1503.       _level101.btn_backToMenu.enabled = true;
  1504.       _level101.btn_backToMenu.onRelease = function()
  1505.       {
  1506.          this.objRef.backToTestMenu();
  1507.       };
  1508.       _level101.btn_quit.objRef = _loc1_;
  1509.       _level101.btn_quit.onRelease = function()
  1510.       {
  1511.          this.objRef.btn_quit();
  1512.       };
  1513.       _level101.btn_Instruction.objRef = _loc1_;
  1514.       _level101.btn_Instruction.onRelease = function()
  1515.       {
  1516.          this.objRef.showInstruction();
  1517.       };
  1518.    }
  1519.    function btn_quit()
  1520.    {
  1521.       var _loc1_ = this;
  1522.       var strEnvironment = com.controller.UICoordinator.getInstance().getOSEnvironment();
  1523.       _loc1_.removeElements();
  1524.       var _loc2_ = function(success)
  1525.       {
  1526.          if(strEnvironment == "Windows" || strEnvironment == "Macintosh")
  1527.          {
  1528.             getUrl("lingo:closeApplication", "");
  1529.          }
  1530.          else if(strEnvironment == "Linux")
  1531.          {
  1532.             fscommand("quit");
  1533.          }
  1534.       };
  1535.       if(_loc1_.c_strEnvironment == "Windows" || _loc1_.c_strEnvironment == "Macintosh")
  1536.       {
  1537.          _loc1_.connectXMLSocket("true",_loc1_.objTimer.getMinsTime(),_loc2_);
  1538.       }
  1539.       else if(_loc1_.c_strEnvironment == "Linux")
  1540.       {
  1541.          _loc2_();
  1542.       }
  1543.    }
  1544.    function showInstruction()
  1545.    {
  1546.       var _loc3_ = this;
  1547.       _level101.attachMovie("mc_PopupInstruction","mc_PopupInstruction",650);
  1548.       var _loc1_ = _level101.mc_PopupInstruction;
  1549.       var _txtInstruction = _loc1_.mc_text.txt_inst;
  1550.       var _loc2_ = undefined;
  1551.       _loc1_._x = 175;
  1552.       _loc1_._y = 160;
  1553.       _loc1_.btn_CloseInstruction.onRelease = function()
  1554.       {
  1555.          this._parent._visible = false;
  1556.       };
  1557.       _loc1_.btn_Disable.onRelease = function()
  1558.       {
  1559.          trace("");
  1560.       };
  1561.       _loc1_.btn_Disable.onRollOver = function()
  1562.       {
  1563.          this.useHandCursor = false;
  1564.       };
  1565.       var _objInstructionXML = com.controller.UICoordinator.getInstance().c_objInstructionXML;
  1566.       if(_loc3_.c_strSkill.toLowerCase() == "listening")
  1567.       {
  1568.          _loc2_ = _objInstructionXML.instructions.instructionslistening.data;
  1569.       }
  1570.       else if(_loc3_.c_strSkill.toLowerCase() == "reading")
  1571.       {
  1572.          _loc2_ = _objInstructionXML.instructions.instructionsreading.data;
  1573.       }
  1574.       else if(_loc3_.c_strSkill.toLowerCase() == "writing")
  1575.       {
  1576.          _loc2_ = _objInstructionXML.instructions.instructionswriting.data;
  1577.       }
  1578.       else if(_loc3_.c_strSkill.toLowerCase() == "use of english")
  1579.       {
  1580.          _loc2_ = _objInstructionXML.instructions.instructionsuseofenglish.data;
  1581.       }
  1582.       _txtInstruction.html = true;
  1583.       _txtInstruction.htmlText = _loc2_;
  1584.       _loc1_._visible = true;
  1585.    }
  1586.    function removeElements()
  1587.    {
  1588.       var _loc2_ = this;
  1589.       _level101.rubricBox._visible = false;
  1590.       var _loc1_ = 0;
  1591.       while(_loc1_ < _loc2_.c_arrQuestionTypes.length)
  1592.       {
  1593.          _level101[_loc2_.c_arrQuestionTypes[_loc1_]].removeMovieClip();
  1594.          _level101.soundBtn._visible = false;
  1595.          _level101.volumeBox._visible = false;
  1596.          _level101.soundLevel._visible = false;
  1597.          _loc1_ = _loc1_ + 1;
  1598.       }
  1599.    }
  1600.    function btn_quitTest()
  1601.    {
  1602.       var _loc2_ = this;
  1603.       var _loc1_ = _level101.mc_PopUp;
  1604.       _loc1_.gotoAndStop("quittest");
  1605.       _loc1_._x = 173.5;
  1606.       _loc1_._y = 155.5;
  1607.       var iTotalAttemptedQues = _loc2_.c_hQuestionState.getlength();
  1608.       var iRemainingQues = _loc2_.c_iTotalTestQuestions - iTotalAttemptedQues;
  1609.       _loc1_.txt_leftQues.text = iRemainingQues;
  1610.       _loc1_.txt_QuitTest.autoSize = true;
  1611.       if(_loc2_.c_strSkill == "writing")
  1612.       {
  1613.          _loc1_.txt_QuitTest.text = "You have not answered          questions\nand have          minute(s) remaining.\nIn this section your answers are not scored.\nDo you want to complete this test later?";
  1614.       }
  1615.       else
  1616.       {
  1617.          _loc1_.txt_QuitTest.text = "You have not answered          questions\nand have          minute(s) remaining.\nDo you want to complete this test later?";
  1618.       }
  1619.       _loc1_.txt_QuitTest.autoSize = true;
  1620.       var _loc3_ = 0;
  1621.       _loc3_ = _loc2_.objTimer.getSecTime();
  1622.       _loc1_.txt_timeRemain.text = Math.floor(_loc3_);
  1623.       _loc1_.popupYes.objRef = _loc2_;
  1624.       _loc1_.popupYes.onRelease = function()
  1625.       {
  1626.          this.objRef.popupYes();
  1627.       };
  1628.       _loc1_.popupYes.onRollOver = function()
  1629.       {
  1630.          this.gotoAndStop("OVER");
  1631.       };
  1632.       _loc1_.popupYes.onRollOut = _loc1_.popupYes.onReleaseOutside = function()
  1633.       {
  1634.          this.gotoAndStop("UP");
  1635.       };
  1636.       _loc1_.popupNo.objRef = _loc2_;
  1637.       _loc1_.popupNo.onRelease = function()
  1638.       {
  1639.          this.objRef.popupNo();
  1640.       };
  1641.       _loc1_.popupNo.onRollOver = function()
  1642.       {
  1643.          this.gotoAndStop("OVER");
  1644.       };
  1645.       _loc1_.popupNo.onRollOut = _loc1_.popupNo.onReleaseOutside = function()
  1646.       {
  1647.          this.gotoAndStop("UP");
  1648.       };
  1649.       _loc1_.btn_CloseQuitTestDialog.objRef = _loc2_;
  1650.       _loc1_.btn_CloseQuitTestDialog.onRelease = function()
  1651.       {
  1652.          this._parent.gotoAndStop("blank");
  1653.       };
  1654.    }
  1655.    function getScore()
  1656.    {
  1657.       var iscore = 0;
  1658.       var _iTotalQuestion = this.getTotalTestQuestions();
  1659.       var _loc1_ = 0;
  1660.       while(_loc1_ < _iTotalQuestion)
  1661.       {
  1662.          var _loc3_ = String(this.c_strSkill.toLowerCase() + "_" + (_loc1_ + 1));
  1663.          var _loc2_ = this.c_hQuestionState["get"](_loc3_);
  1664.          if(_loc2_ != null && _loc2_ != undefined)
  1665.          {
  1666.             var blnCorrect = _loc2_.correct;
  1667.             iscore += Number(blnCorrect);
  1668.          }
  1669.          _loc1_ = _loc1_ + 1;
  1670.       }
  1671.       return iscore;
  1672.    }
  1673.    function initResultScreen()
  1674.    {
  1675.       var c_objUICoodInstance = com.controller.UICoordinator.getInstance();
  1676.       var iTotalSections = this.c_objScreenData.DOC.section.length;
  1677.       var _loc3_ = new Object();
  1678.       _loc3_.iscore = this.getScore();
  1679.       if(iTotalSections == undefined || iTotalSections == null || iTotalSections == "")
  1680.       {
  1681.          var _loc2_ = this.c_objScreenData.DOC.section.question.length;
  1682.          if(_loc2_ == undefined || _loc2_ == null || _loc2_ == "")
  1683.          {
  1684.             _loc3_.iTotalNumberQuestions = this.c_objScreenData.DOC.section.attributes.maxMark;
  1685.          }
  1686.          else
  1687.          {
  1688.             _loc3_.iTotalNumberQuestions = this.c_objScreenData.DOC.section.attributes.maxMark * _loc2_;
  1689.          }
  1690.       }
  1691.       else
  1692.       {
  1693.          var _loc1_ = 0;
  1694.          while(_loc1_ < iTotalSections)
  1695.          {
  1696.             _loc2_ = this.c_objScreenData.DOC.section[_loc1_].question.length;
  1697.             if(_loc2_ == undefined || _loc2_ == null || _loc2_ == "")
  1698.             {
  1699.                _loc3_.iTotalNumberQuestions += this.c_objScreenData.DOC.section[_loc1_].attributes.maxMark * 1;
  1700.             }
  1701.             else
  1702.             {
  1703.                _loc3_.iTotalNumberQuestions += this.c_objScreenData.DOC.section[_loc1_].attributes.maxMark * _loc2_;
  1704.             }
  1705.             _loc1_ = _loc1_ + 1;
  1706.          }
  1707.       }
  1708.       _loc3_.iTimeTaken = this.objTimer.getMinsTime() + " min(s)";
  1709.       _loc3_.strTestNum = this.c_objScreenData.DOC.section[this.c_iPartNo].attributes.test;
  1710.       com.controller.UICoordinator.getInstance().c_objScreenFactory.resultInstance.populateResult(_loc3_,this.c_strSkill);
  1711.       _level101.result.testMenu.objRef = this;
  1712.       _level101.result.testMenu.onRelease = function()
  1713.       {
  1714.          this.objRef.backToTestMenu();
  1715.       };
  1716.       _level101.btn_quitTest._visible = false;
  1717.       _level101.btn_quitTest._visible = false;
  1718.       _level101.btn_quitTest._visible = false;
  1719.    }
  1720.    function btn_submitTest()
  1721.    {
  1722.       var _loc1_ = this;
  1723.       var _objRef = _loc1_;
  1724.       _loc1_.removeElements();
  1725.       var timetaken = _objRef.objTimer.getMinsTime();
  1726.       var _loc2_ = function(success)
  1727.       {
  1728.          var _loc1_ = com.controller.UICoordinator.getInstance();
  1729.          _loc1_.doAction("SHOWRESULT","");
  1730.          _objRef.initResultScreen();
  1731.          _objRef.c_objNavigator.destroyNav();
  1732.          _objRef.c_objSoundController.killSoundController();
  1733.          _objRef.c_objVolumeController.killVolumeController();
  1734.          _objRef.objTimer.destroyTimer();
  1735.          _level101.btn_submitTest._visible = false;
  1736.          _objRef.onPartChange(Number(_objRef.c_strSelected.split("_")[1]));
  1737.       };
  1738.       if(_loc1_.c_strEnvironment == "Windows" || _loc1_.c_strEnvironment == "Macintosh")
  1739.       {
  1740.          _loc1_.connectXMLSocket("true",timetaken,_loc2_);
  1741.       }
  1742.       else if(_loc1_.c_strEnvironment == "Linux")
  1743.       {
  1744.          _loc2_();
  1745.       }
  1746.    }
  1747.    function backToTestMenu()
  1748.    {
  1749.       var _loc1_ = this;
  1750.       _level101.btn_backToMenu.enabled = false;
  1751.       _loc1_.removeElements();
  1752.       _level101.result.removeMovieClip();
  1753.       com.controller.UICoordinator.getInstance().volumeLevel = String(_loc1_.c_objVolumeController.getLevel());
  1754.       _loc1_.c_objNavigator.destroyNav();
  1755.       _loc1_.c_objSoundController.killSoundController();
  1756.       _loc1_.c_objVolumeController.killVolumeController();
  1757.       _loc1_.objTimer.destroyTimer();
  1758.       var _loc2_ = com.controller.UICoordinator.getInstance();
  1759.       _loc2_.doAction("TestXML","_objData");
  1760.    }
  1761.    function popupYes()
  1762.    {
  1763.       var _loc1_ = this;
  1764.       _loc1_.removeElements();
  1765.       _level101.mc_PopUp.gotoAndStop("blank");
  1766.       var _loc2_ = 0;
  1767.       _loc2_ = _loc1_.objTimer.getSecTime();
  1768.       _loc2_ = Math.round(_loc2_);
  1769.       com.controller.UICoordinator.getInstance().volumeLevel = String(_loc1_.c_objVolumeController.getLevel());
  1770.       _loc1_.c_objNavigator.destroyNav();
  1771.       _loc1_.c_objSoundController.killSoundController();
  1772.       _loc1_.c_objVolumeController.killVolumeController();
  1773.       _loc1_.onPartChange(Number(_loc1_.c_strSelected.split("_")[1]));
  1774.       _loc1_.objTimer.destroyTimer();
  1775.       var _loc3_ = function(success)
  1776.       {
  1777.          var _loc1_ = com.controller.UICoordinator.getInstance();
  1778.          _loc1_.doAction("TestXML","");
  1779.       };
  1780.       if(_loc1_.c_strEnvironment == "Windows" || _loc1_.c_strEnvironment == "Macintosh")
  1781.       {
  1782.          _loc1_.connectXMLSocket("false",_loc2_,_loc3_);
  1783.       }
  1784.       else if(_loc1_.c_strEnvironment == "Linux")
  1785.       {
  1786.          _loc3_();
  1787.       }
  1788.    }
  1789.    function popupNo()
  1790.    {
  1791.       var _loc1_ = this;
  1792.       _loc1_.removeElements();
  1793.       _level101.mc_PopUp.gotoAndStop("blank");
  1794.       _level101.btn_submitTest._visible = false;
  1795.       com.controller.UICoordinator.getInstance().volumeLevel = String(_loc1_.c_objVolumeController.getLevel());
  1796.       _loc1_.c_objNavigator.destroyNav();
  1797.       _loc1_.c_objSoundController.killSoundController();
  1798.       _loc1_.c_objVolumeController.killVolumeController();
  1799.       _loc1_.onPartChange(Number(_loc1_.c_strSelected.split("_")[1]));
  1800.       _loc1_.objTimer.destroyTimer();
  1801.       var objRef = _loc1_;
  1802.       var _loc2_ = function(success)
  1803.       {
  1804.          var _loc1_ = com.controller.UICoordinator.getInstance();
  1805.          _loc1_.doAction("SHOWRESULT","");
  1806.          objRef.initResultScreen();
  1807.       };
  1808.       if(_loc1_.c_strEnvironment == "Windows" || _loc1_.c_strEnvironment == "Macintosh")
  1809.       {
  1810.          _loc1_.connectXMLSocket("true",_loc1_.objTimer.getMinsTime(),_loc2_);
  1811.       }
  1812.       else if(_loc1_.c_strEnvironment == "Linux")
  1813.       {
  1814.          _loc2_();
  1815.       }
  1816.    }
  1817.    function connectXMLSocket(_status, _time, fnCallback)
  1818.    {
  1819.       var _loc1_ = this;
  1820.       var objXML = new com.data.OTOXML();
  1821.       var strSocketdata = objXML.getXMLString(_loc1_.c_hQuestionState,_loc1_.c_strSkill,_loc1_.c_iTotalTestQuestions);
  1822.       var strFileName = com.controller.UICoordinator.getInstance().currentTestName;
  1823.       var strUserName = com.controller.UICoordinator.getInstance().userASCIIName;
  1824.       var objThis = _loc1_;
  1825.       var fnWriteScoreFile = function(success)
  1826.       {
  1827.          var _loc1_ = this;
  1828.          if(success)
  1829.          {
  1830.             var strResult = objXML.getResultXmlString(_status,_time,objThis.c_iTotalTestQuestions);
  1831.             var strTemp = com.controller.UICoordinator.getInstance().convertToASCII("_s".toString());
  1832.             var strFileName = com.controller.UICoordinator.getInstance().currentTestName;
  1833.             var _loc3_ = strFileName + strTemp;
  1834.             var fnWriteUserFile = function(blnsuccess)
  1835.             {
  1836.                var _loc1_ = this;
  1837.                if(blnsuccess)
  1838.                {
  1839.                   var _loc2_ = objThis.createRecordXML(strFileName);
  1840.                   if(_loc1_.c_strEnvironment == "Windows" || _loc1_.c_strEnvironment == "Macintosh" || _loc1_.c_strEnvironment == "Linux")
  1841.                   {
  1842.                      _level101.storeRecordSO("record",_loc2_,fnCallback,_loc1_);
  1843.                   }
  1844.                }
  1845.                else
  1846.                {
  1847.                   fnCallback.call(objThis,false);
  1848.                }
  1849.             };
  1850.             var _loc2_ = undefined;
  1851.             if(objThis.c_strMode == "Take")
  1852.             {
  1853.                _loc2_ = fnWriteUserFile;
  1854.             }
  1855.             else
  1856.             {
  1857.                _loc2_ = fnCallback;
  1858.             }
  1859.             if(_loc1_.c_strEnvironment == "Windows" || _loc1_.c_strEnvironment == "Macintosh" || _loc1_.c_strEnvironment == "Linux")
  1860.             {
  1861.                _level101.writeTestDataSO(_loc3_,strResult,_loc2_,_loc1_,strUserName);
  1862.             }
  1863.          }
  1864.          else
  1865.          {
  1866.             fnCallback.call(objThis,false);
  1867.          }
  1868.       };
  1869.       if(_loc1_.c_strEnvironment == "Windows" || _loc1_.c_strEnvironment == "Macintosh" || _loc1_.c_strEnvironment == "Linux")
  1870.       {
  1871.          _level101.writeTestDataSO(strFileName,strSocketdata,fnWriteScoreFile,_loc1_,strUserName);
  1872.       }
  1873.    }
  1874.    function createRecordXML(_strFileName)
  1875.    {
  1876.       var _loc1_ = this.c_objSourceRef.c_objUICoodInstance.c_objRecordXML;
  1877.       var _loc3_ = _loc1_.parentNode;
  1878.       var _loc2_ = _loc3_.createElement("testname");
  1879.       var objTextNode = _loc3_.createTextNode(_strFileName + "_W.xml");
  1880.       _loc1_.appendChild(_loc2_);
  1881.       _loc2_.appendChild(objTextNode);
  1882.       return _loc1_.toString();
  1883.    }
  1884.    function storeRecordSO1(_strFileName, _strFileData, fnCallback)
  1885.    {
  1886.       var _loc2_ = SharedObject.getLocal(_strFileName,"/");
  1887.       _loc2_.data.RecordData = _strFileData;
  1888.       var _loc1_ = _loc2_.flush(102400);
  1889.       if(_loc1_)
  1890.       {
  1891.          fnCallback.call(this,true);
  1892.       }
  1893.       else if(!_loc1_)
  1894.       {
  1895.          _level101.txt_Display1.text += "\ncould not save record SO object";
  1896.       }
  1897.       else if(_loc1_ == "pending")
  1898.       {
  1899.          _loc2_.onStatus = function(infoObject)
  1900.          {
  1901.             if(infoObject.code == "SharedObject.Flush.Failed")
  1902.             {
  1903.                _level101.txt_Display2.text += "you denied";
  1904.                trace("you denied");
  1905.                fnCallback.call(this,false);
  1906.             }
  1907.             else if(infoObject.code == "SharedObject.Flush.Success")
  1908.             {
  1909.                _level101.txt_Display2.text += "you ACCEPTED";
  1910.                trace("you ACCEPTED");
  1911.             }
  1912.          };
  1913.       }
  1914.    }
  1915.    function writeTestDataSO1(_strFileName, _strFileData, fnCallback)
  1916.    {
  1917.       var _loc2_ = this;
  1918.       var _loc3_ = com.controller.UICoordinator.getInstance().userName;
  1919.       var objUserSO = SharedObject.getLocal(_loc3_,"/");
  1920.       objUserSO.data[_strFileName] = _strFileData;
  1921.       var _objRef = _loc2_;
  1922.       var _loc1_ = objUserSO.flush(10240);
  1923.       if(_loc1_ == true)
  1924.       {
  1925.          fnCallback.call(_loc2_,true);
  1926.       }
  1927.       else if(_loc1_ == false)
  1928.       {
  1929.          fnCallback.call(_loc2_,false);
  1930.       }
  1931.       else if(_loc1_ == "pending")
  1932.       {
  1933.          _level101.onEnterFrame = function()
  1934.          {
  1935.             objUserSO.getSize();
  1936.          };
  1937.          objUserSO.onStatus = function(infoObject)
  1938.          {
  1939.             if(infoObject.code == "SharedObject.Flush.Failed")
  1940.             {
  1941.                trace("you denied Str ");
  1942.                _objRef.showConfirmPopup();
  1943.                fnCallback.call(this,false);
  1944.             }
  1945.             else if(infoObject.code == "SharedObject.Flush.Success")
  1946.             {
  1947.                _level101.txt_Display2.text += "you ACCEPTED";
  1948.                trace("you ACCEPTED");
  1949.                fnCallback.call(this,true);
  1950.             }
  1951.             delete _level101.onEnterFrame;
  1952.          };
  1953.       }
  1954.    }
  1955.    function showConfirmPopup()
  1956.    {
  1957.       var _loc1_ = _level101.attachMovie("mc_SaveDataPopup","mc_SaveDataPopup",900);
  1958.       _loc1_._x = 250;
  1959.       _loc1_._y = 210;
  1960.       _loc1_.btn_OK.onPress = function()
  1961.       {
  1962.          this._parent._visible = false;
  1963.          System.showSettings(1);
  1964.       };
  1965.       _loc1_.btn_Cancel.onPress = function()
  1966.       {
  1967.          this._parent._visible = false;
  1968.       };
  1969.    }
  1970.    function attachPopUp()
  1971.    {
  1972.       _level101.attachMovie("mc_popup","mc_PopUp",700);
  1973.    }
  1974.    function resetPanelState()
  1975.    {
  1976.       var _loc3_ = this;
  1977.       var objQuestion = _loc3_.c_objScreenData.DOC.section[_loc3_.c_iPartNo].question;
  1978.       var _loc1_ = 0;
  1979.       while(_loc1_ < objQuestion.length)
  1980.       {
  1981.          var _loc2_ = _level101["mc_QuesType" + (_loc3_.c_iPartNo + 1)]["mc_textcont_" + (_loc1_ + 1)];
  1982.          _loc2_.gotoAndStop("_DESELECTED");
  1983.          _loc1_ = _loc1_ + 1;
  1984.       }
  1985.    }
  1986.    function showFeedbackL(_QuesID)
  1987.    {
  1988.       var _loc1_ = _QuesID;
  1989.       var _loc2_ = _level101["mc_QuesType" + (this.c_iPartNo + 1)];
  1990.       var _objQuestion = this.c_objScreenData.DOC.section[this.c_iPartNo].question;
  1991.       var _iFirstQNum = Number(_objQuestion[Number(_loc1_) - 1].attributes.number);
  1992.       var _iCorrectOption = Number(_objQuestion[Number(_loc1_) - 1].attributes.correct);
  1993.       var _loc3_ = this.c_hQuestionState["get"](String("listening_" + _iFirstQNum));
  1994.       var _objChoice = _objQuestion[_loc1_ - 1].choice;
  1995.       if(_loc3_.attempted != undefined || _loc3_.attempted != null)
  1996.       {
  1997.          var _iAttempted = Number(_loc3_.attempted);
  1998.          if(_loc3_.correct == 0)
  1999.          {
  2000.             _loc2_["mc_TickCross_" + _loc1_ + "_" + _iAttempted].gotoAndStop("INCORRECT");
  2001.             _loc2_["mc_TickCross_" + _loc1_ + "_" + _iCorrectOption].gotoAndStop("CORRECT");
  2002.          }
  2003.          else
  2004.          {
  2005.             _loc2_["mc_TickCross_" + _loc1_ + "_" + _iAttempted].gotoAndStop("CORRECT");
  2006.          }
  2007.       }
  2008.       else
  2009.       {
  2010.          _loc2_["mc_TickCross_" + _loc1_ + "_" + _iCorrectOption].gotoAndStop("CORRECT");
  2011.       }
  2012.    }
  2013.    function showQuesSelection(strTemplateType, iQueNo)
  2014.    {
  2015.       var _loc1_ = iQueNo;
  2016.       var _loc3_ = this;
  2017.       var _loc2_ = undefined;
  2018.       var iQuesCount = 2;
  2019.       _loc3_.c_strCurrSelected = String(_loc1_);
  2020.       if(strTemplateType == "MCQType_7")
  2021.       {
  2022.          _loc2_ = _level101.MCQType_7.mc_SPType_7.getScrollContent();
  2023.          iQuesCount = _loc3_.c_objSection.question.length;
  2024.       }
  2025.       else if(strTemplateType == "PairedMCQScrolling")
  2026.       {
  2027.          _loc2_ = _level101.PairedMCQScrolling.mc_ScrollPaneQue.getScrollContent();
  2028.          _loc1_ = (_loc1_ - 1) % 2 + 1;
  2029.       }
  2030.       else if(strTemplateType == "PairedMCQExtract")
  2031.       {
  2032.          _loc2_ = _level101.PairedMCQExtract;
  2033.          _loc1_ = (_loc1_ - 1) % 2 + 1;
  2034.       }
  2035.       _loc3_.c_objMCQ.deselectionAll(_loc2_,iQuesCount);
  2036.       _loc3_.c_objMCQ.showCurrentSelection(_loc2_,_loc1_);
  2037.       _loc3_.c_objMCQ.showNavigationSelection();
  2038.    }
  2039.    function setTotalTestQuestions(_iTotalTestQuestions)
  2040.    {
  2041.       this.c_iTotalTestQuestions = _iTotalTestQuestions;
  2042.    }
  2043.    function getTotalTestQuestions()
  2044.    {
  2045.       return this.c_iTotalTestQuestions;
  2046.    }
  2047.    function StoreOptioncliked(in_OptName, in_objCompRef, in_bValue)
  2048.    {
  2049.       var _loc1_ = this;
  2050.       _loc1_.c_objOptName.mcSelected = in_OptName;
  2051.       _loc1_.c_objOptName.objCompRef = in_objCompRef;
  2052.       _loc1_.c_objOptName.bValue = in_bValue;
  2053.    }
  2054.    function GetOptioncliked()
  2055.    {
  2056.       return this.c_objOptName;
  2057.    }
  2058. }
  2059.