Frame 1
stop();
Instance of Symbol 33 MovieClip in Frame 1
onClipEvent (load) {
stop();
i = 1;
mytime = new Date();
startload = _root.getBytesLoaded();
starttime = (((mytime.getHours() * 3600000) + (mytime.getMinutes() * 60000)) + (mytime.getSeconds() * 1000)) + mytime.getMilliseconds();
}
onClipEvent (enterFrame) {
var l = _level0.getBytesLoaded();
var t = _level0.getBytesTotal();
var pv = int((l / t) * 100);
if (pv >= 100) {
pv = 100;
}
if (l >= t) {
_root.gotoAndStop(2);
}
this.gotoAndStop(pv);
var mytime = new Date();
var difftime = (((((mytime.getHours() * 3600000) + (mytime.getMinutes() * 60000)) + (mytime.getSeconds() * 1000)) + mytime.getMilliseconds()) - starttime);
if ((i * 500) < difftime) {
i++;
speed = int((10 * ((l - startload) / 1024)) / (difftime / 1000)) / 10;
}
_parent.display = ((("SPEED: " + speed) + " kb/s LOADED: ") + pv) + "%";
}
Instance of Symbol 39 MovieClip "fps" in Frame 1
onClipEvent (load) {
var elapsedTime = new Array();
_visible = false;
}
onClipEvent (enterFrame) {
elapsedTime.push(getTimer());
if (elapsedTime.length > 10) {
elapsedTime.shift();
elapsedAverage = (elapsedTime[elapsedTime.length - 1] - elapsedTime[0]) / elapsedTime.length;
fps = Math.ceil(1000 / elapsedAverage);
text = fps;
}
}
Frame 2
function initGame() {
Coords = new Array();
pair = new Array(2);
currentSound = new Array();
indent = 0;
turn = 0;
moved = 0;
points = 0;
spoints = 0;
ignoreRollOver = 1;
noticeStarted = 0;
turnedBack = 0;
moveFruits = 1;
moved = 0;
ignoreSound = (ignoreSound ? 1 : 0);
isPause = false;
levelUp = false;
_root.level.text = 1;
levelNumber = 1;
trace("_root.level.text=" + _root.level.text);
isGameOver = false;
initBoard();
setTimer();
switch (version) {
case 1 :
initButtonsBetweenFruits();
return;
case 2 :
initButtons();
return;
default :
initButtonsBetweenFruits();
}
}
function mainProcess() {
if (moveFruits) {
processMoveFruits();
}
if (turn || (moved)) {
checkForEqual();
}
if (!isPause) {
processTimer();
}
}
function setTimer() {
time = maxTime;
var _local2 = Math.floor(time / 60);
var _local1 = time % 60;
_local1 = ((_local1 < 10) ? ("0" add _local1) : (_local1));
timer = (_local2 + ":") + _local1;
lastTime = getTimer();
lastMysterTime = lastTime;
}
function processTimer() {
var _local3 = _root;
var _local2 = getTimer();
var diff = (Math.floor(_local2 / 1000) - Math.floor(lastTime / 1000));
var mysteryDiff = (Math.floor(_local2 / 1000) - Math.floor(lastMysteryTime / 1000));
if (!isPause) {
_local3.mixer.mixer_bar._yscale = _local3.mixer.mixer_bar._yscale - (diff * Number(_local3.level.text));
}
if (contPressed) {
trace("_root.mixerBar=" + mixerLine);
_local3.mixer.mixer_bar._yscale = mixerLine;
contPressed = false;
}
var min = Math.floor(time / 60);
var _local1 = time % 60;
_local1 = ((_local1 < 10) ? ("0" add _local1) : (_local1));
timer = (min + ":") + _local1;
lastTime = _local2;
if (_local3.mixer.mixer_bar._yscale < 1) {
_local3.mixer.mixer_bar._yscale = 0;
clearMovies();
isPause = true;
isGameOver = true;
continueGame = false;
gotoAndStop ("gameover");
}
if (time <= doubleTime) {
dbl_points_tpl._visible = true;
dbl_points_tpl.play();
if ((!ignoreSound) && (!noticeStarted)) {
noticeSound.start();
noticeStarted = 1;
}
}
if ((mysteryDiff >= mysteryPeriod) && (version == 2)) {
setMysteryFruits();
lastMysteryTime = _local2;
}
}
function setMysteryFruits() {
var i;
var _local3;
var _local1;
var _local2;
mysteryFruitsStack = new Array();
_local1 = 0;
while (_local1 < mysteryFruits) {
i = random(maxVert);
_local3 = random(maxHoriz);
_local2 = ("fruit_" + i) + _local3;
_root[_local2].mystery = true;
mysteryFruitsStack.push(_root[_local2]);
_local1++;
}
if (!ignoreSound) {
mysterySound.start();
}
procMystery = 0;
}
function hideParentMovies() {
fruit_tpl._visible = false;
points_tpl._visible = false;
dbl_points_tpl._visible = false;
btn_fruit_tpl._visible = false;
btn_between_fruits_tpl._visible = false;
wnd_newGame._visible = false;
_root.options_hint._visible = false;
}
function initBoard() {
var _local2;
var _local1;
var _local3;
var y;
var width = (Math.floor(fruit_tpl._width) + horizSpace);
var height = (Math.floor(fruit_tpl._height) + vertSpace);
y = startY;
_local2 = 0;
while (_local2 < maxVert) {
_local3 = startX;
Coords[_local2] = new Array(maxHoriz);
_local1 = 0;
while (_local1 < maxHoriz) {
Coords[_local2][_local1] = new Array(_local3, y);
_local3 = _local3 + width;
_local1++;
}
y = y + height;
_local2++;
}
}
function initButtons() {
var _local3;
var _local1;
var _local2;
var offsetX = Math.floor((fruit_tpl._width - btn_fruit_tpl._width) / 2);
var offsetY = Math.floor((fruit_tpl._height - btn_fruit_tpl._height) / 2);
_local3 = 0;
while (_local3 < maxVert) {
_local1 = 0;
while (_local1 < maxHoriz) {
_local2 = ("btn_fruit_" + _local3) + _local1;
btn_fruit_tpl.duplicateMovieClip(_local2, indent++);
_root[_local2]._x = Coords[_local3][_local1][0] + offsetX;
_root[_local2]._y = Coords[_local3][_local1][1] + offsetY;
_root[_local2].i = _local3;
_root[_local2].j = _local1;
_local1++;
}
_local3++;
}
}
function initButtonsBetweenFruits() {
var _local3 = _root;
var i;
var _local2;
var _local1;
var offsetX = Math.floor((fruit_tpl._width + horizSpace) / 2);
var offsetY = Math.floor((fruit_tpl._height + vertSpace) / 2);
i = 0;
while (i < maxVert) {
_local2 = 0;
while (_local2 < (maxHoriz - 1)) {
_local1 = ("btn_between_fruits_h_" + i) + _local2;
btn_between_fruits_tpl.duplicateMovieClip(_local1, indent++);
_local3[_local1]._x = Coords[i][_local2][0] + offsetX;
_local3[_local1]._y = Coords[i][_local2][1];
_local3[_local1].i1 = i;
_local3[_local1].j1 = _local2;
_local3[_local1].i2 = i;
_local3[_local1].j2 = _local2 + 1;
_local3[_local1].line = HORIZONTAL;
_local2++;
}
i++;
}
i = 0;
while (i < (maxVert - 1)) {
_local2 = 0;
while (_local2 < maxHoriz) {
_local1 = ("btn_between_fruits_v_" + i) + _local2;
btn_between_fruits_tpl.duplicateMovieClip(_local1, indent++);
_local3[_local1]._x = Coords[i][_local2][0];
_local3[_local1]._y = Coords[i][_local2][1] + offsetY;
_local3[_local1].i1 = i;
_local3[_local1].j1 = _local2;
_local3[_local1].i2 = i + 1;
_local3[_local1].j2 = _local2;
_local3[_local1].line = VERTICAL;
_local2++;
}
i++;
}
}
function checkForEqual() {
var _local3 = _root;
var i;
var j;
var _local2;
var _local1 = new Array();
var equalFruits = new Array();
i = 0;
while (i < maxVert) {
if (_local1.length > (minEqual - 1)) {
points = points + ((time < doubleTime) ? (2 * pointsPerFruits[_local1.length]) : (pointsPerFruits[_local1.length]));
showPoints(_local1[0], _local1.length, 2);
while (_local1.length) {
equalFruits.push(_local1.pop());
}
}
_local1 = new Array();
j = 0;
while (j < maxHoriz) {
_local2 = ("fruit_" + i) + j;
if (_local3[_local2] != undefined) {
if (!_local1.length) {
_local1.push(_local3[_local2]);
} else if (_local1[_local1.length - 1].fruit._currentframe == _local3[_local2].fruit._currentframe) {
_local1.push(_local3[_local2]);
} else {
if (_local1.length > (minEqual - 1)) {
points = points + ((time < doubleTime) ? (2 * pointsPerFruits[_local1.length]) : (pointsPerFruits[_local1.length]));
showPoints(_local1[0], _local1.length, 1);
while (_local1.length) {
equalFruits.push(_local1.pop());
}
}
_local1 = new Array();
_local1.push(_local3[_local2]);
}
}
j++;
}
i++;
}
if (_local1.length > (minEqual - 1)) {
points = points + ((time < doubleTime) ? (2 * pointsPerFruits[_local1.length]) : (pointsPerFruits[_local1.length]));
showPoints(_local1[0], _local1.length, 1);
while (_local1.length) {
equalFruits.push(_local1.pop());
}
}
_local1 = new Array();
j = 0;
while (j < maxHoriz) {
if (_local1.length > (minEqual - 1)) {
points = points + ((time < doubleTime) ? (2 * pointsPerFruits[_local1.length]) : (pointsPerFruits[_local1.length]));
showPoints(_local1[0], _local1.length, 1);
while (_local1.length) {
equalFruits.push(_local1.pop());
}
}
_local1 = new Array();
i = 0;
while (i < maxVert) {
_local2 = ("fruit_" + i) + j;
if (_local3[_local2] != undefined) {
if (!_local1.length) {
_local1.push(_local3[_local2]);
} else if (_local1[_local1.length - 1].fruit._currentframe == _local3[_local2].fruit._currentframe) {
_local1.push(_local3[_local2]);
} else {
if (_local1.length > (minEqual - 1)) {
points = points + ((time < doubleTime) ? (2 * pointsPerFruits[_local1.length]) : (pointsPerFruits[_local1.length]));
showPoints(_local1[0], _local1.length, 2);
while (_local1.length) {
equalFruits.push(_local1.pop());
}
}
_local1 = new Array();
_local1.push(_local3[_local2]);
}
}
i++;
}
j++;
}
if (_local1.length > (minEqual - 1)) {
points = points + ((time < doubleTime) ? (2 * pointsPerFruits[_local1.length]) : (pointsPerFruits[_local1.length]));
showPoints(_local1[0], _local1.length, 2);
while (_local1.length) {
equalFruits.push(_local1.pop());
}
}
i = 0;
while (i < equalFruits.length) {
if (equalFruits[i] != undefined) {
removeMovieClip(equalFruits[i]);
}
i++;
}
if (equalFruits.length) {
if (!ignoreSound) {
fireSound.start();
}
moveFruits = 1;
} else if (turn && (!turnedBack)) {
points = points + ((time < doubleTime) ? (2 * pointsPerFruits[0]) : (pointsPerFruits[0]));
if (points < 0) {
points = 0;
}
showWrong();
turnBack();
}
turn = 0;
moved = 0;
}
function processMoveFruits() {
var _local1 = _root;
ignoreRollOver = 1;
var _local3;
var _local2;
var fruit;
var enaugh = 1;
_local2 = 0;
while (_local2 < maxHoriz) {
_local3 = 0;
while (_local3 < (maxVert - 1)) {
if ((_local1[("fruit_" + _local3) + _local2] != undefined) && (_local1[("fruit_" + (_local3 + 1)) + _local2] == undefined)) {
enaugh = 0;
_local1[("fruit_" + _local3) + _local2].fallDown = true;
}
_local3++;
}
_local2++;
}
_local2 = 0;
while (_local2 < maxHoriz) {
_local3 = 0;
while (_local3 < (maxVert - 1)) {
fruit = ("fruit_" + _local3) + _local2;
if ((_local1[fruit] != undefined) && (_local1[fruit].fallDown)) {
_local1[fruit].fallDown = false;
_local1[fruit]._x = Coords[_local3 + 1][_local2][0];
_local1[fruit]._y = Coords[_local3 + 1][_local2][1];
_local1[fruit].i = _local3 + 1;
_local1[fruit].j = _local2;
_local1[fruit]._name = ("fruit_" + (_local3 + 1)) + _local2;
}
_local3++;
}
_local2++;
}
_local2 = 0;
while (_local2 < maxHoriz) {
fruit = "fruit_0" + _local2;
if (_local1[fruit] == undefined) {
enaugh = 0;
duplicateMovieClip ("fruit_tpl", fruit, indent++);
_local1[fruit]._x = Coords[0][_local2][0];
_local1[fruit]._y = Coords[0][_local2][1];
_local1[fruit].fallDown = false;
_local1[fruit].mystery = false;
_local1[fruit].i = 0;
_local1[fruit].j = _local2;
}
_local2++;
}
if (enaugh) {
moveFruits = 0;
ignoreRollOver = 0;
moved = 1;
pair = new Array(2);
if (!findPossibleTurn()) {
switch (version) {
case 1 :
hideButtonsBetweenFruits();
break;
case 2 :
hideButtons();
break;
default :
hideButtonsBetweenFruits();
}
removeAllFruits();
isPause = true;
gotoAndStop ("endMoves");
}
}
if (levelUp) {
moveFruits = 0;
ignoreRollOver = 0;
moved = 1;
pair = new Array(2);
switch (version) {
case 1 :
hideButtonsBetweenFruits();
break;
case 2 :
hideButtons();
break;
default :
hideButtonsBetweenFruits();
}
removeAllFruits();
isPause = true;
if (_local1.level.text == 5) {
isGameOver = true;
gotoAndStop ("gameover");
} else {
gotoAndStop ("levelUp");
}
}
}
function showPoints(fruit, count, koord) {
var _local3 = _root;
var x = 0;
var y = 0;
var _local1 = "points_up_" + indent;
duplicateMovieClip ("points_tpl", _local1, 2 * (indent++));
_local3[_local1]._x = fruit._x + 10;
_local3[_local1]._y = fruit._y + 10;
_local3[_local1].text.number = ((time < doubleTime) ? (2 * pointsPerFruits[count]) : (pointsPerFruits[count]));
if (koord == 1) {
x = 1;
y = 0;
}
if (koord == 2) {
x = 0;
y = 1;
}
var _local2 = 0;
while (_local2 < count) {
_local1 = (("fruit_to_blender_" + indent) + "_") + _local2;
fruits_blender_tpl.duplicateMovieClip(_local1, indent++);
_local3[_local1]._x = fruit._x + ((_local2 * 50) * x);
_local3[_local1]._y = fruit._y + ((_local2 * 50) * y);
_local3[_local1].gotoAndStop(fruit.fruit._currentframe);
_local3[_local1].rotten.gotoAndStop(fruit.fruit.rotten._currentframe);
_local3[_local1].bg._visible = false;
_local2++;
}
}
function showWrong() {
var _local2 = _root;
var _local1 = "points_up_" + indent;
duplicateMovieClip ("points_tpl", _local1, 2 * (indent++));
_local2[_local1]._x = _local2[pair[0]]._x + 10;
_local2[_local1]._y = _local2[pair[0]]._y + 10;
_local2[_local1].text.number = ((time < doubleTime) ? (2 * pointsPerFruits[0]) : (pointsPerFruits[0]));
if (!ignoreSound) {
wrongSound.start();
}
}
function showHelpPoints() {
var _local2 = _root;
var _local1 = "points_up_" + indent;
duplicateMovieClip ("points_tpl", _local1, 2 * (indent++));
_local2[_local1]._x = possiblePair[0]._x + 15;
_local2[_local1]._y = possiblePair[0]._y + 15;
_local2[_local1].text.number = ((time < doubleTime) ? (-2 * pointsPerHelp) : (-pointsPerHelp));
}
function showMysteryPoints(i, j) {
var _local2 = _root;
var _local1 = "points_up_" + indent;
duplicateMovieClip ("points_tpl", _local1, 2 * (indent++));
_local2[_local1]._x = Coords[i][j][0] + 15;
_local2[_local1]._y = Coords[i][j][1] + 15;
_local2[_local1].text.number = ((time < doubleTime) ? (2 * pointsPerMystery) : (pointsPerMystery));
}
function turnBack() {
var _local1 = _root;
ignoreRollOver = 1;
var _local3 = pair[0];
var _local2 = pair[1];
var i1 = _local1[_local3].i;
var j1 = _local1[_local3].j;
var i2 = _local1[_local2].i;
var j2 = _local1[_local2].j;
if (i1 == i2) {
_local1[_local3].gotoAndPlay(((j1 < j2) ? "right" : "left"));
_local1[_local2].gotoAndPlay(((j1 > j2) ? "right" : "left"));
} else {
_local1[_local3].gotoAndPlay(((i1 > i2) ? "up" : "down"));
_local1[_local2].gotoAndPlay(((i1 < i2) ? "up" : "down"));
}
_local1[_local3].newName = _local2;
_local1[_local3].i = i2;
_local1[_local3].j = j2;
_local1[_local2].newName = _local3;
_local1[_local2].i = i1;
_local1[_local2].j = j1;
turnedBack = 1;
pair = new Array(2);
_local1[_local3].select._visible = false;
_local1[_local2].select._visible = false;
}
function helpTurn() {
if (points >= pointsPerHelp) {
possiblePair[0].gotoAndPlay("over");
possiblePair[1].gotoAndPlay("over");
points = points - ((time < doubleTime) ? (2 * pointsPerHelp) : (pointsPerHelp));
_root.mixer.mixer_bar._yscale = _root.mixer.mixer_bar._yscale - 5;
showHelpPoints();
}
}
function findPossibleTurn() {
var _local2;
var _local3;
var _local1 = new Array();
possiblePair = new Array();
i = 0;
while (i < maxVert) {
if ((_local1.length > (minEqual - 2)) && (isPossibleHoriz(_local1))) {
return(true);
}
_local1 = new Array();
j = 0;
while (j < maxHoriz) {
_local2 = _root[("fruit_" + i) + j];
if (_local2 != undefined) {
if (!_local1.length) {
_local1.push(_local2);
} else {
_local3 = _root[("fruit_" + i) + (j + 1)];
if (_local1[_local1.length - 1].fruit._currentframe == _local2.fruit._currentframe) {
_local1.push(_local2);
} else if ((_local3 != undefined) && (_local1[0].fruit._currentframe == _local3.fruit._currentframe)) {
_local1.push(_local2);
_local1.push(_local3);
if (isPossibleBetweenHoriz(_local1)) {
return(true);
}
_local1 = new Array();
_local1.push(_local2);
} else {
if ((_local1.length > (minEqual - 2)) && (isPossibleHoriz(_local1))) {
return(true);
}
_local1 = new Array();
_local1.push(_local2);
}
}
}
j++;
}
i++;
}
if ((_local1.length > (minEqual - 2)) && (isPossibleHoriz(_local1))) {
return(true);
}
_local1 = new Array();
j = 0;
while (j < maxHoriz) {
if ((_local1.length > (minEqual - 2)) && (isPossibleVert(_local1))) {
return(true);
}
_local1 = new Array();
i = 0;
while (i < maxVert) {
_local2 = _root[("fruit_" + i) + j];
if (_local2 != undefined) {
if (!_local1.length) {
_local1.push(_local2);
} else {
_local3 = _root[("fruit_" + (i + 1)) + j];
if (_local1[_local1.length - 1].fruit._currentframe == _local2.fruit._currentframe) {
_local1.push(_local2);
} else if ((_local3 != undefined) && (_local1[0].fruit._currentframe == _local3.fruit._currentframe)) {
_local1.push(_local2);
_local1.push(_local3);
if (isPossibleBetweenVert(_local1)) {
return(true);
}
_local1 = new Array();
_local1.push(_local2);
} else {
if ((_local1.length > (minEqual - 2)) && (isPossibleVert(_local1))) {
return(true);
}
_local1 = new Array();
_local1.push(_local2);
}
}
}
i++;
}
j++;
}
if ((_local1.length > (minEqual - 2)) && (isPossibleVert(_local1))) {
return(true);
}
return(false);
}
function isPossibleHoriz(fruits) {
var _local2 = fruits;
var _local1;
var leftFruits = new Array();
var _local3 = new Array();
leftFruits.push(_root[("fruit_" + (_local2[0].i - 1)) + (_local2[0].j - 1)]);
leftFruits.push(_root[("fruit_" + _local2[0].i) + (_local2[0].j - 2)]);
leftFruits.push(_root[("fruit_" + (_local2[0].i + 1)) + (_local2[0].j - 1)]);
_local3.push(_root[("fruit_" + (_local2[_local2.length - 1].i - 1)) + (_local2[_local2.length - 1].j + 1)]);
_local3.push(_root[("fruit_" + _local2[_local2.length - 1].i) + (_local2[_local2.length - 1].j + 2)]);
_local3.push(_root[("fruit_" + (_local2[_local2.length - 1].i + 1)) + (_local2[_local2.length - 1].j + 1)]);
_local1 = 0;
while (_local1 < leftFruits.length) {
if ((leftFruits[_local1] != undefined) && (leftFruits[_local1].fruit._currentframe == _local2[0].fruit._currentframe)) {
possiblePair[0] = leftFruits[_local1];
possiblePair[1] = _root[("fruit_" + _local2[0].i) + (_local2[0].j - 1)];
return(true);
}
_local1++;
}
_local1 = 0;
while (_local1 < _local3.length) {
if ((_local3[_local1] != undefined) && (_local3[_local1].fruit._currentframe == _local2[_local2.length - 1].fruit._currentframe)) {
possiblePair[0] = _local3[_local1];
possiblePair[1] = _root[("fruit_" + _local2[_local2.length - 1].i) + (_local2[_local2.length - 1].j + 1)];
return(true);
}
_local1++;
}
return(false);
}
function isPossibleVert(fruits) {
var _local2 = fruits;
var _local1;
var upFruits = new Array();
var _local3 = new Array();
upFruits.push(_root[("fruit_" + (_local2[0].i - 1)) + (_local2[0].j - 1)]);
upFruits.push(_root[("fruit_" + (_local2[0].i - 2)) + _local2[0].j]);
upFruits.push(_root[("fruit_" + (_local2[0].i - 1)) + (_local2[0].j + 1)]);
_local3.push(_root[("fruit_" + (_local2[_local2.length - 1].i + 1)) + (_local2[_local2.length - 1].j - 1)]);
_local3.push(_root[("fruit_" + (_local2[_local2.length - 1].i + 2)) + _local2[_local2.length - 1].j]);
_local3.push(_root[("fruit_" + (_local2[_local2.length - 1].i + 1)) + (_local2[_local2.length - 1].j + 1)]);
_local1 = 0;
while (_local1 < upFruits.length) {
if ((upFruits[_local1] != undefined) && (upFruits[_local1].fruit._currentframe == _local2[0].fruit._currentframe)) {
possiblePair[0] = upFruits[_local1];
possiblePair[1] = _root[("fruit_" + (_local2[0].i - 1)) + _local2[0].j];
return(true);
}
_local1++;
}
_local1 = 0;
while (_local1 < _local3.length) {
if ((_local3[_local1] != undefined) && (_local3[_local1].fruit._currentframe == _local2[_local2.length - 1].fruit._currentframe)) {
possiblePair[0] = _local3[_local1];
possiblePair[1] = _root[("fruit_" + (_local2[_local2.length - 1].i + 1)) + _local2[_local2.length - 1].j];
return(true);
}
_local1++;
}
return(false);
}
function isPossibleBetweenHoriz(fruits) {
var _local3 = fruits;
var _local1;
var _local2 = new Array();
_local2.push(_root[("fruit_" + (_local3[1].i - 1)) + _local3[1].j]);
_local2.push(_root[("fruit_" + (_local3[1].i + 1)) + _local3[1].j]);
_local1 = 0;
while (_local1 < _local2.length) {
if ((_local2[_local1] != undefined) && (_local2[_local1].fruit._currentframe == _local3[0].fruit._currentframe)) {
possiblePair[0] = _local2[_local1];
possiblePair[1] = _local3[1];
return(true);
}
_local1++;
}
return(false);
}
function isPossibleBetweenVert(fruits) {
var _local3 = fruits;
var _local1;
var _local2 = new Array();
_local2.push(_root[("fruit_" + _local3[1].i) + (_local3[1].j - 1)]);
_local2.push(_root[("fruit_" + _local3[1].i) + (_local3[1].j + 1)]);
_local1 = 0;
while (_local1 < _local2.length) {
if ((_local2[_local1] != undefined) && (_local2[_local1].fruit._currentframe == _local3[0].fruit._currentframe)) {
possiblePair[0] = _local2[_local1];
possiblePair[1] = _local3[1];
return(true);
}
_local1++;
}
return(false);
}
function removeAllFruits() {
var _local3;
var _local1;
var _local2;
_local3 = 0;
while (_local3 < maxVert) {
_local1 = 0;
while (_local1 < maxHoriz) {
_local2 = ("fruit_" + _local3) + _local1;
if (_root[_local2] != undefined) {
removeMovieClip(_local2);
}
_local1++;
}
_local3++;
}
}
function hideAllFruits() {
var _local2 = _root;
var i;
var _local3;
var _local1;
i = 0;
while (i < maxVert) {
_local3 = 0;
while (_local3 < maxHoriz) {
_local1 = ("fruit_" + i) + _local3;
if (_local2[_local1] != undefined) {
if (_local2[_local1]._visible) {
_local2[_local1]._visible = false;
} else {
_local2[_local1]._visible = true;
}
}
_local3++;
}
i++;
}
trace("button00=" + _local2.btn_between_fruits_h_00);
}
function showAllFruits() {
var _local3;
var _local1;
var _local2;
_local3 = 0;
while (_local3 < maxVert) {
_local1 = 0;
while (_local1 < maxHoriz) {
_local2 = ("fruit_" + _local3) + _local1;
if (_root[_local2] != undefined) {
_local2._visible = true;
}
_local1++;
}
_local3++;
}
}
function hideButtonsBetweenFruits() {
var _local3 = _root;
var _local2;
var _local1;
_local2 = 0;
while (_local2 < maxVert) {
_local1 = 0;
while (_local1 < (maxHoriz - 1)) {
_local3[("btn_between_fruits_h_" + _local2) + _local1]._visible = false;
_local1++;
}
_local2++;
}
_local2 = 0;
while (_local2 < (maxVert - 1)) {
_local1 = 0;
while (_local1 < maxHoriz) {
_local3[("btn_between_fruits_v_" + _local2) + _local1]._visible = false;
_local1++;
}
_local2++;
}
}
function showButtonsBetweenFruits() {
var _local3 = _root;
var _local2;
var _local1;
_local2 = 0;
while (_local2 < maxVert) {
_local1 = 0;
while (_local1 < (maxHoriz - 1)) {
_local3[("btn_between_fruits_h_" + _local2) + _local1]._visible = true;
_local1++;
}
_local2++;
}
removeMovieClip("btn_between_fruits_h_00");
var child;
child = "btn_between_fruits_h_00";
_local3.attachMovie("btn_between_tpl", child, getNextHighestDepth());
_local3[child]._x = 264;
_local3[child]._y = Coords[0][0][1];
_local3[child].i1 = 0;
_local3[child].j1 = 0;
_local3[child].i2 = 0;
_local3[child].j2 = 1;
_local3[child].line = HORIZONTAL;
_local2 = 0;
while (_local2 < (maxVert - 1)) {
_local1 = 0;
while (_local1 < maxHoriz) {
_local3[("btn_between_fruits_v_" + _local2) + _local1]._visible = true;
_local1++;
}
_local2++;
}
}
function removeButtonsBetweenFruits() {
var _local2;
var _local1;
_local2 = 0;
while (_local2 < maxVert) {
_local1 = 0;
while (_local1 < (maxHoriz - 1)) {
removeMovieClip(("btn_between_fruits_h_" + _local2) + _local1);
_local1++;
}
_local2++;
}
_local2 = 0;
while (_local2 < (maxVert - 1)) {
_local1 = 0;
while (_local1 < maxHoriz) {
removeMovieClip(("btn_between_fruits_v_" + _local2) + _local1);
_local1++;
}
_local2++;
}
}
function sendScores() {
var _local1 = spoints_tpl.text;
var _local3 = ((points add _local1) add internalKeyword) add externalKeyword;
var hash = calcMD5(_local3);
var _local2 = (((((((_root.serverUrl add "&cacheKiller=") add escape(getTimer())) add "&points=") add escape(points)) add "&spoints=") add escape(_local1)) add "&hash=") add escape(hash);
_root.loadVariables(_local2, "_root");
}
function hideButtons() {
var _local3 = _root;
var _local2;
var _local1;
_local2 = 0;
while (_local2 < maxVert) {
_local1 = 0;
while (_local1 < (maxHoriz - 1)) {
_local3[("btn_fruit_" + _local2) + _local1]._visible = false;
_local1++;
}
_local2++;
}
}
function showButtons() {
var _local3 = _root;
var _local2;
var _local1;
_local2 = 0;
while (_local2 < maxVert) {
_local1 = 0;
while (_local1 < (maxHoriz - 1)) {
_local3[("btn_fruit_" + _local2) + _local1]._visible = true;
_local1++;
}
_local2++;
}
}
function showButtons() {
var _local3 = _root;
var _local2;
var _local1;
_local2 = 0;
while (_local2 < maxVert) {
_local1 = 0;
while (_local1 < (maxHoriz - 1)) {
_local3[("btn_fruit_" + _local2) + _local1]._visible = true;
_local1++;
}
_local2++;
}
}
function removeButtons() {
var _local2;
var _local1;
_local2 = 0;
while (_local2 < maxVert) {
_local1 = 0;
while (_local1 < (maxHoriz - 1)) {
removeMovieClip(("btn_fruit_" + _local2) + _local1);
_local1++;
}
_local2++;
}
}
function bitOR(a, b) {
var _local1 = (a & 1) | (b & 1);
var _local2 = (a >>> 1) | (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitXOR(a, b) {
var _local1 = (a & 1) ^ (b & 1);
var _local2 = (a >>> 1) ^ (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitAND(a, b) {
var _local1 = (a & 1) & (b & 1);
var _local2 = (a >>> 1) & (b >>> 1);
return((_local2 << 1) | _local1);
}
function addme(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function rhex(num) {
var _local1 = num;
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt((_local1 >> ((j * 8) + 4)) & 15) + hex_chr.charAt((_local1 >> (j * 8)) & 15));
j++;
}
return(str);
}
function str2blks_MD5(str) {
var _local1 = str;
nblk = ((_local1.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < _local1.length) {
blks[i >> 2] = blks[i >> 2] | (_local1.charCodeAt(i) << ((((_local1.length * 8) + i) % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((((_local1.length * 8) + i) % 4) * 8));
var _local2 = _local1.length * 8;
blks[(nblk * 16) - 2] = _local2 & 255;
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 8) & 255) << 8);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 16) & 255) << 16);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 24) & 255) << 24);
return(blks);
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
var _local1 = b;
return(cmn(bitOR(bitAND(_local1, c), bitAND(~_local1, d)), a, _local1, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, d), bitAND(c, ~d)), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn(bitXOR(bitXOR(b, c), d), a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(bitXOR(c, bitOR(b, ~d)), a, b, x, s, t));
}
function calcMD5(str) {
x = str2blks_MD5(str);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
var _local1;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
_local1 = 0;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
}
function initKey() {
var _local1 = _root;
trace("Key init");
globalListener = new Object();
globalListener.onKeyDown = function () {
if ((Key.getCode() == 70) && (Key.isDown(17))) {
trace("sfd");
_root.fps._visible = !_root.fps._visible;
}
};
globalListener.onKeyUp = function () {
var _local1 = _root;
if (Key.getCode() == 13) {
if (!(_local1._currentframe === 11)) {
} else if (_local1.new_name._visible == false) {
} else {
_local1.saveScores2(_local1.points, _local1.new_name.str.text);
_local1.showHiScores();
_local1.new_name._visible = false;
_local1.points = 0;
}
}
};
Key.addListener(globalListener);
}
function initScores() {
gameType = ((_root.gameType == undefined) ? 0 : (_root.gameType));
hiScores = SharedObject.getLocal(("juicypuzzle_" + gameType) + "_hiscores");
if (hiScores.data.hiscores == undefined) {
defaulHiscores();
}
hiScores.data.hiscores.sort(mySort);
hiScores.data.hiscores.length = 10;
}
function defaulHiscores() {
hiScores.data.hiscores = new Array();
var _local2 = new Array("Alex", "Peter", "Anna", "Georege", "Nicole", "Slava", "Mike", "Eclipse", "Junior", "JC Crab", "PopLoop", "September");
var h = new Array();
var _local1 = 0;
while (_local1 < 10) {
h.push({name:_local2[random(_local2.length)], scores:random(8000)});
_local1++;
}
hiScores.data.hiscores = h;
}
function saveScores(scores, name) {
var _local1 = new Object();
_local1.scores = scores;
_local1.name = name;
hiScores.data.hiscores.push(_local1);
hiScores.data.hiscores.sort(mySort);
hiScores.data.hiscores.length = 10;
}
function saveScores2(scores, name) {
var _local3 = scores;
var _local2 = new Object();
_local2.scores = _local3;
_local2.name = name;
var _local1 = 0;
while (_local1 < hiScores.data.hiscores.length) {
if ((hiScores.data.hiscores[_local1].scores == _local3) && (hiScores.data.hiscores[_local1].name == "")) {
hiScores.data.hiscores[_local1] = _local2;
hiScores.data.hiscores.sort(mySort);
hiScores.data.hiscores.length = 10;
return(true);
}
_local1++;
}
return(undefined);
}
function mySort(a, b) {
if (a.scores == b.scores) {
return(0);
}
return(((a.scores > b.scores) ? -1 : 1));
}
function showHiScores() {
hiscores_name = "";
hiscores_score = "";
var _local1 = 0;
while (_local1 < 10) {
hiscores_name = hiscores_name + ((((_local1 + 1) + ". ") + hiScores.data.hiscores[_local1].name) + newline);
hiscores_score = hiscores_score + (hiScores.data.hiscores[_local1].scores + newline);
_local1++;
}
}
function checkHiScores() {
if (points <= hiScores.data.hiscores[9].scores) {
return(false);
}
return(true);
}
function commit() {
if (username == "") {
username = "Unnamed";
}
if (username.length > 24) {
username.length = 24;
}
saveScores(points, username);
showHiScores();
}
function getHSPos(value) {
var _local3 = value;
var _local2 = hiScores.data.hiscores;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].scores < _local3) {
_local1++;
return(_local1);
}
_local1++;
}
return(undefined);
}
var maxVert = 8;
var maxHoriz = 8;
var vertSpace = 2;
var horizSpace = 2;
var startX = 239;
var startY = 10;
var minEqual = 3;
var maxTime = 300;
var doubleTime = 30;
var pointsPerFruits = new Array(-10, 0, 0, 50, 100, 200, 300, 400, 500);
var pointsPerSpoints = 110;
var pointsPerHelp = 50;
var pointsPerMystery = 10;
var jackPot = 5000;
var mysteryFruits = 5;
var mysteryPeriod = 30;
var countDownTime = 10;
var jackPotScores = new Array(25, 25, 25, 25, 30, 30, 30, 35, 35, 35, 50, 50, 75, 100, 150, 250, 500);
var spinTime = 5;
var sndStart = "start";
var sndGame = "game";
var sndTurn = "turn";
var sndFire = "fire";
var sndGameOver = "game_over";
var sndSpin = "spin";
var sndWrong = "boing2";
var sndNotice = "notice";
var sndMystery = "mystery";
var sndBlender = "blender";
var sndOverBtn = "overBtn";
var sndClick = "click";
var sndHint = "hint";
if (bannerUrl == undefined) {
bannerUrl = "banner_casino.swf";
}
if (bannerClickUrl == undefined) {
bannerClickUrl = "http://www.splashspot.com/search/results_banner.php?aff_id=EZ12&searchterm=casino";
}
if (scoresUrl == undefined) {
scoresUrl = "http://itpremium.com/";
}
if (serverUrl == undefined) {
serverUrl = "http://192.168.1.34/vadim/jezball/server.php?a=1";
}
if (externalKeyword == undefined) {
externalKeyword = "keyword";
}
var internalKeyword = "keyword";
var sMyPlayCityLink = "http://www.myplaycity.com";
var sMoreGamesLink = "http://www.myplaycity.com/online_games";
var sDownloadLink = "http://www.myplaycity.com/smart_cook";
var sAddGamesLink = "http://www.myplaycity.com/free_content";
var sTarget = "_blank";
var Coords;
var indent;
var turn;
var ignoreRollOver;
var moveFruits;
var lastTime;
var moved;
var pair;
var turnedBack;
var possiblePair;
var points;
var lastMysteryTime;
var version;
var ignoreSound;
var currentSound;
var noticeStarted;
var mysteryFruitsStack;
var spoints;
var isPause;
var levelUp;
var vertOrHoriz;
var continueGame;
var curFrame;
var isGameOver;
var mixerLine;
var startPause;
var levelNumber;
var contPressed;
var HORIZONTAL = 0;
var VERTICAL = 1;
currentSound = new Array();
ignoreSound = (ignoreSound ? 1 : 0);
var hex_chr = "0123456789abcdef";
initKey();
hideParentMovies();
var startSound = new Sound();
startSound.attachSound(sndStart);
var bgSound = new Sound();
bgSound.attachSound(sndGame);
var turnSound = new Sound();
turnSound.attachSound(sndTurn);
var fireSound = new Sound();
fireSound.attachSound(sndFire);
var gameOverSound = new Sound();
gameOverSound.attachSound(sndGameOver);
var spinSound = new Sound();
spinSound.attachSound(sndSpin);
var wrongSound = new Sound();
wrongSound.attachSound(sndWrong);
var noticeSound = new Sound();
noticeSound.attachSound(sndNotice);
var mysterySound = new Sound();
mysterySound.attachSound(sndMystery);
var blenderSound = new Sound();
blenderSound.attachSound(sndBlender);
var overBtnSound = new Sound();
overBtnSound.attachSound(sndOverBtn);
var clickSound = new Sound();
clickSound.attachSound(sndClick);
var hintSound = new Sound();
hintSound.attachSound(sndHint);
Instance of Symbol 41 MovieClip in Frame 2
onClipEvent (load) {
_visible = false;
if (!_root.ignoreSound) {
_root.startSound.start(0, 99999);
}
_root.currentSound.push(_root.startSound);
}
onClipEvent (unload) {
_root.startSound.stop(_root.sndStart);
_root.currentSound.pop();
}
Frame 3
function main_ShowSymbol(value) {
_root.main_symbols.gotoAndStop(value);
}
_root.hi_hint._visible = false;
_root.wnd_newGame._visible = false;
if (_root.continueGame) {
_root.continue_mc.gotoAndStop(1);
} else {
_root.continue_mc.gotoAndStop(2);
}
if (_root.isGameOver) {
_root.continue_mc.gotoAndStop(2);
}
_root.hiscr_btn.onRollOut = (_root.newgame_btn.onRollOut = (_root.quit_btn.onRollOut = (_root.man_btn.onRollOut = (_root.options_btn.onRollOut = function () {
if (_root.available_hint != undefined) {
_root.available_hint.removeMovieClip();
}
main_ShowSymbol(1);
}))));
_root.newgame_btn.onRelease = function () {
var _local1 = _root;
if (!_local1.ignoreSound) {
_local1.clickSound.start();
}
if (continueGame) {
_local1.wnd_newGame._visible = true;
} else {
_local1.playSound("snd_click");
_local1.version = 1;
_local1.level.text = 1;
_rootlevelNumber = 1;
_local1.isGameOver;
_local1.gotoAndPlay("init");
}
};
_root.newgame_btn.onRollOver = function () {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
main_ShowSymbol(3);
};
_root.hiscr_btn.onRelease = function () {
_root.playSound("snd_click");
};
_root.hiscr_btn.onRollOver = function () {
var _local1 = _root;
_local1.attachMovie("available_hint", "available_hint", _local1.getNextHighestDepth());
main_ShowSymbol(5);
_local1.onMouseMove = function () {
var _local1 = _root;
if (_local1._xmouse < 150) {
_local1.available_hint._x = 145;
} else {
_local1.available_hint._x = _local1._xmouse;
}
_local1.available_hint._y = _local1._ymouse - 10;
_local1.available_hint.gotoAndPlay(1);
};
};
_root.man_btn.onRelease = function () {
_root.playSound("snd_click");
man_dlg._visible = true;
};
_root.man_btn.onRollOver = function () {
main_ShowSymbol(2);
};
_root.options_btn.onRelease = function () {
_root.playSound("snd_click");
};
_root.options_btn.onRollOver = function () {
var _local1 = _root;
_local1.attachMovie("available_hint", "available_hint", _local1.getNextHighestDepth());
main_ShowSymbol(4);
_local1.onMouseMove = function () {
var _local1 = _root;
if (_local1._xmouse < 150) {
_local1.available_hint._x = 145;
} else {
_local1.available_hint._x = _local1._xmouse;
}
_local1.available_hint._y = _local1._ymouse - 10;
_local1.available_hint.gotoAndPlay(1);
};
};
_root.continue_mc.continue_btn.onRelease = function () {
var _local1 = _root;
if (!_local1.ignoreSound) {
_local1.clickSound.start();
}
_local1.hideAllFruits();
_local1.showButtonsBetweenFruits();
_local1.contPressed = true;
_local1.isPause = false;
_local1.gotoAndPlay("game");
};
_root.continue_mc.continue_btn.onRollOver = function () {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
};
_root.more_games_btn.onRelease = function () {
var _local1 = _root;
if (!_local1.ignoreSound) {
_local1.clickSound.start();
}
_local1.playSound("snd_click");
getURL (_local1.sMoreGamesLink, _local1.sTarget);
};
_root.download_btn.onRelease = function () {
var _local1 = _root;
_local1.playSound("snd_click");
getURL (_local1.sDownloadLink, _local1.sTarget);
};
_root.more_games_btn.onRelease = function () {
var _local1 = _root;
_local1.playSound("snd_click");
getURL (_local1.sMoreGamesLink, _local1.sTarget);
};
_root.add_games_btn.onRelease = function () {
var _local1 = _root;
_local1.playSound("snd_click");
getURL (_local1.sAddGamesLink, _local1.sTarget);
};
Instance of Symbol 56 MovieClip in Frame 3
on (release) {
getURL (_root.sMyPlayCityLink, _root.sTarget);
}
Frame 4
stop();
Frame 5
hideParentMovies();
initGame();
Instance of Symbol 39 MovieClip "fps" in Frame 5
onClipEvent (load) {
var elapsedTime = new Array();
_visible = false;
}
onClipEvent (enterFrame) {
elapsedTime.push(getTimer());
if (elapsedTime.length > 10) {
elapsedTime.shift();
elapsedAverage = (elapsedTime[elapsedTime.length - 1] - elapsedTime[0]) / elapsedTime.length;
fps = Math.ceil(1000 / elapsedAverage);
text = fps;
}
}
Instance of Symbol 200 MovieClip "dbl_points_tpl" in Frame 5
onClipEvent (load) {
stop();
}
Instance of Symbol 232 MovieClip "fruit_tpl" in Frame 5
onClipEvent (load) {
stop();
}
Instance of Symbol 229 MovieClip "fruits_blender_tpl" in Frame 5
onClipEvent (load) {
if (_name != "fruits_blender_tpl") {
endx = 36.1;
endy = 258.8;
xspeed = (endx - _x) * 0.15;
yspeed = (endy - _y) * 0.15;
} else {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_name != "fruits_blender_tpl") {
_x = (_x + xspeed);
_y = (_y + yspeed);
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_x < endx) {
if ((_root.mixer.mixer_bar._yscale + 5) < 280) {
_root.mixer.mixer_bar._yscale = _root.mixer.mixer_bar._yscale + 5;
} else {
_root.levelUp = true;
_root.mixer.mixer_bar._yscale = 280;
}
if (!_root.ignoreSound) {
_root.blenderSound.start();
}
_root.blender.play();
this.removeMovieClip();
}
}
}
Frame 6
if ((_root.level.text < _root.levelNumber) && (!_root.isGameOver)) {
trace("_root.levelNumber=" + _root.levelNumber);
_root.level.text = _root.levelNumber;
_root.levelNumber = -1;
}
hideParentMovies();
mainProcess();
Instance of Symbol 237 MovieClip in Frame 6
onClipEvent (load) {
_visible = false;
_root.currentSound.pop();
if (!_root.ignoreSound) {
_root.bgSound.start(0, 99999);
}
_root.currentSound.push(_root.bgSound);
}
onClipEvent (unload) {
_root.bgSound.stop(_root.sndGame);
_root.currentSound.pop();
}
Frame 7
gotoAndPlay ("game");
Frame 8
stop();
Frame 9
stop();
Frame 10
function wait_short() {
nextFrame();
clearInterval(intervalGameOverID);
delete intervalGameOverID;
}
stop();
removeAllFruits();
_root.wnd_endGame.txt_winScores.text = ("Time is elapsed.\nYou won " + _root.points) + " scores!";
switch (version) {
case 1 :
removeButtonsBetweenFruits();
break;
case 2 :
removeButtons();
break;
default :
removeButtonsBetweenFruits();
}
Instance of Symbol 254 MovieClip in Frame 10
onClipEvent (load) {
_visible = false;
_root.currentSound.pop();
if (!_root.ignoreSound) {
_root.gameOverSound.start(0, 99999);
}
_root.currentSound.push(_root.gameOverSound);
}
onClipEvent (unload) {
_root.gameOverSound.stop(_root.sndGameOver);
_root.currentSound.pop();
}
Frame 11
initScores();
if (!checkHiScores()) {
gotoAndStop ("hiscores_show");
new_name._visible = false;
} else {
gotoAndStop ("hiscores_show");
trace(getHSPos(points));
new_name._y = new_name._y + ((getHSPos(points) - 1) * 27);
new_name._visible = true;
saveScores(points, "");
}
showHiScores();
Instance of Symbol 277 MovieClip "new_name" in Frame 11
onClipEvent (load) {
Selection.setFocus("str");
}
Instance of Symbol 284 MovieClip "clr_dlg" in Frame 11
onClipEvent (load) {
_visible = false;
}
Symbol 20 Button
on (release) {
if (_root.version == 1) {
_root.showButtonsBetweenFruits();
} else {
_root.showButtons();
}
_root.wnd_pause._visible = true;
_root.isPause = false;
_root.hideAllFruits();
_root.wnd_pause.removeMovieClip();
}
Symbol 25 MovieClip [available_hint] Frame 32
stop();
Symbol 27 Button
on (rollOver) {
if ((_root.ignoreRollOver or _root.turn) or _root.moveFruits) {
trace("ok");
return(undefined);
}
_root[("fruit_" + i1) + j1].gotoAndPlay("over");
_root[("fruit_" + i2) + j2].gotoAndPlay("over");
}
on (press) {
if ((_root.ignoreRollOver or _root.turn) or _root.moveFruits) {
return(undefined);
}
_root.ignoreRollOver = 1;
_root.turnedBack = 0;
var fruit1 = (("fruit_" + i1) + j1);
var fruit2 = (("fruit_" + i2) + j2);
if (line == _root.HORIZONTAL) {
_root[fruit1].gotoAndPlay(((j1 < j2) ? "right" : "left"));
_root[fruit2].gotoAndPlay(((j1 > j2) ? "right" : "left"));
} else {
_root[fruit1].gotoAndPlay(((i1 > i2) ? "up" : "down"));
_root[fruit2].gotoAndPlay(((i1 < i2) ? "up" : "down"));
}
_root[fruit1].newName = fruit2;
_root[fruit1].i = i2;
_root[fruit1].j = j2;
_root[fruit2].newName = fruit1;
_root[fruit2].i = i1;
_root[fruit2].j = j1;
_root.pair[0] = fruit1;
_root.pair[1] = fruit2;
if (!_root.ignoreSound) {
_root.turnSound.start();
}
}
on (rollOut) {
if (_root.ignoreRollOver) {
return(undefined);
}
_root[("fruit_" + i1) + j1].gotoAndStop("normal");
_root[("fruit_" + i2) + j2].gotoAndStop("normal");
}
Symbol 33 MovieClip Frame 1
stop();
Symbol 51 Button
on (release) {
if (!_root.ignoreSound) {
_root.clickSound.start();
}
_root.gotoAndStop("start");
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 70 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 92 Button
on (release) {
getURL (_root.sMyPlayCityLink, _root.sTarget);
}
Symbol 133 Button
on (release) {
if (!_root.ignoreSound) {
_root.clickSound.start();
}
_root.moveFruits = 0;
_root.ignoreRollOver = 0;
_root.moved = 1;
_root.pair = new Array(2);
_root.removeAllFruits();
_root.continueGame = false;
_root.gotoAndPlay("chooseType");
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 136 Button
on (release) {
if (!_root.ignoreSound) {
_root.clickSound.start();
}
_root.wnd_newGame._visible = false;
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 153 Button
on (release) {
if (_root.isPause) {
return(undefined);
}
if (!_root.ignoreSound) {
_root.hintSound.start();
}
_root.helpTurn();
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 161 MovieClip Frame 1
stop();
Symbol 175 Button
on (release) {
if (!_root.ignoreSound) {
_root.clickSound.start();
}
_root.gotoAndStop("start");
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 179 Button
on (release) {
if (!_root.ignoreSound) {
_root.clickSound.start();
}
_root.version = 1;
_root.gotoAndPlay("init");
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 182 Button
on (release) {
if (!_root.ignoreSound) {
_root.clickSound.start();
}
_root.version = 2;
_root.gotoAndPlay("init");
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 191 Button
on (release) {
if (_root.isPause) {
return(undefined);
}
mixerLine = _root.mixer.mixer_bar._yscale;
levelNumber = _root.level.text;
continueGame = true;
if (!_root.ignoreSound) {
_root.clickSound.start();
}
hideAllFruits();
hideButtonsBetweenFruits();
continueGame = true;
isPause = true;
gotoAndStop ("start");
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 197 MovieClip Frame 27
this.removeMovieClip();
Symbol 232 MovieClip Frame 1
stop();
Instance of Symbol 229 MovieClip "fruit" in Symbol 232 MovieClip Frame 1
onClipEvent (load) {
kind = random(7) + 1;
gotoAndStop(kind);
}
Instance of Symbol 231 MovieClip "select" in Symbol 232 MovieClip Frame 1
onClipEvent (load) {
stop();
_visible = false;
}
Symbol 232 MovieClip Frame 13
gotoAndPlay ("over");
Symbol 232 MovieClip Frame 23
_root.ignoreRollOver = 0;
if (!_root.turn) {
_root.turn = 1;
}
gotoAndStop ("normal");
_x = _root.Coords[i][j][0];
_y = _root.Coords[i][j][1];
_name = newName;
newName = undefined;
Symbol 232 MovieClip Frame 33
_root.ignoreRollOver = 0;
if (!_root.turn) {
_root.turn = 1;
}
gotoAndStop ("normal");
_x = _root.Coords[i][j][0];
_y = _root.Coords[i][j][1];
_name = newName;
newName = undefined;
Symbol 232 MovieClip Frame 43
_root.ignoreRollOver = 0;
if (!_root.turn) {
_root.turn = 1;
}
gotoAndStop ("normal");
_x = _root.Coords[i][j][0];
_y = _root.Coords[i][j][1];
_name = newName;
newName = undefined;
Symbol 232 MovieClip Frame 53
_root.ignoreRollOver = 0;
if (!_root.turn) {
_root.turn = 1;
}
gotoAndStop ("normal");
_x = _root.Coords[i][j][0];
_y = _root.Coords[i][j][1];
_name = newName;
newName = undefined;
Symbol 233 Button
on (rollOver) {
if ((_root.ignoreRollOver or _root.turn) or _root.moveFruits) {
return(undefined);
}
_root[("fruit_" + i) + j].gotoAndPlay("over");
}
on (press) {
if ((_root.ignoreRollOver or _root.turn) or _root.moveFruits) {
return(undefined);
}
if (!_root.ignoreSound) {
_root.turnSound.start();
}
var fruit2 = (("fruit_" + i) + j);
if (_root[fruit2].mystery) {
var i1;
var j1;
var fruit;
var fr;
while ((fruit = _root.mysteryFruitsStack.pop())) {
fruit.mystery = false;
}
fr = random(7) + 1;
if (_root.pair[0] != undefined) {
_root[_root.pair[0]].select._visible = false;
_root[_root.pair[0]].gotoAndStop("normal");
}
_root[fruit2].removeMovieClip();
_root.showMysteryPoints(i, j);
i1 = 0;
while (i1 < _root.maxVert) {
j1 = 0;
while (j1 < _root.maxHoriz) {
fruit = ("fruit_" + i1) + j1;
if (_root[fruit].fruit._currentframe == fr) {
_root[fruit].removeMovieClip();
_root.showMysteryPoints(i1, j1);
}
j1++;
}
i1++;
}
_root.pair = new Array();
_root.moveFruits = 1;
return(undefined);
}
if (_root.pair[0] != undefined) {
if (_root.pair[0] != fruit2) {
var fruit1 = _root.pair[0];
var i1 = _root[fruit1].i;
var j1 = _root[fruit1].j;
var i2 = i;
var j2 = j;
if ((((j1 != j2) && (i1 != i2)) || (Math.abs(i1 - i2) > 1)) || (Math.abs(j1 - j2) > 1)) {
_root[fruit1].gotoAndStop("normal");
_root[fruit1].select._visible = false;
_root.pair = new Array(2);
_root.pair[0] = fruit2;
_root[fruit2].select._visible = true;
} else {
_root.ignoreRollOver = 1;
_root.turnedBack = 0;
if (i1 == i2) {
_root[fruit1].gotoAndPlay(((j1 < j2) ? "right" : "left"));
_root[fruit2].gotoAndPlay(((j1 > j2) ? "right" : "left"));
} else {
_root[fruit1].gotoAndPlay(((i1 > i2) ? "up" : "down"));
_root[fruit2].gotoAndPlay(((i1 < i2) ? "up" : "down"));
}
_root[fruit1].newName = fruit2;
_root[fruit1].i = i2;
_root[fruit1].j = j2;
_root[fruit2].newName = fruit1;
_root[fruit2].i = i1;
_root[fruit2].j = j1;
_root.pair[1] = fruit2;
_root[fruit1].select._visible = false;
_root[fruit2].select._visible = false;
}
} else {
_root.pair = new Array(2);
_root[fruit2].select._visible = false;
}
} else {
_root.pair = new Array(2);
_root.pair[0] = fruit2;
_root[fruit2].select._visible = true;
}
}
on (rollOut) {
if (_root.ignoreRollOver) {
return(undefined);
}
var fruit = (("fruit_" + i) + j);
if (_root.pair.length && (_root.pair[0] != fruit)) {
_root[fruit].gotoAndStop("normal");
}
}
Symbol 235 MovieClip Frame 1
function sendScores() {
var _local1 = _root;
var _local2 = _local1.jackpot_tpl.new_spoints || (_local1.spoints_tpl.text);
var forHash = (((_local1.points add _local2) add _local1.internalKeyword) add _local1.externalKeyword);
var hash = _local1.calcMD5(forHash);
var _local3 = (((((((_local1.serverUrl add "&cacheKiller=") add escape(getTimer())) add "&points=") add escape(_local1.points)) add "&spoints=") add escape(_local2)) add "&0hash0=") add escape(hash);
_local1.loadVariables(_local3, "_root");
}
_root.internalKeyword = _root.calcMD5("blaaaa");
_root.sendScores = sendScores;
Symbol 242 MovieClip Frame 1
stop();
Symbol 245 Button
on (release) {
if (!_root.ignoreSound) {
_root.clickSound.start();
}
if (_root.isGameOver) {
gotoAndStop ("start");
return(undefined);
}
switch (_root.version) {
case 1 :
_root.showButtonsBetweenFruits();
break;
case 2 :
_root.showButtons();
break;
default :
_root.showButtonsBetweenFruits();
}
_root.lastTime = getTimer();
_root.gotoAndPlay("game");
_root.moveFruits = 1;
_root.hideParentMovies();
if (_root.levelUp) {
_root.level.text = Number(_root.level.text) + 1;
_root.mixer.mixer_bar._yscale = 120;
_root.levelUp = false;
levelNumber = _root.level.text;
}
_root.isPause = false;
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 249 Button
on (release) {
getURL (_root.sDownloadLink, _root.sTarget);
}
Symbol 256 Button
on (release) {
getURL (_root.sDownloadLink, _root.sTarget);
}
Symbol 257 Button
on (release) {
if (!_root.ignoreSound) {
_root.clickSound.start();
}
if (_root.isGameOver) {
gotoAndStop ("start");
return(undefined);
}
switch (_root.version) {
case 1 :
_root.showButtonsBetweenFruits();
break;
case 2 :
_root.showButtons();
break;
default :
_root.showButtonsBetweenFruits();
}
_root.lastTime = getTimer();
_root.gotoAndPlay("game");
_root.moveFruits = 1;
_root.hideParentMovies();
if (_root.levelUp) {
_root.level.text = Number(_root.level.text) + 1;
_root.mixer.mixer_bar._yscale = 120;
_root.levelUp = false;
levelNumber = _root.level.text;
}
_root.isPause = false;
}
on (rollOver) {
if (!_root.ignoreSound) {
_root.overBtnSound.start();
}
}
Symbol 272 Button
on (release) {
_root.playSound("snd_click");
_root.clr_dlg._visible = true;
}
Symbol 282 Button
on (release, keyPress "<Enter>") {
_root.playSound("snd_click");
_root.defaulHiscores();
_root.clr_dlg._visible = false;
_root.initScores();
_root.showHiScores();
}
Symbol 283 Button
on (release, keyPress "<Escape>") {
_root.playSound("snd_click");
_root.clr_dlg._visible = false;
}