Frame 1
if (false) {
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testK) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
Set("\uC0AC\uB78C", "\uC0AC\uB78C");
k09 = "\uB300\uD55C\uBBFC\uAD6D";
Set("\uC6C0\uB0D0", "\uB6AB\uC5B4\uBD10");
Set("\u701A\u85C9", \u5927\u97D3\u6C11\u570B);
if (testA) {
item1Number = 0;
item2Number = 0;
item3Number = 0;
waterSpeed = 16;
outWater = 4;
waterAmount = 50;
initScore = 1;
_global.score = 0;
stg = 1;
timing = 61;
depth = 10;
stgTime = 1;
chkArray = [];
_global.item1 = 0;
gameStage = new Object();
gameStage.minX = 125;
gameStage.minY = 75;
gameStage.wid = 150;
gameStage.het = 300;
depth = 10;
block = new Object();
block.wid = 30;
block.het = 30;
pipeArrayY1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArrayY5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pipeArray = [pipeArrayY1, pipeArrayY2, pipeArrayY3, pipeArrayY4, pipeArrayY5];
pArray1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray5 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
pArray = [pArray1, pArray2, pArray3, pArray4, pArray5];
tempScore = new String(_global.score);
_1score = tempScore.slice(-1);
_2score = tempScore.slice(-2, -1);
_3score = tempScore.slice(-3, -2);
_4score = tempScore.slice(-4, -3);
_5score = tempScore.slice(-5, -4);
scoreM.score1.gotoAndStop(Number(_1score) + 1);
scoreM.score2.gotoAndStop(Number(_2score) + 1);
scoreM.score3.gotoAndStop(Number(_3score) + 1);
scoreM.score4.gotoAndStop(Number(_4score) + 1);
scoreM.score5.gotoAndStop(Number(_5score) + 1);
i = 1;
while (i <= 5) {
if (pipeArray[i - 1][0] == 1) {
} else if (!_global.gameOver) {
depth++;
tempItem = random(50);
tempRan = random(14);
if (tempRan < 4) {
tempRan = 1;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 1];
} else if (tempRan < 8) {
tempRan = 2;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 0, 1, 0];
} else if (tempRan < 12) {
tempRan = 3;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 0];
} else if (tempRan < 13) {
if (stg > 3) {
tempRan = 4;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [1, 1, 1, 1];
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
} else {
tempRan = 5;
eval ("pipe" + depth).tempRan = tempRan;
eval ("pipe" + depth).value = [0, 0, 1, 0];
}
pipe.duplicateMovieClip("pipe" + depth, depth);
eval ("pipe" + depth)._x = ((gameStage.minX + (block.wid / 2)) + 1) + (block.wid * (i - 1));
eval ("pipe" + depth)._y = (gameStage.minY - (block.het / 2)) + 1;
if (tempItem < 3) {
tempRan2 = random(3) + 2;
eval ("pipe" + depth).gotoAndStop(tempRan2);
eval ("pipe" + depth).tempRan2 = tempRan2;
}
eval ("pipe" + depth)._1_pipe.gotoAndStop(tempRan);
eval ("pipe" + depth)._1_pipe._2_pipe.gotoAndStop(1);
eval ("pipe" + depth)._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
eval ("pipe" + depth).x = i - 1;
eval ("pipe" + depth).y = -1;
eval ("pipe" + depth).cap = 1;
eval ("pipe" + depth).onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
var _local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
}
i++;
}
if (pipeArray[pipe.x][pipe.y + 1] == 0) {
pipeArray[pipe.x][pipe.y] = 0;
pArray[pipe.x][pipe.y] = null;
pipe.y = pipe.y + 1;
pArray[pipe.x][pipe.y - 2].onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
if (_local1._parent.dropBlock(_local1) == 0) {
_local1.onEnterFrame = null;
_local1.onRelease = function () {
var _local1 = this;
var _local2 = _global;
trace("\uC544\uC774\uD15C111 : " + _local2.item1);
if (_local2.item1 == 1) {
trace((_local1.y + "_____") + _local2.item1);
chkArray = [];
var _local3 = 0;
while (_local3 < 5) {
chkArray[i] = _local1._parent.pArray[_local3][_local1.y];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
_local1._parent.removePipe(_local1._parent.pArray[_local3][_local1.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
_local3++;
}
_local2.item1 = 5;
_local1._parent.item1Number = _local1._parent.item1Number - 1;
_local1._tempnum = new String(_local1._parent.item1Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item1Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item1Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item1Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_local2.item1 == 4) {
if (((Math.abs(_local1.x - _local2.tempPipe.x) == 1) && (Math.abs(_local1.y - _local2.tempPipe.y) == 0)) || ((Math.abs(_local1.x - _local2.tempPipe.x) == 0) && (Math.abs(_local1.y - _local2.tempPipe.y) == 1))) {
_local2.item1 = 5;
_local2.tempPipeNum2 = _local1._1_pipe._currentframe;
_local2.tempPipe1Num2 = _local1._1_pipe._2_pipe._currentframe;
_local1.tempRan = _local2.tempPipeNum;
_local2.tempPipe.tempRan = _local2.tempPipeNum2;
_local2.tempPipe._1_pipe.gotoAndStop(_local2.tempPipeNum2);
_local2.tempPipe._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num2);
_local2.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(_local2.tempPipe1Num);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item2Number = _local1._parent.item2Number - 1;
_local1._tempnum = new String(_local1._parent.item2Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item2Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item2Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item2Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
}
} else if (_local2.item1 == 2) {
_local2.item1 = 4;
_local2.tempPipe = _local1;
_local2.tempPipeNum = _local1._1_pipe._currentframe;
_local2.tempPipe1Num = _local1._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _local2.tempPipeNum);
} else if (_local2.item1 == 3) {
_local2.item1 = 5;
_local1.tempRan = _local2.targetRan;
trace((_local1.tempRan + "_____") + _local2.targetRan);
_local1._1_pipe.gotoAndStop(_local1.tempRan);
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
_local1._parent.item3Number = _local1._parent.item3Number - 1;
_local1._tempnum = new String(_local1._parent.item3Number);
_local1._1num = _local1._tempnum.slice(-1);
if (_local1._parent.item3Number > 9) {
_local1._2num = _local1._tempnum.slice(-2, -1);
}
_local1._parent.item3Num.score1.gotoAndStop(Number(_local1._1num) + 1);
_local1._parent.item3Num.score2.gotoAndStop(Number(_local1._2num) + 1);
_local1._parent.itemBox3.gotoAndStop(1);
_local2.targetRan = 0;
_1num = "";
_2num = "";
_local2.chkStart2 = 1;
} else if (_local2.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + _local1.tempRan);
if (_local1._1_pipe._2_pipe._currentframe == 1) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 0, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [1, 0, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 2) {
if (_local1.tempRan == 1) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 0, 1];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 0, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 0, 1];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else if (_local1._1_pipe._2_pipe._currentframe == 3) {
if (_local1.tempRan == 1) {
_local1.value = [1, 1, 0, 0];
} else if (_local1.tempRan == 2) {
_local1.value = [0, 1, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [0, 1, 1, 1];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 1, 0, 0];
}
_local1._1_pipe._2_pipe.nextFrame();
_local2.chkStart2 = 1;
} else {
if (_local1.tempRan == 1) {
_local1.value = [0, 0, 1, 1];
} else if (_local1.tempRan == 2) {
_local1.value = [1, 0, 1, 0];
} else if (_local1.tempRan == 3) {
_local1.value = [1, 1, 1, 0];
} else if (_local1.tempRan == 4) {
_local1.value = [1, 1, 1, 1];
} else {
_local1.value = [0, 0, 1, 0];
}
_local1._1_pipe._2_pipe.gotoAndStop(1);
_local2.chkStart2 = 1;
}
_local1._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _local2.chkStart);
}
if (_local2.item1 == 5) {
_local2.item1 = 0;
}
};
}
};
pipe._y = pipe._y + block.het;
} else {
pipeArray[pipe.x][pipe.y] = 1;
pArray[pipe.x][pipe.y] = pipe;
trace("\uC5D4\uD130\uD504\uB808\uC784");
_global.chkStart2 = 1;
return(0);
}
if ((stgTime % timing) == 0) {
readyBlock();
}
_global.chk = 1;
j = 0;
while (j < 10) {
chkArray = [];
pArray[0][j].input = 0;
pArray[0][j].output = 0;
if (pArray[0][j].value[2]) {
pArray[0][j].input = 1;
chkArray[chkArray.length] = pArray[0][j];
if ((((j == 9) && (pArray[0][j].value[0] == 0)) && (pArray[0][j].value[3] == 0)) && (pArray[0][j].value[1] == 1)) {
chkArray[chkArray.length] = pArray[0][j];
waterTank.character.gotoAndPlay("success");
removePipe(pArray[0][j]);
} else {
if (pArray[0][j].value[0] == 1) {
if (pArray[0][j - 1].value[1] == 1) {
chk1 = 1;
} else {
chk1 = 0;
}
}
if (pArray[0][j].value[1] == 1) {
if (pArray[0][j + 1].value[0] == 1) {
chk2 = 1;
} else if (j == 9) {
pArray[0][j].output = 1;
chk2 = 2;
} else {
chk2 = 0;
}
}
if (pArray[0][j].value[3] == 1) {
if (pArray[1][j].value[2] == 1) {
chk3 = 1;
} else {
chk3 = 0;
}
}
if (((chk1 != 0) && (chk2 != 0)) && (chk3 != 0)) {
if (chk1 == 1) {
if (blockChk2(pArray[0][j - 1]) == 0) {
}
}
if (chk2 == 1) {
if (blockChk2(pArray[0][j + 1]) == 0) {
}
}
if (chk3 == 1) {
if (blockChk2(pArray[1][j]) == 0) {
}
}
chk1 = (chk2 = (chk3 = null));
if (chkArray.length > 0) {
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].input) {
input = 1;
break;
}
input = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].output) {
output = 1;
break;
}
output = 0;
ki++;
}
ki = 0;
while (ki < chkArray.length) {
if (chkArray[ki].cap) {
vcap = 1;
} else {
vcap = 0;
break;
}
ki++;
}
if ((input && (output)) && (vcap)) {
input = 0;
output = 0;
vcap = 0;
waterTank.character.gotoAndPlay("success");
ki = 0;
while (ki < chkArray.length) {
_global.score = _global.score + initScore;
removePipe(chkArray[ki]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
initScore++;
ki++;
}
initScore = 1;
score();
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
} else {
chk1 = (chk2 = (chk3 = null));
input = 0;
output = 0;
}
}
}
j++;
}
input = 0;
output = 0;
vcap = 0;
_global.chk = 0;
i = 0;
while (i < 5) {
if (pipeArray[i][0] == 0) {
eSpeed = 0;
break;
}
eSpeed = 4;
i++;
}
if (waterAmount >= 100) {
_global.gameOver = 1;
}
if (waterAmount <= 0) {
_global.gameClear = 1;
}
_global.chkStart = 0;
pipe.chk1 = "";
pipe.chk2 = "";
pipe.chk3 = "";
pipe.chk4 = "";
if (pipe.value[0] == 1) {
var chk1;
if (pArray[pipe.x][pipe.y - 1].value[1] == 1) {
pipe.chk1 = 1;
} else {
pipe.chk1 = 0;
chkArray = [];
}
}
if (pipe.value[1] == 1) {
var chk2;
if (pArray[pipe.x][pipe.y + 1].value[0] == 1) {
pipe.chk2 = 1;
} else if (pipe.y == 9) {
pipe.output = 1;
pipe.chk2 = 2;
} else {
pipe.chk2 = 0;
chkArray = [];
}
}
if (pipe.value[2] == 1) {
var chk3;
if (pArray[pipe.x - 1][pipe.y].value[3] == 1) {
pipe.chk3 = 1;
} else if (pipe.x == 0) {
pipe.input = 1;
pipe.chk3 = 2;
} else {
pipe.chk3 = 0;
chkArray = [];
}
}
if (pipe.value[3] == 1) {
var chk4;
if (pArray[pipe.x + 1][pipe.y].value[2] == 1) {
pipe.chk4 = 1;
} else if (pipe.x == 4) {
pipe.output = 1;
pipe.input = 1;
pipe.chk4 = 2;
} else {
pipe.chk4 = 0;
chkArray = [];
}
}
if ((((pipe.chk1 != 0) && (pipe.chk2 != 0)) && (pipe.chk3 != 0)) && (pipe.chk4 != 0)) {
if (keyPut == 1) {
}
pipe.cap = 1;
chkArray[chkArray.length] = pipe;
if (pipe.chk1 == 1) {
var jon1;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y - 1] == chkArray[chkT]) {
jon1 = 1;
break;
}
jon1 = 0;
chkT++;
}
if (jon1 == 0) {
blockChk2(pArray[pipe.x][pipe.y - 1]);
}
}
if (pipe.chk2 == 1) {
var jon2;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x][pipe.y + 1] == chkArray[chkT]) {
jon2 = 1;
break;
}
jon2 = 0;
chkT++;
}
if (jon2 == 0) {
blockChk2(pArray[pipe.x][pipe.y + 1]);
}
}
if (pipe.chk3 == 1) {
var jon3;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x - 1][pipe.y] == chkArray[chkT]) {
jon3 = 1;
break;
}
jon3 = 0;
chkT++;
}
if (jon3 == 0) {
blockChk2(pArray[pipe.x - 1][pipe.y]);
}
}
if (pipe.chk4 == 1) {
var jon4;
chkT = 0;
while (chkT < chkArray.length) {
if (pArray[pipe.x + 1][pipe.y] == chkArray[chkT]) {
jon4 = 1;
break;
}
jon4 = 0;
chkT++;
}
if (jon4 == 0) {
blockChk2(pArray[pipe.x + 1][pipe.y]);
}
}
} else {
chkArray = [];
}
pipe.onRelease = null;
pipe.itemUp = pipe._currentframe;
pArray[pipe.x][pipe.y] = 0;
pipeArray[pipe.x][pipe.y] = 0;
eval (pipe)._1_pipe._2_pipe._3_pipe.gotoAndStop(2);
pipe.onEnterFrame = function () {
this.i++;
if (this.i == 3) {
eval (pipe).gotoAndStop("break");
}
if (this.i == 5) {
this.tempArr = [];
j = this.y - 1;
while (j >= 0) {
if (this._parent.pipeArray[this.x][j] == 1) {
this.ok = 0;
ji = 0;
while (ji < this._parent.chkArray.length) {
if (this._parent.pArray[this.x][j] == this._parent.chkArray[ji]) {
this._parent.pArray[this.x][j].chk123 = 1;
}
ji++;
}
if (!this.ok) {
trace(this._parent.pArray[this.x][j]);
this.tempArr[this.tempArr.length] = this._parent.pArray[this.x][j];
this._parent.pipeArray[this.x][j] = 0;
this._parent.pArray[this.x][j] = 0;
trace("pipeArray" + this._parent.pipeArray[this.x][j]);
}
}
j--;
}
trace(this.tempArr);
j = 0;
while (j < this.tempArr.length) {
this._parent.pipeArray[this.x][this.y - j] = 1;
this._parent.pArray[this.x][this.y - j] = this.tempArr[j];
this.tempArr[j]._y = this._y - (this._parent.block.het * j);
this.tempArr[j].y = this.y - j;
j++;
}
if (this.itemUp == 2) {
item1Number = item1Number + 1;
_tempnum = new String(item1Number);
_1num = _tempnum.slice(-1);
if (item1Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item1Num.score1.gotoAndStop(Number(_1num) + 1);
item1Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 4) {
item2Number = item2Number + 1;
_tempnum = new String(item2Number);
_1num = _tempnum.slice(-1);
if (item2Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item2Num.score1.gotoAndStop(Number(_1num) + 1);
item2Num.score2.gotoAndStop(Number(_2num) + 1);
} else if (this.itemUp == 3) {
item3Number = item3Number + 1;
_tempnum = new String(item3Number);
_1num = _tempnum.slice(-1);
if (item3Number > 9) {
_2num = _tempnum.slice(-2, -1);
}
item3Num.score1.gotoAndStop(Number(_1num) + 1);
item3Num.score2.gotoAndStop(Number(_2num) + 1);
}
_global.chkStart2 = 1;
this.removeMovieClip();
}
};
}
Address = "../game/game_score.asp?game_score=";
trace(isUndefined);
this.stop();
_quality = "high";
((myS = new Sound())).attachSound("over");
((bgMusic = new Sound())).attachSound("bgMusic");
((jumpSnd = new Sound())).attachSound("jumpSnd");
((chargeSnd = new Sound())).attachSound("chargeSnd");
((dischargeSnd = new Sound())).attachSound("dischargeSnd");
((boardSnd = new Sound())).attachSound("boardSnd");
((bubbleSnd = new Sound())).attachSound("bubbleSnd");
((electricSnd = new Sound())).attachSound("electricSnd");
((dieSnd = new Sound())).attachSound("dieSnd");
if (uItem1 == undefined) {
uItem1 = false;
}
if (uItem2 == undefined) {
uItem2 = false;
}
if (uItem3 == undefined) {
uItem3 = false;
}
if (uItem4 == undefined) {
uItem4 = false;
}
_root.isItem1 = _root.uItem1;
_root.isItem2 = _root.uItem2;
_root.isItem3 = _root.uItem3;
_root.isItem4 = _root.uItem4;
Frame 2
if (false) {
}
this.stop();
stopAllSounds();
_quality = "high";
Instance of Symbol 71 MovieClip "displayItem" in Frame 2
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 74 MovieClip "itemLoading" in Frame 2
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Frame 3
if (false) {
}
function mixing() {
var _local1 = 0;
while (_local1 < 77) {
var _local3 = random(10);
var _local2 = random(10);
var buffArray = arrayBoard[_local3];
arrayBoard[_local3] = arrayBoard[_local2];
arrayBoard[_local2] = buffArray;
_local1++;
}
}
function dupWall() {
var _local1 = _root;
_local1.LW.attachMovie("w" + ((_local1.Li % 3) + 1), "nLW" + _local1.LCnt, _local1.LCnt);
_local1.LW["nLW" + _local1.LCnt]._y = _local1.LW["nLW" + (_local1.LCnt - 2)]._y + (_local1.wallH - 1);
_local1.Li++;
_local1.LCnt = _local1.LCnt + 2;
_local1.RW.attachMovie("w" + ((_local1.Ri % 3) + 1), "nRW" + _local1.RCnt, _local1.RCnt);
_local1.RW["nRW" + _local1.RCnt]._y = _local1.RW["nRW" + (_local1.RCnt - 2)]._y + (_local1.wallH - 1);
_local1.Ri++;
_local1.RCnt = _local1.RCnt + 2;
}
function wallUp() {
var _local1 = this;
var _local3 = _root;
_local3.onEnterFrame = function () {
var _local1 = this;
var _local3 = _root;
if (_local1.upFlag == true) {
_local1.buffCnt++;
_local1.LW["nLW" + (_local1.LCnt - 4)]._y = _local1.LW["nLW" + (_local1.LCnt - 4)]._y - _local1.gap;
_local1.RW["nRW" + (_local1.RCnt - 4)]._y = _local1.RW["nRW" + (_local1.RCnt - 4)]._y - _local1.gap;
_local1.LW["nLW" + (_local1.LCnt - 2)]._y = _local1.LW["nLW" + (_local1.LCnt - 2)]._y - _local1.gap;
_local1.RW["nRW" + (_local1.RCnt - 2)]._y = _local1.RW["nRW" + (_local1.RCnt - 2)]._y - _local1.gap;
if ((_local1.LW["nLW" + (_local1.LCnt - 4)].enemy.hitTest(_local3.Boo) && (_local1.isBubble == false)) && (_local1.myLevel >= 4)) {
if (_local3.skin.EnerGage._width > 1) {
_local1.skin.EnerGage._width = _local1.skin.EnerGage._width - 1;
} else {
_local1.skin.EnerGage._width = 0;
_local1.Boo.Boo_In.gotoAndStop("generalDie");
_local1.upFlag = false;
_local1.fallingGap = 0.2;
_local1.Boo.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + _local1._parent.fallingGap;
if (_local1._parent.fallingGap < 7) {
_local1._parent.fallingGap = _local1._parent.fallingGap * 1.2;
}
if (_local1._y > 370) {
_local1.onEnterFrame = null;
_root.gameOverCount();
}
};
}
_local1.score = _local1.score - 1;
_local1.skin.Gscore.scoreView(_local1.score);
} else if ((_local1.RW["nRW" + (_local1.RCnt - 4)].enemy.hitTest(_local3.Boo) && (_local1.isBubble == false)) && (_local1.myLevel >= 4)) {
if (_local3.skin.EnerGage._width > 1) {
_local1.skin.EnerGage._width = _local1.skin.EnerGage._width - 1;
} else {
_local1.skin.EnerGage._width = 0;
_local1.Boo.Boo_In.gotoAndStop("generalDie");
_local1.upFlag = false;
_local1.fallingGap = 0.2;
_local1.Boo.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + _local1._parent.fallingGap;
if (_local1._parent.fallingGap < 7) {
_local1._parent.fallingGap = _local1._parent.fallingGap * 1.2;
}
if (_local1._y > 370) {
_local1.onEnterFrame = null;
_root.gameOverCount();
}
};
}
_local1.score = _local1.score - 1;
_local1.skin.Gscore.scoreView(_local1.score);
} else if ((_local1.LW["nLW" + (_local1.LCnt - 2)].enemy.hitTest(_local3.Boo) && (_local1.isBubble == false)) && (_local1.myLevel >= 4)) {
if (_local3.skin.EnerGage._width > 1) {
_local1.skin.EnerGage._width = _local1.skin.EnerGage._width - 1;
} else {
_local1.skin.EnerGage._width = 0;
_local1.Boo.Boo_In.gotoAndStop("generalDie");
_local1.upFlag = false;
_local1.fallingGap = 0.2;
_local1.Boo.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + _local1._parent.fallingGap;
if (_local1._parent.fallingGap < 7) {
_local1._parent.fallingGap = _local1._parent.fallingGap * 1.2;
}
if (_local1._y > 370) {
_local1.onEnterFrame = null;
_root.gameOverCount();
}
};
}
_local1.score = _local1.score - 1;
_local1.skin.Gscore.scoreView(_local1.score);
} else if ((_local1.RW["nRW" + (_local1.RCnt - 2)].enemy.hitTest(_local3.Boo) && (_local1.isBubble == false)) && (_local1.myLevel >= 4)) {
if (_local3.skin.EnerGage._width > 1) {
_local1.skin.EnerGage._width = _local1.skin.EnerGage._width - 1;
} else {
_local1.skin.EnerGage._width = 0;
_local1.Boo.Boo_In.gotoAndStop("generalDie");
_local1.upFlag = false;
_local1.fallingGap = 0.2;
_local1.Boo.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + _local1._parent.fallingGap;
if (_local1._parent.fallingGap < 7) {
_local1._parent.fallingGap = _local1._parent.fallingGap * 1.2;
}
if (_local1._y > 370) {
_local1.onEnterFrame = null;
_root.gameOverCount();
}
};
}
_local1.score = _local1.score - 1;
_local1.skin.Gscore.scoreView(_local1.score);
}
if (_local1.LW["nLW" + (_local1.LCnt - 4)]._y < (-_local1.wallH)) {
_local1.dupWall();
removeMovieClip(_local1.LW["nLW" + (_local1.LCnt - 6)]);
removeMovieClip(_local1.RW["nRW" + (_local1.RCnt - 6)]);
}
if ((_local1.buffCnt % (_local1.termCnt * 3)) == 0) {
duplicateMovieClip (_local1.clouds, "cloud" + _local1.CCnt, _local1.CCnt);
_local1["cloud" + _local1.CCnt]._x = random(180) + _local1.sideValue;
_local1["cloud" + _local1.CCnt]._y = random(30) + 300;
_local1["cloud" + _local1.CCnt].gotoAndStop(random(5) + 1);
_local1.cloudArray.push("cloud" + _local1.CCnt);
if (_local1.CCnt >= 10) {
_local1.CCnt = 0;
} else {
_local1.CCnt++;
}
}
var cNum = 0;
while (cNum <= _local1.cloudArray.length) {
_local1[_local1.cloudArray[cNum]]._y = _local1[_local1.cloudArray[cNum]]._y - _local1.gap;
if (_local1[_local1.cloudArray[cNum]]._y < -10) {
removeMovieClip(_local1[_local1.cloudArray[cNum]]);
_local1.cloudArray.shift();
}
cNum++;
}
if ((_local1.buffCnt % ((_local1.termCnt * 3) - 3)) == 0) {
duplicateMovieClip (_local1.boards, "board" + _local1.boardCnt, _local1.boardCnt);
_local1["board" + _local1.boardCnt]._x = random(160) + _local1.sideValue;
_local1["board" + _local1.boardCnt]._y = 300;
_local1["board" + _local1.boardCnt].gotoAndStop(_local3.arrayBoard[_local3.i]);
if (_local3.isItem2 == true) {
if (_local1["board" + _local1.boardCnt]._x > (_local1.sideValue + 100)) {
_local1.skin.dirLamp.gotoAndStop("right");
} else if (_local1["board" + _local1.boardCnt]._x < (_local1.sideValue + 60)) {
_local1.skin.dirLamp.gotoAndStop("left");
} else {
_local1.skin.dirLamp.gotoAndStop("center");
}
}
if (_local3.i >= 9) {
_local3.i = 0;
_local3.mixing();
} else {
_local3.i++;
}
_local1.boardArray.push("board" + _local1.boardCnt);
if (_local1.boardCnt >= 100) {
_local1.boardCnt = 50;
} else {
_local1.boardCnt++;
}
}
var bNum = 0;
while (bNum <= _local1.boardArray.length) {
_local1[_local1.boardArray[bNum]]._y = _local1[_local1.boardArray[bNum]]._y - _local1.gap;
if (_local1[_local1.boardArray[bNum]]._y < 0) {
removeMovieClip(_local1[_local1.boardArray[bNum]]);
_local1.boardArray.shift();
}
bNum++;
}
if (_local1.BooUpSig == true) {
if (_local1.Boo.Boo_In.state == "jump") {
_local1.Boo.Boo_In.gotoAndStop("st");
}
_local1.Boo._y = _local1.Boo._y - _local1.gap;
if (((((_local1.isItem1 == true) && (Key.isDown(32))) && (_local1.Boo._y < 320)) && (_local1.isBubble == false)) && (_local1.itemCnt > 0)) {
_local1.Boo.Boo_In.gotoAndPlay("makeBubble");
_local1.isBubble = true;
_local1.skin["viewItem" + _local1.itemCnt]._visible = false;
_local1.itemCnt--;
if (_local1.score >= 50) {
_local1.score = _local1.score - 50;
_local1.skin.Gscore.scoreView(_local1.score);
}
}
} else if (_local1.isBubble == false) {
if (_local1.Boo.Boo_In.state != "vanishBubble") {
_local1.Boo.Boo_In.gotoAndStop("jump");
}
_local1.Boo._y = _local1.Boo._y + (_local1.gap + 2);
_local1.score = _local1.score + 1;
_local1.levelScore++;
if (_local1.pDepth >= 168.5) {
_local1.pDepth = 168.5;
_local1.upFlag = false;
_local1.skin.nextLevel._visible = true;
_local1.skin.nextLevel.gotoAndPlay(2);
} else {
_local1.pDepth = Math.ceil((_local1.levelScore / _local1.tScore) * 168.5);
}
_local3.skin.depthLine.depthBall._y = _local1.pDepth;
_local1.skin.Gscore.scoreView(_local1.score);
if (((((_local1.isItem1 == true) && (Key.isDown(32))) && (_local1.Boo._y < 320)) && (_local1.isBubble == false)) && (_local1.itemCnt > 0)) {
_local1.Boo.Boo_In.gotoAndPlay("makeBubble");
_local1.isBubble = true;
_local1.skin["viewItem" + _local1.itemCnt]._visible = false;
_local1.itemCnt--;
if (_local1.score >= 50) {
_local1.score = _local1.score - 50;
_local1.skin.Gscore.scoreView(_local1.score);
}
}
} else {
if (_local1.Boo._y > (_local1.Boo.ay + 50)) {
if (_local1.itemTEST == true) {
_local1.Boo._y = _local1.Boo._y - (_local1.gap + 2);
} else {
_local1.bN++;
if (_local1.bN >= 100) {
_local1.isBubble = false;
_local1.bN = 0;
}
}
} else if (_local1.Boo._y < (_local1.Boo.ay + 40)) {
_local1.Boo._y = _local1.Boo._y + _local1.gap;
}
if ((_local1.Boo._y <= (_local1.Boo.ay + 50)) && (_local1.Boo._y >= (_local1.Boo.ay + 40))) {
_local1.Boo.Boo_in.gotoAndPlay("vanishBubble");
_local1.isBubble = false;
}
}
var _local2 = 0;
while (_local2 <= _local1.boardArray.length) {
if ((_local1.Boo.inHit.hitTest(_local1[_local1.boardArray[_local2]].hitArea) && (_local1.isHited == false)) && (_local1.isBubble == false)) {
_local1[_local1.boardArray[_local2]].inBoard.gotoAndStop(2);
if (_local1[_local1.boardArray[_local2]].state == "fish") {
_local1[_local1.boardArray[_local2]].inBoard.gotoAndStop(2);
} else if (_local1[_local1.boardArray[_local2]].state == "rotating") {
_local1[_local1.boardArray[_local2]].inBoard.gotoAndStop(2);
} else if (_local1[_local1.boardArray[_local2]].state == "charge") {
_local1.Boo.Boo_In.gotoAndStop("charge");
if (_local3.skin.EnerGage._width <= 80.8) {
_local3.skin.EnerGage._width = _local3.skin.EnerGage._width + 1;
}
_local1.score = _local1.score + 1;
_local1.skin.Gscore.scoreView(_local1.score);
} else if (_local1[_local1.boardArray[_local2]].state == "disCharge") {
_local1[_local1.boardArray[_local2]].inBoard.gotoAndStop(2);
_local1.Boo.Boo_In.gotoAndStop("discharge");
if (_local3.skin.EnerGage._width > 0) {
_local3.skin.EnerGage._width = _local3.skin.EnerGage._width - 1;
} else {
_local3.skin.EnerGage._width = 0;
}
_local1.score = _local1.score - 1;
_local1.skin.Gscore.scoreView(_local1.score);
}
if (_local1.Boo.hitTest(_local1["enemy" + _local1.enemyCnt])) {
if (_local3.skin.EnerGage._width > 0) {
_local3.skin.EnerGage._width = _local3.skin.EnerGage._width - 1;
} else {
_local3.skin.EnerGage._width = 0;
}
_local1.score = _local1.score - 1;
_local1.skin.Gscore.scoreView(_local1.score);
}
if (_local1.Boo._y > 50) {
_local1.Boo._y = _local1[_local1.boardArray[_local2]]._y;
_local1.BooUpSig = true;
} else {
_local1.Boo._y = 50;
_local1.BooUpSig = true;
}
_local1.isHited = true;
break;
}
_local1[_local1.boardArray[_local2]].inBoard.gotoAndStop(1);
_local1.isHited = false;
_local1.BooUpSig = false;
_local2++;
}
}
if ((_local3.Boo._y < (_local3.electronic._y + 53)) && (_local1.isBubble == false)) {
if (_local1.myLevel >= 2) {
_local1.Boo.Boo_In.gotoAndStop("shock");
_local1.electricSnd.start(0, 3);
}
_local1.Boo._y = _local1.Boo._y + 3;
if ((_local1.skin.EnerGage._width <= 1) && (_local1.myLevel >= 2)) {
_local1.upFlag = false;
_local1.onEnterFrame = null;
_local1.Boo.Boo_In.gotoAndPlay("electricDie");
_local1.fallingGap = 0.2;
_local1.Boo.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + _local1._parent.fallingGap;
if (_local1._parent.fallingGap < 7) {
_local1._parent.fallingGap = _local1._parent.fallingGap * 1.2;
}
if (_local1._y > 370) {
_local1.onEnterFrame = null;
}
};
_local1.gameOverCount();
} else if ((_local1.skin.EnerGage._width > 0) && (_local1.myLevel >= 2)) {
_local1.skin.EnerGage._width = _local1.skin.EnerGage._width - 1;
}
} else {
_local1.electricSnd.stop("electricSnd");
}
if ((Key.isDown(37) && (_local1.upFlag == true)) && (_local1.rSig == false)) {
if (_local3.Boo._x > _local3.sideValue) {
_local3.Boo.dirPos = "left";
_local3.Boo._xscale = 100;
_local3.Boo._x = _local3.Boo._x - 5;
_local3.Boo.Boo_In.MC_inBoo.gotoAndStop("run");
} else {
_local3.Boo._x = _local3.sideValue + 5;
}
}
if ((Key.isDown(39) && (_local1.upFlag == true)) && (_local1.rSig == false)) {
if (_local3.Boo._x < ((_local3.sideValue * 3) + 20)) {
_local3.Boo.dirPos = "right";
_local3.Boo._xscale = -100;
_local3.Boo._x = _local3.Boo._x + 5;
_local3.Boo.Boo_In.MC_inBoo.gotoAndStop("run");
} else {
_local3.Boo._x = ((_local3.sideValue * 3) + 20) - 5;
}
}
if (_local1.skin.EnerGage._width <= 1) {
_local1.onEnterFrame = null;
_local1.upFlag = false;
if (_local1.Boo.Boo_In.state == "shock") {
_local1.Boo.Boo_In.gotoAndStop("electricDie");
} else {
_local1.Boo.Boo_In.gotoAndStop("generalDie");
}
_local1.fallingGap = 0.2;
_local1.Boo.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + _local1._parent.fallingGap;
if (_local1._parent.fallingGap < 7) {
_local1._parent.fallingGap = _local1._parent.fallingGap * 1.2;
}
if (_local1._y > 370) {
_local1.onEnterFrame = null;
}
};
_local1.gameOverCount();
trace("\uAC8C\uC784 \uC624~~~\uBC84~~!!!!!!!");
} else if (_local1.Boo._y > 370) {
_local1.onEnterFrame = null;
_local1.upFlag = false;
_local1.gameOverCount();
trace("\uAC8C\uC784 \uC624~~~\uBC84~~!!!!!!!");
}
if ((((_local1.itemCnt <= 1) && (random(777) == 37)) && (_local1.MC_bubbleItem.isMove == false)) && (_local3.isItem1 == true)) {
_local1.MC_bubbleItem.isMove = true;
}
if (_local1.MC_bubbleItem.isMove == true) {
_local1.MC_bubbleItem._y = _local1.MC_bubbleItem._y - (_local1.gap + 2);
if (_local1.MC_bubbleItem._y < -50) {
_local1.MC_bubbleItem.isMove = false;
_local1.MC_bubbleItem._x = _local1.MC_bubbleItem.ax;
_local1.MC_bubbleItem._y = _local1.MC_bubbleItem.ay;
}
}
if (_local1.Boo.hitTest(_local1.MC_bubbleItem)) {
_local1.getItemSnd.start();
_local1.MC_bubbleItem.isMove = false;
_local1.MC_bubbleItem._x = _local1.MC_bubbleItem.ax;
_local1.MC_bubbleItem._y = _local1.MC_bubbleItem.ay;
_local1.itemCnt++;
_local1.skin["viewItem" + _local1.itemCnt]._visible = true;
}
};
}
function shakeEel() {
var _local1 = this;
var _local2 = _root;
_local2.electricEels.shakeN = 1;
_local2.electricEels.dir = 1;
_local2.electricEels.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local2.upFlag == true) {
_local2.electricEels._y = _local2.electricEels._y + (1 * _local1.dir);
_local2.electronic._y = _local2.electronic._y + (1 * _local1.dir);
_local1.shakeN++;
if (_local1.shakeN >= 30) {
_local1.dir = _local1.dir * -1;
_local1.shakeN = 1;
}
}
};
}
function selectLevel() {
var _local1 = _root;
if (_local1.userLevel == 2) {
_local1.gap = 2;
} else if (_local1.userLevel == 3) {
_local1.gap = 3;
}
}
function deleteAll() {
var _local1 = this;
removeMovieClip(_root.skin);
removeMovieClip(_root.MC_gameOver);
var _local3 = 0;
while (_local3 <= _local1.cloudArray.length) {
removeMovieClip(_root[_local1.cloudArray[_local3]]);
_local3++;
}
var _local2 = 0;
while (_local2 <= _local1.boardArray.length) {
removeMovieClip(_local1[_local1.boardArray[_local2]]);
_local2++;
}
_local1.LW.removeMovieClip();
_local1.RW.removeMovieClip();
_local1.Boo.removeMovieClip();
}
function gameOverCount() {
var _local1 = _root;
trace("\uB450\uAC70\uC368~!");
stopAllSounds();
_local1.dieSnd.start();
_local1.skin.MC_stageTXT.gotoAndStop(1);
_local1.nextLevel.gotoAndStop(1);
_local1.nextLevel._visible = false;
_local1.MC_gameOver.onEnterFrame = function () {
var _local1 = _root;
if (_local1.Boo._y >= 370) {
this.onEnterFrame = null;
this.gotoAndPlay(2);
if (_local1.isItem3 == true) {
_local1.realScore = _local1.score * 2;
} else if (_local1.isItem4 == true) {
_local1.realScore = _local1.score * 3;
} else {
_local1.realScore = _local1.score;
}
removeMovieClip(_local1.sendScore);
_local1.createEmptyMovieClip("sendScore", 301818);
_local1.sendScore.userKey = _local1.userKey;
_local1.sendScore.gCode = _local1.gCode;
_local1.sendScore.levelUp = _local1.levelUp;
_local1.sendScore.gLevel = _local1.userLevel;
_local1.sendScore.score = _local1.realScore;
_local1.sendScore.loadVariables("/_prc/game_end_chk.asp", "POST");
getURL (((("javascript:sc_end_js(" + _local1.realScore) + ",") + _local1.levelUp) + ");");
_local1.uItem1 = false;
_local1.uItem2 = false;
_local1.uItem3 = false;
_local1.uItem4 = false;
_local1.uItem5 = "";
}
};
}
itemTEST = true;
_quality = "high";
bN = 0;
this.stop();
i = 0;
myLevel = 0;
score = 0;
isFirst = true;
RCnt = 100;
LCnt = 101;
CCnt = 0;
if (_root.isItem1 == true) {
_root.itemCnt = 3;
} else {
_root.itemCnt = 0;
}
boardCnt = 50;
score = (buffCnt = 0);
levelScore = 0;
tScore = 800;
this.userLevel = 1;
pDepth = 0;
Li = 0;
Ri = 1;
wallH = 244;
upFlag = true;
if (_root.userLevel < 2) {
gap = 2;
} else if (_root.userLevel == 2) {
gap = 2;
} else if (_root.userLevel > 2) {
gap = 3;
}
termCnt = 10;
sideValue = 85;
rmRTarget = _root.RCnt;
rmLTarget = _root.LCnt;
cloudArray = new Array();
boardArray = new Array();
BooUpSig = false;
isBubble = false;
boardDistance = 60;
rSig = false;
isHited = false;
enemyCnt = 1000;
arrayBoard = [1, 2, 3, 4, 4, 5, 5, 6, 6, 7];
mixing();
_root.LW.attachMovie("w" + ((_root.Li % 3) + 1), "nLW" + _root.LCnt, _root.LCnt);
_root.Li++;
_root.LCnt = _root.LCnt + 2;
_root.RW.attachMovie("w" + ((_root.Ri % 3) + 1), "nRW" + _root.RCnt, _root.RCnt);
_root.Ri++;
_root.RCnt = _root.RCnt + 2;
var dCnt = 3;
while (dCnt >= 0) {
duplicateMovieClip (this.clouds, "cloud" + this.CCnt, this.CCnt);
this["cloud" + this.CCnt]._x = random(180) + this.sideValue;
this["cloud" + this.CCnt].gotoAndStop(random(5) + 1);
this.cloudArray.push("cloud" + this.CCnt);
this["cloud" + this.CCnt]._y = 300 - (this.boardDistance * dCnt);
this.CCnt++;
duplicateMovieClip (this.boards, "board" + this.boardCnt, this.boardCnt);
this["board" + this.boardCnt]._x = random(180) + this.sideValue;
this["board" + this.boardCnt]._y = 300 - (_root.boardDistance * dCnt);
this["board" + this.boardCnt].gotoAndStop(_root.arrayBoard[_root.i]);
if (_root.i >= 9) {
_root.i = 0;
_root.mixing();
} else {
_root.i++;
}
this.boardArray.push("board" + this.boardCnt);
this.boardCnt++;
dCnt--;
}
removeMovieClip(this[this.boardArray[0]]);
dupWall();
_root.skin.MC_stageTXT.gotoAndPlay(2);
Instance of Symbol 76 MovieClip "LW" in Frame 3
onClipEvent (load) {
if (false) {
}
this.swapDepths(this._parent.LCnt);
}
Instance of Symbol 77 MovieClip "RW" in Frame 3
onClipEvent (load) {
if (false) {
}
this.swapDepths(this._parent.RCnt);
}
Instance of Symbol 207 MovieClip "MC_gameOver" in Frame 3
onClipEvent (load) {
if (false) {
}
this.swapDepths(77773);
}
Instance of Symbol 154 MovieClip "Boo" in Frame 3
onClipEvent (load) {
if (false) {
}
this.ax = this._x;
this.ay = this._y;
this.swapDepths(105);
}
Instance of Symbol 210 MovieClip "MC_bubbleItem" in Frame 3
onClipEvent (load) {
if (false) {
}
this.isMove = false;
this.ax = this._x;
this.ay = this._y;
}
Instance of Symbol 213 MovieClip "electronic" in Frame 3
onClipEvent (load) {
if (false) {
}
function appear() {
var _local1 = this;
_local1._visible = true;
_local1.onEnterFrame = function () {
var _local1 = this;
if (_local1._alpha < 100) {
_local1._alpha = _local1._alpha + 3;
} else {
_local1._alpha = 100;
_local1.onEnterFrame = null;
}
};
}
this._visible = false;
}
Instance of Symbol 302 MovieClip "skin" in Frame 3
onClipEvent (load) {
if (false) {
}
this.swapDepths(77777);
}
Frame 4
if (false) {
}
this.stop();
howtomsg.htmlText = "<font color = '#0099ff'><b>\uC190\uC624\uACF5 \uB77D\uB77D</b></font><font color = '#666666'>\n\n \uC88C\uC6B0 \uD654\uC0B4\uD45C \uD0A4\uB97C \uC774\uC6A9\uD558\uC5EC \uC190\uC624\uACF5\uC744 \uC6C0\uC9C1\uC5EC, \uC190\uC624\uACF5\uC774 \uD654\uBA74 \uBC16\uC73C\uB85C \uCD94\uB77D\uD558\uC9C0 \uC54A\uB3C4\uB85D \uD558\uB294 \uAC8C\uC784\uC785\uB2C8\uB2E4. \uBC1C\uD310\uC744 \uBC1F\uC73C\uBA74 \uCD94\uB77D\uC774 \uBA48\uCD94\uBA74\uC11C \uBC1C\uD310\uACFC \uD568\uAED8 \uC0C1\uC2B9\uD558\uAC8C \uB418\uC9C0\uB9CC, \uC808\uBCBD \uC704\uC5D0 \uC788\uB294 \uB3C4\uAE68\uBE44\uC758 \uC804\uAE30\uC5D0 \uB2FF\uC73C\uBA74 \uC5D0\uB108\uC9C0\uAC00 \uAC10\uC18C\uD558\uAE30 \uB54C\uBB38\uC5D0 \uD654\uBA74 \uC911\uAC04\uC758 \uC801\uC808\uD55C \uC704\uCE58\uB97C \uC720\uC9C0\uD574\uC57C \uD569\uB2C8\uB2E4. \uC704\uAE30\uC77C\uBC1C\uC758 \uC21C\uAC04 \uADFC\uB450\uC6B4 \uC544\uC774\uD15C\uC744 \uC0AC\uC6A9\uD558\uBA74 \uADFC\uB450\uC6B4\uC774 \uD615\uC131\uB418\uC5B4 \uC548\uC804\uD55C \uACF3\uC73C\uB85C \uC774\uB3D9\uC2DC\uCF1C \uC90D\uB2C8\uB2E4. \uB2E8, \uC544\uC774\uD15C\uC740 \uAE30\uBCF8 3\uBC88\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAE30\uBCF8 3\uD68C \uC774\uC0C1 \uC0AC\uC6A9\uD558\uB824\uBA74 \uB0A8\uC740 \uC544\uC774\uD15C\uC774 1\uAC1C \uC774\uD558\uC77C\uB54C\uBD80\uD130 \uAC00\uB054\uC529 \uB5A0\uC624\uB974\uB294 \uC544\uC774\uD15C\uC744 \uD68D\uB4DD\uD574\uC57C \uD569\uB2C8\uB2E4. \uC5D0\uB108\uC9C0 \uAC8C\uC774\uC9C0\uAC00 0\uC774 \uB418\uAC70\uB098 \uC190\uC624\uACF5\uC774 \uD654\uBA74 \uBC16\uC73C\uB85C \uCD94\uB77D\uD558\uBA74 \uAC8C\uC784\uC624\uBC84\uB429\uB2C8\uB2E4.\n<br></font><font color = '#0099ff'>\uC870\uC791\uD0A4</font><br><font color = '#666666'>\uC88C\uC6B0\uC774\uB3D9 : \uC88C\uC6B0 \uD654\uC0B4\uD45C\uD0A4<br>\uADFC\uB450\uC6B4 \uC544\uC774\uD15C : \uC2A4\uD398\uC774\uC2A4\uBC14</font> ";
Instance of Symbol 330 MovieClip in Frame 4
on (release) {
if (false) {
}
this._parent.howtomsg.scroll--;
}
Instance of Symbol 332 MovieClip in Frame 4
on (release) {
if (false) {
}
this._parent.howtomsg.scroll++;
}
Instance of Symbol 334 MovieClip in Frame 4
onClipEvent (load) {
if (false) {
}
this._y = 75;
this.y1 = 75;
this.y2 = 208;
txt = this._parent.howtomsg;
this.onEnterFrame = function () {
var _local1 = this;
_local1._x = 224.5;
_local1._y = _local1.y1 + ((_local1.y2 - _local1.y1) * ((txt.scroll - 1) / (txt.maxscroll - 1)));
};
}
onClipEvent (mouseDown) {
if (false) {
}
trace((((((this._x + "_") + this._y) + "_") + this._parent._xmouse) + "_") + this._parent._ymouse);
if (this.hitTest(this._parent._xmouse, this._parent._ymouse)) {
this.startDrag(0, 224.5, this.y1, 224.5, this.y2);
this.onEnterFrame = function () {
var _local1 = this;
_local1._x = 224.5;
txt.scroll = txt.maxscroll * ((_local1._y - _local1.y1) / (_local1.y2 - _local1.y1));
trace((txt.maxscroll + "_") + txt.scroll);
};
}
}
onClipEvent (mouseUp) {
if (false) {
}
this.onEnterFrame = function () {
var _local1 = this;
_local1._x = 224.5;
_local1._y = _local1.y1 + ((_local1.y2 - _local1.y1) * ((txt.scroll - 1) / (txt.maxscroll - 1)));
};
this.stopDrag();
}
Instance of Symbol 71 MovieClip "displayItem" in Frame 4
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 74 MovieClip "itemLoading" in Frame 4
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Frame 13
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 14
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 15
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 16
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 17
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 18
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 19
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 20
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 21
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Frame 22
if (false) {
}
if ((((((_url.substr(0, this.thisGameURL1.length) != "http://www.wagglewaggle.net") && (_url.substr(0, this.thisGameURL1.length) != "http://img.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL2.length) != "http://wagglewaggle.net")) && (_url.substr(0, this.thisGameURL3.length) != "http://minigame.wagglewaggle.net")) && (_url.substr(0, this.thisGameURL4.length) != "http://61.250.81.211")) && (_url.substr(0, this.thisGameURL5.length) != "http://211.219.154.29")) {
removeMovieClip(_root.skin);
stopAllSounds();
this.gotoAndStop(1);
}
Instance of Symbol 17 MovieClip "enemy" in Symbol 18 MovieClip [w1] Frame 1
onClipEvent (load) {
if (false) {
}
if ((_root.userLevel > 2) && (_root.myLevel >= 2)) {
this._visible = true;
this._name = "enemy";
} else {
this._visible = false;
this._name = "meonggae";
}
}
Instance of Symbol 17 MovieClip "enemy" in Symbol 20 MovieClip [w2] Frame 1
onClipEvent (load) {
if (false) {
}
if ((_root.userLevel > 2) && (_root.myLevel >= 2)) {
this._visible = true;
this._name = "enemy";
} else {
this._visible = false;
this._name = "meonggae";
}
}
Instance of Symbol 17 MovieClip "enemy" in Symbol 22 MovieClip [w3] Frame 1
onClipEvent (load) {
if (false) {
}
if ((_root.userLevel > 2) && (_root.myLevel >= 2)) {
this._visible = true;
this._name = "enemy";
} else {
this._visible = false;
this._name = "meonggae";
}
}
Symbol 41 MovieClip Frame 9
if (false) {
}
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
} else {
this.stop();
this.loadingbar.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
_local2._x = (((_local1.getBytesLoaded() * 100) / _local1.getBytesTotal()) * 1.47) + -143.7;
if (_local1.getBytesLoaded() >= _local1.getBytesTotal()) {
_local2.onEnterFrame = null;
_local2._parent.gotoAndPlay("loadingOk");
}
};
}
Symbol 41 MovieClip Frame 31
if (false) {
}
this._parent.gotoAndPlay("loading_ok");
Symbol 41 MovieClip Frame 32
if (false) {
}
if (((((_url.substr(0, _parent._parent.thisGameURL1.length) == "http://www.wagglewaggle.net") || (_url.substr(0, _parent._parent.thisGameURL1.length) == "http://img.wagglewaggle.net")) || (_url.substr(0, _parent._parent.thisGameURL2.length) == "http://wagglewaggle.net")) || (_url.substr(0, _parent._parent.thisGameURL3.length) == "http://minigame.wagglewaggle.net")) || (_url.substr(0, _parent._parent.thisGameURL4.length) == "http://61.250.81.211")) {
_parent.gotoAndPlay("loading_ok");
} else {
this.gotoAndPlay(this._currentframe - 2);
}
Symbol 41 MovieClip Frame 33
if (false) {
}
if (((((_url.substr(0, _parent._parent.thisGameURL1.length) == "http://www.wagglewaggle.net") || (_url.substr(0, _parent._parent.thisGameURL1.length) == "http://img.wagglewaggle.net")) || (_url.substr(0, _parent._parent.thisGameURL2.length) == "http://wagglewaggle.net")) || (_url.substr(0, _parent._parent.thisGameURL3.length) == "http://minigame.wagglewaggle.net")) || (_url.substr(0, _parent._parent.thisGameURL4.length) == "http://61.250.81.211")) {
_parent.gotoAndPlay("loading_ok");
} else {
this.gotoAndPlay(this._currentframe - 3);
}
Symbol 42 MovieClip Frame 1
if (false) {
}
this._parent.thisGameURL1 = "http://www.wagglewaggle.net";
this._parent.thisGameURL2 = "http://wagglewaggle.net";
this._parent.thisGameURL3 = "http://minigame.wagglewaggle.net";
this._parent.thisGameURL4 = "http://61.250.81.211";
this._parent.thisGameURL5 = "http://211.219.154.29";
Symbol 42 MovieClip Frame 18
if (false) {
}
if (_root.isLoaded != "fin") {
_root.isLoaded = "fin";
} else {
this.gotoAndPlay("loading_ok");
}
Symbol 42 MovieClip Frame 19
if (false) {
}
this.stop();
if (Number(_root.userLevel) > 10) {
_root.tempLevel = _root.userLevel.slice(0, 1);
_root.userLevel = _root.userLevel.slice(1, 2);
}
Symbol 42 MovieClip Frame 34
if (false) {
}
this.stop();
this._parent.play();
Symbol 46 Button
on (release) {
if (false) {
}
((helpSnd = new Sound())).attachSound("helpSnd");
helpSnd.start();
_root.gotoAndStop("guide");
}
Symbol 53 Button
on (release, keyPress "<Enter>") {
if (false) {
}
_root.score = 0;
_root.myLevel = 1;
stopAllSounds();
_root.myS.start();
_root.isItem1 = true;
_root.isItem2 = true;
_root.gotoAndPlay("startGame");
}
Symbol 70 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 70 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 70 MovieClip Frame 3
if (false) {
}
this.stop();
Symbol 70 MovieClip Frame 4
if (false) {
}
this.stop();
Symbol 70 MovieClip Frame 5
if (false) {
}
this.stop();
Symbol 70 MovieClip Frame 6
if (false) {
}
this.stop();
Symbol 71 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 71 MovieClip Frame 5
if (false) {
}
myItem = new Array();
if (_root.isItem1 == true) {
var k = this.myItem.push("myItem1");
}
if (_root.isItem2 == true) {
var k = this.myItem.push("myItem2");
}
if (_root.isItem3 == true) {
var k = this.myItem.push("myItem3");
}
if (_root.isItem4 == true) {
var k = this.myItem.push("myItem4");
}
Symbol 71 MovieClip Frame 9
if (false) {
}
this.MC_item1.gotoAndStop(this.myItem[0]);
Symbol 71 MovieClip Frame 13
if (false) {
}
this.MC_item2.gotoAndStop(this.myItem[1]);
Symbol 71 MovieClip Frame 17
if (false) {
}
this.MC_item3.gotoAndStop(this.myItem[2]);
Symbol 71 MovieClip Frame 25
if (false) {
}
this.stop();
this._parent.gotoAndStop("startGame");
this._parent.itemLoading._visible = false;
Symbol 88 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 88 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 88 MovieClip Frame 3
if (false) {
}
this.stop();
Symbol 88 MovieClip Frame 4
if (false) {
}
this.stop();
Symbol 88 MovieClip Frame 5
if (false) {
}
this.stop();
Symbol 91 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 91 MovieClip Frame 2
if (false) {
}
this.stop();
_root.boardSnd.start();
Symbol 95 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 95 MovieClip Frame 2
if (false) {
}
this.stop();
_root.boardSnd.start();
Symbol 97 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 97 MovieClip Frame 2
if (false) {
}
this.stop();
_root.chargeSnd.start();
Symbol 99 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 99 MovieClip Frame 2
if (false) {
}
this.stop();
_root.dischargeSnd.start();
Symbol 106 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 106 MovieClip Frame 2
if (false) {
}
this.stop();
_root.boardSnd.start();
Symbol 112 MovieClip Frame 6
if (false) {
}
this._parent.gotoAndStop(1);
Symbol 113 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 113 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 113 MovieClip Frame 3
if (false) {
}
this.stop();
Symbol 117 MovieClip Frame 6
if (false) {
}
this.stop();
Symbol 119 MovieClip Frame 13
if (false) {
}
this.stop();
Symbol 121 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 121 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 121 MovieClip Frame 3
if (false) {
}
this.stop();
Symbol 127 MovieClip Frame 6
if (false) {
}
if ((!Key.isDown(37)) && (!Key.isDown(39))) {
this._parent.gotoAndStop(1);
}
Symbol 128 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 128 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 128 MovieClip Frame 3
if (false) {
}
this.stop();
Symbol 141 MovieClip Frame 19
if (false) {
}
this.gotoAndPlay(1);
Symbol 143 MovieClip Frame 20
if (false) {
}
this.stop();
Symbol 147 MovieClip Frame 10
if (false) {
}
this.gotoAndPlay("replay");
Symbol 151 MovieClip Frame 20
if (false) {
}
this.stop();
Symbol 153 MovieClip Frame 1
if (false) {
}
this.stop();
this.state = "st";
this._parent.noHit._name = "inHit";
Symbol 153 MovieClip Frame 6
if (false) {
}
this.stop();
_root.jumpSnd.start();
this.state = "jump";
this._parent.noHit._name = "inHit";
Symbol 153 MovieClip Frame 11
if (false) {
}
this.stop();
this.state = "charge";
this._parent.noHit._name = "inHit";
Symbol 153 MovieClip Frame 16
if (false) {
}
this.stop();
this.state = "discharge";
this._parent.noHit._name = "inHit";
Symbol 153 MovieClip Frame 21
if (false) {
}
this.stop();
this.state = "shock";
this._parent.noHit._name = "inHit";
Symbol 153 MovieClip Frame 26
if (false) {
}
this.stop();
this.state = "electricDie";
this._parent.noHit._name = "inHit";
Symbol 153 MovieClip Frame 31
if (false) {
}
this.stop();
this.state = "generalDie";
this._parent.noHit._name = "inHit";
Symbol 153 MovieClip Frame 36
if (false) {
}
this.state = "makeBubble";
this._parent.inHit._name = "noHit";
_root.bubbleSnd.start();
Symbol 153 MovieClip Frame 41
if (false) {
}
this.stop();
Symbol 153 MovieClip Frame 42
if (false) {
}
this.state = "vanishBubble";
this._parent.noHit._name = "inHit";
Symbol 153 MovieClip Frame 55
if (false) {
}
_root.isBubble = false;
this.gotoAndStop("st");
Symbol 156 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 156 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 157 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 157 MovieClip Frame 2
if (false) {
}
this.stop();
_root.boardSnd.start();
Symbol 161 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 161 MovieClip Frame 2
if (false) {
}
this.stop();
_root.boardSnd.start();
Symbol 162 MovieClip Frame 1
if (false) {
}
this.stop();
this.state = "normal";
Symbol 162 MovieClip Frame 2
if (false) {
}
this.stop();
this.state = "fish";
Symbol 162 MovieClip Frame 3
if (false) {
}
this.stop();
this.state = "charge";
Symbol 162 MovieClip Frame 4
if (false) {
}
this.stop();
this.state = "disCharge";
Symbol 162 MovieClip Frame 5
if (false) {
}
this.stop();
this.state = "rail";
if (random(2) == 0) {
this.dir = -1;
this.inBoard._xscale = 100;
} else {
this.dir = 1;
this.inBoard._xscale = -100;
}
this.onEnterFrame = function () {
var _local1 = _root;
if (_local1.Boo.hitTest(this) && (_local1.upFlag == true)) {
_local1.Boo._x = _local1.Boo._x + (3.5 * this.dir);
}
};
Symbol 162 MovieClip Frame 6
if (false) {
}
this.stop();
this.state = "rotating";
this.dir = -1;
if ((_root.myLevel >= 3) && (_root.userLevel >= 1)) {
this.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local2.upFlag == true) {
if (_local2.Boo.inHit.hitTest(_local1)) {
_local2.rSig = true;
_local1.inPoint = new Object();
_local1.inPoint.x = _local2.Boo._x;
_local1.inPoint.y = _local2.Boo._y;
globalToLocal(_local1.inPoint);
_local2.Boo._x = 500;
_local2.Boo._y = 150;
_local2.Boo._visible = false;
_local1.Boo._visible = true;
_local1.Boo._x = _local1.inPoint.x;
_local1.onEnterFrame = null;
if (_local2.Boo.dirPos == "left") {
_local1.Boo._xscale = 100;
} else if (_local2.Boo.dirPos == "right") {
_local1.Boo._xscale = -100;
}
_local1.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local1.Boo.inHit.hitTest(_local1.hitArea)) {
_local2.Boo._x = 500;
_local2.Boo._y = 150;
_local1.inBoard.rotatingFish.gotoAndStop(2);
_local1.inBoard.gotoAndStop(2);
_local1._rotation = _local1.Boo._x;
if ((_local1.Boo._x > -4) && (_local1.Boo._x < 4)) {
_local1.Boo._x = _local1.Boo._x + (_local1.Boo._x / 2);
} else if (_local1.Boo._x > 0) {
_local1.Boo._x = _local1.Boo._x + 4;
} else {
_local1.Boo._x = _local1.Boo._x - 4;
}
if ((_local2.rSig == true) && (Key.isDown(37))) {
_local1.inBoard.rotatingFish.gotoAndStop(2);
_local1.inBoard.gotoAndStop(2);
_local2.Boo.dirPos = "left";
_local1.Boo._xscale = 100;
_local1.Boo._x = _local1.Boo._x - 5;
} else if ((_local2.rSig == true) && (Key.isDown(39))) {
_local1.inBoard.rotatingFish.gotoAndStop(2);
_local1.inBoard.gotoAndStop(2);
_local2.Boo.dirPos = "right";
_local1.Boo._xscale = -100;
_local1.Boo._x = _local1.Boo._x + 5;
}
if (_local1._y < (_local2.electronic._y + 20)) {
_local1.Boo.Boo_In.gotoAndStop("shock");
if (_local2.skin.EnerGage._width > 1) {
_local2.skin.EnerGage._width = _local2.skin.EnerGage._width - 1;
} else {
_local2.skin.EnerGage._width = 0;
_local1.onEnterFrame = null;
_local1.Boo.gotoAndStop("electricDie");
}
}
} else {
_local1.inBoard.rotatingFish.gotoAndStop(1);
_local1.inBoard.gotoAndStop(1);
_local1.onEnterFrame = null;
_local1.outPoint = new Object();
_local1.outPoint.x = _local1.Boo._x;
_local1.outPoint.y = _local1.Boo._y;
localToGlobal(_local1.outPoint);
_local1._rotation = 0;
if (_local2.Boo.dirPos == "left") {
_local2.Boo._xscale = 100;
} else if (_local2.Boo.dirPos == "right") {
_local2.Boo._xscale = -100;
}
_local2.Boo._x = _local1.outPoint.x;
_local2.Boo._y = _local1.outPoint.y;
_local2.rSig = false;
_local1.Boo._x = _local1.Boo.ax;
_local1.Boo._y = _local1.Boo.ay;
_local1.Boo._visible = false;
_local2.Boo._visible = true;
}
};
}
}
};
} else {
this.gotoAndStop(2);
}
Instance of Symbol 154 MovieClip "Boo" in Symbol 162 MovieClip Frame 6
onClipEvent (load) {
if (false) {
}
this._visible = false;
this.ax = this._x;
this.ay = this._y;
}
Symbol 162 MovieClip Frame 7
if (false) {
}
this.stop();
this.state = "cuttleFish";
this.dir = -1;
this.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local2.upFlag == true) {
_local1._x = _local1._x + (5 * _local1.dir);
if (_local2.Boo.inHit.hitTest(_local1)) {
_local2.Boo._x = _local2.Boo._x + (5 * _local1.dir);
}
if ((_local1._x < _local1._parent.sideValue) || (_local1._x > ((_local1._parent.sideValue * 3) + 20))) {
if (_local1.dir < 0) {
_local1._x = _local1._x + 5;
} else if (_local1.dir > 0) {
_local1._x = _local1._x - 5;
}
_local1.dir = _local1.dir * -1;
_local1._xscale = _local1._xscale * -1;
}
}
};
Symbol 163 Button
on (keyPress "1") {
if (false) {
}
_root.Boo.Boo_In.gotoAndStop("st");
}
on (keyPress "2") {
if (false) {
}
_root.Boo.Boo_In.gotoAndStop("charge");
}
on (keyPress "3") {
if (false) {
}
_root.Boo.Boo_In.gotoAndStop("discharge");
}
on (keyPress "4") {
if (false) {
}
_root.Boo.Boo_In.gotoAndStop("shock");
}
on (keyPress "5") {
if (false) {
}
_root.Boo.Boo_In.gotoAndStop("electricDie");
}
on (keyPress "6") {
if (false) {
}
_root.Boo.Boo_In.gotoAndStop("generalDie");
}
on (keyPress "7") {
if (false) {
}
_root.Boo.Boo_In.gotoAndPlay("makeBubble");
}
on (keyPress "8") {
if (false) {
}
_root.Boo.Boo_In.gotoAndPlay("vanishBubble");
}
on (keyPress "a") {
if (false) {
}
this.bN = 0;
_root.itemTEST = true;
}
on (keyPress "b") {
if (false) {
}
this.bN = 0;
_root.itemTEST = false;
}
Symbol 177 MovieClip Frame 1
if (false) {
}
this._visible = 0;
stop();
Symbol 182 Button
on (release, keyPress "<Enter>") {
if (false) {
}
_root.mySendScore();
this._visible = false;
}
Instance of Symbol 176 MovieClip "scoreView" in Symbol 191 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
var _local1 = this;
_local1._parent._visible = 1;
_local1._parent._parent.isSaving._visible = true;
var s7 = (Math.floor((score % 10000000) / 1000000) + 1);
var s6 = (Math.floor((score % 1000000) / 100000) + 1);
var s5 = (Math.floor((score % 100000) / 10000) + 1);
var s4 = (Math.floor((score % 10000) / 1000) + 1);
var s3 = (Math.floor((score % 1000) / 100) + 1);
var s2 = (Math.floor((score % 100) / 10) + 1);
var s1 = (Math.floor(score % 10) + 1);
if (score > 0) {
snd.start(0, 999);
}
num1.gotoAndStop(1);
num1.play();
num1.onEnterFrame = function () {
var _local1 = this;
if (_local1._currentframe == (s1 + 1)) {
_local1.stop();
if (score < 10) {
snd.stop();
}
num2.gotoAndStop(1);
num2.play();
num2.onEnterFrame = function () {
var _local1 = this;
if (_local1._currentframe == (s2 + 1)) {
_local1.stop();
if (score < 100) {
snd.stop();
}
num3.gotoAndStop(1);
num3.play();
num3.onEnterFrame = function () {
var _local1 = this;
if (_local1._currentframe == (s3 + 1)) {
_local1.stop();
if (score < 1000) {
snd.stop();
}
num4.gotoAndStop(1);
num4.play();
num4.onEnterFrame = function () {
var _local1 = this;
if (_local1._currentframe == (s4 + 1)) {
trace(1);
_local1.stop();
if (score < 10000) {
snd.stop();
}
num5.gotoAndStop(1);
num5.play();
num5.onEnterFrame = function () {
var _local1 = this;
if (_local1._currentframe == (s5 + 1)) {
_local1.stop();
if (score < 100000) {
snd.stop();
}
num6.gotoAndStop(1);
num6.play();
num6.onEnterFrame = function () {
var _local1 = this;
if (_local1._currentframe == (s6 + 1)) {
_local1.stop();
if (score < 100000) {
snd.stop();
}
num7.gotoAndStop(1);
num7.play();
num7.onEnterFrame = function () {
var _local1 = this;
if (_local1._currentframe == (s7 + 1)) {
_local1.stop();
_local1._parent.snd.stop("dding");
_local1._parent._parent.scoreItemMovie.view();
_local1.onEnterFrame = null;
}
};
_local1.onEnterFrame = null;
}
};
_local1.onEnterFrame = null;
}
};
_local1.onEnterFrame = null;
}
};
_local1.onEnterFrame = null;
}
};
_local1.onEnterFrame = null;
}
};
_local1.onEnterFrame = null;
}
};
}
i = 1;
while (i < 8) {
this["num" + i].gotoAndStop(1);
i++;
}
snd = new Sound(this);
snd.attachSound("dding");
}
Instance of Symbol 177 MovieClip "scoreItemMovie" in Symbol 191 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
view = function () {
var _local1 = this;
var _local2 = _root;
trace("item");
_local1.i = 0;
if (_local2.isItem3 == 1) {
_local1.gotoAndStop(2);
} else if (_local2.isItem4 == 1) {
_local1.gotoAndStop(3);
} else if (_local2.isItem5 == 1) {
_local1.gotoAndStop(4);
} else {
_local1._visible = 0;
_local2.MC_gameOver.gotoAndPlay("replay");
return(0);
}
_local1.onEnterFrame = function () {
var _local1 = this;
_local1.i++;
if (_local1.i > 6) {
_local1._visible = 1;
}
if ((_local1.i >= 6) && (_local1.i < 12)) {
if ((_local1.i % 2) == 0) {
_local1._visible = 0;
} else {
_local1._visible = 1;
}
} else if (_local1.i == 24) {
_local1._parent.scoreView.scoreView(_root.score);
_local1.onEnterFrame = null;
_root.MC_gameOver.gotoAndPlay("replay");
}
};
return(undefined);
};
}
Instance of Symbol 189 MovieClip "submitBtn" in Symbol 191 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Symbol 201 MovieClip Frame 35
if (false) {
}
this.gotoAndPlay(1);
Symbol 206 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 206 MovieClip Frame 3
if (false) {
}
this.stop();
Symbol 206 MovieClip Frame 4
if (false) {
}
this.stop();
Symbol 207 MovieClip Frame 1
if (false) {
}
stop();
this.isSaving._visible = false;
Instance of Symbol 191 MovieClip "finalScoreView" in Symbol 207 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = 0;
}
Instance of Symbol 206 MovieClip "isSaving" in Symbol 207 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Symbol 207 MovieClip Frame 33
if (false) {
}
this.stop();
stopAllSounds();
tempScore = _root.score;
if (_root.isItem3) {
_root.score = _root.score * 2;
} else if (_root.isItem4) {
_root.score = _root.score * 3;
}
if (_root.score <= 0) {
this.finalScoreView.scoreView.scoreView(0);
} else {
this.finalScoreView.scoreView.scoreView(this.tempscore);
}
Symbol 207 MovieClip Frame 47
if (false) {
}
Symbol 207 MovieClip Frame 67
if (false) {
}
_root.gotoAndStop("main");
this.stop();
stopAllSounds();
delete _root.encodeOb;
_root.deleteAll();
Symbol 220 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 220 MovieClip Frame 25
if (false) {
}
this.stop();
_root.electronic.appear();
Symbol 222 MovieClip Frame 1
if (false) {
}
this.stop();
this._visible = false;
Symbol 222 MovieClip Frame 2
if (false) {
}
((nextSnd = new Sound())).attachSound("nextSnd");
nextSnd.start();
this._parent.dirLamp.gotoAndStop("none");
Symbol 222 MovieClip Frame 44
if (false) {
}
_root.pDepth = 0;
_root.levelScore = 0;
this._parent.depthLine.depthBall._y = 0;
this._parent.MC_stageTXT.gotoAndPlay(2);
this.gotoAndStop(1);
Symbol 230 MovieClip Frame 6
if (false) {
}
this.stop();
Symbol 232 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 232 MovieClip Frame 2
if (false) {
}
this.play();
_root.myLevel++;
this._parent.stgN.stgView(_root.myLevel);
Instance of Symbol 230 MovieClip "mission" in Symbol 232 MovieClip Frame 2
onClipEvent (load) {
if (false) {
}
if (_root.myLevel < 6) {
this.gotoAndStop(_root.myLevel);
if (_root.myLevel == 0) {
this.gotoAndStop(1);
}
} else {
this.gotoAndStop("freeStage");
}
}
Symbol 232 MovieClip Frame 15
if (false) {
}
if (_root.isFirst == true) {
_root.bgMusic.start(0, 9999);
}
Symbol 232 MovieClip Frame 56
if (false) {
}
if (_root.myLevel == 2) {
_root.electricEels.gotoAndPlay(2);
} else if ((_root.myLevel > 3) && (_root.gap < 3)) {
_root.gap = _root.gap + 0.5;
}
Symbol 232 MovieClip Frame 77
if (false) {
}
this.gotoAndStop(1);
_root.upFlag = true;
if (_root.isFirst == true) {
_root.isFirst = false;
_root.selectLevel();
_root.wallUp();
}
if ((_root.myLevel >= 2) && (_root.userLevel >= 2)) {
_root.shakeEel();
}
Symbol 247 MovieClip Frame 1
if (false) {
}
this.blackBoard.useHandCursor = false;
Instance of Symbol 251 MovieClip "MC_gage" in Symbol 252 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this.barWidth = this._width;
}
Symbol 257 MovieClip Frame 1
if (false) {
}
this.stop();
this.dir = "";
Symbol 257 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 257 MovieClip Frame 3
if (false) {
}
this.stop();
Symbol 257 MovieClip Frame 4
if (false) {
}
this.stop();
Instance of Symbol 270 MovieClip "s1" in Symbol 271 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this.stop();
}
Instance of Symbol 270 MovieClip "s10" in Symbol 271 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this.stop();
}
Instance of Symbol 270 MovieClip "num" in Symbol 272 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this.stop();
}
Instance of Symbol 271 MovieClip "num" in Symbol 272 MovieClip Frame 2
onClipEvent (load) {
if (false) {
}
this.stop();
}
Symbol 278 Button
on (release) {
if (false) {
}
_root.sndvolume.setVolume(0);
nextFrame();
}
Symbol 280 Button
on (release) {
if (false) {
}
_root.sndvolume.setVolume(100);
prevFrame();
}
Symbol 281 MovieClip Frame 1
if (false) {
}
stop();
Symbol 285 Button
on (release, keyPress "p") {
if (false) {
}
_root.upFlag = false;
this._parent.pausing._visible = true;
_root.sndvolume.setVolume(0);
if (_root.skin.MC_stageTXT._currentframe > 1) {
_root.skin.MC_stageTXT.stop();
}
if (_root.skin.nextLevel._currentframe > 1) {
_root.skin.nextLevel.stop();
}
this.gotoAndStop(2);
}
Symbol 300 Button
on (release, keyPress "p") {
if (false) {
}
_root.upFlag = true;
this._parent.pausing._visible = false;
_root.sndvolume.setVolume(100);
if (_root.skin.MC_stageTXT._currentframe > 1) {
_root.skin.MC_stageTXT.play();
}
if (_root.skin.nextLevel._currentframe > 1) {
_root.skin.nextLevel.play();
}
this.gotoAndStop(1);
}
Symbol 301 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 301 MovieClip Frame 2
if (false) {
}
this.stop();
Instance of Symbol 234 MovieClip "viewItem3" in Symbol 302 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
if (_root.itemCnt > 0) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 234 MovieClip "viewItem2" in Symbol 302 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
if (_root.itemCnt > 0) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 234 MovieClip "viewItem1" in Symbol 302 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
if (_root.itemCnt > 0) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 247 MovieClip "pausing" in Symbol 302 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 269 MovieClip "Gscore" in Symbol 302 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
var s8 = Math.floor((score % 100000000) / 10000000);
var s7 = Math.floor((score % 10000000) / 1000000);
var s6 = Math.floor((score % 1000000) / 100000);
var s5 = Math.floor((score % 100000) / 10000);
var s4 = Math.floor((score % 10000) / 1000);
var s3 = Math.floor((score % 1000) / 100);
var s2 = Math.floor((score % 100) / 10);
var s1 = Math.floor(score % 10);
i = 1;
while (i <= 8) {
this["n" + i].gotoAndStop(eval ("s" + i) + 1);
i++;
}
}
i = 1;
while (i <= 8) {
this["n" + i].stop();
i++;
}
}
Instance of Symbol 272 MovieClip "stgN" in Symbol 302 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function stgView(stg) {
var _local1 = this;
var _local2 = stg;
if (_local2 < 10) {
_local1.gotoAndStop(1);
_local1.num.gotoAndStop(_local2 + 1);
} else {
_local1.gotoAndStop(2);
_local1.num.s1.gotoAndStop((_local2 % 10) + 1);
_local1.num.s10.gotoAndStop((_local2 / 10) + 1);
}
}
this.stop();
this.stgView(_root.myLevel);
}
Instance of Symbol 281 MovieClip in Symbol 302 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
_root.sndvolume = new Sound();
if (_root.sndvolume.getVolume() > 0) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}