Advertisement
Guest User

Untitled

a guest
Jun 5th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package { import flash.display.*;   public dynamic class studentValidateItem extends movieclip {   } }//package package { import flash.text.*;   public dynamic class segoePrintBold14 extends font {   } }//package package { import flash.text.*; import flash.display.*;   public dynamic class tableCell extends movieclip {   public var txt:textfield;   } }//package package { import flash.events.*; import flash.display.*;   public class checkanswers extends movieclip {   private var _root:object; public var index:int;   public function checkanswers(){ addFrameScript(0, this.frame1); addEventListener(Event.ADDED, this.beginClass); } private function beginClass(_arg1:Event):void{ buttonMode = true; usehandcursor = true; this._root = movieclip(root); addEventListener(MouseEvent.CLICK, this.onClick); } private function onClick(_arg1:MouseEvent):void{ this._root.updateAnswerStatus((2 - currentFrame)); } public function die():void{ removeEventListener(MouseEvent.CLICK, this.onClick); } public function removeListeners():void{ removeEventListener(MouseEvent.CLICK, this.onClick); } public function addListeners():void{ addEventListener(MouseEvent.CLICK, this.onClick); } function frame1(){ stop(); }   } }//package package { import flash.text.*; import flash.display.*;   public dynamic class headerCellSmall extends movieclip {   public var txt:textfield;   } }//package package { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class worksheetStatusRow extends movieclip {   public var check1:movieclip; public var check2:movieclip; public var grouptxt:textfield; public var settingsLoader:URLLoader;   public function worksheetStatusRow(){ addFrameScript(0, this.frame1); } public function addListeners():void{ if (movieclip(root).userGCSELicence == 1){ this.check1.addEventListener(MouseEvent.CLICK, this.changeGCSEStatusForGroup); this.check1.alpha = 1; this.check1.buttonMode = true; this.check1.usehandcursor = true; } else { this.check1.removeEventListener(MouseEvent.CLICK, this.changeGCSEStatusForGroup); this.check1.alpha = 0.4; this.check1.buttonMode = false; this.check1.usehandcursor = false; }; if (movieclip(root).userKS3Licence == 1){ this.check2.addEventListener(MouseEvent.CLICK, this.changeKS3StatusForGroup); this.check2.alpha = 1; this.check2.buttonMode = true; this.check2.usehandcursor = true; } else { this.check2.removeEventListener(MouseEvent.CLICK, this.changeKS3StatusForGroup); this.check2.alpha = 0.4; this.check2.buttonMode = false; this.check2.usehandcursor = false; }; } public function removeListeners():void{ this.check1.removeEventListener(MouseEvent.CLICK, this.changeGCSEStatusForGroup); this.check1.alpha = 0.4; this.check1.buttonMode = false; this.check1.usehandcursor = false; this.check2.removeEventListener(MouseEvent.CLICK, this.changeKS3StatusForGroup); this.check2.alpha = 0.4; this.check2.buttonMode = false; this.check2.usehandcursor = false; } public function changeGCSEStatusForGroup(_arg1:MouseEvent):void{ movieclip(root).settingsMenu.removeAllListeners(); movieclip(root).settingsMenu.pleaseWait.play(); movieclip(root).settingsMenu.pleaseWait.visible = true; var _local2:URLRequest = new URLRequest("updateAnswerStatusForGroup.php"); _local2.method = URLRequestMethod.POST; var _local3:URLVariables = new URLVariables(); var _local4:int = (2 - this.check1.currentFrame); if (_local4 == 1){ _local4 = 0; } else { _local4 = 1; }; _local3.centreID = movieclip(root).centreID; _local3.GROUPNAME = this.grouptxt.text; _local3.VALUE = _local4; _local2.data = _local3; this.settingsLoader = new URLLoader(); this.settingsLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.settingsLoader.addEventListener(Event.COMPLETE, this.settingscompleteHandler); this.settingsLoader.load(_local2); this.check1.gotoandstop((2 - _local4)); } public function changeKS3StatusForGroup(_arg1:MouseEvent):void{ movieclip(root).settingsMenu.removeAllListeners(); movieclip(root).settingsMenu.pleaseWait.play(); movieclip(root).settingsMenu.pleaseWait.visible = true; var _local2:URLRequest = new URLRequest("updateKS3AnswerStatusForGroup.php"); _local2.method = URLRequestMethod.POST; var _local3:URLVariables = new URLVariables(); var _local4:int = (2 - this.check2.currentFrame); if (_local4 == 1){ _local4 = 0; } else { _local4 = 1; }; _local3.centreID = movieclip(root).centreID; _local3.GROUPNAME = this.grouptxt.text; _local3.VALUE = _local4; _local2.data = _local3; this.settingsLoader = new URLLoader(); this.settingsLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.settingsLoader.addEventListener(Event.COMPLETE, this.settingscompleteHandler); this.settingsLoader.load(_local2); this.check2.gotoandstop((2 - _local4)); } public function settingscompleteHandler(_arg1:Event):void{ this.settingsLoader.removeEventListener(Event.COMPLETE, this.settingscompleteHandler); movieclip(root).settingsMenu.pleaseWait.stop(); movieclip(root).settingsMenu.pleaseWait.visible = false; movieclip(root).settingsMenu.addAllListeners(); } function frame1(){ stop(); }   } }//package package { import flash.events.*; import flash.display.*;   public class checkanswersks3 extends movieclip {   private var _root:object; public var index:int;   public function checkanswersks3(){ addFrameScript(0, this.frame1, 1, this.frame2); addEventListener(Event.ADDED, this.beginClass); } private function beginClass(_arg1:Event):void{ buttonMode = true; usehandcursor = true; this._root = movieclip(root); addEventListener(MouseEvent.CLICK, this.onClick); } private function onClick(_arg1:MouseEvent):void{ this._root.updateAnswerStatusKS3((2 - currentFrame)); } public function die():void{ removeEventListener(MouseEvent.CLICK, this.onClick); } public function removeListeners():void{ removeEventListener(MouseEvent.CLICK, this.onClick); } public function addListeners():void{ addEventListener(MouseEvent.CLICK, this.onClick); } function frame1(){ stop(); } function frame2(){ stop(); }   } }//package package { import flash.text.*; import flash.display.*;   public dynamic class tableCellSmall extends movieclip {   public var txt:textfield;   } }//package package { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class ks3MenuStatusRow extends movieclip {   public var check1:movieclip; public var check2:movieclip; public var grouptxt:textfield; public var settingsLoader:URLLoader;   public function ks3MenuStatusRow(){ addFrameScript(0, this.frame1); } public function addListeners():void{ if (movieclip(root).userKS3Licence == 1){ this.check1.addEventListener(MouseEvent.CLICK, this.changeOldMenuStatusForGroup); this.check1.alpha = 1; this.check1.buttonMode = true; this.check1.usehandcursor = true; this.check2.addEventListener(MouseEvent.CLICK, this.changeNewMenuStatusForGroup); this.check2.alpha = 1; this.check2.buttonMode = true; this.check2.usehandcursor = true; } else { this.check1.removeEventListener(MouseEvent.CLICK, this.changeOldMenuStatusForGroup); this.check1.alpha = 0.4; this.check1.buttonMode = false; this.check1.usehandcursor = false; this.check2.removeEventListener(MouseEvent.CLICK, this.changeNewMenuStatusForGroup); this.check2.alpha = 0.4; this.check2.buttonMode = false; this.check2.usehandcursor = false; }; } public function removeListeners():void{ this.check1.removeEventListener(MouseEvent.CLICK, this.changeOldMenuStatusForGroup); this.check1.alpha = 0.4; this.check1.buttonMode = false; this.check1.usehandcursor = false; this.check2.removeEventListener(MouseEvent.CLICK, this.changeNewMenuStatusForGroup); this.check2.alpha = 0.4; this.check2.buttonMode = false; this.check2.usehandcursor = false; } public function changeOldMenuStatusForGroup(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:URLRequest; var _local5:URLVariables; if ((((this.check1.currentFrame == 2)) && ((this.check2.currentFrame == 2)))){ _local2 = 0; } else { if ((((this.check1.currentFrame == 2)) && ((this.check2.currentFrame == 1)))){ _local2 = 2; } else { if ((((this.check1.currentFrame == 1)) && ((this.check2.currentFrame == 2)))){ _local2 = 1; }; }; }; if (this.check1.currentFrame == 1){ if (this.check2.currentFrame == 1){ _local3 = 2; } else { _local3 = 0; }; } else { if (this.check2.currentFrame == 1){ _local3 = 2; } else { _local3 = 1; }; }; if (_local3 != _local2){ movieclip(root).settingsMenu.removeAllListeners(); movieclip(root).settingsMenu.pleaseWait.play(); movieclip(root).settingsMenu.pleaseWait.visible = true; _local4 = new URLRequest("updateKS3MenuStatusForGroup.php"); _local4.method = URLRequestMethod.POST; _local5 = new URLVariables(); _local5.centreID = movieclip(root).centreID; _local5.GROUPNAME = this.grouptxt.text; _local5.VALUE = _local3; _local4.data = _local5; this.settingsLoader = new URLLoader(); this.settingsLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.settingsLoader.addEventListener(Event.COMPLETE, this.settingscompleteHandler); this.settingsLoader.load(_local4); if (_local3 == 0){ this.check1.gotoandstop(2); this.check2.gotoandstop(2); } else { if (_local3 == 1){ this.check1.gotoandstop(1); this.check2.gotoandstop(2); } else { if (_local3 == 2){ this.check1.gotoandstop(2); this.check2.gotoandstop(1); }; }; }; }; } public function changeNewMenuStatusForGroup(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:URLRequest; var _local5:URLVariables; if ((((this.check1.currentFrame == 2)) && ((this.check2.currentFrame == 2)))){ _local2 = 0; } else { if ((((this.check1.currentFrame == 2)) && ((this.check2.currentFrame == 1)))){ _local2 = 2; } else { if ((((this.check1.currentFrame == 1)) && ((this.check2.currentFrame == 2)))){ _local2 = 1; }; }; }; if (this.check2.currentFrame == 1){ if (this.check1.currentFrame == 1){ _local3 = 1; } else { _local3 = 0; }; } else { if (this.check1.currentFrame == 1){ _local3 = 1; } else { _local3 = 2; }; }; if (_local3 != _local2){ movieclip(root).settingsMenu.removeAllListeners(); movieclip(root).settingsMenu.pleaseWait.play(); movieclip(root).settingsMenu.pleaseWait.visible = true; _local4 = new URLRequest("updateKS3MenuStatusForGroup.php"); _local4.method = URLRequestMethod.POST; _local5 = new URLVariables(); _local5.centreID = movieclip(root).centreID; _local5.GROUPNAME = this.grouptxt.text; _local5.VALUE = _local3; _local4.data = _local5; this.settingsLoader = new URLLoader(); this.settingsLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.settingsLoader.addEventListener(Event.COMPLETE, this.settingscompleteHandler); this.settingsLoader.load(_local4); if (_local3 == 0){ this.check1.gotoandstop(2); this.check2.gotoandstop(2); } else { if (_local3 == 1){ this.check1.gotoandstop(1); this.check2.gotoandstop(2); } else { if (_local3 == 2){ this.check1.gotoandstop(2); this.check2.gotoandstop(1); }; }; }; }; } public function settingscompleteHandler(_arg1:Event):void{ this.settingsLoader.removeEventListener(Event.COMPLETE, this.settingscompleteHandler); movieclip(root).settingsMenu.pleaseWait.stop(); movieclip(root).settingsMenu.pleaseWait.visible = false; movieclip(root).settingsMenu.addAllListeners(); } function frame1(){ stop(); }   } }//package package { import flash.text.*; import flash.display.*;   public dynamic class headerCell extends movieclip {   public var txt:textfield;   } }//package package { import flash.events.*; import flash.text.*; import flash.display.*;   public class listItem extends movieclip {   public var itemTxt:textfield; private var _root:object; public var index:string; private var plainFormat:textformat; private var titleFormat:textformat;   public function listItem(){ addEventListener(Event.ADDED, this.beginClass); } private function beginClass(_arg1:Event):void{ this.plainFormat = new textformat(); this.plainFormat.size = 18; this.plainFormat.align = TextFormatAlign.left; this.plainFormat.underline = false; this.titleFormat = new textformat(); this.titleFormat.size = 18; this.titleFormat.align = TextFormatAlign.CENTER; this.titleFormat.underline = true; if (this.index != "0"){ if (((!((movieclip(root).MODE == "DEMO"))) || ((movieclip(root).OVERRIDE == true)))){ if (this.index != "-1"){ buttonMode = true; usehandcursor = true; addEventListener(MouseEvent.MOUSE_OVER, this.onMouseOver); addEventListener(MouseEvent.CLICK, this.onClick); }; } else { textfield(this.itemTxt).textcolor = 0x999999; }; textfield(this.itemTxt).settextformat(this.plainFormat); } else { if (this.index != "-1"){ textfield(this.itemTxt).settextformat(this.titleFormat); } else { textfield(this.itemTxt).settextformat(this.plainFormat); }; }; this._root = movieclip(root); } private function onMouseOver(_arg1:MouseEvent):void{ removeEventListener(MouseEvent.MOUSE_OVER, this.onMouseOver); addEventListener(MouseEvent.MOUSE_OUT, this.onMouseOut); textfield(this.itemTxt).textcolor = 0xFF0000; } private function onMouseOut(_arg1:MouseEvent):void{ removeEventListener(MouseEvent.MOUSE_OUT, this.onMouseOut); addEventListener(MouseEvent.MOUSE_OVER, this.onMouseOver); textfield(this.itemTxt).textcolor = 0xFFFFFF; } public function onClick(_arg1:MouseEvent):void{ if (this.index != "0"){ this._root.videoClip = ("Clip" + this.index); this._root.playVideo(); }; }   } }//package package { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class gcseMenuStatusRow extends movieclip {   public var check1:movieclip; public var check2:movieclip; public var grouptxt:textfield; public var settingsLoader:URLLoader;   public function gcseMenuStatusRow(){ addFrameScript(0, this.frame1); } public function addListeners():void{ if (movieclip(root).userGCSELicence == 1){ this.check1.addEventListener(MouseEvent.CLICK, this.changeOldMenuStatusForGroup); this.check1.alpha = 1; this.check1.buttonMode = true; this.check1.usehandcursor = true; this.check2.addEventListener(MouseEvent.CLICK, this.changeNewMenuStatusForGroup); this.check2.alpha = 1; this.check2.buttonMode = true; this.check2.usehandcursor = true; } else { this.check1.removeEventListener(MouseEvent.CLICK, this.changeOldMenuStatusForGroup); this.check1.alpha = 0.4; this.check1.buttonMode = false; this.check1.usehandcursor = false; this.check2.removeEventListener(MouseEvent.CLICK, this.changeNewMenuStatusForGroup); this.check2.alpha = 0.4; this.check2.buttonMode = false; this.check2.usehandcursor = false; }; } public function removeListeners():void{ this.check1.removeEventListener(MouseEvent.CLICK, this.changeOldMenuStatusForGroup); this.check1.alpha = 0.4; this.check1.buttonMode = false; this.check1.usehandcursor = false; this.check2.removeEventListener(MouseEvent.CLICK, this.changeNewMenuStatusForGroup); this.check2.alpha = 0.4; this.check2.buttonMode = false; this.check2.usehandcursor = false; } public function changeOldMenuStatusForGroup(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:URLRequest; var _local5:URLVariables; if ((((this.check1.currentFrame == 2)) && ((this.check2.currentFrame == 1)))){ _local2 = 2; } else { if ((((this.check1.currentFrame == 1)) && ((this.check2.currentFrame == 2)))){ _local2 = 1; }; }; if (this.check1.currentFrame == 1){ _local3 = 2; }; if (_local3 != _local2){ movieclip(root).settingsMenu.removeAllListeners(); movieclip(root).settingsMenu.pleaseWait.play(); movieclip(root).settingsMenu.pleaseWait.visible = true; _local4 = new URLRequest("updateGCSEMenuStatusForGroup.php"); _local4.method = URLRequestMethod.POST; _local5 = new URLVariables(); _local5.centreID = movieclip(root).centreID; _local5.GROUPNAME = this.grouptxt.text; _local5.VALUE = _local3; _local4.data = _local5; this.settingsLoader = new URLLoader(); this.settingsLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.settingsLoader.addEventListener(Event.COMPLETE, this.settingscompleteHandler); this.settingsLoader.load(_local4); if (_local3 == 1){ this.check1.gotoandstop(1); this.check2.gotoandstop(2); } else { if (_local3 == 2){ this.check1.gotoandstop(2); this.check2.gotoandstop(1); }; }; }; } public function changeNewMenuStatusForGroup(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:URLRequest; var _local5:URLVariables; if ((((this.check1.currentFrame == 2)) && ((this.check2.currentFrame == 1)))){ _local2 = 2; } else { if ((((this.check1.currentFrame == 1)) && ((this.check2.currentFrame == 2)))){ _local2 = 1; }; }; if (this.check2.currentFrame == 1){ _local3 = 1; }; if (_local3 != _local2){ movieclip(root).settingsMenu.removeAllListeners(); movieclip(root).settingsMenu.pleaseWait.play(); movieclip(root).settingsMenu.pleaseWait.visible = true; _local4 = new URLRequest("updateGCSEMenuStatusForGroup.php"); _local4.method = URLRequestMethod.POST; _local5 = new URLVariables(); _local5.centreID = movieclip(root).centreID; _local5.GROUPNAME = this.grouptxt.text; _local5.VALUE = _local3; _local4.data = _local5; this.settingsLoader = new URLLoader(); this.settingsLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.settingsLoader.addEventListener(Event.COMPLETE, this.settingscompleteHandler); this.settingsLoader.load(_local4); if (_local3 == 1){ this.check1.gotoandstop(1); this.check2.gotoandstop(2); } else { if (_local3 == 2){ this.check1.gotoandstop(2); this.check2.gotoandstop(1); }; }; }; } public function settingscompleteHandler(_arg1:Event):void{ this.settingsLoader.removeEventListener(Event.COMPLETE, this.settingscompleteHandler); movieclip(root).settingsMenu.pleaseWait.stop(); movieclip(root).settingsMenu.pleaseWait.visible = false; movieclip(root).settingsMenu.addAllListeners(); } function frame1(){ stop(); }   } }//package package { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class teacherRow extends movieclip {   public var deleteBtn:deleteStudentBtn; public var editBtn:SimpleButton; public var firsttxt:textfield; public var lasttxt:textfield; public var UPN:string; public var ID:int; public var username:string;   public function teacherRow(){ addFrameScript(0, this.frame1); } public function addListeners():void{ this.editBtn.addEventListener(MouseEvent.CLICK, this.onEdit); this.deleteBtn.addEventListener(MouseEvent.CLICK, this.onDelete); } public function removeListeners():void{ this.editBtn.removeEventListener(MouseEvent.CLICK, this.onEdit); this.deleteBtn.removeEventListener(MouseEvent.CLICK, this.onDelete); } public function onEdit(_arg1:MouseEvent):void{ movieclip(root).teacherManager.showTeacherEditor(this.firsttxt.text, this.lasttxt.text, this.username, this.ID, this.UPN); } public function onDelete(_arg1:MouseEvent):void{ movieclip(root).teacherManager.showTeacherDeleter(this.firsttxt.text, this.lasttxt.text, this.username, this.ID, this.UPN); } function frame1(){ stop(); }   } }//package package { import flash.display.*;   public dynamic class deleteStudentBtn extends SimpleButton {   } }//package package mwindexV19_6_fla { import flash.text.*; import flash.display.*;   public dynamic class teacherAdder_65 extends movieclip {   public var cancelBtn:SimpleButton; public var errorDuplicateLoginMessage:movieclip; public var errorDuplicateUPNMessage:movieclip; public var errorIncompleteMessage:movieclip; public var firsttxt:textfield; public var lasttxt:textfield; public var loadingClip:movieclip; public var okBtn:SimpleButton; public var passtxt:textfield; public var upntxt:textfield; public var usertxt:textfield; public var ID:int; public var UPN:string;   public function teacherAdder_65(){ addFrameScript(0, this.frame1); } public function initialise():void{ this.firsttxt.text = ""; this.lasttxt.text = ""; this.upntxt.text = ""; this.usertxt.text = ""; this.passtxt.text = ""; this.errorDuplicateUPNMessage.visible = false; this.errorDuplicateLoginMessage.visible = false; this.errorIncompleteMessage.visible = false; } function frame1(){ stop(); this.loadingClip.visible = false; this.loadingClip.stop(); this.firsttxt.restrict = "A-Z a-z"; this.lasttxt.restrict = "A-Z a-z"; this.upntxt.restrict = "A-Z 0-9"; this.usertxt.restrict = "A-Z a-z 0-9"; this.passtxt.restrict = "A-Z a-z 0-9"; this.errorDuplicateUPNMessage.visible = false; this.errorDuplicateLoginMessage.visible = false; this.errorIncompleteMessage.visible = false; this.passtxt.displayAsPassword = true; }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.display.*;   public dynamic class historyBtn_41 extends movieclip {   public function historyBtn_41(){ addFrameScript(0, this.frame1); } function frame1(){ buttonMode = true; usehandcursor = true; }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class teacherManager_58 extends movieclip {   public var addBtn:movieclip; public var addStaff:movieclip; public var closeBtn:SimpleButton; public var listMask:movieclip; public var pleaseWait:movieclip; public var rowHolder:movieclip; public var scrollBack:movieclip; public var scrollDownBtn:SimpleButton; public var scrollMC:movieclip; public var scrollUpBtn:SimpleButton; public var teacherDeleter:movieclip; public var teacherEditor:movieclip; public var getTeacherRequest:URLRequest; public var getTeacherLoader:URLLoader; public var numberOfTeachers:int; public var firstNames:array; public var lastNames:array; public var userNames:array; public var IDs:array; public var UPNs:array; public var saveREQ:URLRequest; public var saveLoader:URLLoader; public var delREQ:URLRequest; public var delLoader:URLLoader; public var ADDSTAFFREQ:URLRequest; public var addStaffLoader:URLLoader; public var CHECKREQ:URLRequest; public var checkLoader:URLLoader; public var bounds:Rectangle; public var scrolling:boolean;   public function teacherManager_58(){ addFrameScript(0, this.frame1); } public function onclose(_arg1:MouseEvent):void{ this.Reset(); visible = false; } public function Reset():void{ this.rowHolder.y = 0; while (this.rowHolder.numChildren > 0) { this.rowHolder.removeChildAt(0); }; } public function loadRows():void{ this.addBtn.visible = false; this.pleaseWait.play(); this.pleaseWait.visible = true; this.Reset(); this.getTeacherRequest = new URLRequest("loadTeachers.php"); this.getTeacherRequest.method = URLRequestMethod.POST; var _local1:URLVariables = new URLVariables(); _local1.CENTRE = movieclip(root).centreID; this.getTeacherRequest.data = _local1; this.getTeacherLoader = new URLLoader(); this.getTeacherLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.getTeacherLoader.addEventListener(Event.COMPLETE, this.teachersLoadedHandler); this.getTeacherLoader.load(this.getTeacherRequest); } public function teachersLoadedHandler(_arg1:Event):void{ this.getTeacherLoader.removeEventListener(Event.COMPLETE, this.teachersLoadedHandler); this.pleaseWait.stop(); this.pleaseWait.visible = false; this.numberOfTeachers = _arg1.target.data.COUNT; this.firstNames = []; this.lastNames = []; this.userNames = []; this.IDs = []; this.UPNs = []; var _local2:int; while (_local2 < this.numberOfTeachers) { this.firstNames.push(_arg1.target.data[("FIRSTNAME" + _local2)]); this.lastNames.push(_arg1.target.data[("LASTNAME" + _local2)]); this.userNames.push(_arg1.target.data[("USERNAME" + _local2)]); this.IDs.push(int(_arg1.target.data[("ID" + _local2)])); this.UPNs.push(_arg1.target.data[("UPN" + _local2)]); _local2++; }; this.showList(); } public function showList():void{ var _local3:boolean; var _local4:movieclip; this.Reset(); var _local1:int; var _local2:int; while (_local2 < this.numberOfTeachers) { _local3 = true; if (_local3){ _local4 = movieclip(new teacherRow()); _local4.x = 43; _local4.y = (80 + ((_local2 - _local1) * 20)); _local4.firsttxt.text = this.firstNames[_local2]; _local4.lasttxt.text = this.lastNames[_local2]; _local4.username = this.userNames[_local2]; _local4.ID = this.IDs[_local2]; _local4.UPN = this.UPNs[_local2]; this.rowHolder.addChild(_local4); _local4.addListeners(); } else { _local1 = (_local1 + 1); }; _local2++; }; if (this.rowHolder.numChildren > 18){ this.scrollMC.buttonMode = true; this.scrollMC.usehandcursor = true; this.scrollUpBtn.visible = true; this.scrollDownBtn.visible = true; this.scrollMC.visible = true; this.scrollBack.visible = true; this.scrollUpBtn.addEventListener(MouseEvent.CLICK, this.scrollUp); this.scrollDownBtn.addEventListener(MouseEvent.CLICK, this.scrollDown); this.scrollMC.addEventListener(MouseEvent.MOUSE_DOWN, this.startScroll); stage.addEventListener(MouseEvent.MOUSE_UP, this.stopScroll); addEventListener(Event.ENTER_FRAME, this.enterHandler); } else { this.scrollUpBtn.visible = false; this.scrollDownBtn.visible = false; this.scrollMC.visible = false; this.scrollBack.visible = false; this.scrollUpBtn.removeEventListener(MouseEvent.CLICK, this.scrollUp); this.scrollDownBtn.removeEventListener(MouseEvent.CLICK, this.scrollDown); this.scrollMC.removeEventListener(MouseEvent.MOUSE_DOWN, this.startScroll); stage.removeEventListener(MouseEvent.MOUSE_UP, this.stopScroll); removeEventListener(Event.ENTER_FRAME, this.enterHandler); }; this.updateAfterScroll(); this.addBtn.visible = true; this.addBtn.addEventListener(MouseEvent.CLICK, this.addTeacher); } public function scrollUp(_arg1:MouseEvent):void{ if (this.rowHolder.y < 0){ this.rowHolder.y = (this.rowHolder.y + 20); this.updateAfterScroll(); }; } public function scrollDown(_arg1:MouseEvent):void{ var _local2:int = ((this.rowHolder.numChildren - 18) * -20); if (this.rowHolder.y > _local2){ this.rowHolder.y = (this.rowHolder.y - 20); this.updateAfterScroll(); }; } public function startScroll(_arg1:Event):void{ this.scrolling = true; this.scrollMC.startdrag(false, this.bounds); } public function stopScroll(_arg1:Event):void{ this.scrolling = false; this.scrollMC.stopdrag(); } public function enterHandler(_arg1:Event):void{ var _local2:number; var _local3:number; if (this.scrolling == true){ _local2 = (this.scrollMC.y - this.bounds.y); _local3 = (_local2 / 326); this.rowHolder.y = (math.round((((360 - this.rowHolder.height) * _local3) / 20)) * 20); }; this.updateAfterScroll(); } public function updateAfterScroll():void{ var _local1:number; var _local2:number; if ((((this.rowHolder.numChildren > 18)) && ((this.scrolling == false)))){ _local1 = (this.rowHolder.y / (360 - this.rowHolder.height)); _local2 = (_local1 * 326); this.scrollMC.y = (this.bounds.y + _local2); }; } public function removeAllListeners():void{ var _local1:int; while (_local1 < this.rowHolder.numChildren) { movieclip(this.rowHolder.getChildAt(_local1)).removeListeners(); _local1++; }; } public function addAllListeners():void{ var _local1:int; while (_local1 < this.rowHolder.numChildren) { movieclip(this.rowHolder.getChildAt(_local1)).addListeners(); _local1++; }; } public function showTeacherEditor(_arg1:string, _arg2:string, _arg3:string, _arg4:int, _arg5:string):void{ this.teacherEditor.firsttxt.text = _arg1; this.teacherEditor.lasttxt.text = _arg2; this.teacherEditor.usertxt.text = _arg3; this.teacherEditor.ID = _arg4; this.teacherEditor.UPN = _arg5; movieclip(this).setChildIndex(this.teacherEditor, (movieclip(this).numChildren - 1)); this.teacherEditor.visible = true; this.teacherEditor.cancelBtn.addEventListener(MouseEvent.CLICK, this.cancelTeacherEdit); this.teacherEditor.saveBtn.addEventListener(MouseEvent.CLICK, this.saveTeacherDetails); } public function cancelTeacherEdit(_arg1:MouseEvent):void{ this.teacherEditor.savedMessage.visible = false; this.teacherEditor.mismatchMessage.visible = false; this.teacherEditor.firsttxt.text = ""; this.teacherEditor.lasttxt.text = ""; this.teacherEditor.usertxt.text = ""; this.teacherEditor.ID = 0; this.teacherEditor.UPN = ""; movieclip(this).setChildIndex(this.teacherEditor, (movieclip(this).numChildren - 1)); this.teacherEditor.visible = false; this.teacherEditor.cancelBtn.removeEventListener(MouseEvent.CLICK, this.cancelTeacherEdit); this.teacherEditor.saveBtn.removeEventListener(MouseEvent.CLICK, this.saveTeacherDetails); } public function saveTeacherDetails(_arg1:MouseEvent):void{ var _local2:URLVariables; this.teacherEditor.savedMessage.visible = false; this.teacherEditor.mismatchMessage.visible = false; if (((this.allFieldsCompleted()) && (this.passwordsMatch()))){ this.teacherEditor.cancelBtn.removeEventListener(MouseEvent.CLICK, this.cancelTeacherEdit); this.teacherEditor.saveBtn.removeEventListener(MouseEvent.CLICK, this.saveTeacherDetails); this.teacherEditor.loadingClip.visible = true; this.teacherEditor.loadingClip.play(); this.saveREQ = new URLRequest("saveTeacherDetails.php"); this.saveREQ.method = URLRequestMethod.POST; _local2 = new URLVariables(); _local2.CENTRE = movieclip(root).centreID; _local2.FIRSTNAME = this.teacherEditor.firsttxt.text; _local2.LASTNAME = this.teacherEditor.lasttxt.text; if (this.removeSpaces(this.teacherEditor.passwordtxt.text) != ""){ _local2.password = this.teacherEditor.passwordtxt.text; _local2.CHANGEPASSWORD = 1; } else { _local2.password = ""; _local2.CHANGEPASSWORD = 0; }; _local2.USERNAME = this.teacherEditor.usertxt.text; _local2.ID = this.teacherEditor.ID; _local2.UPN = this.teacherEditor.UPN; this.saveREQ.data = _local2; this.saveLoader = new URLLoader(); this.saveLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.saveLoader.addEventListener(Event.COMPLETE, this.saveCompleteHandler); this.saveLoader.load(this.saveREQ); } else { if (this.allFieldsCompleted() == false){ this.teacherEditor.mismatchMessage.text = "Please complete first name, last name and username"; this.teacherEditor.mismatchMessage.visible = true; } else { if (this.passwordsMatch() == false){ this.teacherEditor.mismatchMessage.text = "The password fields must match - please try again."; this.teacherEditor.mismatchMessage.visible = true; }; }; }; } public function allFieldsCompleted():boolean{ var _local1:boolean; if (this.removeSpaces(this.teacherEditor.firsttxt.text) == ""){ _local1 = false; }; if (this.removeSpaces(this.teacherEditor.lasttxt.text) == ""){ _local1 = false; }; if (this.removeSpaces(this.teacherEditor.usertxt.text) == ""){ _local1 = false; }; return (_local1); } public function passwordsMatch():boolean{ var _local1:boolean; if (this.teacherEditor.passwordtxt.text == this.teacherEditor.confirmtxt.text){ _local1 = true; }; return (_local1); } public function saveCompleteHandler(_arg1:Event):void{ this.saveLoader.removeEventListener(Event.COMPLETE, this.saveCompleteHandler); this.teacherEditor.loadingClip.visible = false; this.teacherEditor.loadingClip.stop(); this.teacherEditor.cancelBtn.addEventListener(MouseEvent.CLICK, this.cancelTeacherEdit); this.teacherEditor.saveBtn.addEventListener(MouseEvent.CLICK, this.saveTeacherDetails); this.teacherEditor.savedMessage.visible = true; this.loadRows(); } public function showTeacherDeleter(_arg1:string, _arg2:string, _arg3:string, _arg4:int, _arg5:string):void{ this.teacherDeleter.firsttxt.text = _arg1; this.teacherDeleter.lasttxt.text = _arg2; this.teacherDeleter.usertxt.text = _arg3; this.teacherDeleter.ID = _arg4; this.teacherDeleter.UPN = _arg5; movieclip(this).setChildIndex(this.teacherDeleter, (movieclip(this).numChildren - 1)); this.teacherDeleter.visible = true; this.teacherDeleter.cancelBtn.addEventListener(MouseEvent.CLICK, this.cancelTeacherDelete); this.teacherDeleter.okBtn.addEventListener(MouseEvent.CLICK, this.deleteTeacherDetails); } public function cancelTeacherDelete(_arg1:MouseEvent):void{ this.teacherDeleter.firsttxt.text = ""; this.teacherDeleter.lasttxt.text = ""; this.teacherDeleter.usertxt.text = ""; this.teacherDeleter.ID = 0; this.teacherDeleter.UPN = ""; movieclip(this).setChildIndex(this.teacherDeleter, (movieclip(this).numChildren - 1)); this.teacherDeleter.visible = false; this.teacherDeleter.cancelBtn.removeEventListener(MouseEvent.CLICK, this.cancelTeacherDelete); this.teacherDeleter.okBtn.removeEventListener(MouseEvent.CLICK, this.deleteTeacherDetails); } public function deleteTeacherDetails(_arg1:MouseEvent):void{ this.teacherDeleter.cancelBtn.removeEventListener(MouseEvent.CLICK, this.cancelTeacherDelete); this.teacherDeleter.okBtn.removeEventListener(MouseEvent.CLICK, this.deleteTeacherDetails); this.teacherDeleter.loadingClip.visible = true; this.teacherDeleter.loadingClip.play(); this.delREQ = new URLRequest("deleteTeacherAccount.php"); this.delREQ.method = URLRequestMethod.POST; var _local2:URLVariables = new URLVariables(); _local2.CENTRE = movieclip(root).centreID; _local2.ID = this.teacherDeleter.ID; _local2.UPN = this.teacherDeleter.UPN; this.delREQ.data = _local2; this.delLoader = new URLLoader(); this.delLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.delLoader.addEventListener(Event.COMPLETE, this.deleteCompleteHandler); this.delLoader.load(this.delREQ); } public function deleteCompleteHandler(_arg1:Event):void{ this.delLoader.removeEventListener(Event.COMPLETE, this.deleteCompleteHandler); this.teacherDeleter.loadingClip.visible = false; this.teacherDeleter.loadingClip.stop(); this.teacherDeleter.cancelBtn.removeEventListener(MouseEvent.CLICK, this.cancelTeacherDelete); this.teacherDeleter.okBtn.removeEventListener(MouseEvent.CLICK, this.deleteTeacherDetails); this.teacherDeleter.visible = false; this.teacherDeleter.firsttxt.text = ""; this.teacherDeleter.lasttxt.text = ""; this.teacherDeleter.usertxt.text = ""; this.teacherDeleter.ID = 0; this.teacherDeleter.UPN = ""; this.loadRows(); } public function addTeacher(_arg1:MouseEvent):void{ this.addStaff.visible = true; movieclip(this).setChildIndex(this.addStaff, (movieclip(this).numChildren - 1)); this.addStaff.initialise(); this.addStaff.okBtn.addEventListener(MouseEvent.CLICK, this.checkForStaffErrors); this.addStaff.cancelBtn.addEventListener(MouseEvent.CLICK, this.cancelAddStaff); } public function cancelAddStaff(_arg1:MouseEvent):void{ this.addStaff.visible = false; this.addStaff.okBtn.removeEventListener(MouseEvent.CLICK, this.checkForStaffErrors); this.addStaff.cancelBtn.removeEventListener(MouseEvent.CLICK, this.cancelAddStaff); } public function checkForStaffErrors(_arg1:MouseEvent):void{ this.addStaff.okBtn.removeEventListener(MouseEvent.CLICK, this.checkForStaffErrors); this.addStaff.cancelBtn.removeEventListener(MouseEvent.CLICK, this.cancelAddStaff); this.addStaff.errorDuplicateUPNMessage.visible = false; this.addStaff.errorDuplicateLoginMessage.visible = false; this.addStaff.errorIncompleteMessage.visible = false; var _local2:boolean; if (this.removeSpaces(this.addStaff.firsttxt.text) == ""){ _local2 = false; }; if (this.removeSpaces(this.addStaff.lasttxt.text) == ""){ _local2 = false; }; if (this.removeSpaces(this.addStaff.upntxt.text) == ""){ _local2 = false; }; if (this.removeSpaces(this.addStaff.usertxt.text) == ""){ _local2 = false; }; if (this.removeSpaces(this.addStaff.passtxt.text) == ""){ _local2 = false; }; if (_local2 == true){ this.checkForStaffDuplicates(); } else { this.addStaff.errorIncompleteMessage.visible = true; this.addStaff.okBtn.addEventListener(MouseEvent.CLICK, this.checkForStaffErrors); this.addStaff.cancelBtn.addEventListener(MouseEvent.CLICK, this.cancelAddStaff); }; } public function checkForStaffDuplicates():void{ this.addStaff.loadingClip.visible = true; this.addStaff.loadingClip.play(); this.CHECKREQ = new URLRequest("checkForDuplicatedDetails.php"); this.CHECKREQ.method = URLRequestMethod.POST; var _local1:URLVariables = new URLVariables(); _local1.CENTRE = movieclip(root).centreID; _local1.UPN = this.addStaff.upntxt.text; _local1.USER = this.addStaff.usertxt.text; _local1.PASS = this.addStaff.passtxt.text; this.CHECKREQ.data = _local1; this.checkLoader = new URLLoader(); this.checkLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.checkLoader.addEventListener(Event.COMPLETE, this.staffDetailsCheckedHandler); this.checkLoader.load(this.CHECKREQ); } public function staffDetailsCheckedHandler(_arg1:Event):void{ this.checkLoader.removeEventListener(Event.COMPLETE, this.staffDetailsCheckedHandler); var _local2:int = int(_arg1.target.data["UPNCOUNT"]); var _local3:int = int(_arg1.target.data["LOGINCOUNT"]); if (_local2 > 0){ this.addStaff.loadingClip.visible = false; this.addStaff.loadingClip.stop(); this.addStaff.errorDuplicateUPNMessage.visible = true; this.addStaff.okBtn.addEventListener(MouseEvent.CLICK, this.checkForStaffErrors); this.addStaff.cancelBtn.addEventListener(MouseEvent.CLICK, this.cancelAddStaff); } else { if (_local3 > 0){ this.addStaff.loadingClip.visible = false; this.addStaff.loadingClip.stop(); this.addStaff.errorDuplicateLoginMessage.visible = true; this.addStaff.okBtn.addEventListener(MouseEvent.CLICK, this.checkForStaffErrors); this.addStaff.cancelBtn.addEventListener(MouseEvent.CLICK, this.cancelAddStaff); } else { this.doAddStaff(); }; }; } public function doAddStaff():void{ this.addStaff.okBtn.removeEventListener(MouseEvent.CLICK, this.checkForStaffErrors); this.addStaff.cancelBtn.removeEventListener(MouseEvent.CLICK, this.cancelAddStaff); this.ADDSTAFFREQ = new URLRequest("addStaffToDatabase.php"); this.ADDSTAFFREQ.method = URLRequestMethod.POST; var _local1:URLVariables = new URLVariables(); _local1.CENTRE = movieclip(root).centreID; _local1.GROUP = "staff"; _local1.FIRSTNAME = this.addStaff.firsttxt.text.touppercase(); _local1.LASTNAME = this.addStaff.lasttxt.text.touppercase(); _local1.UPN = this.addStaff.upntxt.text; _local1.USERNAME = this.addStaff.usertxt.text; _local1.password = this.addStaff.passtxt.text; _local1.SCHOOL = movieclip(root).userSchool; _local1.YEAR = 0; this.ADDSTAFFREQ.data = _local1; this.addStaffLoader = new URLLoader(); this.addStaffLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.addStaffLoader.addEventListener(Event.COMPLETE, this.staffAddedHandler); this.addStaffLoader.load(this.ADDSTAFFREQ); } public function staffAddedHandler(_arg1:Event):void{ this.addStaffLoader.removeEventListener(Event.COMPLETE, this.staffAddedHandler); this.loadRows(); this.addStaff.loadingClip.visible = false; this.addStaff.loadingClip.stop(); this.addStaff.visible = false; } public function removeSpaces(_arg1:string):string{ var _local2:array = _arg1.split(" "); return (_local2.join("")); } function frame1(){ this.pleaseWait.stop(); this.pleaseWait.visible = false; this.teacherEditor.visible = false; this.teacherDeleter.visible = false; this.addStaff.visible = false; this.addBtn.visible = false; this.bounds = new Rectangle(this.scrollMC.x, 93, 0, 326); this.scrolling = false; this.rowHolder.mask = this.listMask; this.closeBtn.addEventListener(MouseEvent.CLICK, this.onclose); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*;   public dynamic class buttonOne_55 extends movieclip {   public var txt:textfield; public var linkFile:string;   public function buttonOne_55(){ addFrameScript(0, this.frame1); } public function onClick(_arg1:MouseEvent):void{ var _local2:URLRequest = new URLRequest(("docs/" + this.linkFile)); navigateToURL(_local2, "_blank"); } function frame1(){ stop(); buttonMode = true; usehandcursor = true; addEventListener(MouseEvent.CLICK, this.onClick); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.display.*;   public dynamic class addBtn_59 extends movieclip {   public function addBtn_59(){ addFrameScript(0, this.frame1); } function frame1(){ stop(); buttonMode = true; usehandcursor = true; }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.display.*;   public dynamic class smallBtnBorder_27 extends movieclip {   public function smallBtnBorder_27(){ addFrameScript(0, this.frame1); } function frame1(){ stop(); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.display.*; import flash.net.*;   public dynamic class youTubeLink_57 extends movieclip {   public function youTubeLink_57(){ addFrameScript(0, this.frame1); } public function onYouTube(_arg1:MouseEvent):void{ var _local2:URLRequest = new URLRequest("https://www.youtube.com/user/MathsWatch/playlists"); navigateToURL(_local2, "_blank"); } function frame1(){ buttonMode = true; usehandcursor = true; addEventListener(MouseEvent.CLICK, this.onYouTube); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.display.*;   public dynamic class teacherIcon_14 extends movieclip {   public function teacherIcon_14(){ addFrameScript(0, this.frame1); } function frame1(){ buttonMode = true; usehandcursor = true; }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class searchBox_43 extends movieclip {   public var goBtn:SimpleButton; public var infotxt:textfield; public var searchtxt:textfield;   public function searchBox_43(){ addFrameScript(0, this.frame1); } public function inputDetected(_arg1:Event):void{ this.updateTextFields(); } public function updateTextFields():void{ if (this.searchtxt.text == ""){ this.infotxt.visible = true; } else { this.infotxt.visible = false; }; } public function onSearch(_arg1:MouseEvent):void{ movieclip(root).doSearch(); } function frame1(){ this.searchtxt.addEventListener(Event.CHANGE, this.inputDetected); this.goBtn.addEventListener(MouseEvent.CLICK, this.onSearch); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*;   public dynamic class buttonTwo_56 extends movieclip {   public var txt:textfield; public var linkFile:string;   public function buttonTwo_56(){ addFrameScript(0, this.frame1); } public function onClick(_arg1:MouseEvent):void{ var _local2:URLRequest = new URLRequest(("docs/" + this.linkFile)); navigateToURL(_local2, "_blank"); } function frame1(){ stop(); buttonMode = true; usehandcursor = true; addEventListener(MouseEvent.CLICK, this.onClick); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class MainTimeline extends movieclip {   public var ALevelBtn:SimpleButton; public var ALevelDemoBtn:SimpleButton; public var GCSE2015ResourcesBtn:SimpleButton; public var GCSE2015ResourcesDemoBtn:SimpleButton; public var GCSEBtn:SimpleButton; public var GCSEDemoBtn:SimpleButton; public var GCSENewBtn:SimpleButton; public var GCSENewDemoBtn:SimpleButton; public var GCSEResourcesBtn:SimpleButton; public var GCSEResourcesDemoBTN:SimpleButton; public var GCSEResourcesDemoBtn:movieclip; public var KS3Btn:SimpleButton; public var KS3DemoBtn:SimpleButton; public var KS3TeacherBtn:SimpleButton; public var KS3TeacherDemoBtn:SimpleButton; public var bottomLeftBtnBorder:movieclip; public var bottomMidBtnBorder:movieclip; public var bottomRightBtnBorder:movieclip; public var buttonOne:movieclip; public var buttonTwo:movieclip; public var centreidtxt:textfield; public var centretxt:textfield; public var daystxt:textfield; public var exportUsersBtn:SimpleButton; public var historyBtn:movieclip; public var importUsersBtn:SimpleButton; public var incorrectDetailsMessage:movieclip; public var infoText:movieclip; public var intructionsBookBtn:SimpleButton; public var leftBtnBorder:movieclip; public var loading:movieclip; public var loggedInBox:movieclip; public var loginBackground:movieclip; public var logoutBtn:SimpleButton; public var mainText:textfield; public var manageUserInfoTxt:textfield; public var message2Txt:textfield; public var messageTxt:textfield; public var midBtnBorder:movieclip; public var miniLoader:movieclip; public var noUsersTxt:textfield; public var passwordtxt:textfield; public var popularBtn:movieclip; public var pupilImporter:movieclip; public var rightBtnBorder:movieclip; public var searchBox:movieclip; public var settingsBtn:SimpleButton; public var settingsMenu:movieclip; public var startbtn:SimpleButton; public var statBtn:SimpleButton; public var suspendedDetailsMessage:movieclip; public var teacherBtn:movieclip; public var teacherManager:movieclip; public var teamtxt:textfield; public var texttxt:textfield; public var usernametxt:textfield; public var youTubeLink:movieclip; public var youTubeTxt:textfield; public var loginTimeStamp; public var numberOfUsers:int; public var daysRemaining:int; public var renewalDate:string; public var userWsAnswerStatus:int; public var userWsAnswerStatusKS3:int; public var myLoader:URLLoader; public var settingsLoader:URLLoader; public var centreID:string; public var userName:string; public var password:string; public var menuMode:string; public var userID:int; public var userFirst:string; public var userLast:string; public var userSchool:string; public var userGroup:string; public var userType:string; public var userUPN:string; public var userYear:int; public var userGCSELicence:int; public var userASLicence:int; public var userKS3Licence:int; public var KS3MenuStatus:int; public var KS3MenuAllowed:string; public var GCSEMenuStatus:int; public var GCSEDefaultMenu:string; public var userPRIMARYLicence:int; public var statsREQ:URLRequest; public var REQ:URLRequest; public var OPENREQ:URLRequest; public var externalSWF:movieclip; public var menuToLoad; public var MenuHolder:Sprite; public var csvString:string; public var csvArray:array; public var loader:Loader; public var passwordTimer:Timer; public var csvDownloadString:string; public var firstTimeLoad:boolean; public var loggedIn:boolean; public var BTNREQ:URLRequest; public var btnLoader:URLLoader;   public function MainTimeline(){ addFrameScript(0, this.frame1); } public function inputDetected(_arg1:Event):void{ this.updateTextFields(); } public function inputNeedsUpdating(_arg1:MouseEvent):void{ this.updateTextFields(); } public function updateTextFields():void{ if ((((((this.centreidtxt.text == "")) && (!((stage.focus == this.centreidtxt))))) && (this.loginBackground.visible))){ this.centretxt.visible = true; } else { this.centretxt.visible = false; }; if ((((((this.usernametxt.text == "")) && (!((stage.focus == this.usernametxt))))) && (this.loginBackground.visible))){ this.teamtxt.visible = true; } else { this.teamtxt.visible = false; }; if ((((((this.passwordtxt.text == "")) && (!((stage.focus == this.passwordtxt))))) && (this.loginBackground.visible))){ this.texttxt.visible = true; } else { this.texttxt.visible = false; }; } public function hideButtons():void{ if (this.loggedIn == false){ this.hideLoginBox(); this.loggedInBox.visible = false; this.infoText.visible = false; }; this.logoutBtn.visible = false; this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = false; this.intructionsBookBtn.removeEventListener(MouseEvent.CLICK, this.showInstructions); this.historyBtn.visible = false; this.popularBtn.visible = false; this.historyBtn.removeEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.removeEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = false; this.GCSEDemoBtn.removeEventListener(MouseEvent.CLICK, this.onGCSEDemo); this.GCSENewDemoBtn.removeEventListener(MouseEvent.CLICK, this.onGCSENewDemo); this.KS3DemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3TeacherDemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.GCSEBtn.removeEventListener(MouseEvent.CLICK, this.onGCSE); this.GCSENewBtn.removeEventListener(MouseEvent.CLICK, this.onGCSENew); this.GCSEResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSEResources); this.GCSE2015ResourcesDemoBtn.removeEventListener(MouseEvent.CLICK, this.onGCSE2015ResourcesDemo); this.GCSE2015ResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSE2015Resources); this.KS3Btn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.KS3TeacherBtn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.GCSEBtn.visible = false; this.GCSEDemoBtn.visible = false; this.GCSENewBtn.visible = false; this.GCSENewDemoBtn.visible = false; this.GCSEResourcesBtn.visible = false; this.GCSEResourcesDemoBTN.visible = false; this.GCSE2015ResourcesBtn.visible = false; this.GCSE2015ResourcesDemoBtn.visible = false; this.leftBtnBorder.visible = false; this.midBtnBorder.visible = false; this.rightBtnBorder.visible = false; this.bottomLeftBtnBorder.visible = false; this.bottomRightBtnBorder.visible = false; this.bottomMidBtnBorder.visible = false; this.leftBtnBorder.gotoandstop(1); this.midBtnBorder.gotoandstop(1); this.rightBtnBorder.gotoandstop(1); this.bottomLeftBtnBorder.gotoandstop(1); this.bottomRightBtnBorder.gotoandstop(1); this.bottomMidBtnBorder.gotoandstop(1); this.KS3Btn.visible = false; this.KS3DemoBtn.visible = false; this.KS3TeacherBtn.visible = false; this.KS3TeacherDemoBtn.visible = false; this.ALevelDemoBtn.removeEventListener(MouseEvent.CLICK, this.onALevelTaster); this.ALevelDemoBtn.visible = false; this.ALevelBtn.removeEventListener(MouseEvent.CLICK, this.onALevel); this.ALevelBtn.visible = false; } public function onALevelTaster(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "DEMO"; this.menuToLoad = "ALEVEL"; this.loadMenu(); } public function onALevel(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "FULL"; this.menuToLoad = "ALEVEL"; this.loadMenu(); } public function onGCSEDemo(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "DEMO"; this.menuToLoad = "GCSE"; this.loadMenu(); } public function onGCSENewDemo(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "DEMO"; this.menuToLoad = "GCSENEW"; this.loadMenu(); } public function onGCSEResourcesDemo(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "DEMO"; this.menuToLoad = "GCSEResources"; this.loadMenu(); } public function onGCSE2015ResourcesDemo(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "DEMO"; this.menuToLoad = "GCSE2015Resources"; this.loadMenu(); } public function onKS3Demo(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "DEMO"; if (this.KS3MenuAllowed == "BOTH"){ this.menuToLoad = "KS3Selector"; } else { if (this.KS3MenuAllowed == "OLD"){ this.menuToLoad = "KS3Old"; } else { if (this.KS3MenuAllowed == "NEW"){ this.menuToLoad = "KS3New"; }; }; }; this.loadMenu(); } public function onGCSE(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "FULL"; this.menuToLoad = "GCSE"; this.loadMenu(); } public function onGCSENew(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "FULL"; this.menuToLoad = "GCSENEW"; this.loadMenu(); } public function onGCSEResources(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "FULL"; this.menuToLoad = "GCSEResources"; this.loadMenu(); } public function onGCSE2015Resources(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "FULL"; this.menuToLoad = "GCSE2015Resources"; this.loadMenu(); } public function onKS3(_arg1:MouseEvent):void{ this.hideButtons(); this.menuMode = "FULL"; if (this.KS3MenuAllowed == "BOTH"){ this.menuToLoad = "KS3Selector"; } else { if (this.KS3MenuAllowed == "OLD"){ this.menuToLoad = "KS3Old"; } else { if (this.KS3MenuAllowed == "NEW"){ this.menuToLoad = "KS3New"; }; }; }; this.loadMenu(); } public function loadKS3Old():void{ this.hideButtons(); this.menuToLoad = "KS3Old"; this.loadMenu(); } public function loadKS3New():void{ this.hideButtons(); this.menuToLoad = "KS3New"; this.loadMenu(); } public function passwordAlert(_arg1:TimerEvent):void{ if (this.texttxt.visible){ this.centretxt.visible = false; this.texttxt.visible = false; this.teamtxt.visible = false; } else { this.centretxt.visible = true; this.texttxt.visible = true; this.teamtxt.visible = true; }; } public function resetTimer(_arg1:TimerEvent):void{ this.passwordTimer.stop(); this.passwordTimer.reset(); this.centretxt.visible = true; this.texttxt.visible = true; this.teamtxt.visible = true; this.startbtn.visible = true; } public function loadMysql():void{ this.REQ.method = URLRequestMethod.POST; var _local1:URLVariables = new URLVariables(); _local1.CENTRE = this.centreID; _local1.USER = this.userName; _local1.PASS = this.password; this.REQ.data = _local1; this.myLoader = new URLLoader(); this.myLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.myLoader.addEventListener(Event.COMPLETE, this.loadcompleteHandler); this.myLoader.load(this.REQ); } public function loadcompleteHandler(_arg1:Event):void{ var _local4:uint; var _local5:int; var _local6:int; var _local7:int; var _local8:number; var _local9:date; var _local10:date; this.miniLoader.visible = false; this.miniLoader.stop(); this.myLoader.removeEventListener(Event.COMPLETE, this.loadcompleteHandler); var _local2:int = _arg1.target.data.count; var _local3:* = _arg1.target.data.status; if (_local2 == 1){ this.loggedIn = true; this.incorrectDetailsMessage.visible = false; this.suspendedDetailsMessage.visible = false; this.startbtn.visible = false; _local4 = 0; this.userID = _arg1.target.data[("USERID" + _local4)]; this.userFirst = _arg1.target.data[("USERFIRST" + _local4)]; this.userLast = _arg1.target.data[("USERLAST" + _local4)]; this.userSchool = _arg1.target.data[("USERSCHOOL" + _local4)]; this.userGroup = _arg1.target.data[("USERGROUP" + _local4)]; this.userType = _arg1.target.data[("USERTYPE" + _local4)]; this.userUPN = _arg1.target.data[("USERUPN" + _local4)]; this.userYear = _arg1.target.data[("USERYEAR" + _local4)]; this.userGCSELicence = int(_arg1.target.data["GCSELICENCE"]); this.userKS3Licence = int(_arg1.target.data["KS3LICENCE"]); this.userPRIMARYLicence = int(_arg1.target.data["PRIMARYLICENCE"]); this.userASLicence = int(_arg1.target.data["ASLICENCE"]); this.userWsAnswerStatus = int(_arg1.target.data["WSANSWERSTATUS"]); this.userWsAnswerStatusKS3 = int(_arg1.target.data["WSANSWERSTATUSKS3"]); this.renewalDate = string(_arg1.target.data["RENEWALDATE"]); this.loginTimeStamp = _arg1.target.data["TIMESTAMP"]; this.KS3MenuStatus = int(_arg1.target.data["KS3MENUSTATUS"]); this.GCSEMenuStatus = int(_arg1.target.data["GCSEMENUSTATUS"]); if (this.KS3MenuStatus == 0){ this.KS3MenuAllowed = "BOTH"; } else { if (this.KS3MenuStatus == 1){ this.KS3MenuAllowed = "NEW"; } else { if (this.KS3MenuStatus == 2){ this.KS3MenuAllowed = "OLD"; }; }; }; if (this.GCSEMenuStatus == 1){ this.GCSEDefaultMenu = "NEW"; } else { if (this.GCSEMenuStatus == 2){ this.GCSEDefaultMenu = "OLD"; }; }; if (this.renewalDate.length == 6){ _local5 = (int(this.renewalDate.substr(4, 2)) + 2000); _local6 = (int(this.renewalDate.substr(2, 2)) - 1); _local7 = int(this.renewalDate.substr(0, 2)); _local8 = (((1000 * 60) * 60) * 24); _local9 = new date(_local5, _local6, _local7); _local10 = new date(); this.daysRemaining = int(((_local9.gettime() - _local10.gettime()) / _local8)); } else { this.daysRemaining = -1; }; if ((((this.userType == "A")) || ((this.userType == "T")))){ this.GCSEDefaultMenu = "OLD"; this.numberOfUsers = int(_arg1.target.data["PUPILCOUNT"]); this.noUsersTxt.text = ((string(this.numberOfUsers) + " ") + "pupils"); }; this.csvString = _arg1.target.data["CSVSTRING"]; this.csvArray = this.csvString.split("~~~~"); if ((((this.externalSWF.name == "GCSE")) && ((this.userGCSELicence == 1)))){ this.externalSWF.MODE = "FULL"; } else { if ((((this.externalSWF.name == "GCSEResources")) && ((this.userGCSELicence == 1)))){ this.externalSWF.MODE = "FULL"; } else { if ((((this.externalSWF.name == "GCSE2015Resources")) && ((this.userGCSELicence == 1)))){ this.externalSWF.MODE = "FULL"; } else { if ((((this.externalSWF.name == "GCSENEW")) && ((this.userGCSELicence == 1)))){ this.externalSWF.MODE = "FULL"; } else { if ((((this.externalSWF.name.substr(0, 3) == "KS3")) && ((this.userKS3Licence == 1)))){ this.externalSWF.MODE = "FULL"; } else { if ((((this.externalSWF.name == "PRIMARY")) && ((this.userPRIMARYLicence == 1)))){ this.externalSWF.MODE = "FULL"; } else { if ((((this.externalSWF.name == "ALEVEL")) && ((this.userASLicence == 1)))){ this.externalSWF.MODE = "FULL"; } else { this.externalSWF.MODE = "DEMO"; }; }; }; }; }; }; }; if (this.userType == "A"){ this.setForStaff(); if (this.menuToLoad != "ALEVEL"){ this.historyBtn.visible = true; this.popularBtn.visible = true; this.historyBtn.addEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.addEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = true; } else { this.historyBtn.visible = false; this.popularBtn.visible = false; this.historyBtn.removeEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.removeEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = false; }; this.externalSWF.worksheetAnswersAvailable = true; this.importUsersBtn.visible = true; this.importUsersBtn.addEventListener(MouseEvent.CLICK, this.gotoImporter); this.importUsersBtn.addEventListener(MouseEvent.MOUSE_OVER, this.showImportInfo); this.exportUsersBtn.visible = true; this.exportUsersBtn.addEventListener(MouseEvent.CLICK, this.startExport); this.exportUsersBtn.addEventListener(MouseEvent.MOUSE_OVER, this.showExportInfo); this.manageUserInfoTxt.visible = true; if ((((((this.externalSWF.name == "GCSE")) || ((this.externalSWF.name == "GCSENEW")))) && ((this.userGCSELicence == 1)))){ this.settingsBtn.visible = true; this.settingsBtn.addEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = true; this.intructionsBookBtn.addEventListener(MouseEvent.CLICK, this.showInstructions); this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); } else { if ((((this.externalSWF.name == "KS3")) && ((this.userKS3Licence == 1)))){ this.settingsBtn.visible = true; this.settingsBtn.addEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = true; this.intructionsBookBtn.addEventListener(MouseEvent.CLICK, this.showInstructions); this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); } else { if ((((this.externalSWF.name == "ALEVEL")) && ((this.userASLicence == 1)))){ this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = false; this.intructionsBookBtn.removeEventListener(MouseEvent.CLICK, this.showInstructions); if (this.centreID == "demo"){ this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); } else { this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); }; } else { this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = false; this.intructionsBookBtn.removeEventListener(MouseEvent.CLICK, this.showInstructions); this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); }; }; }; this.teacherBtn.visible = true; this.teacherBtn.addEventListener(MouseEvent.CLICK, this.showTeacherManager); } else { if (this.userType == "T"){ this.setForStaff(); if (this.menuToLoad != "ALEVEL"){ this.historyBtn.visible = true; this.popularBtn.visible = true; this.historyBtn.addEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.addEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = true; } else { this.historyBtn.visible = false; this.popularBtn.visible = false; this.historyBtn.removeEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.removeEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = false; }; this.externalSWF.worksheetAnswersAvailable = true; this.importUsersBtn.visible = false; this.importUsersBtn.removeEventListener(MouseEvent.CLICK, this.gotoImporter); this.importUsersBtn.removeEventListener(MouseEvent.MOUSE_OVER, this.showImportInfo); this.exportUsersBtn.visible = true; this.exportUsersBtn.addEventListener(MouseEvent.CLICK, this.startExport); this.exportUsersBtn.addEventListener(MouseEvent.MOUSE_OVER, this.showExportInfo); this.manageUserInfoTxt.visible = false; if ((((((this.externalSWF.name == "GCSE")) || ((this.externalSWF.name == "GCSENEW")))) && ((this.userGCSELicence == 1)))){ this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = true; this.settingsBtn.addEventListener(MouseEvent.CLICK, this.showsettings); } else { if ((((this.externalSWF.name == "KS3")) && ((this.userKS3Licence == 1)))){ this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = true; this.settingsBtn.addEventListener(MouseEvent.CLICK, this.showsettings); } else { if ((((this.externalSWF.name == "ALEVEL")) && ((this.userASLicence == 1)))){ if (this.centreID == "demo"){ this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); } else { this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); }; this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); } else { this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); }; }; }; this.intructionsBookBtn.visible = true; this.intructionsBookBtn.addEventListener(MouseEvent.CLICK, this.showInstructions); this.teacherBtn.visible = false; this.teacherBtn.removeEventListener(MouseEvent.CLICK, this.showTeacherManager); } else { if ((((((((this.externalSWF.name == "GCSE")) || ((this.externalSWF.name == "GCSENEW")))) || ((this.externalSWF.name == "GCSEResources")))) || ((this.externalSWF.name == "GCSE2015Resources")))){ if ((((this.externalSWF.name == "GCSE")) || ((this.externalSWF.name == "GCSENEW")))){ this.historyBtn.visible = true; this.popularBtn.visible = true; this.historyBtn.addEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.addEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = true; }; if ((((this.externalSWF.name == "GCSE")) || ((this.externalSWF.name == "GCSENEW")))){ this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); } else { this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); }; if (this.userWsAnswerStatus == 0){ this.externalSWF.worksheetAnswersAvailable = true; } else { this.externalSWF.worksheetAnswersAvailable = false; }; if ((((this.GCSEDefaultMenu == "OLD")) && (!((this.externalSWF.name == "GCSE"))))){ if (this.userGCSELicence == 1){ this.menuMode = "FULL"; } else { this.menuMode = "DEMO"; }; this.menuToLoad = "GCSE"; this.loadMenu(); } else { if ((((this.GCSEDefaultMenu == "NEW")) && (!((this.externalSWF.name == "GCSENEW"))))){ if (this.userGCSELicence == 1){ this.menuMode = "FULL"; } else { this.menuMode = "DEMO"; }; this.menuToLoad = "GCSENEW"; this.loadMenu(); }; }; }; if (this.externalSWF.name == "KS3"){ this.historyBtn.visible = true; this.popularBtn.visible = true; this.searchBox.visible = true; this.historyBtn.addEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.addEventListener(MouseEvent.CLICK, this.showMostPopular); this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); if (this.userWsAnswerStatusKS3 == 0){ this.externalSWF.worksheetAnswersAvailable = true; } else { this.externalSWF.worksheetAnswersAvailable = false; }; }; if (this.externalSWF.name == "ALEVEL"){ this.historyBtn.visible = false; this.popularBtn.visible = false; this.searchBox.visible = false; this.historyBtn.removeEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.removeEventListener(MouseEvent.CLICK, this.showMostPopular); this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.externalSWF.worksheetAnswersAvailable = false; }; if (this.externalSWF.name == "KS3Selector"){ this.historyBtn.visible = false; this.popularBtn.visible = false; this.searchBox.visible = false; this.historyBtn.removeEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.removeEventListener(MouseEvent.CLICK, this.showMostPopular); this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.externalSWF.worksheetAnswersAvailable = false; if (this.KS3MenuAllowed == "OLD"){ this.menuToLoad = "KS3Old"; this.loadMenu(); this.historyBtn.visible = true; this.popularBtn.visible = true; this.searchBox.visible = true; this.historyBtn.addEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.addEventListener(MouseEvent.CLICK, this.showMostPopular); this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); if (this.userWsAnswerStatusKS3 == 0){ this.externalSWF.worksheetAnswersAvailable = true; } else { this.externalSWF.worksheetAnswersAvailable = false; }; } else { if (this.KS3MenuAllowed == "NEW"){ this.menuToLoad = "KS3New"; this.loadMenu(); this.historyBtn.visible = true; this.popularBtn.visible = true; this.searchBox.visible = true; this.historyBtn.addEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.addEventListener(MouseEvent.CLICK, this.showMostPopular); this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); if (this.userWsAnswerStatusKS3 == 0){ this.externalSWF.worksheetAnswersAvailable = true; } else { this.externalSWF.worksheetAnswersAvailable = false; }; }; }; }; this.setForStudents(); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = false; this.intructionsBookBtn.removeEventListener(MouseEvent.CLICK, this.showInstructions); this.teacherBtn.visible = false; this.teacherBtn.removeEventListener(MouseEvent.CLICK, this.showTeacherManager); }; }; this.centreidtxt.text = ""; this.usernametxt.text = ""; this.passwordtxt.text = ""; this.loggedInBox.ntxt.text = ((this.userFirst + " ") + this.userLast); this.loggedInBox.stxt.text = this.userSchool; this.loggedInBox.gtxt.text = this.userGroup; this.loggedInBox.ytxt.text = string(this.userYear); this.hideLoginBox(); this.externalSWF.thisUserCentreID = this.centreID; this.externalSWF.thisUserID = this.userID; this.externalSWF.thisUserName = this.userName; this.externalSWF.thisPassWord = this.password; this.externalSWF.gotoMainMenu(); this.setButtons(); this.setButtonBorders(); if (this.menuToLoad.substr(0, 3) == "KS3"){ if (this.userKS3Licence == 1){ this.menuMode = "FULL"; } else { this.menuMode = "DEMO"; }; this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = false; this.intructionsBookBtn.removeEventListener(MouseEvent.CLICK, this.showInstructions); }; if (this.menuToLoad.substr(0, 4) == "GCSE"){ if ((((this.GCSEDefaultMenu == "OLD")) && ((this.userGCSELicence == 1)))){ this.menuMode = "FULL"; this.menuToLoad = "GCSE"; this.loadMenu(); } else { if ((((this.GCSEDefaultMenu == "NEW")) && ((this.userGCSELicence == 1)))){ this.menuMode = "FULL"; this.menuToLoad = "GCSENEW"; this.loadMenu(); } else { this.loadMenu(); }; }; }; if (this.menuToLoad == "ALEVEL"){ if (this.userASLicence == 1){ this.menuMode = "FULL"; } else { this.menuMode = "DEMO"; }; this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = false; this.intructionsBookBtn.removeEventListener(MouseEvent.CLICK, this.showInstructions); if ((((this.GCSEDefaultMenu == "OLD")) && ((this.userGCSELicence == 1)))){ this.menuMode = "FULL"; this.menuToLoad = "GCSE"; this.loadMenu(); } else { if ((((this.GCSEDefaultMenu == "NEW")) && ((this.userGCSELicence == 1)))){ this.menuMode = "FULL"; this.menuToLoad = "GCSENEW"; this.loadMenu(); } else { this.loadMenu(); }; }; }; } else { this.centreidtxt.text = ""; this.usernametxt.text = ""; this.passwordtxt.text = ""; this.passwordTimer.start(); this.startbtn.visible = false; if (_local3 == 1){ this.suspendedDetailsMessage.visible = true; } else { this.incorrectDetailsMessage.visible = true; }; }; } public function showImportInfo(_arg1:MouseEvent):void{ this.manageUserInfoTxt.visible = true; this.importUsersBtn.removeEventListener(MouseEvent.MOUSE_OVER, this.showImportInfo); this.importUsersBtn.addEventListener(MouseEvent.MOUSE_OUT, this.hideInfo); this.manageUserInfoTxt.text = "Import users"; } public function showExportInfo(_arg1:MouseEvent):void{ this.manageUserInfoTxt.visible = true; this.exportUsersBtn.removeEventListener(MouseEvent.MOUSE_OVER, this.showExportInfo); this.exportUsersBtn.addEventListener(MouseEvent.MOUSE_OUT, this.hideInfo); this.manageUserInfoTxt.text = "Export users"; } public function hideInfo(_arg1:MouseEvent):void{ this.manageUserInfoTxt.visible = true; this.manageUserInfoTxt.text = ""; this.importUsersBtn.removeEventListener(MouseEvent.MOUSE_OUT, this.hideInfo); this.exportUsersBtn.removeEventListener(MouseEvent.MOUSE_OUT, this.hideInfo); this.importUsersBtn.addEventListener(MouseEvent.MOUSE_OVER, this.showImportInfo); this.exportUsersBtn.addEventListener(MouseEvent.MOUSE_OVER, this.showExportInfo); } public function setButtons():void{ if (this.userGCSELicence == 1){ this.GCSEBtn.visible = true; this.GCSEDemoBtn.visible = false; this.GCSENewBtn.visible = true; this.GCSENewDemoBtn.visible = false; this.GCSEBtn.addEventListener(MouseEvent.CLICK, this.onGCSE); this.GCSEDemoBtn.removeEventListener(MouseEvent.CLICK, this.onGCSEDemo); this.GCSENewBtn.addEventListener(MouseEvent.CLICK, this.onGCSENew); this.GCSENewDemoBtn.removeEventListener(MouseEvent.CLICK, this.onGCSENewDemo); this.bottomMidBtnBorder.visible = false; this.leftBtnBorder.visible = true; this.midBtnBorder.visible = true; this.leftBtnBorder.gotoandstop(1); this.midBtnBorder.gotoandstop(1); if ((((this.userType == "T")) || ((this.userType == "A")))){ this.GCSEResourcesBtn.visible = true; this.GCSEResourcesBtn.addEventListener(MouseEvent.CLICK, this.onGCSEResources); this.GCSE2015ResourcesBtn.visible = true; this.GCSE2015ResourcesBtn.addEventListener(MouseEvent.CLICK, this.onGCSE2015Resources); this.bottomLeftBtnBorder.visible = true; this.bottomLeftBtnBorder.gotoandstop(1); this.bottomMidBtnBorder.visible = true; this.bottomMidBtnBorder.gotoandstop(1); } else { this.GCSEResourcesBtn.visible = false; this.GCSEResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSEResources); this.GCSE2015ResourcesBtn.visible = false; this.GCSE2015ResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSE2015Resources); this.bottomLeftBtnBorder.visible = false; this.bottomLeftBtnBorder.gotoandstop(1); this.bottomMidBtnBorder.visible = false; this.bottomMidBtnBorder.gotoandstop(1); }; } else { this.GCSEBtn.visible = false; this.GCSEDemoBtn.visible = true; this.GCSENewBtn.visible = false; this.GCSENewDemoBtn.visible = true; this.GCSEBtn.removeEventListener(MouseEvent.CLICK, this.onGCSE); this.GCSEDemoBtn.addEventListener(MouseEvent.CLICK, this.onGCSEDemo); this.GCSENewBtn.removeEventListener(MouseEvent.CLICK, this.onGCSENew); this.GCSENewDemoBtn.addEventListener(MouseEvent.CLICK, this.onGCSENewDemo); this.bottomMidBtnBorder.visible = false; this.leftBtnBorder.visible = true; this.midBtnBorder.visible = true; this.leftBtnBorder.gotoandstop(1); this.midBtnBorder.gotoandstop(1); this.bottomMidBtnBorder.gotoandstop(1); if ((((this.userType == "T")) || ((this.userType == "A")))){ this.GCSEResourcesBtn.visible = false; this.GCSEResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSEResources); this.GCSE2015ResourcesBtn.visible = false; this.GCSE2015ResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSEResources); this.bottomLeftBtnBorder.visible = false; this.bottomLeftBtnBorder.gotoandstop(1); this.bottomMidBtnBorder.visible = true; this.bottomMidBtnBorder.gotoandstop(1); } else { this.GCSEResourcesBtn.visible = false; this.GCSEResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSEResources); this.GCSE2015ResourcesBtn.visible = false; this.GCSE2015ResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSE2015Resources); this.bottomLeftBtnBorder.visible = false; this.bottomLeftBtnBorder.gotoandstop(1); this.bottomMidBtnBorder.visible = false; this.bottomMidBtnBorder.gotoandstop(1); }; }; if (this.userKS3Licence == 1){ if ((((this.userType == "T")) || ((this.userType == "A")))){ this.KS3Btn.visible = true; this.KS3DemoBtn.visible = false; this.KS3TeacherBtn.visible = false; this.KS3TeacherDemoBtn.visible = false; this.KS3TeacherBtn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.KS3DemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3TeacherDemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3Btn.addEventListener(MouseEvent.CLICK, this.onKS3); this.rightBtnBorder.visible = true; this.rightBtnBorder.gotoandstop(1); } else { this.KS3Btn.visible = true; this.KS3DemoBtn.visible = false; this.KS3TeacherBtn.visible = false; this.KS3TeacherDemoBtn.visible = false; this.KS3TeacherDemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.KS3DemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3TeacherDemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3Btn.addEventListener(MouseEvent.CLICK, this.onKS3); this.rightBtnBorder.visible = true; this.rightBtnBorder.gotoandstop(1); }; } else { if ((((this.userType == "T")) || ((this.userType == "A")))){ this.KS3Btn.visible = false; this.KS3DemoBtn.visible = true; this.KS3TeacherBtn.visible = false; this.KS3TeacherDemoBtn.visible = false; this.KS3TeacherBtn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.KS3DemoBtn.addEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3TeacherDemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3Btn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.rightBtnBorder.visible = true; this.rightBtnBorder.gotoandstop(1); } else { this.KS3Btn.visible = false; this.KS3DemoBtn.visible = true; this.KS3TeacherBtn.visible = false; this.KS3TeacherDemoBtn.visible = false; this.KS3TeacherDemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.KS3DemoBtn.addEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3TeacherDemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3Btn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.rightBtnBorder.visible = true; this.rightBtnBorder.gotoandstop(1); }; }; if (this.userASLicence == 1){ this.ALevelBtn.addEventListener(MouseEvent.CLICK, this.onALevel); this.ALevelBtn.visible = true; this.ALevelDemoBtn.removeEventListener(MouseEvent.CLICK, this.onALevelTaster); this.ALevelDemoBtn.visible = false; this.bottomRightBtnBorder.visible = true; this.bottomRightBtnBorder.gotoandstop(1); } else { this.ALevelBtn.removeEventListener(MouseEvent.CLICK, this.onALevel); this.ALevelBtn.visible = false; this.ALevelDemoBtn.addEventListener(MouseEvent.CLICK, this.onALevelTaster); this.ALevelDemoBtn.visible = true; this.bottomRightBtnBorder.visible = true; this.bottomRightBtnBorder.gotoandstop(1); }; } public function setButtonBorders():void{ this.leftBtnBorder.gotoandstop(1); this.rightBtnBorder.gotoandstop(1); this.midBtnBorder.gotoandstop(1); this.bottomLeftBtnBorder.gotoandstop(1); this.bottomRightBtnBorder.gotoandstop(1); this.bottomMidBtnBorder.gotoandstop(1); if (this.externalSWF.name == "GCSE"){ this.leftBtnBorder.gotoandstop(2); } else { if (this.externalSWF.name == "GCSEResources"){ this.bottomLeftBtnBorder.gotoandstop(2); } else { if (this.externalSWF.name == "GCSE2015Resources"){ this.bottomMidBtnBorder.gotoandstop(2); } else { if (this.externalSWF.name == "GCSENEW"){ this.midBtnBorder.gotoandstop(2); } else { if (this.externalSWF.name == "KS3"){ this.rightBtnBorder.gotoandstop(2); } else { if (this.externalSWF.name == "KS3Selector"){ this.rightBtnBorder.gotoandstop(2); } else { if (this.externalSWF.name == "ALEVEL"){ this.bottomRightBtnBorder.gotoandstop(2); }; }; }; }; }; }; }; } public function continuegame(_arg1:MouseEvent):void{ this.centreID = this.centreidtxt.text; this.userName = this.usernametxt.text; this.password = this.passwordtxt.text; if (((((!((this.centreID == ""))) && (!((this.userName == ""))))) && (!((this.password == ""))))){ this.incorrectDetailsMessage.visible = false; this.suspendedDetailsMessage.visible = false; this.loadMysql(); this.startbtn.visible = false; this.miniLoader.visible = true; this.miniLoader.play(); } else { this.incorrectDetailsMessage.visible = true; this.suspendedDetailsMessage.visible = false; this.passwordTimer.start(); }; } public function onkeyup(_arg1:KeyboardEvent):void{ if ((((this.searchBox.visible == false)) && ((this.loginBackground.visible == true)))){ if ((((((((_arg1.keyCode == 13)) && (!((this.centreidtxt.text == ""))))) && (!((this.usernametxt.text == ""))))) && (!((this.passwordtxt.text == ""))))){ this.centreID = this.centreidtxt.text; this.userName = this.usernametxt.text; this.password = this.passwordtxt.text; this.incorrectDetailsMessage.visible = false; this.suspendedDetailsMessage.visible = false; this.loadMysql(); this.startbtn.visible = false; this.miniLoader.visible = true; this.miniLoader.play(); } else { if ((((((((((_arg1.keyCode == 9)) && ((this.startbtn.visible == true)))) && (!((stage.focus == this.passwordtxt))))) && (!((stage.focus == this.usernametxt))))) && (!((stage.focus == this.centreidtxt))))){ stage.focus = this.startbtn; }; }; if (_arg1.keyCode == 9){ this.updateTextFields(); }; } else { if ((((_arg1.keyCode == 13)) && ((this.searchBox.visible == true)))){ this.doSearch(); }; }; } public function openMenu():void{ this.OPENREQ = new URLRequest("mathswatch.php"); var _local1:URLVariables = new URLVariables(); _local1.USERID = this.userID; _local1.CENTRE = this.centreidtxt.text; _local1.USERNAME = this.usernametxt.text; _local1.password = this.passwordtxt.text; this.OPENREQ.method = URLRequestMethod.POST; this.OPENREQ.data = _local1; navigateToURL(this.OPENREQ, "_blank"); this.centreidtxt.text = ""; this.usernametxt.text = ""; this.passwordtxt.text = ""; this.startbtn.visible = true; } public function loadMenu():void{ var _local1:URLRequest; this.hideButtons(); this.showLoader(); removeChild(this.MenuHolder); this.MenuHolder = null; this.MenuHolder = new Sprite(); this.MenuHolder.x = 415; this.MenuHolder.y = 15; addChild(this.MenuHolder); this.loader = new Loader(); if (this.menuToLoad == "GCSE"){ _local1 = new URLRequest("mathswatchGCSEV5.swf"); } else { if (this.menuToLoad == "GCSENEW"){ _local1 = new URLRequest("mathswatchGCSEV8New.swf"); } else { if (this.menuToLoad == "KS3New"){ if ((((this.userType == "A")) || ((this.userType == "T")))){ _local1 = new URLRequest("mathswatchKS3V6-1.swf"); } else { _local1 = new URLRequest("mathswatchKS3V6-1.swf"); }; } else { if (this.menuToLoad == "KS3Old"){ if ((((this.userType == "A")) || ((this.userType == "T")))){ _local1 = new URLRequest("mathswatchKS3TeacherV6.swf"); } else { _local1 = new URLRequest("mathswatchKS3V5.swf"); }; } else { if (this.menuToLoad == "KS3Selector"){ _local1 = new URLRequest("mathswatchKS3Selector.swf"); } else { if (this.menuToLoad == "GCSEResources"){ _local1 = new URLRequest("mathswatchGCSEResources.swf"); } else { if (this.menuToLoad == "GCSE2015Resources"){ _local1 = new URLRequest("mathswatchGCSE2015Resources.swf"); } else { if (this.menuToLoad == "ALEVEL"){ _local1 = new URLRequest("mathswatchALevelV5.swf"); } else { if (this.menuToLoad == "mathswatchGCSEStatsPanel"){ _local1 = new URLRequest("mathswatchGCSEStatsPanel.swf"); } else { if (this.menuToLoad == "mathswatchGCSE2015StatsPanel"){ _local1 = new URLRequest("mathswatchGCSE2015StatsPanel.swf"); }; }; }; }; }; }; }; }; }; }; this.loader = new Loader(); this.loader.contentLoaderInfo.addEventListener(Event.INIT, this.MInitialised); this.loader.load(_local1); } public function MInitialised(_arg1:Event):void{ if (((this.firstTimeLoad) || ((this.loggedIn == false)))){ this.showLoginBox(); this.firstTimeLoad = false; } else { if (this.loggedIn){ this.hideLoginBox(); }; }; this.loader.contentLoaderInfo.removeEventListener(Event.INIT, this.MInitialised); this.externalSWF = movieclip(this.loader.contentLoaderInfo.content); this.MenuHolder.addChild(this.externalSWF); this.externalSWF.thisUserCentreID = this.centreID; this.externalSWF.thisUserID = this.userID; this.externalSWF.thisUserName = this.userName; this.externalSWF.thisPassWord = this.password; if ((((this.userType == "A")) || ((this.userType == "T")))){ this.externalSWF.worksheetAnswersAvailable = true; } else { if ((((((((this.externalSWF.name == "GCSE")) || ((this.externalSWF.name == "GCSENEW")))) || ((this.externalSWF.name == "GCSEResources")))) || ((this.externalSWF.name == "GCSE2015Resources")))){ if (this.userWsAnswerStatus == 0){ this.externalSWF.worksheetAnswersAvailable = true; } else { this.externalSWF.worksheetAnswersAvailable = false; }; } else { if (this.externalSWF.name.substr(0, 3) == "KS3"){ if (this.userWsAnswerStatusKS3 == 0){ this.externalSWF.worksheetAnswersAvailable = true; } else { this.externalSWF.worksheetAnswersAvailable = false; }; } else { if (this.externalSWF.name == "ALEVEL"){ this.externalSWF.worksheetAnswersAvailable = false; }; }; }; }; if (this.userType == "A"){ this.setForStaff(); if (this.externalSWF.name != "ALEVEL"){ this.settingsBtn.visible = true; this.settingsBtn.addEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = true; this.intructionsBookBtn.addEventListener(MouseEvent.CLICK, this.showInstructions); }; if (((!((this.externalSWF.name == "ALEVEL"))) && (!((this.externalSWF.name == "KS3Selector"))))){ this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); }; if (this.externalSWF.name == "ALEVEL"){ if (this.centreID == "demo"){ this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); } else { this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); }; }; }; if (this.userType == "T"){ this.setForStaff(); if (this.externalSWF.name != "ALEVEL"){ this.settingsBtn.visible = true; this.settingsBtn.addEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = true; this.intructionsBookBtn.addEventListener(MouseEvent.CLICK, this.showInstructions); }; if (((!((this.externalSWF.name == "ALEVEL"))) && (!((this.externalSWF.name == "KS3Selector"))))){ this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); }; if (this.externalSWF.name == "ALEVEL"){ if (this.centreID == "demo"){ this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); } else { this.statBtn.visible = true; this.statBtn.addEventListener(MouseEvent.CLICK, this.gotoStats); }; }; }; if ((((this.userType == "P")) && ((this.loggedIn == true)))){ if ((((this.externalSWF.name == "GCSE")) || ((this.externalSWF.name == "GCSENEW")))){ this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); } else { this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); }; this.setForStudents(); }; if (this.menuMode != "DEMO"){ if (this.externalSWF.name != "ALEVEL"){ this.historyBtn.visible = true; this.popularBtn.visible = true; this.historyBtn.addEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.addEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = true; }; } else { this.historyBtn.visible = false; this.popularBtn.visible = false; this.historyBtn.removeEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.removeEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = false; }; this.externalSWF.loadClipData(); this.externalSWF.MODE = this.menuMode; this.externalSWF.gotoMainMenu(); this.hideLoader(); if ((((this.menuMode == "DEMO")) && ((this.logoutBtn.visible == false)))){ this.GCSEDemoBtn.visible = true; this.GCSEDemoBtn.addEventListener(MouseEvent.CLICK, this.onGCSEDemo); this.GCSENewDemoBtn.visible = true; this.GCSENewDemoBtn.addEventListener(MouseEvent.CLICK, this.onGCSENewDemo); this.KS3DemoBtn.visible = true; this.KS3DemoBtn.addEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3TeacherDemoBtn.addEventListener(MouseEvent.CLICK, this.onKS3Demo); this.ALevelDemoBtn.addEventListener(MouseEvent.CLICK, this.onALevelTaster); this.ALevelDemoBtn.visible = true; this.ALevelBtn.removeEventListener(MouseEvent.CLICK, this.onALevelTaster); this.ALevelBtn.visible = false; this.bottomMidBtnBorder.visible = false; this.leftBtnBorder.visible = true; this.midBtnBorder.visible = true; this.rightBtnBorder.visible = true; this.bottomLeftBtnBorder.visible = false; this.bottomRightBtnBorder.visible = true; this.setButtonBorders(); } else { this.setButtons(); this.setButtonBorders(); }; this.centreidtxt.tabindex = 1000; this.usernametxt.tabindex = 1001; this.passwordtxt.tabindex = 1002; this.startbtn.tabindex = 1003; if (!this.loggedIn){ this.daystxt.visible = false; }; } public function showLoader():void{ this.loading.play(); this.loading.visible = true; movieclip(root).setChildIndex(this.loading, (movieclip(root).numChildren - 1)); } public function hideLoader():void{ this.loading.stop(); this.loading.visible = false; movieclip(root).setChildIndex(this.loading, 0); } public function hideLoginBox():void{ this.loginBackground.visible = false; this.centreidtxt.visible = false; this.usernametxt.visible = false; this.passwordtxt.visible = false; this.startbtn.visible = false; this.centretxt.visible = false; this.teamtxt.visible = false; this.texttxt.visible = false; this.infoText.visible = false; this.loggedInBox.visible = true; this.logoutBtn.visible = true; this.logoutBtn.addEventListener(MouseEvent.CLICK, this.logout); } public function showLoginBox():void{ this.loginBackground.visible = true; this.centreidtxt.visible = true; this.usernametxt.visible = true; this.passwordtxt.visible = true; this.startbtn.visible = true; this.centretxt.visible = true; this.daystxt.visible = false; this.teamtxt.visible = true; this.texttxt.visible = true; this.infoText.visible = true; this.loggedInBox.visible = false; this.logoutBtn.visible = false; this.logoutBtn.removeEventListener(MouseEvent.CLICK, this.logout); this.updateTextFields(); } public function logout(_arg1:MouseEvent):void{ this.loggedIn = false; this.historyBtn.visible = false; this.popularBtn.visible = false; this.historyBtn.removeEventListener(MouseEvent.CLICK, this.showHistory); this.popularBtn.removeEventListener(MouseEvent.CLICK, this.showMostPopular); this.searchBox.visible = false; this.manageUserInfoTxt.visible = false; this.noUsersTxt.text = ""; this.externalSWF.MODE = "DEMO"; this.importUsersBtn.visible = false; this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.intructionsBookBtn.visible = false; this.intructionsBookBtn.removeEventListener(MouseEvent.CLICK, this.showInstructions); this.importUsersBtn.removeEventListener(MouseEvent.CLICK, this.gotoImporter); this.importUsersBtn.removeEventListener(MouseEvent.MOUSE_OVER, this.showImportInfo); this.exportUsersBtn.visible = false; this.exportUsersBtn.removeEventListener(MouseEvent.CLICK, this.startExport); this.exportUsersBtn.removeEventListener(MouseEvent.MOUSE_OVER, this.showExportInfo); this.teacherBtn.visible = false; this.teacherBtn.removeEventListener(MouseEvent.CLICK, this.showTeacherManager); this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.externalSWF.gotoMainMenu(); this.showLoginBox(); this.GCSEBtn.visible = false; this.GCSENewBtn.visible = false; this.GCSEResourcesBtn.visible = false; this.GCSE2015ResourcesBtn.visible = false; this.bottomLeftBtnBorder.visible = false; this.KS3Btn.visible = false; this.KS3TeacherBtn.visible = false; this.GCSEDemoBtn.visible = true; this.GCSENewDemoBtn.visible = true; this.bottomMidBtnBorder.visible = false; this.KS3DemoBtn.visible = true; this.KS3TeacherDemoBtn.visible = false; (this.userGCSELicence == 0); (this.userKS3Licence == 0); (this.userPRIMARYLicence == 0); this.GCSEBtn.removeEventListener(MouseEvent.CLICK, this.onGCSE); this.GCSENewBtn.removeEventListener(MouseEvent.CLICK, this.onGCSENew); this.GCSEResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSEResources); this.GCSE2015ResourcesBtn.removeEventListener(MouseEvent.CLICK, this.onGCSE2015Resources); this.KS3Btn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.KS3TeacherBtn.removeEventListener(MouseEvent.CLICK, this.onKS3); this.GCSEDemoBtn.addEventListener(MouseEvent.CLICK, this.onGCSEDemo); this.GCSENewDemoBtn.addEventListener(MouseEvent.CLICK, this.onGCSENewDemo); this.ALevelDemoBtn.addEventListener(MouseEvent.CLICK, this.onALevelTaster); this.ALevelDemoBtn.visible = true; this.ALevelBtn.removeEventListener(MouseEvent.CLICK, this.onALevelTaster); this.ALevelBtn.visible = false; this.KS3DemoBtn.addEventListener(MouseEvent.CLICK, this.onKS3Demo); this.KS3TeacherDemoBtn.removeEventListener(MouseEvent.CLICK, this.onKS3Demo); this.userType = "P"; this.daystxt.text = ""; this.daystxt.visible = false; this.KS3MenuAllowed = "BOTH"; if ((((this.menuToLoad == "GCSEResources")) || ((this.menuToLoad == "GCSE2015Resources")))){ this.menuMode = "DEMO"; this.menuToLoad = "GCSE"; this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.loadMenu(); } else { if (this.menuToLoad.substr(0, 3) == "KS3"){ this.menuMode = "DEMO"; if (this.KS3MenuAllowed == "BOTH"){ this.menuToLoad = "KS3Selector"; } else { if (this.KS3MenuAllowed == "OLD"){ this.menuToLoad = "KS3Old"; } else { if (this.KS3MenuAllowed == "New"){ this.menuToLoad = "KS3New"; }; }; }; this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.loadMenu(); } else { if (this.menuToLoad == "mathswatchGCSEStatsPanel"){ this.menuToLoad = "GCSE"; this.menuMode = "DEMO"; this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.loadMenu(); } else { if (this.menuToLoad == "mathswatchGCSE2015StatsPanel"){ this.menuToLoad = "GCSENEW"; this.menuMode = "DEMO"; this.statBtn.visible = false; this.statBtn.removeEventListener(MouseEvent.CLICK, this.gotoStats); this.settingsBtn.visible = false; this.settingsBtn.removeEventListener(MouseEvent.CLICK, this.showsettings); this.loadMenu(); }; }; }; }; } public function gotoImporter(_arg1:MouseEvent):void{ movieclip(root).setChildIndex(this.pupilImporter, (movieclip(root).numChildren - 1)); this.pupilImporter.visible = true; } public function gotoStats(_arg1:MouseEvent):void{ var _local2:URLVariables; if ((((this.userType == "A")) || ((this.userType == "T")))){ if ((((this.menuToLoad == "GCSE")) || ((this.menuToLoad == "GCSEResources")))){ this.statsREQ = new URLRequest("mwStatistics.php"); } else { if ((((this.menuToLoad == "GCSENEW")) || ((this.menuToLoad == "GCSE2015Resources")))){ this.statsREQ = new URLRequest("mwStatisticsGCSE.php"); } else { if (this.menuToLoad == "ALEVEL"){ this.statsREQ = new URLRequest("mwStatisticsALEVEL.php"); } else { if (this.menuToLoad.substr(0, 3) == "KS3"){ if (this.centreID == "demo"){ if (this.menuToLoad == "KS3New"){ this.statsREQ = new URLRequest("mwStatisticsKeyStage3.php"); } else { this.statsREQ = new URLRequest("mwStatisticsKS3.php"); }; } else { if (this.menuToLoad == "KS3New"){ this.statsREQ = new URLRequest("mwStatisticsKeyStage3.php"); } else { this.statsREQ = new URLRequest("mwStatisticsKS3.php"); }; }; }; }; }; }; _local2 = new URLVariables(); _local2.CENTRE = this.centreID; _local2.USER = this.userName; _local2.PASS = this.password; _local2.type = this.userType; _local2.SCHOOL = this.userSchool; _local2.MENUTYPE = this.externalSWF.name; this.statsREQ.method = URLRequestMethod.POST; this.statsREQ.data = _local2; navigateToURL(this.statsREQ, "_blank"); } else { if (this.userType == "P"){ if (this.externalSWF.name == "GCSE"){ this.menuToLoad = "mathswatchGCSEStatsPanel"; } else { this.menuToLoad = "mathswatchGCSE2015StatsPanel"; }; this.loadMenu(); }; }; } public function showsettings(_arg1:MouseEvent):void{ if (this.settingsMenu.visible == false){ this.settingsMenu.visible = true; this.settingsMenu.loadRows(); } else { this.settingsMenu.visible = false; }; } public function showTeacherManager(_arg1:MouseEvent):void{ if (this.teacherManager.visible == false){ this.teacherManager.visible = true; this.teacherManager.loadRows(); } else { this.teacherManager.visible = false; }; } public function startExport(_arg1:MouseEvent){ this.csvDownloadString = "First Name,LastName,Account Type,UPN,Year,Class,username,password,action\n"; var _local2:int; while (_local2 < this.csvArray.length) { if (_local2 < (this.csvArray.length - 1)){ this.csvDownloadString = ((this.csvDownloadString + string(this.csvArray[_local2].split("####"))) + "\n"); } else { this.csvDownloadString = (this.csvDownloadString + string(this.csvArray[_local2].split("####"))); }; _local2++; }; var _local3:FileReference = new FileReference(); var _local4:ByteArray = new ByteArray(); _local4.writeUTFBytes(this.csvDownloadString); var _local5:date = new date(); var _local6 = ((((((("MathsWatch_User_Details" + "-") + string(_local5.date)) + "-") + string((_local5.month + 1))) + "-") + string(_local5.fullYear)) + ".csv"); _local3.save(_local4, _local6); } public function showHistory(_arg1:MouseEvent):void{ this.externalSWF.listToShow = "RECENT"; this.externalSWF.getRecentPopularClips(); } public function showMostPopular(_arg1:MouseEvent):void{ this.externalSWF.listToShow = "POPULAR"; this.externalSWF.getRecentPopularClips(); } public function doSearch():void{ var _local1:string = this.searchBox.searchtxt.text; this.externalSWF.searchtext = _local1; this.externalSWF.getClipsFromSearch(); this.searchBox.searchtxt.text = ""; this.searchBox.updateTextFields(); } public function setForStudents():void{ if (this.statBtn.visible == false){ this.historyBtn.x = 47; this.historyBtn.y = 271; this.popularBtn.x = 98; this.popularBtn.y = 271; this.searchBox.x = 135; this.searchBox.y = 261; } else { this.historyBtn.x = 47; this.historyBtn.y = 330; this.popularBtn.x = 93; this.popularBtn.y = 330; this.searchBox.x = 130; this.searchBox.y = 320; }; this.logoutBtn.x = 330; this.daystxt.visible = true; if (this.daysRemaining >= 0){ this.daystxt.text = (string(this.daysRemaining) + " days remaining"); this.logoutBtn.y = 67; if (this.daysRemaining <= 30){ this.daystxt.textcolor = 0xFF0000; } else { this.daystxt.textcolor = 0xFF00; }; } else { this.daystxt.text = ""; this.daystxt.visible = true; this.logoutBtn.y = 77; }; } public function setForStaff():void{ this.historyBtn.x = 47; this.historyBtn.y = 330; this.popularBtn.x = 93; this.popularBtn.y = 330; this.searchBox.x = 130; this.searchBox.y = 320; this.logoutBtn.x = 330; this.daystxt.visible = true; if (this.daysRemaining >= 0){ this.daystxt.text = (string(this.daysRemaining) + " days remaining"); this.logoutBtn.y = 67; if (this.daysRemaining <= 30){ this.daystxt.textcolor = 0xFF0000; } else { this.daystxt.textcolor = 0xFF00; }; } else { this.daystxt.text = "TIME TO RENEW"; this.daystxt.textcolor = 0xFF0000; this.daystxt.visible = true; this.logoutBtn.y = 67; }; } public function getButtonData():void{ this.BTNREQ.method = URLRequestMethod.POST; this.btnLoader = new URLLoader(); this.btnLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.btnLoader.addEventListener(Event.COMPLETE, this.btnLoadCompleteHandler); this.btnLoader.load(this.BTNREQ); } public function btnLoadCompleteHandler(_arg1:Event):void{ this.btnLoader.removeEventListener(Event.COMPLETE, this.btnLoadCompleteHandler); this.mainText.text = string(_arg1.target.data.MAINTEXT); this.buttonOne.txt.text = string(_arg1.target.data.BUTTONONETEXT); this.buttonTwo.txt.text = string(_arg1.target.data.BUTTONTWOTEXT); this.buttonOne.linkFile = string(_arg1.target.data.BUTTONONEFILE); this.buttonTwo.linkFile = string(_arg1.target.data.BUTTONTWOFILE); if (int(_arg1.target.data.status) == 1){ this.mainText.visible = true; this.buttonOne.visible = true; this.buttonTwo.visible = true; } else { this.mainText.visible = false; this.buttonOne.visible = false; this.buttonTwo.visible = false; }; if (int(_arg1.target.data.youTubeStatus) == 1){ this.youTubeTxt.visible = true; this.youTubeLink.visible = true; } else { this.youTubeTxt.visible = false; this.youTubeLink.visible = false; }; if (int(_arg1.target.data.messageStatus) == 1){ this.messageTxt.visible = true; this.messageTxt.text = _arg1.target.data.message; } else { this.messageTxt.visible = false; this.messageTxt.text = ""; }; if (int(_arg1.target.data.message2Status) == 1){ this.message2Txt.visible = true; this.message2Txt.text = _arg1.target.data.MESS2AGE; } else { this.message2Txt.visible = false; this.message2Txt.text = ""; }; } public function showInstructions(_arg1:MouseEvent):void{ var _local2:URLRequest; if (this.userType == "A"){ _local2 = new URLRequest("docs/MathsWatch_VLE_Instructions_for_Admin.pdf"); navigateToURL(_local2, "_blank"); } else { if (this.userType == "T"){ _local2 = new URLRequest("docs/MathsWatch_VLE_Instructions_for_Teachers.pdf"); navigateToURL(_local2, "_blank"); }; }; } function frame1(){ stop(); focusRect = false; this.searchBox.visible = false; this.daystxt.visible = false; this.pupilImporter.visible = false; this.importUsersBtn.visible = false; this.exportUsersBtn.visible = false; this.statBtn.visible = false; this.loading.visible = false; this.loggedInBox.visible = false; this.logoutBtn.visible = false; this.settingsBtn.visible = false; this.settingsMenu.visible = false; this.intructionsBookBtn.visible = false; this.leftBtnBorder.visible = false; this.midBtnBorder.visible = false; this.rightBtnBorder.visible = false; this.bottomLeftBtnBorder.visible = false; this.bottomRightBtnBorder.visible = false; this.bottomMidBtnBorder.visible = false; this.GCSEBtn.visible = false; this.GCSEDemoBtn.visible = false; this.GCSENewBtn.visible = false; this.GCSENewDemoBtn.visible = false; this.GCSEResourcesBtn.visible = false; this.GCSEResourcesDemoBTN.visible = false; this.KS3Btn.visible = false; this.KS3DemoBtn.visible = false; this.KS3TeacherBtn.visible = false; this.KS3TeacherDemoBtn.visible = false; this.GCSE2015ResourcesBtn.visible = false; this.GCSE2015ResourcesDemoBtn.visible = false; this.ALevelBtn.visible = false; this.ALevelDemoBtn.visible = false; this.miniLoader.visible = false; this.incorrectDetailsMessage.visible = false; this.suspendedDetailsMessage.visible = false; this.manageUserInfoTxt.visible = false; this.miniLoader.stop(); this.historyBtn.visible = false; this.popularBtn.visible = false; this.teacherManager.visible = false; this.teacherBtn.visible = false; this.mainText.visible = false; this.buttonOne.visible = false; this.buttonTwo.visible = false; this.youTubeTxt.visible = false; this.messageTxt.visible = false; this.youTubeLink.visible = false; this.myLoader = new URLLoader(); this.settingsLoader = new URLLoader(); this.menuMode = "DEMO"; this.KS3MenuAllowed = "BOTH"; this.GCSEDefaultMenu = "OLD"; this.REQ = new URLRequest("passcheckV6.php"); this.menuToLoad = "GCSE"; this.MenuHolder = new Sprite(); this.MenuHolder.x = 415; this.MenuHolder.y = 15; addChild(this.MenuHolder); this.passwordtxt.displayAsPassword = true; this.passwordTimer = new Timer(50, 20); this.firstTimeLoad = true; this.loggedIn = false; this.loginBackground.visible = false; this.centreidtxt.visible = false; this.usernametxt.visible = false; this.passwordtxt.visible = false; this.startbtn.visible = false; this.centretxt.visible = false; this.teamtxt.visible = false; this.texttxt.visible = false; this.infoText.visible = false; this.loadMenu(); this.passwordTimer.addEventListener(TimerEvent.TIMER, this.passwordAlert); this.passwordTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.resetTimer); this.startbtn.addEventListener(MouseEvent.CLICK, this.continuegame); stage.addEventListener(KeyboardEvent.KEY_UP, this.onkeyup); this.centreidtxt.tabindex = 1000; this.usernametxt.tabindex = 1001; this.passwordtxt.tabindex = 1002; this.startbtn.tabindex = 1003; this.centreidtxt.addEventListener(Event.CHANGE, this.inputDetected); this.usernametxt.addEventListener(Event.CHANGE, this.inputDetected); this.passwordtxt.addEventListener(Event.CHANGE, this.inputDetected); stage.addEventListener(MouseEvent.CLICK, this.inputNeedsUpdating); this.BTNREQ = new URLRequest("getButtonData.php"); this.getButtonData(); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class uploaderClip_33 extends movieclip {   public var blocker:movieclip; public var browse_btn:SimpleButton; public var downloadSampleBtn:SimpleButton; public var fileDisplay_txt:textfield; public var instructionsBtn:SimpleButton; public var picblocker:movieclip; public var pleaseWait:movieclip; public var status_txt:textfield; public var upload_btn:SimpleButton; public var loader:URLLoader; public var URLrequest:URLRequest; public var fileTypes:FileFilter; public var allTypes:array; public var fileRef:FileReference; public var REQUEST:URLRequest; public var csvLoader:URLLoader; public var fileRefDownload:FileReference; public var downloadreq:URLRequest;   public function uploaderClip_33(){ addFrameScript(0, this.frame1); } public function browseBox(_arg1:MouseEvent):void{ this.fileRef.browse(this.allTypes); } public function uploadVars(_arg1:MouseEvent):void{ this.pleaseWait.visible = true; this.pleaseWait.play(); this.fileRef.upload(this.URLrequest); this.upload_btn.visible = false; } public function syncVariables(_arg1:Event):void{ this.fileDisplay_txt.text = ("" + this.fileRef.name); this.blocker.visible = false; this.upload_btn.visible = true; var _local2:URLVariables = new URLVariables(); _local2.todayDate = new date(); _local2.DATAPATH = (("centredata/" + movieclip(root).centreID) + "data"); this.URLrequest.method = URLRequestMethod.POST; this.URLrequest.data = _local2; } public function completeHandler(_arg1:Event):void{ this.blocker.visible = true; this.updateDatabase(); } public function progressHandler(_arg1:ProgressEvent):void{ } public function updateDatabase():void{ this.REQUEST.method = URLRequestMethod.POST; var _local1:URLVariables = new URLVariables(); _local1.Filename = ((("centredata/" + movieclip(root).centreID) + "data/") + this.fileRef.name); this.fileDisplay_txt.text = ""; _local1.submit = 1; _local1.TABLE = (movieclip(root).centreID + "st"); _local1.KS3TABLE = (movieclip(root).centreID + "ks3data"); _local1.KEYSTAGE3TABLE = (movieclip(root).centreID + "keystage3data"); _local1.ALEVELTABLE = (movieclip(root).centreID + "aleveldata"); _local1.GCSETABLE = (movieclip(root).centreID + "gcsedata"); this.REQUEST.data = _local1; this.csvLoader = new URLLoader(); this.csvLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.csvLoader.addEventListener(Event.COMPLETE, this.csvcompleteHandler); this.csvLoader.load(this.REQUEST); } public function csvcompleteHandler(_arg1:Event):void{ this.status_txt.text = "The data has been uploaded."; movieclip(root).csvString = _arg1.target.data["CSVSTRING"]; movieclip(root).csvArray = movieclip(root).csvString.split("~~~~"); if ((((movieclip(root).userType == "A")) || ((movieclip(root).userType == "T")))){ movieclip(root).numberOfUsers = int(_arg1.target.data["PUPILCOUNT"]); movieclip(root).noUsersTxt.text = ((string(movieclip(root).numberOfUsers) + " ") + "pupils"); }; this.pleaseWait.visible = false; this.pleaseWait.stop(); movieclip(root).pupilImporter.visible = false; } public function onDownload(_arg1:MouseEvent):void{ var _local2 = "sampleDatabase.csv"; this.downloadreq = new URLRequest("sampleDatabase.csv"); this.fileRefDownload.addEventListener(Event.COMPLETE, this.downloadCompleted); this.fileRefDownload.download(this.downloadreq, _local2); } public function downloadCompleted(_arg1:Event):void{ this.fileRefDownload.removeEventListener(Event.COMPLETE, this.downloadCompleted); } public function showInstructions(_arg1:MouseEvent):void{ var _local2:URLRequest; if (movieclip(root).userType == "A"){ _local2 = new URLRequest("docs/MathsWatch_VLE_Instructions_for_Admin.pdf"); navigateToURL(_local2, "_blank"); } else { if (movieclip(root).userType == "T"){ _local2 = new URLRequest("docs/MathsWatch_VLE_Instructions_for_Teachers.pdf"); navigateToURL(_local2, "_blank"); }; }; } function frame1(){ stop(); this.pleaseWait.stop(); this.pleaseWait.visible = false; this.loader = new URLLoader(); this.upload_btn.visible = false; this.URLrequest = new URLRequest("importer_script.php"); this.fileTypes = new FileFilter("Csv Files (*.csv)", "*.csv"); this.allTypes = new array(this.fileTypes); this.fileRef = new FileReference(); this.fileRef.addEventListener(Event.SELECT, this.syncVariables); this.fileRef.addEventListener(Event.COMPLETE, this.completeHandler); this.fileRef.addEventListener(ProgressEvent.PROGRESS, this.progressHandler); this.browse_btn.addEventListener(MouseEvent.CLICK, this.browseBox); this.upload_btn.addEventListener(MouseEvent.CLICK, this.uploadVars); this.REQUEST = new URLRequest("csvImportAndReturnNewData.php"); this.downloadSampleBtn.addEventListener(MouseEvent.CLICK, this.onDownload); this.fileRefDownload = new FileReference(); this.instructionsBtn.addEventListener(MouseEvent.CLICK, this.showInstructions); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.display.*;   public dynamic class favouritesBtn_42 extends movieclip {   public function favouritesBtn_42(){ addFrameScript(0, this.frame1); } function frame1(){ buttonMode = true; usehandcursor = true; }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.display.*;   public dynamic class checkBox_73 extends movieclip {   public function checkBox_73(){ addFrameScript(0, this.frame1); } function frame1(){ stop(); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import adobe.utils.*; import flash.accessibility.*; import flash.desktop.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.globalization.*; import flash.media.*; import flash.net.drm.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.sensors.*; import flash.system.*; import flash.text.ime.*; import flash.text.engine.*; import flash.ui.*; import flash.xml.*;   public dynamic class settingsMenu_45 extends movieclip {   public var closeBtn:SimpleButton; public var gcseMenuBtn:movieclip; public var ks3MenuBtn:movieclip; public var listMask:movieclip; public var pleaseWait:movieclip; public var rowHolder:movieclip; public var scrollBack:movieclip; public var scrollDownBtn:SimpleButton; public var scrollMC:movieclip; public var scrollUpBtn:SimpleButton; public var tabs_mc:movieclip; public var worksheetBtn:movieclip; public var tableShowing; public var getStatusRequest:URLRequest; public var getStatusLoader:URLLoader; public var getKS3MenuRequest:URLRequest; public var getKS3MenuLoader:URLLoader; public var getGCSEMenuRequest:URLRequest; public var getGCSEMenuLoader:URLLoader; public var numberOfGroups:int; public var groupNames:array; public var groupGCSEWorksheetStatus:array; public var groupKS3WorksheetStatus:array; public var groupKS3MenuStatus:array; public var groupGCSEMenuStatus:array; public var bounds:Rectangle; public var scrolling:boolean;   public function settingsMenu_45(){ addFrameScript(0, this.frame1); } public function onclose(_arg1:MouseEvent):void{ this.Reset(); visible = false; } public function showWorksheetTable(_arg1:MouseEvent):void{ if (this.tableShowing != "WORKSHEETS"){ this.worksheetBtn.removeEventListener(MouseEvent.CLICK, this.showWorksheetTable); this.ks3MenuBtn.removeEventListener(MouseEvent.CLICK, this.showKS3MenuTable); this.gcseMenuBtn.removeEventListener(MouseEvent.CLICK, this.showGCSEMenuTable); this.loadRows(); }; } public function showKS3MenuTable(_arg1:MouseEvent):void{ if (this.tableShowing != "KS3MENU"){ this.worksheetBtn.removeEventListener(MouseEvent.CLICK, this.showWorksheetTable); this.ks3MenuBtn.removeEventListener(MouseEvent.CLICK, this.showKS3MenuTable); this.gcseMenuBtn.removeEventListener(MouseEvent.CLICK, this.showGCSEMenuTable); this.loadKS3MenuRows(); }; } public function showGCSEMenuTable(_arg1:MouseEvent):void{ if (this.tableShowing != "GCSEMENU"){ this.worksheetBtn.removeEventListener(MouseEvent.CLICK, this.showWorksheetTable); this.ks3MenuBtn.removeEventListener(MouseEvent.CLICK, this.showKS3MenuTable); this.gcseMenuBtn.removeEventListener(MouseEvent.CLICK, this.showGCSEMenuTable); this.loadGCSEMenuRows(); }; } public function Reset():void{ this.rowHolder.y = 0; while (this.rowHolder.numChildren > 0) { this.rowHolder.removeChildAt(0); }; } public function loadRows():void{ this.tableShowing = ""; this.pleaseWait.play(); this.pleaseWait.visible = true; this.Reset(); this.getStatusRequest = new URLRequest("getWorksheetStatusForGroups.php"); this.getStatusRequest.method = URLRequestMethod.POST; var _local1:URLVariables = new URLVariables(); _local1.CENTRE = movieclip(root).centreID; this.getStatusRequest.data = _local1; this.getStatusLoader = new URLLoader(); this.getStatusLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.getStatusLoader.addEventListener(Event.COMPLETE, this.statusLoadedHandler); this.getStatusLoader.load(this.getStatusRequest); } public function statusLoadedHandler(_arg1:Event):void{ this.getStatusLoader.removeEventListener(Event.COMPLETE, this.statusLoadedHandler); this.pleaseWait.stop(); this.pleaseWait.visible = false; this.numberOfGroups = _arg1.target.data.GROUPCOUNT; this.groupNames = []; this.groupGCSEWorksheetStatus = []; this.groupKS3WorksheetStatus = []; var _local2:int; while (_local2 < this.numberOfGroups) { this.groupNames.push(_arg1.target.data[("GROUPNAME" + _local2)]); this.groupGCSEWorksheetStatus.push(int(_arg1.target.data[("GCSEStatus" + _local2)])); this.groupKS3WorksheetStatus.push(int(_arg1.target.data[("KS3Status" + _local2)])); _local2++; }; this.showList(); } public function showList():void{ var _local3:boolean; var _local4:movieclip; this.Reset(); var _local1:int; var _local2:int; while (_local2 < this.numberOfGroups) { _local3 = true; if (_local3){ _local4 = movieclip(new worksheetStatusRow()); _local4.x = 4.25; _local4.y = (80 + ((_local2 - _local1) * 20)); _local4.grouptxt.text = this.groupNames[_local2]; if (this.groupGCSEWorksheetStatus[_local2] == 0){ _local4.check1.gotoandstop(2); } else { _local4.check1.gotoandstop(1); }; if (this.groupKS3WorksheetStatus[_local2] == 0){ _local4.check2.gotoandstop(2); } else { _local4.check2.gotoandstop(1); }; this.rowHolder.addChild(_local4); _local4.addListeners(); } else { _local1 = (_local1 + 1); }; _local2++; }; if (this.rowHolder.numChildren > 18){ this.scrollMC.buttonMode = true; this.scrollMC.usehandcursor = true; this.scrollUpBtn.visible = true; this.scrollDownBtn.visible = true; this.scrollMC.visible = true; this.scrollBack.visible = true; this.scrollUpBtn.addEventListener(MouseEvent.CLICK, this.scrollUp); this.scrollDownBtn.addEventListener(MouseEvent.CLICK, this.scrollDown); this.scrollMC.addEventListener(MouseEvent.MOUSE_DOWN, this.startScroll); stage.addEventListener(MouseEvent.MOUSE_UP, this.stopScroll); addEventListener(Event.ENTER_FRAME, this.enterHandler); } else { this.scrollUpBtn.visible = false; this.scrollDownBtn.visible = false; this.scrollMC.visible = false; this.scrollBack.visible = false; this.scrollUpBtn.removeEventListener(MouseEvent.CLICK, this.scrollUp); this.scrollDownBtn.removeEventListener(MouseEvent.CLICK, this.scrollDown); this.scrollMC.removeEventListener(MouseEvent.MOUSE_DOWN, this.startScroll); stage.removeEventListener(MouseEvent.MOUSE_UP, this.stopScroll); removeEventListener(Event.ENTER_FRAME, this.enterHandler); }; this.updateAfterScroll(); this.worksheetBtn.addEventListener(MouseEvent.CLICK, this.showWorksheetTable); this.ks3MenuBtn.addEventListener(MouseEvent.CLICK, this.showKS3MenuTable); this.gcseMenuBtn.addEventListener(MouseEvent.CLICK, this.showGCSEMenuTable); this.tabs_mc.gotoandstop(1); this.tableShowing = "WORKSHEETS"; } public function loadKS3MenuRows():void{ this.tableShowing = ""; this.pleaseWait.play(); this.pleaseWait.visible = true; this.Reset(); this.getKS3MenuRequest = new URLRequest("getKS3MenuStatusForGroups.php"); this.getKS3MenuRequest.method = URLRequestMethod.POST; var _local1:URLVariables = new URLVariables(); _local1.CENTRE = movieclip(root).centreID; this.getKS3MenuRequest.data = _local1; this.getKS3MenuLoader = new URLLoader(); this.getKS3MenuLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.getKS3MenuLoader.addEventListener(Event.COMPLETE, this.ks3MenuStatusLoadedHandler); this.getKS3MenuLoader.load(this.getKS3MenuRequest); } public function ks3MenuStatusLoadedHandler(_arg1:Event):void{ this.getKS3MenuLoader.removeEventListener(Event.COMPLETE, this.ks3MenuStatusLoadedHandler); this.pleaseWait.stop(); this.pleaseWait.visible = false; this.numberOfGroups = _arg1.target.data.GROUPCOUNT; this.groupNames = []; this.groupKS3MenuStatus = []; var _local2:int; while (_local2 < this.numberOfGroups) { this.groupNames.push(_arg1.target.data[("GROUPNAME" + _local2)]); this.groupKS3MenuStatus.push(int(_arg1.target.data[("KS3MenuStatus" + _local2)])); _local2++; }; this.showKS3MenuList(); } public function showKS3MenuList():void{ var _local3:boolean; var _local4:movieclip; this.Reset(); var _local1:int; var _local2:int; while (_local2 < this.numberOfGroups) { _local3 = true; if (_local3){ _local4 = movieclip(new ks3MenuStatusRow()); _local4.x = 4.25; _local4.y = (80 + ((_local2 - _local1) * 20)); _local4.grouptxt.text = this.groupNames[_local2]; if (this.groupKS3MenuStatus[_local2] == 0){ _local4.check1.gotoandstop(2); _local4.check2.gotoandstop(2); } else { if (this.groupKS3MenuStatus[_local2] == 1){ _local4.check1.gotoandstop(1); _local4.check2.gotoandstop(2); } else { _local4.check1.gotoandstop(2); _local4.check2.gotoandstop(1); }; }; this.rowHolder.addChild(_local4); _local4.addListeners(); } else { _local1 = (_local1 + 1); }; _local2++; }; if (this.rowHolder.numChildren > 18){ this.scrollMC.buttonMode = true; this.scrollMC.usehandcursor = true; this.scrollUpBtn.visible = true; this.scrollDownBtn.visible = true; this.scrollMC.visible = true; this.scrollBack.visible = true; this.scrollUpBtn.addEventListener(MouseEvent.CLICK, this.scrollUp); this.scrollDownBtn.addEventListener(MouseEvent.CLICK, this.scrollDown); this.scrollMC.addEventListener(MouseEvent.MOUSE_DOWN, this.startScroll); stage.addEventListener(MouseEvent.MOUSE_UP, this.stopScroll); addEventListener(Event.ENTER_FRAME, this.enterHandler); } else { this.scrollUpBtn.visible = false; this.scrollDownBtn.visible = false; this.scrollMC.visible = false; this.scrollBack.visible = false; this.scrollUpBtn.removeEventListener(MouseEvent.CLICK, this.scrollUp); this.scrollDownBtn.removeEventListener(MouseEvent.CLICK, this.scrollDown); this.scrollMC.removeEventListener(MouseEvent.MOUSE_DOWN, this.startScroll); stage.removeEventListener(MouseEvent.MOUSE_UP, this.stopScroll); removeEventListener(Event.ENTER_FRAME, this.enterHandler); }; this.updateAfterScroll(); this.worksheetBtn.addEventListener(MouseEvent.CLICK, this.showWorksheetTable); this.ks3MenuBtn.addEventListener(MouseEvent.CLICK, this.showKS3MenuTable); this.gcseMenuBtn.addEventListener(MouseEvent.CLICK, this.showGCSEMenuTable); this.tabs_mc.gotoandstop(3); this.tableShowing = "KS3MENU"; } public function loadGCSEMenuRows():void{ this.tableShowing = ""; this.pleaseWait.play(); this.pleaseWait.visible = true; this.Reset(); this.getGCSEMenuRequest = new URLRequest("getGCSEMenuStatusForGroups.php"); this.getGCSEMenuRequest.method = URLRequestMethod.POST; var _local1:URLVariables = new URLVariables(); _local1.CENTRE = movieclip(root).centreID; this.getGCSEMenuRequest.data = _local1; this.getGCSEMenuLoader = new URLLoader(); this.getGCSEMenuLoader.dataFormat = URLLoaderDataFormat.VARIABLES; this.getGCSEMenuLoader.addEventListener(Event.COMPLETE, this.gcseMenuStatusLoadedHandler); this.getGCSEMenuLoader.load(this.getGCSEMenuRequest); } public function gcseMenuStatusLoadedHandler(_arg1:Event):void{ this.getGCSEMenuLoader.removeEventListener(Event.COMPLETE, this.gcseMenuStatusLoadedHandler); this.pleaseWait.stop(); this.pleaseWait.visible = false; this.numberOfGroups = _arg1.target.data.GROUPCOUNT; this.groupNames = []; this.groupGCSEMenuStatus = []; var _local2:int; while (_local2 < this.numberOfGroups) { this.groupNames.push(_arg1.target.data[("GROUPNAME" + _local2)]); this.groupGCSEMenuStatus.push(int(_arg1.target.data[("GCSEMenuStatus" + _local2)])); _local2++; }; this.showGCSEMenuList(); } public function showGCSEMenuList():void{ var _local3:boolean; var _local4:movieclip; this.Reset(); var _local1:int; var _local2:int; while (_local2 < this.numberOfGroups) { _local3 = true; if (_local3){ _local4 = movieclip(new gcseMenuStatusRow()); _local4.x = 4.25; _local4.y = (80 + ((_local2 - _local1) * 20)); _local4.grouptxt.text = this.groupNames[_local2]; if (this.groupGCSEMenuStatus[_local2] == 1){ _local4.check1.gotoandstop(1); _local4.check2.gotoandstop(2); } else { _local4.check1.gotoandstop(2); _local4.check2.gotoandstop(1); }; this.rowHolder.addChild(_local4); _local4.addListeners(); } else { _local1 = (_local1 + 1); }; _local2++; }; if (this.rowHolder.numChildren > 18){ this.scrollMC.buttonMode = true; this.scrollMC.usehandcursor = true; this.scrollUpBtn.visible = true; this.scrollDownBtn.visible = true; this.scrollMC.visible = true; this.scrollBack.visible = true; this.scrollUpBtn.addEventListener(MouseEvent.CLICK, this.scrollUp); this.scrollDownBtn.addEventListener(MouseEvent.CLICK, this.scrollDown); this.scrollMC.addEventListener(MouseEvent.MOUSE_DOWN, this.startScroll); stage.addEventListener(MouseEvent.MOUSE_UP, this.stopScroll); addEventListener(Event.ENTER_FRAME, this.enterHandler); } else { this.scrollUpBtn.visible = false; this.scrollDownBtn.visible = false; this.scrollMC.visible = false; this.scrollBack.visible = false; this.scrollUpBtn.removeEventListener(MouseEvent.CLICK, this.scrollUp); this.scrollDownBtn.removeEventListener(MouseEvent.CLICK, this.scrollDown); this.scrollMC.removeEventListener(MouseEvent.MOUSE_DOWN, this.startScroll); stage.removeEventListener(MouseEvent.MOUSE_UP, this.stopScroll); removeEventListener(Event.ENTER_FRAME, this.enterHandler); }; this.updateAfterScroll(); this.worksheetBtn.addEventListener(MouseEvent.CLICK, this.showWorksheetTable); this.ks3MenuBtn.addEventListener(MouseEvent.CLICK, this.showKS3MenuTable); this.gcseMenuBtn.addEventListener(MouseEvent.CLICK, this.showGCSEMenuTable); this.tabs_mc.gotoandstop(2); this.tableShowing = "GCSEMENU"; } public function scrollUp(_arg1:MouseEvent):void{ if (this.rowHolder.y < 0){ this.rowHolder.y = (this.rowHolder.y + 20); this.updateAfterScroll(); }; } public function scrollDown(_arg1:MouseEvent):void{ var _local2:int = ((this.rowHolder.numChildren - 18) * -20); if (this.rowHolder.y > _local2){ this.rowHolder.y = (this.rowHolder.y - 20); this.updateAfterScroll(); }; } public function startScroll(_arg1:Event):void{ this.scrolling = true; this.scrollMC.startdrag(false, this.bounds); } public function stopScroll(_arg1:Event):void{ this.scrolling = false; this.scrollMC.stopdrag(); } public function enterHandler(_arg1:Event):void{ var _local2:number; var _local3:number; if (this.scrolling == true){ _local2 = (this.scrollMC.y - this.bounds.y); _local3 = (_local2 / 326); this.rowHolder.y = (math.round((((360 - this.rowHolder.height) * _local3) / 20)) * 20); }; this.updateAfterScroll(); } public function updateAfterScroll():void{ var _local1:number; var _local2:number; if ((((this.rowHolder.numChildren > 18)) && ((this.scrolling == false)))){ _local1 = (this.rowHolder.y / (360 - this.rowHolder.height)); _local2 = (_local1 * 326); this.scrollMC.y = (this.bounds.y + _local2); }; } public function removeAllListeners():void{ var _local1:int; while (_local1 < this.rowHolder.numChildren) { movieclip(this.rowHolder.getChildAt(_local1)).removeListeners(); _local1++; }; } public function addAllListeners():void{ var _local1:int; while (_local1 < this.rowHolder.numChildren) { movieclip(this.rowHolder.getChildAt(_local1)).addListeners(); _local1++; }; } function frame1(){ this.tabs_mc.gotoandstop(1); this.pleaseWait.stop(); this.pleaseWait.visible = false; this.tableShowing = "WORKSHEETS"; this.bounds = new Rectangle(this.scrollMC.x, 93, 0, 326); this.scrolling = false; this.rowHolder.mask = this.listMask; this.closeBtn.addEventListener(MouseEvent.CLICK, this.onclose); this.worksheetBtn.usehandcursor; this.worksheetBtn.buttonMode = true; this.ks3MenuBtn.usehandcursor; this.ks3MenuBtn.buttonMode = true; this.gcseMenuBtn.usehandcursor; this.gcseMenuBtn.buttonMode = true; }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.display.*;   public dynamic class tabs_mc_52 extends movieclip {   public var tab1:SimpleButton;   public function tabs_mc_52(){ addFrameScript(0, this.frame1); } function frame1(){ stop(); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.display.*;   public dynamic class buttonBorder_26 extends movieclip {   public function buttonBorder_26(){ addFrameScript(0, this.frame1); } function frame1(){ stop(); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.text.*; import flash.display.*;   public dynamic class teacherDeleteCheck_62 extends movieclip {   public var cancelBtn:SimpleButton; public var firsttxt:textfield; public var lasttxt:textfield; public var loadingClip:movieclip; public var okBtn:SimpleButton; public var usertxt:textfield; public var ID:int; public var UPN:string;   public function teacherDeleteCheck_62(){ addFrameScript(0, this.frame1); } function frame1(){ stop(); this.loadingClip.visible = false; this.loadingClip.stop(); }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.text.*; import flash.display.*;   public dynamic class teacherEditor_60 extends movieclip {   public var cancelBtn:SimpleButton; public var confirmtxt:textfield; public var firsttxt:textfield; public var lasttxt:textfield; public var loadingClip:movieclip; public var mismatchMessage:textfield; public var passwordtxt:textfield; public var saveBtn:SimpleButton; public var savedMessage:textfield; public var usertxt:textfield; public var ID:int; public var UPN:string;   public function teacherEditor_60(){ addFrameScript(0, this.frame1); } function frame1(){ stop(); this.mismatchMessage.visible = false; this.savedMessage.visible = false; this.loadingClip.visible = false; this.loadingClip.stop(); this.firsttxt.restrict = "A-Z"; this.lasttxt.restrict = "A-Z"; this.passwordtxt.displayAsPassword = true; this.confirmtxt.displayAsPassword = true; }   } }//package mwindexV19_6_fla package mwindexV19_6_fla { import flash.events.*; import flash.display.*;   public dynamic class pupilImporter_31 extends movieclip {   public var closeBtn:SimpleButton; public var pleaseWait:movieclip;   public function pupilImporter_31(){ addFrameScript(0, this.frame1); } public function closeIndex(_arg1:MouseEvent):void{ visible = false; } function frame1(){ stop(); this.closeBtn.addEventListener(MouseEvent.CLICK, this.closeIndex); }   } }//package mwindexV19_6_fla
  2.  
  3. Read more at: http://www.showmycode.com/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement