Frame 1
validate = "";
local = false;
Frame 2
function whereToNext() {
gotoAndStop ("introduce");
}
showedLongEnough = false;
counter = 0;
full = true;
play();
Frame 3
function location_check() {
var _local1 = true;
if (_url.toLowerCase().indexOf("miniclip") == -1) {
_local1 = -1;
}
return(_local1);
}
counter++;
if (counter >= 30) {
showedLongEnough = true;
}
factor = this.getBytesLoaded() / this.getBytesTotal();
percent = Math.round(factor * 100) + "% Loaded";
if ((((this.getBytesLoaded() / this.getBytesTotal()) >= 1) && (getTimer() > 3000)) && (_url.toLowerCase().indexOf("miniclip") != -1)) {
whereToNext();
}
Frame 4
gotoAndPlay ("loader");
Frame 6
function xmlLoaded() {
trace("---incoming---");
trace(inDoc);
if (hs_action == "LoadCipher") {
interpretLoadCipher();
BuildBooks();
sendHSRequest();
} else if (hs_action == "SubmitScore") {
hs.doneSubmitting();
} else if (hs_action == "LoadScores") {
var scoreNodes = inDoc.firstChild.childNodes;
scoreList = new Array();
var i = 0;
while (i < scoreNodes.length) {
var tmp_node = scoreNodes[i];
var _local2 = new Object();
var nodeInfo = tmp_node.childNodes;
var _local1 = 0;
while (_local1 < nodeInfo.length) {
var _local3 = nodeInfo[_local1];
var node_name = _local3.nodeName;
var node_value = _local3.firstChild.nodeValue;
_local2[node_name] = node_value;
_local1++;
}
_local2.label = (_local2.Username + "\t") + _local2.Score;
scoreList.push(_local2);
scoreListLoaded();
i++;
}
} else if (hs_action == "IsUserLoggedIn") {
setLoggedIn(inDoc.firstChild.firstChild.nodeValue);
gotoAndStop ("introduce");
}
}
function interpretLoadCipher() {
EncryptionLibrary = new Array();
var _local3 = inDoc.firstChild.childNodes;
var _local2 = _local3[0].firstChild.nodeValue.split("|");
var _local1 = 0;
while (_local1 < _local2.length) {
EncryptionLibrary[_local1] = _local2[_local1].split(",");
_local1++;
}
numBooks = EncryptionLibrary.length - 1;
}
function BuildBooks() {
encryptLibrary = [];
decryptLibrary = [];
var _local2 = 0;
while (_local2 < numBooks) {
var encBook = [];
var decBook = [];
var _local1 = 0;
while (_local1 < EncryptionLibrary[_local2].length) {
var _local3 = EncryptionLibrary[_local2][_local1];
encBook[_local1] = _local3;
decBook[_local3] = _local1;
_local1++;
}
encryptLibrary[_local2] = encBook;
decryptLibrary[_local2] = decBook;
_local2++;
}
}
function encrypt(str) {
var _local3 = str;
var val = "";
var _local2;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local1 % numBooks;
val = val + chr(encryptLibrary[_local2][_local3.charCodeAt(_local1) - 1]);
_local1++;
}
return(val);
}
function decrypt(str) {
var _local3 = str;
var val = "";
var _local2;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local1 % numBooks;
val = val + chr(decryptLibrary[_local2][_local3.charCodeAt(_local1)] + 1);
_local1++;
}
return(val);
}
function sendEncryptedInfo(enc_data) {
var _local1 = escape(enc_data);
trace("*****************");
trace(enc_data);
trace(_local1);
trace(decrypt(unescape(_local1)));
var _local2 = ("<Request><TransactionType>EncryptedTransaction</TransactionType><Data><Encrypted><![CDATA[" + _local1) + "]]></Encrypted></Data></Request>";
hs_action = "SubmitScore";
sendInfo(_local2);
}
function sendInfo(str) {
trace("---out going---");
trace(str);
sendDoc = new XML(str);
inDoc = new XML();
inDoc.onLoad = xmlLoaded;
sendDoc.sendAndLoad(ET_ScoreURL, inDoc);
}
function loadCipher() {
hs_action = "LoadCipher";
var _local1 = "<Request><TransactionType>LoadCipher</TransactionType><Data/></Request>";
sendInfo(_local1);
}
function submitETscore(tmp_score) {
et_score = tmp_score;
loadCipher();
}
function loadETscores() {
hs_action = "LoadScores";
var _local1 = ((("<Request><TransactionType>LoadHighScores</TransactionType><Data><Game>" + et_game) + "</Game><Board>") + et_board) + "</Board></Data></Request>";
sendInfo(_local1);
}
function checkLoggedIn() {
hs_action = "IsUserLoggedIn";
var _local1 = "<Request><TransactionType>IsUserLoggedIn</TransactionType><Data /></Request>";
sendInfo(_local1);
}
function setLoggedIn(val) {
if (val.toString().toLowerCase() == "false") {
loggedIn = false;
} else {
loggedIn = true;
}
}
function sendHSRequest() {
var _local2 = "";
var _local1 = ((((((("<Request><TransactionType>SaveHighScore</TransactionType><Data><Game>" + et_game) + "</Game><Board>") + et_board) + "</Board><Score>") + et_score) + "</Score><AuxData>") + _local2) + "</AuxData></Data></Request>";
var _local3 = encrypt(_local1);
sendEncryptedInfo(_local3);
}
function scoreListLoaded() {
hs.listLoaded(scoreList);
}
function escape2(str) {
var _local2 = str;
var esc_arr = ["", "%01", "%02", "%03", "%04", "%05", "%06", "%07", "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", "%20", "%21", "%22", "%23", "%24", "%25", "%26", "%27", "%28", "%29", "%2A", "%2B", "%2C", "%2D", "%2E", "%2F", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "%3A", "%3B", "%3C", "%3D", "%3E", "%3F", "%40", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "%5B", "%5C", "%5D", "%5E", "%5F", "%60", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "%7B", "%7C", "%7D", "%7E", "%7F", "%C2%80", "%C2%81", "%C2%82", "%C2%83", "%C2%84", "%C2%85", "%C2%86", "%C2%87", "%C2%88", "%C2%89", "%C2%8A", "%C2%8B", "%C2%8C", "%C2%8D", "%C2%8E", "%C2%8F", "%C2%90", "%C2%91", "%C2%92", "%C2%93", "%C2%94", "%C2%95", "%C2%96", "%C2%97", "%C2%98", "%C2%99", "%C2%9A", "%C2%9B", "%C2%9C", "%C2%9D", "%C2%9E", "%C2%9F", "%C2%A0", "%C2%A1", "%C2%A2", "%C2%A3", "%C2%A4", "%C2%A5", "%C2%A6", "%C2%A7", "%C2%A8", "%C2%A9", "%C2%AA", "%C2%AB", "%C2%AC", "%C2%AD", "%C2%AE", "%C2%AF", "%C2%B0", "%C2%B1", "%C2%B2", "%C2%B3", "%C2%B4", "%C2%B5", "%C2%B6", "%C2%B7", "%C2%B8", "%C2%B9", "%C2%BA", "%C2%BB", "%C2%BC", "%C2%BD", "%C2%BE", "%C2%BF", "%C3%80", "%C3%81", "%C3%82", "%C3%83", "%C3%84", "%C3%85", "%C3%86", "%C3%87", "%C3%88", "%C3%89", "%C3%8A", "%C3%8B", "%C3%8C", "%C3%8D", "%C3%8E", "%C3%8F", "%C3%90", "%C3%91", "%C3%92", "%C3%93", "%C3%94", "%C3%95", "%C3%96", "%C3%97", "%C3%98", "%C3%99", "%C3%9A", "%C3%9B", "%C3%9C", "%C3%9D", "%C3%9E", "%C3%9F", "%C3%A0", "%C3%A1", "%C3%A2", "%C3%A3", "%C3%A4", "%C3%A5", "%C3%A6", "%C3%A7", "%C3%A8", "%C3%A9", "%C3%AA", "%C3%AB", "%C3%AC", "%C3%AD", "%C3%AE", "%C3%AF", "%C3%B0", "%C3%B1", "%C3%B2", "%C3%B3", "%C3%B4", "%C3%B5", "%C3%B6", "%C3%B7", "%C3%B8", "%C3%B9", "%C3%BA", "%C3%BB", "%C3%BC", "%C3%BD", "%C3%BE", "%C3%BF"];
var _local3 = "";
var _local1 = 0;
while (_local1 < _local2.length) {
_local3 = _local3 + esc_arr[_local2.charCodeAt(_local1)];
_local1++;
}
return(_local3);
}
XML.prototype.ignoreWhite = true;
var hs_action;
var EncryptionLibrary;
var et_score;
var scoreList;
var et_game = "Fruit Smash";
var et_board = "Testing-Multiple=False-InsertIfBetter=True";
var et_game = "Mini Golf";
var et_board = "Primary";
var ET_ScoreURL = "http://65.30.90.160/etv2/FlashTransaction.electro";
var loggedIn = false;
var flash5 = false;
if (flash5) {
escape = escape2;
}
checkLoggedIn();
stop();
Frame 10
play();
Frame 12
function goToGame(val) {
gotoAndStop ("Game");
}
function quitGame() {
fscommand ("quit");
}
function chooseMode(theMode) {
mode = theMode;
goToGame();
atMenu = false;
}
function playAgain() {
chooseMode(mode);
}
stop();
delete game;
mode = undefined;
atMenu = true;
music.startMusic("splash");
Frame 18
inst_clip.gotoAndStop(2);
clearDemoID();
Frame 30
function continueOn() {
gotoAndStop ("Menu");
}
clearDemoID();
if (end_level < 10) {
end_frame = "end1";
} else if (end_level < 20) {
end_frame = "end2";
} else if (end_level < 30) {
end_frame = "end3";
} else if (end_level >= 30) {
end_frame = "end4";
}
if (!full) {
end_frame = "demo";
}
end_ani.where = end_frame;
music.startMusic("splash");
Frame 46
hs.action = score_action;
stop();
Frame 56
function stopCountDown() {
if (count_down._currentframe != 1) {
count_down.stop();
}
}
function resumeCountDown() {
if (count_down._currentframe != 1) {
count_down.play();
}
}
function manualSelect() {
if (game.selected.length == 1) {
game.selectItemAuto(game.s_x2, game.s_y2);
clearInterval(id);
} else {
game.selectItemAuto(game.s_x1, game.s_y1);
}
}
function dealWithMeter() {
game.meter = game.meter - game.fallRate;
if (game.meter < 0) {
game.meter = 0;
}
var _local1 = Math.round(game.meter * 10);
if (_local1 == 0) {
_local1 = 1;
}
meter.gotoAndStop(_local1);
}
function setCurrentTime() {
if (timeMode == "real") {
var _local2 = (getTimer() - base) - pause_time;
} else if (timeMode == "frame") {
timeCounter++;
var _local1 = (timeCounter / frameRate) * 1000;
var _local2 = _local1 - pause_time;
}
current_time = max_time - _local2;
if (changeTempo && (current_time > 30000)) {
changeTempo = false;
_global.music.setTempo("slow");
}
if (current_time > 30000) {
changeTempo = false;
} else if ((current_time < 30000) && (!changeTempo)) {
changeTempo = true;
_global.music.setTempo("fast");
}
if (current_time <= 0) {
current_time = 0;
game.timeRanOut = true;
game.gameOver();
}
}
function pauseGame(dontSendToFrame) {
if (game.inPlay && (!paused)) {
paused = true;
game.inPlay = false;
if (timeMode == "real") {
start_pause = getTimer();
} else if (timeMode == "frame") {
start_pause = (timeCounter / frameRate) * 1000;
}
if (!dontSendToFrame) {
popup.gotoAndStop("pause");
}
}
}
function unPauseGame() {
if (paused) {
paused = false;
if (timeMode == "real") {
end_pause = getTimer();
} else if (timeMode == "frame") {
end_pause = (timeCounter / frameRate) * 1000;
}
pause_time = pause_time + (end_pause - start_pause);
game.inPlay = true;
inst_clip.gotoAndStop(1);
}
}
function giveHint() {
if (game.inPlay && (!paused)) {
var hintAvailable = game.areThereMatches();
if (hintAvailable) {
var cell1_name = ((("cell" + game.s_x1) + "_") + game.s_y1);
var cell2_name = ((("cell" + game.s_x2) + "_") + game.s_y2);
var _local3 = game[cell1_name];
var _local1 = game[cell2_name];
var _local2 = 5;
if (_local3.x > _local1.x) {
hint.gotoAndPlay("horizontal");
hint._x = ((game.board._x + _local1.clip._x) - (_local1.clip._width / 2)) + _local2;
hint._y = ((game.board._y + _local1.clip._y) - (_local1.clip._width / 2)) + _local2;
} else if (_local1.x > _local3.x) {
hint.gotoAndPlay("horizontal");
hint._x = ((game.board._x + _local3.clip._x) - (_local1.clip._width / 2)) + _local2;
hint._y = ((game.board._y + _local3.clip._y) - (_local1.clip._width / 2)) + _local2;
} else if (_local3.y > _local1.y) {
hint.gotoAndPlay("vertical");
hint._x = ((game.board._x + _local1.clip._x) - (_local1.clip._width / 2)) + _local2;
hint._y = ((game.board._y + _local1.clip._y) - (_local1.clip._width / 2)) + _local2;
} else if (_local1.y > _local3.y) {
hint.gotoAndPlay("vertical");
hint._x = ((game.board._x + _local3.clip._x) - (_local1.clip._width / 2)) + _local2;
hint._y = ((game.board._y + _local3.clip._y) - (_local1.clip._width / 2)) + _local2;
}
}
}
}
clearDemoID();
timeMode = "frame";
frameRate = 30;
timeCounter = -1;
music.startMusic("loops");
mode_clip.gotoAndStop(mode);
cell._visible = false;
total_minutes = 3;
paused = false;
game = {};
game.gameOverDelay = false;
game.gameOverCounter = 0;
game.supermoves = ["", {state:0, name:"mallet", x:19, y:190}, {state:0, name:"bomb", x:19, y:225}, {state:0, name:"bug", x:19, y:259}, {state:0, name:"ice", x:19, y:294}, {state:0, name:"guyser", x:19, y:328}, {state:0, name:"fire", x:19, y:361}];
game.autoTest = false;
game.board = _root.gameBoard;
game.board.game = game;
game.width = 8;
game.height = 8;
game.middle = Math.ceil(game.width / 2);
game.pixelwidth = 350;
game.pixelheight = 350;
game.xspacing = game.pixelwidth / game.width;
game.yspacing = game.pixelheight / game.height;
game.types = 5;
game.depth = 100;
game.speed = 8;
game.selected = [];
game.score = 0;
game.meter = 0;
game.inPlay = false;
game.level = 0;
game.sound_number = 1;
game.combos = 0;
game.superMoveCollected = function (which) {
var _local1 = which;
var _local2 = this;
_local2.supermoves[_local1].state++;
if (_local2.supermoves[_local1].state > 3) {
_local2.supermoves[_local1].state = 3;
}
var _local3 = (3 * (_local2.supermoves[_local1].state - 1)) + 2;
smoves["meter" + _local1].gotoAndStop(_local3);
smoves["meter" + _local1].frame = _local3;
smoves["meter" + _local1].which = _local1;
_local2.playSound("supermove1");
};
game.superMoveSelected = function (which) {
var _local1 = this;
var _local3 = which;
var state = _local1.supermoves[_local3].state;
var _local2 = _local1.supermoves[_local3].name;
var move_name = (_local2 + state);
_local1.supermoves[_local3].state = 0;
_local1.manuallyRemove(move_name);
};
game.almostStart = function () {
count_down.gotoAndPlay(2);
};
game.chooseRandomItem = function (where, i_column, j_row) {
if (where == "new item") {
var _local1 = 26;
var _local2 = random(this.types) + 1;
if (mode == "Brick Challenge Mode") {
_local1 = 18;
var brick_frequency = 20;
if (random(_local1) == 0) {
var _local3 = 6;
_local2 = 7 + random(_local3);
} else if (random(brick_frequency) == 0) {
_local2 = 6;
}
} else if ((mode == "Normal Mode") || (mode == "Time Trials Mode")) {
if (random(_local1) == 0) {
var _local3 = 6;
_local2 = 7 + random(_local3);
}
}
} else if (where == "board") {
if (mode == "Brick Challenge Mode") {
var _local2 = random(this.types) + 1;
var brick_type = 6;
if (i_column == j_row) {
_local2 = brick_type;
}
} else if ((mode == "Normal Mode") || (mode == "Time Trials Mode")) {
var _local2 = random(this.types) + 1;
}
}
return(_local2);
};
game.gameOver = function () {
var _local1 = this;
_local1.inPlay = false;
score = _local1.score;
_local1.gameOverDelay = true;
_global.music.setTempo("slow");
_global.music.stopMusic();
gameWon = true;
if ((_local1.level < 15) || (_local1.timeRanOut)) {
gameWon = false;
_local1.playSound("Ending");
}
};
game.changeLevels = function () {
var _local1 = this;
sparkle.play();
if (_local1.level == 15) {
_local1.gameOver();
} else {
_local1.level++;
var _local2 = _local1.level;
if (_local2 > 27) {
_local2 = 27;
}
var _local3 = 16;
var nowLevel = _local1.levels[_local1.level];
var fallRateSeed = 0.035;
var fallRateInc = (0.04 / _local3);
var riseRateSeed = 1.6;
var riseRateInc = (1.1 / _local3);
_local1.fallRate = fallRateSeed + ((_local2 - 1) * fallRateInc);
_local1.riseRate = riseRateSeed - ((_local2 - 1) * riseRateInc);
if ((mode == "Normal Mode") || (mode == "Brick Challenge Mode")) {
total_minutes = _local1.getTotalMinutes();
pause_time = 0;
base = getTimer();
timeCounter = -1;
} else if (mode == "Time Trials Mode") {
total_minutes = tt_time;
if (_local1.level == 1) {
base = getTimer();
pause_time = 0;
}
}
max_time = ((total_minutes * 60) * 1000) + 0;
_local1.meter = 0;
setCurrentTime();
levelClip.setLevel(_local1.level);
}
};
game.getTotalMinutes = function () {
var _local1 = this;
if (_local1.level < 10) {
var _local2 = 1;
} else if ((_local1.level >= 10) && (_local1.level < 20)) {
var _local2 = 1.25;
} else if ((_local1.level >= 20) && (_local1.level < 25)) {
var _local2 = 1.5;
} else if ((_local1.level >= 25) && (_local1.level <= 30)) {
var _local2 = 2.5;
}
if ((mode == "Normal Mode") || (mode == "Time Trials Mode")) {
}
return(_local2);
};
game.selectItem = function (xm, ym) {
var _local1 = this;
var _local3 = Math.ceil(xm / _local1.xspacing);
var _local2 = Math.ceil(ym / _local1.yspacing);
var cellClicked = ((("cell" + _local3) + "_") + _local2);
var cell = _local1[cellClicked];
var selectionOK = true;
var type = cell.type;
if (_local1.selected.length == 1) {
var x_sel = _local1.selected[0].x;
var y_sel = _local1.selected[0].y;
var selectionOK = false;
if (((Math.abs(_local3 - x_sel) == 1) && (Math.abs(_local2 - y_sel) == 0)) || ((Math.abs(_local3 - x_sel) == 0) && (Math.abs(_local2 - y_sel) == 1))) {
var selectionOK = true;
}
}
if (type == 6) {
selectionOK = false;
}
if ((!_local1.locked) && (selectionOK)) {
if ((_local1.selected[0].x == _local3) && (_local1.selected[0].y == _local2)) {
_local1.selected[0].clip.select._visible = false;
_local1.selected = [];
return;
}
cell.clip.select._visible = true;
_local1.selected.push(cell);
if (_local1.selected.length == 2) {
_local1.locked = true;
_local1.swapPlaces();
}
} else if (_local1.selected.length == 1) {
_local1.selected[0].clip.select._visible = false;
_local1.selected = [];
if ((x_sel != _local3) && (y_sel != _local2)) {
_local1.playSound("locked");
}
}
};
game.selectItemAuto = function (xm, ym) {
var _local1 = this;
var _local3 = xm;
var _local2 = ym;
var cellClicked = ((("cell" + _local3) + "_") + _local2);
var cell = _local1[cellClicked];
var selectionOK = true;
if (_local1.selected.length == 1) {
var x_sel = _local1.selected[0].x;
var y_sel = _local1.selected[0].y;
var selectionOK = false;
if (((Math.abs(_local3 - x_sel) == 1) && (Math.abs(_local2 - y_sel) == 0)) || ((Math.abs(_local3 - x_sel) == 0) && (Math.abs(_local2 - y_sel) == 1))) {
var selectionOK = true;
}
}
if ((!_local1.locked) && (selectionOK)) {
if ((_local1.selected[0].x == _local3) && (_local1.selected[0].y == _local2)) {
_local1.selected[0].clip.select._visible = false;
_local1.selected = [];
return;
}
cell.clip.select._visible = true;
_local1.selected.push(cell);
if (_local1.selected.length == 2) {
_local1.locked = true;
_local1.swapPlaces();
}
} else {
_local1.playSound("locked");
}
};
game.doneSlidingBack = function () {
var _local1 = this;
_local1.slid++;
if (_local1.slid >= 2) {
_local1.slid = 0;
_local1.locked = false;
_local1.selected = [];
}
};
game.addMovingItem = function (name) {
var _local1 = this;
if (_local1.movingItems == undefined) {
_local1.movingItems = [];
}
_local1.movingItems.push(name);
};
game.removeMovingItem = function (name) {
var _local2 = this;
var _local3 = name;
var _local1 = 0;
while (_local1 < _local2.movingItems.length) {
if (_local2.movingItems[_local1] == _local3) {
_local2.movingItems.splice(_local1, 1);
}
_local1++;
}
};
game.addNewItems = function () {
var _local1 = this;
delete _local1.matched;
_local1.totalMoving = 0;
_local1.totalDoneMoving = 0;
var tempFunction = function () {
var _local1 = this;
if (_local1.game.inPlay) {
_local1._x = _local1._x + _local1.speed;
if (_local1.pushedYet != true) {
_local1.pushedYet = true;
_local1.game.addMovingItem(_local1.me.name);
}
if (Math.abs(_local1._x - _local1.x) <= Math.abs(_local1.speed)) {
_local1._x = _local1.x;
_local1.pushedYet = false;
_local1.game.removeMovingItem(_local1.me.name);
_local1.game.doneMoving();
_local1.onEnterFrame = null;
}
}
};
if (_local1.left.length > 0) {
_local1.left.sortOn("x");
var _local2 = [];
var i = 0;
while (i < _local1.left.length) {
var keepGoing = true;
var j = 0;
while (keepGoing) {
if ((_local1.left[i].y == _local2[j][0].y) || (_local2[j] == undefined)) {
if (_local2[j][0] == undefined) {
_local2[j] = [];
}
_local1.totalmoving++;
_local2[j].push(_local1.left[i]);
var keepGoing = false;
}
j++;
}
i++;
}
var i = 0;
while (i < _local2.length) {
var xshift = 1;
var stayHere = true;
var rowTotal = _local2[i].length;
var tempOb = {};
while ((_local2[i].length > 0) && (stayHere)) {
var ob = _local2[i].pop();
var nextHole = _local2[i][_local2[i].length - xshift];
var beginX = (ob.x - 1);
var x = beginX;
var y = ob.y;
var keepGoing = true;
while (keepGoing) {
var tempName = ((("cell" + x) + "_") + y);
if (_local1[tempName].name != nextHole.name) {
var _local3 = ob.name;
delete _local1[_local3];
_local1[_local3] = {};
newCell = _local1[_local3];
newCell.x = x + xshift;
newCell.y = y;
newCell.name = _local3;
newCell.clip = _local1[tempName].clip;
newCell.type = _local1[tempName].type;
newCell.clip.onEnterFrame = tempFunction;
newCell.clip.speed = _local1.speed;
newCell.clip.game = _local1;
newCell.clip.me = newCell;
newCell.clip.x = (newCell.x - 0.5) * _local1.xspacing;
newCell.clip.y = (newCell.y - 0.5) * _local1.yspacing;
_local2[i].unshift(_local1[tempname]);
if (!tempOb[_local3].moving) {
tempOb[_local3].moving = true;
}
var xshift = 1;
var keepGoing = false;
} else if (_local1[tempName].name == nextHole.name) {
if (x > 1) {
x--;
xshift++;
var nextHole = _local2[i][_local2[i].length - xshift];
} else {
var numToAdd = rowTotal;
var n = 1;
while (n <= numToAdd) {
var stayHere = false;
var keepGoing = false;
var type = _local1.chooseRandomItem("new item");
var x = n;
var name = ((("cell" + x) + "_") + y);
_local1[name] = {x:x, y:y, name:name, type:type};
_local1.addNewLeftClip(_local1[name], numToAdd);
_local1[name].clip.onEnterFrame = tempFunction;
_local1[name].clip.gotoAndStop(type);
n++;
}
}
}
}
}
i++;
}
}
if (_local1.right.length > 0) {
_local1.right.sortOn("x");
var _local2 = [];
var i = 0;
while (i < _local1.right.length) {
var keepGoing = true;
var j = 0;
while (keepGoing) {
if ((_local1.right[i].y == _local2[j][0].y) || (_local2[j] == undefined)) {
if (_local2[j][0] == undefined) {
_local2[j] = [];
}
_local2[j].push(_local1.right[i]);
_local1.totalmoving++;
var keepGoing = false;
}
j++;
}
i++;
}
now = getTimer();
var i = 0;
while (i < _local2.length) {
if ((getTimer() - now) > 2000) {
trace("break 1");
break;
}
var xshift = 1;
var stayHere = true;
var rowTotal = _local2[i].length;
var tempOb = {};
while ((_local2[i].length > 0) && (stayHere)) {
if ((getTimer() - now) > 2000) {
trace("break 2");
break;
}
var ob = _local2[i].shift();
var nextHole = _local2[i][xshift - 1];
var beginX = (ob.x + 1);
var x = beginX;
var y = ob.y;
var keepGoing = true;
while (keepGoing) {
if ((getTimer() - now) > 2000) {
trace("break 3");
break;
}
var tempName = ((("cell" + x) + "_") + y);
if (_local1[tempName].name != nextHole.name) {
var _local3 = ob.name;
delete _local1[_local3];
_local1[_local3] = {};
newCell = _local1[_local3];
newCell.x = x - xshift;
newCell.y = y;
newCell.name = _local3;
newCell.clip = _local1[tempName].clip;
newCell.type = _local1[tempName].type;
newCell.clip.onEnterFrame = tempFunction;
newCell.clip.speed = -_local1.speed;
newCell.clip.game = _local1;
newCell.clip.me = newCell;
newCell.clip.x = (newCell.x - 0.5) * _local1.xspacing;
newCell.clip.y = (newCell.y - 0.5) * _local1.yspacing;
_local2[i].push(_local1[tempname]);
if (!tempOb[_local3].moving) {
tempOb[_local3].moving = true;
}
var xshift = 1;
var keepGoing = false;
} else if (_local1[tempName].name == nextHole.name) {
if (x < _local1.width) {
x++;
xshift++;
var nextHole = _local2[i][xshift - 1];
} else {
var numToAdd = rowTotal;
var n = 1;
while (n <= numToAdd) {
var stayHere = false;
var keepGoing = false;
var type = _local1.chooseRandomItem("new item");
var x = ((_local1.width - n) + 1);
var name = ((("cell" + x) + "_") + y);
_local1[name] = {x:x, y:y, name:name, type:type};
_local1.addNewRightClip(_local1[name], (rowTotal - n) + 0.5);
_local1[name].clip.onEnterFrame = tempFunction;
_local1[name].clip.gotoAndStop(type);
n++;
}
}
}
}
}
i++;
}
}
delete _local1.right;
delete _local1.left;
};
game.keepRemovingThem = function () {
removeID = setInterval(removeDelay, 300);
};
removeDelay = function () {
game.playSound("squish");
game.removeItems();
clearInterval(removeID);
};
game.doneMoving = function (force) {
var _local1 = this;
_local1.totalDoneMoving++;
if ((_local1.movingItems.length == 0) || (force)) {
var _local2 = _local1.checkForMatches();
if (_local2) {
_local1.locked = true;
_local1.keepRemovingThem();
} else {
_local1.selected = [];
delayOneFrame = true;
_local1.locked = false;
_local1.combos = 0;
_local1.autoChooseNext();
}
}
};
game.autoChooseNext = function () {
if (this.autoTest) {
this.areThereMatches();
}
};
game.xPatch = function () {
var _local3 = this;
var i = 1;
while (i <= _local3.width) {
var _local1 = 1;
while (_local1 <= _local3.height) {
var name = ((("cell" + i) + "_") + _local1);
var _local2 = _local3[name];
_local2.clip.x = (_local2.x - 0.5) * _local3.xspacing;
_local1++;
}
i++;
}
};
game.displayPatch = function () {
var _local3 = this;
var i = 1;
while (i <= _local3.width) {
var _local2 = 1;
while (_local2 <= _local3.height) {
var name = ((("cell" + i) + "_") + _local2);
var _local1 = _local3[name];
_local1.clip._x = (_local1.x - 0.5) * _local3.xspacing;
_local1.clip._y = (_local1.y - 0.5) * _local3.yspacing;
_local1.clip.onEnterFrame = null;
_local2++;
}
i++;
}
};
game.changeFruit = function (fruit1, fruit2) {
var i = 1;
while (i <= this.width) {
var _local2 = 1;
while (_local2 <= this.height) {
var _local3 = (("cell" + i) + "_") + _local2;
var _local1 = this[_local3];
if (_local1.type == fruit1) {
_local1.type = fruit2;
_local1.clip.gotoAndStop(fruit2);
}
_local2++;
}
i++;
}
this.doneMoving(true);
};
game.addNewRightClip = function (who, num) {
var _local1 = who;
var _local2 = this;
var newDepth = (++_local2.depth);
var _local3 = "fruit" + newDepth;
_local2.board.attachMovie("fruit", _local3, newDepth);
var tempx = ((_local1.x - 0.5) * _local2.xspacing);
var tempy = ((_local1.y - 0.5) * _local2.yspacing);
_local1.clip = _local2.board[_local3];
var a = (_local2.width + num);
var placex = (a * _local2.xspacing);
_local1.clip.me = _local1;
_local1.clip.dir = "right";
_local1.clip.x = tempx;
_local1.clip.y = tempy;
_local1.clip._x = placex;
_local1.clip._y = tempy;
_local1.clip.speed = -_local2.speed;
_local1.clip.game = _local2;
_local1.clip.gotoAndStop(_local1.type);
};
game.addNewLeftClip = function (who, num) {
var _local1 = who;
var _local2 = this;
var newDepth = (++_local2.depth);
var _local3 = "fruit" + newDepth;
_local2.board.attachMovie("fruit", _local3, newDepth);
var tempx = ((_local1.x - 0.5) * _local2.xspacing);
var placex = ((((num + 1) - _local1.x) - 0.5) * _local2.xspacing);
var tempy = ((_local1.y - 0.5) * _local2.yspacing);
_local1.clip = _local2.board[_local3];
_local1.clip.me = _local1;
_local1.clip.dir = "left";
_local1.clip.x = tempx;
_local1.clip.y = tempy;
_local1.clip._x = -placex;
_local1.clip._y = tempy;
_local1.clip.speed = _local2.speed;
_local1.clip.game = _local2;
_local1.clip.gotoAndStop(_local1.type);
};
game.premove = function () {
var _local1 = this;
_local1.left = [];
_local1.right = [];
var _local2 = 0;
while (_local2 < _local1.matched.length) {
if (_local1.matched[_local2].x <= _local1.middle) {
_local1.left.push(_local1.matched[_local2]);
} else {
_local1.right.push(_local1.matched[_local2]);
}
_local2++;
}
_local1.addNewItems();
useXpatch = true;
};
game.removed = function (who) {
var _local1 = this;
who.removeMovieClip();
_local1.removedSoFar++;
if (_local1.removedSoFar == _local1.itemsToRemove) {
_local1.premove();
}
};
game.addToScore = function () {
var _local2 = this;
_local2.fruit_types = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var scoreFramesToAdd = 0;
var juice = 0;
var _local3 = 0;
while (_local3 < _local2.matched.length) {
_local2.fruit_types[_local2.matched[_local3].type + 1]++;
_local3++;
}
_local3 = 0;
while (_local3 < _local2.matched.length) {
var num = _local2.fruit_types[_local2.matched[_local3].type + 1];
var _local1 = num - 2;
if (_local1 <= 0) {
_local1 = 1;
}
juice = juice + _local1;
_local1 = _local1 + _local2.combos;
if (_local1 > 10) {
_local1 = 10;
}
_local2.matched[_local3].score_frame = _local1;
scoreFramesToAdd = scoreFramesToAdd + _local1;
_local3++;
}
var scoreToAdd = (100 * scoreFramesToAdd);
_local2.score = _local2.score + scoreToAdd;
scoreClip.setScore(_local2.score);
if (juice > 12) {
juice = 12;
}
_local2.addToMeter(juice);
if (_local2.combos > 0) {
combos.playCombo(_local2.combos + 1);
var num = _local2.combos;
if (num > 5) {
num = 6;
}
_local2.playSound("combo" + num);
}
_local2.combos++;
};
game.addToMeter = function (numFruit) {
var _local1 = this;
_local1.meter = _local1.meter + (numFruit * _local1.riseRate);
if (_local1.meter >= 100) {
meter.burst.play();
_local1.playSound("burst");
_local1.changeLevels();
}
};
game.burstDonePlaying = function () {
this.playSound("new level");
};
game.removeItems = function () {
var _local2 = this;
_local2.itemsToRemove = _local2.matched.length;
_local2.addToScore(_local2.itemsToRemove);
_local2.removedSoFar = 0;
var _local1 = 0;
while (_local1 < _local2.matched.length) {
var _local3 = _local2.matched[_local1].type;
_local2.matched[_local1].clip.fruit.game = _local2;
_local2.matched[_local1].clip.fruit.play();
_local2.matched[_local1].clip.fruit.score_frame = _local2.matched[_local1].score_frame;
if (_local3 > 6) {
_local2.addIconAnimation(_local2.matched[_local1]);
}
_local1++;
}
};
game.addIconAnimation = function (ob) {
var _local2 = ob;
var _local1 = _local2.type - 6;
var x1 = (_local2.clip._x + game.board._x);
var y1 = (_local2.clip._y + game.board._y);
var x2 = this.supermoves[_local1].x;
var _local3 = this.supermoves[_local1].y;
icons.addIcon(x1, y1, x2, _local3, _local1);
};
game.manuallyRemove = function (which) {
var _local1 = this;
_local1.matched = [];
if (which == "bomb1") {
var start = 4;
var finish = 5;
var _local2 = start;
while (_local2 <= finish) {
var _local3 = start;
while (_local3 <= finish) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
bomb_animation1.play();
} else if (which == "bomb2") {
var start = 3;
var finish = 6;
var _local2 = start;
while (_local2 <= finish) {
var _local3 = start;
while (_local3 <= finish) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
bomb_animation2.play();
} else if (which == "bomb3") {
var start = 2;
var finish = 7;
var _local2 = start;
while (_local2 <= finish) {
var _local3 = start;
while (_local3 <= finish) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
bomb_animation3.play();
} else if (which == "bug1") {
_local1.playSound("bug");
bug1.callBack = true;
bug1.play();
var cell = "cell6_4";
_local1.matched.push(_local1[cell]);
var cell = "cell7_4";
_local1.matched.push(_local1[cell]);
var cell = "cell5_5";
_local1.matched.push(_local1[cell]);
var cell = "cell6_5";
_local1.matched.push(_local1[cell]);
var cell = "cell7_5";
_local1.matched.push(_local1[cell]);
var cell = "cell5_6";
_local1.matched.push(_local1[cell]);
var cell = "cell6_6";
_local1.matched.push(_local1[cell]);
} else if (which == "bug2") {
_local1.playSound("bug");
bug2.callBack = true;
bug2.play();
bug3.play();
var cell = "cell2_1";
_local1.matched.push(_local1[cell]);
var cell = "cell3_1";
_local1.matched.push(_local1[cell]);
var cell = "cell1_2";
_local1.matched.push(_local1[cell]);
var cell = "cell2_2";
_local1.matched.push(_local1[cell]);
var cell = "cell3_2";
_local1.matched.push(_local1[cell]);
var cell = "cell1_3";
_local1.matched.push(_local1[cell]);
var cell = "cell2_3";
_local1.matched.push(_local1[cell]);
var cell = "cell7_6";
_local1.matched.push(_local1[cell]);
var cell = "cell8_6";
_local1.matched.push(_local1[cell]);
var cell = "cell6_7";
_local1.matched.push(_local1[cell]);
var cell = "cell7_7";
_local1.matched.push(_local1[cell]);
var cell = "cell8_7";
_local1.matched.push(_local1[cell]);
var cell = "cell6_8";
_local1.matched.push(_local1[cell]);
var cell = "cell7_8";
_local1.matched.push(_local1[cell]);
} else if (which == "bug3") {
_local1.playSound("bug");
bug4.callBack = true;
bug4.play();
var startX = 3;
var startY = 3;
var height = 4;
var width = 4;
var _local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
} else if (which == "mallet1") {
_local1.playSound("mallet");
mallet1.callBack = true;
mallet1.play();
mallet2.play();
var startX = 6;
var startY = 2;
var height = 2;
var width = 2;
var _local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
var startX = 2;
var startY = 6;
var height = 2;
var width = 2;
_local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
} else if (which == "mallet2") {
_local1.playSound("mallet");
mallet1.callBack = true;
mallet1.play();
mallet2.play();
mallet4.play();
var startX = 6;
var startY = 2;
var height = 2;
var width = 2;
var _local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
var startX = 2;
var startY = 6;
var height = 2;
var width = 2;
_local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
var startX = 2;
var startY = 2;
var height = 2;
var width = 2;
_local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
} else if (which == "mallet3") {
_local1.playSound("mallet");
mallet1.callBack = true;
mallet1.play();
mallet2.play();
mallet3.play();
mallet4.play();
var startX = 6;
var startY = 2;
var height = 2;
var width = 2;
var _local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
var startX = 2;
var startY = 6;
var height = 2;
var width = 2;
_local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
var startX = 2;
var startY = 2;
var height = 2;
var width = 2;
_local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
var startX = 6;
var startY = 6;
var height = 2;
var width = 2;
_local2 = startX;
while (_local2 < (startX + width)) {
var _local3 = startY;
while (_local3 < (startY + height)) {
var cell = ((("cell" + _local2) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
_local2++;
}
} else if (which == "guyser1") {
_local1.playSound("geyser");
guyser4.play();
guyser4.callBack = true;
var start = 4;
var finish = 8;
var _local3 = 1;
while (_local3 <= finish) {
var cell = ((("cell" + start) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
} else if (which == "guyser2") {
_local1.playSound("geyser");
guyser3.play();
guyser3.callBack = true;
guyser5.play();
var start = 3;
var finish = 8;
var _local3 = 1;
while (_local3 <= finish) {
var cell = ((("cell" + start) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
var start = 5;
var finish = 8;
_local3 = 1;
while (_local3 <= finish) {
var cell = ((("cell" + start) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
} else if (which == "guyser3") {
_local1.playSound("geyser");
guyser1.play();
guyser1.callBack = true;
guyser3.play();
guyser5.play();
guyser7.play();
var start = 1;
var finish = 8;
var _local3 = 1;
while (_local3 <= finish) {
var cell = ((("cell" + start) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
var start = 3;
var finish = 8;
_local3 = 1;
while (_local3 <= finish) {
var cell = ((("cell" + start) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
var start = 5;
var finish = 8;
_local3 = 1;
while (_local3 <= finish) {
var cell = ((("cell" + start) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
var start = 7;
var finish = 8;
_local3 = 1;
while (_local3 <= finish) {
var cell = ((("cell" + start) + "_") + _local3);
_local1.matched.push(_local1[cell]);
_local3++;
}
} else if (which == "fire1") {
_local1.playSound("fire");
var cell = "cell4_3";
_local1.matched.push(_local1[cell]);
var cell = "cell2_4";
_local1.matched.push(_local1[cell]);
var cell = "cell3_4";
_local1.matched.push(_local1[cell]);
var cell = "cell4_4";
_local1.matched.push(_local1[cell]);
var cell = "cell5_4";
_local1.matched.push(_local1[cell]);
var cell = "cell6_4";
_local1.matched.push(_local1[cell]);
var cell = "cell4_5";
_local1.matched.push(_local1[cell]);
var cell = "cell3_6";
_local1.matched.push(_local1[cell]);
var cell = "cell5_6";
_local1.matched.push(_local1[cell]);
var _local2 = 0;
while (_local2 < _local1.matched.length) {
if (_local2 == 0) {
_local1.matched[_local2].clip.fire.callBack = true;
}
_local1.matched[_local2].clip.fire.play();
_local2++;
}
} else if (which == "fire2") {
_local1.playSound("fire");
var _local2 = 1;
while (_local2 <= 8) {
var cell = ((("cell" + _local2) + "_") + _local2);
_local1.matched.push(_local1[cell]);
var cell = ((("cell" + _local2) + "_") + (9 - _local2));
_local1.matched.push(_local1[cell]);
_local2++;
}
_local2 = 0;
while (_local2 < _local1.matched.length) {
if (_local2 == 0) {
_local1.matched[_local2].clip.fire.callBack = true;
}
_local1.matched[_local2].clip.fire.play();
_local2++;
}
} else if (which == "fire3") {
_local1.playSound("fire");
var cell = "cell3_1";
_local1.matched.push(_local1[cell]);
var cell = "cell4_1";
_local1.matched.push(_local1[cell]);
var cell = "cell5_1";
_local1.matched.push(_local1[cell]);
var cell = "cell6_1";
_local1.matched.push(_local1[cell]);
var cell = "cell2_2";
_local1.matched.push(_local1[cell]);
var cell = "cell7_2";
_local1.matched.push(_local1[cell]);
var cell = "cell1_3";
_local1.matched.push(_local1[cell]);
var cell = "cell3_3";
_local1.matched.push(_local1[cell]);
var cell = "cell6_3";
_local1.matched.push(_local1[cell]);
var cell = "cell8_3";
_local1.matched.push(_local1[cell]);
var cell = "cell1_4";
_local1.matched.push(_local1[cell]);
var cell = "cell4_4";
_local1.matched.push(_local1[cell]);
var cell = "cell5_4";
_local1.matched.push(_local1[cell]);
var cell = "cell8_4";
_local1.matched.push(_local1[cell]);
var cell = "cell1_5";
_local1.matched.push(_local1[cell]);
var cell = "cell4_5";
_local1.matched.push(_local1[cell]);
var cell = "cell5_5";
_local1.matched.push(_local1[cell]);
var cell = "cell8_5";
_local1.matched.push(_local1[cell]);
var cell = "cell1_6";
_local1.matched.push(_local1[cell]);
var cell = "cell3_6";
_local1.matched.push(_local1[cell]);
var cell = "cell6_6";
_local1.matched.push(_local1[cell]);
var cell = "cell8_6";
_local1.matched.push(_local1[cell]);
var cell = "cell2_7";
_local1.matched.push(_local1[cell]);
var cell = "cell7_7";
_local1.matched.push(_local1[cell]);
var cell = "cell3_8";
_local1.matched.push(_local1[cell]);
var cell = "cell4_8";
_local1.matched.push(_local1[cell]);
var cell = "cell5_8";
_local1.matched.push(_local1[cell]);
var cell = "cell6_8";
_local1.matched.push(_local1[cell]);
var _local2 = 0;
while (_local2 < _local1.matched.length) {
if (_local2 == 0) {
_local1.matched[_local2].clip.fire.callBack = true;
}
_local1.matched[_local2].clip.fire.play();
_local2++;
}
} else if (which == "ice1") {
_local1.playSound("ice");
var cell = "cell4_3";
_local1.matched.push(_local1[cell]);
var cell = "cell3_4";
_local1.matched.push(_local1[cell]);
var cell = "cell2_5";
_local1.matched.push(_local1[cell]);
var cell = "cell3_6";
_local1.matched.push(_local1[cell]);
var cell = "cell4_7";
_local1.matched.push(_local1[cell]);
var cell = "cell5_6";
_local1.matched.push(_local1[cell]);
var cell = "cell6_5";
_local1.matched.push(_local1[cell]);
var cell = "cell5_4";
_local1.matched.push(_local1[cell]);
var _local2 = 0;
while (_local2 < _local1.matched.length) {
if (_local2 == 0) {
_local1.matched[_local2].clip.ice.callBack = true;
}
_local1.matched[_local2].clip.ice.play();
_local2++;
}
} else if (which == "ice2") {
_local1.playSound("ice");
var cell = "cell3_2";
_local1.matched.push(_local1[cell]);
var cell = "cell6_2";
_local1.matched.push(_local1[cell]);
var cell = "cell3_3";
_local1.matched.push(_local1[cell]);
var cell = "cell6_3";
_local1.matched.push(_local1[cell]);
var cell = "cell3_4";
_local1.matched.push(_local1[cell]);
var cell = "cell6_4";
_local1.matched.push(_local1[cell]);
var cell = "cell2_6";
_local1.matched.push(_local1[cell]);
var cell = "cell7_6";
_local1.matched.push(_local1[cell]);
var cell = "cell2_7";
_local1.matched.push(_local1[cell]);
var cell = "cell7_7";
_local1.matched.push(_local1[cell]);
var cell = "cell3_8";
_local1.matched.push(_local1[cell]);
var cell = "cell4_8";
_local1.matched.push(_local1[cell]);
var cell = "cell5_8";
_local1.matched.push(_local1[cell]);
var cell = "cell6_8";
_local1.matched.push(_local1[cell]);
var _local2 = 0;
while (_local2 < _local1.matched.length) {
if (_local2 == 0) {
_local1.matched[_local2].clip.ice.callBack = true;
}
_local1.matched[_local2].clip.ice.play();
_local2++;
}
} else if (which == "ice3") {
_local1.playSound("ice");
var cell = "cell2_2";
_local1.matched.push(_local1[cell]);
var cell = "cell3_2";
_local1.matched.push(_local1[cell]);
var cell = "cell6_2";
_local1.matched.push(_local1[cell]);
var cell = "cell7_2";
_local1.matched.push(_local1[cell]);
var cell = "cell1_3";
_local1.matched.push(_local1[cell]);
var cell = "cell4_3";
_local1.matched.push(_local1[cell]);
var cell = "cell5_3";
_local1.matched.push(_local1[cell]);
var cell = "cell8_3";
_local1.matched.push(_local1[cell]);
var cell = "cell1_4";
_local1.matched.push(_local1[cell]);
var cell = "cell8_4";
_local1.matched.push(_local1[cell]);
var cell = "cell1_5";
_local1.matched.push(_local1[cell]);
var cell = "cell8_5";
_local1.matched.push(_local1[cell]);
var cell = "cell2_6";
_local1.matched.push(_local1[cell]);
var cell = "cell7_6";
_local1.matched.push(_local1[cell]);
var cell = "cell3_7";
_local1.matched.push(_local1[cell]);
var cell = "cell6_7";
_local1.matched.push(_local1[cell]);
var cell = "cell4_8";
_local1.matched.push(_local1[cell]);
var cell = "cell5_8";
_local1.matched.push(_local1[cell]);
var _local2 = 0;
while (_local2 < _local1.matched.length) {
if (_local2 == 0) {
_local1.matched[_local2].clip.ice.callBack = true;
}
_local1.matched[_local2].clip.ice.play();
_local2++;
}
}
if (_local1.matched.length > 0) {
_local1.locked = true;
}
};
game.animationDone = function () {
this.removeItems();
};
game.playSound = function (which) {
var _local1 = this;
if (_local1.sound_number > 4) {
_local1.sound_number = 1;
}
_root["soundFX" + _local1.sound_number].gotoAndStop(which);
_local1.sound_number++;
};
game.doneSliding = function () {
var _local1 = this;
_local1.slid++;
if (_local1.slid >= 2) {
_local1.slid = 0;
var _local2 = _local1.verifySelections();
if (_local2) {
_local1.playSound("squish");
_local1.removeItems();
} else {
_local1.swapBack();
}
}
};
game.swapBack = function () {
var _local1 = this;
_local1.slid = 0;
var _local3 = _local1.selected[0];
var _local2 = _local1.selected[1];
_local3.clip.fruit.clip.gotoAndStop(2);
_local2.clip.fruit.clip.gotoAndStop(2);
var tempFunction = function () {
var _local1 = this;
if (_local1.game.inPlay) {
_local1.xmov = (_local1.homex - _local1._x) * _local1.k;
_local1.ymov = (_local1.homey - _local1._y) * _local1.k;
_local1._x = _local1._x + _local1.xmov;
_local1._y = _local1._y + _local1.ymov;
if ((Math.abs(_local1.xmov) < 1) && (Math.abs(_local1.ymov) < 1)) {
_local1._x = _local1.homex;
_local1._y = _local1.homey;
_local1.game.doneSlidingBack();
_local1.fruit.clip.gotoAndStop(1);
_local1.onEnterFrame = null;
}
}
};
_local3.clip.onEnterFrame = tempFunction;
_local2.clip.onEnterFrame = tempFunction;
};
game.swapPlaces = function () {
var _local1 = this;
_local1.playSound("swap");
_local1.slid = 0;
var _local3 = _local1.selected[0];
var _local2 = _local1.selected[1];
_local3.clip.fruit.clip.gotoAndStop(2);
_local2.clip.fruit.clip.gotoAndStop(2);
_local3.clip.select.gotoAndPlay(2);
_local2.clip.select.gotoAndPlay(2);
_local3.clip.x = _local2.clip._x;
_local3.clip.homex = _local3.clip._x;
_local2.clip.homex = _local2.clip._x;
_local3.clip.homey = _local3.clip._y;
_local2.clip.homey = _local2.clip._y;
_local3.clip.y = _local2.clip._y;
_local3.clip.k = 0.3;
_local2.clip.k = 0.3;
_local2.clip.x = _local3.clip._x;
_local2.clip.y = _local3.clip._y;
_local3.clip.go = true;
_local2.clip.go = true;
_local3.clip.game = _local1;
_local2.clip.game = _local1;
var tempFunction = function () {
var _local1 = this;
if (_local1.go) {
_local1.xmov = (_local1.x - _local1._x) * _local1.k;
_local1.ymov = (_local1.y - _local1._y) * _local1.k;
_local1._x = _local1._x + _local1.xmov;
_local1._y = _local1._y + _local1.ymov;
if ((Math.abs(_local1.xmov) < 1) && (Math.abs(_local1.ymov) < 1)) {
_local1._x = _local1.x;
_local1._y = _local1.y;
_local1.game.doneSliding();
_local1.fruit.clip.gotoAndStop(1);
_local1.go = false;
}
}
};
_local3.clip.onEnterFrame = tempFunction;
_local2.clip.onEnterFrame = tempFunction;
};
game.addToMatch = function (which) {
var _local2 = this;
var okToInsert = true;
var _local3 = which;
var _local1 = 0;
while (_local1 < _local2.matched.length) {
if ((_local2.matched[_local1].x == _local3.x) && (_local2.matched[_local1].y == _local3.y)) {
var okToInsert = false;
}
_local1++;
}
if (okToInsert) {
_local2.matched.push(which);
}
};
game.compareTypes = function (item1, item2) {
var _local2 = item2;
var _local3 = item1;
var _local1 = false;
if ((((_local3.type != undefined) && (_local2.type != undefined)) && ((_local3.type == _local2.type) || ((_local3.type > 6) || (_local2.type > 6)))) && ((_local3.type < 6) || (_local2.type < 6))) {
_local1 = true;
}
return(_local1);
};
game.checkForMatches = function () {
var _local1 = this;
var returnVal = false;
_local1.matched = [];
var i = 1;
while (i <= _local1.width) {
var _local2 = 1;
while (_local2 <= _local1.height) {
var matchFound = false;
var _local3 = _local1[(("cell" + i) + "_") + _local2];
var rightCell1 = _local1[(("cell" + (i + 1)) + "_") + _local2];
var rightCell2 = _local1[(("cell" + (i + 2)) + "_") + _local2];
var rightCell3 = _local1[(("cell" + (i + 3)) + "_") + _local2];
var rightCell4 = _local1[(("cell" + (i + 4)) + "_") + _local2];
var bottomCell1 = _local1[(("cell" + i) + "_") + (_local2 + 1)];
var bottomCell2 = _local1[(("cell" + i) + "_") + (_local2 + 2)];
var bottomCell3 = _local1[(("cell" + i) + "_") + (_local2 + 3)];
var bottomCell4 = _local1[(("cell" + i) + "_") + (_local2 + 4)];
if ((_local1.compareTypes(_local3, rightCell1) && (_local1.compareTypes(rightCell1, rightCell2))) && (_local1.compareTypes(_local3, rightCell2))) {
var matchFound = true;
_local1.addToMatch(_local3);
_local1.addToMatch(rightCell1);
_local1.addToMatch(rightCell2);
if (_local1.compareTypes(_local3, rightCell3) && (_local1.compareTypes(rightCell2, rightCell3))) {
_local1.addToMatch(rightCell3);
}
if ((_local1.compareTypes(_local3, rightCell4) && (_local1.compareTypes(rightCell2, rightCell3))) && (_local1.compareTypes(rightCell3, rightCell4))) {
_local1.addToMatch(rightCell4);
}
returnVal = true;
}
if ((_local1.compareTypes(_local3, bottomCell1) && (_local1.compareTypes(bottomCell1, bottomCell2))) && (_local1.compareTypes(_local3, bottomCell2))) {
var matchFound = true;
_local1.addToMatch(_local3);
_local1.addToMatch(bottomCell1);
_local1.addToMatch(bottomCell2);
if (_local1.compareTypes(_local3, bottomCell3) && (_local1.compareTypes(bottomCell2, bottomCell3))) {
_local1.addToMatch(bottomCell3);
}
if ((_local1.compareTypes(_local3, bottomCell4) && (_local1.compareTypes(bottomCell2, bottomCell3))) && (_local1.compareTypes(bottomCell3, bottomCell4))) {
_local1.addToMatch(bottomCell4);
}
returnVal = true;
}
_local2++;
}
i++;
}
return(returnVal);
};
game.areThereMatches = function () {
var _local3 = this;
var now = getTimer();
var valid = false;
var b = 0;
while (b < 2) {
var m = 1;
while (m <= _local3.height) {
var n = 1;
while (n <= _local3.width) {
if (b == 0) {
var tempx1 = n;
var tempy1 = m;
var tempx2 = (tempx1 + 1);
var tempy2 = tempy1;
} else {
var tempx1 = n;
var tempy1 = m;
var tempx2 = tempx1;
var tempy2 = (tempy1 + 1);
}
var _local2 = _local3[(("cell" + tempx1) + "_") + tempy1];
var _local1 = _local3[(("cell" + tempx2) + "_") + tempy2];
var valid = false;
var oldCell1 = _local2;
var oldCell2 = _local1;
var cell1Name = _local2.name;
var cell2Name = _local1.name;
if (((((_local2.type != 6) && (_local1.type != 6)) && ((_local1.type < 6) || (_local1.type < 6))) && (_local2.x == _local1.x)) && (((_local2.y - 1) == _local1.y) || ((_local2.y + 1) == _local1.y))) {
_local3[oldCell1.name] = oldCell2;
_local3[oldCell2.name] = oldCell1;
var valid = _local3.checkForMatches();
}
if (((((_local2.type != 6) && (_local1.type != 6)) && ((_local1.type < 6) || (_local1.type < 6))) && (_local2.y == _local1.y)) && (((_local2.x - 1) == _local1.x) || ((_local2.x + 1) == _local1.x))) {
_local3[oldCell1.name] = oldCell2;
_local3[oldCell2.name] = oldCell1;
var valid = _local3.checkForMatches();
}
_local3[oldCell1.name] = oldCell1;
_local3[oldCell2.name] = oldCell2;
if (valid) {
break;
}
n++;
}
if (valid) {
break;
}
m++;
}
if (valid) {
break;
}
b++;
}
trace(valid);
if (valid) {
_local3.s_x1 = tempx1;
_local3.s_x2 = tempx2;
_local3.s_y1 = tempy1;
_local3.s_y2 = tempy2;
if (_local3.autoTest) {
id = setInterval(manualSelect, 100);
}
} else {
trace("NO MATCHES");
}
trace(getTimer() - now);
return(valid);
};
game.verifySelections = function () {
var _local1 = this;
var _local3 = _local1.selected[0];
var _local2 = _local1.selected[1];
var valid = false;
var oldCell1 = _local3;
var oldCell2 = _local2;
var cell1Name = _local3.name;
var cell2Name = _local2.name;
if ((_local3.x == _local2.x) && (((_local3.y - 1) == _local2.y) || ((_local3.y + 1) == _local2.y))) {
_local1[oldCell1.name] = oldCell2;
_local1[oldCell2.name] = oldCell1;
var valid = _local1.checkForMatches();
}
if ((_local3.y == _local2.y) && (((_local3.x - 1) == _local2.x) || ((_local3.x + 1) == _local2.x))) {
_local1[oldCell1.name] = oldCell2;
_local1[oldCell2.name] = oldCell1;
var valid = _local1.checkForMatches();
}
if (!valid) {
_local1[oldCell1.name] = oldCell1;
_local1[oldCell2.name] = oldCell2;
_local3.clip.select._visible = false;
_local2.clip.select._visible = false;
} else {
var x1 = _local1[cell1Name].x;
var y1 = _local1[cell1Name].y;
var x2 = _local1[cell2Name].x;
var y2 = _local1[cell2Name].y;
_local1[cell1Name].x = x2;
_local1[cell1Name].y = y2;
_local1[cell2Name].x = x1;
_local1[cell2Name].y = y1;
_local1[cell1Name].name = cell1Name;
_local1[cell2Name].name = cell2Name;
}
return(valid);
};
game.board.onMouseDown = function () {
var _local1 = this;
if (_local1.hitTest(_local1._parent._xmouse, _local1._parent._ymouse)) {
if (game.inPlay) {
_local1.game.selectItem(_local1._xmouse, _local1._ymouse);
}
}
};
game.addClip = function (who) {
var _local1 = who;
var _local2 = this;
var newDepth = (++_local2.depth);
var _local3 = "fruit" + newDepth;
_local2.board.attachMovie("fruit", _local3, newDepth);
_local1.clip = _local2.board[_local3];
_local1.clip._x = (_local1.x - 0.5) * _local2.xspacing;
_local1.clip._y = (_local1.y - 0.5) * _local2.yspacing;
_local1.clip.gotoAndStop(_local1.type);
};
game.generateBoard = function () {
var _local1 = this;
var _local3 = 1;
while (_local3 <= _local1.width) {
var _local2 = 1;
while (_local2 <= _local1.height) {
var name = ((("cell" + _local3) + "_") + _local2);
var leftCell = ((("cell" + (_local3 - 1)) + "_") + _local2);
var farLeftCell = ((("cell" + (_local3 - 2)) + "_") + _local2);
var topCell = ((("cell" + _local3) + "_") + (_local2 - 1));
var farTopCell = ((("cell" + _local3) + "_") + (_local2 - 2));
var keepLooking = true;
while (keepLooking) {
var keepLooking = false;
var type = _local1.chooseRandomItem("board", _local3, _local2);
if (((_local1[leftCell].type == type) && (_local1[farLeftCell].type == type)) || ((_local1[topCell].type == type) && (_local1[farTopCell].type == type))) {
var keepLooking = true;
}
}
_local1[name] = {x:_local3, y:_local2, name:name, type:type};
_local1.addClip(_local1[name]);
_local2++;
}
_local3++;
}
};
game.start = function () {
base = getTimer();
pause_time = 0;
this.inPlay = true;
};
game.generateBoard();
game.changeLevels();
if ((mode == "Normal Mode") || (mode == "Brick Challenge Mode")) {
popup.gotoAndStop(mode);
} else {
game.almostStart();
}
this.onEnterFrame = function () {
if (game.inPlay) {
setCurrentTime();
dealWithMeter();
if (delayOneFrame) {
delayOneFrame = false;
}
if (useXpatch) {
game.xPatch();
useXpatch = false;
}
} else if (game.gameOverDelay) {
game.gameOverCounter++;
if (game.gameOverCounter == 60) {
score_action = "submit";
end_level = game.level;
gotoAndStop ("Ending");
}
}
};
Instance of Symbol 378 MovieClip in Frame 56
onClipEvent (load) {
function setTime() {
var time = _parent.current_time;
var minutes = Math.floor(time / ms_in_min).toString();
var seconds = Math.floor((time % ms_in_min) / ms_in_sec).toString();
var miliseconds = Math.floor((time % ms_in_min) % ms_in_sec).toString();
ms1.gotoAndStop(1);
ms2.gotoAndStop(1);
ms3.gotoAndStop(1);
m1.gotoAndStop(1);
m2.gotoAndStop(1);
s1.gotoAndStop(1);
s2.gotoAndStop(1);
var len = miliseconds.length;
var _local1 = 0;
while (_local1 < len) {
var _local3 = miliseconds.substr(_local1, 1);
var _local2 = "ms" + (len - _local1);
this[_local2].gotoAndStop(Number(_local3) + 1);
_local1++;
}
var len = seconds.length;
_local1 = 0;
while (_local1 < len) {
var _local3 = seconds.substr(_local1, 1);
var _local2 = "s" + (len - _local1);
this[_local2].gotoAndStop(Number(_local3) + 1);
_local1++;
}
var len = minutes.length;
_local1 = 0;
while (_local1 < len) {
var _local3 = minutes.substr(_local1, 1);
var _local2 = "m" + (len - _local1);
this[_local2].gotoAndStop(Number(_local3) + 1);
_local1++;
}
}
ms_in_min = 60000;
ms_in_sec = 1000;
max_min = _parent.total_minutes;
max_time = max_min * ms_in_min;
}
onClipEvent (enterFrame) {
setTime();
}
Symbol 4 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 22 Button
on (release) {
chooseMode("Normal Mode");
}
Symbol 28 Button
on (release) {
atMenu = false;
gotoAndStop ("Inst");
}
Symbol 35 Button
on (release) {
getURL ("http://www.miniclip.com/buy_fruitsmash.htm", "_blank");
}
Symbol 38 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 1
function startMusic(which) {
if (_global.musicOn) {
if (which == "loops") {
playing = true;
loop = 1;
var _local1 = ("loop" + loop) + tempo;
playLoop(_local1);
} else if (which == "splash") {
playing = true;
var _local1 = "loop1slow";
playLoop(_local1);
}
}
}
function stopMusic() {
playing = false;
tune.stop();
}
function nextLoop() {
if (_global.musicOn) {
if ((++timesPlayed) == 3) {
timesPlayed = 0;
loop++;
if (loop > numLoops) {
loop = 1;
}
}
playing = true;
var _local1 = ("loop" + loop) + tempo;
playLoop(_local1);
}
}
function playLoop(name) {
if (_global.musicOn) {
tune.stop();
current = name;
tune = new Sound(this);
tune.attachSound(current);
tune.setVolume(volume);
if (name == "loop0slow") {
tune.start(0, 100);
} else {
tune.start();
}
tune.onSoundComplete = nextLoop;
}
}
function toggleLoop() {
if (playing) {
stopMusic();
_global.musicOn = false;
} else {
_global.musicOn = true;
loop = 1;
nextLoop();
}
}
function setTempo(which) {
tempo = which;
var _local1 = ("loop" + loop) + tempo;
playLoop(_local1);
}
stop();
_global.music = this;
_global.musicOn = true;
tempo = "slow";
playing = false;
volume = 30;
numLoops = 1;
offset = 0;
timesPlayed = 0;
Symbol 51 Button
on (release) {
_parent.game.almostStart();
gotoAndStop (1);
}
Symbol 58 Button
on (release) {
_root.gotoAndStop("Menu");
gotoAndStop (1);
}
Symbol 66 Button
on (release) {
_parent.unPauseGame();
this.gotoAndStop(1);
}
Symbol 74 Button
on (release) {
_parent.closeMe();
}
Symbol 75 Button
on (release) {
gotoAndStop (1);
}
Symbol 82 Button
on (release) {
_parent.gotoAndStop("Menu");
gotoAndStop (1);
}
Symbol 83 Button
on (release) {
cancelPressed();
}
Symbol 85 MovieClip Frame 1
function closed() {
_root.exit_button._visible = true;
}
function open() {
_root.exit_button._visible = false;
}
stop();
closed();
Symbol 85 MovieClip Frame 5
open();
Symbol 85 MovieClip Frame 45
open();
Symbol 85 MovieClip Frame 53
open();
Symbol 85 MovieClip Frame 60
function cancelPressed() {
var _local1 = _parent;
if ((!_local1.paused) && (_local1.count_down._currentframe == 1)) {
gotoAndStop(_local1.mode);
} else {
gotoAndStop (1);
}
_local1.resumeCountDown();
_local1.unPauseGame();
}
open();
_parent.pauseGame(true);
Symbol 90 Button
on (release) {
if (atMenu) {
popup.gotoAndStop("exit1");
} else {
stopCountDown();
popup.gotoAndStop("exit2");
}
}
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 18
_parent._parent.game.burstDonePlaying();
gotoAndStop (1);
Symbol 143 Button
on (release) {
_parent.gotoAndStop("Menu");
}
Symbol 144 Button
on (release) {
_parent.unPauseGame();
closed();
gotoAndStop (1);
}
Symbol 145 MovieClip Frame 1
function closed() {
_root.exit_button._visible = true;
}
function open() {
_root.exit_button._visible = false;
}
stop();
Symbol 145 MovieClip Frame 3
_parent.pauseGame(true);
open();
Symbol 160 Button
on (release) {
_parent.closeMe();
}
Symbol 167 Button
on (release) {
_parent.continueOn();
}
Symbol 174 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 178 MovieClip Frame 1
stop();
if (_parent._parent.gameWon) {
this.gotoAndStop(2);
}
Symbol 179 MovieClip Frame 1
play();
Symbol 179 MovieClip Frame 21
gotoAndStop ("over");
Symbol 181 Button
on (release) {
if (action == "view") {
_parent.goToGame();
} else {
_parent.gotoAndStop("Menu");
}
}
Symbol 185 Button
on (release) {
getURL ("http://www.electrotank.com/", "_blank");
gotoAndStop ("Waiting");
}
Symbol 189 Button
on (release) {
submitScore();
}
Symbol 205 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut, release, dragOut, releaseOutside) {
gotoAndStop (1);
}
on (release) {
_parent.changeDir("up");
}
Symbol 207 MovieClip Frame 1
stop();
Symbol 209 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut, release, dragOut, releaseOutside) {
gotoAndStop (1);
}
on (release) {
_parent.changeDir("down");
}
Symbol 211 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 1
function submitScore() {
_root.submitETscore(score);
gotoAndStop ("Submitting");
}
function doneSubmitting() {
loadScores();
}
function loadScores() {
_root.loadETscores();
gotoAndStop ("List");
}
function listLoaded(tmp_list) {
scoreList = tmp_list;
gotoAndStop ("List Loaded");
}
var score = _parent.score;
if (action == "submit") {
if (_root.loggedIn) {
submitScore();
} else {
gotoAndStop ("Info");
}
} else if (action == "view") {
loadScores();
}
stop();
Symbol 213 MovieClip Frame 15
play();
Symbol 213 MovieClip Frame 34
gotoAndStop ("Login");
Symbol 213 MovieClip Frame 50
function updateVisualList() {
clear();
var _local1 = 0;
while (_local1 < scores.info.length) {
var _local3 = _local1 + 1;
clip = "s" + _local3;
var _local2 = this[clip];
if (scores.info[_local1 + offset].Score != undefined) {
_local2.num = _local3 + offset;
_local2.name = scores.info[_local1 + offset].Username;
_local2.score = scores.info[_local1 + offset].Score;
}
_local1++;
}
}
function changeDir(dir) {
if (dir == "up") {
offset--;
} else if (dir == "down") {
offset++;
}
if (offset < 0) {
offset = 0;
} else if (offset > (scores.info.length - 3)) {
offset = scores.info.length - 3;
}
updateVisualList();
}
function clear() {
var _local2 = 0;
while (_local2 < 7) {
var _local3 = _local2 + 1;
clip = "s" + _local3;
var _local1 = this[clip];
_local1.num = "";
_local1.name = "";
_local1.score = "";
_local2++;
}
}
offset = 0;
listFrame = _currentframe;
stop();
scores = new Object();
scores.info = scoreList;
updateVisualList();
Symbol 238 MovieClip Frame 1
stop();
_visible = false;
Symbol 238 MovieClip Frame 5
gotoAndStop (1);
Symbol 238 MovieClip Frame 15
gotoAndStop (1);
Symbol 238 MovieClip Frame 30
gotoAndStop (1);
Symbol 238 MovieClip Frame 41
gotoAndStop (1);
Symbol 238 MovieClip Frame 50
gotoAndStop (1);
Symbol 238 MovieClip Frame 56
gotoAndStop (1);
Symbol 238 MovieClip Frame 68
gotoAndStop (1);
Symbol 238 MovieClip Frame 90
gotoAndStop (1);
Symbol 238 MovieClip Frame 102
gotoAndStop (1);
Symbol 238 MovieClip Frame 108
gotoAndStop (1);
Symbol 238 MovieClip Frame 115
gotoAndStop (1);
Symbol 238 MovieClip Frame 123
gotoAndStop (1);
Symbol 238 MovieClip Frame 128
gotoAndStop (1);
Symbol 238 MovieClip Frame 137
play();
Symbol 238 MovieClip Frame 164
gotoAndStop (1);
Symbol 238 MovieClip Frame 169
play();
Symbol 238 MovieClip Frame 174
gotoAndStop (1);
Symbol 238 MovieClip Frame 184
gotoAndStop (1);
Symbol 238 MovieClip Frame 194
gotoAndStop (1);
Symbol 238 MovieClip Frame 203
gotoAndStop (1);
Symbol 242 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 1
stop();
gotoAndStop(_parent._parent.score_frame);
Symbol 265 MovieClip Frame 6
_parent.nextFrame();
Symbol 266 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 10
stop();
Symbol 266 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 22
if (callBack) {
_parent._parent.game.animationDone();
callBack = false;
}
gotoAndStop (1);
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 30
if (callBack) {
_parent._parent.game.animationDone();
}
gotoAndStop (1);
Symbol 308 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 2
play();
_visible = true;
Symbol 308 MovieClip Frame 7
_visible = false;
gotoAndStop (1);
Symbol 312 MovieClip Frame 1
stop();
Symbol 313 MovieClip Frame 1
stop();
Symbol 313 MovieClip Frame 10
stop();
Symbol 313 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 318 MovieClip Frame 1
stop();
Symbol 319 MovieClip Frame 1
stop();
Symbol 319 MovieClip Frame 10
stop();
Symbol 319 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 322 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 10
stop();
Symbol 323 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 326 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 10
stop();
Symbol 327 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 15
game.removed(this._parent);
stop();
Symbol 335 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 10
stop();
Symbol 335 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 336 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 10
stop();
Symbol 336 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 10
stop();
Symbol 338 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 340 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 10
stop();
Symbol 340 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 10
stop();
Symbol 342 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 344 MovieClip Frame 1
stop();
Symbol 344 MovieClip Frame 10
stop();
Symbol 344 MovieClip Frame 11
game.removed(this._parent);
stop();
Symbol 345 MovieClip [fruit] Frame 1
stop();
select._visible = false;
Symbol 357 MovieClip Frame 1
stop();
Symbol 359 MovieClip Frame 1
function setScore(score) {
clean();
score = score.toString();
var _local2 = 0;
while (_local2 < score.length) {
var _local1 = score.substr(_local2, 1);
var width = 18;
if ((_local1 >= 1) && (_local1 <= 9)) {
var numberFrame = _local1;
} else if (_local1 == 0) {
var numberFrame = 10;
}
var _local3 = "s" + (_local2 + 1);
scoreClip[_local3]._visible = true;
scoreClip[_local3].gotoAndStop(numberFrame);
_local2++;
}
}
function clean() {
var _local1 = 1;
while (_local1 <= 10) {
var _local2 = "s" + _local1;
scoreClip[_local2]._visible = false;
_local1++;
}
}
setScore(0);
Symbol 376 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 1
function setLevel(num) {
var _local1 = num;
_local1 = _local1.toString();
if (_local1 < 10) {
this.gotoAndStop(1);
num1.gotoAndStop(Number(_local1) + 1);
} else {
this.gotoAndStop(2);
num1.gotoAndStop(Number(_local1.substr(0, 1)) + 1);
num2.gotoAndStop(Number(_local1.substr(1, 1)) + 1);
}
}
stop();
setLevel(1);
Symbol 387 MovieClip Frame 1
stop();
Symbol 393 Button
on (release) {
if (!paused) {
pauseGame();
}
}
Symbol 399 Button
on (release) {
if (!paused) {
inst_clip.gotoAndStop(3);
}
}
Symbol 405 MovieClip Frame 1
function playCombo(amount) {
num = amount;
gotoAndPlay (2);
}
stop();
Symbol 405 MovieClip Frame 28
gotoAndStop (1);
Symbol 408 MovieClip Frame 1
stop();
playAgain = true;
Symbol 408 MovieClip Frame 14
if (playAgain) {
playAgain = false;
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 414 Button
on (release) {
_global.music.toggleLoop();
gotoAndStop (2);
}
Symbol 420 Button
on (release) {
_global.music.toggleLoop();
gotoAndStop (1);
}
Symbol 421 MovieClip Frame 1
stop();
if (_global.music.playing) {
gotoAndStop (2);
}
Symbol 422 Button
on (release) {
game.changeLevels();
}
Symbol 423 Button
on (release) {
var i = 1;
while (i <= 6) {
game.superMoveCollected(i);
i++;
}
}
Symbol 431 Button
on (rollOver) {
this.gotoAndStop(frame + 1);
}
on (rollOut, dragOut, releaseOutside) {
this.gotoAndStop(frame);
}
on (release) {
if (!_parent._parent.game.locked) {
_parent._parent.game.superMoveSelected(which);
this.gotoAndStop(frame + 2);
}
}
Symbol 439 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 2
stop();
Symbol 439 MovieClip Frame 3
stop();
Symbol 439 MovieClip Frame 4
gotoAndStop (1);
Symbol 439 MovieClip Frame 5
stop();
Symbol 439 MovieClip Frame 6
stop();
Symbol 439 MovieClip Frame 7
gotoAndStop (1);
Symbol 439 MovieClip Frame 8
stop();
Symbol 439 MovieClip Frame 9
stop();
Symbol 439 MovieClip Frame 10
gotoAndStop (1);
Symbol 444 MovieClip Frame 1
stop();
var i = 1;
while (i <= 6) {
var name = ("icon" + i);
this[name].gotoAndStop(i);
i++;
}
Symbol 445 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 1
function tempFunction() {
var _local1 = this;
if (_local1.mode == "move") {
_local1.k = 0.1;
_local1.xmov = (_local1.endx - _local1._x) * _local1.k;
_local1.ymov = (_local1.endy - _local1._y) * _local1.k;
_local1._y = _local1._y + _local1.ymov;
_local1._x = _local1._x + _local1.xmov;
if (Math.abs(_local1.xmov * _local1.ymov) < 0.2) {
_local1._x = _local1.endx;
_local1._y = _local1.endy;
_local1._parent._parent.game.superMoveCollected(_local1.type);
_local1.mode = "fade";
}
} else if (_local1.mode == "fade") {
_local1.k = 0.2;
var endScale = 150;
var scaleMove = ((endScale - _local1._xscale) * _local1.k);
var _local2 = 0;
var _local3 = (_local2 - _local1._alpha) * _local1.k;
_local1._xscale = _local1._xscale + scaleMove;
_local1._yscale = _local1._xscale;
_local1._alpha = _local1._alpha + _local3;
if (_local1._alpha <= 1) {
_local1.removeMovieClip();
}
}
}
function addIcon(x1, y1, x2, y2, type) {
num++;
var _local2 = "icon" + num;
var _local1 = icons.duplicateMovieClip(_local2, num);
_local1._x = x1;
_local1._y = y1;
_local1.endx = x2;
_local1.endy = y2;
_local1.mode = "move";
_local1.type = type;
_local1.icons.gotoAndStop(type);
_local1.onEnterFrame = tempFunction;
}
num = 0;
Symbol 454 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 23
if (callBack) {
_parent.game.animationDone();
}
gotoAndStop (1);
Symbol 465 MovieClip Frame 1
stop();
Symbol 465 MovieClip Frame 24
if (callBack) {
_parent.game.animationDone();
}
gotoAndStop (1);
Symbol 479 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 2
stop();
Symbol 479 MovieClip Frame 3
play();
Symbol 479 MovieClip Frame 25
stop();
Symbol 480 MovieClip Frame 1
stop();
Symbol 480 MovieClip Frame 34
if (callBack) {
_parent.game.animationDone();
}
gotoAndStop (1);
Symbol 489 MovieClip Frame 1
stop();
Symbol 489 MovieClip Frame 2
play();
Symbol 489 MovieClip Frame 129
_parent.game.start();
stop();
Symbol 505 MovieClip Frame 1
stop();
Symbol 505 MovieClip Frame 20
_parent.game.animationDone();
Symbol 505 MovieClip Frame 28
gotoAndStop (1);
Symbol 508 MovieClip Frame 1
stop();
Symbol 508 MovieClip Frame 2
play();
Symbol 508 MovieClip Frame 34
gotoAndStop (1);
Symbol 508 MovieClip Frame 35
play();
Symbol 508 MovieClip Frame 61
gotoAndStop (1);