home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FCE Gold Plus
/
GOLD.iso
/
pc
/
shell.swf
/
scripts
/
__Packages
/
com
/
screen
/
PairedDropDown.as
< prev
next >
Wrap
Text File
|
2007-10-16
|
27KB
|
767 lines
class com.screen.PairedDropDown extends com.screen.FIB2
{
var iLevel = 1;
var btnNo = 0;
function PairedDropDown()
{
super();
}
function init(_objRef, _objSection, _title, _text, _wth, x, y, _mcName, _type, _group, _navRef)
{
var _loc1_ = this;
_loc1_.objRef = _objRef;
_loc1_.c_objSection = _objSection;
_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_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 startProcess()
{
var _loc1_ = this;
var _loc2_ = _loc1_.c_objSection.question;
_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(_loc2_);
_loc1_.fillComboData(_loc1_.fib,_loc2_);
_loc1_.setComboValues(_loc2_);
_loc1_.displaySelectionClip();
_loc1_.displayShowCorrectButtons();
_loc1_.showHideSCButtons(false);
}
function displayTitle(iScrollSizeWidth)
{
var _loc2_ = this;
_loc2_.objRef.mc_textOnlyScrollBar._x = _loc2_.objRef.mc_EmptyTxtOnly._x;
_loc2_.objRef.mc_textOnlyScrollBar._y = _loc2_.objRef.mc_EmptyTxtOnly._y;
_loc2_.objRef.mc_textOnlyScrollBar.setSize(_loc2_.objRef.mc_EmptyTxtOnly._width - 1,_loc2_.objRef.mc_EmptyTxtOnly._height - 1);
_loc2_.objRef.mc_textOnlyScrollBar.setScrollContent("SP_Content");
var fibTextOnly = _loc2_.objRef.mc_textOnlyScrollBar.getScrollContent();
fibTextOnly.createTextField("title",10000,10,0,_loc2_.iWidth,25);
var _loc1_ = fibTextOnly.title;
var _loc3_ = new TextFormat();
_loc1_.autoSize = true;
_loc1_.html = true;
_loc1_.htmlText = _loc2_.strTitle;
_loc1_.multiline = true;
_loc1_.selectable = false;
_loc1_.wordWrap = true;
_loc3_.font = "Verdana";
_loc3_.size = 11;
_loc3_.color = "0x000000";
_loc3_.align = "Left";
_loc3_.multiline = true;
_loc3_.wordWrap = true;
if(_loc2_.c_strEnvironment == "Linux")
{
_loc1_.embedFonts = true;
}
_loc1_.autoSize = true;
_loc1_.html = true;
_loc1_.htmlText = _loc2_.strTitle;
_loc1_.selectable = false;
_loc1_.setTextFormat(_loc3_);
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;
}
_loc1_._y += 10;
_loc1_._visible = false;
_loc2_.c_objTitle = _loc1_;
_loc2_.objRef.mc_textOnlyScrollBar.refreshPane();
false;
delete strAlignment;
}
function getAlignment()
{
var _loc1_ = this.c_objSection.textTitle.attributes.textAlign;
return _loc1_;
}
function displayText(arrQuestions)
{
var _loc1_ = this;
clearInterval(_loc1_.c_objInterval);
_loc1_.c_objTitle._visible = true;
_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 = 12;
}
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)
{
var strText = arrData[i];
if(i % 2 == 1)
{
if(strText != "")
{
var _loc3_ = _loc1_.createDropBox(strText,i,iMC_X,iMC_Y);
_loc3_.strCorrectAnswer = _loc1_.getCorrectAnswer(_loc1_.btnNo);
_loc3_.answered = "no";
_loc3_.ID = _loc1_.getQueNo(_loc1_.btnNo);
if(_loc1_.c_strType == "Button" || _loc1_.c_strType == "MovieClip")
{
var iBoxWith = _loc3_._width - 12;
}
else
{
var iBoxWith = _loc3_._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")
{
_loc3_._x = 20;
}
else
{
_loc3_._x = 10;
}
_loc3_._y = iMC_Y;
}
_loc1_.displayPreMode(_loc3_);
_loc1_.addEventToDropDown(_loc3_,_loc1_.objRef);
_loc1_.btnNo = _loc1_.btnNo + 1;
}
}
else if(i % 2 == 0)
{
var arrTmp = strText.split(" ");
var tmpWidth = iMC_Width;
var strNewLine = false;
_loc1_.fib.createTextField("text" + i,i,iMC_X,iMC_Y,10,20);
var _loc2_ = _loc1_.fib["text" + i];
_loc2_.text = "";
var objOutput = _loc1_.populateText(arrTmp,_loc2_,objTF,iMC_Width,tmpWidth,strNewLine);
strNewLine = objOutput.strNewLine;
var j = objOutput.j;
iMC_Width = objOutput.iMC_Width;
_loc2_.text = _loc2_.text.substr(0,_loc2_.text.length - 1);
_loc2_.autoSize = true;
var strTmp = "";
arrData = _loc1_.updateTextField(j,arrTmp,strTmp,strNewLine,_loc2_,arrData,i);
if(_loc1_.c_strEnvironment == "Linux")
{
_loc2_.embedFonts = true;
}
delete j;
_loc2_._width = 10;
_loc2_.html = true;
_loc2_.htmlText = _loc2_.text;
_loc2_.autoSize = true;
_loc2_.setTextFormat(objTF);
iMC_X += _loc2_._width;
if(iMC_Width > _loc1_.iWidth || 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);
_loc1_.objRef.mc_ScrollPane._x = _loc1_.objRef.mc_scrollRefrence._x;
_loc1_.objRef.mc_ScrollPane._y = _loc1_.objRef.mc_scrollRefrence._y + 1;
_loc1_.c_iDepth = arrData.length;
delete objTF;
}
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;
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 createDropBox(in_strText, in_nIndex, in_iMC_X, in_iMC_Y)
{
var _loc2_ = this;
var _loc1_ = _loc2_.fib.attachMovie(_loc2_.c_strAthMC,"Box" + _loc2_.btnNo,in_nIndex);
_loc2_.c_arrQuesNos.push(in_strText);
var questObj = _loc2_.c_objSection.question[_loc2_.btnNo];
var _loc3_ = questObj.attributes.paired;
var questID = questObj.attributes.number;
if(_loc3_ != undefined || _loc3_ != null)
{
if(_loc3_ < questID)
{
_loc1_._x = _loc2_.fib["Box" + (_loc2_.btnNo - 1)]._x;
}
else
{
_loc1_._x = in_iMC_X;
}
}
else
{
_loc1_._x = in_iMC_X;
}
_loc1_._y = in_iMC_Y;
_loc1_.setSize(45,22);
return _loc1_;
}
function displayPreMode(in_objBox)
{
var _loc1_ = this;
if(_loc1_.c_strMode == "Review")
{
var iQuesNum = _loc1_.getQueNo(_loc1_.btnNo);
var objHMQues = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + iQuesNum);
var strCorrect = objHMQues.correct;
var _loc2_ = in_objBox.attachMovie("mc_TickCrossL","mc_TickCross",100);
_loc2_.gotoAndStop("BLANK");
if(strCorrect == "1")
{
_loc2_.gotoAndStop("CORRECT");
}
else
{
_loc2_.gotoAndStop("INCORRECT");
}
_loc2_._x = 495 - in_objBox._x;
}
else if(_loc1_.c_strMode == "Continue")
{
var iQuesNum = _loc1_.getQueNo(_loc1_.btnNo);
var objHMQues = _loc1_.c_objHMObj["get"](_loc1_.c_strSkill + "_" + iQuesNum);
var _loc3_ = objHMQues.attempted;
if(_loc3_ != null || _loc3_ != undefined)
{
in_objBox.answered = "yes";
in_objBox.setSelectedIndex(_loc3_);
}
else
{
in_objBox.answered = "no";
in_objBox.setSelectedIndex(_loc3_);
}
}
}
function fillComboData(objScrollContent, arrQuestions)
{
var iQueLen = arrQuestions.length;
var _loc2_ = 0;
while(_loc2_ < iQueLen)
{
var arrComboData = new Array();
var queTextChoicesLen = arrQuestions[_loc2_].choices.choice.length;
var _loc1_ = 0;
while(_loc1_ < queTextChoicesLen)
{
var queData = arrQuestions[_loc2_].choices.choice[_loc1_].data;
var _loc3_ = arrQuestions[_loc2_].choices.choice[_loc1_].attributes.id;
arrComboData.push({label:queData,data:_loc3_});
_loc1_ = _loc1_ + 1;
}
objScrollContent["Box" + _loc2_].setDataProvider(arrComboData);
_loc2_ = _loc2_ + 1;
}
}
function setComboValues(arrQuestions)
{
var _loc2_ = this;
var _loc1_ = 0;
while(_loc1_ < arrQuestions.length)
{
var strQuestionID = arrQuestions[_loc1_].attributes.number;
var _loc3_ = _loc2_.c_objHMObj["get"](String(_loc2_.c_strSkill + "_" + strQuestionID));
if(_loc3_.attempted != null || _loc3_.attempted != undefined)
{
_loc2_.fib["Box" + _loc1_].setSelectedIndex(_loc3_.attempted);
_loc2_.fib["Box" + _loc1_].answered = "yes";
}
else
{
_loc2_.fib["Box" + _loc1_].setSelectedIndex(null);
_loc2_.fib["Box" + _loc1_].answered = "no";
}
_loc1_ = _loc1_ + 1;
}
}
function displaySelectionClip()
{
var iTotalQuestions = this.c_arrQuesNos.length;
var mcSelectionClipHolder = this.fib.createEmptyMovieClip("mcSelectionClipHolder",this.c_iDepth + 1);
var _loc1_ = 1;
while(_loc1_ <= iTotalQuestions)
{
var _loc2_ = mcSelectionClipHolder.attachMovie("mcComboSelection","mcSelectionRect_" + _loc1_,_loc1_);
var _loc3_ = this.fib["Box" + (_loc1_ - 1)];
_loc2_._x = _loc3_._x - 1;
_loc2_._y = _loc3_._y - 1;
_loc1_ = _loc1_ + 1;
}
this.deselectAllCombo();
}
function displayShowCorrectButtons()
{
var _loc1_ = this;
var objRef = _loc1_;
var iTotalQuestions = _loc1_.c_arrQuesNos.length;
var iScrollPaneWidth = _loc1_.objRef.mc_ScrollPane._width;
var mcSCHolder = _loc1_.fib.createEmptyMovieClip("mcSCHolder",_loc1_.c_iDepth + 2);
trace(_loc1_.fib.mcSCHolder);
var _loc3_ = 1;
while(_loc3_ <= iTotalQuestions)
{
var _loc2_ = mcSCHolder.attachMovie("mc_showbtn","mc_ShowButton_" + _loc3_,_loc3_);
_loc2_.gotoAndStop("NORMAL");
var mcBox = _loc1_.fib["Box" + (_loc3_ - 1)];
_loc2_._x = iScrollPaneWidth - _loc2_._width - 40;
_loc2_._y = mcBox._y + 1;
_loc2_.objRef = _loc1_;
_loc2_.onRelease = function()
{
var _loc1_ = this;
_loc1_.gotoAndStop("CLICKED");
_loc1_.enabled = false;
var _loc2_ = Number(_loc1_._name.split("_")[2]);
_loc1_.objRef.c_btnShowPrevious = _loc1_.objRef.c_btnShowCurrent;
_loc1_.objRef.c_btnShowCurrent = _loc1_;
_loc1_.objRef.showCurrectAnswer(_loc2_ - 1,true);
_loc1_.objRef.showNavigationSelection(_loc2_ - 1);
trace("*********************************** Pair - iID : " + _loc2_);
_loc1_.objRef.showComboSelection(_loc2_);
};
_loc3_ = _loc3_ + 1;
}
}
function showHideSCButtons(bVisible)
{
var _loc3_ = this.c_arrQuesNos.length;
var _loc1_ = 1;
while(_loc1_ <= _loc3_)
{
var _loc2_ = this.fib.mcSCHolder["mc_ShowButton_" + _loc1_];
_loc2_._visible = bVisible;
_loc1_ = _loc1_ + 1;
}
}
function navBtnClicked(_iCurrQuestion)
{
var _loc1_ = this;
var _loc3_ = _iCurrQuestion;
trace(">CCCCCCCCCCCCCCCCCCCCCCCCCCEEEEEEEEEEEEEEE - _iCurrQuestion : " + _loc3_);
var _loc2_ = _loc1_.c_strMode == "Review";
_loc1_.fileNo = _loc3_;
_loc1_.objRef.mc_feedbackBox._visible = false;
_loc1_.c_btnShowCurrent.gotoAndStop("NORMAL");
_loc1_.showNextButton();
_loc1_.showComboSelection(_loc3_ + 1);
_loc1_.freeze(_loc2_);
_loc1_.showSCButtons(_loc2_);
_loc1_.setScrollBarPosition(_loc3_);
}
function showSCButtons(bIfReview)
{
var _loc2_ = this;
if(bIfReview)
{
_loc2_.showHideSCButtons(true);
var iTotalQuestions = _loc2_.c_arrQuesNos.length;
var _loc1_ = 1;
while(_loc1_ <= iTotalQuestions)
{
var iQuesNum = _loc2_.getQueNo(_loc1_ - 1);
var _loc3_ = _loc2_.c_objHMObj["get"](_loc2_.c_strSkill + "_" + iQuesNum);
var strCorrect = _loc3_.correct;
if(strCorrect == "1")
{
var mcShowButton = _loc2_.fib.mcSCHolder["mc_ShowButton_" + _loc1_];
mcShowButton._visible = false;
}
_loc1_ = _loc1_ + 1;
}
}
}
function arrangetext()
{
this.strText = this.strText.split("<p></p>").join(" <p></p> ");
var _loc3_ = this.strText.split("<gap type=\'dropdown\'>");
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 addEventToDropDown(box, objRef)
{
var _loc3_ = this;
box.objBoxCombo = new Object();
box.objBoxCombo.objRef = _loc3_;
box.onSetFocus = function()
{
box.pCustomFocus = true;
var _loc1_ = Number(box._name.split("Box")[1]);
box.objBoxCombo.objRef.showComboSelection(_loc1_ + 1);
box.objBoxCombo.objRef.showNavigationSelection(_loc1_);
};
box.objBoxCombo.change = function(evt)
{
var _loc1_ = box.getSelectedIndex();
this.objRef.onComboChanged(box,this.objRef,_loc1_);
box.pCustomFocus = false;
};
box.setChangeHandler("change",box.objBoxCombo);
}
function freeze(_blnFreeze)
{
var _loc2_ = this;
var _loc3_ = _blnFreeze;
var _loc1_ = 0;
while(_loc1_ < _loc2_.c_arrQuesNos.length)
{
_loc2_.fib["Box" + _loc1_].enabled = !_loc3_;
_loc1_ = _loc1_ + 1;
}
}
function showComboSelection(iBoxNumber)
{
this.deselectAllCombo();
this.fib.mcSelectionClipHolder["mcSelectionRect_" + iBoxNumber].gotoAndStop("_SELECT");
}
function deselectAllCombo()
{
var _loc3_ = this;
var _loc2_ = _loc3_.c_arrQuesNos.length;
var _loc1_ = 1;
while(_loc1_ <= _loc2_)
{
_loc3_.fib.mcSelectionClipHolder["mcSelectionRect_" + _loc1_].gotoAndStop("_DESELECT");
_loc1_ = _loc1_ + 1;
}
}
function showNavigationSelection(iBoxNumber)
{
var _loc1_ = this;
_loc1_.fileNo = iBoxNumber;
_loc1_.c_objNavRef.c_iSeleID = _loc1_.c_arrQuesNos[iBoxNumber];
_loc1_.c_objNavRef.c_preSelecetd = _loc1_.c_objNavRef.c_strSelecetd;
_loc1_.c_objNavRef.c_strSelecetd = "_" + _loc1_.c_iGroup + "_" + _loc1_.fileNo;
_loc1_.c_objNavRef.navClickedfunction();
}
function onComboChanged(box, objRef, iSelectedIndex)
{
var _loc1_ = this;
if(box.pCustomFocus)
{
trace(">%%%%%%%%%%%%%%%%%%%%%%% CCFFFFFFFFf");
var objHMCurrentQues = new Object();
var iBoxID = Number(box._name.split("Box")[1]);
var arrCorrectAns = box.strCorrectAnswer.split("|");
var strPaired = _loc1_.c_objSection.question[iBoxID].attributes.paired;
var bCurrentCorrect = _loc1_.isCorrect(arrCorrectAns,iSelectedIndex + 1);
var bIsPairMatching = true;
if(strPaired != undefined && strPaired != null)
{
var _loc3_ = new Object();
var iPairedBoxID = _loc1_.getComboNo(Number(strPaired));
var _loc2_ = _loc1_.fib["Box" + iPairedBoxID].getSelectedIndex();
trace(">>^^^^^^^^^^^^^^ - iPairSelected : " + _loc2_);
if(_loc2_ != undefined && _loc2_ != null)
{
var bPairedCorrect = _loc1_.isCorrect(arrCorrectAns,_loc2_ + 1);
bIsPairMatching = _loc1_.isAnsMatching(_loc2_,iSelectedIndex);
trace("PPPPPPRRRRRRRRRR############### - bIsPairMatching : " + bIsPairMatching);
}
if(bPairedCorrect && !bIsPairMatching)
{
_loc3_.correct = 1;
}
else
{
_loc3_.correct = 0;
}
_loc3_.attempted = _loc2_;
_loc1_.c_objNavRef.c_objTestRef.c_strCurrSelected = iPairedBoxID;
_loc1_.c_objNavRef.c_objTestRef.c_iCurrQuestion = _loc1_.c_objSection.question[iPairedBoxID].attributes.number;
_loc1_.c_objNavRef.c_objTestRef.appendQuesObject(_loc3_);
}
objHMCurrentQues.correct = !bCurrentCorrect ? 0 : 1;
objHMCurrentQues.attempted = iSelectedIndex;
_loc1_.c_objNavRef.c_objTestRef.c_strCurrSelected = iBoxID;
_loc1_.c_objNavRef.c_objTestRef.c_iCurrQuestion = _loc1_.c_objSection.question[iBoxID].attributes.number;
box.answered = "yes";
_loc1_.c_objNavRef.markAttempted();
_loc1_.c_objNavRef.c_objTestRef.appendQuesObject(objHMCurrentQues);
_loc1_.showNextButton();
}
}
function isCorrect(arrCorrectAns, iCurrentSelected)
{
var _loc3_ = arrCorrectAns.length;
var _loc2_ = false;
var _loc1_ = 0;
while(_loc1_ < _loc3_)
{
if(iCurrentSelected == Number(arrCorrectAns[_loc1_]))
{
_loc2_ = true;
break;
}
_loc2_ = false;
_loc1_ = _loc1_ + 1;
}
return _loc2_;
}
function isAnsMatching(iCurrentSelected, iPairedSelected)
{
return iCurrentSelected == iPairedSelected;
}
function showCurrectAnswer(iComboID, _bln)
{
var strCorrectAnswer = this.getCorrectAnswer(iComboID);
var iQuesNo = this.getQueNo(iComboID);
trace("strCorrectAnswer :" + strCorrectAnswer);
this.c_btnShowPrevious.gotoAndStop("NORMAL");
this.c_btnShowPrevious.enabled = true;
this.c_btnShowCurrent.gotoAndStop("CLICKED");
this.c_btnShowCurrent.enabled = false;
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(100);
_loc2_.mc_resizableBox.useHandCursor = false;
_loc2_.mc_resizableBox.onPress = function()
{
this._parent.startDrag(false,-55,12,324,255);
};
_loc2_.mc_resizableBox.onRelease = _loc2_.mc_resizableBox.onReleaseOutside = function()
{
stopDrag();
};
var objRB = new com.comp.ResizableBox();
objRB.resizeBox(370,80,_loc2_.mc_resizableBox);
var revTxt = this.objRef.mc_resizableBox;
_loc2_.txt_header.text = "Correct Answer(s) for Question No. " + iQuesNo;
_loc2_.txt_header.autoSize = "left";
_loc2_.txt_options.text = "";
var _loc3_ = strCorrectAnswer.split("|");
var _loc1_ = 0;
while(_loc1_ < _loc3_.length)
{
_loc2_.txt_options.text += String.fromCharCode(64 + Number(_loc3_[_loc1_]));
if(!(_loc1_ % 2) && _loc3_.length > 1)
{
_loc2_.txt_options.text += " or ";
}
_loc1_ = _loc1_ + 1;
}
_loc2_.txt_options.autoSize = "left";
}
else
{
_loc2_._visible = false;
}
}
function showNextButton()
{
var _loc2_ = this;
if(_loc2_.c_objNavRef.c_objTestRef.c_objScreenData.DOC.section.length - 1 != _loc2_.c_objNavRef.c_objTestRef.c_iPartNo)
{
if(_loc2_.c_strMode == "Review")
{
_loc2_.objRef.btn_next._visible = true;
}
else
{
var _loc1_ = 0;
while(_loc1_ < _loc2_.c_arrQuesNos.length)
{
_loc2_.objRef.btn_next._visible = true;
if(_loc2_.fib["Box" + _loc1_].answered == "no")
{
_loc2_.objRef.btn_next._visible = false;
break;
}
_loc1_ = _loc1_ + 1;
}
}
}
}
function getCorrectAnswer(iComboNo)
{
var _loc2_ = this.c_objSection.question;
var queLength = _loc2_.length;
var _loc1_ = 0;
while(_loc1_ <= queLength)
{
if(_loc2_[_loc1_] == _loc2_[iComboNo])
{
var _loc3_ = _loc2_[_loc1_].attributes.correct;
return _loc3_;
}
_loc1_ = _loc1_ + 1;
}
}
function getQueNo(iComboNo)
{
var _loc2_ = this.c_objSection.question;
var _loc1_ = 0;
while(_loc1_ <= _loc2_.length)
{
if(_loc2_[_loc1_] == _loc2_[iComboNo])
{
var _loc3_ = _loc2_[_loc1_].attributes.number;
return _loc3_;
}
_loc1_ = _loc1_ + 1;
}
}
function getComboNo(iQueNo)
{
var _loc3_ = iQueNo;
var _loc2_ = this.c_objSection.question;
var _loc1_ = 0;
while(_loc1_ <= _loc2_.length)
{
if(_loc2_[_loc1_].attributes.number == _loc3_)
{
return _loc1_;
}
_loc1_ = _loc1_ + 1;
}
}
}