Frame 1
stop();
loadVariablesNum ("dog.txt", 0);
lv = new LoadVars();
lv.load("dog.txt");
base = 1;
feet = 1;
hand = 1;
ear = 1;
eye = 1;
nose = 1;
skn = 1;
tail = 1;
smile = 1;
mind = 1;
tong = 1;
wag = 1;
pairs = 0;
qrq = "What's with all those cards...?";
nose2._visible = false;
eyes2._visible = false;
eyesdn._visible = false;
eyesdn2._visible = false;
eyesup._visible = false;
eyesup2._visible = false;
smile2._visible = false;
smile1._visible = false;
nose2._visible = false;
skin2._visible = false;
ears2._visible = false;
tail2._visible = false;
spiral._visible = false;
tongue._visible = false;
tong2._visible = false;
feet2._visible = false;
hands2._visible = false;
spiral.stop();
ears2.stop();
tail2.stop();
mouth2.stop();
eyes2.stop();
feet2.stop();
hands2.stop();
skin2.stop();
stripe2.stop();
tong2.stop();
tongue.stop();
smile2.stop();
nose2.stop();
Symbol 11 MovieClip Frame 19
stop();
if (_root.eye == 1) {
_root.eyesdn._visible = true;
}
if (_root.eye == 2) {
_root.eyesdn2._visible = true;
}
if (_root.mind == 1) {
_root.qrq = _root.tail_1;
}
if (_root.mind == 2) {
_root.qrq = _root.tail_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
_root.qrq = _root.tail_3;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
if (_root.wag == 2) {
gotoAndStop (25);
}
Symbol 11 MovieClip Frame 25
stop();
Symbol 11 MovieClip Frame 30
stop();
Symbol 27 MovieClip Frame 36
stop();
if (_root.mind == 1) {
_root.qrq = _root.fur_1;
}
if (_root.mind == 2) {
_root.qrq = _root.fur_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
_root.qrq = _root.fur_3;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
Symbol 34 MovieClip Frame 39
stop();
if (_root.mind == 1) {
_root.qrq = _root.feet_1;
}
if (_root.mind == 2) {
_root.qrq = _root.feet_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
if (_root.hand == 2) {
_root.qrq = _root.feet_3;
} else {
_root.qrq = _root.feet_4;
}
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
Symbol 41 MovieClip Frame 36
stop();
if (_root.mind == 1) {
_root.qrq = _root.hand_1;
}
if (_root.mind == 2) {
_root.qrq = _root.hand_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
if (_root.feet == 2) {
_root.qrq = _root.hand_3;
} else {
_root.qrq = _root.hand_4;
}
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
Symbol 47 MovieClip Frame 26
stop();
if (_root.mind == 1) {
_root.qrq = _root.ears_1;
}
if (_root.mind == 2) {
_root.qrq = _root.ears_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
_root.qrq = _root.ears_3;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
Symbol 52 MovieClip Frame 9
stop();
if (_root.mind == 1) {
_root.qrq = _root.smile_1;
}
if (_root.mind == 2) {
_root.qrq = _root.smile_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
_root.qrq = _root.smile_3;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
Symbol 55 MovieClip Frame 2
stop();
if (_root.mind == 1) {
_root.qrq = _root.nose_1;
}
if (_root.mind == 2) {
_root.qrq = _root.nose_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
_root.qrq = _root.nose_3;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
Symbol 71 MovieClip Frame 16
stop();
if (_root.mind == 1) {
_root.qrq = _root.eyes_1;
}
if (_root.mind == 2) {
_root.qrq = _root.eyes_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
_root.qrq = _root.eyes_3;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
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 99 MovieClip Frame 5
stop();
Symbol 99 MovieClip Frame 6
stop();
Symbol 99 MovieClip Frame 7
stop();
Symbol 99 MovieClip Frame 8
stop();
Symbol 99 MovieClip Frame 9
stop();
Symbol 99 MovieClip Frame 10
stop();
Symbol 99 MovieClip Frame 11
stop();
Symbol 99 MovieClip Frame 12
stop();
Symbol 99 MovieClip Frame 13
stop();
Symbol 100 MovieClip Frame 1
_parent._visible = false;
stop();
Symbol 100 MovieClip Frame 2
out = false;
_parent._visible = true;
tellTarget ("ThisCard") {
gotoAndStop ("BackOfCard");
};
Symbol 100 MovieClip Frame 9
stop();
Symbol 100 MovieClip Frame 10
out = true;
Symbol 100 MovieClip Frame 13
tellTarget ("ThisCard") {
gotoAndStop(_parent._parent._parent.cardArray[_parent._parent.ThisCardNumber - 1] + 1);
};
Symbol 100 MovieClip Frame 16
stop();
Symbol 100 MovieClip Frame 20
tellTarget ("ThisCard") {
gotoAndStop ("BackOfCard");
};
Symbol 100 MovieClip Frame 23
out = false;
stop();
Symbol 100 MovieClip Frame 36
stop();
_parent._visible = false;
Symbol 102 Button
on (release) {
if (_parent.PlayingGame) {
if (_parent.CurrentFlipsCount < 100) {
if (!CardMotion.out) {
_parent.CurrentFlipsCount++;
_parent.CurrentFlips = ("Flips: " + _parent.CurrentFlipsCount) + "/100";
if (_parent.NoOfCardsOut == 0) {
tellTarget ("CardMotion") {
gotoAndPlay ("SpinFront");
};
_parent.NoOfCardsOut = 1;
_parent.FirstCard = _parent.cardArray[ThisCardNumber - 1];
_parent.FirstCardName = this._name;
} else if (_parent.NoOfCardsOut == 1) {
tellTarget ("CardMotion") {
gotoAndPlay ("SpinFront");
};
_parent.NoOfCardsOut = 2;
_parent.SecondCard = _parent.cardArray[ThisCardNumber - 1];
_parent.SecondCardName = this._name;
if (_parent.CurrentPairsCount == 11) {
gotoAndPlay ("HideCards");
} else {
gotoAndPlay ("ShowCards");
}
} else if (_parent.NoOfCardsOut == 2) {
tellTarget ("_parent." + _parent.SecondCardName) {
gotoAndStop ("DoNothing");
};
_parent.NoOfCardsOut = 3;
gotoAndPlay ("HideCards");
}
}
} else {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(1);
}
}
}
Symbol 103 MovieClip Frame 1
ThisCardNumber = int(this._name.substr(4, 2));
stop();
Symbol 103 MovieClip Frame 30
if (_parent.FirstCard == _parent.SecondCard) {
tellTarget (("_parent." + _parent.FirstCardName) + ".CardMotion") {
gotoAndPlay ("CardFadeOut");
};
tellTarget (("_parent." + _parent.SecondCardName) + ".CardMotion") {
gotoAndPlay ("CardFadeOut");
};
_root.pairs++;
if ((_root.wag == 2) && (_root.tail == 2)) {
_root.tail2.gotoAndStop(25);
}
if (_root.tong == 2) {
if (_root.mind == 1) {
_root.tongue._visible = true;
} else {
_root.tong2._visible = true;
_root.tong2.play();
}
}
_root.eyesup._visible = false;
_root.eyesdn._visible = false;
_root.eyesup2._visible = false;
_root.eyesdn2._visible = false;
_root.smile1._visible = false;
if (_parent.FirstCard == 1) {
_root.ear = 2;
_root.ears2._visible = true;
_root.ears2.gotoAndPlay(2);
}
if (_parent.FirstCard == 2) {
_root.spiral.play();
_root.spiral._visible = true;
_root.mind++;
if (_root.mind == 2) {
_root.qrq = _root.mind_a1;
}
if (_root.mind == 3) {
_root.qrq = _root.mind_a2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
}
if (_parent.FirstCard == 3) {
_root.spiral.play();
_root.spiral._visible = true;
_root.mind++;
if (_root.mind == 2) {
_root.qrq = _root.mind_b1;
}
if (_root.mind == 3) {
_root.qrq = _root.mind_b2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
if (_parent.FirstCard == 4) {
_root.eye = 2;
_root.eyes2._visible = true;
_root.eyes2.gotoAndPlay(2);
}
if (_parent.FirstCard == 5) {
_root.tong = 2;
if (_root.mind == 1) {
_root.qrq = _root.tongue_1;
_root.tongue._visible = true;
}
if (_root.mind == 2) {
_root.qrq = _root.tongue_2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
_root.tong2._visible = true;
_root.tong2.play();
}
if (_root.mind == 3) {
_root.qrq = _root.tongue_3;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
_root.tong2._visible = true;
_root.tong2.play();
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
if (_parent.FirstCard == 7) {
_root.nose = 2;
_root.nose2._visible = true;
_root.nose2.gotoAndStop(2);
}
if (_parent.FirstCard == 9) {
_root.feet = 2;
_root.feet2._visible = true;
_root.feet2.gotoAndPlay(2);
_root.feet1._visible = false;
}
if (_parent.FirstCard == 10) {
_root.hand = 2;
_root.hands2._visible = true;
_root.hands1._visible = false;
_root.hands2.gotoAndPlay(2);
}
if (_parent.FirstCard == 6) {
_root.skn = 2;
_root.skin2._visible = true;
_root.skin2.gotoAndPlay(2);
}
if (_parent.FirstCard == 8) {
_root.tail = 2;
_root.tail2._visible = true;
_root.tail2.gotoAndPlay(2);
}
if (_parent.FirstCard == 11) {
_root.wag = 2;
if (_root.tail == 1) {
if (_root.mind == 1) {
_root.qrq = _root.wag_1;
}
if (_root.mind == 2) {
_root.qrq = _root.wag_2;
}
if (_root.mind == 3) {
_root.qrq = _root.wag_3;
}
}
if (_root.tail == 2) {
_root.tail2.gotoAndPlay(25);
if (_root.mind == 1) {
_root.qrq = _root.wag_t1;
}
if (_root.mind == 2) {
_root.qrq = _root.wag_t2;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
if (_root.mind == 3) {
_root.qrq = _root.wag_t3;
if (_root.smile == 2) {
_root.smile2._visible = true;
} else {
_root.smile1._visible = true;
}
}
}
}
if (_root.pairs == 12) {
_root.asdf.gotoAndStop(4);
_root.asdf.UserMessages.gotoAndStop(2);
}
if (_parent.FirstCard == 12) {
_root.smile = 2;
_root.smile2._visible = true;
_root.smile2.gotoAndPlay(2);
}
_parent.CurrentPairs = "Pairs Matched: " + _root.pairs;
} else {
tellTarget (("_parent." + _parent.FirstCardName) + ".CardMotion") {
gotoAndPlay ("SpinBack");
};
tellTarget (("_parent." + _parent.SecondCardName) + ".CardMotion") {
gotoAndPlay ("SpinBack");
};
}
Symbol 103 MovieClip Frame 31
if (_parent.NoOfCardsOut == 3) {
tellTarget ("CardMotion") {
gotoAndPlay ("SpinFront");
};
_parent.NoOfCardsOut = 1;
_parent.FirstCard = _parent.cardArray[ThisCardNumber - 1];
_parent.FirstCardName = this._name;
_parent.SecondCard = 0;
_parent.SecondCardName = "";
} else {
_parent.NoOfCardsOut = 0;
_parent.FirstCard = 0;
_parent.FirstCardName = "";
_parent.SecondCard = 0;
_parent.SecondCardName = "";
}
Symbol 107 MovieClip Frame 1
CardCount = 1;
Symbol 107 MovieClip Frame 2
n = 1;
while (n < 25) {
if (n < 10) {
CardTarget = ("_parent.Card0" + n) + ".CardMotion";
} else {
CardTarget = ("_parent.Card" + n) + ".CardMotion";
}
tellTarget (CardTarget) {
gotoAndStop ("CardInvisible");
};
n++;
}
Symbol 107 MovieClip Frame 3
if (CardCount < 25) {
if (CardCount < 10) {
CardTarget = ("_parent.Card0" + CardCount) + ".CardMotion";
} else {
CardTarget = ("_parent.Card" + CardCount) + ".CardMotion";
}
tellTarget (CardTarget) {
gotoAndPlay ("CardFadeIn");
};
CardCount++;
} else {
gotoAndPlay ("TurnCardsComplete");
}
Symbol 107 MovieClip Frame 5
gotoAndPlay ("KeepTurning");
Symbol 107 MovieClip Frame 6
CardCount = 1;
stop();
tellTarget ("_parent") {
gotoAndStop ("GameLoaded");
};
Symbol 115 MovieClip Frame 1
stop();
if (_root.mind == 1) {
_root.qrq = _root.lose_1;
}
if (_root.mind == 2) {
_root.qrq = _root.lose_2;
}
if (_root.mind == 3) {
_root.qrq = _root.lose_3;
}
Symbol 115 MovieClip Frame 2
stop();
_root.qrq = _root.win;
Symbol 116 MovieClip Frame 1
function ShuffleCards() {
cardArray = new Array();
var _local1 = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12];
var _local2 = new Array();
a = 0;
while (a < _local1.length) {
_local2.push(a);
a++;
}
a = 0;
while (a < _local1.length) {
do {
trg = random(_local2.length);
newplace = _local2[trg];
} while ((_local1[a] == _local1[newplace]) && (a != (_local1.length - 1)));
_local2.splice(trg, 1);
if (_local1[a] != _local1[newplace]) {
cardArray.push(_local1[newplace]);
} else {
cardArray.unshift(_local1[newplace]);
}
a++;
}
}
function CheckNull(checkstring) {
if (checkstring.length < 1) {
return(true);
}
if (checkstring == "") {
return(true);
}
if (checkstring == null) {
return(true);
}
return(false);
}
MovieTitle = "CardGame";
Symbol 116 MovieClip Frame 2
FirstCard = 0;
SecondCard = 0;
FirstCardName = "";
SecondCardName = "";
NoOfCardsOut = 0;
ShuffleCards();
CurrentFlipsCount = 0;
CurrentFlips = "Flips: 0 / 100";
CurrentPairsCount = 0;
CurrentPairs = "Pairs Matched: 0";
matchedArray = new Array();
n = 1;
while (n < 13) {
matchedArray[n] = false;
n++;
}
CardActions.gotoAndPlay("TurnCards");
stop();
Symbol 116 MovieClip Frame 3
PlayingGame = true;
stop();
Symbol 116 MovieClip Frame 4
PlayingGame = false;
n = 1;
while (n < 25) {
if (n < 10) {
CardTarget = ("Card0" + n) + ".CardMotion";
} else {
CardTarget = ("Card" + n) + ".CardMotion";
}
tellTarget (CardTarget) {
gotoAndStop ("CardInvisible");
};
n++;
}
stop();
Symbol 120 MovieClip Frame 16
stop();