Instance of Symbol 5 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.ploaded = (_root.getBytesLoaded() / totalsize) * 100;
this._xscale = _root.ploaded;
if ((_root.getBytesLoaded() == totalsize) && (_root._currentframe == 1)) {
_root.gotoAndPlay(2);
}
}
onClipEvent (load) {
totalsize = _root.getBytesTotal();
}
Frame 136
stop();
Frame 137
function shuffle() {
_root.typelevel = 4 + Math.floor(_root.level / 4);
if (14 < _root.typelevel) {
_root.typelevel = 14;
}
if (_root.level < 10) {
cardnumbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
diffcards = 6;
_root.cardsleft = 12;
_root.timer = 700 - (_root.level * 35);
} else {
cardnumbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
diffcards = 12;
_root.cardsleft = 24;
_root.timer = 1100 - (_root.level * 35);
}
_root.timersplit = _root.timer / 100;
b = 0;
while (b < diffcards) {
cardtype = random(_root.typelevel) + 1;
card1 = random(cardnumbers.length);
_root["pic" + cardnumbers[card1]].type = cardtype;
_root["pic" + cardnumbers[card1]].gotoAndStop(cardtype);
_root["pic" + cardnumbers[card1]]._visible = true;
_root["pic" + cardnumbers[card1]].achterkant.gotoAndPlay(1);
cardnumbers1 = cardnumbers.slice(0, card1);
cardnumbers2 = cardnumbers.slice(card1 + 1);
cardnumbers = cardnumbers1.concat(cardnumbers2);
card2 = random(cardnumbers.length);
_root["pic" + cardnumbers[card2]].type = cardtype;
_root["pic" + cardnumbers[card2]].gotoAndStop(cardtype);
_root["pic" + cardnumbers[card2]]._visible = true;
_root["pic" + cardnumbers[card2]].achterkant.gotoAndPlay(1);
cardnumbers1 = cardnumbers.slice(0, card2);
cardnumbers2 = cardnumbers.slice(card2 + 1);
cardnumbers = cardnumbers1.concat(cardnumbers2);
b++;
}
}
function checkSame() {
if (_root.click1type == _root.click2type) {
_root[_root.click1]._visible = false;
_root[_root.click2]._visible = false;
_root.click1 = "";
_root.click2 = "";
_root.cardsleft = _root.cardsleft - 2;
_root.score = _root.score + 10;
if (_root.cardsleft == 0) {
_root.score = _root.score + Math.round(_root.timer / _root.timersplit);
_root.level++;
if (_root.level == 10) {
xpos = 40;
ypos = 50;
a = 0;
while (a < 24) {
_root.pic.duplicateMovieClip("pic" + a, a);
_root["pic" + a]._x = xpos;
_root["pic" + a]._y = ypos;
xpos = xpos + 55;
if (350 < xpos) {
xpos = 40;
ypos = ypos + 75;
}
a++;
}
}
_root.shuffle();
}
} else {
_root[_root.click1].achterkant.play();
_root[_root.click2].achterkant.play();
_root.click1 = "";
_root.click2 = "";
_root.score--;
}
}
game = "memory";
click1 = "";
click2 = "";
score = 0;
level = 1;
xpos = 40;
ypos = 50;
a = 0;
while (a < 12) {
_root.pic.duplicateMovieClip("pic" + a, a);
_root["pic" + a]._x = xpos;
_root["pic" + a]._y = ypos;
xpos = xpos + 55;
if (240 < xpos) {
xpos = 40;
ypos = ypos + 75;
}
a++;
}
shuffle();
Instance of Symbol 58 MovieClip "checkit" in Frame 137
onClipEvent (enterFrame) {
_root.timer--;
_root.timeline._xscale = _root.timer / _root.timersplit;
if (_root.timer < 1) {
a = 0;
while (a < 24) {
_root["pic" + a].removeMovieClip();
a++;
}
_root.gotoAndStop("theend");
}
}
Frame 138
_root.scorea = _root.score + "a";
scorelength = _root.scorea.length;
scorelength--;
a = 0;
while (a < scorelength) {
_root["scorenum" + a] = _root.scorea.substr(a, 1);
if (_root["scorenum" + a] == 0) {
_root["scorenum" + a] = "z";
} else if (_root["scorenum" + a] == 1) {
_root["scorenum" + a] = 7;
} else if (_root["scorenum" + a] == 2) {
_root["scorenum" + a] = 3;
} else if (_root["scorenum" + a] == 3) {
_root["scorenum" + a] = "p";
} else if (_root["scorenum" + a] == 4) {
_root["scorenum" + a] = "j";
} else if (_root["scorenum" + a] == 5) {
_root["scorenum" + a] = 5;
} else if (_root["scorenum" + a] == 6) {
_root["scorenum" + a] = 1;
} else if (_root["scorenum" + a] == 7) {
_root["scorenum" + a] = "t";
} else if (_root["scorenum" + a] == 8) {
_root["scorenum" + a] = "k";
} else if (_root["scorenum" + a] == 9) {
_root["scorenum" + a] = 6;
}
a++;
}
_root.scorecode = ("x" + random(9)) + random(9);
b = scorelength - 1;
while (b >= 0) {
_root.scorecode = _root.scorecode + _root["scorenum" + b];
b--;
}
now = new Date();
rightnow = now.getTime();
if ((_root.myname != "") && (_root.myname != null)) {
loadVariablesNum ((((("memoryscore.php?mynewscore=" + _root.score) + "&scorecode=") + _root.scorecode) + "&rightnow=") + rightnow, 0);
}
stop();
Frame 139
_root.scorea = _root.score + "a";
scorelength = _root.scorea.length;
scorelength--;
a = 0;
while (a < scorelength) {
_root["scorenum" + a] = _root.scorea.substr(a, 1);
if (_root["scorenum" + a] == 0) {
_root["scorenum" + a] = "z";
} else if (_root["scorenum" + a] == 1) {
_root["scorenum" + a] = 7;
} else if (_root["scorenum" + a] == 2) {
_root["scorenum" + a] = 3;
} else if (_root["scorenum" + a] == 3) {
_root["scorenum" + a] = "p";
} else if (_root["scorenum" + a] == 4) {
_root["scorenum" + a] = "j";
} else if (_root["scorenum" + a] == 5) {
_root["scorenum" + a] = 5;
} else if (_root["scorenum" + a] == 6) {
_root["scorenum" + a] = 1;
} else if (_root["scorenum" + a] == 7) {
_root["scorenum" + a] = "t";
} else if (_root["scorenum" + a] == 8) {
_root["scorenum" + a] = "k";
} else if (_root["scorenum" + a] == 9) {
_root["scorenum" + a] = 6;
}
a++;
}
_root.scorecode = ("x" + random(9)) + random(9);
b = scorelength - 1;
while (b >= 0) {
_root.scorecode = _root.scorecode + _root["scorenum" + b];
b--;
}
mynewscore = _root.score;
getURL ("http://www.happytree.nl/games/memory/memoryscore.php", "", "POST");
Symbol 11 Button
on (release) {
getURL ("http://www.happytree.com", "_blank");
}
Symbol 24 Button
on (release) {
_root.gotoAndStop("thegame");
}
Symbol 31 MovieClip Frame 32
stop();
Symbol 31 MovieClip Frame 34
stop();
Symbol 31 MovieClip Frame 42
gotoAndPlay (31);
Symbol 33 Button
on (release) {
if (((_root.click1 == "") && (_root.click2 == "")) && (achterkant._currentframe == 32)) {
achterkant.play();
_root.click1 = _name;
_root.click1type = type;
} else if (((_root.click2 == "") && (_name != _root.click1)) && (achterkant._currentframe == 32)) {
achterkant.play();
_root.click2 = _name;
_root.click2type = type;
_root.checkit.play();
}
}
Symbol 48 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 7
_root.checkSame();
Symbol 64 Button
on (release) {
getURL ("http://www.happytree.com");
}
Symbol 73 Button
on (release) {
if ((0 < _root.username.length) && (0 < _root.useremail.length)) {
_root.gotoAndStop(139);
}
}