// ***************************************** // // Programmer: Sandeep Kashyap // Date Created: November 19, 2005 // Date Last Modified: April 24, 2006 // ***************************************** // // ... var thisLocation=this; // Increase the value of this variable by 1 everytime a new module is created. var modver=3; thisLocation.loginPreloaderMC._visible=0; loginPreloaderMC.onRelease=function(){};loginPreloaderMC.useHandCursor=false; // Setting basic variables after loading the path.xml thisLocation.varObject=new Object(); thisLocation.varObject.pathXML=new XML(); thisLocation.varObject.pathXML.ignoreWhite=true; thisLocation.varObject.pathXML.onLoad=function(success){ if(success){ thisLocation.httpURL=this.firstChild.firstChild; thisLocation.varObject.loginCheckURL=thisLocation.httpURL+"act_verifylogin.php"; thisLocation.varObject.modulesXML=thisLocation.httpURL+"currstatus_v3.php"; thisLocation.varObject.quizXMLObj=new XML(); thisLocation.varObject.quizXML=thisLocation.httpURL+"quiz.php"; thisLocation.varObject.insertIntoDBURLQuiz=thisLocation.httpURL+"quiz_submit_v3.php"; thisLocation.varObject.insertIntoDBURL=thisLocation.httpURL+"inscurrstatus_v3.php"; } } thisLocation.varObject.pathXML.load("path.xml"); // ********************************************************** // Method: sendArrayInformation // Description: FUNCTIONS THAT INTERACT WITH THE DATABASE // ********************************************************** submitButton.onRelease = function() { //test to see if they have input an alias into the text field if (myAlias.text == null || myAlias.text == "") { thisLocation.aliasErrorTB.text="Please enter an alias"; trace("noAlias!"); } else { // ... thisLocation.checkAlias(); } }; // ********************************************************** // Method: sendArrayInformation // Description: Sends Array values to the PHP to insert into the Database // ********************************************************** function sendArrayInformation(curArray:Array) { //send the alias name and the contents of the following arrays to the database var sendQuizVars=new LoadVars(); var currId=curArray[0][0]; var statusVar=[] for (var i=0;i mask0._height); thisLocation.vidList.showScrollBar() else thisLocation.vidList.hideScrollBar() //trace(thisLocation.vidList.mcQuestions._height); // Setting question button actions newMC.btnQuestion.onRelease=function(){ this._parent.tempArr[this._parent.myNo][2]="Watched"; thisLocation.sendArrayInformation(this._parent.tempArr); this._parent.cb1.gotoAndStop(2); var currentArray=this._parent.tempArr[this._parent.myNo][3]+"_"+this._parent.tabId; var currentSlot=Number(this._parent.myNo+1); var curVid=thisLocation["vids"+currentArray][currentSlot]; //trace(curVid); if(curVid ne undefined) thisLocation.playVideo(currentArray, currentSlot); } } } // ***************************************** // // Method: buildQuestionsStations // Description: Method to create dyna modules for station // ***************************************** // thisLocation.buildQuestionsStations=function(category:Number,myNumber:Number,headerText){ var catArray=qa["cat"+(category+1)+"_questions"][myNumber-1]; thisLocation.removeClips() var totalQuestions:Number=catArray.length-1; var quesYPos=0; thisLocation.vidList.mcQuestions.totalMC=totalQuestions+1 thisLocation.vidList.mcQuestions.setMask(thisLocation.vidList.mask0) thisLocation.vidList.label_txt.text=headerText; if(totalQuestions<0) thisLocation.vidList._visible=0; else thisLocation.vidList._visible=1; // Generating the question movieclips for(var i=0;i<=totalQuestions;i++){ if(i==0){ var newMC:MovieClip=thisLocation.vidList.mcQuestions.mcQuestion0; }else{ var newMC:MovieClip=thisLocation.vidList.mcQuestions.mcQuestion0.duplicateMovieClip("mcQuestion"+i,1000+i); newMC._y=quesYPos; } newMC.tbQuestion.htmlText=catArray[i][1] newMC.tbQuestion.autoSize=true; newMC.tbQuestion.width=180; // Setting the checkbox status if(catArray[i][2] eq "Not Watched") newMC.cb1.gotoAndStop(1); else newMC.cb1.gotoAndStop(2); newMC.tempArr=catArray newMC.myNo=i; newMC.tabId=i+1; newMC.btnQuestion._y=newMC.tbQuestion.y; // Setting the Y position of the question newMC.btnQuestion._height=newMC.tbQuestion._height+5; // Setting height of the question button thisLocation.vidList.scrolling(); // Sets the scrolling quesYPos+=newMC._height+5; // Setting the button aations newMC.btnQuestion.onRelease=function(){ this._parent.tempArr[this._parent.myNo][2]="Watched" thisLocation.sendArrayInformation(this._parent.tempArr) this._parent.cb1.gotoAndStop(2); var currentArray=thisLocation.stChoice; var currentNameArray=thisLocation.stName; var currentSlot=this._parent.tabId; var curName=String(thisLocation[thisLocation.stName][currentSlot]).split("~") thisLocation.playVideo(currentArray, currentSlot); thisLocation.vid.vidName_txt.htmlText=this._parent.tempArr[this._parent.myNo][1] if(curName ne undefined){ thisLocation.vid.perName_txt.text=""; for(var i=0;i" } } } } } // ***************************************** // // Method: buildQuestionsStations // Description: Method removes dynamic module movieclips of last curriculum // ***************************************** // function removeClips(){ if(thisLocation.vidList.mcQuestions.totalMC ne undefined){ for(var i=0;i