ࡱ> ,Root Entryp|YrRASHprDI-kContents",Page 1.Symbol 40h  r =./0123456789:;<>W?@ABCDEFGHIJKLMOPQRSTUV Y[ghijkmnoqsltuvwxyz{|}~Root Entryp|YrRASH H-kContents\",Page 1.Symbol 40h r  !"#$%&'()*+N=./0123456789:;<>W?@ABCDEFGHIJKLMOZPQRSTUV Y[g]^_`abcdefphijkmnoqsltuvwxyz{|}~ Symbol 15PSymbol 16BOSymbol 274KSymbol 41&KSymbol 25JSymbol 1XASymbol 53Symbol 54tSymbol 55"Symbol 56Symbol 57!#{Symbol 58g Symbol 218JSymbol 22*RSymbol 23JSymbol 24QSymbol 15PSymbol 16BOSymbol 274KSymbol 41&K?Z Layer 1OO_<CPicPage CPicLayer CPicFrame fffd}"A#tߚ$X043 WA!o$P$0 .O!4!0F_܀?HSymbol 44 KSymbol 46 KSymbol 48 KSymbol 50 KSymbol 25JSymbol 1XASymbol 53Symbol 54t fffxF_܀0"A#tߚ$X043 WA!o$P$0 .O!4!0?# backgroundOCPicText a&F Napa Heavy SF"(Reset?i  a&F Napa Heavy SF"(Reset?38 textOOPeekCPicPage CPicLayer CPicFrame fffd1t43 WA!o$P$0 .O!4!0F_܀0"A#tߚ$X? fffxF_܀0"A#tߚ$X043 WA!o$P$0 .O!4!0? backgroundOCPicText a[F Napa Heavy SF"(CPicPage CPicLayer CPicFrame?N Layer 1OPeek?!Z  a[F Napa Heavy SF"(Peek?u textOOCPicPage CPicLayer CPicFrame?b$ Layer 1O&L-onClipEvent(enterFrame){ // calculate tht `IE ' Napa Heavy SF"(Pair up the elements with their symbols?$ Layer 1O6N outputMessage" 04CPicPage CPicLayer CPicFrame ;H@pfffdp{ 4$u44;0Z4KSt4:;v0y4S4;v0c44Ƥy?) backgroundO CPicSprite   d)on(release){ _root.turnCardSymbol 17 pJSymbol 18bQSymbol 19TJSymbol 20FPOver(this); }card1   d_v)on(release){ _root.turnCardOver(this); }card2    dP)on(release){ _root.turnCardOver(this); }card3    d+)on(release){ _root.turnCardOver(this); }card4 &  & d)on(release){ _root.turnCardOver(this); }card5 !.  !. da)on(release){ _root.turnCardOver(this); }card6  d:)on(release){ _root.turnCardOver(this); }card7   d)on(release){ _root.turnCardOver(this); }card8  d{ )on(release){ _root.turnCardOver(this); }card9  dP)on(release){ _root.turnCardOver(this); }card10 & &d )on(release){ _root.turnCardOver(this); }card11 !. !.d8)on(release){ _root.turnCardOver(this); }card12 p pd;w)on(release){ _root.turnCardOver(this); }card13  p pd3)on(release){ _root.turnCardOver(this); }card14 p pdr)on(release){ _root.turnCardOver(this); }card15 p pd%)on(release){ _root.turnCardOver(this); }card16 &p &pd)on(release){ _root.turnCardOver(this); }card17 !.p !.pdpb)on(release){ _root.turnCardOver(this); }card18 # #d4)on(release){ _root.turnCardOver(this); }card19  # #d)on(release){ _root.turnCardOver(this); }card20 # #ddP)on(release){ _root.turnCardOver(this); }card21 # #dTM)on(release){ _root.turnCardOver(this); }card22 &# &#d9)on(release){ _root.turnCardOver(this); }card23 !.# !.#d;)on(release){ _root.turnCardOver(this); }card24y?#H cardsO CPicButton7G# 7G#d8>Q_on(release){ _root.peeking = true; _root.gotoAndPlay("peek"); _root.peek._visible = false; }peek$7G# 7G#d9jHMon(release){ clearInterval(_root.intervalID); _root.gotoAndPlay("setup"); }resetCPicText K4;@_root.moveCount2 Napa Heavy SF"(' K4T@_root.pairCount Napa Heavy SF"(' 04 Napa Heavy SF"(Moves' 04  Napa Heavy SF"(Pairs (< (<5ssonClipEvent(enterFrame){ // calculate the number of moves from the number of flips so far _root.moveCount2 = int(_root.moveCount / 2); // carry out some instructions if the user finds all the pairs if(_root.pairCount == 12){ _root.watchtoggle = "off"; _root.outputMessage._visible = true; _root.startMessage._visible = false; _root.reset._visible = true; } } @+ @+d:/ startMessage @+ @+d6hY outputMessage' 04 Napa Heavy SF"(Time' K3m F@ _root.display Napa Heavy SF"(y?L controls3 ?,// create an array to manipulate the 24 cards on screen using code var card = new Array(); card[1] = card1; card[2] = card2; card[3] = card3; card[4] = card4; card[5] = card5; card[6] = card6; card[7] = card7; card[8] = card8; card[9] = card9; card[10] = card10; card[11] = card11; card[12] = card12; card[13] = card13; card[14] = card14; card[15] = card15; card[16] = card16; card[17] = card17; card[18] = card18; card[19] = card19; card[20] = card20; card[21] = card21; card[22] = card22; card[23] = card23; card[24] = card24; // make sure that they are all showing backs for(var i=1;i<=24;i++){ _root.card[i].gotoAndPlay("back"); } // create array to store each items randomised number var mix = new Array(); // randomly select each items random number for(var i=1;i<=24;i++){ mix[i] = 0; } var flag; for(var i=1;i<=24;i++){ do{ flag = true; var pick = 1 + Math.floor(Math.random() * 24); for(j=1;j<=24;j++){ if(mix[j] == pick and j != i){ flag = false; } } } while(flag == false); mix[i] = pick; } // attach the randomised number to each card symbol for(var i=1;i<=24;i++){ card[i].item = mix[i]; } // declare global variables var turnCount = 0; var pairCount = 0; var moveCount = 0; var moveCount2 = 0; var turnCard = new Array(); var peeking = false; // declare some variables for stopwatch var intervalID = setInterval(stopwatch,10); var tenths = 0; var hundredths = 0; var seconds = 0; var minutes = 0; var display = "00:00:00"; var watchtoggle = "off"; // hide some stuff outputMessage._visible = false; startMessage._visible = true; peek._visible = true; reset._visible = false; // function to check if two cards match function checkMatch(){ // check the numbers on flipped cards var small = Math.min(eval(turnCard[1]).item,eval(turnCard[2]).item); var big = Math.max(eval(turnCard[1]).item,eval(turnCard[2]).item); // check if the numbers are consecutive if(big - small != 1){ // not consecutive so cannot be a match return false; } // check if the small number is odd if(Math.floor(small / 2) != (small / 2)){ // number is odd so its a match return true; } else{ return false; } } // function called whenever a card is clicked function turnCardOver(thisCard){ // first check that the card hasn't already been flipped and that // two cards aren't already flipped if(thisCard._currentframe == 1 and _root.turnCount < 2 and _root.peeking == false){ // start the timer (if it isn't already started) if(watchtoggle == "off"){ watchtoggle = "on"; } // make sure that the peek button is hidden _root.peek._visible = false; // flip the card thisCard.gotoAndPlay("flip"); // increment various game counters _root.turnCount +=1; _root.moveCount +=1; // store the card's name so it can be flipped back later _root.turnCard[_root.turnCount] = thisCard._name; // if two have been flipped, check if they match if(_root.turnCount == 2){ // call function that checks for match if(_root.checkMatch() == true){ _root.pairCount +=1; _root.turnCount = 0; } else{ // no match so pass to part of timeline that flips them back _root.gotoAndPlay("wait"); } } } } // stopwatch function function stopwatch(){ if(_root.watchtoggle == "on"){ var output = ""; hundredths += 1; if(hundredths < 10){ output = "0" + hundredths; } else if(hundredths >= 10 and hundredths < 100){ output = "" + hundredths; } else if(hundredths == 100){ seconds += 1; hundredths = 0; output = "0" + hundredths; } if(seconds == 0){ output = "00:" + output; } else if(seconds < 10){ output = "0" + seconds + ":" + output; } else if(seconds >= 10 and seconds < 60){ output = seconds + ":" + output; } else if(seconds > 59){ minutes += 1; seconds = 0; output = "00:" + output; } if(minutes == 0){ output = "00:" + output; } else if(minutes < 10){ output = "0" + minutes + ":" + output; } else{ output = minutes + ":" + output; } display = output; } }?J?stop();?J _root.turnCount = 0; eval(turnCard[1]).gotoAndPlay("flipback"); eval(turnCard[2]).gotoAndPlay("flipback"); gotoAndStop("start");L?^>for(var i=1;i<=24;i++){ _root.card[i].gotoAndPlay("front"); }?WNjfor(var i=1;i<=24;i++){ _root.card[i].gotoAndPlay("back"); } _  !"#$%&'()+,-./012345679:;<=>?@ABCDEGHIJKLMNOPQRSUVWXYZ[\]^_`acdefghijklmnoqrstuvwxyz{|}CPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?> backgroundOCPicText PYArial Rounded MT Bold"(H?I content3?2_stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?" backgroundOCPicText L" YArial Rounded MT Bold"(Hydrogen?@K content3?xXstop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?V backgroundOCPicText PYArial Rounded MT Bold"(K?2 content3? stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04? & backgroundOCPicText L"Z Y Arial Rounded MT Bold"(Potassium?k content3? stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04? backgroundOCPicText PYArial Rounded MT Bold"(S? content3?ENstop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04? backgroundOCPicText L"u YXArial Rounded MT Bold"(Sulphur?]n content3?stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?Zz backgroundOCPicText PYArial Rounded MT Bold"(N?}v content3? Estop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?f backgroundOCPicText L"Xh Y0Arial Rounded MT Bold"(Nitrogen?B content3?&stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?9 backgroundOCPicText PYArial Rounded MT Bold"(C?- content3?Mstop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04؁o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?u backgroundOCPicText L"YXArial Rounded MT Bold"(Neon?WF content3?I,stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?< backgroundOCPicText L" YXArial Rounded MT Bold"(Copper? content3?/stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?< backgroundOCPicText L"-YXArial Rounded MT Bold"(Zinc? content3?@stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?  backgroundOCPicText L"= YXArial Rounded MT Bold"(Helium?{ content3?rWstop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?" backgroundOCPicText L"# YXArial Rounded MT Bold"(Chlorine?Y content3?@stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04? backgroundOCPicText L" YXArial Rounded MT Bold"(Sodium?k6 content3?fstop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?}y backgroundOCPicText L"Nf YXArial Rounded MT Bold"(Calcium?I_ content3? stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?il backgroundOCPicText Y"Arial Rounded MT Bold"(Ne?( content3?a:stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?-B backgroundOCPicText Y"Arial Rounded MT Bold"(Cu?T content3?6stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?#root.peeking = false; gotoAndStop("start"); scriptsOO ?setuphO ?startvX?waitf backgroundOCPicText ]Y"Arial Rounded MT Bold"(Zn?H content3?SWstop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?,i backgroundOCPicText Y"Arial Rounded MT Bold"(He?J content3?~stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04? backgroundOCPicText ],Y"Arial Rounded MT Bold"(Cl?s content3?Xstop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?2` backgroundOCPicText Y"Arial Rounded MT Bold"(Na?;, content3?stop(); scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?^ backgroundOCPicText Y"Arial Rounded MT Bold"(Ca?M content3?DIstop();     !"#$%'()*+,-./012356789:;<=>?@ACDEFGHIJKLMNOQRSTUVWXYZ[\]^_`abcdefijklmnopqrsuvwxyz|}~CPicPage CPicLayer CPicFrame CPicSprite dJflipcard?g dAflipcard?Z dflipcard?& d.flipcard? M?peek labelsOO?_?3(?tx d<flipcard? CPicShape 333xw04fʹ3ˀ|0H5{463g04K E66̀60M9ɀ) CDocumentPagePage 1Scene 1F:H Symbol 56peek8F Symbol 56IF Symbol 57reset9$F peek copy JF Symbol 55 stopwatch7F Symbol 55F Symbol 54 outputMessage6F Symbol 54*F Symbol 58 startMessage:HFoutputMessage copyIF Symbol 53watcher56F Symbol 536F Symbol 40 backimage(F  Symbol 40)F Symbol 15flipcardqF Symbol 15hHF Symbol 16front1䖽FF flipcard copyϪH Symbol 27front12䖽FF front1 copyF Symbol 41front14)䖽FˠFcard fronts/front12 copyF Symbol 44front16,䖽FFcard fronts/front14 copyF Symbol 46front18.䖽F0Fcard fronts/front16 copySF Symbol 48front200䖽FhFcard fronts/front18 copyơF Symbol 50front222䖽FסF!card fronts/front20 copyF Symbol 52front244䖽FF%card fronts/front22 copyF Symbol 26front11䖽FyF front1 copynF Symbol 43front13+䖽F֠Fcard fronts/front11 copyF Symbol 42front15*䖽FFcard fronts/front11 copyF Symbol 45front17-䖽F(Fcard fronts/front15 copyFF Symbol 47front19/䖽F`Fcard fronts/front17 copyF Symbol 49front211䖽FϡFcard fronts/front19 copy䡽F Symbol 51front233䖽FF#card fronts/front21 copyF Symbol 17front2䖽F*F front1 copyIF Symbol 18front3䖽F=F front2 copyF Symbol 19front4䖽FFF front3 copy F Symbol 20front5䖽FLF front4 copy3F?~ 333xw04fʹ3ˀ|0H5{463g04K E66̀60M9ɀ-? 9 border3?>?333?$?^0333? D?I?M G?M M?M p?& 8? E c? Symbol 45OSymbol 47MSymbol 49OSymbol 51~M;2?EN 0?  u?  6k?xX ;?2_ L?  @. Symbol 21front6䖽FSF front5 copyF Symbol 22front7䖽FZF front6 copyHF Symbol 23front8䖽FaF front7 copy>F?DI +0B?f )"TSymbol 52 KSymbol 26PSymbol 43OSymbol 42Q? *?@ ,&?X -?rW .?~ /]?@ 0`?SW 1j?/ 2f ?6 3a<?I, 4"?a: contentO?H%flipcard.gotoAndStop("back"); stop();?flipcard.gotoAndStop("back");?raflipcard.gotoAndStop("front");?rkgotoAndPlay("front");?2flipcard.gotoAndStop("front");?@flipcard.gotoAndStop("back");?qgotoAndStop("back");?gotoAndStop(this.item + 29);?O?JI?w?D??k?9P?,T?S?k???_?3(?tx?$? +??]?j?Z?L?_?Y  scriptsOO?back~ ?flip5 ?flipback?front2g?1"m?2?3?4F?5?6?7-:?8H`?9W?10E?11u ?127?13?14Y?15*%?167?17?18I?19+D?20xP?21?22@?23D{?24Y labelsOO ?6 scriptsOOCPicPage CPicLayer CPicFrame UFÇ04o4Ç80S4 3Oy 4=r8(q0^ 4V&4{={04?T backgroundOCPicText L"5~ YXArial Rounded MT Bold"(Carbon?9 content3?-stop(); scriptsOOCPicPage CPicLayer CPicFrame ;H@pfffdp{ 4$u44;0Z4KSt4:;v0y4S4;v0c44Ƥy?) backgroundO CPicSprite   d)on(release){ _root.turnCardOver(this); }card1   d_v)on(release){ _root.turnCardOver(this); }card2    dP)on(release){ _root.turnCardOver(this); }card3    d+)on(release){ _root.turnCardOver(this); }card4 &  Symbol 24front9䖽FiF front8 copy`F Symbol 25front10䖽FqF front9 copyxFSymbol 1card.hhhhh CColorDef$$$3P$fP0$PH$P`$Px$3$33($3f<0$3CH$3F`$3Hx$f0$f30$ff(0$f5H$f<`$f@x$$3330$$3$33x$f3d0$3]H$3Z`$3Xx$33$3330$3f3PPH$33Px`$33Px$33P$f30$f33PH$ff3(PH$f3<x`$f3Cx$f3F$$fff`$$f0$3f0$ffx0$fkH$fd`$f`x$3f0$33fPH$3ffxPH$3fdx`$3f]x$3fZ$ff0$f3fPH$fff`$ffP0x$ffPx$ffP$$$$H$3H$fH$xH$̙n`$hx$3H$33x`$3fx`$3xx`$3̙kx$3d$fH$f3x`$ff0x$fx0x$f̙dx$f]$$$$`$3`$f`$`$x`$px$3`$33x$3fx$3x$3xx$3n$f`$f3x$ffx$fx$fxx$fk$$$$x$3x$fx$x$x$xx$3x$33$3f$3$3$3x$fx$f3$ff$f$f$fx$$x$$H$3 H$fH$(H$2`$8x$`$3 `$f`$̙`$(`$0x$x$3x$fx$x$ x$(x$$Px$$3H$33x`$f3x`$3(x`$35x$3<$3`$33x$f3 x$̙3x$3(x$32$3x$33$f3 $3$3$3($$x$$fH$3fx`$ff0x$f(0x$f<x$fC$f`$3fx$ffx$̙fx$f(x$f5$fx$3f$ff$f $f$f($$(x$$H$3x`$f0x$$̙PP$P$`$3x$fx$̙P$̙(P$<$x$3$f$$̙$($$xx$$`$3x$fx$P$xP$d$`$3x$fx$̙P$$P$x$3$f$$$($$x$$x$3$f$$$x$x$3$f$̙$$x$x$3$f$$$$$S$ & d)on(release){ _root.turnCardOver(this); }card5 !.  !. da)on(release){ _root.turnCardOver(this); }card6  d:)on(release){ _root.turnCardOver(this); }card7   CPicPage CPicLayer CPicFrame CPicSymbol ( ?7333x04fʹ3ˀ|0H5{463g04K E66̀60M9ɀ?J CPicShape 333xw04fʹ3ˀ|0H5{463g04K E66̀60M9ɀ?, contentO?rstop();?Ristop(); scriptsOO?back_?frontI labelsOO labelsOOCPicPage CPicLayer CPicFrameCPicTexd)on(release){ _root.turnCardOver(this); }card8  d{ )on(release){ _root.turnCardOver(this); }card9  dP)on(release){ _root.turnCardOver(this); }card10 & &d )on(release){ _root.turnCardOver(this); }card11 !. !.d8)on(release){ _root.turnCardOver(this); }card12 p pd;w)on(release){ _root.turnCardOver(this); }card13  p pd3)on(release){ _root.turnCardOver(this); }card14 p pdr)on(release){ _root.turnCardOver(this); }card15 p pd%)on(release){ _root.turnCardOver(this); }card16 &p &pd)on(release){ _root.turnCardOver(this); }card17 !.p !.pdpb)on(release){ _root.turnCardOver(this); }card18 # #d4)on(release){ _root.turnCardOver(this); }card19  # #d)on(release){ _root.turnCardOver(this); }card20 # #ddP)on(release){ _root.turnCardOver(this); }card21 # #dTM)on(release){ _root.turnCardOver(this); }card22 &# &#d9)on(release){ _root.turnCardOver(this); }card23 !.# !.#d;)on(release){ _root.turnCardOver(this); }card24y?#H cardsO CPicButton7G# 7G#d8>Q_on(release){ _root.peeking = true; _root.gotoAndPlay("peek"); _root.peek._visible = false; }peek$7G# 7G#d9jHMon(rel$$$$$f`zf$*] card fronts䖽Fease){ clearInterval(_root.intervalID); _root.gotoAndPlay("setup"); }resetCPicText K4;@_root.moveCount2 Napa Heavy SF"(' K4T@_root.pairCount Napa Heavy SF"(' 04 Napa Heavy SF"(Moves' 04  Napa Heavy SF"(Pairs (< (<5ssonClipEvent(enterFrame){ // calculate the number of moves from the number of flips so far _root.moveCount2 = int(_root.moveCount / 2); // carry out some instructions if the user finds all the pairs if(_root.pairCount == 12){ _root.watchtoggle = "off"; _root.outputMessage._visible = true; _root.startMessage._visible = false; _root.reset._visible = true; } } @+ @+d:/ startMessage @+ @+d6hY outputMessage' 04 Napa Heavy SF"(Time' K3m F@ _root.display Napa Heavy SF"(y?L controls3 ?,// create an array to manipulate the 24 cards on screen using code var card = new Array(); card[1] = card1; card[2] = card2; card[3] = card3; card[4] = card4; card[5] = card5; card[6] = card6; card[7] = card7; card[8] = card8; card[9] = card9; card[10] = card10; card[11] = card11; card[12] = card12; card[13] = card13; card[14] = card14; card[15] = card15; card[16] = card16; card[17] = card17; card[18] = card18; card[19] = card19; card[20] = card20; card[21] = card21; card[22] = card22; card[23] = card23; card[24] = card24; // make sure that they are all showing backs for(var i=1;i<=24;i++){ _root.card[i].gotoAndPlay("back"); } // create array to store each items randomised number var mix = new Array(); // randomly select each items random number for(var i=1;i<=24;i++){ mix[i] = 0; } var flag; for(var i=1;i<=24;i++){ do{ flag = true; var pick = 1 + Math.floor(Math.random() * 24); for(j=1;j<=24;j++){ if(mix[j] == pick and j != i){ flag = false; } } } while(flag == false); mix[i] = pick; } // attach the randomised number to each card symbol for(var i=1;i<=24;i++){ card[i].item = mix[i]; } // declare global variables var turnCount = 0; var pairCount = 0; var moveCount = 0; var moveCount2 = 0; var turnCard = new Array(); var peeking = false; // declare some variables for stopwatch var intervalID = setInterval(stopwatch,10); var tenths = 0; var hundredths = 0; var seconds = 0; var minutes = 0; var display = "00:00:00"; var watchtoggle = "off"; // hide some stuff outputMessage._visible = false; startMessage._visible = true; peek._visible = true; reset._visible = false; // function to check if two cards match function checkMatch(){ // check the numbers on flipped cards var small = Math.min(eval(turnCard[1]).item,eval(turnCard[2]).item); var big = Math.max(eval(turnCard[1]).item,eval(turnCard[2]).item); // check if the numbers are consecutive if(big - small != 1){ // not consecutive so cannot be a match return false; } // check if the small number is odd if(Math.floor(small / 2) != (small / 2)){ // number is odd so its a match return true; } else{ return false; } } // function called whenever a card is clicked function turnCardOver(thisCard){ // first check that the card hasn't already been flipped and that // two cards aren't already flipped if(thisCard._currentframe == 1 and _root.turnCount < 2 and _root.peeking == false){ // start the timer (if it isn't already started) if(watchtoggle == "off"){ watchtoggle = "on"; } // make sure that the peek button is hidden _root.peek._visible = false; // flip the card thisCard.gotoAndPlay("flip"); // increment various game counters _root.turnCount +=1; _root.moveCount +=1; // store the card's name so it can be flipped back later _root.turnCard[_root.turnCount] = thisCard._name; // if two have been flipped, check if they match if(_root.turnCount == 2){ // call function that checks for match if(_root.checkMatch() == true){ _root.pairCount +=1; _root.turnCount = 0; } else{ // no match so pass to part of timeline that flips them back _root.gotoAndPlay("wait"); } } } } // stopwatch function function stopwatch(){ if(_root.watchtoggle == "on"){ var output = ""; hundredths += 1; if(hundredths < 10){ output = "0" + hundredths; } else if(hundredths >= 10 and hundredths < 100){ output = "" + hundredths; } else if(hundredths == 100){ seconds += 1; hundredths = 0; output = "0" + hundredths; } if(seconds == 0){ output = "00:" + output; } else if(seconds < 10){ output = "0" + seconds + ":" + output; } else if(seconds >= 10 and seconds < 60){ output = seconds + ":" + output; } else if(seconds > 59){ minutes += 1; seconds = 0; output = "00:" + output; } if(minutes == 0){ output = "00:" + output; } else if(minutes < 10){ output = "0" + minutes + ":" + output; } else{ output = minutes + ":" + output; } display = output; } }?J?stop();?J _root.turnCount = 0; eval(turnCard[1]).gotoAndPlay("flipback"); eval(turnCard[2]).gotoAndPlay("flipback"); gotoAndStop("start");L?^>for(var i=1;i<=24;i++){ _root.card[i].gotoAndPlay("front"); }?WNjfor(var i=1;i<=24;i++){ _root.card[i].gotoAndPlay("back"); } _root.peeking = false; gotoAndStop("start"); scriptsOO ?setuphO ?startvX?waitfM?peek labelsOO ?startvX?waitf) CDocumentPagePage 1Scene 1FH Symbol 56peek8F Symbol 56IF Symbol 57reset9$F peek copy JF Symbol 55 stopwatch7F Symbol 55F Symbol 54 outputMessage6F Symbol 54*F Symbol 58 startMessage:HFoutputMessage copyIF Symbol 53watcher56F Symbol 536F Symbol 40 backimage(F  Symbol 40)F Symbol 15flipcardqF Symbol 15hHF Symbol 16front1䖽FF flipcard copyϪH Symbol 27front12䖽FF front1 copyF Symbol 41front14)䖽FˠFcard fronts/front12 copyF Symbol 44front16,䖽FFcard fronts/front14 copyF Symbol 46front18.䖽F0Fcard fronts/front16 copySF Symbol 48front200䖽FhFcard fronts/front18 copyơF Symbol 50front222䖽FסF!card fronts/front20 copyF Symbol 52front244䖽FF%card fronts/front22 copyF Symbol 26front11䖽FyF front1 copynF Symbol 43front13+䖽F֠Fcard fronts/front11 copyF Symbol 42front15*䖽FFcard fronts/front11 copyF Symbol 45front17-䖽F(Fcard fronts/front15 copyFF Symbol 47front19/䖽F`Fcard fronts/front17 copyF Symbol 49front211䖽FϡFcard fronts/front19 copy䡽F Symbol 51front233䖽FF#card fronts/front21 copyF Symbol 17front2䖽F*F front1 copyIF Symbol 18front3䖽F=F front2 copyF Symbol 19front4䖽FFF front3 copy F Symbol 20front5䖽FLF front4 copy3F Symbol 21front6䖽FSF front5 copyF Symbol 22front7䖽FZF front6 copyHF Symbol 23front8䖽FaF front7 copy>F Symbol 24front9䖽FiF front8 copy`F Symbol 25front10䖽FqF front9 copyxFSymbol 1card.hhhhh CColorDef$$$3P$fP0$PH$P`$Px$3$33($3f<0$3CH$3F`$3Hx$f0$f30$ff(0CPicPage CPicLayer CPicFrame`@0^0 3GXDq0gP>E:IH3 :    !Ӏ+:0d04000y982-'0"ɀ~,  ""  $f5H$f<`$f@x$$3330$$3$33x$f3d0$3]H$3Z`$3Xx$33$3330$3f3PPH$33Px`$33Px$33P$f30$f33PH$ff3(PH$f3<x`$f3Cx$f3F$$fff`$$f0$3f0$ffx0$fkH$fd`$f`x$3f0$33fPH$3ffxPH$3fdx`$3f]x$3fZ$ff0$f3fPH$fff`$ffP0x$ffPx$ffP$$$$H$3H$fH$xH$̙n`$hx$3H$33x`$3fx`$3xx`$3̙kx$3d$fH$f3x`$ff0x$fx0x$f̙dx$f]$$$)0n SJ*2?l= Layer 1O  CPicPage CPicLayer CPicFrameCPicText `Ib# Napa Heavy SF"(Well Done - Can you beat your time?$`$3`$f`$`$x`$px$3`$33x$3fx$3x$3xx$3n$f`$f3x$ffx$fx$fxx$fk$$$$x$3x$fx$x$x$xx$3x$33$3f$3$3$3x$fx$f3$ff$f$f$fx$$x$$H$3 H$fH$(H$2`$8x$`$3 `$f`$̙`$(`$0x$x$3x$fx$x$ x$(x$$Px$$3H$33x`$f3x`$3(x`$35x$3<$3`$33x$f3 x$̙3x$3(x$32$3x$33$f3 $3$3$3($$x$$fH$3fx`$ff0x$f(0x$f<x$fC$f`$3fx$ffx$̙fx$f(x$f5$fx$3f$ff$f $f$f($$(x$$H$3x`$f0x$$̙PP$P$`$3x$fx$̙P$̙(P$<$x$3$f$$̙$($$xx$$`$3x$fx$P$xP$d$`$3x$fx$̙P$$P$x$3$f$$$($$x$$x$3$f$$$x$x$3$f$̙$$x$x$3$f$$$$$S$$$$$$f`zf$*] card fronts䖽Fh$$$$f`zf$*]  card fronts䖽F