аЯрЁБс>ўџ ]ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџRoot EntryџџџџџџџџpЊ|YЊrЯƒRASH _г‘џШР.Contentsџџџџџџџџ†Q-Page 1џџџџџџџџџџџџUдHSymbol 21 џџџџџџџџЁыT§џџџџџџџџџџџџџџџџџџџџџџџџџџџ `џџџџџџџџџџџџdџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ\VWXYZ[g_bўџџџ^aўџџџecfўџџџhijklmnopqrstuvwxyz{|}~€Root EntryџџџџџџџџpЊ|YЊrЯƒRASH0Оъ‹џШР.Contentsџџџџџџџџ=Q-Page 1џџџџџџџџџџџџЧHSymbol 21 џџџџџџџџЁыџџџџџџџџ§џџџ§џџџ\ `d !"#$%&'()*+,-./0123456789:;<ўџџџ>?@ABCDEFGHIJKLMNOPQRSўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ_bўџџџ^aўџџџecfўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџSymbol 10џџџџœSymbol 1џџџџџџџџвSymbol 25џџџџџџџџџџџџ„вSymbol 24 џџџџxвџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€є’їЂ ЪФџџЬЬџџџs€€^М*Ќф0э0T0т€€џџџ?џџ)€€ backgroundџџџџ€€€џ€€€€€hБhБс7шнџџ џџџџџџШW€€љŒууКу0РозЙууG0@!)FG0@!)FтуК0РозтЙ€€€ЬхhБ€Aшнџџ џџџџџџШW€€љŒууКу0РозЙууG0@!)FG0@!)FтуК0РозтЙ€€џџџ?џџ#H€€ borderџOџџ€€џџ CPicButtonpr# еpr#dџ „gline€€џџCPicPageџџ CPicLayerџџ CPicFrame€€ ™™џџџџdїы рј œЈўPџ0єэ8аpџџўА4џ›PY8џЎ0ф 4џџp}ШЊ4аeВYъД0 8 ВџџџцLџ4мepЈЬVў0ѕ4мџP‚4џRўџџџ?џџ-€€ backgroundџџџџ™3Ьџ€€џџCPicText€€ ‡џ*ќџџLўџџ­kаVerdanaf3џ"(Easy€€ џџџ?џџM€ €€€ ‡џћџџLўџџЦ kаVerdanaf3џ"(Tricky€€ џџџ?џџШM€ €€€ ‡џ*ќџџLўџџ­kаVerdanaf3џ"(Hard€€ џџџ?џџCd€€ textџџџџO€џџ€€€€ џџџ?џџЛfstop(); _root.lvlNo = 1;€€€ џџџ?џџ‹Bstop(); _root.lvlNo = 2;€€€ џџџ?џџІ&stop(); _root.lvlNo = 3;€€ scriptsџџџџџOOџ€€€€ џџџ?џџeasyp€€€ џџџ?џџtricky]€€€ џџџ?џџhardZz€€ labelsџџџџOџOџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€ ™™џџџџdїь рј œЈўPџ0єэ8аpџџўА4џ›PY8џЎ0ф 4џџp}ШЊ4аeВYъД0 8 ВџџџцLџ4мepЈЬVў0ѕ4мџP‚4џRўџџџ?џџЗM€€ backgroundџџџџO€џџ€€џџCPicText€€ ‡џѕћџџLўџџkаVerdanaf3џ"(Stop€€џџџ?џџG€ €€€ ‡џѕћџџLўџџkаVerdanaџfџ(Stop€€џџџ?џџоT€€ textџџџџџOOџ€€FG0@!)FтуК0РозтЙџџCPicPageџџ CPicLayerџџ CPicFrame€€ ™™џџџџdїь рј œЈўPџ0єэ8аpџџўА4џ›PY8џЎ0ф 4џџp}ШЊ4аeВYъД0 8 ВџџџцLџ4мepЈЬVў0ѕ4мџP‚4џRўџџџ?џџ^0€€ backgroundџџџџO€џџ€€џџCPicText€€ ‡џѕћџџLўџџkаVerdanaf3џ"(Start€€џџџ?џџ D€ €€€ ‡џѕћџџLўџџkаVerdanaџfџ(Start€€џџџ?џџI€€ textџџџџџOOџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€ ЬЬџџџxxѓz$њ ѓўИ€†1vЮЄ1€Ю€w0 іџЩE€1€v~2м1€y20є яFмџ€xЮw2IЯ€2€‰0ъіїџ$К€Э€ˆoЮЯ€‡Яџџџ?џџќk€€ backgroundџџџџO€џџ€€џџCPicText€€ ўќџџPўџџa;@_root.targetText3Verdanaf3џ"(€€џџџ?џџ–€€ textџџџџџOOџ€€™™џџџџdїы рј œЈўPџ0џџCPicPageџџ CPicLayerџџ CPicFrame€€ ЬЬџџџxxѓz$њ ѓўИ€†1vЮЄ1€Ю€w0 іџЩE€1€v~2м1€y20є яFмџ€xЮw2IЯ€2€‰0ъіїџ$К€Э€ˆoЮЯ€‡Яџџџ?џџ8€€ backgroundџџџџO€џџ€€џџCPicText€€ џџџ?џџО€€ boundaryOџџџ€€џџ CPicSpriteD… D…dџж,џ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj1"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj1"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€œџџџ џџW€hcћЬЫУƒФ0$ѓЁЖЫџ€‚<4–Ь€=™џ(0v4…Vg&!4Й=€}>0м IЙџ}Т44…Уhкў0Šї4€Љ˜џиў€€џџџ?џџёZ€€ backgroundџџџџO€џџ€€џџCPicText€€ ‡џhќџџ4ўџџЦ;@ _root.symbol2Verdanaџ"(€€џџџ?џџЛA€€ textџџџџџOOџ€€€€џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€œџџџ џџџW€hcћЬЫУƒФ0$ѓЁЖЫџ€‚<4–Ь€=™џ(0v4…Vg&!4Й=€}>0м IЙџ}Т44…Уhкў0Šї4€Љ˜џиў€€џџџ?џџы€€ backgroundџџџџO€џџ€€џџCPicText€€ ‡џhќџџ4ўџџЦ;@ _root.symbol3Verdanaџ"(€€џџџ?џџГ €€ textџџџџџOOџ€€€€€imer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj1"){ _root.currObject = this; _root.overTarget(); } }sobj1€р6} р6}џџџџ_konClipEvent(enterFrame){ if(_root.playing == true and _root.score == _root.maxQ){ _root.stopGame(); } }џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€œџџџ f™џџW€hcћЬЫУƒФ0$ѓЁЖЫџ€‚<4–Ь€=™џ(0v4…Vg&!4Й=€}>0м IЙџ}Т44…Уhкў0Šї4€Љ˜џиў€€џџџ?џџл€€ backgroundџџџџO€џџ€€џџCPicText€€ ‡џhќџџ4ўџџЦ;@ _root.symbol4Verdanaџ"(€€џџџ?џџ<€€ textџџџџџOOџ€€€B€j4ѕCй,GZ0 4^_йџDІџшC8дD€•0Žњшџ(СџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€œџџџ џ™ЬџW€hcћЬЫУƒФ0$ѓЁЖЫџ€‚<4–Ь€=™џ(0v4…Vg&!4Й=€}>0м IЙџ}Т44…Уhкў0Šї4€Љ˜џиў€€џџџ?џџ 9€€ backgroundџџџџO€џџ€€џџCPicText€€ ‡џhќџџ4ўџџЦ;@ _root.symbol5Verdanaџ"(€€џџџ?џџ>€€ textџџџџџOOџ€€ џџџ?џџџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€§џџ џ™џs€0јŸv4…Vg&!4Й=€}>0м IЙџ}Т44…Уhкў0Šї4€Љ˜џиўЬЫУƒФ0$ѓЁЖЫџ€‚<4–Ь€=™џ(€€џџџ?џџЎr€€ backgroundџџџџO€џџ€€џџCPicText€€ ‡џhќџџ4ўџџЦ;@ _root.symbol1Verdanaџ"(€€џџџ?џџRi€€ textџџџџџOOџ€€œџџџ џџW€hcџџCPicPageџџ CPicLayerџџ CPicFrame€€џџШтs€еФUџџџ?џџсJ€€ Layer 1џџџџO€џџ€€€DЗ DЗdџёmџ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj2"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj2"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj2"){ _root.currObject = this; _root.overTarget(); } }sobj2€Dщ Dщdџщ&џ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj3"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj3"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj3"){ _root.currObject = this; _root.overTarget(); } }sobj3€D D dџІ.џ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj4"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj4"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj4"){ _root.currObject = this; _root.overTarget(); } }sobj4€DM DMdџ‡~џ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj5"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj5"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj5"){ _root.currObject = this; _root.overTarget(); } }sobj5€€џџџ?џџl=€€ objectsO€џџ€€€7 7dџ$!on(release){ _root.runGame(1); }goButtonџџCPicText€€ <о,ф@ _root.commentрVerdanaf3џ"(€7 7dџM!on(release){ _root.stopGame(); } stopButton€€€ -2‡ ;ЈVerdanaf3џ"(Score€€€ 2н ;@ _root.scoreЈVerdanaf3џ"(€ 7Ž(  7Ž(dџ Г9џ!on(release){ if(_root.playing == false){ if(_root.lvlNo == 1){ _root.lvlNo = 2; this.gotoAndStop("tricky"); } else if(_root.lvlNo == 2){ _root.lvlNo = 3; this.gotoAndStop("hard"); } else if(_root.lvlNo == 3){ _root.lvlNo = 1; this.gotoAndStop("easy"); } } } difficulty€€џџџ?џџ™€€ controlsџџOџ€€€kђ( kђ(dџ! Etarget2€ђ( ђ(dџtarget1€F&) F&)dџ"Ыctarget3€€џџџ?џџ}v€€ targetsOџOџ€€€€џџџ?џџѕџ // declare global variables var layerNo = 0; var objNo = 0; var currObject; var symbol; var intervalID; var intervalID2; var speed; var maxObjects; var intervalTime; var comment; var score = 0; var swapTargets; var playing = false; var lvlNo = 1; var rotateFlag; var rotateSpeed; var holdTime; var swapTargetTime; var maxQ; var subtract; var targetNo = 0; // display comments etc and prepares some global variables setupScreen(); //sets up an array for reference to the targets that objects are dropped on var targets = new array(); // find the targets placed on the screen findClips(); // create and reset array for the dropping objects var createdObjects = new Array(); for(var i=1;i<=5;i++){ createdObjects[i] = false; } //sets up array for the objects that are dragged and dropped var objects = new array(); var objNo; // ** only edit the functions below here // sets the text in the target boxes targetText1 = "Alkali metal"; targetText2 = "Halogen"; targetText3 = "Noble gas"; // comment is displayed in text box at the top var openingComment = "Catch the falling elements and put them in the correct group."; var correctComment = "Well Done!"; var wrongComment = "Hard Luck!"; var feedback1 = " is an alkali metal."; var feedback2 = " is a noble gas."; var feedback3 = " is a halogen."; var readyComment = "Get ready..."; var slowComment = "Too Slow!"; var finishComment = "Well Done - You have completed the game."; //sets up array for the item information ("item",target) var item1 = ["Li",1]; var item2 = ["Na",1]; var item3 = ["K",1]; var item4 = ["F",2]; var item5 = ["Cl",2]; var item6 = ["Br",2]; var item7 = ["I",2]; var item8 = ["He",3]; var item9 = ["Ne",3]; var item10 = ["Ar",3]; var items = [item1,item2,item3,item4,item5,item6,item7,item8,item9,item10]; // edit this to alter the difficulty of the three levels function setLevel(){ // reset the scoring variable score = 0; // hard if(lvlNo == 3){ speed = 5; maxObjects = 3; intervalTime = 2000; swapTargets = true; rotateFlag = true; rotateSpeed = 5; holdTime = 2000; swapTargetTime = 5000; maxQ = 20; subtract = true; } // easy else if(lvlNo == 1){ speed = 5; maxObjects = 1; intervalTime = 3000; swapTargets = false; rotateFlag = false; rotateSpeed = 1; holdTime = 2000; swapTargetTime = 5000; maxQ = 5; subtract = false; } // tricky else if(lvlNo == 2){ speed = 5; maxObjects = 3; intervalTime = 2000; swapTargets = false; rotateFlag = false; rotateSpeed = 1; holdTime = 2000; swapTargetTime = 500; maxQ = 15; subtract = false; } } // ** only edit the functions ABOVE here function applyRules(e,t){ var flag = false; if(items[e][1] == t){ flag = true; // comment if the user is correct comment = correctComment; } else{ flag = false; if(items[e][1] == 1){ // comment for wrong answer category 1 comment = wrongComment + " " + items[e][0] + feedback1; } else if(items[e][1] == 2){ // comment for wrong answer category 2 comment = wrongComment + " " + items[e][0] + feedback2; } else if(items[e][1] == 3){ // comment for wrong answer category 3 comment = wrongComment + " " + items[e][0] + feedback3; } } return flag; } function setupScreen(){ // hides each falling object box _root.sobj1._visible = false; _root.sobj2._visible = false; _root.sobj3._visible = false; _root.sobj4._visible = false; _root.sobj5._visible = false; // blanks the text content of each falling object box _root.symbol1 = ""; _root.symbol2 = ""; _root.symbol3 = ""; _root.symbol4 = ""; _root.symbol5 = ""; // sets up the buttons visible on screen _root.goButton._visible = true; _root.stopButton._visible = false; // set difficulty button for level 1 difficulty.gotoAndStop("easy"); // show opening comment comment = openingComment; } // checks if an object is being dropped over a target box and the box is empty function overTarget(){ var flag = false; comment = ""; for(var i = 1;i <= targetNo;i++){ if(currObject.hitTest(targets[i])){ if (applyRules(parseInt(currObject.elNo),i) == true) { flag = true; currObject._x = targets[i]._x; currObject._y = targets[i]._y; currObject.activated = false; gotoAndPlay("delay"); } else{ createdObjects[parseInt(currObject.tag)] = false; removeMovieClip(currObject); if(subtract == true){ score = _root.score - 1; } } } } if (flag == false){ currObject.activated = true; } } // creates a new electron using the static object as a template when it is clicked function createObject(nextItem){ comment = ""; objNo = getNextObjectID(); // objNo = 5; if(objNo > 0){ layerNo = objNo; // create a new object and add item text to objects text box variable if(objNo == 1){ _root.sobj1.duplicateMovieClip("o" + objNo,layerNo); _root.symbol1 = _root.items[nextItem][0]; } else if(objNo == 2){ _root.sobj2.duplicateMovieClip("o" + objNo,layerNo); _root.symbol2 = _root.items[nextItem][0]; } else if(objNo == 3){ _root.sobj3.duplicateMovieClip("o" + objNo,layerNo); _root.symbol3 = _root.items[nextItem][0]; } else if(objNo == 4){ _root.sobj4.duplicateMovieClip("o" + objNo,layerNo); _root.symbol4 = _root.items[nextItem][0]; } else if(objNo == 5){ _root.sobj5.duplicateMovieClip("o" + objNo,layerNo); _root.symbol5 = _root.items[nextItem][0]; } createdObjects[objNo] = true; // creates some properties attached to the new object eval("o" + objNo)._x = myRandom(25,450); eval("o" + objNo)._y = -70; eval("o" + objNo).tag = objNo; eval("o" + objNo).activated = true; eval("o" + objNo).caught = 0; eval("o" + objNo).elNo = nextItem; objects[objNo] = eval("o" + objNo); } } // ### random integer generator function myRandom (minNo, maxNo) { r = Math.random(); // toss away 1 if we get it while (r == 1) { r = Math.random(); } return minNo + Math.floor(r * (maxNo + 1 - minNo)); } function dropNextItem(){ createObject(myRandom(0,9)); } function destroyObject(cobj){ createdObjects[parseInt(cobj.tag)] = false; removeMovieClip(cobj); } function getNextObjectID(){ var flag = 0; for(var i=maxObjects;i>=1;i--){ if(createdObjects[i] == false){ flag = i; } } return flag; } function runGame(){ if(playing == false){ comment = readyComment; setLevel(); goButton._visible = false; stopButton._visible = true; intervalID = setInterval(dropNextItem,intervalTime); if(swapTargets == true){ intervalID2 = setInterval(swapTargetPos,swapTargetTime); } playing = true; } } function stopGame(){ if(playing == true){ goButton._visible = true; stopButton._visible = false; clearInterval(intervalID); clearInterval(intervalID2); playing = false; for(var i=1;i<=5;i++){ if(createdObjects[i] == true){ removeMovieClip(eval("o" + i)); createdObjects[i] = false; } } } comment = finishComment; } function findClips(){ var myClip = _root; // work through all the movie clips on the main timeline for(var property in myClip){ // only deal with movie clip instances if(typeof myClip[property] == "movieclip"){ // store the _name property var tempStr = myClip[property]._name; // check for the word "target" in the name and store its position var tempIndex = tempStr.indexOf("target"); // only process movie clips that have "target" in their name if(tempIndex > -1){ // extract the number at the end of the name var tempCounter = parseInt(tempStr.substring(6,tempStr.length)); // use the number to store the name of the instance in the label array targets[tempCounter] = eval(myClip[property]._name); // add one to the targetNo variable targetNo ++; } } } } function swapTargetPos(){ var rndStart = 1; storeX = targets[rndStart]._x; storeY = targets[rndStart]._y; var startVar = rndStart; var nextVar = 0; for(var i=1;i<=targetNo;i++){ nextVar = startVar + 1; if(nextVar > targetNo){ nextVar = 1; } if(nextVar == rndStart){ targets[i]._x = storeX; targets[i]._y = storeY; } else{ targets[i]._x = targets[nextVar]._x; targets[i]._y = targets[nextVar]._y; } startVar = nextVar; } }€€€џџџ?џџENstop();€€€џџџ?џџ;2€€€џџџ?џџ"wcreatedObjects[parseInt(currObject.tag)] = false; removeMovieClip(currObject); score = score + 1; gotoAndStop("start");€€ scriptsџOOџ€€€€џџџ?џџsetup &€€€џџџ?џџstart‰k€€€џџџ?џџdelay €€ labels™3Ьџ€€ €€ labels™3Ьџ€€ €€ ).elNo = nextItem; objects[objNo] = eval("o" + objNo); } } // ### random integer generator function myRandom (minNo, maxNo) { r = Math.random(); // toss away 1 if we get it while (r == 1) { r = Math.random(); } return min)џџ CDocumentPagePage 1Scene 1 81Dџџџџž­ІHџџџџ€ Symbol 21 watcherClip_д;D& Symbol 21џџџџ_д;Dџџџџ€ Symbol 10line шЕ:D Symbol 10џџџџЊЄHџџџџ€Symbol 1sobj1нU9DobjectSymbol 1џџџџ–ZЁHџџџџ€ Symbol 25sobj5fŽND. sobj1 copyџџџџОZЁHџџџџ€ Symbol 24sobj4[ŽND, sobj1 copyџџџџДZЁHџџџџ€ Symbol 23sobj3SŽND* sobj1 copyџџџџЋZЁHџџџџ€ Symbol 22sobj2KŽND( sobj1 copyџџџџ ZЁHџџџџ€ Symbol 19target1'Ј;Dtarget1 target2 copyџџџџxВЅHџџџџ€ Symbol 34target3"ЄВЅHЮ target1 copyџџџџЄВЅHџџџџ€ Symbol 33target2!ŸВЅHЬ target1 copyџџџџŸВЅHџџџџ€ Symbol 30 startButtonŒdЁHц .\quiz4.fla startButtonŸњЂHŒdЁHцŸњЂHџџџџ€ Symbol 31 stopButtonзњЂH* .\quiz4.fla stopButtonьњЂHзњЂH*ьњЂHџџџџ€ Symbol 32difficultyButton ggЁHі .\quiz4.fladifficultyButtonЪћЂHggЁHіЪћЂHџџџџ#€>р.hhhhhџџџџРРРџДz%PublishFormatProperties::htmlFileNametable"PublishHtmlProperties::StartPaused0!PublishGifProperties::PaletteName PublishRNWKProperties::speed256K0PublishFormatProperties::jpeg0Vector::Debugging Permitted0PublishHtmlProperties::Loop1"PublishQTProperties::MatchMovieDim1 PublishQTProperties::AlphaOption PublishQTProperties::LayerOptionPublishHtmlProperties::Units0$PublishPNGProperties::OptimizeColors1PublishQTProperties::Width550&PublishRNWKProperties::singleRateAudio0&PublishRNWKProperties::speedSingleISDN0%PublishFormatProperties::projectorMac0&PublishFormatProperties::flashFileName table.swfVector::Compress Movie1PublishGifProperties::Smooth1#PublishRNWKProperties::flashBitRate1200%PublishRNWKProperties::mediaCopyright(c) 2000PublishFormatProperties::html1$PublishFormatProperties::pngFileName table.png(PublishHtmlProperties::VerticalAlignment1PublishHtmlProperties::Quality4"PublishGifProperties::DitherOption"PublishRNWKProperties::exportAudio1 PublishRNWKProperties::speed384K0!PublishRNWKProperties::exportSMIL1Vector::Override Sounds0!PublishHtmlProperties::DeviceFont0"PublishPNGProperties::FilterOption'PublishRNWKProperties::mediaDescriptionPublishFormatProperties::gif0*PublishFormatProperties::generatorFileName table.swtVector::Template0Vector::Protect0Vector::Quality80*PublishHtmlProperties::HorizontalAlignment1"PublishHtmlProperties::DisplayMenu1PublishGifProperties::Interlace0"PublishGifProperties::DitherSolids0PublishPNGProperties::Smooth1PublishPNGProperties::BitDepth24-bit with AlphaPublishJpegProperties::DPI4718592PublishQTProperties::Flatten1#PublishFormatProperties::qtFileName table.movPublishGifProperties::Width550PublishGifProperties::Loop1PublishRNWKProperties::speed28K1!PublishRNWKProperties::mediaTitle$PublishRNWKProperties::mediaKeywordsPublishFormatProperties::flash1#PublishGifProperties::MatchMovieDim1#PublishGifProperties::PaletteOption"PublishPNGProperties::DitherOptionPublishJpegProperties::Quality80$PublishRNWKProperties::realVideoRate100000$PublishRNWKProperties::speedDualISDN0-PublishFormatProperties::projectorWinFileName table.exePublishHtmlProperties::Align0#PublishPNGProperties::MatchMovieDim1#PublishPNGProperties::PaletteOption$PublishJpegProperties::MatchMovieDim1%PublishFormatProperties::jpegFileName table.jpgVector::Omit Trace Actions0Vector::Debugging PasswordPublishHtmlProperties::Width550PublishHtmlProperties::Height400"PublishPNGProperties::DitherSolids0"PublishJpegProperties::Progressive0#PublishQTProperties::PlayEveryFrame0PublishFormatProperties::png0PublishFormatProperties::rnwk0-PublishFormatProperties::projectorMacFileName table.hqxVector::TopDown0!PublishHtmlProperties::WindowMode0'PublishHtmlProperties::TemplateFileNamePublishGifProperties::Height400PublishPNGProperties::Interlace0PublishJpegProperties::Size0"PublishFormatProperties::generator0Vector::Report0PublishGifProperties::LoopCount'PublishGifProperties::TransparentOptionPublishGifProperties::MaxColors255%PublishPNGProperties::RemoveGradients0PublishQTProperties::Height400PublishRNWKProperties::speed56K1PublishFormatProperties::qt0Vector::Stream Compress7Vector::Event Format0Vector::Version6$PublishGifProperties::OptimizeColors1"PublishRNWKProperties::audioFormat0Vector::Event Compress7PublishHtmlProperties::Scale0%PublishGifProperties::RemoveGradients0PublishPNGProperties::Width550PublishPNGProperties::Height400PublishJpegProperties::Height400 PublishRNWKProperties::speed512K0$PublishFormatProperties::gifFileName table.gifVector::Stream Format0PublishGifProperties::Animated0&PublishGifProperties::TransparentAlpha128!PublishPNGProperties::Transparent0!PublishPNGProperties::PaletteNamePublishJpegProperties::Width550*PublishQTProperties::UseQTSoundCompression0PublishQTProperties::Looping0"PublishRNWKProperties::exportFlash1&PublishRNWKProperties::showBitrateDlog1(PublishRNWKProperties::speedCorporateLAN0"PublishRNWKProperties::mediaAuthorPropSheet::ActiveTab1621%PublishFormatProperties::defaultNames1%PublishFormatProperties::projectorWin0%PublishFormatProperties::rnwkFileName table.smilPublishPNGProperties::MaxColors255%PublishQTProperties::ControllerOption0"PublishQTProperties::PausedAtStart0џџџџќџџ CColorDefџ€џ€џ€3џPя€fџPя0€™џPяH€ЬџPя`€џџPяx€3џя€33џ(я€3fџ<я0€3™џCяH€3ЬџFя`€3џџHяx€fџя0€f3џя0€ffџ(я0€f™џ5яH€fЬџ<я`€fџџ@яx€џ€333џ0€џ€3џ я€33џxя€f3џdя0€™3џ]яH€Ь3џZя`€џ3џXяx€33џШя€333џ0€3f3џPPH€3™3џPx`€3Ь3џPx€3џ3џPя€f3џмя0€f33џPH€ff3џ(PH€f™3џ<x`€fЬ3џCx€fџ3џFя€џ€fffџ`€џ€fџ я0€3fџŒя0€ffџxя0€™fџkяH€Ьfџdя`€џfџ`яx€3fџДя0€33fџ PH€3ffџxPH€3™fџdx`€3Ьfџ]x€3џfџZя€ffџШя0€f3fџШPH€fffџ`€f™fџP0x€fЬfџPx€fџfџPяЈ€џ€™™™џ€џ€™џ яH€3™џ“яH€f™џ…яH€™™џxяH€Ь™џnя`€џ™џhяx€3™џ­яH€33™џ x`€3f™џŒx`€3™™џxx`€3Ь™џkx€3џ™џdя€f™џЛяH€f3™џДx`€ff™џ 0x€f™™џx0x€fЬ™џdx€fџ™џ]яЈ€џ€ЬЬЬџР€џ€Ьџ я`€3Ьџ–я`€fЬџŒя`€™Ьџ‚я`€ЬЬџxя`€џЬџpяx€3ЬџЊя`€33Ьџ x€3fЬџ“x€3™Ьџ…x€3ЬЬџxx€3џЬџnя€fЬџДя`€f3Ьџ­x€ffЬџ x€f™ЬџŒx€fЬЬџxx€fџЬџkяЈ€џ€џџџџ№€џ€џџ яx€3џџ˜яx€fџџяx€™џџˆяx€Ьџџ€яx€џџџxяx€3џџЈяx€33џџ я€3fџџ–я€3™џџŒя€3Ьџџ‚я€3џџџxя€fџџАяx€f3џџЊя€ffџџ яЈ€f™џџ“яЈ€fЬџџ…яЈ€fџџџxяЈ€џ€џџяx€џ€™џяH€™3џ яH€™fџяH€™™џ(яH€™Ьџ2я`€™џџ8яx€Ьџя`€Ь3џ я`€Ьfџя`€Ь™џя`€ЬЬџ(я`€Ьџџ0яx€џџяx€џ3џяx€џfџяx€џ™џяx€џЬџ яx€џџџ(яx€џ€џџPяx€џ€™3џуяH€™33џx`€™f3џx`€™™3џ(x`€™Ь3џ5x€™џ3џ<я€Ь3џця`€Ь33џx€Ьf3џ x€Ь™3џx€ЬЬ3џ(x€Ьџ3џ2я€џ3џшяx€џ33џя€џf3џ я€џ™3џя€џЬ3џя€џџ3џ(я€џ€џџ яx€џ€™fџеяH€™3fџмx`€™ffџ0x€™™fџ(0x€™Ьfџ<x€™џfџCяЈ€Ьfџмя`€Ь3fџуx€Ьffџx€Ь™fџx€ЬЬfџ(x€Ьџfџ5яЈ€џfџряx€џ3fџця€џffџяЈ€џ™fџ яЈ€џЬfџяЈ€џџfџ(яЈ€џ€џџџ(яx€џ€™™џШяH€™3™џШx`€™f™џШ0x€™™™џ€™Ь™џPPЈ€™џ™џPяР€Ь™џвя`€Ь3™џеx€Ьf™џмx€Ь™™џPЈ€ЬЬ™џ(PЈ€Ьџ™џ<яР€џ™џияx€џ3™џмя€џf™џуяЈ€џ™™џяР€џЬ™џяР€џџ™џ(яР€џ€џџџxяx€џ€™ЬџОя`€™3ЬџЛx€™fЬџДx€™™Ьџ PЈ€™ЬЬџxPЈ€™џЬџdяР€ЬЬџШя`€Ь3ЬџШx€ЬfЬџШx€Ь™ЬџШPЈ€ЬЬЬџР€ЬџЬџPяи€џЬџаяx€џ3Ьџвя€џfЬџеяЈ€џ™ЬџмяР€џЬЬџяи€џџЬџ(яи€џ€џџџШяx€џ€™џџИяx€™3џџДя€™fџџ­яЈ€™™џџ яР€™ЬџџŒяР€™џџџxяР€ЬџџРяx€Ь3џџОя€ЬfџџЛяЈ€Ь™џџДяР€ЬЬџџ яи€Ьџџџxяи€џџџШяx€џ3џџШя€џfџџШяЈ€џ™џџШяР€џЬџџШяи€џџџџ№€џ€џџџџџџџ€џџџџџџџ€џџџџџ€џџџџџ€џџџџџ€џf§џ`џџџџzџџџџ€™fџЊџЬџџџџџџ€џџџ*џџџ]џџџџџЊџџдџџџџџџаФќ"PublishQTProperties::QTSndSettingsџџCQTAudioSettingsџџh€33fџ PH€3ffџxPH€3™fџdx`€3Ьfџ]x€3џfџZя€ffџШя0€f3fџШPH€fffџ`€f™fџP0x€fЬfџPx€fџfџPяЈ€џSymbol 10џџџџœSymbol 1џџџџџџџџвSymbol 25џџџџџџџџџџџџ„вSymbol 24 џџџџxвџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€є’їЂ ЪФџџЬЬџџџs€€^М*Ќф0э0T0т€€џџџ?џџ)€€ backgroundџџџџ€€€џ€€€€€hБhБс7шнџџ џџџџџџШW€€љŒууКу0РозЙууG0@!)FG0@!)FтуК0РозтЙ€€€ЬхhБ€Aшнџџ џџџџџџШW€€љŒууКу0РозЙууG0@!)FG0@!)FтуК0РозтЙ€€џџџ?џџ#H€€ borderџOџџ€€џџ CPicButtonpr# еpr#dџ „gline€€џџџ?џџО€€ boundaryOџџџ€€џџ CPicSpriteD… D…dџж,џ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj1"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj1"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj1"){ _root.currObject = this; _root.overTarget(); } }sobj1€р6} р6}џџџџ_’onClipEvent(enterFrame){ if(_root.playing == true and _root.score == _root.maxQ){ _root.comment = _root.finishComment; _root.stopGame(); } }€DЗ DЗdџёmџ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj2"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj2"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(releaseSymbol 23џџџџџџџџџџџџlвSymbol 22џџџџ`вSymbol 19џџџџџџџџџџџџА›Symbol 26 џџџџJ›  ўџџџ"#$%&'()*+,-./ўџџџ123456789:;<=>ўџџџ@ABCDEFGHIўџџџKLMNOPQRSTўџџџVWXYZ[\]^_ўџџџabcdefghijkўџџџmnopqrstuvwўџџџyz{|}~€Symbol 34џџџџџџџџЅ›Symbol 33џџџџџџџџџџџџU›џџџџџџџџџџџџџџџџџџџџџџџџSymbol 27џџџџџџџџџџџџ?›Symbol 30 џџџџ0ŽSymbol 31џџџџџџџџџџџџ!ŒSymbol 32џџџџ;ўќџџPўџџa;@_root.targetText2Verdanaf3џ"(€€џџџ?џџ%;€€ textџџџџџOOџ€€џџџ?џџt9џџCPicPageџџ CPicLayerџџ CPicFrame€€ ЬЬџџџџdxxї! Гј‡ЕЊО–ў}џ0’ь4•*”ўƒ4‘ЕBkџ>0 4 ]•<4KeBl…0n4‡jхџj{џ4“K П—Фў0тѓ4ЃiџТўџџџ?џџ"€€ backgroundџџџџO€џџ€€џџCPicText€€ Mћџџ §џџe х;@_root.targetText2Verdanaf3џ"(€€џџџ?џџ‘Y€€ textџџџџџOOџ€€root.lvlNo = 1;‚ƒўџџџ…†‡ˆ‰Š‹ŒŽўџџџ‘’“”•–—˜™š›ўџџџžŸ ўџџџЂЃЄўџџџІЇЈЉЊЋЌ­ЎЏўџџџБВГДЕЖЗИЙКўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ—Фў0тѓ4ЃiџТўџџџ?џџс€€ backgroundџџџџO€џџ€€џџCPicText€€ Mћџџ §џџe х;@_root.targetText3Verdanaf3џ"(€€џџџ?џџ‹y€€ textџџџџџOOџ€€ if(_root.playing == true){ _ro€€ЬхhБ€Aшнџџ џџџџџџШџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџI€€ Layer 1џџџџO€џџ€€€€ borderџџCPicPageџџ CPicLayerџџ CPicFrame€€ ЬЬџџџџdxxї! Гј‡ЕЊО–ў}џ0’ь4•*”ўƒ4‘ЕBkџ>0 4 ]•<4KeBl…0n4‡jхџj{џ4“K ПџџCPicPageџџ CPicLayerџџ CPicFrame€€ ЬЬџџџџdxxї! Гј‡ЕЊО–ў}џ0’ь4•*”ўƒ4‘ЕBkџ>0 4 ]•<4KeBl…0n4‡jхџj{џ4“K П—Фў0тѓ4ЃiџТўџџџ?џџ]n€€ backgroundџџџџO€џџ€€џџCPicText€€ Mћџџ §џџe х;@_root.targetText1Verdanaf3џ"(€€џџџ?џџд€€ textџџџџџOOџ€€= true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj4"){ ){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj2"){ _root.currObject = this; _root.overTarget(); } }sobj2€Dщ Dщdџщ&џ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj3"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj3"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj3"){ _root.currObject = this; _root.overTarget(); } }sobj3€D D dџІ.џ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj4"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj4"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj4"){ _root.currObject = this; _root.overTarget(); } }sobj4€DM DMdџ‡~џ7onClipEvent(enterFrame){ if(this.activated == true and this._name != "sobj5"){ this._y = this._y + _root.speed; if(_root.rotateFlag){ this._rotation = this._rotation + _root.rotateSpeed; } if(this.hitTest(_root.line) == true){ this.activated = false; if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } else if(this.activated == false and this.caught > 0 and this._name != "sobj5"){ if(getTimer() - this.caught >= _root.holdTime){ if(_root.subtract == true){ _root.score = _root.score - 1; } if(_root.playing == true){ _root.comment = _root.slowComment; } _root.destroyObject(this); } } } on(press){ this.caught = getTimer(); this.activated = false; this._rotation = 0; this.startDrag(); } on(release){ // allows an object to be dropped stopDrag(); // checks if the object is over a target and deals with the result if(this._name != "sobj5"){ _root.currObject = this; _root.overTarget(); } }sobj5€€џџџ?џџl=€€ objectsO€џџ€€€7 7dџ$!on(release){ _root.runGame(1); }goButtonџџCPicText€€ <о,ф@ _root.commentрVerdanaf3џ"(€7 7dџM!on(release){ _root.stopGame(); } stopButton€€€ -2‡ ;ЈVerdanaf3џ"(Score€€€ 2н ;@ _root.scoreЈVerdanaf3џ"(€ 7Ž(  7Ž(dџ Г9џ!on(release){ if(_root.playing == false){ if(_root.lvlNo == 1){ _root.lvlNo = 2; this.gotoAndStop("tricky"); } else if(_root.lvlNo == 2){ _root.lvlNo = 3; this.gotoAndStop("hard"); } else if(_root.lvlNo == 3){ _root.lvlNo = 1; this.gotoAndStop("easy"); } } } difficulty€€џџџ?џџ™€€ controlsџџOџ€€€kђ( kђ(dџ! Etarget2€ђ( ђ(dџtarget1€F&) F&)dџ"Ыctarget3€€џџџ?џџ}v€€ targetsOџOџ€€€€џџџ?џџѕџч// declare global variables var layerNo = 0; var objNo = 0; var currObject; var symbol; var intervalID; var intervalID2; var speed; var maxObjects; var intervalTime; var comment; var score = 0; var swapTargets; var playing = false; var lvlNo = 1; var rotateFlag; var rotateSpeed; var holdTime; var swapTargetTime; var maxQ; var subtract; var targetNo = 0; // display comments etc and prepares some global variables setupScreen(); //sets up an array for reference to the targets that objects are dropped on var targets = new array(); // find the targets placed on the screen findClips(); // create and reset array for the dropping objects var createdObjects = new Array(); for(var i=1;i<=5;i++){ createdObjects[i] = false; } //sets up array for the objects that are dragged and dropped var objects = new array(); var objNo; // ** only edit the functions below here // sets the text in the target boxes targetText1 = "Alkali metal"; targetText2 = "Halogen"; targetText3 = "Noble gas"; // comment is displayed in text box at the top var openingComment = "Catch the falling elements and put them in the correct group."; var correctComment = "Well Done!"; var wrongComment = "Hard Luck!"; var feedback1 = " is an alkali metal."; var feedback2 = " is a noble gas."; var feedback3 = " is a halogen."; var readyComment = "Get ready..."; var slowComment = "Too Slow!"; var finishComment = "Well Done - You have completed the game."; //sets up array for the item information ("item",target) var item1 = ["Li",1]; var item2 = ["Na",1]; var item3 = ["K",1]; var item4 = ["F",2]; var item5 = ["Cl",2]; var item6 = ["Br",2]; var item7 = ["I",2]; var item8 = ["He",3]; var item9 = ["Ne",3]; var item10 = ["Ar",3]; var items = [item1,item2,item3,item4,item5,item6,item7,item8,item9,item10]; // edit this to alter the difficulty of the three levels function setLevel(){ // reset the scoring variable score = 0; // hard if(lvlNo == 3){ speed = 5; maxObjects = 3; intervalTime = 2000; swapTargets = true; rotateFlag = true; rotateSpeed = 5; holdTime = 2000; swapTargetTime = 5000; maxQ = 20; subtract = true; } // easy else if(lvlNo == 1){ speed = 5; maxObjects = 1; intervalTime = 3000; swapTargets = false; rotateFlag = false; rotateSpeed = 1; holdTime = 2000; swapTargetTime = 5000; maxQ = 5; subtract = false; } // tricky else if(lvlNo == 2){ speed = 5; maxObjects = 3; intervalTime = 2000; swapTargets = false; rotateFlag = false; rotateSpeed = 1; holdTime = 2000; swapTargetTime = 500; maxQ = 15; subtract = false; } } // ** only edit the functions ABOVE here function applyRules(e,t){ var flag = false; if(items[e][1] == t){ flag = true; // comment if the user is correct comment = correctComment; } else{ flag = false; if(items[e][1] == 1){ // comment for wrong answer category 1 comment = wrongComment + " " + items[e][0] + feedback1; } else if(items[e][1] == 2){ // comment for wrong answer category 2 comment = wrongComment + " " + items[e][0] + feedback2; } else if(items[e][1] == 3){ // comment for wrong answer category 3 comment = wrongComment + " " + items[e][0] + feedback3; } } return flag; } function setupScreen(){ // hides each falling object box _root.sobj1._visible = false; _root.sobj2._visible = false; _root.sobj3._visible = false; _root.sobj4._visible = false; _root.sobj5._visible = false; // blanks the text content of each falling object box _root.symbol1 = ""; _root.symbol2 = ""; _root.symbol3 = ""; _root.symbol4 = ""; _root.symbol5 = ""; // sets up the buttons visible on screen _root.goButton._visible = true; _root.stopButton._visible = false; // set difficulty button for level 1 difficulty.gotoAndStop("easy"); // show opening comment comment = openingComment; } // checks if an object is being dropped over a target box and the box is empty function overTarget(){ var flag = false; comment = ""; for(var i = 1;i <= targetNo;i++){ if(currObject.hitTest(targets[i])){ if (applyRules(parseInt(currObject.elNo),i) == true) { flag = true; currObject._x = targets[i]._x; currObject._y = targets[i]._y; currObject.activated = false; gotoAndPlay("delay"); } else{ createdObjects[parseInt(currObject.tag)] = false; removeMovieClip(currObject); if(subtract == true){ score = _root.score - 1; } } } } if (flag == false){ currObject.activated = true; } } // creates a new electron using the static object as a template when it is clicked function createObject(nextItem){ comment = ""; objNo = getNextObjectID(); // objNo = 5; if(objNo > 0){ layerNo = objNo; // create a new object and add item text to objects text box variable if(objNo == 1){ _root.sobj1.duplicateMovieClip("o" + objNo,layerNo); _root.symbol1 = _root.items[nextItem][0]; } else if(objNo == 2){ _root.sobj2.duplicateMovieClip("o" + objNo,layerNo); _root.symbol2 = _root.items[nextItem][0]; } else if(objNo == 3){ _root.sobj3.duplicateMovieClip("o" + objNo,layerNo); _root.symbol3 = _root.items[nextItem][0]; } else if(objNo == 4){ _root.sobj4.duplicateMovieClip("o" + objNo,layerNo); _root.symbol4 = _root.items[nextItem][0]; } else if(objNo == 5){ _root.sobj5.duplicateMovieClip("o" + objNo,layerNo); _root.symbol5 = _root.items[nextItem][0]; } createdObjects[objNo] = true; // creates some properties attached to the new object eval("o" + objNo)._x = myRandom(25,450); eval("o" + objNo)._y = -70; eval("o" + objNo).tag = objNo; eval("o" + objNo).activated = true; eval("o" + objNo).caught = 0; eval("o" + objNo).elNo = nextItem; objects[objNo] = eval("o" + objNo); } } // ### random integer generator function myRandom (minNo, maxNo) { r = Math.random(); // toss away 1 if we get it while (r == 1) { r = Math.random(); } return minNo + Math.floor(r * (maxNo + 1 - minNo)); } function dropNextItem(){ createObject(myRandom(0,9)); } function destroyObject(cobj){ createdObjects[parseInt(cobj.tag)] = false; removeMovieClip(cobj); } function getNextObjectID(){ var flag = 0; for(var i=maxObjects;i>=1;i--){ if(createdObjects[i] == false){ flag = i; } } return flag; } function runGame(){ if(playing == false){ comment = readyComment; setLevel(); goButton._visible = false; stopButton._visible = true; intervalID = setInterval(dropNextItem,intervalTime); if(swapTargets == true){ intervalID2 = setInterval(swapTargetPos,swapTargetTime); } playing = true; } } function stopGame(){ if(playing == true){ goButton._visible = true; stopButton._visible = false; clearInterval(intervalID); clearInterval(intervalID2); playing = false; for(var i=1;i<=5;i++){ if(createdObjects[i] == true){ removeMovieClip(eval("o" + i)); createdObjects[i] = false; } } } } function findClips(){ var myClip = _root; // work through all the movie clips on the main timeline for(var property in myClip){ // only deal with movie clip instances if(typeof myClip[property] == "movieclip"){ // store the _name property var tempStr = myClip[property]._name; // check for the word "target" in the name and store its position var tempIndex = tempStr.indexOf("target"); // only process movie clips that have "target" in their name if(tempIndex > -1){ // extract the number at the end of the name var tempCounter = parseInt(t‚§џџџƒ„…ўџџџ‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџempStr.substring(6,tempStr.length)); // use the number to store the name of the instance in the label array targets[tempCounter] = eval(myClip[property]._name); // add one to the targetNo variable targetNo ++; } } } } function swapTargetPos(){ var rndStart = 1; storeX = targets[rndStart]._x; storeY = targets[rndStart]._y; var startVar = rndStart; var nextVar = 0; for(var i=1;i<=targetNo;i++){ nextVar = startVar + 1; if(nextVar > targetNo){ nextVar = 1; } if(nextVar == rndStart){ targets[i]._x = storeX; targets[i]._y = storeY; } else{ targets[i]._x = targets[nextVar]._x; targets[i]._y = targets[nextVar]._y; } startVar = nextVar; } }€€€џџџ?џџENstop();€€€џџџ?џџ;2€€€џџџ?џџ"wcreatedObjects[parseInt(currObject.tag)] = false; removeMovieClip(currObject); score = score + 1; gotoAndStop("start");€€ scriptsџOOџ€€€€џџџ?џџsetup &€€€џџџ?џџstart‰k€€€џџџ?џџdelay €€ labels™3Ьџ€€ € labels™3Ьџ€€ € 1;i--){ if(createdObjects[i] == false){ flag = i; } } return flag; } function runGame(){ if(playing == false){ comment = readyComment; setLevel(); goButton._visible = false; stopButton._visible = true; intervalID = set)џџ CDocumentPagePage 1Scene 1 81DџџџџSЖІHџџџџ€ Symbol 21 watcherClip_д;D& Symbol 21џџџџ_д;Dџџџџ€ Symbol 10line шЕ:D Symbol 10џџџџЊЄHџџџџ€Symbol 1sobj1нU9DobjectSymbol 1џџџџ–ZЁHџџџџ€ Symbol 25sobj5fŽND. sobj1 copyџџџџОZЁHџџџџ€ Symbol 24sobj4[ŽND, sobj1 copyџџџџДZЁHџџџџ€ Symbol 23sobj3SŽND* sobj1 copyџџџџЋZЁHџџџџ€ Symbol 22sobj2KŽND( sobj1 copyџџџџ ZЁHџџџџ€ Symbol 19target1'Ј;Dtarget1 target2 copyџџџџxВЅHџџџџ€ Symbol 34target3"ЄВЅHЮ target1 copyџџџџЄВЅHџџџџ€ Symbol 33target2!ŸВЅHЬ target1 copyџџџџŸВЅHџџџџ€ Symbol 30 startButtonŒdЁHц .\quiz4.fla startButtonŸњЂHŒdЁHцŸњЂHџџџџ€ Symbol 31 stopButtonзњЂH* .\quiz4.fla stopButtonьњЂHзњЂH*ьњЂHџџџџ€ Symbol 32difficultyButton ggЁHі .\quiz4.fladifficultyButtonЪћЂHggЁHіЪћЂHџџџџ#€>р.hhhhhџџџџРРРџДz%PublishFormatProperties::htmlFileNametable"PublishHtmlProperties::StartPaused0!PublishGifProperties::PaletteName PublishRNWKProperties::speed256K0PublishFormatProperties::jpeg0Vector::Debugging Permitted0PublishHtmlProperties::Loop1"PublishQTProperties::MatchMovieDim1 PublishQTProperties::AlphaOption PublishQTProperties::LayerOptionPublishHtmlProperties::Units0$PublishPNGProperties::OptimizeColors1PublishQTProperties::Width550&PublishRNWKProperties::singleRateAudio0&PublishRNWKProperties::speedSingleISDN0%PublishFormatProperties::projectorMac0&PublishFormatProperties::flashFileName table.swfVector::Compress Movie1PublishGifProperties::Smooth1#PublishRNWKProperties::flashBitRate1200%PublishRNWKProperties::mediaCopyright(c) 2000PublishFormatProperties::html1$PublishFormatProperties::pngFileName table.png(PublishHtmlProperties::VerticalAlignment1PublishHtmlProperties::Quality4"PublishGifProperties::DitherOption"PublishRNWKProperties::exportAudio1 PublishRNWKProperties::speed384K0!PublishRNWKProperties::exportSMIL1Vector::Override Sounds0!PublishHtmlProperties::DeviceFont0"PublishPNGProperties::FilterOption'PublishRNWKProperties::mediaDescriptionPublishFormatProperties::gif0*PublishFormatProperties::generatorFileName table.swtVector::Template0Vector::Protect0Vector::Quality80*PublishHtmlProperties::HorizontalAlignment1"PublishHtmlProperties::DisplayMenu1PublishGifProperties::Interlace0"PublishGifProperties::DitherSolids0PublishPNGProperties::Smooth1PublishPNGProperties::BitDepth24-bit with AlphaPublishJpegProperties::DPI4718592PublishQTProperties::Flatten1#PublishFormatProperties::qtFileName table.movPublishGifProperties::Width550PublishGifProperties::Loop1PublishRNWKProperties::speed28K1!PublishRNWKProperties::mediaTitle$PublishRNWKProperties::mediaKeywordsPublishFormatProperties::flash1#PublishGifProperties::MatchMovieDim1#PublishGifProperties::PaletteOption"PublishPNGProperties::DitherOptionPublishJpegProperties::Quality80$PublishRNWKProperties::realVideoRate100000$PublishRNWKProperties::speedDualISDN0-PublishFormatProperties::projectorWinFileName table.exePublishHtmlProperties::Align0#PublishPNGProperties::MatchMovieDim1#PublishPNGProperties::PaletteOption$PublishJpegProperties::MatchMovieDim1%PublishFormatProperties::jpegFileName table.jpgVector::Omit Trace Actions0Vector::Debugging PasswordPublishHtmlProperties::Width550PublishHtmlProperties::Height400"PublishPNGProperties::DitherSolids0"PublishJpegProperties::Progressive0#PublishQTProperties::PlayEveryFrame0PublishFormatProperties::png0PublishFormatProperties::rnwk0-PublishFormatProperties::projectorMacFileName table.hqxVector::TopDown0!PublishHtmlProperties::WindowMode0'PublishHtmlProperties::TemplateFileNamePublishGifProperties::Height400PublishPNGProperties::Interlace0PublishJpegProperties::Size0"PublishFormatProperties::generator0Vector::Report0PublishGifProperties::LoopCount'PublishGifProperties::TransparentOptionPublishGifProperties::MaxColors255%PublishPNGProperties::RemoveGradients0PublishQTProperties::Height400PublishRNWKProperties::speed56K1PublishFormatProperties::qt0Vector::Stream Compress7Vector::Event Format0Vector::Version6$PublishGifProperties::OptimizeColors1"PublishRNWKProperties::audioFormat0Vector::Event Compress7PublishHtmlProperties::Scale0%PublishGifProperties::RemoveGradients0PublishPNGProperties::Width550PublishPNGProperties::Height400PublishJpegProperties::Height400 PublishRNWKProperties::speed512K0$PublishFormatProperties::gifFileName table.gifVector::Stream Format0PublishGifProperties::Animated0&PublishGifProperties::TransparentAlpha128!PublishPNGProperties::Transparent0!PublishPNGProperties::PaletteNamePublishJpegProperties::Width550*PublishQTProperties::UseQTSoundCompression0PublishQTProperties::Looping0"PublishRNWKProperties::exportFlash1&PublishRNWKProperties::showBitrateDlog1(PublishRNWKProperties::speedCorporateLAN0"PublishRNWKProperties::mediaAuthorPropSheet::ActiveTab1621%PublishFormatProperties::defaultNames1%PublishFormatProperties::projectorWin0%PublishFormatProperties::rnwkFileName table.smilPublishPNGProperties::MaxColors255%PublishQTProperties::ControllerOption0"PublishQTProperties::PausedAtStart0џџџџќџџ CColorDefџ€џ€џ€3џPя€fџPя0€™џPяH€ЬџPя`€џџPяx€3џя€33џ(я€3fџ<я0€3™џCяH€3ЬџFя`€3џџHяx€fџя0€f3џя0€ffџ(я0€f™џ5яH€fЬџ<я`€fџџ@яx€џ€333џ0€џ€3џ я€33џxя€f3џdя0€™3џ]яH€Ь3џZя`€џ3џXяx€33џШя€333џ0€3f3џPPH€3™3џPx`€3Ь3џPx€3џ3џPя€f3џмя0€f33џPH€ff3џ(PH€f™3џ<x`€fЬ3џCx€fџ3џFя€џ€fffџ`€џ€fџ я0€3fџŒя0€ffџxя0€™fџkяH€Ьfџdя`€џfџ`яx€3fџДя0€33fџ PH€3ffџxPH€3™fџdx`€3Ьfџ]x€3џfџZя€ffџШя0€f3fџШPH€fffџ`€f™fџP0x€fЬfџPx€fџfџPяЈ€џ€™™™џ€џ€™џ яH€3™џ“яH€f™џ…яH€™™џxяH€Ь™џnя`€џ™џhяx€3™џ­яH€33™џ x`€3f™џŒx`€3™™џxx`€3Ь™џkx€3џ™џdя€f™џЛяH€f3™џДx`€ff™џ 0x€f™™џx0x€fЬ™џdx€fџ™џ]яЈ€џ€ЬЬЬџР€џ€Ьџ я`€3Ьџ–я`€fЬџŒя`€™Ьџ‚я`€ЬЬџxя`€џЬџpяx€3ЬџЊя`€33Ьџ x€3fЬџ“x€3™Ьџ…x€3ЬЬџxx€3џЬџnя€fЬџДя`€f3Ьџ­x€ffЬџ x€f™ЬџŒx€fЬЬџxx€fџЬџkяЈ€џ€џџџџ№€џ€џџ яx€3џџ˜яx€fџџяx€™џџˆяx€Ьџџ€яx€џџџxяx€3џџЈяx€33џџ я€3fџџ–я€3™џџŒя€3Ьџџ‚я€3џџџxя€fџџАяx€f3џџЊя€ffџџ яЈ€f™џџ“яЈ€fЬџџ…яЈ€fџџџxяЈ€џ€џџяx€џ€™џяH€™3џ яH€™fџяH€™™џ(яH€™Ьџ2я`€™џџ8яx€Ьџя`€Ь3џ я`€Ьfџя`€Ь™џя`€ЬЬџ(я`€Ьџџ0яx€џџяx€џ3џяx€џfџяx€џ™џяx€џЬџ яx€џџџ(яx€џ€џџPяx€џ€™3џуяH€™33џx`€™f3џx`€™™3џ(x`€™Ь3џ5x€™џ3џ<я€Ь3џця`€Ь33џx€Ьf3џ x€Ь™3џx€ЬЬ3џ(x€Ьџ3џ2я€џ3џшяx€џ33џя€џf3џ я€џ™3џя€џЬ3џя€џџ3џ(я€џ€џџ яx€џ€™fџеяH€™3fџмx`€™ffџ0x€™™fџ(0x€™Ьfџ<x€™џfџCяЈ€Ьfџмя`€Ь3fџуx€Ьffџx€Ь™fџx€ЬЬfџ(x€Ьџfџ5яЈ€џfџряx€џ3fџця€џffџяЈ€џ™fџ яЈ€џЬfџяЈ€џџfџ(яЈ€џ€џџџ(яx€џ€™™џШяH€™3™џШx`€™f™џШ0x€™™™џ€™Ь™џPPЈ€™џ™џPяР€Ь™џвя`€Ь3™џеx€Ьf™џмx€Ь™™џPЈ€ЬЬ™џ(PЈ€Ьџ™џ<яР€џ™џияx€џ3™џмя€џf™џуяЈ€џ™™џяР€џЬ™џяР€џџ™џ(яР€џ€џџџxяx€џ€™ЬџОя`€™3ЬџЛx€™fЬџДx€™™Ьџ PЈ€™ЬЬџxPЈ€™џЬџdяР€ЬЬџШя`€Ь3ЬџШx€ЬfЬџШx€Ь™ЬџШPЈ€ЬЬЬџР€ЬџЬџPяи€џЬџаяx€џ3Ьџвя€џfЬџеяЈ€џ™ЬџмяР€џЬЬџяи€џџЬџ(яи€џ€џџџШяx€џ€™џџИяx€™3џџДя€™fџџ­яЈ€™™џџ яР€™ЬџџŒяР€™џџџxяР€ЬџџРяx€Ь3џџОя€ЬfџџЛяЈ€Ь™џџДяР€ЬЬџџ яи€Ьџџџxяи€џџџШяx€џ3џџШя€џfџџШяЈ€џ™џџШяР€џЬџџШяи€џџџџ№€џ€џџџџџџџ€џџџџџџџ€џџџџџ€џџџџџ€џџџџџ€џf§џ`џџџџzџџџџ€™fџЊџЬџџџџџџ€џџџ*џџџ]џџџџџЊџџдџџџџџџаФќ"PublishQTProperties::QTSndSettingsџџCQTAudioSettingsџџh€33fџ PH€3ffџxPH€3™fџdx`€3Ьfџ]x€3џfџZя€ffџШя0€f3fџШPH€fffџ`€f™fџP0x€fЬfџPx€fџfџPяЈ€џ