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

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