home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FCE Gold Plus
/
GOLD.iso
/
pc
/
shell.swf
/
scripts
/
__Packages
/
com
/
screen
/
FIB3.as
< prev
next >
Wrap
Text File
|
2007-10-16
|
28KB
|
819 lines
class com.screen.FIB3
{
var iLineSp = 22;
var iLevel = 1;
var btnNo = 0;
function FIB3()
{
this.c_hintArray = new Array();
}
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;
var _loc2_ = 0;
while(_loc2_ < _loc3_.btnNo)
{
var _loc1_ = _loc3_.objRef.fib["Box" + _loc2_];
Key.removeListener(_loc1_.objkeyUP);
delete _loc1_.objkeyUP;
false;
_loc2_ = _loc2_ + 1;
}
}
function startProcess()
{
var _loc1_ = this;
_loc1_.objRef.mc_feedbackBox._visible = false;
var _loc3_ = _loc1_.objRef.mc_scrollRefrence._x;
var _loc2_ = _loc1_.objRef.mc_scrollRefrence._width;
var iScrollSizeH = _loc1_.objRef.mc_scrollRefrence._height;
_loc1_.objRef.mc_ScrollPane._x = _loc3_;
_loc1_.objRef.mc_ScrollPane.setSize(_loc2_,iScrollSizeH);
_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;
var iTitleWidth = _loc2_.objRef.mc_ScrollPane._width;
_loc2_.fib.createTextField("title",500,0,0,_loc2_.iWidth,25);
var _loc1_ = _loc2_.fib.title;
_loc1_._y = 10;
_loc1_._x = 35;
var _loc3_ = new TextFormat();
_loc3_.font = "Verdana";
_loc3_.size = 11;
_loc3_.color = "0x000000";
if(_loc2_.c_strEnvironment == "Linux")
{
_loc1_.embedFonts = true;
}
_loc1_.autoSize = true;
_loc1_.html = true;
_loc1_.htmlText = _loc2_.strTitle.data;
_loc1_.selectable = false;
var strAlignment = _loc2_.getAlignment();
if(strAlignment == "center")
{
_loc1_._x = (_loc2_.iWidth - _loc1_.textWidth) / 2;
}
else if(strAlignment == "right")
{
_loc1_._x = _loc2_.iWidth - _loc1_.textWidth;
}
else if(strAlignment == "left")
{
_loc1_._x = _loc2_.iWidth - (_loc2_.iWidth - 8);
}
_loc1_._y += 10;
_loc1_.setTextFormat(_loc3_);
false;
}
function getAlignment()
{
var _loc1_ = this.strTitle.attributes.textAlign;
return _loc1_;
}
function displayText()
{
var _loc1_ = this;
_loc1_.c_arrQuesNos = new Array();
var arrData = _loc1_.arrangetext();
_loc1_.fib.createTextField("dummyHintText",700,456,0,70,45);
var dummyHint = _loc1_.fib.dummyHintText;
var iMC_Width = 0;
var iMC_X = 6;
var iMC_Y = 12;
_loc1_.c_iNum = 0;
var objTF = new TextFormat();
objTF.font = "Verdana";
objTF.size = 11;
objTF.color = "0x000000";
if(_loc1_.c_strEnvironment == "Linux")
{
dummyHint.embedFonts = true;
}
dummyHint.html = true;
dummyHint.htmlText = _loc1_.exampleText;
dummyHint.selectable = false;
dummyHint.setTextFormat(objTF);
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);
var hintTxt = _loc1_.fib.attachMovie("mcText","hintText" + _loc1_.btnNo,i + 1200);
_loc1_.c_arrQuesNos.push(arrData[i]);
_loc2_._x = iMC_X;
_loc2_._y = iMC_Y;
hintTxt._x = 456;
hintTxt._y = 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;
var iBoxHeight = _loc2_._height;
}
else
{
var iBoxWith = _loc2_._width;
}
iMC_X += iBoxWith;
iMC_Width += iBoxWith;
if(iMC_X > _loc1_.iWidth)
{
iMC_X = iBoxWith + 6;
iMC_Width = iBoxWith;
iMC_Y += _loc1_.iLineSp;
_loc2_._x = 6;
_loc2_._y = iMC_Y;
hintTxt._y = _loc2_._y;
}
if(_loc1_.c_strType == "Button")
{
_loc1_.setButtonEvents(_loc2_);
}
else if(_loc1_.c_strType == "MovieClip")
{
_loc2_.btnLable.text = _loc1_.c_iExtID;
hintTxt.txt.text = _loc1_.c_hintArray[_loc1_.c_iNum].toUpperCase();
_loc2_.strCorrectAnswer = arrData[i];
_loc2_.ID = _loc1_.c_iExtID;
_loc2_.inputTxt = "";
_loc1_.c_iExtID = _loc1_.c_iExtID + 1;
_loc1_.c_iNum = _loc1_.c_iNum + 1;
_loc1_.setMovieClipEvent(_loc2_);
_loc1_.displayPreMode(_loc2_);
}
_loc1_.btnNo = _loc1_.btnNo + 1;
}
}
else if(i % 2 == 0)
{
if(i == 4)
{
dummyHint._y = iMC_Y;
_loc1_.tempHintY = iMC_Y;
}
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)
{
iMC_X = 6;
iMC_Width = 0;
iMC_Y += _loc1_.iLineSp;
}
}
i++;
}
_loc1_.objRef.mc_ScrollPane.refreshPane();
_loc1_.objRef.mc_ScrollPane.setSize(_loc1_.objRef.mc_scrollRefrence._width - 2,_loc1_.objRef.mc_scrollRefrence._height);
_loc1_.objRef.mc_ScrollPane._x = _loc1_.objRef.mc_scrollRefrence._x;
_loc1_.objRef.mc_ScrollPane._y = _loc1_.objRef.mc_scrollRefrence._y;
delete objTF;
}
function addHint()
{
}
function updateTextField(in_j, arrTmp, strTmp, strNewLine, tField, arrData, in_iIndex)
{
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")
{
var temp = false;
_loc1_.objRef.btn_next._visible = true;
var strAnswered = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + _loc2_.ID).attempted;
trace(">> tTTTTTTTTTTTTTTT - strAnswered - strAnswered : " + strAnswered);
if(strAnswered != null or strAnswered != undefined)
{
_loc2_.inputTxt = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + _loc2_.ID).attempted;
}
else
{
_loc2_.inputTxt = "";
}
var _loc3_ = _loc2_.attachMovie("mc_TickCross","mc_TickCross",10);
if(!temp)
{
_loc3_._x = 474;
_loc3_._y = _loc1_.tempHintY - 58;
_loc3_.gotoAndStop("CORRECT");
}
if(_loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + _loc2_.ID).correct == "1")
{
_loc3_.gotoAndStop("CORRECT");
}
else
{
_loc3_.gotoAndStop("INCORRECT");
var mcShowBtn = _loc2_.attachMovie("mc_showbtn","mc_showbtn",11);
mcShowBtn.gotoAndStop("NORMAL");
mcShowBtn._x = 545 - _loc2_._x;
}
_loc3_._x = 520 - _loc2_._x;
_loc1_.setShowButtonEvent(mcShowBtn);
}
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 setShowButtonEvent(mcShowBtn)
{
var _loc1_ = this;
mcShowBtn.objRef = _loc1_;
mcShowBtn.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_btnShowCurrent = _loc1_;
_loc1_.objRef.showCurrectAnswer(_loc1_._parent.strCorrectAnswer,_loc1_._parent.ID,true);
_loc1_.gotoAndStop("CLICKED");
};
}
function setButtonEvents(box)
{
var _loc1_ = this;
var _loc2_ = box;
_loc2_.objRef = _loc1_;
_loc2_.btnLable.text = _loc1_.strText;
_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 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;
trace("^^^^^^^^^^^^^^^^^^^^^^^^^^ - box.mc_Btn - box.mc_Btn - box.mc_Btn RELEASEEEEEEE");
_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")
{
_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 showCurrectAnswer(_strAnswer, _Qno, _bln)
{
this.c_btnShowPrevious.gotoAndStop("NORMAL");
var _loc2_ = this.objRef.mc_feedbackBox;
if(_bln)
{
_loc2_._visible = true;
_loc2_.btn_close.enabled = true;
_loc2_.btn_close.objRef = this;
_loc2_.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 = "";
};
_loc2_.swapDepths(10000);
_loc2_.mc_resizableBox.useHandCursor = false;
if(this.c_strSkill == "use of english")
{
_level101.txt_Tracer.text = "";
_level101.txt_Tracer.text += "\n >>>>>>>> use of englisg TRUE";
_loc2_.mc_resizableBox.onPress = function()
{
this._parent.startDrag(false,-55,-4,324,234);
_level101.txt_Tracer.text = "";
_level101.txt_Tracer.text += "\n **** Use of Eng TTTT ///";
};
}
else
{
_loc2_.mc_resizableBox.onPress = function()
{
_level101.txt_Tracer.text = "";
this._parent.startDrag(false,-55,-78,324,178);
_level101.txt_Tracer.text += "\n **** use of english - FALSE";
};
}
_loc2_.mc_resizableBox.onRelease = function()
{
stopDrag();
};
_loc2_.mc_resizableBox.onReleaseOutside = function()
{
_level101.txt_Tracer.text = "";
_level101.txt_Tracer.text += "\n ##### RRRRR #### Release Outside CALL ### FIB3";
stopDrag();
};
var objRB = new com.comp.ResizableBox();
objRB.resizeBox(370,80,_loc2_.mc_resizableBox);
var revTxt = this.objRef.mc_resizableBox;
_loc2_.txt_header.html = true;
_loc2_.txt_header.htmlText = "<b> Correct Answer(s) for Question No. </b><b>" + _Qno + "</b>";
_loc2_.txt_header.autoSize = "left";
var _loc3_ = _strAnswer.split("<gap>");
var _fillOptionArr = new Array();
var _loc1_ = 0;
while(_loc1_ < _loc3_.length)
{
_fillOptionArr.push(_loc3_[_loc1_ + 1].split("</gap>")[0]);
_loc1_ = _loc1_ + 1;
}
_loc2_.txt_options.html = true;
_loc2_.txt_options.htmlText = _strAnswer.split("|").join(", ");
_loc2_.txt_options.autoSize = "left";
var tfOptionFormatter = new TextFormat();
tfOptionFormatter.bold = true;
_loc2_.txt_options.setTextFormat(tfOptionFormatter);
delete tfOptionFormatter;
}
else
{
_loc2_._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)
{
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 btnClicked()
{
var _loc3_ = this;
var _loc2_ = 0;
while(_loc2_ < _loc3_.btnNo)
{
var _loc1_ = _loc3_.fib["Box" + _loc2_];
if(_loc1_.answered != "yes")
{
_loc1_.gotoAndStop("NORMAL");
}
else
{
_loc1_.gotoAndStop("TYPED");
}
_loc1_.mcOver.gotoAndStop("BLANK");
_loc1_.enabled = true;
_loc2_ = _loc2_ + 1;
}
_loc3_.fib["Box" + _loc3_.fileNo].gotoAndStop("CLICKED");
_loc3_.fib["Box" + _loc3_.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 freeze(_blnFreeze)
{
}
}