Frame 1
Object.prototype.gameMC = this;
Object.prototype.containerMC = _parent;
ifFrameLoaded (104) {
containerMC.resetContainer();
gotoAndPlay ("start");
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
Frame 4
function toggleSound() {
if (sownd == "on") {
sownd = "off";
i = 1;
while (i <= 8) {
gameMC["sound_" + i].setVolume(0);
i++;
}
} else {
sownd = "on";
sound_1.setVolume(20);
i = 2;
while (i <= 8) {
gameMC["sound_" + i].setVolume(100);
i++;
}
}
border.soundOnOff.gotoAndPlay(sownd);
}
gameMC.createEmptyMovieClip("soundLib", 1);
i = 1;
while (i <= 8) {
soundLib.createEmptyMovieClip("holder_" + i, i);
gameMC["sound_" + i] = new Sound(soundLib["holder_" + i]);
i++;
}
sound_2.attachSound("clank");
sound_3.attachSound("wobble");
sound_4.attachSound("flap");
sound_5.attachSound("tick");
sound_6.attachSound("sadClown");
sound_7.attachSound("laugh");
sound_1.setVolume(20);
sound_1.start(0, 999);
sownd = "on";
Frame 35
stop();
Frame 69
function resetGame() {
trace("new game");
match_alert.gotoAndStop("off");
verdict = "";
total = 100;
xSpacing = 75.5;
ySpacing = 104.3;
xOffset = 190;
yOffset = -58.3;
x = [0, xSpacing + xOffset, (xSpacing * 2) + xOffset, (xSpacing * 3) + xOffset, (xSpacing * 4) + xOffset, (xSpacing * 5) + xOffset, (xSpacing * 6) + xOffset];
y = [0, ySpacing + yOffset, (ySpacing * 2) + yOffset, (ySpacing * 3) + yOffset, (ySpacing * 4) + yOffset];
var _local1 = 1;
while (_local1 <= 12) {
gameMC["set" + _local1].gotoAndStop("off");
gameMC[("set" + _local1) + "a"].gotoAndStop("off");
_local1++;
}
resetCardWatch();
total_matches = 0;
num_moves = 0;
shuffle_cards2();
playing = true;
soundReady = true;
seconds = 121;
timerInterval = setInterval(decrementTimer, 1000);
}
function resetCardWatch() {
card_num = 0;
card_1 = "-";
card_2 = "-";
card_1_dup = "-";
card_2_dup = "-";
joker.gotoAndStop("default");
}
function winner() {
verdict = "win";
match_alert.gotoAndPlay("you_win");
sound_7.start(0, 0);
joker.gotoAndPlay("sad");
clearInterval(timerInterval);
}
function check_cards(which_one, duplicate) {
sound_3.start(0, 0);
card_num = card_num + 1;
if (card_num == 1) {
card_1 = which_one;
card_1_dup = duplicate;
} else if (card_num == 2) {
card_2 = which_one;
card_2_dup = duplicate;
num_moves++;
timeScore.moveNum.gotoAndPlay("addOne");
if (card_1 == card_2) {
total_matches++;
joker.gotoAndPlay("sad");
var _local1 = Math.floor(Math.random() * 9) + 1;
sounds.gotoAndPlay("match_" + _local1);
soundReady = false;
match_alert.gotoAndPlay("match");
remove_smiles();
} else {
joker.gotoAndPlay("happy");
match_alert.gotoAndPlay("no_match");
if (soundReady == true) {
var _local1 = Math.floor(Math.random() * 10) + 1;
sounds.gotoAndPlay("noMatch_" + _local1);
soundReady = false;
}
}
}
}
function remove_smiles() {
if (card_1_dup == 1) {
gameMC[gameMC.card_1 + "a"].gotoAndStop(3);
gameMC[gameMC.card_2].gotoAndStop(2);
} else {
gameMC[gameMC.card_1].gotoAndStop(3);
gameMC[gameMC.card_2 + "a"].gotoAndStop(2);
}
}
function delete_matching_cards() {
if (card_1_dup == 1) {
gameMC[gameMC.card_1 + "a"].gotoAndStop("out");
} else {
gameMC[gameMC.card_1].gotoAndStop("out");
}
if (card_2_dup == 1) {
gameMC[gameMC.card_2 + "a"].gotoAndStop("out");
} else {
gameMC[gameMC.card_2].gotoAndStop("out");
}
resetCardWatch();
sound_2.start(0, 0);
}
function set_cards_back() {
if (card_1_dup == 1) {
gameMC[gameMC.card_1 + "a"].gotoAndStop("off");
} else {
gameMC[gameMC.card_1].gotoAndStop("off");
}
if (card_2_dup == 1) {
gameMC[gameMC.card_2 + "a"].gotoAndStop("off");
} else {
gameMC[gameMC.card_2].gotoAndStop("off");
}
resetCardWatch();
sound_4.start(0, 0);
}
function find_position() {
var _local1 = deck.splice(random(deck.length), 1);
return(_local1);
}
function getX(num) {
var _local1 = parseInt(num) % 6;
if (_local1 == 0) {
_local1 = 6;
}
return(x[_local1]);
}
function getY(num) {
var _local1 = Math.ceil(parseInt(num) / 6);
return(y[_local1]);
}
function shuffle_cards2() {
deck = new Array();
var _local1 = 0;
while (_local1 <= 24) {
deck[_local1] = _local1;
_local1++;
}
deck.shift();
_local1 = 1;
while (_local1 <= 12) {
var _local2 = find_position();
setProperty("set" + _local1, _x , getX(_local2));
setProperty("set" + _local1, _y , getY(_local2));
gameMC["set" + _local1].gotoAndStop("off");
_local1++;
}
_local1 = 1;
while (_local1 <= 12) {
var _local2 = find_position();
setProperty(("set" + _local1) + "a", _x , getX(_local2));
setProperty(("set" + _local1) + "a", _y , getY(_local2));
gameMC[("set" + _local1) + "a"].gotoAndStop("off");
_local1++;
}
}
function decrementTimer() {
if (playing == true) {
if (seconds > 0) {
seconds--;
if (seconds < 11) {
sound_5.start(0, 0);
}
var _local2 = Math.floor(seconds / 60);
var _local1 = seconds - (60 * _local2);
if (_local1 < 10) {
timer = (_local2 + ":0") + _local1;
} else {
timer = (_local2 + ":") + _local1;
}
} else {
playing = false;
sound_7.start(0, 0);
verdict = "lose";
clearInterval(timerInterval);
joker.gotoAndPlay("happy");
match_alert.gotoAndPlay("you_lose");
}
}
}
function getScore() {
return(score);
}
function openHelpWin() {
trace("displaying help");
gameMC.helpWin_mc.open();
}
function closeHelpWin() {
if (helpWindow._currentframe > 1) {
helpWindow.play();
}
}
function pause() {
helpButton.helpButton.enabled = false;
Set("variables:pause", true);
}
function unPause() {
helpButton.helpButton.enabled = true;
Set("variables:pause", false);
gameMC.play();
}
function getAdInfo() {
var _local1 = {id:1, path:"ad1.jpg", link:"http://www.kidswb.com", text:"howdy"};
return(_local1);
}
function adClick() {
getURL (gameMC.adInfo.link);
}
function displayAd(ad) {
gameMC.adInfo = ad;
gameMC.ad_100x100.loadMovie(ad.path);
}
function restart() {
containerMC.resetContainer();
containerMC.init();
score = 0;
which_level = 1;
}
if (initGame == null) {
initGame = true;
containerMC.init();
displayAd(containerMC.getAdInfo());
}
resetGame();
Frame 82
stop();
Frame 83
resetGame();
Frame 91
stop();
Frame 104
stop();
Symbol 22 Button
on (release) {
gotoAndPlay ("pickup");
}
Symbol 33 Button
on (release) {
gameMC.check_cards("set1", 0);
nextFrame();
}
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 2
stop();
Symbol 35 MovieClip Frame 3
stop();
Symbol 35 MovieClip Frame 4
stop();
Symbol 36 Button
on (release) {
gameMC.check_cards("set1", 1);
nextFrame();
}
Symbol 37 MovieClip Frame 1
stop();
Symbol 37 MovieClip Frame 2
stop();
Symbol 37 MovieClip Frame 3
stop();
Symbol 37 MovieClip Frame 4
stop();
Symbol 40 Button
on (release) {
gameMC.check_cards("set2", 0);
nextFrame();
}
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 2
stop();
Symbol 41 MovieClip Frame 4
stop();
Symbol 42 Button
on (release) {
gameMC.check_cards("set2", 1);
nextFrame();
}
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
stop();
Symbol 43 MovieClip Frame 3
stop();
Symbol 43 MovieClip Frame 4
stop();
Symbol 47 Button
on (release) {
gameMC.check_cards("set3", 0);
nextFrame();
}
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 2
stop();
Symbol 50 MovieClip Frame 3
stop();
Symbol 50 MovieClip Frame 4
stop();
Symbol 51 Button
on (release) {
gameMC.check_cards("set3", 1);
nextFrame();
}
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 2
stop();
Symbol 52 MovieClip Frame 3
stop();
Symbol 52 MovieClip Frame 4
stop();
Symbol 55 Button
on (release) {
gameMC.check_cards("set4", 0);
nextFrame();
}
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 2
stop();
Symbol 56 MovieClip Frame 3
stop();
Symbol 56 MovieClip Frame 4
stop();
Symbol 57 Button
on (release) {
gameMC.check_cards("set4", 1);
nextFrame();
}
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 2
stop();
Symbol 58 MovieClip Frame 3
stop();
Symbol 58 MovieClip Frame 4
stop();
Symbol 59 Button
on (release) {
gameMC.check_cards("set5", 0);
nextFrame();
}
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 2
stop();
Symbol 60 MovieClip Frame 3
stop();
Symbol 60 MovieClip Frame 4
stop();
Symbol 63 Button
on (release) {
gameMC.check_cards("set5", 1);
nextFrame();
}
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 2
stop();
Symbol 64 MovieClip Frame 3
stop();
Symbol 64 MovieClip Frame 4
stop();
Symbol 68 Button
on (release) {
gameMC.check_cards("set6", 0);
nextFrame();
}
Symbol 71 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 2
stop();
Symbol 71 MovieClip Frame 3
stop();
Symbol 71 MovieClip Frame 4
stop();
Symbol 73 Button
on (release) {
gameMC.check_cards("set6", 1);
nextFrame();
}
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 2
stop();
Symbol 74 MovieClip Frame 3
stop();
Symbol 74 MovieClip Frame 4
stop();
Symbol 77 Button
on (release) {
gameMC.check_cards("set7", 0);
nextFrame();
}
Symbol 78 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 2
stop();
Symbol 78 MovieClip Frame 3
stop();
Symbol 78 MovieClip Frame 4
stop();
Symbol 79 Button
on (release) {
gameMC.check_cards("set7", 1);
nextFrame();
}
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 2
stop();
Symbol 80 MovieClip Frame 3
stop();
Symbol 80 MovieClip Frame 4
stop();
Symbol 83 Button
on (release) {
gameMC.check_cards("set8", 0);
nextFrame();
}
Symbol 84 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 2
stop();
Symbol 84 MovieClip Frame 3
stop();
Symbol 84 MovieClip Frame 4
stop();
Symbol 85 Button
on (release) {
gameMC.check_cards("set8", 1);
nextFrame();
}
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 2
stop();
Symbol 86 MovieClip Frame 3
stop();
Symbol 86 MovieClip Frame 4
stop();
Symbol 88 Button
on (release) {
gameMC.check_cards("set9", 0);
nextFrame();
}
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 2
stop();
Symbol 89 MovieClip Frame 3
stop();
Symbol 89 MovieClip Frame 4
stop();
Symbol 90 Button
on (release) {
gameMC.check_cards("set9", 1);
nextFrame();
}
Symbol 91 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 2
stop();
Symbol 91 MovieClip Frame 3
stop();
Symbol 91 MovieClip Frame 4
stop();
Symbol 93 Button
on (release) {
gameMC.check_cards("set10", 0);
nextFrame();
}
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 2
stop();
Symbol 94 MovieClip Frame 3
stop();
Symbol 94 MovieClip Frame 4
stop();
Symbol 95 Button
on (release) {
gameMC.check_cards("set10", 1);
nextFrame();
}
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
stop();
Symbol 96 MovieClip Frame 3
stop();
Symbol 96 MovieClip Frame 4
stop();
Symbol 98 Button
on (release) {
gameMC.check_cards("set11", 0);
nextFrame();
}
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 2
stop();
Symbol 99 MovieClip Frame 3
stop();
Symbol 99 MovieClip Frame 4
stop();
Symbol 101 Button
on (release) {
gameMC.check_cards("set11", 1);
nextFrame();
}
Symbol 102 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 2
stop();
Symbol 102 MovieClip Frame 3
stop();
Symbol 102 MovieClip Frame 4
stop();
Symbol 103 Button
on (release) {
gameMC.check_cards("set12", 0);
nextFrame();
}
Symbol 104 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 2
stop();
Symbol 104 MovieClip Frame 3
stop();
Symbol 104 MovieClip Frame 4
stop();
Symbol 105 Button
on (release) {
gameMC.check_cards("set12", 1);
nextFrame();
}
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 106 MovieClip Frame 3
stop();
Symbol 106 MovieClip Frame 4
stop();
Symbol 118 MovieClip Frame 2
stop();
Symbol 151 Button
on (release) {
_parent.gotoAndPlay("up");
}
Symbol 153 MovieClip Frame 3
stop();
Symbol 153 MovieClip Frame 58
gameMC.score = 100;
Instance of Symbol 117 MovieClip in Symbol 153 MovieClip Frame 124
/* no clip actions */
Instance of Symbol 142 MovieClip in Symbol 153 MovieClip Frame 134
onClipEvent (load) {
var whatNow = "subtractMoves";
var newTotal = (gameMC.total - gameMC.num_moves);
gameMC.sound_8.start(0, 10);
}
onClipEvent (enterFrame) {
if (whatNow == "subtractMoves") {
if (gameMC.total > newTotal) {
gameMC.total--;
} else {
_parent.play();
gameMC.sound_8.stop();
whatNow = "addTime";
}
}
}
Symbol 153 MovieClip Frame 135
stop();
Instance of Symbol 142 MovieClip in Symbol 153 MovieClip Frame 198
onClipEvent (load) {
var whatNow = "addTime";
gameMC.score = gameMC.total + gameMC.seconds;
success = containerMC.processResults(gameMC.getScore());
gameMC.sound_8.start(0, 10);
}
onClipEvent (enterFrame) {
if (whatNow == "addTime") {
if (gameMC.total < gameMC.score) {
gameMC.total++;
} else {
_parent.play();
gameMC.sound_8.stop();
whatNow = "finishUp";
}
}
}
Symbol 153 MovieClip Frame 199
stop();
Symbol 153 MovieClip Frame 200
Symbol 153 MovieClip Frame 281
stop();
Symbol 153 MovieClip Frame 286
stop();
Symbol 153 MovieClip Frame 287
containerMC.processResults(0);
Symbol 153 MovieClip Frame 305
stop();
Symbol 154 MovieClip Frame 39
plate.gotoAndPlay(gameMC.verdict);
stop();
Symbol 154 MovieClip Frame 63
gameMC.gotoAndPlay("restart");
stop();
Symbol 157 Button
on (release) {
_root.num_moves = 0;
gotoAndStop ("off");
_root.shuffle_cards2();
_root.gotoAndPlay("start");
}
Symbol 158 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 18
Symbol 158 MovieClip Frame 23
gameMC.delete_matching_cards();
if (gameMC.total_matches == 12) {
gameMC.winner();
} else {
gotoAndStop ("off");
}
Symbol 158 MovieClip Frame 40
Symbol 158 MovieClip Frame 45
gameMC.set_cards_back();
gotoAndStop ("off");
Symbol 158 MovieClip Frame 46
gameMC.gotoAndPlay("payoff");
Symbol 158 MovieClip Frame 98
stop();
Symbol 158 MovieClip Frame 106
plateAnim.plate.gotoAndPlay("loser");
Symbol 158 MovieClip Frame 109
stop();