home *** CD-ROM | disk | FTP | other *** search
- class com.screen.FIB2
- {
- var strTitle;
- var c_strEnvironment;
- var iWidth;
- var _parent;
- var mcOver;
- var strText;
- var objRef;
- var obj;
- var objKeyup;
- var fib;
- var c_fibY;
- var iLineSp = 22;
- var iLevel = 1;
- var btnNo = 0;
- function FIB2()
- {
- }
- function init(_objRef, _title, _text, _wth, x, y, _mcName, _type, _group, _navRef)
- {
- var _loc1_ = this;
- _loc1_.objRef = _objRef;
- _loc1_.strTitle = _title;
- _loc1_.strText = _text;
- _loc1_.iWidth = _wth;
- _loc1_.xLoc = x;
- _loc1_.yLoc = y;
- _loc1_.c_strAthMC = _mcName;
- _loc1_.c_strType = _type;
- _loc1_.c_iGroup = _group;
- _loc1_.c_objNavRef = _navRef;
- _loc1_.c_upperChk = "";
- _loc1_.c_strMode = _loc1_.c_objNavRef.c_objTestRef.c_strMode;
- _loc1_.c_strSkill = _loc1_.c_objNavRef.c_objTestRef.c_strSkill;
- _loc1_.c_objHMObj = _loc1_.c_objNavRef.c_objTestRef.c_hQuestionState;
- _loc1_.c_strEnvironment = com.controller.UICoordinator.getInstance().getOSEnvironment();
- _loc1_.startProcess();
- }
- function removedMovieObject()
- {
- var _loc3_ = this;
- trace("removedMovieObject btnNo : " + _loc3_.btnNo);
- var _loc2_ = 0;
- while(_loc2_ < _loc3_.btnNo)
- {
- var _loc1_ = _loc3_.objRef.fib["Box" + _loc2_];
- trace(">>>>>>>>>>>>>>>>>>ppppppp box ::::::" + _loc1_);
- Key.removeListener(_loc1_.objkeyUP);
- delete _loc1_.objkeyUP;
- false;
- _loc2_ = _loc2_ + 1;
- }
- }
- function startProcess()
- {
- var _loc1_ = this;
- _loc1_.objRef.mc_feedbackBox._visible = false;
- var mcScrollPane = _loc1_.objRef.attachMovie("FScrollPaneSymbol","mc_ScrollPane",_loc1_.objRef.getNextHighestDepth());
- _loc1_.objRef.mc_ScrollPane.setScrollContent("SP_Content");
- _loc1_.objRef.fib = _loc1_.objRef.mc_ScrollPane.getScrollContent();
- _loc1_.fib = _loc1_.objRef.fib;
- _loc1_.fib._x = _loc1_.xLoc;
- _loc1_.fib._y = _loc1_.yLoc;
- _loc1_.displayTitle();
- _loc1_.displayText();
- }
- function displayTitle()
- {
- var _loc2_ = this;
- trace("????????????????????/ IN TITLE");
- _loc2_.fib.createTextField("title",500,10,0,_loc2_.iWidth,25);
- var _loc1_ = _loc2_.fib.title;
- trace("#################### 1. FIB2 - title : " + _loc1_);
- var _loc3_ = new TextFormat();
- _loc3_.font = "Verdana";
- _loc3_.size = 11;
- _loc3_.color = "0x000000";
- if(_loc2_.c_strEnvironment == "Linux")
- {
- _loc1_.embedFonts = true;
- }
- _loc1_.html = true;
- _loc1_.autoSize = true;
- trace("#################### 2. FIB2 - strTitle.data : " + _loc2_.strTitle.data);
- _loc1_.htmlText = _loc2_.strTitle.data;
- _loc1_.selectable = false;
- _loc1_.setTextFormat(_loc3_);
- false;
- var strAlignment = _loc2_.getAlignment();
- trace("#################### 3. FIB2 - strAlignment : " + strAlignment);
- if(strAlignment == "center")
- {
- _loc1_._x = (_loc2_.iWidth - _loc1_.textWidth) / 2;
- trace("#################### 4. FIB2 - center title._x : " + _loc1_._x);
- }
- else if(strAlignment == "right")
- {
- _loc1_._x = _loc2_.iWidth - _loc1_.textWidth;
- trace("#################### 4. FIB2 - right title._x : " + _loc1_._x);
- }
- _loc1_._y += 10;
- }
- function getAlignment()
- {
- var _loc1_ = this.strTitle.attributes.textAlign;
- return _loc1_;
- }
- function displayText()
- {
- var _loc1_ = this;
- _loc1_.c_arrQuesNos = new Array();
- var arrData = _loc1_.arrangetext();
- var iMC_Width = 0;
- var iMC_X;
- var iMC_Y;
- if(_loc1_.c_strType == "textField")
- {
- iMC_X = 20;
- iMC_Y = 12;
- }
- else if(_loc1_.c_strType == "Button")
- {
- iMC_X = 10;
- iMC_Y = 42;
- }
- else
- {
- iMC_X = 10;
- iMC_Y = 5;
- }
- var objTF = new TextFormat();
- objTF.font = "Verdana";
- objTF.size = 11;
- objTF.color = "0x000000";
- var i = 0;
- while(i < arrData.length)
- {
- if(i % 2 == 1)
- {
- if(arrData[i] != "")
- {
- var _loc2_ = _loc1_.fib.attachMovie(_loc1_.c_strAthMC,"Box" + _loc1_.btnNo,i);
- _loc1_.c_arrQuesNos.push(arrData[i]);
- _loc2_._x = iMC_X;
- _loc2_._y = iMC_Y;
- _loc1_.setFibRefY(iMC_Y);
- _loc2_.answered = "no";
- _loc2_.gotoAndStop("NORMAL");
- _loc2_.over.gotoAndStop("BLANK");
- if(_loc1_.c_strType == "Button" or _loc1_.c_strType == "MovieClip")
- {
- var iBoxWith = _loc2_._width - 12;
- }
- else
- {
- var iBoxWith = _loc2_._width;
- }
- iMC_X += iBoxWith;
- iMC_Width += iBoxWith;
- if(iMC_X > _loc1_.iWidth)
- {
- if(_loc1_.c_strType == "textField")
- {
- iMC_X = iBoxWith + 20;
- }
- else
- {
- iMC_X = iBoxWith + 10;
- }
- iMC_Width = iBoxWith;
- iMC_Y += _loc1_.iLineSp;
- if(_loc1_.c_strType == "textField")
- {
- _loc2_._x = 20;
- }
- else
- {
- _loc2_._x = 10;
- }
- _loc2_._y = iMC_Y;
- }
- if(_loc1_.c_strType == "Button")
- {
- var strLable = arrData[i];
- _loc1_.setButtonEvents(_loc2_,strLable);
- }
- else if(_loc1_.c_strType == "MovieClip")
- {
- _loc2_.btnLable.text = _loc1_.c_iExtID;
- _loc2_.strCorrectAnswer = arrData[i];
- _loc2_.ID = _loc1_.c_iExtID;
- _loc2_.inputTxt = "";
- _loc1_.c_iExtID = _loc1_.c_iExtID + 1;
- _loc1_.setMovieClipEvent(_loc2_);
- _loc1_.displayPreMode(_loc2_);
- }
- _loc1_.btnNo = _loc1_.btnNo + 1;
- }
- }
- else if(i % 2 == 0)
- {
- var arrTmp = arrData[i].split(" ");
- var tmpWidth = iMC_Width;
- var strNewLine = false;
- _loc1_.fib.createTextField("text" + i,i,iMC_X,iMC_Y,10,20);
- var _loc3_ = _loc1_.fib["text" + i];
- _loc3_.text = "";
- var objOutput = _loc1_.populateText(arrTmp,_loc3_,objTF,iMC_Width,tmpWidth,strNewLine);
- strNewLine = objOutput.strNewLine;
- var j = objOutput.j;
- iMC_Width = objOutput.iMC_Width;
- _loc3_.text = _loc3_.text.substr(0,_loc3_.text.length - 1);
- _loc3_.autoSize = true;
- var strTmp = "";
- arrData = _loc1_.updateTextField(j,arrTmp,strTmp,strNewLine,_loc3_,arrData,i);
- if(_loc1_.c_strEnvironment == "Linux")
- {
- _loc3_.embedFonts = true;
- }
- delete j;
- _loc3_._width = 10;
- _loc3_.html = true;
- _loc3_.htmlText = _loc3_.text;
- _loc3_.autoSize = true;
- _loc3_.setTextFormat(objTF);
- iMC_X += _loc3_._width;
- if(iMC_Width > _loc1_.iWidth or strNewLine)
- {
- if(_loc1_.c_strType == "textField")
- {
- iMC_X = 20;
- }
- else
- {
- iMC_X = 10;
- }
- iMC_Width = 0;
- iMC_Y += _loc1_.iLineSp;
- }
- }
- i++;
- }
- _loc1_.objRef.mc_ScrollPane.refreshPane();
- _loc1_.objRef.mc_ScrollPane.setSize(_loc1_.objRef.mc_scrollRefrence._width - 1,_loc1_.objRef.mc_scrollRefrence._height - 1.2);
- _loc1_.objRef.mc_ScrollPane._x = _loc1_.objRef.mc_scrollRefrence._x;
- _loc1_.objRef.mc_ScrollPane._y = _loc1_.objRef.mc_scrollRefrence._y + 1.1;
- delete objTF;
- }
- function updateTextField(in_j, arrTmp, strTmp, strNewLine, tField, arrData, in_iIndex, strEnvironment)
- {
- var _loc1_ = in_j;
- var _loc2_ = strTmp;
- var _loc3_ = arrTmp;
- _loc1_;
- while(_loc1_ < _loc3_.length)
- {
- _loc2_ = _loc2_ + _loc3_[_loc1_] + " ";
- _loc1_ = _loc1_ + 1;
- }
- _loc2_ = _loc2_.substr(0,_loc2_.length - 1);
- if(_loc2_.length > 0)
- {
- if(this.c_strEnvironment == "Linux")
- {
- tField.embedFonts = true;
- }
- if(!strNewLine)
- {
- tField.text = tField.text.substr(0,tField.text.length - _loc2_.split(" ")[0].length);
- }
- else
- {
- tField.text = tField.text.substr(0,tField.text.length - 2);
- }
- arrData = this.updateArray(arrData,_loc2_,in_iIndex);
- }
- return arrData;
- }
- function populateText(arrTmp, tField, objTF, iMC_Width, tmpWidth, strNewLine)
- {
- var _loc1_ = tField;
- var _loc3_ = arrTmp;
- var objOutput = new Object();
- var _loc2_ = 0;
- while(_loc2_ < _loc3_.length)
- {
- if(this.c_strEnvironment == "Linux")
- {
- _loc1_.embedFonts = true;
- }
- _loc1_.text = _loc1_.text + _loc3_[_loc2_] + " ";
- _loc1_.type = "dynamic";
- _loc1_.selectable = false;
- _loc1_.setTextFormat(objTF);
- _loc1_.autoSize = true;
- _loc1_.multiline = true;
- iMC_Width = tmpWidth + _loc1_._width;
- if(iMC_Width > this.iWidth)
- {
- break;
- }
- if(_loc3_[_loc2_] == "<p></p>")
- {
- _loc2_ = _loc2_ + 1;
- strNewLine = true;
- break;
- }
- _loc2_ = _loc2_ + 1;
- }
- objOutput.j = _loc2_;
- objOutput.strNewLine = strNewLine;
- objOutput.iMC_Width = iMC_Width;
- return objOutput;
- }
- function displayPreMode(box)
- {
- var _loc1_ = this;
- var _loc2_ = box;
- if(_loc1_.c_strMode == "Review")
- {
- _loc1_.objRef.btn_next._visible = true;
- var strAnswered = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + _loc2_.ID).attempted;
- if(strAnswered != null or strAnswered != undefined)
- {
- _loc2_.inputTxt = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + _loc2_.ID).attempted;
- }
- else
- {
- _loc2_.inputTxt = "";
- }
- var mcCorInc = _loc2_.attachMovie("mc_TickCross","mc_TickCross",10);
- if(_loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + _loc2_.ID).correct == "1")
- {
- mcCorInc.gotoAndStop("CORRECT");
- }
- else
- {
- mcCorInc.gotoAndStop("INCORRECT");
- var _loc3_ = _loc2_.attachMovie("mc_showbtn","mc_showbtn",11);
- _loc3_.gotoAndStop("NORMAL");
- _loc3_._x = 510 - _loc2_._x;
- }
- mcCorInc._x = 480 - _loc2_._x;
- _loc3_.objRef = _loc1_;
- _loc3_.onRelease = function()
- {
- var _loc1_ = this;
- _loc1_.objRef.c_objNavRef.c_iSeleID = _loc1_._parent.ID;
- _loc1_.objRef.c_objNavRef.c_preSelecetd = _loc1_.objRef.c_objNavRef.c_strSelecetd;
- _loc1_.objRef.c_objNavRef.c_strSelecetd = "_" + _loc1_.objRef.c_iGroup + "_" + _loc1_._parent._name.split("Box")[1];
- _loc1_.objRef.c_objNavRef.navClicked();
- _loc1_.objRef.c_btnShowPrevious = _loc1_.objRef.c_btnShowCurrent;
- _loc1_.objRef.c_btnShowPrevious.gotoAndStop("CLICKED");
- _loc1_.objRef.c_btnShowCurrent.gotoAndStop("CLICKED");
- _loc1_.objRef.c_btnShowCurrent = _loc1_;
- _loc1_.objRef.showCurrectAnswer(_loc1_._parent.strCorrectAnswer,_loc1_._parent.ID,true);
- _loc1_.gotoAndStop("CLICKED");
- };
- }
- else if(_loc1_.c_strMode == "Continue")
- {
- var strAnswered = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + _loc2_.ID).attempted;
- if(strAnswered != null or strAnswered != undefined)
- {
- _loc2_.inputTxt = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + _loc2_.ID).attempted;
- }
- else
- {
- _loc2_.inputTxt = "";
- }
- }
- }
- function setMovieClipEvent(box)
- {
- var _loc1_ = this;
- var _loc2_ = box;
- _loc2_.mc_Btn.onRollOver = function()
- {
- this._parent.mcOver.gotoAndStop("OVER");
- };
- _loc2_.mc_Btn.onRollOut = function()
- {
- this._parent.mcOver.gotoAndStop("BLANK");
- };
- _loc2_.mc_Btn.onDragOver = function()
- {
- this._parent.mcOver.gotoAndStop("OVER");
- };
- _loc2_.mc_Btn.onDragOut = function()
- {
- this._parent.mcOver.gotoAndStop("BLANK");
- };
- _loc2_.mc_Btn.objRef = _loc1_;
- _loc2_.mc_Btn.onRelease = function()
- {
- var _loc1_ = this;
- _loc1_.objRef.fileNo = _loc1_._parent._name.substr(3,_loc1_._name.length);
- _loc1_.objRef.c_objNavRef.c_iSeleID = _loc1_._parent.ID;
- _loc1_.objRef.c_objNavRef.c_preSelecetd = _loc1_.objRef.c_objNavRef.c_strSelecetd;
- _loc1_.objRef.c_objNavRef.c_strSelecetd = "_" + _loc1_.objRef.c_iGroup + "_" + _loc1_.objRef.fileNo;
- _loc1_.objRef.c_objNavRef.navClicked();
- if(_loc1_.objRef.c_strMode != "Review")
- {
- trace(">>> Roleasee EVt - 1");
- _loc1_.objRef.movclpClicked();
- }
- else
- {
- _loc1_.objRef.c_btnShowPrevious = _loc1_.objRef.c_btnShowCurrent;
- _loc1_.objRef.c_btnShowCurrent = _loc1_._parent.mc_showbtn;
- _loc1_.objRef.showCurrectAnswer(_loc1_._parent.strCorrectAnswer,_loc1_._parent.ID,false);
- }
- };
- }
- function setButtonEvents(box, strLable)
- {
- var _loc1_ = this;
- var _loc2_ = box;
- _loc2_.objRef = _loc1_;
- _loc2_.btnLable.text = strLable;
- _loc2_.onRollOver = function()
- {
- this.mcOver.gotoAndStop("OVER");
- };
- _loc2_.onRollOut = function()
- {
- this.mcOver.gotoAndStop("BLANK");
- };
- _loc2_.onDragOver = function()
- {
- this.mcOver.gotoAndStop("OVER");
- };
- _loc2_.onDragOut = function()
- {
- this.mcOver.gotoAndStop("BLANK");
- };
- _loc2_.onRelease = function()
- {
- var _loc1_ = this;
- _loc1_.objRef.fileNo = _loc1_._name.substr(3,_loc1_._name.length);
- _loc1_.objRef.c_objNavRef.c_iSeleID = _loc1_.objRef.c_arrQuesNos[_loc1_.objRef.fileNo];
- _loc1_.objRef.c_objNavRef.c_preSelecetd = _loc1_.objRef.c_objNavRef.c_strSelecetd;
- _loc1_.objRef.c_objNavRef.c_strSelecetd = "_" + (_loc1_.objRef.c_iGroup - 1) + "_" + _loc1_.objRef.fileNo;
- _loc1_.objRef.c_objNavRef.navClicked();
- _loc1_.objRef.btnClicked();
- };
- }
- function showCurrectAnswer(_strAnswer, _Qno, _bln)
- {
- var _loc2_ = this;
- _loc2_.c_btnShowPrevious.gotoAndStop("NORMAL");
- var _loc1_ = _loc2_.objRef.mc_feedbackBox;
- if(_bln)
- {
- _loc1_._visible = true;
- _loc1_.btn_close.enabled = true;
- _loc1_.btn_close.objRef = _loc2_;
- _loc1_.btn_close.onRelease = function()
- {
- var _loc1_ = this;
- _loc1_.objRef.c_btnShowCurrent.gotoAndStop("NORMAL");
- _loc1_.objRef.c_btnShowCurrent.enabled = true;
- _loc1_.enabled = false;
- _loc1_._parent._visible = false;
- _loc1_._parent.txt_header.text = "";
- _loc1_._parent.txt_options.text = "";
- };
- _loc1_.swapDepths(100);
- _loc1_.mc_resizableBox.useHandCursor = false;
- _loc1_.mc_resizableBox.onPress = function()
- {
- this._parent.startDrag(false,-55,12,324,255);
- };
- _loc1_.mc_resizableBox.onRelease = _loc1_.mc_resizableBox.onReleaseOutside = function()
- {
- stopDrag();
- };
- var _loc3_ = new com.comp.ResizableBox();
- _loc3_.resizeBox(370,80,_loc1_.mc_resizableBox);
- var revTxt = _loc2_.objRef.mc_resizableBox;
- _loc1_.txt_header.text = "Correct Answer(s) for Question No. " + _Qno;
- _loc1_.txt_header.autoSize = "left";
- _loc1_.txt_options.text = _strAnswer.split("|").join(", ");
- _loc1_.txt_options.autoSize = "left";
- }
- else
- {
- _loc1_._visible = false;
- }
- }
- function arrangetext()
- {
- this.strText = this.strText.split("<p></p>").join(" <p></p> ");
- var _loc3_ = this.strText.split("<gap>");
- var arrData = new Array();
- arrData.push(_loc3_[0]);
- var _loc1_ = 1;
- while(_loc1_ < _loc3_.length)
- {
- var _loc2_ = _loc3_[_loc1_].split("</gap>");
- arrData.push(_loc2_[0]);
- arrData.push(_loc2_[1]);
- false;
- _loc1_ = _loc1_ + 1;
- }
- false;
- false;
- return arrData;
- }
- function updateArray(_arr, _str, _iPos)
- {
- var _loc2_ = _arr;
- var _loc3_ = new Array();
- var _loc1_ = undefined;
- _loc1_ = 0;
- while(_loc1_ < _iPos + 1)
- {
- _loc3_.push(_loc2_[_loc1_]);
- _loc1_ = _loc1_ + 1;
- }
- _loc3_.push("");
- _loc3_.push(_str);
- _loc1_;
- while(_loc1_ < _loc2_.length)
- {
- _loc3_.push(_loc2_[_loc1_]);
- _loc1_ = _loc1_ + 1;
- }
- false;
- false;
- delete _str;
- delete _iPos;
- return _loc3_;
- }
- function movclpClicked()
- {
- var _loc1_ = this;
- var _loc2_ = 0;
- while(_loc2_ < _loc1_.btnNo)
- {
- var box = _loc1_.fib["Box" + _loc2_];
- if(box.inputTxt.length == 0)
- {
- box.gotoAndStop("NORMAL");
- }
- else
- {
- box.gotoAndStop("TYPED");
- var _loc3_ = _loc1_.c_objNavRef.c_objTestRef.c_iPartNo;
- var charCase = _loc1_.c_objNavRef.c_objTestRef.c_objScreenData.DOC.section[_loc3_].question[_loc2_].attributes.charToUpper;
- if(charCase != "true")
- {
- var strText = box.btnLable.text;
- trace(">>>># F35666 - strText : " + strText);
- box.btnLable.text = String(strText).toLowerCase();
- }
- else
- {
- var strText = box.btnLable.text;
- box.btnLable.text = String(strText);
- }
- }
- box.mcOver.gotoAndStop("BLANK");
- box.mc_Btn.enabled = true;
- Key.removeListener(box.objkeyUP);
- delete box.objkeyUP;
- delete box;
- _loc2_ = _loc2_ + 1;
- }
- var box = _loc1_.fib["Box" + _loc1_.fileNo];
- box.objkeyUP = new Object();
- box.objkeyUP.objRef = _loc1_;
- box.objkeyUP.onKeyUp = function()
- {
- this.objRef.textFieldChanged();
- };
- Key.addListener(box.objkeyUP);
- _loc1_.objRef.obj = _loc1_;
- _loc1_.objRef.objKeyup = box.objkeyUP;
- _loc1_.objRef.onUnload = function()
- {
- this.obj.removedMovieObject();
- Key.removeListener(this.objKeyup);
- };
- box.gotoAndStop("CLICKED");
- box.mcOver.gotoAndStop("BLANK");
- box.mc_Btn.enabled = false;
- _loc2_ = 0;
- while(_loc2_ < _loc1_.c_arrQuesNos.length)
- {
- _loc1_.objRef.btn_next._visible = true;
- if(_loc1_.objRef.fib["Box" + _loc2_].inputTxt.length < 1)
- {
- _loc1_.objRef.btn_next._visible = false;
- break;
- }
- _loc2_ = _loc2_ + 1;
- }
- }
- function textFieldChanged()
- {
- var _loc1_ = this;
- if(_loc1_.c_objNavRef.c_objTestRef.c_objScreenData.DOC.section.length - 1 != _loc1_.c_objNavRef.c_objTestRef.c_iPartNo && _loc1_.c_strSkill.toLowerCase != "reading")
- {
- var _loc2_ = 0;
- while(_loc2_ < _loc1_.c_arrQuesNos.length)
- {
- _loc1_.objRef.btn_next._visible = true;
- if(_loc1_.objRef.fib["Box" + _loc2_].inputTxt.length < 1)
- {
- _loc1_.objRef.btn_next._visible = false;
- break;
- }
- _loc2_ = _loc2_ + 1;
- }
- }
- var _loc3_ = new Object();
- if(_loc1_.objRef.fib["Box" + _loc1_.fileNo].inputTxt.length > 0)
- {
- var _strCorrAns = _loc1_.objRef.fib["Box" + _loc1_.fileNo].strCorrectAnswer;
- var testRef_pno = _loc1_.c_objNavRef.c_objTestRef.c_iPartNo;
- _loc1_.c_upperChk = _loc1_.c_objNavRef.c_objTestRef.c_objScreenData.DOC.section[testRef_pno].question[_loc1_.fileNo].attributes.charToUpper;
- if(_loc1_.c_upperChk == "true")
- {
- var strQuestionText = _loc1_.objRef.fib["Box" + _loc1_.fileNo].inputTxt;
- }
- else
- {
- var strQuestionText = _loc1_.objRef.fib["Box" + _loc1_.fileNo].inputTxt.toLowerCase();
- }
- _loc3_.attempted = strQuestionText;
- var arrCorrAns = _strCorrAns.split("|");
- _loc2_ = 0;
- while(_loc2_ < arrCorrAns.length)
- {
- if(strQuestionText == arrCorrAns[_loc2_])
- {
- _loc3_.correct = 1;
- break;
- }
- _loc3_.correct = 0;
- _loc2_ = _loc2_ + 1;
- }
- _loc1_.c_objNavRef.markAttempted();
- _loc1_.c_objNavRef.c_objTestRef.appendQuesObject(_loc3_);
- }
- else
- {
- _loc3_.correct = undefined;
- _loc3_.attempted = undefined;
- _loc1_.c_objNavRef.markUnAttempted();
- _loc1_.c_objNavRef.c_objTestRef.removeQuesObject();
- }
- }
- function movclpNavClicked()
- {
- var _loc1_ = this;
- var _loc2_ = 0;
- while(_loc2_ < _loc1_.btnNo)
- {
- var box = _loc1_.fib["Box" + _loc2_];
- if(box.inputTxt.length == 0)
- {
- box.gotoAndStop("NORMAL");
- }
- else
- {
- box.gotoAndStop("TYPED");
- var _loc3_ = _loc1_.c_objNavRef.c_objTestRef.c_iPartNo;
- var charCase = _loc1_.c_objNavRef.c_objTestRef.c_objScreenData.DOC.section[_loc3_].question[_loc2_].attributes.charToUpper;
- if(charCase != "true")
- {
- var strText = box.btnLable.text;
- box.btnLable.text = String(strText).toLowerCase();
- }
- else
- {
- var strText = box.btnLable.text;
- box.btnLable.text = String(strText);
- }
- }
- box.mcOver.gotoAndStop("BLANK");
- if(_loc1_.c_strMode != "Review")
- {
- box.mc_Btn.enabled = true;
- }
- Key.removeListener(box.objkeyUP);
- delete box.objkeyUP;
- delete box;
- _loc2_ = _loc2_ + 1;
- }
- var box = _loc1_.fib["Box" + _loc1_.fileNo];
- if(box.inputTxt.length == 0)
- {
- box.gotoAndStop("NAVCLICKEDNA");
- }
- else
- {
- box.gotoAndStop("NAVCLICKEDA");
- }
- _loc2_ = 0;
- while(_loc2_ < _loc1_.c_arrQuesNos.length)
- {
- _loc1_.objRef.btn_next._visible = true;
- if(_loc1_.objRef.fib["Box" + _loc2_].inputTxt.length < 1)
- {
- _loc1_.objRef.btn_next._visible = false;
- break;
- }
- _loc2_ = _loc2_ + 1;
- }
- if(_loc1_.c_strMode == "Review")
- {
- _loc1_.objRef.btn_next._visible = true;
- _loc1_.c_btnShowPrevious = _loc1_.c_btnShowCurrent;
- _loc1_.c_btnShowCurrent = box.mc_showbtn;
- _loc1_.showCurrectAnswer(box.strCorrectAnswer,box.ID,false);
- }
- }
- function getWidth()
- {
- return this.fib._width;
- }
- function getHeight()
- {
- return this.fib._height;
- }
- function setFibRefY(fib_ypos)
- {
- this.c_fibY = fib_ypos;
- }
- function getFibRefY()
- {
- return this.c_fibY;
- }
- function btnClicked()
- {
- var _loc1_ = this;
- var _loc3_ = 0;
- while(_loc3_ < _loc1_.btnNo)
- {
- var _loc2_ = _loc1_.fib["Box" + _loc3_];
- if(_loc2_.answered != "yes")
- {
- _loc2_.gotoAndStop("NORMAL");
- }
- else
- {
- _loc2_.gotoAndStop("TYPED");
- }
- if(_loc1_.c_strType == "Button")
- {
- if(_loc1_.c_strMode == "Continue" || _loc1_.c_strMode == "Review")
- {
- var strAnswered = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + (_loc3_ + 1)).attempted;
- if(strAnswered != null or strAnswered != undefined)
- {
- _loc2_.gotoAndStop("TYPED");
- _loc2_.btnLable.text = _loc1_.c_objNavRef.c_objTestRef.c_objScreenData.DOC.section[_loc1_.c_objNavRef.c_objTestRef.c_iPartNo].question[_loc3_].choice[strAnswered - 1].data;
- }
- }
- }
- _loc2_.mcOver.gotoAndStop("BLANK");
- _loc2_.enabled = true;
- _loc3_ = _loc3_ + 1;
- }
- _loc1_.fib["Box" + _loc1_.fileNo].gotoAndStop("CLICKED");
- _loc1_.fib["Box" + _loc1_.fileNo].enabled = false;
- }
- function navBtnClicked(_iCurrQuestion)
- {
- var _loc1_ = this;
- var _loc2_ = _iCurrQuestion;
- if(_loc1_.c_strType == "Button")
- {
- _loc1_.fileNo = _loc2_;
- _loc1_.btnClicked();
- }
- else if(_loc1_.c_strType == "MovieClip")
- {
- _loc1_.fileNo = _loc2_;
- _loc1_.movclpNavClicked();
- }
- _loc1_.setScrollBarPosition(_loc2_);
- }
- function setScrollBarPosition(_iCurrQuestion)
- {
- var _loc2_ = this.fib["Box" + _iCurrQuestion];
- var boxTargetX = _loc2_._x;
- var _loc1_ = _loc2_._y;
- if(_iCurrQuestion == 0)
- {
- _loc1_ = 0;
- }
- else
- {
- _loc1_ -= 100;
- }
- this.objRef.mc_ScrollPane.setScrollPosition(0,_loc1_);
- }
- function updateText(str)
- {
- var _loc1_ = this;
- _loc1_.fib["Box" + _loc1_.fileNo].btnLable.text = str;
- _loc1_.fib["Box" + _loc1_.fileNo].answered = "yes";
- }
- function getNumberOfBox()
- {
- var _loc3_ = this;
- var arrNumberFIB = new Array();
- var _loc1_ = 0;
- while(_loc1_ < _loc3_.btnNo)
- {
- var _loc2_ = _loc3_.fib["Box" + _loc1_];
- arrNumberFIB.push(_loc2_);
- _loc1_ = _loc1_ + 1;
- }
- return arrNumberFIB;
- }
- function freeze(_blnFreeze)
- {
- }
- }
-