Frame 1
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
percentbytes = int(loadedbytes / (totalbytes / 100));
loader.gotoAndStop(percentbytes);
Frame 2
if (loadedbytes == totalbytes) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 3
stop();
Frame 110
function createArrays() {
createLevelArray();
createTimeArray();
createAttemptsArray();
createMatchesArray();
createCatArray();
createCardsArray();
}
function createLevelArray() {
var _local1 = _root;
arrLevel = new Array(10);
arrLevel[0] = _local1.level0;
arrLevel[1] = _local1.level1;
arrLevel[2] = _local1.level2;
arrLevel[3] = _local1.level3;
arrLevel[4] = _local1.level4;
arrLevel[5] = _local1.level5;
arrLevel[6] = _local1.level6;
arrLevel[7] = _local1.level7;
arrLevel[8] = _local1.level8;
arrLevel[9] = _local1.level9;
}
function createTimeArray() {
var _local1 = _root;
arrT0 = new Array(10);
arrT0[0] = _local1.t0a;
arrT0[1] = _local1.t1a;
arrT0[2] = _local1.t2a;
arrT0[3] = _local1.t3a;
arrT0[4] = _local1.t4a;
arrT0[5] = _local1.t5a;
arrT0[6] = _local1.t6a;
arrT0[7] = _local1.t7a;
arrT0[8] = _local1.t8a;
arrT0[9] = _local1.t9a;
arrT1 = new Array(10);
arrT1[0] = _local1.t0b;
arrT1[1] = _local1.t1b;
arrT1[2] = _local1.t2b;
arrT1[3] = _local1.t3b;
arrT1[4] = _local1.t4b;
arrT1[5] = _local1.t5b;
arrT1[6] = _local1.t6b;
arrT1[7] = _local1.t7b;
arrT1[8] = _local1.t8b;
arrT1[9] = _local1.t9b;
arrT2 = new Array(10);
arrT2[0] = _local1.t0c;
arrT2[1] = _local1.t1c;
arrT2[2] = _local1.t2c;
arrT2[3] = _local1.t3c;
arrT2[4] = _local1.t4c;
arrT2[5] = _local1.t5c;
arrT2[6] = _local1.t6c;
arrT2[7] = _local1.t7c;
arrT2[8] = _local1.t8c;
arrT2[9] = _local1.t9c;
arrT3 = new Array(10);
arrT3[0] = _local1.t0d;
arrT3[1] = _local1.t1d;
arrT3[2] = _local1.t2d;
arrT3[3] = _local1.t3d;
arrT3[4] = _local1.t4d;
arrT3[5] = _local1.t5d;
arrT3[6] = _local1.t6d;
arrT3[7] = _local1.t7d;
arrT3[8] = _local1.t8d;
arrT3[9] = _local1.t9d;
}
function createAttemptsArray() {
var _local1 = _root;
arrV0 = new Array(10);
arrV0[0] = _local1.v0a;
arrV0[1] = _local1.v1a;
arrV0[2] = _local1.v2a;
arrV0[3] = _local1.v3a;
arrV0[4] = _local1.v4a;
arrV0[5] = _local1.v5a;
arrV0[6] = _local1.v6a;
arrV0[7] = _local1.v7a;
arrV0[8] = _local1.v8a;
arrV0[9] = _local1.v9a;
arrV1 = new Array(10);
arrV1[0] = _local1.v0b;
arrV1[1] = _local1.v1b;
arrV1[2] = _local1.v2b;
arrV1[3] = _local1.v3b;
arrV1[4] = _local1.v4b;
arrV1[5] = _local1.v5b;
arrV1[6] = _local1.v6b;
arrV1[7] = _local1.v7b;
arrV1[8] = _local1.v8b;
arrV1[9] = _local1.v9b;
arrV2 = new Array(10);
arrV2[0] = _local1.v0c;
arrV2[1] = _local1.v1c;
arrV2[2] = _local1.v2c;
arrV2[3] = _local1.v3c;
arrV2[4] = _local1.v4c;
arrV2[5] = _local1.v5c;
arrV2[6] = _local1.v6c;
arrV2[7] = _local1.v7c;
arrV2[8] = _local1.v8c;
arrV2[9] = _local1.v9c;
}
function createMatchesArray() {
var _local1 = _root;
arrG0 = new Array(10);
arrG0[0] = _local1.g0a;
arrG0[1] = _local1.g1a;
arrG0[2] = _local1.g2a;
arrG0[3] = _local1.g3a;
arrG0[4] = _local1.g4a;
arrG0[5] = _local1.g5a;
arrG0[6] = _local1.g6a;
arrG0[7] = _local1.g7a;
arrG0[8] = _local1.g8a;
arrG0[9] = _local1.g9a;
arrG1 = new Array(10);
arrG1[0] = _local1.g0b;
arrG1[1] = _local1.g1b;
arrG1[2] = _local1.g2b;
arrG1[3] = _local1.g3b;
arrG1[4] = _local1.g4b;
arrG1[5] = _local1.g5b;
arrG1[6] = _local1.g6b;
arrG1[7] = _local1.g7b;
arrG1[8] = _local1.g8b;
arrG1[9] = _local1.g9b;
}
function createCatArray() {
var _local1 = _root;
arrCats = new Array(16);
arrCats[0] = _local1.cat1a;
arrCats[1] = _local1.cat1b;
arrCats[2] = _local1.cat2a;
arrCats[3] = _local1.cat2b;
arrCats[4] = _local1.cat3a;
arrCats[5] = _local1.cat3b;
arrCats[6] = _local1.cat4a;
arrCats[7] = _local1.cat4b;
arrCats[8] = _local1.cat5a;
arrCats[9] = _local1.cat5b;
arrCats[10] = _local1.cat6a;
arrCats[11] = _local1.cat6b;
arrCats[12] = _local1.cat7a;
arrCats[13] = _local1.cat7b;
arrCats[14] = _local1.cat8a;
arrCats[15] = _local1.cat8b;
}
function createCardsArray() {
var _local1 = _root;
arrCards = new Array(16);
arrCards[0] = _local1.card1;
arrCards[1] = _local1.card2;
arrCards[2] = _local1.card3;
arrCards[3] = _local1.card4;
arrCards[4] = _local1.card5;
arrCards[5] = _local1.card6;
arrCards[6] = _local1.card7;
arrCards[7] = _local1.card8;
arrCards[8] = _local1.card9;
arrCards[9] = _local1.card10;
arrCards[10] = _local1.card11;
arrCards[11] = _local1.card12;
arrCards[12] = _local1.card13;
arrCards[13] = _local1.card14;
arrCards[14] = _local1.card15;
arrCards[15] = _local1.card16;
}
function createScoreArray() {
arrScore = new Array();
}
function initGame() {
gameIsRunning = false;
gameLevel = 4;
startTime = 0;
secondsCounter = 0;
attemptsCounter = 0;
matchesCounter = 0;
gamePoints = 0;
selCat1 = -1;
selCat2 = -1;
selCard1 = -1;
selCard2 = -1;
showCards = false;
showTimer = 0;
isNotFirstStart = true;
phpCounter = 0;
modeHighscore = 0;
if (_level0.highscoremode == "php") {
modeHighscore = 1;
}
}
function updateGUI() {
setLevelDisplay();
setTimeDisplay();
setAttemptsDisplay();
setMatchesDisplay();
updateButtonState();
}
function getInitialPosition() {
xStart = arrCats[0]._x;
yStart = arrCats[0]._y;
xStep = arrCats[1]._x - xStart;
yStep = arrCats[4]._y - yStart;
}
function shuffle() {
var _local1 = Math.floor((Date().getSeconds() * Math.random()) + 60);
var _local2 = arrCats.length;
var _local3 = 0;
while (_local3 < _local2) {
arrCats[_local3]._visible = false;
arrCards[_local3]._visible = true;
_local3++;
}
_local3 = 0;
while (_local3 < _local1) {
var n1 = Math.round(Math.random() * (_local2 - 1));
var n2 = Math.round(Math.random() * (_local2 - 1));
var o = arrCats[n1];
arrCats[n1] = arrCats[n2];
arrCats[n2] = o;
_local3++;
}
x = xStart;
y = yStart;
_local3 = 0;
while (_local3 < 4) {
_local1 = 0;
while (_local1 < 4) {
_local2 = (_local3 * 4) + _local1;
arrCats[_local2]._x = x;
arrCats[_local2]._y = y;
y = y + yStep;
_local1++;
}
y = yStart;
x = x + xStep;
_local3++;
}
selCat1 = -1;
selCat2 = -1;
selCard1 = -1;
selCard2 = -1;
}
function updateButtonState() {
var _local1 = _root;
_local1.btnStartEnabled._visible = !_local1.gameIsRunning;
_local1.btnStartDisabled._visible = _local1.gameIsRunning;
_local1.btnStopEnabled._visible = _local1.gameIsRunning;
_local1.btnStopDisabled._visible = !_local1.gameIsRunning;
_local1.btnPlusEnabled._visible = !_local1.gameIsRunning;
_local1.btnPlusDisabled._visible = _local1.gameIsRunning;
_local1.btnMinusEnabled._visible = !_local1.gameIsRunning;
_local1.btnMinusDisabled._visible = _local1.gameIsRunning;
}
function setLevelDisplay() {
var _local1 = 0;
while (_local1 < 10) {
arrLevel[_local1]._visible = _local1 == gameLevel;
_local1++;
}
}
function setTimeDisplay() {
var _local2 = String(Math.round(_root.secondsCounter / 1000));
while (_local2.length < 4) {
_local2 = " " + _local2;
}
var a = (_local2.charAt(3) * 1);
var _local1 = 0;
while (_local1 < 10) {
arrT0[_local1]._visible = _local1 == a;
_local1++;
}
var b = (_local2.charAt(2) * 1);
_local1 = 0;
while (_local1 < 10) {
arrT1[_local1]._visible = _local1 == b;
_local1++;
}
var c = (_local2.charAt(1) * 1);
_local1 = 0;
while (_local1 < 10) {
arrT2[_local1]._visible = _local1 == c;
_local1++;
}
var _local3 = _local2.charAt(0) * 1;
_local1 = 0;
while (_local1 < 10) {
arrT3[_local1]._visible = _local1 == _local3;
_local1++;
}
}
function setAttemptsDisplay() {
var _local2 = String(attemptsCounter);
while (_local2.length < 3) {
_local2 = " " + _local2;
}
var a = (_local2.charAt(2) * 1);
var _local1 = 0;
while (_local1 < 10) {
arrV0[_local1]._visible = _local1 == a;
_local1++;
}
var b = (_local2.charAt(1) * 1);
_local1 = 0;
while (_local1 < 10) {
arrV1[_local1]._visible = _local1 == b;
_local1++;
}
var _local3 = _local2.charAt(0) * 1;
_local1 = 0;
while (_local1 < 10) {
arrV2[_local1]._visible = _local1 == _local3;
_local1++;
}
}
function setMatchesDisplay() {
var _local2 = String(matchesCounter);
while (_local2.length < 2) {
_local2 = " " + _local2;
}
var a = (_local2.charAt(1) * 1);
var _local1 = 0;
while (_local1 < 10) {
arrG0[_local1]._visible = _local1 == a;
_local1++;
}
var _local3 = _local2.charAt(0) * 1;
_local1 = 0;
while (_local1 < 10) {
arrG1[_local1]._visible = _local1 == _local3;
_local1++;
}
}
function checkCard(nCard) {
if (gameIsRunning && (!showCard)) {
nCat = 0;
dd = 9999;
var _local1 = 0;
while (_local1 < arrCats.length) {
var x = (arrCards[nCard]._x - arrCats[_local1]._x);
var _local3 = arrCards[nCard]._y - arrCats[_local1]._y;
var _local2 = Math.sqrt((x * x) + (_local3 * _local3));
if (_local2 < dd) {
dd = _local2;
nCat = _local1;
}
_local1++;
}
if ((selCat1 == -1) || (selCat2 == -1)) {
arrCards[nCard]._visible = false;
arrCats[nCat]._visible = true;
if (selCat1 == -1) {
selCat1 = nCat;
selCard1 = nCard;
} else {
selCat2 = nCat;
selCard2 = nCard;
}
if ((selCat1 != -1) && (selCat2 != -1)) {
attemptsCounter++;
setAttemptsDisplay();
if (arrCats[selCat1]._name.substr(3, 1) == arrCats[selCat2]._name.substr(3, 1)) {
_level0.soundMatch.gotoAndPlay(2);
matchesCounter++;
setMatchesDisplay();
selCat1 = -1;
selCat2 = -1;
selCard1 = -1;
selCard2 = -1;
if (matchesCounter == (arrCats.length / 2)) {
_level0.soundGameOver.gotoAndPlay(2);
gameIsRunning = false;
updateButtonState();
gamePoints = Math.round(((100000 * (gameLevel + 1)) / (secondsCounter / 1000)) / attemptsCounter);
gotoAndPlay (112);
}
} else {
_level0.soundDontMatch.gotoAndPlay(2);
showCards = true;
}
}
}
}
}
function initSharedObject() {
soHighscore = SharedObject.getLocal("MemoryGame");
if (soHighscore.data.fileCollection == undefined) {
soHighscore.data.fileCollection = new Object();
}
}
function saveHighscore() {
with (soHighscore.data) {
if (fileCollection.highscore == undefined) {
fileCollection.highscore = new Object();
}
fileCollection.highscore.content = arrScore;
trace("Highscore saved");
}
}
function loadHighscore() {
with (soHighscore.data) {
if (fileCollection.highscore == undefined) {
createScoreArray();
} else {
arrScore = fileCollection.highscore.content;
}
}
trace("Score loaded size=" add arrScore.length);
}
function getFormatedScore(o) {
var _local1 = o;
var s1 = formatString(_local1.points, 7);
var s2 = formatString(_local1.name, 25);
var s3 = formatString(_local1.time, 5);
var s4 = formatString(_local1.attempts, 5);
var _local3 = formatString(_local1.level, 5);
var _local2 = formatString(_local1.date, 16);
return(((((s1 + s2) + s3) + s4) + _local3) + _local2);
}
function formatString(s, n) {
var _local1 = s;
var _local2 = n;
while (_local1.length < _local2) {
_local1 = _local1 + " ";
}
return(_local1.substr(0, _local2));
}
function addScoreItem(playersName) {
var _local1 = new Date();
arrScore.push({points:gamePoints, name:playersName, time:secondsCounter / 1000, attempts:attemptsCounter, level:gameLevel, date:(((((((_local1.getDate() + ".") + (_local1.getMonth() + 1)) + ".") + _local1.getFullYear()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()});
}
function getHighscore() {
var header = {points:"Points", name:"Name", time:"Time", attempts:"Att.", level:"Lev.", date:"Date"};
var _local2 = getFormatedScore(header);
arrScore.sort(comparePoints);
while (arrScore.length > 500) {
var _local3 = arrScore.pop();
}
var _local1 = 0;
while (_local1 < arrScore.length) {
_local2 = (_local2 + newline) + getFormatedScore(arrScore[_local1]);
_local1++;
}
return(_local2);
}
function comparePoints(a, b) {
var _local2 = a.points * 1;
var _local1 = b.points * 1;
if (_local2 > _local1) {
return(-1);
}
if (_local2 < _local1) {
return(1);
}
return(0);
}
if (!isNotFirstStart) {
createArrays();
initGame();
getInitialPosition();
initSharedObject();
loadHighscore();
}
updateGUI();
stop();
_root.onEnterFrame = function () {
var _local1 = _root;
if (_local1.gameIsRunning) {
if (getTimer() > ((_local1.startTime + _local1.secondsCounter) + 1000)) {
_local1.secondsCounter = _local1.secondsCounter + 1000;
_local1.setTimeDisplay();
}
if (_local1.showCards) {
if (_local1.showTimer == 0) {
_local1.showTimer = getTimer();
} else if ((getTimer() - _local1.showTimer) >= (1800 - (_local1.gameLevel * 200))) {
_local1.showTimer = 0;
_local1.showCards = false;
_local1.arrCats[selCat1]._visible = false;
_local1.arrCats[selCat2]._visible = false;
_local1.arrCards[selCard1]._visible = true;
_local1.arrCards[selCard2]._visible = true;
_local1.selCat1 = -1;
_local1.selCat2 = -1;
_local1.selCard1 = -1;
_local1.selCard2 = -1;
}
}
}
};
stop();
Frame 111
stop();
stop();
stop();
Frame 112
function onBtnApply() {
var _local1 = _root;
if (_local1.modeHighscore == 0) {
_local1.addScoreItem(txtPlayersName);
_local1.saveHighscore();
}
if (_local1.modeHighscore == 1) {
var _local2 = new Date();
var _local3 = (((((((_local2.getDate() + ".") + (_local2.getMonth() + 1)) + ".") + _local2.getFullYear()) + " ") + _local2.getHours()) + ":") + _local2.getMinutes();
loadVariablesNum ((((((((((("save_score.php?p=" + _local1.gamePoints) + "&n=") + escape(txtPlayersName)) + "&d=") + escape(_local3)) + "&l=") + _local1.gameLevel) + "&t=") + (_local1.secondsCounter / 1000)) + "&a=") + _local1.attemptsCounter, , "POST");
}
btnApply.setEnabled(false);
gotoAndPlay (110);
}
function OnBtnBack() {
gotoAndPlay (110);
}
scoreMsg = ("Your score is " + _root.gamePoints) + " points !";
txtScore = "Loading highscore, please wait...";
if (_root.modeHighscore == 0) {
txtScore = _root.getHighscore();
}
if (_root.modeHighscore == 1) {
txtTop10 = "Top 10:";
loadVariables ("get_score.php?count=10&" + (_root.phpCounter++), "", "POST");
}
var i = 0;
while (i < _root.arrCats[i].length) {
_root.arrCats[i]._visible = true;
_root.arrCards[i]._visible = false;
i++;
}
stop();
stop();
Instance of Symbol 119 MovieClip [FPushButtonSymbol] in Frame 112
//component parameters
onClipEvent (initialize) {
label = "Back";
clickHandler = "onBtnBack";
}
Instance of Symbol 119 MovieClip [FPushButtonSymbol] "btnApply" in Frame 112
//component parameters
onClipEvent (initialize) {
label = "Apply";
clickHandler = "onBtnApply";
}
Frame 113
stop();
Frame 114
function btnBack() {
gotoAndPlay (110);
}
txtScore = "Loading highscore, please wait ...";
if (_root.modeHighscore == 0) {
txtScore = _root.getHighscore();
}
if (_root.modeHighscore == 1) {
loadVariables ("get_score.php?count=500&" + (_root.phpCounter++), "", "POST");
}
stop();
Instance of Symbol 119 MovieClip [FPushButtonSymbol] in Frame 114
//component parameters
onClipEvent (initialize) {
label = "Back";
clickHandler = "btnBack";
}
Frame 115
stop();
Symbol 13 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 23 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 32 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 33 MovieClip [UpArrow] Frame 1
stop();
Symbol 33 MovieClip [UpArrow] Frame 2
stop();
Symbol 33 MovieClip [UpArrow] Frame 3
stop();
Symbol 39 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 46 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 52 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 53 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 61 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 69 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 77 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 78 MovieClip [DownArrow] Frame 1
stop();
Symbol 78 MovieClip [DownArrow] Frame 2
stop();
Symbol 78 MovieClip [DownArrow] Frame 3
stop();
Symbol 81 MovieClip [FHighlightSymbol] Frame 1
var component = _parent.controller;
component.registerSkinElement(highlight_mc, "selection");
stop();
Symbol 81 MovieClip [FHighlightSymbol] Frame 2
component.registerSkinElement(highlight_mc2, "selectionDisabled");
stop();
Symbol 81 MovieClip [FHighlightSymbol] Frame 3
component.registerSkinElement(highlight_mc3, "selectionUnfocused");
stop();
Symbol 85 MovieClip [FLabelSymbol] Frame 1
#initclip 2
_global.FLabelClass = function () {
var _local1 = this;
if (_local1.hostComponent == undefined) {
_local1.hostComponent = ((_local1._parent.controller == undefined) ? (_local1._parent) : (_local1._parent.controller));
}
if (_local1.customTextStyle == undefined) {
if (_local1.hostComponent.textStyle == undefined) {
_local1.hostComponent.textStyle = new TextFormat();
}
_local1.textStyle = _local1.hostComponent.textStyle;
_local1.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var _local1 = this;
var _local2 = _local1.hostComponent.styleTable.embedFonts.value;
if (_local2 != undefined) {
_local1.labelField.embedFonts = _local2;
}
_local1.labelField.setNewTextFormat(_local1.textStyle);
_local1.labelField.text = label;
_local1.labelField._height = _local1.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
var _local2 = this;
var _local3 = enable;
_local2.enable = _local3;
var _local1 = _local2.hostComponent.styleTable[(_local3 ? "textColor" : "textDisabled")].value;
if (_local1 == undefined) {
_local1 = (_local3 ? 0 : 8947848);
}
_local2.setColor(_local1);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 92 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 98 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 104 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame4, "shadow");
component.registerSkinElement(frame2, "darkshadow");
component.registerSkinElement(frame3, "highlight");
component.registerSkinElement(frame1, "highlight3D");
Symbol 110 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 111 MovieClip [fpb_states] Frame 1
stop();
Symbol 111 MovieClip [fpb_states] Frame 2
stop();
Symbol 111 MovieClip [fpb_states] Frame 3
stop();
Symbol 111 MovieClip [fpb_states] Frame 4
stop();
Symbol 112 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
var _local1 = this;
var _local3 = _global;
_local1.enable = true;
_local1.focused = false;
_local1.useHandCursor = false;
_local1._accImpl = new Object();
_local1._accImpl.stub = true;
_local1.styleTable = new Array();
if (_local3.globalStyleFormat == undefined) {
_local3.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_local3._focusControl = new Object();
_local3._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_local3._focusControl);
}
if (_local1._name != undefined) {
_local1._focusrect = false;
_local1.tabEnabled = true;
_local1.focusEnabled = true;
_local1.tabChildren = false;
_local1.tabFocused = true;
if (_local1.hostStyle == undefined) {
globalStyleFormat.addListener(_local1);
} else {
_local1.styleTable = _local1.hostStyle;
}
_local1.deadPreview._visible = false;
_local1.deadPreview._width = (_local1.deadPreview._height = 1);
_local1.methodTable = new Object();
_local1.keyListener = new Object();
_local1.keyListener.controller = _local1;
_local1.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
_local1.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local2 in _local1.styleFormat_prm) {
_local1.setStyleProperty(_local2, _local1.styleFormat_prm[_local2]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
_local1.enable = ((arguments.length > 0) ? (enabledFlag) : true);
_local1.tabEnabled = (_local1.focusEnabled = enabledFlag);
if ((!_local1.enable) && (_local1.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
var _local1 = this;
_local1.width = w;
_local1.height = h;
_local1.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
var _local1 = this;
_local1.handlerObj = ((obj == undefined) ? (_local1._parent) : (obj));
_local1.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
var _local1 = this;
_local1.methodTable[methodName] = true;
_local1.onEnterFrame = _local1.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
var _local1 = this;
if (_local1.methodTable.setSize) {
_local1.setSize(_local1.width, _local1.height);
} else {
_local1.cleanUINotSize();
}
_local1.methodTable = new Object();
delete _local1.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
var _local1 = this;
for (var _local2 in _local1.methodTable) {
_local1[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local1 = this;
var _local2 = y;
var _local3 = x;
var inner = _local1.styleTable.focusRectInner.value;
var outer = _local1.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
_local1.createEmptyMovieClip("focusRect", 1000);
_local1.focusRect.controller = _local1;
_local1.focusRect.lineStyle(1, outer);
_local1.focusRect.moveTo(_local3, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2);
_local1.focusRect.lineStyle(1, inner);
_local1.focusRect.moveTo(_local3 + 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, _local2 + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
var _local1 = this;
_local1.tabFocused = false;
_local1.focusRect.removeMovieClip();
Selection.setFocus(_local1);
};
FUIComponentClass.prototype.drawFocusRect = function () {
var _local1 = this;
_local1.drawRect(-2, -2, _local1.width + 4, _local1.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
var _local1 = this;
_local1.focused = true;
Key.addListener(_local1.keyListener);
if (_local1.tabFocused) {
_local1.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
var _local1 = this;
_local1.tabFocused = true;
_local1.focused = false;
_local1.focusRect.removeMovieClip();
Key.removeListener(_local1.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
var _local1 = this;
_local1.handlerObj[_local1.changeHandler](_local1);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
var _local1 = this;
var _local2 = propName;
if (value == "") {
} else {
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].useGlobal || (!global)) {
_local1.styleTable[_local2].value = value;
if (_local1.setCustomStyleProperty(_local2, value)) {
} else if (_local2 == "embedFonts") {
_local1.invalidate("setSize");
} else if (_local2.subString(0, 4) == "text") {
if (_local1.textStyle == undefined) {
_local1.textStyle = new TextFormat();
}
var textProp = _local2.subString(4, _local2.length);
_local1.textStyle[textProp] = value;
_local1.invalidate("setSize");
} else {
for (var j in _local1.styleTable[_local2].coloredMCs) {
var _local3 = new Color(_local1.styleTable[_local2].coloredMCs[j]);
if (_local1.styleTable[_local2].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local3.setTransform(myTObj);
} else {
_local3.setRGB(value);
}
}
}
_local1.styleTable[_local2].useGlobal = global;
}
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
var _local1 = this;
var _local2 = propName;
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].coloredMCs == undefined) {
_local1.styleTable[_local2].coloredMCs = new Object();
}
_local1.styleTable[_local2].coloredMCs[skinMCRef] = skinMCRef;
if (_local1.styleTable[_local2].value != undefined) {
var _local3 = new Color(skinMCRef);
_local3.setRGB(_local1.styleTable[_local2].value);
}
};
_global.FStyleFormat = function () {
var _local1 = arguments;
var _local2 = this;
_local2.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
_local2.listeners = new Object();
_local2.isGlobal = false;
if (_local1.length > 0) {
for (var _local3 in _local1[0]) {
_local2[_local3] = _local1[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local1 = this;
var _local2 = 0;
while (_local2 < arguments.length) {
var _local3 = arguments[_local2];
_local1.listeners[arguments[_local2]] = _local3;
for (var i in _local1) {
if (_local1.isAStyle(i)) {
_local3.updateStyleProperty(_local1, i.toString());
}
}
_local2++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
var _local1 = this;
var _local2 = component;
_local1.listeners[_local2] = undefined;
for (var prop in _local1) {
if (_local1.isAStyle(prop)) {
if (_local2.styleTable[prop].useGlobal == _local1.isGlobal) {
_local2.styleTable[prop].useGlobal = true;
var _local3 = (_local1.isGlobal ? undefined : (globalStyleFormat[prop]));
_local2.setStyleProperty(prop, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local1 = this;
var _local2 = arguments;
var count = 0;
for (var i in _local1.listeners) {
var _local3 = _local1.listeners[i];
if (_local2.length > 0) {
var j = 0;
while (j < _local2.length) {
if (_local1.isAStyle(_local2[j])) {
_local3.updateStyleProperty(_local1, _local2[j]);
}
j++;
}
} else {
for (var j in _local1) {
if (_local1.isAStyle(j)) {
_local3.updateStyleProperty(_local1, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 118 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 118 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 119 MovieClip [FPushButtonSymbol] Frame 1
#initclip 3
function FPushButtonClass() {
this.init();
}
FPushButtonClass.prototype = new FUIComponentClass();
Object.registerClass("FPushButtonSymbol", FPushButtonClass);
FPushButtonClass.prototype.init = function () {
var _local1 = this;
super.setSize(_local1._width, _local1._height);
_local1.boundingBox_mc.unloadMovie();
_local1.attachMovie("fpb_states", "fpbState_mc", 1);
_local1.attachMovie("FLabelSymbol", "fLabel_mc", 2);
_local1.attachMovie("fpb_hitArea", "fpb_hitArea_mc", 3);
super.init();
_local1.btnState = false;
_local1.setClickHandler(_local1.clickHandler);
_local1._xscale = 100;
_local1._yscale = 100;
_local1.setSize(_local1.width, _local1.height);
if (_local1.label != undefined) {
_local1.setLabel(_local1.label);
}
_local1.ROLE_SYSTEM_PUSHBUTTON = 43;
_local1.STATE_SYSTEM_PRESSED = 8;
_local1.EVENT_OBJECT_STATECHANGE = 32778;
_local1.EVENT_OBJECT_NAMECHANGE = 32780;
_local1._accImpl.master = _local1;
_local1._accImpl.stub = false;
_local1._accImpl.get_accRole = _local1.get_accRole;
_local1._accImpl.get_accName = _local1.get_accName;
_local1._accImpl.get_accState = _local1.get_accState;
_local1._accImpl.get_accDefaultAction = _local1.get_accDefaultAction;
_local1._accImpl.accDoDefaultAction = _local1.accDoDefaultAction;
};
FPushButtonClass.prototype.setHitArea = function (w, h) {
var _local1 = this.fpb_hitArea_mc;
this.hitArea = _local1;
_local1._visible = false;
_local1._width = w;
_local1._height = ((arguments.length > 1) ? (h) : (_local1._height));
};
FPushButtonClass.prototype.setSize = function (w, h) {
var _local1 = this;
var _local2 = w;
var _local3 = h;
_local2 = ((_local2 < 6) ? 6 : (_local2));
if (arguments.length > 1) {
if (_local3 < 6) {
_local3 = 6;
}
}
super.setSize(_local2, _local3);
_local1.setLabel(_local1.getLabel());
_local1.arrangeLabel();
_local1.setHitArea(_local2, _local3);
_local1.boundingBox_mc._width = _local2;
_local1.boundingBox_mc._height = _local3;
_local1.drawFrame();
if (_local1.focused) {
super.myOnSetFocus();
}
_local1.initContentPos("fLabel_mc");
};
FPushButtonClass.prototype.arrangeLabel = function () {
var _local3 = this;
var _local1 = _local3.fLabel_mc;
var h = _local3.height;
var w = (_local3.width - 2);
var _local2 = 1;
_local3.fLabel_mc.setSize(w - (_local2 * 4));
_local1._x = _local2 * 3;
_local1._y = (h / 2) - (_local1._height / 2);
};
FPushButtonClass.prototype.getLabel = function () {
return(this.fLabel_mc.labelField.text);
};
FPushButtonClass.prototype.setLabel = function (label) {
var _local1 = this;
_local1.fLabel_mc.setLabel(label);
_local1.txtFormat();
_local1.arrangeLabel();
if (Accessibility.isActive()) {
Accessibility.sendEvent(_local1, 0, _local1.EVENT_OBJECT_NAMECHANGE);
}
};
FPushButtonClass.prototype.getEnabled = function () {
return(this.enabled);
};
FPushButtonClass.prototype.setEnabled = function (enable) {
var _local1 = this;
if (enable || (enable == undefined)) {
_local1.gotoFrame(1);
_local1.drawFrame();
_local1.flabel_mc.setEnabled(true);
_local1.enabled = true;
super.setEnabled(true);
} else {
_local1.gotoFrame(4);
_local1.drawFrame();
_local1.flabel_mc.setEnabled(false);
_local1.enabled = false;
super.setEnabled(false);
}
};
FPushButtonClass.prototype.txtFormat = function () {
var _local1 = this;
var _local2 = _local1.textStyle;
var _local3 = _local1.styleTable;
_local2.align = ((_local3.textAlign.value == undefined) ? ((_local2.align = "center")) : undefined);
_local2.leftMargin = ((_local3.textLeftMargin.value == undefined) ? ((_local2.leftMargin = 1)) : undefined);
_local2.rightMargin = ((_local3.textRightMargin.value == undefined) ? ((_local2.rightMargin = 1)) : undefined);
if (_local1.fLabel_mc._height > _local1.height) {
super.setSize(_local1.width, _local1.fLabel_mc._height);
} else {
super.setSize(_local1.width, _local1.height);
}
_local1.fLabel_mc.labelField.setTextFormat(_local1.textStyle);
_local1.setEnabled(_local1.enable);
};
FPushButtonClass.prototype.drawFrame = function () {
var _local3 = this;
var _local2 = 1;
var x1 = 0;
var y1 = 0;
var x2 = _local3.width;
var y2 = _local3.height;
var mc_array = ["up_mc", "over_mc", "down_mc", "disabled_mc"];
var frame = mc_array[_local3.fpbState_mc._currentframe - 1];
var mc = "frame";
var _local1 = 0;
while (_local1 < 6) {
x1 = x1 + ((_local1 % 2) * _local2);
y1 = y1 + ((_local1 % 2) * _local2);
x2 = x2 - (((_local1 + 1) % 2) * _local2);
y2 = y2 - (((_local1 + 1) % 2) * _local2);
var w = (Math.abs(x1 - x2) + (2 * _local2));
var h = (Math.abs(y1 - y2) + (2 * _local2));
_local3.fpbState_mc[frame][mc + _local1]._width = w;
_local3.fpbState_mc[frame][mc + _local1]._height = h;
_local3.fpbState_mc[frame][mc + _local1]._x = x1 - _local2;
_local3.fpbState_mc[frame][mc + _local1]._y = y1 - _local2;
_local1++;
}
};
FPushButtonClass.prototype.setClickHandler = function (chng, obj) {
var _local1 = this;
_local1.handlerObj = ((arguments.length < 2) ? (_local1._parent) : (obj));
_local1.clickHandler = chng;
};
FPushButtonClass.prototype.executeCallBack = function () {
var _local1 = this;
_local1.handlerObj[_local1.clickHandler](_local1);
};
FPushButtonClass.prototype.initContentPos = function (mc) {
var _local1 = this;
_local1.incrVal = 1;
_local1.initx = _local1[mc]._x - (_local1.getBtnState() * _local1.incrVal);
_local1.inity = _local1[mc]._y - (_local1.getBtnState() * _local1.incrVal);
_local1.togx = _local1.initx + _local1.incrVal;
_local1.togy = _local1.inity + _local1.incrVal;
};
FPushButtonClass.prototype.setBtnState = function (state) {
var _local1 = this;
_local1.btnState = state;
if (state) {
_local1.fLabel_mc._x = _local1.togx;
_local1.fLabel_mc._y = _local1.togy;
} else {
_local1.fLabel_mc._x = _local1.initx;
_local1.fLabel_mc._y = _local1.inity;
}
};
FPushButtonClass.prototype.getBtnState = function () {
return(this.btnState);
};
FPushButtonClass.prototype.myOnSetFocus = function () {
this.focused = true;
super.myOnSetFocus();
};
FPushButtonClass.prototype.onPress = function () {
var _local1 = this;
_local1.pressFocus();
_local1.fpbState_mc.gotoAndStop(3);
_local1.drawFrame();
_local1.setBtnState(true);
if (Accessibility.isActive()) {
Accessibility.sendEvent(_local1, 0, _local1.EVENT_OBJECT_STATECHANGE, true);
}
};
FPushButtonClass.prototype.onRelease = function () {
var _local1 = this;
_local1.fpbState_mc.gotoAndStop(2);
_local1.drawFrame();
_local1.executeCallBack();
_local1.setBtnState(false);
if (Accessibility.isActive()) {
Accessibility.sendEvent(_local1, 0, _local1.EVENT_OBJECT_STATECHANGE, true);
}
};
FPushButtonClass.prototype.onRollOver = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
};
FPushButtonClass.prototype.onRollOut = function () {
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onReleaseOutside = function () {
var _local1 = this;
_local1.setBtnState(false);
_local1.fpbState_mc.gotoAndStop(1);
_local1.drawFrame();
};
FPushButtonClass.prototype.onDragOut = function () {
var _local1 = this;
_local1.setBtnState(false);
_local1.fpbState_mc.gotoAndStop(1);
_local1.drawFrame();
};
FPushButtonClass.prototype.onDragOver = function () {
var _local1 = this;
_local1.setBtnState(true);
_local1.fpbState_mc.gotoAndStop(3);
_local1.drawFrame();
};
FPushButtonClass.prototype.myOnKeyDown = function () {
var _local1 = this;
if ((Key.getCode() == 32) && (_local1.pressOnce == undefined)) {
_local1.onPress();
_local1.pressOnce = 1;
}
};
FPushButtonClass.prototype.myOnKeyUp = function () {
if (Key.getCode() == 32) {
this.onRelease();
this.pressOnce = undefined;
}
};
FPushButtonClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_PUSHBUTTON);
};
FPushButtonClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FPushButtonClass.prototype.get_accState = function (childId) {
var _local1 = this;
if (_local1.pressOnce) {
return(_local1.master.STATE_SYSTEM_PRESSED);
}
return(_local1.master.STATE_SYSTEM_DEFAULT);
};
FPushButtonClass.prototype.get_accDefaultAction = function (childId) {
return("Press");
};
FPushButtonClass.prototype.accDoDefaultAction = function (childId) {
this.master.onPress();
this.master.onRelease();
};
#endinitclip
boundingBox_mc._visible = false;
deadPreview._visible = false;
Symbol 188 Button
on (release) {
_root.play();
}
Symbol 203 Button
on (release) {
stopAllSounds();
}
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 3
stop();
Symbol 237 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 3
stop();
Symbol 239 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 3
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 3
stop();
Symbol 243 Button
on (release) {
_root.checkCard(15);
}
Symbol 244 Button
on (release) {
_root.checkCard(14);
}
Symbol 245 Button
on (release) {
_root.checkCard(13);
}
Symbol 246 Button
on (release) {
_root.checkCard(12);
}
Symbol 247 Button
on (release) {
_root.checkCard(11);
}
Symbol 248 Button
on (release) {
_root.checkCard(10);
}
Symbol 249 Button
on (release) {
_root.checkCard(9);
}
Symbol 250 Button
on (release) {
_root.checkCard(8);
}
Symbol 251 Button
on (release) {
_root.checkCard(7);
}
Symbol 252 Button
on (release) {
_root.checkCard(6);
}
Symbol 253 Button
on (release) {
_root.checkCard(5);
}
Symbol 254 Button
on (release) {
_root.checkCard(4);
}
Symbol 255 Button
on (release) {
_root.checkCard(3);
}
Symbol 256 Button
on (release) {
_root.checkCard(2);
}
Symbol 257 Button
on (release) {
_root.checkCard(1);
}
Symbol 258 Button
on (release) {
_root.checkCard(0);
}
Symbol 318 Button
on (release) {
if (_root.gameLevel > 0) {
_root.gameLevel--;
_root.setLevelDisplay();
}
}
Symbol 324 Button
on (release) {
if (_root.gameLevel < 9) {
_root.gameLevel++;
_root.setLevelDisplay();
}
}
Symbol 331 Button
on (release) {
if (_root.gameIsRunning) {
_root.gameIsRunning = false;
_root.updateButtonState();
}
}
Symbol 336 Button
on (release) {
if (!_root.gameIsRunning) {
_root.gameIsRunning = true;
_root.shuffle();
_root.startTime = getTimer();
_root.secondsCounter = 0;
_root.attemptsCounter = 0;
_root.matchesCounter = 0;
_root.gamePoints = 0;
_root.setTimeDisplay();
_root.setMatchesDisplay();
_root.setAttemptsDisplay();
_root.updateButtonState();
}
}
Symbol 353 Button
on (release) {
getURL ("http://mypage.bluewin.ch/katzenseite");
}