Frame 1
if (false) {
}
function auDebut() {
score = 0;
scoreString = tempSecureArray[score];
rScore = tempSecureArray[0];
}
function enclosure(num) {
if (comparable(score) != rScore) {
modify();
}
score = score + num;
rest0 = score;
rScore = comparable(rest0);
}
function comparable(rest0) {
scoreString = "";
var rest0String = String(rest0);
var num = rest0String.length;
var i = num;
while (i >= 1) {
this["di" + i] = 1;
this["rest" + i] = 0;
this["mok" + i] = 0;
i--;
}
if (num != 0) {
var i = num;
while (i >= 1) {
var j = 1;
while (j < i) {
this["di" + i] = this["di" + i] * 10;
j++;
}
i--;
}
var i = 0;
while (i < num) {
this["rest" + (i + 1)] = this["rest" + i] % this["di" + (num - i)];
this["mok" + (i + 1)] = (this["rest" + i] - this["rest" + (i + 1)]) / this["di" + (num - i)];
scoreString = scoreString.concat(tempSecureArray[this["mok" + (i + 1)]]);
i++;
}
}
return(scoreString);
}
function modify() {
score = convertStringToNumber(rScore);
return(score);
}
function convertStringToNumber(rScore) {
var rScoreArray = [];
var rScoreNumber = 0;
var num = rScore.length;
var i = 0;
while (i < num) {
rScoreArray[i] = rScore.slice(i, i + 1);
i++;
}
var i = 0;
while (i < 10) {
var j = 0;
while (j < num) {
if (tempSecureArray[i] == rScoreArray[j]) {
_root["mok" + (j + 1)] = i;
}
j++;
}
i++;
}
var i = num;
while (i >= 1) {
this["di" + i] = 1;
i--;
}
if (num != 0) {
var i = num;
while (i >= 1) {
var j = 1;
while (j < i) {
this["di" + i] = this["di" + i] * 10;
j++;
}
i--;
}
}
var i = 0;
while (i < num) {
rScoreNumber = rScoreNumber + (_root["mok" + (i + 1)] * _root["di" + (num - i)]);
i++;
}
return(rScoreNumber);
}
function secureSave(values) {
var $secureArr = ["u", "d", "k", "b", "c", "x", "o", "m", "n", "g"];
var $makeStringV = String(values);
var $buffVar = "";
var $myVar = "";
var i = 0;
while (i < $makeStringV.length) {
var ii = 0;
while (ii < 10) {
if ($makeStringV.slice(i, i + 1) == ii) {
$buffVar = $buffVar + (($secureArr[ii] + $secureArr[random(10)]) + $secureArr[random(10)]);
break;
}
ii++;
}
i++;
}
$myVar = $buffVar;
return($myVar);
}
function deSecure(myString) {
var $secureArr = ["u", "d", "k", "b", "c", "x", "o", "m", "n", "g"];
var $buffVar = "";
var $myVar = 0;
var i = 0;
while (i < myString.length) {
var ii = 0;
while (ii < 10) {
if (myString.slice(i, i + 3).slice(0, 1) == $secureArr[ii]) {
$buffVar = $buffVar + String(ii);
break;
}
ii++;
}
i = i + 3;
}
$myVar = Number($buffVar);
return($myVar);
}
var tempSecureArray = ["j", "e", "z", "k", "c", "y", "q", "n", "i", "b"];
auDebut();
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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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 () {
if (this._parent.dropBlock(this) == 0) {
this.onEnterFrame = null;
this.onRelease = function () {
trace("\uC544\uC774\uD15C111 : " + _global.item1);
if (_global.item1 == 1) {
trace((this.y + "_____") + _global.item1);
chkArray = [];
var it = 0;
while (it < 5) {
chkArray[i] = this._parent.pArray[it][this.y];
it++;
}
var it = 0;
while (it < 5) {
this._parent.removePipe(this._parent.pArray[it][this.y]);
waterAmount = waterAmount - outWater;
if (waterAmount <= 0) {
waterAmount = 0;
}
it++;
}
_global.item1 = 5;
this._parent.item1Number = this._parent.item1Number - 1;
this._tempnum = new String(this._parent.item1Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item1Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item1Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item1Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox1.gotoAndStop(1);
_1num = "";
_2num = "";
} else if (_global.item1 == 4) {
if (((Math.abs(this.x - _global.tempPipe.x) == 1) && (Math.abs(this.y - _global.tempPipe.y) == 0)) || ((Math.abs(this.x - _global.tempPipe.x) == 0) && (Math.abs(this.y - _global.tempPipe.y) == 1))) {
_global.item1 = 5;
_global.tempPipeNum2 = this._1_pipe._currentframe;
_global.tempPipe1Num2 = this._1_pipe._2_pipe._currentframe;
this.tempRan = _global.tempPipeNum;
_global.tempPipe.tempRan = _global.tempPipeNum2;
_global.tempPipe._1_pipe.gotoAndStop(_global.tempPipeNum2);
_global.tempPipe._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num2);
_global.tempPipe._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(_global.tempPipe1Num);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item2Number = this._parent.item2Number - 1;
this._tempnum = new String(this._parent.item2Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item2Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item2Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item2Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox2.gotoAndStop(1);
_1num = "";
_2num = "";
_global.chkStart2 = 1;
}
} else if (_global.item1 == 2) {
_global.item1 = 4;
_global.tempPipe = this;
_global.tempPipeNum = this._1_pipe._currentframe;
_global.tempPipe1Num = this._1_pipe._2_pipe._currentframe;
trace("\uD30C\uC774\uD504 : " + _global.tempPipeNum);
} else if (_global.item1 == 3) {
_global.item1 = 5;
this.tempRan = _global.targetRan;
trace((this.tempRan + "_____") + _global.targetRan);
this._1_pipe.gotoAndStop(this.tempRan);
this._1_pipe._2_pipe.gotoAndStop(1);
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
this._parent.item3Number = this._parent.item3Number - 1;
this._tempnum = new String(this._parent.item3Number);
this._1num = this._tempnum.slice(-1);
if (this._parent.item3Number > 9) {
this._2num = this._tempnum.slice(-2, -1);
}
this._parent.item3Num.score1.gotoAndStop(Number(this._1num) + 1);
this._parent.item3Num.score2.gotoAndStop(Number(this._2num) + 1);
this._parent.itemBox3.gotoAndStop(1);
_global.targetRan = 0;
_1num = "";
_2num = "";
_global.chkStart2 = 1;
} else if (_global.item1 == 0) {
trace("\uC6D0\uB798 \uD30C\uC774\uD504 : " + this.tempRan);
if (this._1_pipe._2_pipe._currentframe == 1) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [1, 0, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 0, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [1, 0, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 2) {
if (this.tempRan == 1) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 2) {
this.value = [0, 1, 0, 1];
} else if (this.tempRan == 3) {
this.value = [1, 1, 0, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 0, 1];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else if (this._1_pipe._2_pipe._currentframe == 3) {
if (this.tempRan == 1) {
this.value = [1, 1, 0, 0];
} else if (this.tempRan == 2) {
this.value = [0, 1, 1, 0];
} else if (this.tempRan == 3) {
this.value = [0, 1, 1, 1];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 1, 0, 0];
}
this._1_pipe._2_pipe.nextFrame();
_global.chkStart2 = 1;
} else {
if (this.tempRan == 1) {
this.value = [0, 0, 1, 1];
} else if (this.tempRan == 2) {
this.value = [1, 0, 1, 0];
} else if (this.tempRan == 3) {
this.value = [1, 1, 1, 0];
} else if (this.tempRan == 4) {
this.value = [1, 1, 1, 1];
} else {
this.value = [0, 0, 1, 0];
}
this._1_pipe._2_pipe.gotoAndStop(1);
_global.chkStart2 = 1;
}
this._1_pipe._2_pipe._3_pipe.gotoAndStop(1);
trace("\uCCB4\uD06C : " + _global.chkStart);
}
if (_global.item1 == 5) {
_global.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);
_quality = "high";
fscommand ("allowscale", false);
Frame 2
if (false) {
}
function mySendScore() {
_root.enclosure(0);
this._parent.waggleGameOver(Number(_root.score));
}
this.stop();
_quality = "high";
_root.run.removeMovieClip();
_root.createEmptyMovieClip("run", 10);
_root.flying.removeMovieClip();
_root.createEmptyMovieClip("flying", 11);
((bgMusic = new Sound(this))).attachSound("bgMusic");
((throwSnd = new Sound(this))).attachSound("throwSnd");
((runSnd = new Sound(_root.run))).attachSound("runSnd");
((flyingSnd = new Sound(_root.flying))).attachSound("flyingSnd");
((foulSnd = new Sound(this))).attachSound("foulSnd");
((shoutSnd = new Sound(this))).attachSound("shoutSnd");
((rewindSnd = new Sound(this))).attachSound("rewindSnd");
((blinkSnd = new Sound(this))).attachSound("blinkSnd");
((myS = new Sound(this))).attachSound("over");
_root.runSnd.setVolume(50);
_root.flyingSnd.setVolume(70);
Frame 3
if (false) {
}
function initVar() {
_root.spear2.inSpear.spearX._xscale = 100;
_root.spear.onEnterFrame = function () {
if (_root.isPause == false) {
_root.isFoul = false;
_root.whiteLine.vanishLine();
if (_root.isFirst == true) {
_root.isFirst = false;
} else {
_root.BG._x = _root.BG._x + Math.abs((_root.BG.ax - _root.BG._x) / 2);
_root.MC_extra._x = _root.MC_extra._x + Math.abs((_root.BG.ax - _root.BG._x) / 2);
_root.whiteLine._x = _root.whiteLine._x + Math.abs((_root.BG.ax - _root.BG._x) / 2);
}
if (_root.BG._x >= (_root.BG.ax - 0.5)) {
_root.MC_extra._x = _root.MC_extra.ax;
_root.MC_extra._y = _root.MC_extra.ay;
_root.whiteLine._x = _root.whiteLine.ax;
_root.whiteLine._width = _root.whiteLine.myWidth;
this.onEnterFrame = null;
_root.T = 0;
_root.G = 2;
_root.P = 25;
_root.distX = 0;
_root.flyingN = 0;
_root.rightLimit = 300;
_root.topLimit = 20;
_root.shootSig = false;
_root.isReady = true;
_root.bgMove = false;
this._x = this.ax;
this._y = this.ay;
_root.prevX = this.spear._x;
_root.prevY = this.spear._y;
_root.spear2._x = this._x;
_root.spear2._y = this._y;
_root.spear._rotation = (_root.spear2._rotation = -3);
_root.spear2.dir = -1;
_root.spear2.blinkSpearN = 0;
_root.spear2._rotation = _root.spear2._rotation - 180;
_root.spear2.onEnterFrame = function () {
this._alpha = this._alpha + (10 * this.dir);
if ((this._alpha <= 0) || (this._alpha >= 100)) {
this.dir = this.dir * -1;
this.blinkSpearN++;
if ((this._alpha >= 100) && (this.blinkSpearN > 5)) {
this.onEnterFrame = null;
_root.mouseShow._visible = true;
_root.mouseShow.gotoAndPlay(2);
_root.MC_shootBTN.gotoAndStop("ready");
}
}
};
}
}
};
}
function isThrow() {
_root.Viewer.appear();
this.distinguishN = 0;
if ((_root.isFoul == true) || (_root.spear2._rotation < 10)) {
_root.BG.MC_DalBong.running.gotoAndPlay("foul");
} else {
_root.BG.MC_DalBong.running.gotoAndPlay("fin");
}
_root.spear2.inSpear.spearX.MC_inS.gotoAndPlay(2);
_root.onEnterFrame = function () {
if (_root.isPause == false) {
this.spear.theta = this.spear._rotation * -1;
if (this.shootSig == true) {
this.distinguishN = this.distinguishN + 0.001;
if (_root.spear2._x >= _root.BG._x) {
if ((this.spear._x - this.BG._x) > 0) {
this.distX = ((this.spear._x - this.BG._x) / 1.55) + (random(1000) / 1000);
this.distX = this.distX + this.distinguishN;
this.displayingNowScore();
trace("\uBE44\uAC70\uB9AC = " + this.distX);
}
}
this.T = this.T + 3;
this.prevX = this.spear._x;
this.prevY = this.spear._y;
this.spear._x = this.spear._x + ((this.P * Math.cos((Math.PI/180) * this.spear.theta)) / 3);
this.BG._x = this.BG._x - ((this.buffM = (90 + this.spear._rotation) / 5));
this.whiteLine._x = this.whiteLine._x - this.buffM;
this.whiteLine._width = this.whiteLine._width + this.buffM;
this.spear._y = this.spear._y - ((this.gap = ((this.P * Math.sin((Math.PI/180) * this.spear.theta)) - ((0.5 * this.G) * Math.sqrt(this.T, 2))) / 3));
if (this.spear2._rotation > 0) {
this.G = this.G + 0.01;
}
if (this.BG._y < this.BG.ay) {
this.bgMove = false;
this.BG._y = this.BG.ay;
} else if (this.bgMove == true) {
this.BG._y = this.BG._y + this.gap;
}
this.spear2._x = this.spear._x;
this.spear2._y = this.spear._y;
if (this.spear._x > this.rightLimit) {
this.spear2._x = this.rightLimit;
this.BG._x = this.BG._x + 0;
}
this.spear2._rotation = (Math.atan2(this.prevY - this.spear._y, this.prevX - this.spear._x) * 180) / Math.PI;
_root.spear2.inSpear.spearX._xscale = -100;
this.prevX = this.spear._x;
this.prevY = this.spear._y;
}
if ((this.spear._y > (this.spear.ay + 5)) && (this.shootSig == true)) {
this.spear._y = this.spear.ay;
this.shootSig = false;
this.onEnterFrame = null;
_root.flyingSnd.stop();
_root.stopSnd.start();
_root.spear2.inSpear.spearX.gotoAndPlay("shake");
this.MC_extra.gotoAndPlay(1);
this.MC_extra._y = _root.spear2._y + (_root.spear2._height / 2);
this.whiteLine._y = _root.spear2._y + (_root.spear2._height / 2);
this.whiteLine._width = (this.whiteLine.myWidth - this.whiteLine._x) - 20;
this.MC_extra.onEnterFrame = function () {
if (_root.isPause == false) {
_root.meterScopeSnd.start(0, 999);
this._x = this._x + 5;
_root.whiteLine._width = _root.whiteLine._width + 5;
if (this._x >= (_root.spear2._x + (_root.spear2._width / 2))) {
this._x = _root.spear2._x + (_root.spear2._width / 2);
_root.whiteLine._width = this._x - _root.whiteLine._x;
this.gotoAndStop("steady");
this.onEnterFrame = null;
_root.meterScopeSnd.stop("meterScopeSnd");
_root.displayNowScoreFin();
_root.MC_shootBTN.gotoAndStop("isAgain");
_root.Viewer.vanish();
}
}
};
}
}
};
}
function displayThisScore() {
_root.skin["bScore" + _root.lifeNumb]._visible = true;
_root.skin["bScore" + _root.lifeNumb].Gscore1.scoreView(_root.distArray1[5 - _root.lifeNumb]);
_root.skin["bScore" + _root.lifeNumb].Gscore2.scoreView(_root.distArray2[5 - _root.lifeNumb]);
if ((_root.lifeNumb >= 5) && (_root.isFoul != true)) {
_root.changeColor(_root.skin.bScore5);
_root.highScore = _root.distX;
}
if ((_root.distArray[5 - _root.lifeNumb] >= _root.highScore) && (_root.isFoul != true)) {
_root.shoutSnd.start();
var ln = 5;
while (ln > _root.lifeNumb) {
_root.changeColorB(_root.skin["bScore" + ln]);
ln--;
}
_root.changeColorR(_root.skin["bScore" + _root.lifeNumb]);
_root.highScore = _root.distX;
trace("\uCD5C\uACE0\uC810 = " + _root.highScore);
_root.skin.Gscore1.scoreView(_root.distArray1[5 - _root.lifeNumb]);
_root.skin.Gscore2.scoreView(_root.distArray2[5 - _root.lifeNumb]);
}
_root.skin["bScore" + _root.lifeNumb].blink();
_root.skin["MC_life" + _root.lifeNumb]._visible = false;
_root.lifeNumb--;
this.distinguishN = 0;
_root.flyingSnd.stop("flyingSnd");
}
function displayingNowScore() {
var myNowPointA = "";
var myNowPointB = "";
var distSpear = String(Math.floor(_root.distX * 1000));
var i = 0;
while (i < (distSpear.length - 3)) {
myNowPointA = myNowPointA + distSpear.slice(i, i + 1);
i++;
}
var j = i;
while (j < (i + 3)) {
myNowPointB = myNowPointB + distSpear.slice(j, j + 1);
j++;
}
_root.skin.nGscore1.scoreView(Number(myNowPointA));
_root.skin.nGscore2.scoreView(Number(myNowPointB));
}
function displayNowScoreFin() {
var myNowPointA = "";
var myNowPointB = "";
var distSpear = String(Math.floor(_root.distX * 1000));
var i = 0;
while (i < (distSpear.length - 3)) {
myNowPointA = myNowPointA + distSpear.slice(i, i + 1);
i++;
}
var j = i;
while (j < (i + 3)) {
myNowPointB = myNowPointB + distSpear.slice(j, j + 1);
j++;
}
_root.skin.nGscore1.scoreView(Number(myNowPointA));
_root.skin.nGscore2.scoreView(Number(myNowPointB));
_root.distArray.push(_root.distX);
_root.distArray1.push(Number(myNowPointA));
_root.distArray2.push(Number(myNowPointB));
_root.displayThisScore();
}
function changeColorR(me) {
myColorR = new Color(me);
myColorRTSF = new Object();
myColorRTSF = {ra:"255", rb:"255", ga:"0", gb:"0", ba:"0", bb:"0", aa:"100", ab:"100"};
myColorR.setTransform(myColorRTSF);
}
function changeColorB(me) {
myColorB = new Color(me);
myColorBTSF = new Object();
myColorBTSF = {ra:"0", rb:"0", ga:"0", gb:"0", ba:"0", bb:"0", aa:"100", ab:"100"};
myColorB.setTransform(myColorBTSF);
}
function gameOverCount() {
_root.isPause = null;
_root.MC_gameOver._visible = true;
_root.MC_gameOver.gotoAndPlay(2);
}
this.stop();
isFirst = true;
isPause = false;
lifeNumb = 5;
highScore = "";
distArray = new Array();
distArray1 = new Array();
distArray2 = new Array();
_quality = "high";
_root.auDebut();
_root.enclosure(0);
Instance of Symbol 108 MovieClip "BG" in Frame 3
onClipEvent (load) {
if (false) {
}
this.ax = this._x;
this.ay = this._y;
}
Instance of Symbol 109 MovieClip "spear2" in Frame 3
onClipEvent (load) {
if (false) {
}
this.ay = this._y;
}
Instance of Symbol 113 MovieClip "whiteLine" in Frame 3
onClipEvent (load) {
if (false) {
}
function vanishLine() {
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this._alpha = 0;
}
if (this._width < 5) {
this.onEnterFrame = null;
this._alpha = 100;
}
};
}
this.myWidth = this._width;
this.ax = this._x;
this.ay = this._y;
}
Instance of Symbol 120 MovieClip "MC_extra" in Frame 3
onClipEvent (load) {
if (false) {
}
this.ax = this._x;
this.ay = this._y;
this.stop();
}
Instance of Symbol 109 MovieClip "spear" in Frame 3
onClipEvent (load) {
if (false) {
}
this._alpha = 0;
}
Instance of Symbol 136 MovieClip "Viewer" in Frame 3
onClipEvent (load) {
if (false) {
}
function appear() {
if (_root.isFoul == true) {
this.gotoAndStop("foul");
} else {
this.gotoAndStop("good");
}
this._alpha = 0;
this._visible = true;
this.onEnterFrame = function () {
this._alpha = this._alpha + 5;
if (this._alpha >= 100) {
this.onEnterFrame = null;
}
};
}
function vanish() {
this._visible = true;
this._alpha = 100;
this.onEnterFrame = function () {
this._alpha = this._alpha - 2.5;
if (this._alpha <= 0) {
this.onEnterFrame = null;
this.gotoAndStop(1);
this._visible = false;
}
};
}
this._visible = false;
}
Instance of Symbol 163 MovieClip "MC_gameOver" in Frame 3
onClipEvent (load) {
if (false) {
}
this.swapDepths(77777);
}
Instance of Symbol 166 MovieClip "mouseShow" in Frame 3
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 174 MovieClip "gameEndView" in Frame 3
onClipEvent (load) {
if (false) {
}
this.swapDepths(97775);
view = function () {
this._visible = 1;
this.nextFrame();
};
}
Frame 4
if (false) {
}
this.stop();
_quality = "high";
howtomsg.htmlText = "<font color = '#0099ff'><b>\uCD98\uD5A5\uC544 \uBA40\uB9AC\uB358\uC838</b></font><font color = '#666666'>\n\n \uB9C8\uC744 \uCC3D\uB358\uC9C0\uAE30 \uACBD\uAE30\uC5D0 \uCD9C\uC804\uD558\uB294 \uCD98\uD5A5\uC774\uAC00 \uC774\uB3C4\uB839\uACFC \uD568\uAED8 \uCC3D\uB358\uC9C0\uAE30 \uC5F0\uC2B5\uC744 \uD569\uB2C8\uB2E4. \uC2A4\uD0C0\uD2B8 \uC2E0\uD638\uAC00 \uC0AC\uB77C\uC9C0\uACE0 \uC900\uBE44\uAC00 \uB418\uBA74, \uB9C8\uC6B0\uC2A4\uB97C \uB20C\uB7EC \uCD9C\uBC1C\uD55C \uB4A4 \uD30C\uC6B8\uB77C\uC778\uC5D0 \uB2FF\uAE30 \uC804\uC5D0 \uB2E4\uC2DC \uB9C8\uC6B0\uC2A4\uB97C \uB20C\uB7EC \uAC01\uB3C4\uB97C \uC870\uC808\uD558\uACE0 \uB9C8\uC6B0\uC2A4\uC5D0\uC11C \uC190\uC744 \uB193\uC73C\uBA74 \uCC3D\uC744 \uB358\uC9C0\uAC8C \uB429\uB2C8\uB2E4.\n<br></font><font color = '#0099ff'>\uC870\uC791\uD0A4</font><br><font color = '#666666'>\uCD9C\uBC1C \uBC0F \uAC01\uB3C4\uC870\uC808, \uB358\uC9C0\uAE30 : \uB9C8\uC6B0\uC2A4</font> ";
Instance of Symbol 317 MovieClip in Frame 4
on (release) {
if (false) {
}
this._parent.howtomsg.scroll--;
}
Instance of Symbol 320 MovieClip in Frame 4
on (release) {
if (false) {
}
this._parent.howtomsg.scroll++;
}
Instance of Symbol 323 MovieClip in Frame 4
onClipEvent (load) {
if (false) {
}
this._y = 75;
this.y1 = 75;
this.y2 = 208;
txt = this._parent.howtomsg;
this.onEnterFrame = function () {
this._x = 222.5;
this._y = this.y1 + ((this.y2 - this.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, 222.5, this.y1, 222.5, this.y2);
this.onEnterFrame = function () {
this._x = 222.5;
txt.scroll = txt.maxscroll * ((this._y - this.y1) / (this.y2 - this.y1));
trace((txt.maxscroll + "_") + txt.scroll);
};
}
}
onClipEvent (mouseUp) {
if (false) {
}
this.onEnterFrame = function () {
this._x = 222.5;
this._y = this.y1 + ((this.y2 - this.y1) * ((txt.scroll - 1) / (txt.maxscroll - 1)));
};
this.stopDrag();
}
Symbol 27 Button
on (release, keyPress "<Enter>") {
if (false) {
}
stopAllSounds();
_root.myS.start();
this.userLevel = 1;
_root.isItem1 = false;
_root.isItem2 = false;
this._parent.waggleGameStart();
_root.gotoAndPlay("startGame");
}
Symbol 32 Button
on (release) {
if (false) {
}
((helpSnd = new Sound(this))).attachSound("helpSnd");
helpSnd.start();
_root.gotoAndStop("guide");
}
Symbol 69 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 69 MovieClip Frame 2
if (false) {
}
this.play();
Symbol 69 MovieClip Frame 7
if (false) {
}
this.gotoAndPlay(2);
Symbol 77 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 77 MovieClip Frame 11
if (false) {
}
this.gotoAndStop(1);
Symbol 81 MovieClip Frame 1
if (false) {
}
this.stop();
delete this.myP;
this.myP = new Object();
this.myP.x = this.inSpear._x;
this.myP.y = this.inSpear._y;
localToGlobal(this.myP);
_root.spear._x = this.myP.x;
_root.spear._y = this.myP.y;
_root.spear.ax = this.myP.x;
_root.spear.ay = this.myP.y;
_root.spear2._x = this.myP.x;
_root.spear2._y = this.myP.y;
_root.initVar();
Symbol 81 MovieClip Frame 2
if (false) {
}
_root.spear2._alpha = 0;
Symbol 81 MovieClip Frame 7
if (false) {
}
this.stop();
_root.BG.MC_DalBong.running.gotoAndPlay("run");
_root.MC_shootBTN.gotoAndStop("shoot");
Symbol 81 MovieClip Frame 8
if (false) {
}
delete this.myP;
this.myP = new Object();
this.myP.x = this.inSpear._x;
this.myP.y = this.inSpear._y;
localToGlobal(this.myP);
_root.spear._x = this.myP.x;
_root.spear._y = this.myP.y;
_root.spear2._x = this.myP.x;
_root.spear2._y = this.myP.y;
Symbol 81 MovieClip Frame 9
if (false) {
}
delete this.myP;
this.myP = new Object();
this.myP.x = this.inSpear._x;
this.myP.y = this.inSpear._y;
localToGlobal(this.myP);
_root.spear._x = this.myP.x;
_root.spear._y = this.myP.y;
_root.spear2._x = this.myP.x;
_root.spear2._y = this.myP.y;
Symbol 81 MovieClip Frame 10
if (false) {
}
delete this.myP;
this.myP = new Object();
this.myP.x = this.inSpear._x;
this.myP.y = this.inSpear._y;
localToGlobal(this.myP);
_root.spear._x = this.myP.x;
_root.spear._y = this.myP.y;
_root.spear2._x = this.myP.x;
_root.spear2._y = this.myP.y;
Symbol 81 MovieClip Frame 11
if (false) {
}
this.stop();
_root.spear2._alpha = 100;
delete this.myP;
this.myP = new Object();
this.myP.x = this.inSpear._x;
this.myP.y = this.inSpear._y;
localToGlobal(this.myP);
_root.spear._x = this.myP.x;
_root.spear._y = this.myP.y;
_root.spear.ax = this.myP.x;
_root.spear.ay = this.myP.y;
_root.spear2._x = this.myP.x;
_root.spear2._y = this.myP.y;
Instance of Symbol 78 MovieClip "inSpear" in Symbol 81 MovieClip Frame 11
onClipEvent (load) {
if (false) {
}
this._alpha = 0;
}
Symbol 81 MovieClip Frame 12
if (false) {
}
_root.runSnd.stop("runSnd");
Symbol 81 MovieClip Frame 14
if (false) {
}
_root.throwSnd.start();
this.stop();
Symbol 105 MovieClip Frame 14
if (false) {
}
this.stop();
Symbol 106 MovieClip Frame 28
if (false) {
}
this.gotoAndPlay("run");
Symbol 106 MovieClip Frame 46
if (false) {
}
this.stop();
Symbol 106 MovieClip Frame 64
if (false) {
}
this.stop();
Symbol 107 MovieClip Frame 5
if (false) {
}
_root.skin.ready.gotoAndStop(2);
if (_root.isFirst == true) {
_root.bgMusic.start(0, 9999);
}
Symbol 107 MovieClip Frame 72
if (false) {
}
_root.skin.ready.gotoAndPlay(2);
Symbol 107 MovieClip Frame 74
if (false) {
}
this.stop();
Instance of Symbol 106 MovieClip "running" in Symbol 107 MovieClip Frame 74
onClipEvent (load) {
if (false) {
}
this.gotoAndStop(1);
}
Instance of Symbol 107 MovieClip "MC_DalBong" in Symbol 108 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this.ax = this._x;
if (_root.isFirst == true) {
this.gotoAndPlay(1);
} else {
this.gotoAndStop("run");
}
}
Symbol 120 MovieClip Frame 7
if (false) {
}
this.gotoAndPlay(1);
Symbol 129 MovieClip Frame 20
if (false) {
}
_root.foulSnd.start();
Symbol 129 MovieClip Frame 85
if (false) {
}
this.gotoAndPlay("bad");
Symbol 136 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 136 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 136 MovieClip Frame 3
if (false) {
}
this.stop();
Symbol 139 Button
on (release) {
if (false) {
}
if (_root.isReady == true) {
_root.isReady = false;
_root.mouseShow.gotoAndStop(1);
_root.mouseShow._visible = false;
_root.BG.MC_DalBong.MC_arm.gotoAndPlay("raisingUp");
_root.BG.MC_DalBong.running.gotoAndPlay("run");
_root.runSnd.start(0, 999);
_root.spear2._rotation = _root.spear2._rotation + 180;
this.onEnterFrame = function () {
if (_root.isPause == false) {
_root.BG._x = _root.BG._x - 3;
_root.BG.MC_DalBong._x = _root.BG.MC_DalBong._x + 5;
_root.whiteLine._x = _root.whiteLine._x - 3;
_root.whiteLine._width = _root.whiteLine._width + 3;
if (_root.BG.MC_DalBong._x >= -2) {
_root.isFoul = true;
this.onEnterFrame = null;
this.onEnterFrame = function () {
if (_root.isPause == false) {
trace(Math.abs(_root.spear2._rotation));
if (_root.spear2._rotation > -87) {
_root.spear._rotation = _root.spear._rotation - 1;
_root.spear2._rotation = _root.spear2._rotation - 1;
}
_root.BG._x = _root.BG._x - 3;
_root.BG.MC_DalBong._x = _root.BG.MC_DalBong._x + 5;
}
};
_root.BG.MC_DalBong.MC_arm.gotoAndPlay("ready");
this.gotoAndStop("first");
_root.spear._rotation = _root.spear._rotation - 1;
_root.spear2._rotation = _root.spear2._rotation - 1;
this.onEnterFrame = function () {
_root.BG._x = _root.BG._x - 3;
_root.BG.MC_DalBong._x = _root.BG.MC_DalBong._x + 3;
if (_root.BG.MC_DalBong.MC_arm._currentframe >= 11) {
this.onEnterFrame = null;
_root.flyingSnd.start(0, 9999);
_root.isThrow();
_root.shootSig = true;
_root.bgMove = true;
if ((_root.isFoul == true) || (_root.spear2.angle < 10)) {
_root.BG.MC_DalBong.running.gotoAndPlay("foul");
} else {
_root.BG.MC_DalBong.running.gotoAndPlay("fin");
}
_root.BG.MC_DalBong.MC_arm.gotoAndPlay("throwing");
_root.spear2.angle = _root.spear2._rotation;
}
};
}
}
};
}
}
Symbol 140 Button
on (press) {
if (false) {
}
if (_root.shootSig == false) {
this.onEnterFrame = null;
_root.BG.MC_DalBong.MC_arm.gotoAndPlay("ready");
this.onEnterFrame = function () {
if (_root.isPause == false) {
trace(Math.abs(_root.spear2._rotation));
if (_root.spear2._rotation > -87) {
_root.spear._rotation = _root.spear._rotation - 1;
_root.spear2._rotation = _root.spear2._rotation - 1;
}
_root.BG._x = _root.BG._x - 3;
_root.BG.MC_DalBong._x = _root.BG.MC_DalBong._x + 3;
if (_root.BG.MC_DalBong._x >= -2) {
_root.isFoul = true;
this.onEnterFrame = null;
this.onEnterFrame = function () {
if (_root.isPause == false) {
trace(Math.abs(_root.spear2._rotation));
if (_root.spear2._rotation > -87) {
_root.spear._rotation = _root.spear._rotation - 1;
_root.spear2._rotation = _root.spear2._rotation - 1;
}
_root.BG._x = _root.BG._x - 3;
_root.BG.MC_DalBong._x = _root.BG.MC_DalBong._x + 5;
}
};
_root.BG.MC_DalBong.MC_arm.gotoAndPlay("ready");
this.gotoAndStop("first");
_root.spear._rotation = _root.spear._rotation - 1;
_root.spear2._rotation = _root.spear2._rotation - 1;
this.onEnterFrame = function () {
_root.BG._x = _root.BG._x - 3;
_root.BG.MC_DalBong._x = _root.BG.MC_DalBong._x + 5;
if (_root.BG.MC_DalBong.MC_arm._currentframe >= 11) {
this.onEnterFrame = null;
_root.flyingSnd.start(0, 9999);
_root.isThrow();
_root.shootSig = true;
_root.bgMove = true;
if ((_root.isFoul == true) || (_root.spear2.angle < 10)) {
_root.BG.MC_DalBong.running.gotoAndPlay("foul");
} else {
_root.BG.MC_DalBong.running.gotoAndPlay("fin");
}
_root.BG.MC_DalBong.MC_arm.gotoAndPlay("throwing");
_root.spear2.angle = _root.spear2._rotation;
}
};
}
}
};
}
}
on (release) {
if (false) {
}
if (((_root.shootSig == false) && (_root.isPause != true)) && (_root.BG.MC_DalBong.MC_arm._currentframe >= 11)) {
this.onEnterFrame = null;
_root.isThrow();
_root.flyingSnd.start(0, 9999);
_root.shootSig = true;
_root.bgMove = true;
if ((_root.isFoul == true) || (_root.spear2.angle < 10)) {
_root.BG.MC_DalBong.running.gotoAndPlay("foul");
} else {
_root.BG.MC_DalBong.running.gotoAndPlay("fin");
}
_root.BG.MC_DalBong.MC_arm.gotoAndPlay("throwing");
_root.spear2.angle = _root.spear2._rotation;
} else {
this.onEnterFrame = null;
this.onEnterFrame = function () {
if (((_root.shootSig == false) && (_root.isPause != true)) && (_root.BG.MC_DalBong.MC_arm._currentframe >= 11)) {
this.onEnterFrame = null;
_root.isThrow();
_root.shootSig = true;
_root.bgMove = true;
if ((_root.isFoul == true) || (_root.spear2.angle < 10)) {
_root.BG.MC_DalBong.running.gotoAndPlay("foul");
} else {
_root.BG.MC_DalBong.running.gotoAndPlay("fin");
}
_root.BG.MC_DalBong.MC_arm.gotoAndPlay("throwing");
_root.spear2.angle = _root.spear2._rotation;
}
};
}
this.gotoAndStop("first");
}
Symbol 141 Button
on (release) {
if (false) {
}
if (_root.isReady == false) {
_root.isReady = true;
_root.shoutSnd.stop("shoutSnd");
_root.BG.MC_Dalbong._x = _root.BG.MC_DalBong.ax;
_root.BG.MC_DalBong.gotoAndStop("run");
_root.BG.MC_DalBong.running.gotoAndStop(1);
_root.BG.MC_DalBong.MC_arm.gotoAndStop(1);
this.gotoAndStop("first");
_root.rewindSnd.start();
_root.initVar();
_root.skin.nGscore1.scoreView(0);
_root.skin.nGscore2.scoreView(0);
_root.skin.ready.gotoAndPlay(2);
}
}
Symbol 142 MovieClip Frame 1
if (false) {
}
this.stop();
this.shootBtn.useHandCursor = false;
Symbol 142 MovieClip Frame 2
if (false) {
}
this.stop();
this.shootBtn.useHandCursor = false;
Symbol 142 MovieClip Frame 3
if (false) {
}
this.stop();
this.shootBtn.useHandCursor = false;
Symbol 142 MovieClip Frame 4
if (false) {
}
this.stop();
_root.MC_extra.gotoAndStop("steady");
this.shootBtn.useHandCursor = false;
if (_root.lifeNumb <= 0) {
this.gotoAndStop("first");
}
Symbol 160 MovieClip Frame 1
if (false) {
}
this._visible = 0;
stop();
Instance of Symbol 155 MovieClip "scoreView" in Symbol 162 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
this._parent._visible = 1;
this._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 () {
if (this._currentframe == (s1 + 1)) {
this.stop();
if (score < 10) {
snd.stop();
}
num2.gotoAndStop(1);
num2.play();
num2.onEnterFrame = function () {
if (this._currentframe == (s2 + 1)) {
this.stop();
if (score < 100) {
snd.stop();
}
num3.gotoAndStop(1);
num3.play();
num3.onEnterFrame = function () {
if (this._currentframe == (s3 + 1)) {
this.stop();
if (score < 1000) {
snd.stop();
}
num4.gotoAndStop(1);
num4.play();
num4.onEnterFrame = function () {
if (this._currentframe == (s4 + 1)) {
trace(1);
this.stop();
if (score < 10000) {
snd.stop();
}
num5.gotoAndStop(1);
num5.play();
num5.onEnterFrame = function () {
if (this._currentframe == (s5 + 1)) {
this.stop();
if (score < 100000) {
snd.stop();
}
num6.gotoAndStop(1);
num6.play();
num6.onEnterFrame = function () {
if (this._currentframe == (s6 + 1)) {
this.stop();
if (score < 100000) {
snd.stop();
}
num7.gotoAndStop(1);
num7.play();
num7.onEnterFrame = function () {
if (this._currentframe == (s7 + 1)) {
this.stop();
this._parent.snd.stop("dding");
this._parent._parent.scoreItemMovie.view();
this.onEnterFrame = null;
_root.MC_gameOver.gotoAndPlay("replay");
}
};
this.onEnterFrame = null;
}
};
this.onEnterFrame = null;
}
};
this.onEnterFrame = null;
}
};
this.onEnterFrame = null;
}
};
this.onEnterFrame = null;
}
};
this.onEnterFrame = null;
}
};
}
i = 1;
while (i < 8) {
this["num" + i].gotoAndStop(1);
i++;
}
snd = new Sound(this);
snd.attachSound("dding");
}
Instance of Symbol 160 MovieClip "scoreItemMovie" in Symbol 162 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
view = function () {
trace("item");
if (_root.isItem3 == 1) {
this.gotoAndStop(2);
} else if (_root.isItem4 == 1) {
this.gotoAndStop(3);
} else if (_root.isItem5 == 1) {
this.gotoAndStop(4);
} else {
this._visible = 0;
return(0);
}
this.onEnterFrame = function () {
this.i++;
if (this._i > 6) {
this._visible = 1;
}
if ((this.i >= 6) && (this.i < 12)) {
if ((this.i % 2) == 0) {
this._visible = 0;
} else {
this._visible = 1;
}
} else if (this.i == 24) {
_parent.scoreView.scoreView(_root.score);
this.onEnterFrame = null;
}
};
};
}
Symbol 163 MovieClip Frame 1
if (false) {
}
stop();
this.isSaving._visible = false;
Instance of Symbol 162 MovieClip "finalScoreView" in Symbol 163 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = 0;
}
Symbol 163 MovieClip Frame 30
if (false) {
}
stopAllSounds();
this.stop();
this.$buffScore = _root.highScore;
_root.highScore = Math.floor(_root.highScore * 1000);
trace("\uC800\uC7A5\uC810\uC218 = " + _root.highScore);
_root.gameEndView.buffScore = _root.highScore;
if (_root.isItem3) {
_root.score = _root.score * 2;
} else if (_root.isItem4) {
_root.score = _root.score * 3;
} else if (_root.isItem5) {
_root.score = _root.score * 5;
}
if (_root.highScore <= 0) {
this.finalScoreView.scoreView.scoreView(0);
} else {
this.finalScoreView.scoreView.scoreView(_root.highScore);
}
_root.enclosure(_root.highScore);
_root.highScore = this.$buffScore;
trace("\uC2E4\uC81C\uC810\uC218 = " + _root.highScore);
Symbol 163 MovieClip Frame 53
if (false) {
}
_root.mySendScore();
Symbol 163 MovieClip Frame 77
if (false) {
}
this.stop();
stopAllSounds();
delete _root.encodeOb;
_root.gotoAndStop("main");
_root.MC_gameOver.removeMovieClip();
this.removeMovieClip();
Symbol 166 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 166 MovieClip Frame 28
if (false) {
}
if (_root.MC_shootBTN._currentframe == 2) {
this.gotoAndPlay(2);
} else {
this.gotoAndStop(1);
}
Symbol 173 Button
on (release) {
if (false) {
}
stopAllSounds();
delete _root.encodeOb;
_root.gotoAndStop("main");
_root.MC_gameOver.removeMovieClip();
this.removeMovieClip();
}
Symbol 174 MovieClip Frame 1
if (false) {
}
this.stop();
this._visible = 0;
Symbol 177 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 177 MovieClip Frame 4
if (false) {
}
if (_root.isFirst == true) {
}
Symbol 177 MovieClip Frame 71
if (false) {
}
this.gotoAndStop(1);
Symbol 194 MovieClip Frame 1
if (false) {
}
this.stop();
this.i = 0;
Symbol 194 MovieClip Frame 73
if (false) {
}
this.i++;
if (this.i >= 3) {
this.gotoAndStop("againX");
} else {
this.gotoAndPlay("againX");
}
Instance of Symbol 206 MovieClip "Gscore2" in Symbol 209 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
var s3 = Math.floor((score % 1000) / 100);
var s2 = Math.floor((score % 100) / 10);
var s1 = Math.floor(score % 10);
i = 1;
while (i <= 3) {
this["n" + i].gotoAndStop(eval ("s" + i) + 1);
i++;
}
}
i = 1;
while (i <= 3) {
this["n" + i].stop();
i++;
}
}
Instance of Symbol 207 MovieClip "Gscore1" in Symbol 209 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
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);
if (s4 == 0) {
this.n4._alpha = 0;
this.n4._visible = false;
if (s3 == 0) {
this.n3._alpha = 0;
this.n3._visible = false;
if (s2 == 0) {
this.n2._alpha = 0;
this.n2._visible = false;
}
}
} else if (score <= 0) {
this.n4._alpha = 0;
this.n4._visible = false;
this.n3._alpha = 0;
this.n3._visible = false;
this.n2._alpha = 0;
this.n2._visible = false;
}
i = 1;
while (i <= 4) {
this["n" + i].gotoAndStop(eval ("s" + i) + 1);
i++;
}
}
i = 1;
while (i <= 4) {
this["n" + i].stop();
i++;
}
}
Symbol 217 MovieClip Frame 1
if (false) {
}
this.blackBoard.useHandCursor = false;
Symbol 222 Button
on (release, keyPress "p") {
if (false) {
}
if ((_root.isPause == false) || (_root.isPause == true)) {
_root.isPause = true;
this._parent.pausing._visible = true;
_root.sndvolume.setVolume(0);
if (_root.skin.ready._currentframe > 1) {
_root.skin.ready.stop();
}
if (_root.skin.MC_DalBong._currentframe > 1) {
_root.skin.MC_DalBong.stop();
}
this.gotoAndStop(2);
}
}
Symbol 236 Button
on (release, keyPress "p") {
if (false) {
}
if ((_root.isPause == true) || (_root.isPause == false)) {
_root.isPause = false;
this._parent.pausing._visible = false;
_root.sndvolume.setVolume(100);
if (_root.skin.ready._currentframe > 1) {
_root.skin.ready.play();
}
if (_root.skin.MC_DalBong._currentframe > 1) {
_root.skin.MC_DalBong.play();
}
this.gotoAndStop(1);
}
}
Symbol 237 MovieClip Frame 1
if (false) {
}
this.stop();
Symbol 237 MovieClip Frame 2
if (false) {
}
this.stop();
Symbol 239 Button
on (release) {
if (false) {
}
_root.sndvolume.setVolume(0);
nextFrame();
}
Symbol 241 Button
on (release) {
if (false) {
}
_root.sndvolume.setVolume(100);
prevFrame();
}
Symbol 242 MovieClip Frame 1
if (false) {
}
stop();
Instance of Symbol 189 MovieClip "nGscore1" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
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 <= 4) {
this["n" + i].gotoAndStop(eval ("s" + i) + 1);
i++;
}
}
i = 1;
while (i <= 4) {
this["n" + i].stop();
i++;
}
}
Instance of Symbol 190 MovieClip "nGscore2" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
var s3 = Math.floor((score % 1000) / 100);
var s2 = Math.floor((score % 100) / 10);
var s1 = Math.floor(score % 10);
i = 1;
while (i <= 3) {
this["n" + i].gotoAndStop(eval ("s" + i) + 1);
i++;
}
}
i = 1;
while (i <= 3) {
this["n" + i].stop();
i++;
}
}
Instance of Symbol 194 MovieClip "foulSignal5" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 194 MovieClip "foulSignal1" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 194 MovieClip "foulSignal4" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 194 MovieClip "foulSignal3" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 194 MovieClip "foulSignal2" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 209 MovieClip "bScore2" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function blink() {
if (_root.isFoul == true) {
this._parent.foulSignal2._visible = true;
this._parent.foulSignal2.gotoAndPlay("againX");
}
var i = 1;
this.onEnterFrame = function () {
i++;
if ((i % 5) == 0) {
if (i < 20) {
_root.blinkSnd.stop("blinkSnd");
_root.blinkSnd.start();
}
if (this._visible == true) {
this._visible = false;
} else {
this._visible = true;
}
}
if (i > 20) {
this.onEnterFrame = null;
if (_root.lifeNumb <= 0) {
_root.isPause = null;
_root.gameOverCount();
}
}
};
}
this._visible = false;
}
Instance of Symbol 209 MovieClip "bScore3" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function blink() {
if (_root.isFoul == true) {
this._parent.foulSignal3._visible = true;
this._parent.foulSignal3.gotoAndPlay("againX");
}
var i = 1;
this.onEnterFrame = function () {
i++;
if ((i % 5) == 0) {
if (i < 20) {
_root.blinkSnd.stop("blinkSnd");
_root.blinkSnd.start();
}
if (this._visible == true) {
this._visible = false;
} else {
this._visible = true;
}
}
if (i > 20) {
this.onEnterFrame = null;
if (_root.lifeNumb <= 0) {
_root.isPause = null;
_root.gameOverCount();
}
}
};
}
this._visible = false;
}
Instance of Symbol 209 MovieClip "bScore4" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function blink() {
if (_root.isFoul == true) {
this._parent.foulSignal4._visible = true;
this._parent.foulSignal4.gotoAndPlay("againX");
}
var i = 1;
this.onEnterFrame = function () {
i++;
if ((i % 5) == 0) {
if (i < 20) {
_root.blinkSnd.stop("blinkSnd");
_root.blinkSnd.start();
}
if (this._visible == true) {
this._visible = false;
} else {
this._visible = true;
}
}
if (i > 20) {
this.onEnterFrame = null;
if (_root.lifeNumb <= 0) {
_root.isPause = null;
_root.gameOverCount();
}
}
};
}
this._visible = false;
}
Instance of Symbol 209 MovieClip "bScore5" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function blink() {
if (_root.isFoul == true) {
this._parent.foulSignal5._visible = true;
this._parent.foulSignal5.gotoAndPlay("againX");
}
var i = 1;
this.onEnterFrame = function () {
i++;
if ((i % 5) == 0) {
if (i < 20) {
_root.blinkSnd.stop("blinkSnd");
_root.blinkSnd.start();
}
if (this._visible == true) {
this._visible = false;
} else {
this._visible = true;
}
}
if (i > 20) {
this.onEnterFrame = null;
if (_root.lifeNumb <= 0) {
_root.isPause = null;
_root.gameOverCount();
}
}
};
}
this._visible = false;
}
Instance of Symbol 209 MovieClip "bScore1" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function blink() {
if (_root.isFoul == true) {
this._parent.foulSignal1._visible = true;
this._parent.foulSignal1.gotoAndPlay("againX");
}
var i = 1;
this.onEnterFrame = function () {
i++;
if ((i % 5) == 0) {
if (i < 20) {
_root.blinkSnd.stop("blinkSnd");
_root.blinkSnd.start();
}
if (this._visible == true) {
this._visible = false;
} else {
this._visible = true;
}
}
if (i > 20) {
this.onEnterFrame = null;
if (_root.lifeNumb <= 0) {
_root.isPause = null;
_root.gameOverCount();
}
}
};
}
this._visible = false;
}
Instance of Symbol 217 MovieClip "pausing" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
this._visible = false;
}
Instance of Symbol 242 MovieClip in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
_root.sndvolume = new Sound();
if (_root.sndvolume.getVolume() > 0) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 254 MovieClip "Gscore1" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
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 <= 4) {
this["n" + i].gotoAndStop(eval ("s" + i) + 1);
i++;
}
}
i = 1;
while (i <= 4) {
this["n" + i].stop();
i++;
}
}
Instance of Symbol 255 MovieClip "Gscore2" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
if (false) {
}
function scoreView(score) {
var s3 = Math.floor((score % 1000) / 100);
var s2 = Math.floor((score % 100) / 10);
var s1 = Math.floor(score % 10);
i = 1;
while (i <= 3) {
this["n" + i].gotoAndStop(eval ("s" + i) + 1);
i++;
}
}
i = 1;
while (i <= 3) {
this["n" + i].stop();
i++;
}
}
Symbol 273 MovieClip Frame 10
if (false) {
}
stop();