Frame 22
ifFrameLoaded (61) {
gotoAndPlay (24);
}
Frame 23
gotoAndPlay (22);
Frame 28
stop();
Frame 29
player = "0";
if (Number(cards) == 24) {
tellTarget ("/misses") {
miss = "0";
};
tellTarget ("/matches") {
match = "0";
gotoAndStop (1);
};
tellTarget ("/score") {
points = "200";
};
gotoAndStop (30);
}
Frame 30
tellTarget ("/Congratulations") {
stop();
};
numRows = "3";
numCols = "8";
numCells = numRows * numCols;
i = "1";
while (Number(i) < Number(numCells)) {
Set("pos" add i, i);
i = Number(i) + 1;
}
empty = numCells;
i = "1";
while (Number(numCols) >= Number(i)) {
Set("x" add i, getProperty("/p" add i, _x));
i = Number(i) + 1;
}
i = "1";
while (Number(numRows) >= Number(i)) {
Set("y" add i, getProperty("/p" add (1 + ((i - 1) * numCols)), _y));
i = Number(i) + 1;
}
lo = 1;
up = 24;
call("Shuffle");
Set("/:state", "1");
gotoAndStop (31);
Frame 31
stop();
Frame 33
tellTarget ("/matches") {
match = Number(match) + 1;
nextFrame();
};
tellTarget ("/score") {
points = Number(points) + 25;
};
tellTarget (/:movie) {
gotoAndPlay ("none");
};
movie = "";
Set("/:state", "1");
tellTarget ("/sfx") {
gotoAndPlay ("yes");
};
Frame 38
tellTarget (/:movie) {
gotoAndPlay ("open");
};
tellTarget ("/misses") {
miss = Number(miss) + 1;
};
tellTarget ("/score") {
points = points - 10;
};
Set("/:state", "1");
tellTarget ("/sfx") {
gotoAndPlay ("no");
};
Frame 42
Set("/:state", "2");
Frame 46
i = 1;
while (Number(numCells) >= Number(i)) {
Set("cell" add i, i);
i = Number(i) + 1;
}
i = 1;
while (Number(numCells) >= Number(i)) {
Set("random" add i, random(1000));
i = Number(i) + 1;
}
while (Number(lo) < Number(up)) {
i = lo;
j = lo;
while (Number(i) < Number(up)) {
if (eval ("random" add (i + 1)) < eval ("random" add i)) {
temp = eval ("random" add i);
Set("random" add i, eval ("random" add (i + 1)));
Set("random" add (i + 1), temp);
temp = eval ("cell" add i);
Set("cell" add i, eval ("cell" add (i + 1)));
Set("cell" add (i + 1), temp);
j = i;
}
i = Number(i) + 1;
}
up = j;
i = up;
while (Number(lo) < Number(i)) {
if (eval ("random" add i) < eval ("random" add (i - 1))) {
temp = eval ("random" add i);
Set("random" add i, eval ("random" add (i - 1)));
Set("random" add (i - 1), temp);
temp = eval ("cell" add i);
Set("cell" add i, eval ("cell" add (i - 1)));
Set("cell" add (i - 1), temp);
j = i;
}
i = i - 1;
}
lo = j;
}
i = "1";
r = "1";
c = "1";
while (Number(numCells) >= Number(i)) {
piece = eval ("cell" add i);
if (piece) {
setProperty("/p" add piece, _x , eval ("x" add c));
setProperty("/p" add piece, _y , eval ("y" add r));
}
c = Number(c) + 1;
if (Number(numCols) < Number(c)) {
c = 1;
r = Number(r) + 1;
}
i = Number(i) + 1;
}
Frame 49
if (Number(player) == 0) {
gotoAndPlay (29);
} else {
gotoAndStop (29);
}
Frame 52
play();
tellTarget ("/score") {
if (Number(points) == 500) {
Set("/:rating", "RANKING: PSYCHIC!");
} else if ((Number(points) < 500) and (350 < Number(points))) {
Set("/:rating", "RANKING: GENIUS!");
} else if ((Number(points) < 350) and (200 < Number(points))) {
Set("/:rating", "RANKING: BRANIAC");
} else if ((Number(points) < 200) and (50 < Number(points))) {
Set("/:rating", "RANKING: ROOM TO GROW");
} else {
Set("/:rating", "RANKING: OBVIOUSLY DISTRACTED");
}
};
Frame 59
tellTarget ("/sfx") {
gotoAndPlay ("end");
};
Frame 61
stop();
Symbol 10 MovieClip Frame 1
_root.percent = "% " add int(100 * (_root.getBytesLoaded() / _root.getBytesTotal()));
Symbol 10 MovieClip Frame 2
gotoAndPlay (1);
Symbol 29 MovieClip Frame 418
gotoAndPlay (1);
Symbol 49 Button
on (release) {
cards = "24";
gotoAndStop (29);
}
Symbol 55 Button
on (release) {
gotoAndStop (28);
}
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 6
_parent.peak.head.gotoAndPlay("laugh");
Symbol 59 MovieClip Frame 12
stop();
Symbol 59 MovieClip Frame 17
_parent.peak.gotoAndPlay("shrug");
Symbol 59 MovieClip Frame 22
stop();
Symbol 59 MovieClip Frame 37
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 13
tellTarget ("/") {
call("/:Win");
gotoAndPlay ("Win");
};
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 2
tellTarget ("/") {
gotoAndPlay ("win");
};
Symbol 68 MovieClip Frame 1
if (Number(points) == 500) {
Set("/:rating", "Perfect Score!");
} else if ((Number(points) < 500) and (350 < Number(points))) {
Set("/:rating", "Excellent!");
} else if ((Number(points) < 350) and (200 < Number(points))) {
Set("/:rating", "Good");
} else if ((Number(points) < 200) and (50 < Number(points))) {
Set("/:rating", "Fair");
} else {
Set("/:rating", "Poor");
}
Symbol 86 MovieClip Frame 30
gotoAndPlay (1);
Symbol 86 MovieClip Frame 40
gotoAndPlay (1);
Symbol 89 MovieClip Frame 1
gotoAndPlay (1);
Symbol 89 MovieClip Frame 61
gotoAndPlay (1);
Symbol 89 MovieClip Frame 70
gotoAndPlay (1);
Symbol 92 Button
on (release) {
gotoAndPlay (49);
}
Symbol 97 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p1");
Set("/:guess", "1");
call("/:Click");
nextFrame();
} else if (/:guess ne "1") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p2");
call("/:Match");
}
}
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 10
gotoAndStop (1);
Symbol 99 MovieClip Frame 20
stop();
Symbol 100 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p2");
Set("/:guess", "1");
call("/:Click");
nextFrame();
} else if (/:guess ne "1") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p1");
call("/:Match");
}
}
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 10
gotoAndStop (1);
Symbol 101 MovieClip Frame 20
stop();
Symbol 102 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p3");
Set("/:guess", "2");
call("/:Click");
nextFrame();
} else if (/:guess ne "2") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p4");
call("/:Match");
}
}
Symbol 104 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 10
gotoAndStop (1);
Symbol 104 MovieClip Frame 20
stop();
Symbol 105 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p4");
Set("/:guess", "2");
call("/:Click");
nextFrame();
} else if (/:guess ne "2") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p3");
call("/:Match");
}
}
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 10
gotoAndStop (1);
Symbol 106 MovieClip Frame 20
stop();
Symbol 107 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p5");
Set("/:guess", "3");
call("/:Click");
nextFrame();
} else if (/:guess ne "3") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p6");
call("/:Match");
}
}
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 10
gotoAndStop (1);
Symbol 109 MovieClip Frame 20
stop();
Symbol 110 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p6");
Set("/:guess", "3");
call("/:Click");
nextFrame();
} else if (/:guess ne "3") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p5");
call("/:Match");
}
}
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 10
gotoAndStop (1);
Symbol 111 MovieClip Frame 20
stop();
Symbol 112 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p7");
Set("/:guess", "4");
call("/:Click");
nextFrame();
} else if (/:guess ne "4") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p8");
call("/:Match");
}
}
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 10
gotoAndStop (1);
Symbol 114 MovieClip Frame 20
stop();
Symbol 115 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p8");
Set("/:guess", "4");
call("/:Click");
nextFrame();
} else if (/:guess ne "4") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p7");
call("/:Match");
}
}
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 10
gotoAndStop (1);
Symbol 116 MovieClip Frame 20
stop();
Symbol 117 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p11");
Set("/:guess", "6");
call("/:Click");
nextFrame();
} else if (/:guess ne "6") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p12");
call("/:Match");
}
}
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 10
gotoAndStop (1);
Symbol 119 MovieClip Frame 20
stop();
Symbol 120 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p13");
Set("/:guess", "7");
call("/:Click");
nextFrame();
} else if (/:guess ne "7") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p14");
call("/:Match");
}
}
Symbol 122 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 10
gotoAndStop (1);
Symbol 122 MovieClip Frame 20
stop();
Symbol 123 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p12");
Set("/:guess", "6");
call("/:Click");
nextFrame();
} else if (/:guess ne "6") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p11");
call("/:Match");
}
}
Symbol 124 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 10
gotoAndStop (1);
Symbol 124 MovieClip Frame 20
stop();
Symbol 125 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p14");
Set("/:guess", "7");
call("/:Click");
nextFrame();
} else if (/:guess ne "7") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p13");
call("/:Match");
}
}
Symbol 126 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 10
gotoAndStop (1);
Symbol 126 MovieClip Frame 20
stop();
Symbol 127 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p15");
Set("/:guess", "8");
call("/:Click");
nextFrame();
} else if (/:guess ne "8") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p16");
call("/:Match");
}
}
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 10
gotoAndStop (1);
Symbol 129 MovieClip Frame 20
stop();
Symbol 130 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p16");
Set("/:guess", "8");
call("/:Click");
nextFrame();
} else if (/:guess ne "8") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p15");
call("/:Match");
}
}
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 10
gotoAndStop (1);
Symbol 131 MovieClip Frame 20
stop();
Symbol 132 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p10");
Set("/:guess", "5");
call("/:Click");
nextFrame();
} else if (/:guess ne "5") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p9");
call("/:Match");
}
}
Symbol 134 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 10
gotoAndStop (1);
Symbol 134 MovieClip Frame 20
stop();
Symbol 135 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p9");
Set("/:guess", "5");
call("/:Click");
nextFrame();
} else if (/:guess ne "5") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (10);
Set("/:movie", "/p10");
call("/:Match");
}
}
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 9
gotoAndStop (1);
Symbol 136 MovieClip Frame 19
stop();
Symbol 137 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p21");
Set("/:guess", "11");
call("/:Click");
nextFrame();
} else if (/:guess ne "11") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p22");
call("/:Match");
}
}
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 10
gotoAndStop (1);
Symbol 139 MovieClip Frame 20
stop();
Symbol 140 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p22");
Set("/:guess", "11");
call("/:Click");
nextFrame();
} else if (/:guess ne "11") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p21");
call("/:Match");
}
}
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 10
gotoAndStop (1);
Symbol 141 MovieClip Frame 20
stop();
Symbol 142 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p23");
Set("/:guess", "12");
call("/:Click");
nextFrame();
} else if (/:guess ne "12") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p24");
call("/:Match");
}
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 10
gotoAndStop (1);
Symbol 143 MovieClip Frame 20
stop();
Symbol 144 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p24");
Set("/:guess", "12");
call("/:Click");
nextFrame();
} else if (/:guess ne "12") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p23");
call("/:Match");
}
}
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 10
gotoAndStop (1);
Symbol 145 MovieClip Frame 20
stop();
Symbol 146 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p17");
Set("/:guess", "9");
call("/:Click");
nextFrame();
} else if (/:guess ne "9") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p18");
call("/:Match");
}
}
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 10
gotoAndStop (1);
Symbol 148 MovieClip Frame 20
stop();
Symbol 149 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p18");
Set("/:guess", "9");
call("/:Click");
nextFrame();
} else if (/:guess ne "9") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p17");
call("/:Match");
}
}
Symbol 150 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 10
gotoAndStop (1);
Symbol 150 MovieClip Frame 20
stop();
Symbol 151 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p19");
Set("/:guess", "10");
call("/:Click");
nextFrame();
} else if (/:guess ne "10") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p20");
call("/:Match");
}
}
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 10
gotoAndStop (1);
Symbol 153 MovieClip Frame 20
stop();
Symbol 154 Button
on (release) {
if (/:state eq "1") {
Set("/:movie", "/p20");
Set("/:guess", "10");
call("/:Click");
nextFrame();
} else if (/:guess ne "10") {
gotoAndPlay (2);
call("/:Reset");
} else {
gotoAndPlay (11);
Set("/:movie", "/p19");
call("/:Match");
}
}
Symbol 155 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 10
gotoAndStop (1);
Symbol 155 MovieClip Frame 20
stop();
Symbol 161 Button
on (release) {
call("Reset");
gotoAndPlay (29);
}