ࡱ> \Root Entryp|YrRASH`-ContentsPage 1RTHSymbol 59Q !#$%&f_STUVWXYZ^]ci[abdeghjklmnopqrstuvwxyz{|}~Root Entryp|YrRASH݇`-ContentsCPage 1jHSymbol 59_ " !#'$%&f()*+,-./0123456789:;<=>?@ABDEFGHIJKLMNOP]c[abdeghSymbol 50 PSymbol 48fSymbol 47 zSymbol 5tWCPicPage CPicLayer CPicFrame(U 0>00Uj>0"1?il backgroundOCPicText m*& hXVerdana(This is a random piece of text to demonstrate how the template might be used to produce a cloze passage.1?( decorationOO CPicSprite >  >d"box1  K M Kd&box2 ah Mah d^box31?a: boxesO o od?word1 i  i d@Oword2 ) )dAword3  dBSword41?H wordsOO CPicButtonq ~qd)3($on(release){ _root.onClickShow(); } showButtoneq eqd+]%on(release){ _root.onClickReset(); } resetButton b$ b$d4Y messageq qd*'on(release){ _root.calculateScore(); } scoreButton p pd;f scoreOutput1?_ controlsO,?   d/*% scoreboard?Y score?P[$// makes some important varables global by creating them at the start var xdif; var ydif; var mymc; var xadif = new array(); var yadif = new array(); var showClick; var randomPlace = new array(); var theClip; var thisWord; var boxNo = 0; var wordNo = 0; var showScore = false; var scoreVar = 0; var totalItems; // set up an array for the word destinations (the boxes) var boxes = new array(); //set up an array for the words var words = new array(); // set up an array for the correct answers var answer = new array(); // ** you can edit the code below this point ** // set the correct answer for each word so that the movie can check // answer[1] = word1 destination box answer[1] = 1; answer[2] = 2; answer[3] = 3; answer[4] = 0; answer[5] = 5; answer[6] = 6; answer[7] = 7; answer[8] = 8; answer[9] = 9; answer[10] = 10; // this variable sets how the sc0.0}0- cYc0Tt#Yƀ",,#0΀؀0V0O0P00 0)0o0000600+ 0MY(0\100QPʀ(04\b|8GZS\ـ U` Հ85=484z+85Q4no; ;D^k=-J$'U5400D00E00D001q0D00E00p00,ol0b  ? Layer 1OCPicPage CPicLayer CPicFrame?p CPicShape 3S7,_0/4_/4/4/4/404444444004h400B80h0r0%0I0@0L0H0&00C90 0BЀh44Ѐk4084hh40 0Ѐ0&00&0C`Ѐ0BYЀЀЀ0%00_/^///0/0|_,/09////^/094__h4//4h^h/k4/h/44/h/44^h4\h40?4/4/4/4//4//4_//0/_0/_0|000u0000000/0000/000_09`_00|00__?Sf&`&3S7,_0/4_/4/4/4/404444444004h400B80h0r0%0I0@0L0H0&00C90 0BЀh44Ѐk4084hh40 0Ѐ0&00&0C`Ѐ0BYЀЀЀ0%00_/^///0/0|_,/09////^/094__h4//4h^h/k4/h/44/h/44^h4\h40?4/4/4/4//4//4_//0/_0/_0|000u0000000/0000/000_09`_00|00__?;)?j  CPicSymbol 8?@ 8?(%?u textO?Fstop();?T?gotoAndStop("off");? ??0gotoAndStop("off"); scriptsOO?off??correcte?wrong/A labelsOOCPicPage CPicLayer CPicFrame (000v?yd 00v0(?%C boxOOCPicText $Verdana(reset?N  $Verdana(reset?az textOCPicPage CPicLayer CPicFrame 00v0(?h& (000v?x boxOOCPicText 8Verdana(score?I textOCPicPage CPicLayer CPicFrame 00v0(?-(s (000v?i boxOOCPicText $Verdana(show?z  $Verdana(show?o textOCPicPage CPicLayer CPicFrames 00v0(?_s (000v?? boxOOCPicText $Verdana(OK?0  $Verdana(OK?d textOCPicPage CPicLayer CPicFrame CPicShapesP000P?E_ boxOCPicPage CPicLayer CPicFrame CPicShape|Y^Osnl2 00R0? backgroundOCPicText ore is displayed // 1 = percentage (50%), 2 = score out of total (5/10) var scoreType = 2; // this variable sets if the score is shown in a dialog or all the time // 1 = dialog, 2 = continuously var scoreDialog = 2; // this variable sets if you allow the user to have multiple attempts for each word // 1 = yes, 2 = no (only scores first time) var attempts = 2; // this variable sets if a wrong answer goes back to its starting position // 1 = go back, 2 = stay, 3 = stay until select score var sendWordBack =P Verdana"You scored?Z labelO  U@_root.scorePercentVerdana"?  scoreO?O %3 CPicButton5 5 (>+on(release){ _root.gotoAndStop("start"); }?~n buttonOOCPicPage CPicLayer CPicFrame CPicSprite d2E?h Layer 1OCPicPage CPicLayer CPicFrame CPicShape7s :000 0?`9 Layer 1OCPicPage CPicLayer CPicFrameCPicText +C@_root.scorePercentVerdana" 1; // this variable sets if you want the tick or cross to appear // 1 = yes, 2 = no var tick = 1; // this variable sets if the text labels are randomised // 1 = yes, 2 = no var randomWords = 1; // this variable sets if more than one text label can be placed on the target boxes // 1 = no, 2 = yes var duplicateDrop = 1; // ** you should not change any code below this point ** // find all the instances of box (target) and word (labels) findClips(); countItems(); // hide the score button if score is shown all the time if(scoreDialog == 2){ scoreButton._visible = false; scoreOutput._visible = true; calculateScore(); } else{ scoreButton._visible = true; scoreOutput._visible = false; } // set the reset position of each word to its starting position for(var i=1;i<=wordNo;i++){ words[i].starty = words[i]._y; words[i].startx = words[i]._x; } // sets up array to use when sending back selected labels var selWord = new array(); // sets up an array to store if a word has already been tried var usedWord = new array(); for(var i=1;i<=wordNo;i++){ usedWord[i] = 0; } // functions to mix up and place text labels randomiseWords(); placeWords(); // function linked to reset button function onClickReset(){ showClick = false; for(var i=1;i<= wordNo;i++){ usedWord[i] = 0; words[i]._visible = true; } randomiseWords(); allGoBack(); } // sends an individual word back to its start position function sendBack(backLabel){ mymc = backLabel; xdif = (mymc._x - mymc.startx) / 10; ydif = (mymc._y - mymc.starty) / 10; gotoAndPlay("goback"); } // sends all words back to start position function allGoBack(){ for (var i = 1;i <= wordNo;i++){ xadif[i] = (words[i]._x - words[i].startx) / 10; yadif[i] = (words[i]._y - words[i].starty) / 10; selWord[i] = true; } gotoAndPlay("allback"); } // sends selected words back to start position function someGoBack(){ for (var i = 1;i <= wordNo;i++){ xadif[i] = (words[i]._x - words[i].startx) / 10; yadif[i] = (words[i]._y - words[i].starty) / 10; } showClick = false; gotoAndPlay("allback"); } // checks if a word is being dropped over a destination box and responds accordingly function overBox(currWord){ var flag = false; // loop to identify the word that has been dropped for(var i=1;i <= wordNo;i++){ if(currWord == words[i]){ thisWord = i; } } // loop to find out which box it was dropped into for(var i = 1;i <= boxNo;i++){ if(currWord.hitTest(boxes[i])){ // check if the box has already got a word in it if(occTest(boxes[i],currWord) == false){ // position the word into the centre of the box flag = true; currWord._x = boxes[i]._x + ((boxes[i]._width - currWord._width)/2); currWord._y = boxes[i]._y + ((boxes[i]._height - currWord._height)/2); // note that the word has been used usedWord[thisWord] ++; // check if it is correct checkAnswer(currWord); } } } if (flag == false){ sendBack(currWord); } } // checks if a destination box is already occupied function occTest(currBox,thisWord){ var flag = false; if(duplicateDrop == 1){ for(var i = 1;i <= wordNo;i++){ if(words[i] != thisWord){ if(currBox.hitTest(words[i])){ flag = true; } } } } return flag; } // function to check if the answer is correct function checkAnswer(checkWord){ scoreVar = 0; for(var i = 1;i <= wordNo;i++){ selWord[i] = false; } for(var j = 1;j <= boxNo;j++){ if(words[thisWord].hitTest(boxes[j])){ if(j == answer[thisWord]){ if(attempts == 1 or (attempts == 2 and usedWord[thisWord] == 1)){ // mark the answer to hide it later theClip = checkWord; if(duplicateDrop == 2){ theClip._visible = false; } // play a "correct" message if(tick == 1){ message.gotoAndPlay("correct"); } } } else { // mark the object to be sent back selWord[thisWord] = true; // play a "wrong" message if(tick == 1){ message.gotoAndPlay("wrong"); } } } } if(scoreDialog == 2){ calculateScore(); } showClick = false; // send the object back if it is incorrect if(sendWordBack == 1){ someGoBack(); } } // does what it says on the tin function calculateScore(){ scoreVar = 0; for(var i = 1;i <= wordNo;i++){ selWord[i] = false; } for(var i = 1;i <= wordNo;i++){ for(var j = 1;j <= boxNo;j++){ if(words[i].hitTest(boxes[j])){ if(j == answer[i]){ if(attempts == 1 or (attempts == 2 and usedWord[i] == 1)){ scoreVar = scoreVar + 1; } } else { selWord[i] = true; } } } } showClick = false; if(scoreType == 1){ scorePercent = Math.round((scoreVar / totalItems) * 100) + "%"; } else{ scorePercent = scoreVar + " / " + totalItems; } if(scoreDialog == 1){ if(sendWordBack == 3){ showScore = true; someGoBack(); } else{ gotoAndPlay("score"); } } } // click handler for show button function onClickShow(){ for (var i = 1;i <= WordNo;i++){ if(answer[i]> 0){ xadif[i] = (words[i]._x - (boxes[answer[i]]._x + ((boxes[answer[i]]._width - words[i]._width)/2))) / 10; yadif[i] = (words[i]._y - (boxes[answer[i]]._y + ((boxes[answer[i]]._height - words[i]._height)/2))) / 10; selWord[i] = true; } } showClick = true; gotoAndPlay("allback"); } // mix up words function randomiseWords(){ if(randomWords == 1){ // reset the array for(var i=1;i<=wordNo;i++){ randomPlace[i] = -1; } // give a random number to each answer for(var i=1;i<=wordNo;i++){ do{ var flag = false; var r = myRandom(1,wordNo); for(var j=1;j<=wordNo;j++){ // has the value been chosen already if(r == randomPlace[j]){ flag = true; } else{ // no, do nothing } } }while(flag == true) randomPlace[i] = r; } placeWords(); } } // 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)); } // place words function placeWords(){ if(randomWords == 1){ for(var i=1;i<=wordNo;i++){ words[i]._y = words[randomPlace[i]].starty; words[i]._x = words[randomPlace[i]].startx; } for(var i=1;i<=wordNo;i++){ words[i].starty = words[i]._y; words[i].startx = words[i]._x; } } else{ for(var i=1;i<=wordNo;i++){ words[i]._y = words[i].starty; words[i]._x = words[i].startx; } } } // find the words and boxes 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; // find all the box instances // check for the word "box" in the name and store its position var tempIndex = tempStr.indexOf("box"); // only process movie clips that have "box" in their name if(tempIndex > -1){ // extract the number at the end of the name var tempCounter = parseInt(tempStr.substring(3,tempStr.length)); // use the number to store the name of the instance in the array boxes[tempCounter] = eval(myClip[property]._name); // add one to the numObjects variable boxNo ++; } // find all the word instances // check for the word "word" in the name and store its position var tempIndex = tempStr.indexOf("word"); // only process movie clips that have "word" in their name if(tempIndex > -1){ // extract the number at the end of the name var tempCounter = parseInt(tempStr.substring(4,tempStr.length)); // use the number to store the name of the instance in the array words[tempCounter] = eval(myClip[property]._name); // add one to the numObjects variable wordNo ++; } } } } function countItems(){ totalItems = 0; for(var i=1;i<=wordNo;i++){ if(answer[i] > 0){ totalItems ++; } } }?+// hide the score button if score is shown all the time if(scoreDialog == 2){ scoreButton._visible = false; scoreOutput._visible = true; } else{ scoreButton._visible = true; scoreOutput._visible = false; } if(scoreDialog == 2 and showClick == false){ calculateScore(); } stop();?3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?a3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?:3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?{ 3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?P3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;? 3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?83mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?;w3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?3Jmymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif; gotoAndStop("start"); ?rfor(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?%for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?pbfor(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?4for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?dPfor(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?TMfor(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?9for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?;for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } } if(showScore == true){ showScore = false; gotoAndPlay("score"); } else { gotoAndStop("start"); }?Lyscoreboard._x = (_root._width - scoreboard._width) / 2; scoreboard._y = (_root._height - scoreboard._height) / 2; stop(); scriptsOO?setvars>Q?startim?gobackj?allbackO?scoreF\ labelsO hH Symbol 59 scoreoutput;&H Symbol 59''H Symbol 50shape2݊H Symbol 50) CDocumentPagePage 1Scene 1eAџH Symbol 59 scoreoutput;&H Symbol 59''H Symbol 50shape2݊H Symbol 50݊H Symbol 48 background0{sH Symbol 48݊H Symbol 47 scoreboard/+HR Symbol 47,HSymbol 5boxDA7Symbol 5I'H Symbol 40ok(DŽA@.\photosynthesis.flaokMȄADŽA@MȄA Symbol 41show)YĄA:.\photosynthesis.flashowYĄAYĄA:YĄA Symbol 42score*yĄA>.\photosynthesis.flascoreĄAyĄA>ĄA Symbol 43reset+gĄA<.\photosynthesis.flaresetĄAgĄA<ĄA Symbol 52message4,"H..\alternatives\true_false.flamessagePH,"H܎H Symbol 56Tween 18wF..\alternatives\true_false.flaTween 1wFwFwF Symbol 63word1?A.\drag_and_drop.flaword1HAyH Symbol 64word2@H word1 copyH Symbol 65word3AH word2 copyH Symbol 66word4B*H; word3 copyBHC*@hhhhh CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3fSymbol 50 PSymbol 48fSymbol 47 zSymbol 5tWCPicPage CPicLayer CPicFrame(U 0>00Uj>0"1?il backgroundOCPicText m*& hXVerdana(This is a random piece of text to demonstrate how the template might be used to produce a cloze passage.1?( decorationOO CPicSprite >  >d"box1  K M Kd&box2 ah Mah d^box31?a: boxesO o od?word1 i  i d@Oword2 ) )dAword3  dBSword41?H wordsOO CPicButtonq ~qd)3($on(release){ _root.onClickShow(); } showButtoneq eqd+]%on(release){ _root.onClickReset(); } resetButton b$ b$d4Y messageq q*'on(release){ _root.calculateScore(); } p p;f1?_ controlsO,?   d/*% scoreboard?Y score?P[$// makes some important varables global by creating them at the start var xdif; var ydif; var mymc; var xadif = new array(); var yadif = new array(); var showClick; var randomPlace = new array(); var theClip; var thisWord; var boxNo = 0; var wordNo = 0; var showScore = false; var scoreVar = 0; var totalItems; // set up an array for the word destinations (the boxes) var boxes = new array(); //set up an array for the words var words = new array(); // set up an array for the correct answers var answer = new array(); // ** you can edit the code below this point ** // set the correct answer for each word so that the movie can check // answer[1] = word1 destination box answer[1] = 1; answer[2] = 2; answer[3] = 3; answer[4] = 0; answer[5] = 5; answer[6] = 6; answer[7] = 7; answer[8] = 8; answer[9] = 9; answer[10] = 10; // this variable sets how the score is displayed // 1 = percentage (50%), 2 = score out of total (5/10) var scoreType = 2; // this variable sets if the score is shown in a dialog or all the time // 1 = dialog, 2 = continuously var scoreDialog = 1; // this variable sets if you allow the user to have multiple attempts for each word // 1 = yes, 2 = no (only scores first time) var attempts = 2; // this variable sets if a wrong answer goes back to its starting position // 1 = go back, 2 = stay, 3 = stay until select score var sendWordBack = 1; // this variable Symbol 52Symbol 56!Symbol 63Symbol 64  "#$%&'()*+,-./012345679:;<=>?@ABCDEFGIJKLMNOPQRSUVWXYZ[\]^_`abcefghijklmnopqrsuvwxy{|}~Symbol 65 Symbol 66sets if you want the tick or cross to appear // 1 = yes, 2 = no var tick = 1; // this variable sets if the text labels are randomised // 1 = yes, 2 = no var randomWords = 1; // this variable sets if more than one text label can be placed on the target boxes // 1 = no, 2 = yes var duplicateDrop = 1; // ** you should not change any code below this point ** // find all the instances of box (target) and word (labels) findClips(); countItems(); // hide the score button if score is shown all the time if(scorSymbol 40 dSymbol 41TSymbol 42 HSymbol 438CPicPage CPicLayer CPicFrame CPicSprite U d Ud0q]on(press){ _parent.startDrag(false); } on(release){ stopDrag(); _root.overBox(_parent); }?l backgroundOOCPicText Q XVerdana"cheese?yP textO CPicSprCPicPage CPicLayer CPicFrame CPicSprite U d Ud0e]on(press){ _parent.startDrag(false); } on(release){ stopDrag(); _root.overBox(_parent); }?  backgroundOOCPicText Q XVerdana"passage?); textOdCPicPage CPicLayer CPicFrame CPicSprite\- l\-d0 p]on(press){ _parent.startDrag(false); } on(release){ stopDrag(); _root.overBox(_parent); }?xg backgroundOOCPicText Q XVerdana"templateCPicPage CPicLayer CPicFrame CPicShape3S~ S m000cYb0t#9Y":, 1-1#90(1(1(Ӏ1(Ӏ0VC0NG Y0PB00 80)00e00 0D00E00E0020C0 0D0000*Pl0cTm  Verdana"Score?D Layer 1O?J textOCPicPage CPicLayer CPicFrame CPicSprite- M-d0S]on(press){ _parent.startDrag(false); } on(release){ stopDrag(); _root.overBox(_parent); }?LB backgroundOOCPicText QK XVerdana"random?!8 textOeDialog == 2){ scoreButton._visible = false; scoreOutput._visible = true; calculateScore(); } else{ scoreButton._visible = true; scoreOutput._visible = false; } // set the reset position of each word to its starting position for(var i=1;i<=wordNo;i++){ words[i].starty = words[i]._y; words[i].startx = words[i]._x; } // sets up array to use when sending back selected labels var selWord = new array(); // sets up an array to store if a word has already been tried var usedWord = new array(); for(var i=1;i<=wordNo;i++){ usedWord[i] = 0; } // functions to mix up and place text labels randomiseWords(); placeWords(); // function linked to reset button function onClickReset(){ showClick = false; for(var i=1;i<= wordNo;i++){ usedWord[i] = 0; words[i]._visible = true; } randomiseWords(); allGoBack(); } // sends an individual word back to its start position function sendBack(backLabel){ mymc = backLabel; xdif = (mymc._x - mymc.startx) / 10; ydif = (mymc._y - mymc.starty) / 10; gotoAndPlay("goback"); } // sends all words back to start position function allGoBack(){ for (var i = 1;i <= wordNo;i++){ xadif[i] = (words[i]._x - words[i].startx) / 10; yadif[i] = (words[i]._y - words[i].starty) / 10; selWord[i] = true; } gotoAndPlay("allback"); } // sends selected words back to start position function someGoBack(){ for (var i = 1;i <= wordNo;i++){ xadif[i] = (words[i]._x - words[i].startx) / 10; yadif[i] = (words[i]._y - words[i].starty) / 10; } showClick = false; gotoAndPlay("allback"); } // checks if a word is being dropped over a destination box and responds accordingly function overBox(currWord){ var flag = false; // loop to identify the word that has been dropped for(var i=1;i <= wordNo;i++){ if(currWord == words[i]){ thisWord = i; } } // loop to find out which box it was dropped into for(var i = 1;i <= boxNo;i++){ if(currWord.hitTest(boxes[i])){ // check if the box has already got a word in it if(occTest(boxes[i],currWord) == false){ // position the word into the centre of the box flag = true; currWord._x = boxes[i]._x + ((boxes[i]._width - currWord._width)/2); currWord._y = boxes[i]._y + ((boxes[i]._height - currWord._height)/2); // note that the word has been used usedWord[thisWord] ++; // check if it is correct checkAnswer(currWord); } } } if (flag == false){ sendBack(currWord); } } // checks if a destination box is already occupied function occTest(currBox,thisWord){ var flag = false; if(duplicateDrop == 1){ for(var i = 1;i <= wordNo;i++){ if(words[i] != thisWord){ if(currBox.hitTest(words[i])){ flag = true; } } } } return flag; } // function to check if the answer is correct function checkAnswer(checkWord){ scoreVar = 0; for(var i = 1;i <= wordNo;i++){ selWord[i] = false; } for(var j = 1;j <= boxNo;j++){ if(words[thisWord].hitTest(boxes[j])){ if(j == answer[thisWord]){ if(attempts == 1 or (attempts == 2 and usedWord[thisWord] == 1)){ // mark the answer to hide it later theClip = checkWord; if(duplicateDrop == 2){ theClip._visible = false; } // play a "correct" message if(tick == 1){ message.gotoAndPlay("correct"); } } } else { // mark the object to be sent back selWord[thisWord] = true; // play a "wrong" message if(tick == 1){ message.gotoAndPlay("wrong"); } } } } if(scoreDialog == 2){ calculateScore(); } showClick = false; // send the object back if it is incorrect if(sendWordBack == 1){ someGoBack(); } } // does what it says on the tin function calculateScore(){ scoreVar = 0; for(var i = 1;i <= wordNo;i++){ selWord[i] = false; } for(var i = 1;i <= wordNo;i++){ for(var j = 1;j <= boxNo;j++){ if(words[i].hitTest(boxes[j])){ if(j == answer[i]){ if(attempts == 1 or (attempts == 2 and usedWord[i] == 1)){ scoreVar = scoreVar + 1; } } else { selWord[i] = true; } } } } showClick = false; if(scoreType == 1){ scorePercent = Math.round((scoreVar / totalItems) * 100) + "%"; } else{ scorePercent = scoreVar + " / " + totalItems; } if(scoreDialog == 1){ if(sendWordBack == 3){ showScore = true; someGoBack(); } else{ gotoAndPlay("score"); } } } // click handler for show button function onClickShow(){ for (var i = 1;i <= WordNo;i++){ if(answer[i]> 0){ xadif[i] = (words[i]._x - (boxes[answer[i]]._x + ((boxes[answer[i]]._width - words[i]._width)/2))) / 10; yadif[i] = (words[i]._y - (boxes[answer[i]]._y + ((boxes[answer[i]]._height - words[i]._height)/2))) / 10; selWord[i] = true; } } showClick = true; gotoAndPlay("allback"); } // mix up words function randomiseWords(){ if(randomWords == 1){ // reset the array for(var i=1;i<=wordNo;i++){ randomPlace[i] = -1; } // give a random number to each answer for(var i=1;i<=wordNo;i++){ do{ var flag = false; var r = myRandom(1,wordNo); for(var j=1;j<=wordNo;j++){ // has the value been chosen already if(r == randomPlace[j]){ flag = true; } else{ // no, do nothing } } }while(flag == true) randomPlace[i] = r; } placeWords(); } } // 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)); } // place words function placeWords(){ if(randomWords == 1){ for(var i=1;i<=wordNo;i++){ words[i]._y = words[randomPlace[i]].starty; words[i]._x = words[randomPlace[i]].startx; } for(var i=1;i<=wordNo;i++){ words[i].starty = words[i]._y; words[i].startx = words[i]._x; } } else{ for(var i=1;i<=wordNo;i++){ words[i]._y = words[i].starty; words[i]._x = words[i].startx; } } } // find the words and boxes 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; // find all the box instances // check for the word "box" in the name and store its position var tempIndex = tempStr.indexOf("box"); // only process movie clips that have "box" in their name if(tempIndex > -1){ // extract the number at the end of the name var tempCounter = parseInt(tempStr.substring(3,tempStr.length)); // use the number to store the name of the instance in the array boxes[tempCounter] = eval(myClip[property]._name); // add one to the numObjects variable boxNo ++; } // find all the word instances // check for the word "word" in the name and store its position var tempIndex = tempStr.indexOf("word"); // only process movie clips that have "word" in their name if(tempIndex > -1){ // extract the number at the end of the name var tempCounter = parseInt(tempStr.substring(4,tempStr.length)); // use the number to store the name of the instance in the array words[tempCounter] = eval(myClip[property]._name); // add one to the numObjects variable wordNo ++; } } } } function countItems(){ totalItems = 0; for(var i=1;i<=wordNo;i++){ if(answer[i] > 0){ totalItems ++; } } }?+// hide the score button if score is shown all the time if(scoreDialog == 2){ scoreButton._visible = false; scoreOutput._visible = true; } else{ scoreButton._visible = true; scoreOutput._visible = false; } if(scoreDialog == 2 and showClick == false){ calculateScore(); } stop();?3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?a3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?:3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?{ 3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?P3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;? 3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?83mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?;w3mymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif;?3Jmymc._x = mymc._x - xdif; mymc._y = mymc._y - ydif; gotoAndStop("start"); ?rfor(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?%for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?pbfor(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?4for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?dPfor(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?TMfor(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?9for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } }?;for(var i = 1;i <= wordNo;i++){ if(selWord[i]){ words[i]._x = words[i]._x - xadif[i]; words[i]._y = words[i]._y - yadif[i]; } } if(showScore == true){ showScore = false; gotoAndPlay("score"); } else { gotoAndStop("start"); }?Lyscoreboard._x = (_root._width - scoreboard._width) / 2; scoreboard._y = (_root._height - scoreboard._height) / 2; stop(); scriptsOO?setvars>Q?startim?gobackj?allbackO?scoreF\ labelsO ݴH Symbol 59 scoreoutput;&H Symbol 59''H Symbol 50shape2݊H Symbol 50) CDocumentPagePage 1Scene 1eAuH Symbol 59 scoreoutput;&H Symbol 59''H Symbol 50shape2݊H Symbol 50݊H Symbol 48 background0{sH Symbol 48݊H Symbol 47 scoreboard/+HR Symbol 47,HSymbol 5boxDA7Symbol 5I'H Symbol 40ok(DŽA@.\photosynthesis.flaokMȄADŽA@MȄA Symbol 41show)YĄA:.\photosynthesis.flashowYĄAYĄA:YĄA Symbol 42score*yĄA>.\photosynthesis.flascoreĄAyĄA>ĄA Symbol 43reset+gĄA<.\photosynthesis.flaresetĄAgĄA<ĄA Symbol 52message4,"H..\alternatives\true_false.flamessagePH,"H܎H Symbol 56Tween 18wF..\alternatives\true_false.flaTween 1wFwFwF Symbol 63word1?A.\drag_and_drop.flaword1HAyH Symbol 64word2@H word1 copyH Symbol 65word3AH word2 copyH Symbol 66word4B*H; word3 copyBHC*@hhhhh CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3ff`zf*]hf`zf*]h