Frame 2
ifFrameLoaded (5) {
gotoAndPlay (4);
}
Frame 3
gotoAndPlay (1);
Frame 5
stop();
Frame 15
stop();
Frame 18
sound_bg = new Sound();
sound_bg.attachSound("gaga");
sound_bg.setVolume(100);
sound_bg.start();
Frame 19
stop();
Instance of Symbol 192 MovieClip "cur" in Frame 19
onClipEvent (load) {
this.swapDepths(999999);
Mouse.hide();
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
Frame 23
function initVar() {
startX = 63;
startY = 138;
tileW = 41;
tileH = 41;
score = 0;
displayScore();
level = 1;
displayLevel();
startTime = 65;
fullTime = 135;
hintTimeCost = 10;
timeMultiple = 10;
time = startTime;
timeBar._width = time;
acceleration = 3;
gamePlay = false;
}
function initTile() {
D = 0;
droppingNum = 0;
resetSelect();
map = new Array();
initMap();
checkMap();
while ((!checkMap()) || (hint() == null)) {
}
droppingTile = false;
droppedNum = 0;
initMc();
}
function newGame() {
Mouse.hide();
destroyGame();
initVar();
initTile();
gamePlay = true;
}
function destroyGame() {
removeHint();
removeMovieClip(game);
}
function upgrade() {
initTile();
time = startTime;
gamePlay = true;
var _local1 = new Sound();
_local1.attachSound("sound_level");
_local1.start();
}
function displayScore() {
var _local1 = (t1 = (t2 = (t3 = (t4 = 0))));
_local1 = int(score / 10000);
t1 = int((score - (_local1 * 10000)) / 1000);
t2 = int(((score - (_local1 * 10000)) - (t1 * 1000)) / 100);
t3 = int((((score - (_local1 * 10000)) - (t1 * 1000)) - (t2 * 100)) / 10);
t4 = (((score - (_local1 * 10000)) - (t1 * 1000)) - (t2 * 100)) - (t3 * 10);
s0.gotoAndStop(_local1 + 1);
s1.gotoAndStop(t1 + 1);
s2.gotoAndStop(t2 + 1);
s3.gotoAndStop(t3 + 1);
s4.gotoAndStop(t4 + 1);
var _local2 = new Sound();
_local2.attachSound("sound_ok");
_local2.start();
}
function displayLevel() {
l0.gotoAndStop(level + 1);
}
function resetHighlight() {
var _local1 = 0;
while (_local1 < selectArr.length) {
selectArr[_local1].highlight._visible = false;
_local1++;
}
}
function resetSelect() {
chessSelect = true;
selectArr = new Array();
}
function initMc() {
game._x = startX;
game._y = startY;
game = this.createEmptyMovieClip("game", 0);
game.setMask("mask");
var _local4 = 0;
while (_local4 < 8) {
var _local3 = 0;
while (_local3 < 8) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game.attachMovie("tile", _local2, ++D);
game[_local2]._x = startX + (_local3 * tileW);
game[_local2].x = _local3;
game[_local2].goal = startY + (_local4 * tileH);
game[_local2]._y = game[_local2].goal - 500;
game[_local2].y = _local4;
game[_local2].chess.gotoAndStop(map[_local4][_local3]);
game[_local2].gotoAndStop("dropping");
_local3++;
}
_local4++;
}
}
function initMap() {
var _local2 = 0;
while (_local2 < 8) {
map[_local2] = new Array();
var _local1 = 0;
while (_local1 < 8) {
map[_local2][_local1] = 1 + random(7);
_local1++;
}
_local2++;
}
}
function displayMap() {
var _local1 = 0;
while (_local1 < 8) {
_local1++;
}
}
function checkMap() {
result = true;
var _local2 = 0;
while (_local2 < 8) {
var _local1 = 0;
while (_local1 < 8) {
var _local3 = 1;
while ((map[_local2][_local1] == map[_local2 + _local3][_local1]) && ((_local2 + _local3) < 8)) {
_local3++;
}
if (_local3 >= 3) {
map[_local2][_local1] = 1 + random(7);
result = false;
}
_local3 = 1;
while ((map[_local2][_local1] == map[_local2][_local1 + _local3]) && ((_local1 + _local3) < 8)) {
_local3++;
}
if (_local3 >= 3) {
map[_local2][_local1] = 1 + random(7);
result = false;
}
_local1++;
}
_local2++;
}
return(result);
}
function checkVanish() {
result = true;
var _local6 = new Array();
var _local2 = 0;
while (_local2 < 8) {
var _local1 = 0;
while (_local1 < 8) {
var _local3 = new Array();
_local3.push(game[(("t_" + _local2) + "_") + _local1]);
var _local5 = 1;
while ((((!map[_local2][_local1]) == 0) && (map[_local2][_local1] == map[_local2 + _local5][_local1])) && ((_local2 + _local5) < 8)) {
_local3.push(game[(("t_" + (_local2 + _local5)) + "_") + _local1]);
_local5++;
}
if (_local5 >= 3) {
var _local8 = (5 + (level * 5)) * ((_local3.length - 2) + droppedNum);
score = score + _local8;
droppedNum++;
displayScore();
D++;
game.attachMovie("scoreMc", "scoreMc" + D, D);
game["scoreMc" + D]._x = _local3[Math.floor(_local3.length / 2)]._x;
game["scoreMc" + D]._y = _local3[Math.floor(_local3.length / 2)]._y;
displayMcScore(game["scoreMc" + D], _local8);
time = time + (((_local3.length - 2) * timeMultiple) + droppedNum);
var _local7 = 0;
while (_local7 < _local3.length) {
_local6.push(_local3[_local7]);
_local7++;
}
result = false;
}
_local3 = new Array();
_local3.push(game[(("t_" + _local2) + "_") + _local1]);
_local5 = 1;
while ((((!map[_local2][_local1]) == 0) && (map[_local2][_local1] == map[_local2][_local1 + _local5])) && ((_local1 + _local5) < 8)) {
_local3.push(game[(("t_" + _local2) + "_") + (_local1 + _local5)]);
_local5++;
}
if (_local5 >= 3) {
var _local8 = (5 + (level * 5)) * ((_local3.length - 2) + droppedNum);
score = score + _local8;
droppedNum++;
displayScore();
D++;
game.attachMovie("scoreMc", "scoreMc" + D, D);
game["scoreMc" + D]._x = _local3[Math.floor(_local3.length / 2)]._x;
game["scoreMc" + D]._y = _local3[Math.floor(_local3.length / 2)]._y;
displayMcScore(game["scoreMc" + D], _local8);
time = time + (((_local3.length - 2) * timeMultiple) + droppedNum);
var _local7 = 0;
while (_local7 < _local3.length) {
_local6.push(_local3[_local7]);
_local7++;
}
result = false;
}
var _local4 = 0;
while (_local4 < _local6.length) {
_local6[_local4].gotoAndPlay("vanish");
map[_local6[_local4].y][_local6[_local4].x] = 0;
_local4++;
}
_local1++;
}
_local2++;
}
return(result);
}
function swapValue(src, tag) {
var _local1 = src;
src = tag;
tag = _local1;
}
function checkMatch(i, j) {
result = false;
var _local6 = new Array();
var _local3 = new Array();
_local6.push(game[(("t_" + i) + "_") + j]);
var _local5 = 1;
while ((map[i][j] == map[i + _local5][j]) && ((i + _local5) < 8)) {
_local6.push(game[(("t_" + (i + _local5)) + "_") + j]);
_local5++;
}
var _local4 = 1;
while ((map[i][j] == map[i - _local4][j]) && ((i - _local4) >= 0)) {
_local6.push(game[(("t_" + (i - _local4)) + "_") + j]);
_local4++;
}
if (_local6.length >= 3) {
var _local8 = (5 + (level * 5)) * ((_local6.length - 2) + droppedNum);
score = score + _local8;
droppedNum++;
displayScore();
D++;
game.attachMovie("scoreMc", "scoreMc" + D, D);
game["scoreMc" + D]._x = _local6[Math.floor(_local6.length / 2)]._x;
game["scoreMc" + D]._y = _local6[Math.floor(_local6.length / 2)]._y;
displayMcScore(game["scoreMc" + D], _local8);
time = time + (((_local6.length - 2) * timeMultiple) + droppedNum);
var _local7 = 0;
while (_local7 < _local6.length) {
_local3.push(_local6[_local7]);
_local7++;
}
result = true;
}
_local6 = new Array();
_local6.push(game[(("t_" + i) + "_") + j]);
_local5 = 1;
while ((map[i][j] == map[i][j + _local5]) && ((j + _local5) < 8)) {
_local6.push(game[(("t_" + i) + "_") + (j + _local5)]);
_local5++;
}
_local4 = 1;
while ((map[i][j] == map[i][j - _local4]) && ((j - _local4) >= 0)) {
_local6.push(game[(("t_" + i) + "_") + (j - _local4)]);
_local4++;
}
if (_local6.length >= 3) {
var _local8 = (5 + (level * 5)) * ((_local6.length - 2) + droppedNum);
score = score + _local8;
droppedNum++;
displayScore();
D++;
game.attachMovie("scoreMc", "scoreMc" + D, D);
game["scoreMc" + D]._x = _local6[Math.floor(_local6.length / 2)]._x;
game["scoreMc" + D]._y = _local6[Math.floor(_local6.length / 2)]._y;
displayMcScore(game["scoreMc" + D], _local8);
time = time + (((_local6.length - 2) * timeMultiple) + droppedNum);
var _local7 = 0;
while (_local7 < _local6.length) {
_local3.push(_local6[_local7]);
_local7++;
}
result = true;
}
i = 0;
while (i < _local3.length) {
_local3[i].gotoAndPlay("vanish");
map[_local3[i].y][_local3[i].x] = 0;
i++;
}
if (!result) {
resetHighlight();
}
return(result);
}
function displayMcScore(scoreMc, score) {
var _local1 = (t1 = (t2 = 0));
_local1 = int(score / 100);
t1 = int((score - (_local1 * 100)) / 10);
t2 = (score - (_local1 * 100)) - (t1 * 10);
scoreMc.mc.s0.gotoAndStop(_local1 + 1);
if (_local1 == 0) {
scoreMc.mc.s0._visible = false;
} else {
scoreMc.mc.s0._visible = true;
}
scoreMc.mc.s1.gotoAndStop(t1 + 1);
scoreMc.mc.s2.gotoAndStop(t2 + 1);
}
function dropTile() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < 8) {
var _local4 = 0;
while (_local4 < 8) {
if (map[_local4][_local2] == 0) {
var _local1 = _local4;
while (_local1 >= 0) {
if (_local1 == 0) {
if (game[(("t_" + _local1) + "_") + _local2] != undefined) {
game[(("t_" + _local1) + "_") + _local2]._name = (("t_" + (_local1 + 1)) + "_") + _local2;
game[(("t_" + (_local1 + 1)) + "_") + _local2].goal = startY + ((_local1 + 1) * tileH);
game[(("t_" + (_local1 + 1)) + "_") + _local2].y = _local1 + 1;
_local3.push(game[(("t_" + (_local1 + 1)) + "_") + _local2]);
}
map[_local1][_local2] = 1 + random(7);
game.attachMovie("tile", (("t_" + _local1) + "_") + _local2, ++D);
game[(("t_" + _local1) + "_") + _local2].chess.gotoAndStop(map[_local1][_local2]);
game[(("t_" + _local1) + "_") + _local2]._x = startX + (_local2 * tileW);
game[(("t_" + _local1) + "_") + _local2].x = _local2;
game[(("t_" + _local1) + "_") + _local2].y = _local1;
if (_local4 == 0) {
game[(("t_" + _local1) + "_") + _local2]._y = startY - tileH;
} else {
game[(("t_" + _local1) + "_") + _local2]._y = game[(("t_" + (_local1 + 1)) + "_") + _local2]._y - tileH;
}
game[(("t_" + _local1) + "_") + _local2].goal = startY + (_local1 * tileH);
_local3.push(game[(("t_" + _local1) + "_") + _local2]);
} else {
game[(("t_" + _local1) + "_") + _local2]._name = (("t_" + (_local1 + 1)) + "_") + _local2;
game[(("t_" + (_local1 + 1)) + "_") + _local2].goal = startY + ((_local1 + 1) * tileH);
game[(("t_" + (_local1 + 1)) + "_") + _local2].y = _local1 + 1;
_local3.push(game[(("t_" + (_local1 + 1)) + "_") + _local2]);
map[_local1][_local2] = map[_local1 - 1][_local2];
}
_local1--;
}
}
_local4++;
}
_local2++;
}
var _local4 = 0;
while (_local4 < _local3.length) {
_local3[_local4].gotoAndPlay("dropping");
_local4++;
}
droppingTile = false;
}
function hint() {
var _local2 = 0;
while (_local2 < 8) {
var _local1 = 0;
while (_local1 < 8) {
if ((map[_local2][_local1] == map[_local2 + 2][_local1]) && ((_local2 + 2) < 8)) {
if ((map[_local2][_local1] == map[_local2 + 1][_local1 + 1]) && ((_local1 + 1) < 8)) {
return([_local2 + 1, _local1 + 1]);
}
if ((map[_local2][_local1] == map[_local2 + 1][_local1 - 1]) && ((_local1 - 1) > 8)) {
return([_local2 + 1, _local1 - 1]);
}
}
if ((map[_local2][_local1] == map[_local2][_local1 + 2]) && ((_local1 + 2) < 8)) {
if ((map[_local2][_local1] == map[_local2 + 1][_local1 + 1]) && ((_local2 + 1) < 8)) {
return([_local2 + 1, _local1 + 1]);
}
if ((map[_local2][_local1] == map[_local2 - 1][_local1 + 1]) && ((_local2 - 1) > 0)) {
return([_local2 - 1, _local1 + 1]);
}
}
if (map[_local2][_local1] == map[_local2][_local1 + 1]) {
if (map[_local2][_local1] == map[_local2][_local1 + 3]) {
return([_local2, _local1 + 3]);
}
if (map[_local2][_local1] == map[_local2 + 1][_local1 + 2]) {
return([_local2 + 1, _local1 + 2]);
}
if (map[_local2][_local1] == map[_local2 - 1][_local1 + 2]) {
return([_local2 - 1, _local1 + 2]);
}
if (map[_local2][_local1] == map[_local2][_local1 - 2]) {
return([_local2, _local1 - 2]);
}
if (map[_local2][_local1] == map[_local2 + 1][_local1 - 1]) {
return([_local2 + 1, _local1 - 1]);
}
if (map[_local2][_local1] == map[_local2 - 1][_local1 - 1]) {
return([_local2 - 1, _local1 - 1]);
}
}
if (map[_local2][_local1] == map[_local2 + 1][_local1]) {
if (map[_local2][_local1] == map[_local2 + 3][_local1]) {
return([_local2 + 3, _local1]);
}
if (map[_local2][_local1] == map[_local2 + 2][_local1 + 1]) {
return([_local2 + 2, _local1 + 1]);
}
if (map[_local2][_local1] == map[_local2 + 2][_local1 - 1]) {
return([_local2 + 2, _local1 - 1]);
}
if (map[_local2][_local1] == map[_local2 - 2][_local1]) {
return([_local2 - 2, _local1]);
}
if (map[_local2][_local1] == map[_local2 - 1][_local1 + 1]) {
return([_local2 - 1, _local1 + 1]);
}
if (map[_local2][_local1] == map[_local2 - 1][_local1 - 1]) {
return([_local2 - 1, _local1 - 1]);
}
}
_local1++;
}
_local2++;
}
return(null);
}
function removeHint() {
hintMc.removeMovieClip();
}
function displayTime() {
time = time - (level * 0.05);
if (time < 0) {
gamePlay = false;
timeBar._width = 0;
popMsg("replay");
var _local1 = new Sound();
_local1.attachSound("sound_lose");
_local1.start();
}
if (time > 200) {
timeBar._width = 200;
} else {
timeBar._width = time;
}
if (time > fullTime) {
gamePlay = false;
destroyGame();
level++;
displayLevel();
var _local2 = "level" + level;
if (level <= 5) {
popMsg(_local2);
} else {
level = level - 1;
displayLevel();
popMsg("win");
}
}
}
function popMsg(frame) {
this.attachMovie("msg", "msg", 100);
msg._x = 210;
msg._y = 277;
msg.gotoAndPlay(frame);
}
function backGame() {
test.removeMovieClip();
timeBar.removeMovieClip();
timeBar_mask.removeMovieClip();
s0.removeMovieClip();
s1.removeMovieClip();
s2.removeMovieClip();
s3.removeMovieClip();
s4.removeMovieClip();
l0.removeMovieClip();
}
stop();
timeBar.setMask("timeBar_mask");
_root.onEnterFrame = function () {
if (gamePlay) {
displayTime();
}
if (droppingTile) {
dropTile();
}
};
initVar();
popMsg("level1");
stop();
this.onMouseDown = function () {
if (gamePlay && (chessSelect)) {
if (selectArr.length == 0) {
mousePress = true;
mouseXold = this._xmouse;
mouseYold = this._ymouse;
mouseX = Math.floor(((this._xmouse - startX) / tileW) + 0.5);
mouseY = Math.floor(((this._ymouse - startY) / tileH) + 0.5);
if (game[(("t_" + mouseY) + "_") + mouseX] != null) {
selectArr.push(game[(("t_" + mouseY) + "_") + mouseX]);
game[(("t_" + mouseY) + "_") + mouseX].highlight._visible = true;
}
}
}
};
this.onMouseMove = function () {
if (gamePlay && (chessSelect)) {
if ((selectArr.length == 1) && (mousePress)) {
if (this._xmouse > (mouseXold + 20)) {
selectArr.push(game[(("t_" + mouseY) + "_") + (mouseX + 1)]);
game[(("t_" + mouseY) + "_") + (mouseX + 1)].highlight._visible = true;
} else if (this._xmouse < (mouseXold - 20)) {
selectArr.push(game[(("t_" + mouseY) + "_") + (mouseX - 1)]);
game[(("t_" + mouseY) + "_") + (mouseX - 1)].highlight._visible = true;
} else if (this._ymouse > (mouseYold + 20)) {
selectArr.push(game[(("t_" + (mouseY + 1)) + "_") + mouseX]);
game[(("t_" + (mouseY + 1)) + "_") + mouseX].highlight._visible = true;
} else if (this._ymouse < (mouseYold - 20)) {
selectArr.push(game[(("t_" + (mouseY - 1)) + "_") + mouseX]);
game[(("t_" + (mouseY - 1)) + "_") + mouseX].highlight._visible = true;
}
if (selectArr.length == 2) {
swapControl.play();
chessSelect = false;
}
}
}
};
this.onMouseUp = function () {
mousePress = false;
};
Instance of Symbol 17 MovieClip "s0" in Frame 23
onClipEvent (load) {
this.swapDepths(11);
}
Instance of Symbol 17 MovieClip "s1" in Frame 23
onClipEvent (load) {
this.swapDepths(12);
}
Instance of Symbol 17 MovieClip "s2" in Frame 23
onClipEvent (load) {
this.swapDepths(13);
}
Instance of Symbol 17 MovieClip "s3" in Frame 23
onClipEvent (load) {
this.swapDepths(14);
}
Instance of Symbol 17 MovieClip "s4" in Frame 23
onClipEvent (load) {
this.swapDepths(15);
}
Instance of Symbol 17 MovieClip "l0" in Frame 23
onClipEvent (load) {
this.swapDepths(16);
}
Instance of Symbol 238 MovieClip "timeBar" in Frame 23
onClipEvent (load) {
this.swapDepths(99999);
}
Instance of Symbol 238 MovieClip "timeBar_mask" in Frame 23
onClipEvent (load) {
this.swapDepths(99999);
}
Instance of Symbol 250 MovieClip "test" in Frame 23
onClipEvent (load) {
this.swapDepths(88888);
}
Symbol 19 MovieClip [scoreMc] Frame 20
removeMovieClip(this);
Symbol 37 Button
on (release) {
_parent.newGame();
removeMovieClip(this);
}
Symbol 40 Button
on (release) {
_parent.gamePlay = true;
removeMovieClip(this);
}
Symbol 41 MovieClip [msg] Frame 29
_parent.newGame();
removeMovieClip(this);
Symbol 41 MovieClip [msg] Frame 59
_parent.upgrade();
removeMovieClip(this);
Symbol 41 MovieClip [msg] Frame 89
_parent.upgrade();
removeMovieClip(this);
Symbol 41 MovieClip [msg] Frame 120
_parent.upgrade();
removeMovieClip(this);
Symbol 41 MovieClip [msg] Frame 151
_parent.upgrade();
removeMovieClip(this);
Symbol 41 MovieClip [msg] Frame 161
stop();
Symbol 41 MovieClip [msg] Frame 175
stop();
Symbol 41 MovieClip [msg] Frame 188
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 9
gotoAndPlay (2);
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 9
gotoAndPlay (2);
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 9
gotoAndPlay (2);
Symbol 68 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 9
gotoAndPlay (2);
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 9
gotoAndPlay (2);
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 9
gotoAndPlay (2);
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 17
gotoAndPlay (2);
Symbol 92 Button
on (press) {
if (_parent._parent.chessSelect) {
_parent._parent.droppedNum = 0;
if (_parent._parent.selectArr.length == 0) {
this.highlight._visible = true;
_parent._parent.selectArr.push(this);
} else if (_parent._parent.selectArr.length == 1) {
if ((Math.abs(this.x - _parent._parent.selectArr[0].x) + Math.abs(this.y - _parent._parent.selectArr[0].y)) == 1) {
this.highlight._visible = true;
_parent._parent.selectArr.push(this);
} else {
_parent._parent.selectArr[0].highlight._visible = false;
_parent._parent.selectArr = new Array();
this.highlight._visible = true;
_parent._parent.selectArr.push(this);
}
if (_parent._parent.selectArr.length == 2) {
_parent._parent.swapControl.play();
_parent._parent.chessSelect = false;
}
}
}
}
on (rollOver) {
chess.chesssub.gotoAndPlay(2);
}
on (rollOut, dragOut, releaseOutside) {
chess.chesssub.gotoAndStop(1);
}
Symbol 93 MovieClip [tile] Frame 1
highlight._visible = false;
btn.useHandCursor = false;
stop();
Symbol 93 MovieClip [tile] Frame 5
step = 5;
s = 3;
Symbol 93 MovieClip [tile] Frame 6
this._width = (this._width * s) / step;
this._height = (this._height * s) / step;
Symbol 93 MovieClip [tile] Frame 7
if (s > 0) {
s--;
gotoAndPlay (6);
} else {
_parent._parent.droppingTile = true;
this.removeMovieClip();
}
Symbol 93 MovieClip [tile] Frame 10
v = 0;
_parent._parent.droppingNum = _parent._parent.droppingNum + 1;
gotoAndPlay (11);
Symbol 93 MovieClip [tile] Frame 11
if (this._y < this.goal) {
v = v + _parent._parent.acceleration;
this._y = this._y + v;
if (this._y >= this.goal) {
this._y = this.goal;
}
} else if (this._y >= this.goal) {
this._y = this.goal;
_parent._parent.droppingNum = _parent._parent.droppingNum - 1;
if (_parent._parent.droppingNum == 0) {
_parent._parent.mccheckVanish.play();
}
gotoAndStop (1);
}
Symbol 93 MovieClip [tile] Frame 12
gotoAndPlay (11);
Symbol 99 Button
on (release) {
fscommand ("quit");
}
Symbol 127 MovieClip Frame 17
stop();
Symbol 170 MovieClip Frame 147
stop();
_root.play();
Symbol 175 MovieClip Frame 10
stop();
Symbol 176 MovieClip Frame 100
stop();
_root.gotoAndPlay("start");
Symbol 186 Button
on (release) {
_root.gotoAndPlay("playgame");
}
Symbol 189 Button
on (release) {
nextFrame();
}
Symbol 192 MovieClip Frame 1
stop();
Symbol 216 Button
on (release) {
_root.prevFrame();
}
Symbol 219 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 1
up.onRelease = function () {
help_text.prevFrame();
};
down.onRelease = function () {
help_text.nextFrame();
};
help_text.onEnterFrame = function () {
var _local2 = int((help_bar._y - 90) / 7) + 10;
if (_local2 != oframe) {
this.gotoAndStop(_local2);
oframe = _local2;
}
};
Instance of Symbol 227 MovieClip "help_bar" in Symbol 228 MovieClip Frame 1
on (press, release) {
startDrag (this, false, 3, 20, 3, 90);
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 232 Button
on (release) {
_root.prevFrame();
}
Symbol 242 Button
on (release) {
_parent.sound_bg.setVolume(0);
gotoAndStop (2);
}
Symbol 244 Button
on (release) {
_parent.sound_bg.setVolume(50);
gotoAndStop (1);
}
Symbol 245 MovieClip Frame 1
stop();
Symbol 247 Button
on (release) {
if (gamePlay) {
gamePlay = false;
popMsg("pause");
}
}
Symbol 248 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 5
if (_parent.checkVanish()) {
_parent.resetSelect();
if (_parent.hint() == null) {
_parent.destroyGame();
_parent.initTile();
}
}
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 2
step = 5;
s = 0;
srcMc = _parent.selectArr[0];
tagMc = _parent.selectArr[1];
temp = _parent.map[srcMc.y][srcMc.x];
_parent.map[srcMc.y][srcMc.x] = _parent.map[tagMc.y][tagMc.x];
_parent.map[tagMc.y][tagMc.x] = temp;
srcX = srcMc._x;
srcY = srcMc._y;
tagX = tagMc._x;
tagY = tagMc._y;
Symbol 251 MovieClip Frame 3
srcMc._x = srcX + (((tagX - srcX) * s) / step);
srcMc._y = srcY + (((tagY - srcY) * s) / step);
tagMc._x = tagX + (((srcX - tagX) * s) / step);
tagMc._y = tagY + (((srcY - tagY) * s) / step);
if (s == step) {
tempStr = srcMc._name;
tempx = srcMc.x;
tempy = srcMc.y;
srcMc._name = tagMc._name;
srcMc.x = tagMc.x;
srcMc.y = tagMc.y;
tagMc._name = tempStr;
tagMc.x = tempx;
tagMc.y = tempy;
}
Symbol 251 MovieClip Frame 4
if (s < step) {
s = s + 1;
gotoAndPlay (3);
} else if ((_parent.checkMatch(srcMc.y, srcMc.x) ? (_parent.checkMatch(tagMc.y, tagMc.x) || true) : (_parent.checkMatch(tagMc.y, tagMc.x)))) {
gotoAndStop (1);
} else {
s = s - 1;
play();
}
Symbol 251 MovieClip Frame 5
srcMc._x = srcX + (((tagX - srcX) * s) / step);
srcMc._y = srcY + (((tagY - srcY) * s) / step);
tagMc._x = tagX + (((srcX - tagX) * s) / step);
tagMc._y = tagY + (((srcY - tagY) * s) / step);
if (s == 0) {
tempStr = srcMc._name;
tempx = srcMc.x;
tempy = srcMc.y;
srcMc._name = tagMc._name;
srcMc.x = tagMc.x;
srcMc.y = tagMc.y;
tagMc._name = tempStr;
tagMc.x = tempx;
tagMc.y = tempy;
}
Symbol 251 MovieClip Frame 6
if (s > 0) {
s = s - 1;
gotoAndPlay (5);
} else {
temp = _parent.map[srcMc.y][srcMc.x];
_parent.map[srcMc.y][srcMc.x] = _parent.map[tagMc.y][tagMc.x];
_parent.map[tagMc.y][tagMc.x] = temp;
_parent.displayMap();
_parent.resetHighlight();
_parent.resetSelect();
gotoAndStop (1);
}
Symbol 252 Button
on (release) {
destroyGame();
backGame();
msg.removeMovieClip();
_root.gotoAndStop("begin");
}