Frame 2
System.useCodepage = true;
with (Stage) {
showMenu = false;
scaleMode = "noScale";
}
sndChk = true;
var snd_ary = ["click1_snd", "click2_snd", "moveFail_snd", "reach_snd", "swind_snd", "wind_snd", "repos_snd", "bonus1_snd", "bonus2_snd", "bonus3_snd", "bonus4_snd", "bonus5_snd", "around_snd", "sameBlock_snd", "oneLine_snd", "time_snd", "item_snd", "hint_snd", "error_snd", "successBg_snd", "failBg_snd", "successEffect_snd", "failEffect_snd", "bg_snd", "intro_snd", "moveEffect_snd", "fallAllBlock_snd", "addTime_snd", "bonusScore_snd"];
var i = 0;
while (i < snd_ary.length) {
var snd_str = snd_ary[i];
this[snd_str] = new Sound(this);
this[snd_str].attachSound(snd_str);
i++;
}
init = function () {
_quality = "medium";
_global.owner = this;
blockNum = 8;
typeNumAry = [6, 7, 7, 7, 7, 8, 8, 8, 8, 8];
moveRatio = 0.65;
g = 4;
timeLimitNum = 10;
timeVal = 50;
timeAry = [120, 120, 100, 90, 90, 90, 85, 85, 80, 80];
goalAry = [20, 25, 30, 35, 40, 45, 50, 55, 58, 60];
itemAry = new Array();
itemAry[0] = ["s", "s", "a"];
itemAry[1] = ["s", "s", "a", "a"];
itemAry[2] = ["s", "s", "a", "a", "a", "e"];
itemAry[3] = ["s", "s", "a", "a", "a", "e", "e"];
itemAry[4] = ["s", "s", "a", "a", "a", "o", "e", "e"];
itemAry[5] = ["s", "s", "s", "a", "a", "a", "o", "o", "o", "e", "e", "e"];
itemAry[6] = ["s", "s", "e", "a", "a", "e", "o", "o", "e", "e", "e", "e"];
itemAry[7] = ["s", "e", "e", "a", "a", "e", "o", "e", "e", "e", "e", "e"];
itemAry[8] = ["s", "e", "e", "a", "a", "e", "o", "o", "e", "e", "e", "e"];
itemAry[9] = ["s", "e", "e", "a", "a", "e", "o", "o", "e", "e", "e", "e"];
bh = bMc.b00._height;
bw = bMc.b00._width;
gameStart();
this.createEmptyMovieClip("control", 1);
this.createEmptyMovieClip("exploseMc", 10);
this.createEmptyMovieClip("messageMc", 30);
this.createEmptyMovieClip("flyScoreMc", 50);
this.createEmptyMovieClip("helpMc", 70);
};
gameStart = function () {
_root.gotoAndStop("mainFrame");
level = 1;
score = 0;
addTimeChk = undefined;
goalNum = goalAry[level - 1];
bMc.setMask(blockMaskMc);
uiLevelDispSet();
uiGoalDispSet("init");
preSetStage();
fallAllBlock("start");
snd_stop("successBg_snd");
snd_stop("failBg_snd");
snd_stop("successEffect_snd");
snd_stop("failEffect_snd");
snd_stop("intro_snd");
_quality = "medium";
};
gamePause = function () {
if (mode != "end") {
if (mode != "pause") {
mode = "pause";
clearInterval(time_interval);
pauseTime = getTimer();
uiMc.pauseBtnMc.gotoAndStop(2);
blockBtnControl(false);
with (uiMc) {
pauseBtnMc.enabled = (sndBtnMc.enabled = (hintBtn.enabled = (helpBtn.enabled = false)));
}
nextStageMc._visible = true;
nextStageMc.startBtn.enabled = true;
nextStageMc._alpha = 30;
nextStageMc.gotoAndStop("pauseFrame");
nextStageMc.onEnterFrame = function () {
this._alpha = this._alpha + 10;
if (this._alpha >= 100) {
delete this.onEnterFrame;
}
};
nextStageMc.startBtn.onPress = function () {
_root.gamePause();
snd_attach("click2_snd");
};
} else {
mode = "ready";
var wasteT = (getTimer() - pauseTime);
startTime = startTime + wasteT;
clearInterval(time_interval);
time_interval = setInterval(timeF, timeVal);
uiMc.pauseBtnMc.gotoAndStop(1);
blockBtnControl(true);
with (uiMc) {
pauseBtnMc.enabled = (sndBtnMc.enabled = (hintBtn.enabled = (helpBtn.enabled = true)));
}
nextStageMc._visible = false;
delete nextStageMc.onEnterFrame;
}
}
};
gameOut = function (flag) {
trace(("gameOut (" + flag) + ")");
mode = "end";
clearAllInterval();
var _local3 = 0;
while (_local3 < blockNum) {
var _local2 = 0;
while (_local2 < blockNum) {
bMc[("b" + _local3) + _local2].circle.enabled = false;
var _local1 = bMc[("b" + _local3) + _local2];
_local1.activeRect._visible = false;
_local1.activeRect.stop();
_local1.possibleRect._visible = false;
_local1.possibleRect.stop();
_local2++;
}
_local3++;
}
if (flag == "notSame") {
trace("\uAC19\uC740 \uBE14\uB7ED \uC5C6\uC74C !");
} else if (flag) {
fallAllBlock("end");
} else {
fallAllBlock("timeOut");
}
snd_stop("time_snd");
snd_stop("bg_snd");
};
gameRestart = function () {
gameStart();
};
gameOver = function (flag) {
_quality = "high";
clearInterval(gameOver_interval);
stopAllSounds();
if (flag) {
_root.gotoAndStop("successFrame");
snd_attach("successBg_snd", "loop");
} else {
_root.gotoAndStop("failFrame");
snd_attach("failBg_snd", "loop");
snd_attach("failEffect_snd");
}
};
gameExit = function () {
getURL ("javascript:self.close ()");
};
nextStage = function () {
trace("nextStage");
clearInterval(nextStage_interval);
if (level == 10) {
gameOver(true);
} else {
with (uiMc) {
hintBtn.enabled = (pauseBtnMc.enabled = (sndBtnMc.enabled = (helpBtn.enabled = false)));
levelMc["l" + level].gotoAndStop(3);
}
nextStageMc._visible = true;
nextStageMc._alpha = 100;
nextStageMc.gotoAndStop("nextStageFrame");
nextStageMc.chaMc._y = nextStageMc.chaMc.iy - 150;
nextStageMc.chaMc._alpha = 10;
var wasteTime = ((getTimer() - startTime) / 1000);
var sT_ref = Math.floor(wasteTime);
var mT = Math.floor(sT_ref / 60);
var s2T = Math.floor((wasteTime - sT_ref) * 100);
var sT = (sT_ref % 60);
var mTStr = ((String(mT).length == 1) ? ("0" + mT) : (mT));
var sTStr = ((String(sT).length == 1) ? ("0" + sT) : (sT));
var s2TStr = ((String(s2T).length == 1) ? ("0" + s2T) : (s2T));
nextStageMc.chaMc.timeStrTxt.text = (((mTStr + ":") + sTStr) + ":") + s2TStr;
var bonusScore = Math.ceil((500 / (wasteTime * 0.2)) * level);
nextStageMc.chaMc.bonusScore = bonusScore;
nextStageMc.chaMc.bonusScoreOld = score;
nextStageMc.chaMc.bonusScoreRef = 0;
nextStageMc.chaMc.bonusTxt.text = 0;
snd_attach("bonusScore_snd", "loop");
nextStageMc.chaMc.onEnterFrame = function () {
smoothMove(this, this._x, this.iy, 0.4);
this._alpha = this._alpha + 7;
if ((this._alpha >= 100) && (Math.abs(this._y - this.iy) < 1)) {
var addScore = 5;
this.onEnterFrame = function () {
if ((this.bonusScoreRef + addScore) > this.bonusScore) {
addScore = this.bonusScore - this.bonusScoreRef;
}
this.bonusScoreRef = this.bonusScoreRef + addScore;
score = this.bonusScoreOld + this.bonusScoreRef;
if (this.bonusScoreRef >= this.bonusScore) {
delete this.onEnterFrame;
this.bonusScoreRef = this.bonusScore;
score = this.bonusScoreOld + this.bonusScore;
snd_stop("bonusScore_snd");
}
this.bonusTxt.text = this.bonusScoreRef;
};
this.okBtn.onPress = function () {
delete nextStageMc.chaMc.onEnterFrame;
nextStageMc.chaMc.bonusTxt.text = nextStageMc.chaMc.bonusScore;
score = this._parent.bonusScoreOld + this._parent.bonusScore;
snd_stop("bonusScore_snd");
nextStageAfter();
};
}
};
snd_attach("wind_snd");
}
snd_attach("successEffect_snd");
};
nextStageAfter = function () {
nextStageMc.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this._visible = false;
level++;
preSetStage();
fallAllBlock("start");
}
};
snd_attach("moveEffect_snd");
};
preSetStage = function () {
itemRefAry = itemAry[level - 1].concat();
typeNum = typeNumAry[level - 1];
setBoard();
setBlock();
if (_root.sndChk) {
uiMc.sndBtnMc.gotoAndStop(1);
} else {
uiMc.sndBtnMc.gotoAndStop(2);
}
uiMc.timeBarMc.maskMc._xscale = 100;
uiMc.pauseBtnMc.gotoAndStop(1);
uiMc.levelMc["l" + level].gotoAndStop(2);
};
setStage = function () {
goalNum = goalAry[level - 1];
clickInfo = 0;
clickObj = new Object();
clickObj.fPoint = {mc:null, x:0, y:0};
clickObj.sPoint = {mc:null, x:0, y:0};
viewHintMode = false;
readyBlock();
moreBlockChk();
with (uiMc) {
uiBtnControl(true);
hintBtn.onPress = function () {
owner.viewHint();
snd_attach("click2_snd");
};
addTimeBtn.onPress = function () {
owner.addTimeF();
};
if (owner.addTimeChk) {
addTimeBtn.enabled = false;
addTimeBtn.gotoAndStop(2);
} else {
addTimeBtn.enabled = true;
addTimeBtn.gotoAndStop(1);
}
sndBtnMc.onPress = function () {
_root.sndChk = !_root.sndChk;
if (_root.sndChk) {
sndBtnMc.gotoAndStop(1);
snd_attach("bg_snd", "loop");
} else {
sndBtnMc.gotoAndStop(2);
snd_stop("time_snd");
snd_stop("bg_snd");
}
snd_attach("click2_snd");
};
pauseBtnMc.onPress = function () {
_root.gamePause();
snd_attach("click2_snd");
};
helpBtn.onPress = function () {
_root.viewHelp();
snd_attach("click2_snd");
};
timeBarMc.maskMc._xscale = 100;
}
uiGoalDispSet("init");
timeAlertChk = undefined;
time = timeAry[level - 1];
timeRef = time;
minusTimeNum = (level * 0.01) + 0.05;
pauseTime = undefined;
clearInterval(time_interval);
time_interval = setInterval(timeF, timeVal);
startTime = getTimer();
snd_stop("bg_snd");
snd_stop("time_snd");
snd_attach("bg_snd", "loop");
};
timeF = function () {
wasteTime = getTimer() - startTime;
time = time - minusTimeNum;
if ((!timeAlertChk) && (time < timeLimitNum)) {
timeAlertChk = true;
snd_stop("time_snd");
snd_attach("time_snd", "loop");
}
uiMc.timeBarMc.maskMc._yscale = (time / timeRef) * 100;
if (uiMc.timeBarMc.maskMc._yscale > 100) {
uiMc.timeBarMc.maskMc._yscale = 100;
}
uiMc.timeBarMc.capMc._y = -uiMc.timeBarMc.maskMc._height;
if (time <= 0) {
timeOut();
}
};
timeOut = function () {
trace("\uD0C0\uC784 \uC624\uBC84 !");
clearInterval(time_interval);
uiMc.sTxt.text = "00";
uiMc.s2Txt.text = "00";
uiMc.timeBarMc.maskMc._yscale = 0;
uiMc.timeBarMc.capMc._y = -uiMc.timeBarMc.maskMc._height;
if (goalNum > 0) {
gameOut(false);
} else {
gameOut(true);
}
};
setBoard = function () {
var _local7;
board = new Array();
board_ref = new Array();
var _local2 = 0;
while (_local2 < blockNum) {
board[_local2] = new Array();
board_ref[_local2] = new Array();
var _local1 = 0;
while (_local1 < blockNum) {
if ((_local2 == (blockNum - 1)) && ((_local1 % 2) == 0)) {
} else {
var _local3 = ((!_local7) ? (createBoard()) : (random(typeNum) + 1));
if (typeof(_local3) != "number") {
_local7 = true;
}
var _local6 = 0;
var _local5 = 0;
var _local4 = 0;
if ((_local1 % 2) == 0) {
if (board[_local2][_local1 - 1] == board[_local2 - 1][_local1 - 2]) {
_local6 = board[_local2][_local1 - 1];
}
} else {
if (board[_local2 - 1][_local1 - 1] == board[_local2 - 1][_local1 - 2]) {
_local6 = board[_local2 - 1][_local1 - 1];
}
if ((board[_local2 - 1][_local1 + 1] == board[_local2 - 1][_local1 + 2]) && (_local1 < (blockNum - 2))) {
_local5 = board[_local2 - 1][_local1 + 1];
}
if ((board[_local2][_local1 - 1] == board[_local2 - 1][_local1 + 1]) && (_local1 < (blockNum - 2))) {
_local5 = board[_local2][_local1 - 1];
}
}
if (board[_local2 - 1][_local1] == board[_local2 - 2][_local1]) {
_local4 = board[_local2 - 1][_local1];
}
if (((_local3 == _local6) || (_local3 == _local5)) || (_local3 == _local4)) {
while (((_local3 == _local6) || (_local3 == _local5)) || (_local3 == _local4)) {
_local3 = random(typeNum) + 1;
}
}
board[_local2][_local1] = (((_local2 == (blockNum - 1)) && ((_local1 % 2) == 0)) ? "none" : (_local3));
board_ref[_local2][_local1] = 0;
}
_local1++;
}
_local2++;
}
};
setBlock = function () {
var _local4 = 0;
while (_local4 < blockNum) {
var _local3 = 0;
while (_local3 < blockNum) {
var _local2 = bMc[("b" + _local4) + _local3];
if (typeof(_local2) != "movieclip") {
} else {
if (_local2.iy == undefined) {
_local2.ix = _local2._x;
_local2.iy = _local2._y;
_local2.x = _local3;
_local2.y = _local4;
}
_local2.circle.gotoAndStop(board[_local4][_local3]);
if (board[_local4][_local3] != "s") {
_local2.circle.m.gotoAndStop(1);
}
_local2.code = _local4 + String(_local3);
_local2.circle.onPress = function () {
if (mode == "ready") {
clickBlock(this._parent);
}
};
if (board[_local4][_local3] == "e") {
_local2.circle.enabled = false;
}
_local2.activeRect._visible = false;
_local2.activeRect.stop();
_local2.possibleRect._visible = false;
_local2.possibleRect.stop();
}
_local3++;
}
_local4++;
}
};
createBoard = function () {
var _local2 = 50 - (level * 3);
if (random(_local2) != 0) {
_local2 = random(typeNum) + 1;
} else {
if (itemAryRef.length == 0) {
itemRefAry = itemAry[level - 1].concat();
}
var _local1 = random(itemRefAry.length);
_local2 = itemRefAry[_local1];
itemAryRef.splice(_local1, 1);
}
return(_local2);
};
readyBlock = function () {
mode = "ready";
blockBtnControl(true);
clickObj.fPoint.mc.activeRect._visible = (clickObj.sPoint.mc.activeRect._visible = false);
clickObj.fPoint.mc.activeRect.stop();
clickObj.sPoint.mc.activeRect.stop();
addScoreNum = 0;
if (goalNum <= 0) {
gameOut(true);
} else {
uiMc.hintBtn.enabled = true;
blockBtnControl(true);
}
};
clickBlock = function (block) {
block.activeRect._visible = true;
block.activeRect.play();
if ((((!clickInfo) || (clickInfo == 2)) || (clickInfo == 3)) || (block == clickObj.fPoint.mc)) {
if (typeof(board[block.y][block.x]) != "number") {
mode = "move";
blockBtnControl(false);
clickInfo = 2;
block.activeRect._visible = false;
block.activeRect.stop();
useItem(block);
} else {
clickInfo = 1;
clickObj.fPoint = {mc:block, x:block._x, y:block._y, num:Number(block._name.substr(1))};
snd_attach("click1_snd");
}
} else {
mode = "move";
blockBtnControl(false);
uiMc.hintBtn.enabled = false;
clickObj.sPoint = {mc:block, x:block._x, y:block._y, num:Number(block._name.substr(1))};
if (possibleClick(block) == 2) {
changeBlock();
snd_attach("click2_snd");
} else {
snd_attach("moveFail_snd");
readyBlock();
}
hideHintModeF();
}
};
blockBtnControl = function (flag) {
var _local2 = 0;
while (_local2 < blockNum) {
var _local1 = 0;
while (_local1 < blockNum) {
var _local3 = bMc[("b" + _local2) + _local1];
_local3.circle.enabled = ((flag && (board[_local2][_local1] != "e")) ? true : false);
_local1++;
}
_local2++;
}
};
uiBtnControl = function (flag) {
with (uiMc) {
hintBtn.enabled = (sndBtnMc.enabled = (pauseBtnMc.enabled = (helpBtn.enabled = flag)));
}
};
possibleClick = function (block) {
var _local3 = clickObj.fPoint.num;
var _local5 = clickObj.sPoint.num;
var _local4;
var _local2 = (((_local3 % 2) == 0) ? ([-10, 10, -1, 1, 9, 11]) : ([-10, 10, -11, -9, -1, 1]));
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local5 == (_local3 + _local2[_local1])) {
_local4 = true;
break;
}
_local1++;
}
clickInfo = (_local4 ? 2 : 3);
return(clickInfo);
};
changeBlock = function (reposChk) {
var fMc = clickObj.fPoint.mc;
var sMc = clickObj.sPoint.mc;
fMc.tx = sMc._x;
fMc.ty = sMc._y;
sMc.tx = fMc._x;
sMc.ty = fMc._y;
fMc.onEnterFrame = function () {
smoothMove(this, this.tx, this.ty, moveRatio);
smoothMove(sMc, sMc.tx, sMc.ty, moveRatio);
if ((Math.abs(this.tx - this._x) < 1) && (Math.abs(this.ty - this._y) < 1)) {
var _local4 = board[fMc.y][fMc.x];
board[fMc.y][fMc.x] = board[sMc.y][sMc.x];
board[sMc.y][sMc.x] = _local4;
var _local2 = board[fMc.y][fMc.x];
var _local3 = board[sMc.y][sMc.x];
fMc._x = fMc.ix;
fMc._y = fMc.iy;
fMc.circle.gotoAndStop(_local2);
if (_local2 != "s") {
fMc.circle.m.gotoAndStop(1);
}
sMc._x = sMc.ix;
sMc._y = sMc.iy;
sMc.circle.gotoAndStop(_local3);
if (_local3 != "s") {
sMc.circle.m.gotoAndStop(1);
}
delete this.onEnterFrame;
if (reposChk == undefined) {
if (sameChk()) {
breakBlock();
fMc.activeRect._visible = false;
fMc.activeRect.stop();
sMc.activeRect._visible = false;
sMc.activeRect.stop();
} else {
changeBlock("repos");
snd_attach("repos_snd");
scoreCul(-10);
}
} else {
readyBlock();
}
}
};
};
sameChk = function () {
if ((mode == "end") || (mode == "pause")) {
return(false);
}
var _local3 = 0;
while (_local3 < blockNum) {
var _local1 = 0;
while (_local1 < blockNum) {
board_ref[_local3][_local1] = 0;
_local1++;
}
_local3++;
}
var _local8 = 0;
var _local1 = 0;
while (_local1 < blockNum) {
_local3 = 0;
while (_local3 < (blockNum - 2)) {
if (board[_local3][_local1] == undefined) {
} else {
var _local2 = board[_local3][_local1];
if (((board[_local3 + 1][_local1] == _local2) && (board[_local3 + 2][_local1] == _local2)) && (_local2 != "e")) {
var _local7 = _local3 + 3;
while ((_local7 < blockNum) && (board[_local7][_local1] == _local2)) {
_local7++;
}
var _local6 = _local3;
while (_local6 < _local7) {
board_ref[_local6][_local1] = _local2;
_local6++;
}
_local3 = _local7 - 1;
_local8++;
}
}
_local3++;
}
_local1++;
}
_local3 = 0;
while (_local3 < blockNum) {
_local1 = 0;
while (_local1 < blockNum) {
if (board[_local3][_local1] == undefined) {
} else {
var _local2 = board[_local3][_local1];
if (((board[((((_local1 + 1) % 2) == 0) ? (_local3) : (_local3 + 1))][_local1 + 1] == _local2) && (board[_local3 + 1][_local1 + 2] == _local2)) && (_local2 != "e")) {
_local8++;
var _local7 = _local3 + 1;
var _local4 = _local1 + 3;
while ((_local4 < blockNum) && (board[(((_local4 % 2) == 0) ? (_local7) : (_local7++))][_local4] == _local2)) {
_local4++;
}
_local7 = _local3;
var _local5 = _local1;
while (_local5 < _local4) {
if ((_local5 != _local1) && ((_local5 % 2) == 1)) {
_local7++;
}
board_ref[_local7][_local5] = _local2;
_local5++;
}
}
if (((board[((((_local1 - 1) % 2) == 0) ? (_local3) : (_local3 + 1))][_local1 - 1] == _local2) && (board[_local3 + 1][_local1 - 2] == _local2)) && (_local2 != "e")) {
_local8++;
var _local7 = _local3 + 1;
var _local4 = _local1 - 3;
while ((_local4 >= 0) && (board[(((_local4 % 2) == 0) ? (_local7) : (_local7++))][_local4] == _local2)) {
_local4--;
}
_local7 = _local3;
var _local5 = _local1;
while (_local5 > _local4) {
if ((_local5 != _local1) && ((_local5 % 2) == 1)) {
_local7++;
}
board_ref[_local7][_local5] = _local2;
_local5--;
}
}
}
_local1++;
}
_local3++;
}
return(_local8);
};
breakBlock = function () {
var _local2 = 0;
while (_local2 < blockNum) {
var _local1 = 0;
while (_local1 < blockNum) {
if ((board_ref[_local2][_local1] != 0) && (board[_local2][_local1] != undefined)) {
var _local3 = bMc[("b" + _local2) + _local1];
board[_local2][_local1] = "b";
}
_local1++;
}
_local2++;
}
makeFallBlockOrder();
breakBlockF();
};
makeFallBlockOrder = function () {
breakBlockAry = new Array();
var _local7 = new Array();
var _local10 = 0;
while (_local10 < blockNum) {
_local7[_local10] = [0, 0, 0, 0, 0, 0, 0, 0];
_local10++;
}
var _local1 = 0;
while (_local1 < blockNum) {
var _local4 = 0;
while (_local4 < (blockNum - 2)) {
var _local3 = board_ref[_local4][_local1];
if (((board_ref[_local4 + 1][_local1] == _local3) && (board_ref[_local4 + 2][_local1] == _local3)) && (_local3 != 0)) {
var _local8 = _local4 + 3;
while ((_local8 < blockNum) && (board_ref[_local8][_local1] == _local3)) {
_local8++;
}
var _local9 = new Array();
var _local5 = _local4;
while (_local5 < _local8) {
if ((_local7[_local5][_local1] == 0) && (bMc[("b" + _local5) + _local1])) {
_local9.push(bMc[("b" + _local5) + _local1]);
}
_local7[_local5][_local1] = _local3;
_local5++;
}
if (_local9.length > 0) {
breakBlockAry.push(_local9);
}
_local4 = _local8 - 1;
}
_local4++;
}
_local1++;
}
var _local4 = 0;
while (_local4 < blockNum) {
_local1 = 0;
while (_local1 < blockNum) {
var _local3 = board_ref[_local4][_local1];
if (((board_ref[((((_local1 + 1) % 2) == 0) ? (_local4) : (_local4 + 1))][_local1 + 1] == _local3) && (board_ref[_local4 + 1][_local1 + 2] == _local3)) && (_local3 != 0)) {
var _local8 = _local4 + 1;
var _local6 = _local1 + 3;
while ((_local6 < blockNum) && (board_ref[(((_local6 % 2) == 0) ? (_local8) : (_local8++))][_local6] == _local3)) {
_local6++;
}
var _local9 = new Array();
_local8 = _local4;
var _local2 = _local1;
while (_local2 < _local6) {
if ((_local2 != _local1) && ((_local2 % 2) == 1)) {
_local8++;
}
if ((_local7[_local8][_local2] == 0) && (bMc[("b" + _local8) + _local2])) {
_local9.push(bMc[("b" + _local8) + _local2]);
}
_local7[_local8][_local2] = _local3;
_local2++;
}
if (_local9.length > 0) {
breakBlockAry.push(_local9);
}
}
if (((board_ref[((((_local1 - 1) % 2) == 0) ? (_local4) : (_local4 + 1))][_local1 - 1] == _local3) && (board_ref[_local4 + 1][_local1 - 2] == _local3)) && (_local3 != 0)) {
var _local8 = _local4 + 1;
var _local6 = _local1 - 3;
while ((_local6 >= 0) && (board_ref[(((_local6 % 2) == 0) ? (_local8) : (_local8++))][_local6] == _local3)) {
_local6--;
}
var _local9 = new Array();
_local8 = _local4;
var _local2 = _local1;
while (_local2 > _local6) {
if ((_local2 != _local1) && ((_local2 % 2) == 1)) {
_local8++;
}
if ((_local7[_local8][_local2] == 0) && (bMc[("b" + _local8) + _local2])) {
_local9.push(bMc[("b" + _local8) + _local2]);
}
_local7[_local8][_local2] = _local3;
_local2--;
}
if (_local9.length > 0) {
breakBlockAry.push(_local9);
}
}
_local1++;
}
_local4++;
}
};
breakBlockF = function () {
clearInterval(breakBlock_interval);
if (breakBlockAry.length == 0) {
fallBlock();
return(undefined);
}
var i = 0;
while (i < breakBlockAry.length) {
var ary = breakBlockAry[i];
var b = ary.shift();
exploseBlock(b);
if (ary.length == 0) {
breakBlockAry.splice(i, 1);
i--;
if (addScoreNum > 0) {
scoreCul(10 * addScoreNum, b);
if (addScoreNum <= 5) {
if (!eval (("bouns" + addScoreNum) + "SndChk")) {
snd_attach(("bonus" + addScoreNum) + "_snd");
owner[("bonus" + addScoreNum) + "SndChk"].onSoundComplete = function () {
owner[("bonus" + addScoreNum) + "SndChk"] = undefined;
};
}
} else {
if (!bonus5SndChk) {
snd_attach("bonus5_snd");
bonus5_snd.onSoundComplete = function () {
bonus5SndChk = undefined;
};
}
snd_attach("bonus5_snd");
}
}
if (goalNum > 0) {
goalNum--;
}
successSameBlock();
}
i++;
}
breakBlock_interval = setInterval(breakBlockF, 100);
};
fallBlock = function () {
clearInterval(fallBlock_interval);
var _local7 = 0;
while (_local7 < blockNum) {
var _local3 = blockNum - 1;
while (_local3 >= 0) {
if (board[_local3][_local7] == "b") {
var _local2 = _local3;
while (_local2 >= 0) {
if (_local2 > 0) {
board[_local2][_local7] = board[_local2 - 1][_local7];
} else {
board[_local2][_local7] = createBoard();
}
bMc[("b" + _local2) + _local7]._y = bMc[("b" + _local2) + _local7]._y - bh;
_local2--;
}
_local3++;
}
_local3--;
}
_local7++;
}
setBlockStat();
fallAry = new Array();
_local7 = 0;
while (_local7 < blockNum) {
var _local6 = 0;
var _local3 = blockNum - 1;
while (_local3 >= 0) {
var _local4 = bMc[("b" + _local3) + _local7];
if (_local4._y != _local4.iy) {
fallAry.push(_local4);
_local4.activeRect._visible = false;
_local4.activeRect.stop();
_local4.moveVal = _local6;
_local6 = _local6 - 4.5;
}
_local3--;
}
_local7++;
}
control.onEnterFrame = function () {
var _local3 = 0;
while (_local3 < fallAry.length) {
var _local2 = fallAry[_local3];
_local2._y = _local2._y + _local2.moveVal;
_local2.moveVal = _local2.moveVal + g;
if (_local2._y >= _local2.iy) {
_local2._y = _local2.iy;
fallAry.splice(_local3, 1);
if (fallAry.length == 0) {
delete this.onEnterFrame;
fallBlockAfter();
} else {
_local3--;
}
if (!reachSndChk) {
reachSndChk = true;
snd_attach("reach_snd");
reach_snd.onSoundComplete = function () {
reachSndChk = undefined;
};
}
}
_local3++;
}
};
};
fallBlockAfter = function () {
if ((mode == "end") || (mode == "pause")) {
return(false);
}
if (sameChk()) {
breakBlock();
} else {
moreBlockChk();
readyBlock();
}
};
fallAllBlock = function (stat) {
fallBlockNum = 0;
if (stat != "end") {
var x = 0;
while (x < blockNum) {
var addy = 10;
var _local3 = blockNum - 1;
while (_local3 >= 0) {
var _local2 = bMc[("b" + _local3) + x];
if (typeof(_local2) != "movieclip") {
} else {
if ((stat == "timeOut") || (stat == "notSame")) {
_local2.ty = _local2.iy + 500;
} else {
_local2.ty = _local2.iy;
_local2._y = _local2.iy - 350;
}
_local2.addy = addy;
_local2.onEnterFrame = function () {
if (this.addy > 0) {
this._y = this._y + this.addy;
}
this.addy = this.addy + 4;
if (this._y >= this.ty) {
this._y = this.ty;
delete this.onEnterFrame;
fallBlockNum++;
if (this.x == 0) {
reachSndChk = true;
snd_attach("reach_snd");
reach_snd.onSoundComplete = function () {
reachSndChk = undefined;
};
}
if (fallBlockNum >= ((blockNum * blockNum) - 4)) {
if ((stat == "end") || (stat == "notSame")) {
if (stat == "notSame") {
dispMessage("notSame");
}
nextStage();
} else if (stat == "start") {
setStage();
} else if (stat == "timeOut") {
gameOver(false);
}
}
}
};
addy = addy - 7;
}
_local3--;
}
x++;
}
} else {
fallAllBlockNum = 0;
clearInterval(fallAllBlock_interval);
fallAllBlock_interval = setInterval(fallAllBlockAfter, 100);
snd_attach("fallAllBlock_snd");
}
snd_attach("wind_snd");
};
fallAllBlockAfter = function () {
var _local2 = 0;
while (_local2 < blockNum) {
var _local1 = bMc[("b" + fallAllBlockNum) + _local2];
if (typeof(_local1) == "movieclip") {
if (typeof(board[_local1.y][_local1.x]) != "number") {
_local1.circle.gotoAndStop(1);
}
exploseBlock(_local1, "noScore");
}
_local2++;
}
fallAllBlockNum++;
if (fallAllBlockNum == blockNum) {
clearInterval(fallAllBlock_interval);
nextStage();
}
};
moreBlockChk = function () {
hintAry = new Array();
possibleBreakNum = 0;
var _local8 = 0;
while (_local8 < blockNum) {
var _local9 = 0;
while (_local9 < blockNum) {
if (board[_local8][_local9] == "e") {
} else {
var _local5;
if ((_local9 % 2) == 1) {
var _local6 = [-1, 0, 1, 1, 0, -1];
var _local7 = [-1, -1, -1, 0, 1, 0];
} else {
var _local6 = [-1, 0, 1, 1, 0, -1];
var _local7 = [0, -1, 0, 1, 1, 1];
}
var _local1 = 0;
while (_local1 < 6) {
var _local2 = _local9 + _local6[_local1];
var _local3 = _local8 + _local7[_local1];
if (!bMc[("b" + _local3) + _local2]) {
} else if (preSameChk(_local3, _local2, board[_local8][_local9], _local8, _local9)) {
_local5 = true;
var _local4 = {x:_local9, y:_local8};
hintAry.push(_local4);
break;
}
_local1++;
}
if (_local5) {
possibleBreakNum++;
}
}
_local9++;
}
_local8++;
}
if (((possibleBreakNum == 0) && (mode != "end")) && (mode != "pause")) {
fallAllBlock("notSame");
}
};
preSameChk = function (ny, nx, fNum, oy, ox) {
var _local4 = board.concat();
var _local13 = _local4[ny].concat();
var _local12 = _local13[nx];
if (_local12 == "e") {
return(false);
}
if (_local12) {
_local13[nx] = fNum;
_local4.splice(ny, 1, _local13);
var _local14 = _local4[oy].concat();
_local14[ox] = _local12;
_local4.splice(oy, 1, _local14);
} else {
return(false);
}
var _local10 = [nx - 2, nx - 1, nx];
var _local11 = (((nx % 2) == 1) ? ([ny - 1, ny - 1, ny]) : ([ny - 1, ny, ny]));
var _local6 = 0;
while (_local6 < 3) {
var _local7 = 0;
var _local1 = _local10[_local6];
var _local3 = _local11[_local6];
if (board[_local3][_local1] == undefined) {
} else {
var _local2 = 1;
while (_local2 <= 3) {
if ((_local2 != 1) && ((_local1 % 2) == 1)) {
_local3++;
}
if (board[_local3][_local1] == undefined) {
break;
}
if (fNum == _local4[_local3][_local1]) {
_local7++;
} else {
break;
}
_local1++;
_local2++;
}
if (_local7 >= 3) {
return(true);
}
}
_local6++;
}
_local10 = [nx, nx, nx];
_local11 = [ny - 2, ny - 1, ny];
_local6 = 0;
while (_local6 < 3) {
var _local7 = 0;
var _local1 = _local10[_local6];
var _local3 = _local11[_local6];
if (board[_local3][_local1] == undefined) {
} else {
var _local2 = 1;
while (_local2 <= 3) {
if (board[_local3][_local1] == undefined) {
break;
}
if (fNum == _local4[_local3][_local1]) {
_local7++;
} else {
break;
}
_local3++;
_local2++;
}
if (_local7 >= 3) {
return(true);
}
}
_local6++;
}
_local10 = [nx - 2, nx - 1, nx];
_local11 = (((nx % 2) == 1) ? ([ny + 1, ny, ny]) : ([ny + 1, ny + 1, ny]));
_local6 = 0;
while (_local6 < 3) {
var _local7 = 0;
var _local1 = _local10[_local6];
var _local3 = _local11[_local6];
if (board[_local3][_local1] == undefined) {
} else {
var _local2 = 1;
while (_local2 <= 3) {
if ((_local2 != 1) && ((_local1 % 2) == 0)) {
_local3--;
}
if (board[_local3][_local1] == undefined) {
break;
}
if (fNum == _local4[_local3][_local1]) {
_local7++;
} else {
break;
}
_local1++;
_local2++;
}
if (_local7 >= 3) {
return(true);
}
}
_local6++;
}
};
successSameBlock = function () {
addScoreNum++;
bonusTime();
uiGoalDispSet();
if (goalNum <= 0) {
clearInterval(time_interval);
uiBtnControl(false);
}
};
viewHint = function () {
if ((hintAry.length > 0) && (score >= 50)) {
var _local2 = random(hintAry.length);
var _local4 = hintAry[_local2].x;
var _local3 = hintAry[_local2].y;
var _local1 = bMc[("b" + _local3) + _local4];
arrowMc._x = (_local1._x + bMc._x) + (bw / 2);
arrowMc._y = (_local1._y + bMc._y) + (bh / 2);
arrowMc._visible = true;
arrowMc.play();
scoreCul(-50);
snd_attach("hint_snd");
} else {
arrowMc._visible = false;
arrowMc.stop();
dispMessage("notEnoughtScore");
snd_attach("error_snd");
}
};
viewHelp = function () {
if (mode == "ready") {
mode = "help";
pauseTime = getTimer();
uiBtnControl(false);
blockBtnControl(false);
clearInterval(time_interval);
var _local2 = helpMc.attachMovie("helpMc", "m", 1);
_local2._x = 325;
_local2._y = 260;
_local2._alpha = 50;
_local2.onEnterFrame = function () {
this._alpha = this._alpha + 5;
if (this._alpha >= 100) {
delete this.onEnterFrame;
}
};
_local2.startBtn.onRollOver = function () {
snd_attach("click1_snd");
};
_local2.startBtn.onPress = function () {
this._parent.onEnterFrame = function () {
this._alpha = this._alpha - 15;
if (this._alpha <= 0) {
delete_item(this);
}
};
viewHelp();
snd_attach("click2_snd");
};
} else if (mode == "help") {
mode = "ready";
var _local3 = getTimer() - pauseTime;
startTime = startTime + _local3;
time_interval = setInterval(timeF, timeVal);
uiBtnControl(true);
blockBtnControl(true);
}
};
addTimeF = function () {
addTimeChk = true;
uiMc.addTimeBtn.enabled = false;
uiMc.addTimeBtn.gotoAndStop(2);
time = time + (timeRef * 0.5);
if (time > timeRef) {
time = timeRef;
}
scoreCul(-100);
snd_attach("addTime_snd");
};
reposBlock = function () {
var _local2 = clickObj.fPoint.mc;
var _local1 = clickObj.sPoint.mc;
_local2.activeRect._visible = (_local1.activeRect._visible = false);
_local2.activeRect.gotoAndStop(1);
_local1.activeRect.gotoAndStop(1);
clickObj.fPoint = (clickObj.sPoint = {mc:null, x:0, y:0, num:"none"});
clickInfo = 0;
};
exploseBlock = function (block, noScoreChk) {
block.circle.m.gotoAndPlay("break");
var _local6 = random(5) + 5;
var _local4 = 0;
while (_local4 < _local6) {
var _local3 = exploseMc.getNextHighestDepth();
var _local2 = exploseMc.attachMovie("exploseBlockMc", "e" + _local3, _local3);
_local2._x = (((bMc._x + block._x) + random(50)) - 25) + (bw / 2);
_local2._y = (((bMc._y + block._y) + random(50)) - 25) + (bh / 2);
_local2._alpha = random(50) + 30;
_local2._xscale = (_local2._yscale = random(70) + 30);
_local2.ax = random(10) - 5;
_local2.ay = random(10) - 5;
_local2.onEnterFrame = function () {
this._x = this._x + this.ax;
this._y = this._y + this.ay;
if (random(20) == 0) {
(this.ax = random(10) - 5);
(this.ay = random(10) - 5);
}
this._alpha = this._alpha - 4;
if (this._alpha <= 0) {
delete this.onEnterFrame;
delete_item(this);
}
};
_local4++;
}
if (!noScoreChk) {
scoreCul(3);
snd_attach("swind_snd");
}
};
setBlockStat = function () {
var _local4 = 0;
while (_local4 < blockNum) {
var _local1 = 0;
while (_local1 < blockNum) {
var _local2 = bMc[("b" + _local4) + _local1];
_local2._visible = true;
var _local3 = board[_local4][_local1];
_local2.circle.gotoAndStop(_local3);
if (_local3 != "s") {
_local2.circle.m.gotoAndStop(1);
}
_local1++;
}
_local4++;
}
};
bonusTime = function () {
time = time + 2;
if (time > timeRef) {
time = timeRef;
}
if ((time > timeLimitNum) && (timeAlertChk)) {
snd_stop("time_snd");
timeAlertChk = undefined;
}
};
viewBlockStr = function () {
trace("board ***************************************");
var _local1 = 0;
while (_local1 < blockNum) {
trace((_local1 + " : ") + board[_local1]);
_local1++;
}
trace("board_ref ===============================");
_local1 = 0;
while (_local1 < blockNum) {
trace((_local1 + " : ") + board_ref[_local1]);
_local1++;
}
trace("***************************************");
};
viewHintModeF = function (continueChk) {
viewHintMode = true;
if (hintAry.length > 0) {
var _local3 = 0;
while (_local3 < blockNum) {
var _local1 = 0;
while (_local1 < blockNum) {
bMc[("b" + _local3) + _local1].possibleRect._visible = false;
_local1++;
}
_local3++;
}
var _local2 = 0;
while (_local2 < hintAry.length) {
var _local4 = bMc[("b" + hintAry[_local2].y) + hintAry[_local2].x].possibleRect;
_local4._visible = true;
_local4.play();
_local2++;
}
clearInterval(viewHintMode_interval);
if (!continueChk) {
viewHintMode_interval = setInterval(hideHintModeF, 5000);
}
}
};
hideHintModeF = function () {
clearInterval(viewHintMode_interval);
viewHintMode = false;
var _local3 = 0;
while (_local3 < blockNum) {
var _local1 = 0;
while (_local1 < blockNum) {
var _local2 = bMc[("b" + _local3) + _local1].possibleRect;
_local2._visible = false;
_local2.stop();
_local1++;
}
_local3++;
}
(arrowMc._visible = false);
arrowMc.stop();
};
uiLevelDispSet = function () {
var _local1 = 1;
while (_local1 <= 10) {
var _local2 = uiMc.levelMc["l" + _local1];
_local2.numTxt.text = _local1;
_local2.gotoAndStop(1);
_local1++;
}
uiMc.levelMc.l1.gotoAndStop(2);
};
uiGoalDispSet = function (initChk) {
if (initChk == "init") {
var _local3 = Math.ceil(goalAry[level - 1] / 10);
var _local1 = 1;
while (_local1 <= 6) {
var _local2 = uiMc["goalMc" + _local1];
if (_local1 <= _local3) {
_local2._visible = true;
_local2.maskMc._yscale = 100;
} else {
_local2._visible = false;
}
_local1++;
}
uiGoalDispSet();
} else {
var _local5 = (Math.ceil(goalAry[level - 1] / 10) * 10) - goalNum;
var _local3 = Math.ceil(_local5 / 10);
var _local4 = _local5 % 10;
if (_local4 == 0) {
_local4 = 10;
}
var _local1 = 1;
while (_local1 <= _local3) {
var _local2 = uiMc["goalMc" + _local1];
_local2.maskMc._yscale = ((_local1 == _local3) ? ((10 - _local4) * 10) : 0);
_local1++;
}
}
};
dispMessage = function (stat) {
var _local2 = messageMc.attachMovie("messageG", "m", 1);
_local2._x = 350;
_local2._y = 400;
_local2.gotoAndStop(stat);
_local2._alpha = 50;
_local2.ty = _local2._y - 150;
_local2.onEnterFrame = function () {
this._alpha = this._alpha + 10;
smoothMove(this, this._x, this.ty, 0.3);
if (Math.abs(this.ty - this._y) < 1) {
this._alpha = 100;
this.ty = this._y - 150;
this.onEnterFrame = function () {
this._y = this._y - 3;
if (this._y <= this.ty) {
delete_item(this);
}
};
}
};
};
useItem = function (block) {
var _local8 = block.x;
var _local7 = block.y;
var _local9 = board[_local7][_local8];
if (_local9 == "a") {
var _local14 = random(typeNum) + 1;
board[_local7][_local8] = _local14;
if ((_local8 % 2) == 1) {
var _local11 = [-1, 0, 1, 1, 0, -1];
var _local12 = [-1, -1, -1, 0, 1, 0];
} else {
var _local11 = [-1, 0, 1, 1, 0, -1];
var _local12 = [0, -1, 0, 1, 1, 1];
}
useItemObj = new Object();
useItemObj.ary = new Array();
useItemObj.fNum = _local14;
useItemObj.ary.push({x:_local8, y:_local7});
var _local3 = 0;
while (_local3 < 6) {
var _local4 = _local8 + _local11[_local3];
var _local5 = _local7 + _local12[_local3];
if (board[_local5][_local4] != undefined) {
board[_local5][_local4] = _local14;
}
useItemObj.ary.push({x:_local4, y:_local5});
_local3++;
}
clearInterval(useItem_interval);
useItem_interval = setInterval(useItem1F, 50, _local9);
if (!aroundSndChk) {
aroundSndChk = true;
snd_attach("around_snd");
around_snd.onSoundComplete = function () {
aroundSndChk = undefined;
};
}
} else if (_local9 == "o") {
var _local14 = random(typeNum) + 1;
useItemObj = new Object();
useItemObj.ary = new Array();
useItemObj.fNum = _local14;
var _local15 = block.circle.m.dispMc._currentframe;
block.circle.m.dispMc.stop();
if (_local15 <= 5) {
var _local16 = 1;
} else if (_local15 <= 10) {
var _local16 = 2;
} else {
var _local16 = 3;
}
if (_local16 == 1) {
var _local10 = (((_local8 % 2) == 0) ? (blockNum - 1) : (blockNum));
var _local2 = 0;
while (_local2 < _local10) {
if (board[_local2][_local8] != undefined) {
board[_local2][_local8] = _local14;
}
useItemObj.ary.push({x:_local8, y:_local2});
_local2++;
}
} else if (_local16 == 2) {
var _local2 = _local7;
var _local1 = _local8;
while ((_local1 >= 0) && (_local2 >= 0)) {
if (((_local1 % 2) == 0) && (_local1 != _local8)) {
_local2--;
}
_local1--;
}
var _local6 = _local1 + 1;
_local1 = _local6;
while (_local1 < blockNum) {
if (((_local1 % 2) == 1) && (_local1 != _local6)) {
_local2++;
}
if ((_local1 > blockNum) || (_local2 > blockNum)) {
break;
}
if (board[_local2][_local1] != undefined) {
board[_local2][_local1] = _local14;
}
useItemObj.ary.push({x:_local1, y:_local2});
_local1++;
}
} else {
var _local2 = _local7;
var _local1 = _local8;
while ((_local1 >= 0) && (_local2 >= 0)) {
if (((_local1 % 2) == 1) && (_local1 != _local8)) {
_local2++;
}
_local1--;
}
var _local6 = _local1 + 1;
_local1 = _local6;
while (_local1 < blockNum) {
if (((_local1 % 2) == 0) && (_local1 != _local6)) {
_local2--;
}
if ((_local1 > blockNum) || (_local2 < 0)) {
break;
}
if (board[_local2][_local1] != undefined) {
board[_local2][_local1] = _local14;
}
useItemObj.ary.push({x:_local1, y:_local2});
_local1++;
}
}
clearInterval(useItem_interval);
useItem_interval = setInterval(useItem1F, 30, _local9);
if (!oneLineSndChk) {
oneLineSndChk = true;
snd_attach("oneLine_snd");
oneLine_snd.onSoundComplete = function () {
oneLineSndChk = undefined;
};
}
} else if (_local9 == "s") {
var _local14 = random(typeNum) + 1;
board[_local7][_local8] = _local14;
block.circle.gotoAndStop(_local14);
block.circle.m.gotoAndStop(1);
clearInterval(useItem_interval);
useItem_interval = setInterval(useItemAfter, 400, _local9, _local14);
if (!sameBlockSndChk) {
sameBlockSndChk = true;
snd_attach("sameBlock_snd");
sameBlock_snd.onSoundComplete = function () {
sameBlockSndChk = undefined;
};
}
}
};
useItem1F = function (itemNum) {
if (useItemObj.ary.length > 0) {
var _local4 = useItemObj.ary.shift();
var _local1 = bMc[("b" + _local4.y) + _local4.x];
if (_local1) {
_local1.circle.gotoAndStop(useItemObj.fNum);
_local1.circle.m.gotoAndStop(1);
if ((useItemObj.ary.length % 2) == 0) {
snd_attach("around_snd");
}
if (itemNum == "a") {
var _local2 = exploseMc.getNextHighestDepth();
var _local3 = exploseMc.attachMovie("activeRectG", "a" + _local2, _local2);
_local3._x = bMc._x + _local1._x;
_local3._y = bMc._y + _local1._y;
}
}
} else {
clearInterval(useItem_interval);
delete useItemObj;
useItemAfter(itemNum);
}
};
useItemAfter = function (item, fNum) {
clearInterval(useItem_interval);
if ((item == "a") || (item == "o")) {
if (sameChk()) {
breakBlock();
} else {
readyBlock();
}
} else {
var _local2 = 0;
while (_local2 < blockNum) {
var _local1 = 0;
while (_local1 < blockNum) {
if (board[_local2][_local1] == fNum) {
board[_local2][_local1] = "b";
exploseBlock(bMc[("b" + _local2) + _local1]);
}
_local1++;
}
_local2++;
}
clearInterval(fallBlock_interval);
fallBlock_interval = setInterval(fallBlock, 500);
}
};
saveScore = function () {
score_ary = new Array();
var _local3 = new LoadVars();
_local3.f_score = score;
_local3.f_kind = 3;
var _local4 = "/data/flash/GetUserID.asp?ran=" + (Math.random() * 10000);
_local3.onLoad = function (success) {
if (success) {
if (Number(this.myid) == 0) {
_root.gotoAndStop("notLogin_frame");
Selection.setFocus("id_txt");
} else if (Number(this.myid) == -1) {
dispMessage("notNickName");
} else {
view_rank(this);
}
} else {
alert("data error ! ");
}
};
_local3.sendAndLoad(_local4, _local3, "post");
};
view_rank = function (load_var) {
_root.gotoAndStop("ranking_frame");
myid = load_var.myid;
var activeChk = false;
var i = 1;
while (i <= 10) {
if (chkData(load_var["member_nick" + i])) {
var field = eval ("field" + i);
field.num_txt.text = i;
field.nick_txt.text = load_var["member_nick" + i];
field.score_txt.text = load_var["member_score" + i];
field.date_txt.text = load_var["member_date" + i];
if (myid == load_var["member_id" + i]) {
field.gotoAndStop("active_frame");
activeChk = true;
} else {
field.gotoAndStop(1);
}
}
i++;
}
if (!activeChk) {
myfield._visible = true;
myfield.num_txt.text = load_var.myrank;
myfield.nick_txt.text = load_var.mynick;
myfield.score_txt.text = load_var.myscore;
myfield.date_txt.text = load_var.mydate;
myfield.gotoAndStop("active_frame");
} else {
myfield._visible = false;
}
};
login_exec = function () {
var _local3 = new LoadVars();
_local3.score = score;
var _local4 = "/data/flash/userLogin.asp?ran=" + (Math.random() * 100000);
_local3.onLoad = function (success) {
if (success) {
if (chkData(this.myid)) {
view_rank(this);
} else {
_root.gotoAndStop("badLogin_frame");
pass_txt.text = "";
Selection.setFocus("id_txt");
}
} else {
alert("error data load error ! ");
}
};
_local3.f_id = id_txt.text;
_local3.f_pwd = pass_txt.text;
_local3.f_score = score;
_local3.f_kind = 3;
_local3.sendAndLoad(_local4, _local3, "post");
};
chkData = function (str) {
var _local1;
(((String(str).length > 0) && (str != undefined)) ? (_local1 = true) : (_local1 = false));
return(_local1);
};
alert = function (str) {
getURL (("javascript:alert (\"" + str) + "\");");
};
_global.delete_item = function (mc) {
if (typeof(mc) == "movieclip") {
for (var _local2 in mc) {
delete_item(mc[_local2]);
}
removeMovieClip(mc);
} else {
}
};
smoothMove = function (mc, tx, ty, sp) {
mc._x = mc._x + ((tx - mc._x) * sp);
mc._y = mc._y + ((ty - mc._y) * sp);
};
_global.snd_attach = function (name, loop, start_num) {
if (sndChk) {
if (start_num == undefined) {
start_num = 0;
}
if (loop == undefined) {
eval (name).start(start_num);
} else if (typeof(loop) == "number") {
eval (name).start(start_num, loop);
} else {
eval (name).start(start_num, 99999);
}
}
};
_global.snd_stop = function (name) {
eval (name).stop(name);
};
clearAllInterval = function () {
var _local2 = setInterval(function () {
}, 100);
var _local1 = 0;
while (_local1 <= _local2) {
clearInterval(_local1);
_local1++;
}
};
scoreCul = function (addScore, mc) {
if (mc) {
var _local3 = flyScoreMc.getNextHighestDepth();
var _local2 = flyScoreMc.attachMovie("flyScoreMc", "f" + _local3, _local3);
_local2._x = (mc._x + bMc._x) + (bw / 2);
_local2._y = (mc._y + bMc._y) + (bh / 2);
_local2.ty = _local2._y - 130;
_local2.scoreTxt.text = addScore;
_local2.onEnterFrame = function () {
this._y = this._y - 6;
if (this._y <= this.ty) {
delete_item(this);
}
};
}
score = score + addScore;
if (score < 0) {
score = 0;
}
};
Key.removeListener(myListen);
myListen = new Object();
myListen.onKeyDown = function () {
if (Key.isDown(16)) {
} else if (Key.isDown(32)) {
viewBlockStr();
} else if (Key.isDown(65)) {
if (uiMc.hintBtn.enabled) {
uiMc.hintBtn.onPress();
}
} else if (Key.isDown(83)) {
if (uiMc.addTimeBtn.enabled) {
uiMc.addTimeBtn.onPress();
}
}
};
Key.addListener(myListen);
Instance of Symbol 141 MovieClip in Frame 2
onClipEvent (load) {
this.mask_mc._xscale = 0;
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.play();
} else {
_root.stop();
}
}
onClipEvent (enterFrame) {
var loaded = _root.getBytesLoaded();
var total = _root.getBytesTotal();
percent = (loaded / total) * 100;
this.percent_txt.text = (Math.floor(percent * 10) / 10) + "%";
this.mask_mc._xscale = percent;
if (percent >= 100) {
_root.play();
}
}
Frame 3
snd_attach("intro_snd", "loop");
stop();
Frame 4
stop();
init();
Instance of Symbol 334 MovieClip "nextStageMc" in Frame 4
onClipEvent (load) {
this._visible = false;
}
Symbol 33 MovieClip [activeRectG] Frame 6
delete_item(this);
Symbol 48 MovieClip [messageG] Frame 9
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 142 Button
on (rollOver) {
snd_attach("click1_snd");
}
on (press) {
_root.gotoAndStop("mainFrame");
snd_attach("click2_snd");
}
Symbol 147 Button
on (press) {
getURL ("http://9dragons.acclaim.com/entry.jsp?ref=G9-G001-C02-0307", "new");
}
Symbol 164 MovieClip Frame 10
stop();
Symbol 170 MovieClip Frame 8
stop();
Symbol 176 MovieClip Frame 8
stop();
Symbol 182 MovieClip Frame 8
stop();
Symbol 188 MovieClip Frame 8
stop();
Symbol 194 MovieClip Frame 8
stop();
Symbol 200 MovieClip Frame 8
stop();
Symbol 206 MovieClip Frame 8
stop();
Symbol 280 Button
on (press) {
getURL ("http://9dragons.acclaim.com/entry.jsp?ref=G9-G001-C02-0307", "new");
}
Instance of Symbol 260 MovieClip "sndBtnMc" in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 275 MovieClip "addTimeBtn" in Symbol 301 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(1);
}
Symbol 334 MovieClip Frame 1
stop();
Instance of Symbol 323 MovieClip "chaMc" in Symbol 334 MovieClip Frame 1
onClipEvent (load) {
this.iy = this._y;
}
Symbol 345 Button
on (release) {
gameRestart();
snd_attach("click2_snd");
}
on (rollOver) {
snd_attach("click1_snd");
}
Symbol 351 Button
on (press) {
getURL ("http://9dragons.acclaim.com/entry.jsp?ref=G9-G001-C02-0307", "new");
}
Symbol 352 Button
on (press) {
getURL ("http://9dragons.acclaim.com/entry.jsp?ref=G9-G001-C02-0307", "new");
}