home *** CD-ROM | disk | FTP | other *** search
- class com.screen.Instruction
- {
- var enabled;
- var objRef;
- var c_objSourceRef;
- function Instruction()
- {
- }
- function init(_objScreenData, _objSourceRef)
- {
- var _loc1_ = this;
- _level101.attachMovie("mc_Instruct","mc_Instruction",650,{_x:172,_y:111});
- _loc1_.c_objSourceClipRef = _level101.mc_Instruction.mc_text;
- _loc1_.c_objScreenData = _objScreenData;
- _loc1_.c_objSourceRef = _objSourceRef;
- com.controller.UICoordinator.getInstance().instructionXML = _objScreenData;
- _loc1_.loadScreen();
- }
- function loadScreen()
- {
- var _loc1_ = 778;
- _level101.gotoAndStop("INSTRUCTION");
- _level101.txt_ApplicationHeader1.autoSize = true;
- _level101.txt_ApplicationHeader1.html = true;
- _level101.txt_ApplicationHeader1.htmlText = com.controller.UICoordinator.getInstance().getTitle();
- _level101.txt_ApplicationHeader1._x = (_loc1_ - _level101.txt_ApplicationHeader1.textWidth) / 2;
- if(com.controller.UICoordinator.getInstance().skillName == "reading")
- {
- _level101.txt_Heading.text = "TEST " + com.controller.UICoordinator.getInstance().c_iCurrentTestNumber + ": READING";
- }
- else if(com.controller.UICoordinator.getInstance().skillName == "writing")
- {
- _level101.txt_Heading.text = "TEST " + com.controller.UICoordinator.getInstance().c_iCurrentTestNumber + ": WRITING";
- }
- else if(com.controller.UICoordinator.getInstance().skillName == "listening")
- {
- _level101.txt_Heading.text = "TEST " + com.controller.UICoordinator.getInstance().c_iCurrentTestNumber + ": LISTENING";
- }
- else if(com.controller.UICoordinator.getInstance().skillName == "useofenglish")
- {
- _level101.txt_Heading.text = "TEST " + com.controller.UICoordinator.getInstance().c_iCurrentTestNumber + ": USE OF ENGLISH";
- }
- this.arrange(this);
- }
- function arrange(_objRef)
- {
- var _loc1_ = _objRef;
- var _loc3_ = this;
- var objLogin = _loc1_.c_objScreenData.login;
- var _loc2_ = com.controller.UICoordinator.getInstance().skillName;
- if(_loc2_ == "reading")
- {
- _loc3_.c_objSourceClipRef.txt_inst.htmlText = _loc1_.c_objScreenData.instructions.instructionsreading.data;
- }
- else if(_loc2_ == "writing")
- {
- _loc3_.c_objSourceClipRef.txt_inst.htmlText = _loc1_.c_objScreenData.instructions.instructionswriting.data;
- }
- else if(_loc2_ == "listening")
- {
- _loc3_.c_objSourceClipRef.txt_inst.htmlText = _loc1_.c_objScreenData.instructions.instructionslistening.data;
- }
- else if(_loc2_ == "useofenglish")
- {
- _loc3_.c_objSourceClipRef.txt_inst.htmlText = _loc1_.c_objScreenData.instructions.instructionsuseofenglish.data;
- }
- _level101.mc_Instruction.txt_instguide.htmlText = _loc1_.c_objScreenData.instructions.instructionsguide.data;
- _loc3_.setEvents();
- }
- function setEvents()
- {
- var _loc1_ = this;
- _level101.mc_Instruction.btn_startTest.objRef = _loc1_;
- _level101.mc_Instruction.btn_startTest.onRelease = function()
- {
- this.enabled = false;
- _level101.soundBtn._visible = true;
- _level101.volumeBox._visible = true;
- _level101.soundLevel._visible = true;
- var _loc1_ = _level101.c_objSourceClipRef.mc_text.text.text;
- this.objRef.notifySource(_loc1_);
- _level101.mc_Instruction.removeMovieClip();
- };
- }
- function notifySource(_strLoginData)
- {
- var _loc1_ = com.controller.UICoordinator.getInstance().currentMode;
- if(_loc1_ == "Continue" || _loc1_ == "Review")
- {
- this.c_objSourceRef.onProcessComplete("ReviewResult","");
- }
- else
- {
- this.c_objSourceRef.onProcessComplete("LOADTEST",_strLoginData);
- }
- }
- }
-