Frame 1
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_global.main_root = this;
Frame 2
if (false) {
}
Frame 11
if (false) {
}
Frame 29
if (false) {
}
Frame 30
if (false) {
}
Frame 31
if (false) {
}
Frame 34
Frame 35
if (false) {
}
Frame 36
if (false) {
}
Frame 37
if (false) {
}
Frame 38
if (false) {
}
Frame 39
if (false) {
}
Frame 40
if (false) {
}
Frame 41
if (false) {
}
Frame 42
if (false) {
}
Frame 43
if (false) {
}
Frame 63
if (false) {
}
Frame 64
if (false) {
}
Frame 65
if (false) {
}
Frame 66
if (false) {
}
Frame 67
if (false) {
}
Frame 81
this.btn_visit.onRelease = function () {
getURL ("http://poptag.nexon.net");
};
this.btn_visit.onRollOver = function () {
this.gotoAndStop(2);
};
this.btn_visit.onRollOut = function () {
this.gotoAndStop(1);
};
Frame 149
_global.main_root = this;
this.play();
function initSound() {
var _local2 = 0;
while (_local2 < 27) {
this["s" + _local2] = new Sound(this);
this["s" + _local2].attachSound("s" + _local2);
_local2++;
}
}
function startSound(s_id, loopNum) {
this["s" + s_id].start(0, loopNum);
}
function stopSound(s_id) {
this["s" + s_id].stop("s" + s_id);
}
var bgSound = 0;
initSound();
startSound(this.bgSound, 99999);
Frame 157
if (false) {
}
Frame 165
if (false) {
}
Frame 167
if (false) {
}
Frame 169
if (false) {
}
Frame 171
if (false) {
}
Frame 183
function gameRestart() {
char.item1 = gameDefault.item1;
char.item2 = gameDefault.item2;
char.HP = gameDefault.HP;
char.life = gameDefault.life;
this.gamePoint = [];
this.restartNow = false;
this.stay = 100;
}
function gameStart() {
if (this.sound == true) {
startSound(11, 1);
}
this.bombList = [];
if (true == this.restartNow) {
this.gameRestart();
}
this.mySpeed = gameDefault.speed;
this.killMon = 0;
this.bonusItem = 0;
this.bonusItemCount = 0;
this.gamePoint[this.clearStage] = 0;
this.playTime = 0;
this.playTimer = getTimer();
char.speed = gameDefault.speed;
char.state = gameDefault.state;
char.speed = gameDefault.speed;
char.bomb = gameDefault.bomb;
char.bomblen = gameDefault.bomblen;
char.fire = gameDefault.fire;
char.tortoise = gameDefault.tortoise;
this.itemPercentInit();
this.buildMap(this.clearStage);
this.mcUi.swapDepths(this.getNextHighestDepth() + 1);
this.mcUi.ui_life.gotoAndStop(char.life + 1);
this.mcUi.ui_item1.gotoAndStop(char.item1 + 1);
this.mcUi.ui_item2.gotoAndStop(char.item2 + 1);
}
function buildMap(MapNum) {
var _local8 = this["stageMap" + MapNum];
this.attachMovie("empty", "tiles", 1, {_x:game.startX, _y:game.startY});
this.tiles.attachMovie("empty", "back", -1);
game.clip = this.tiles;
var _local10 = _local8[0].length;
var _local11 = _local8.length;
var _local7 = 0;
while (_local7 < _local11) {
var _local5 = 0;
while (_local5 < _local10) {
var _local4 = (("t_" + _local7) + "_") + _local5;
game[_local4] = new game["Tile" + _local8[_local7][_local5][1]]();
if (true == game[_local4].walkable) {
var _local6 = game.clip.back;
} else {
var _local6 = game.clip;
}
game[_local4].depth = (((_local7 * game.tileH) * 300) + ((_local5 * game.tileW) * game.leftRight)) + 1;
_local6.attachMovie("tile", _local4, game[_local4].depth);
_local6[_local4]._x = _local5 * game.tileW;
_local6[_local4]._y = _local7 * game.tileH;
_local6[_local4].gotoAndStop(_local8[_local7][_local5][0]);
_local5++;
}
_local7++;
}
game.itemBoxs = this["itemBoxs" + MapNum];
_local7 = 0;
while (_local7 < game.itemBoxs.length) {
var _local2 = (("itemBox_" + game.itemBoxs[_local7][2]) + "_") + game.itemBoxs[_local7][1];
game[_local2] = new game["itemBoxp" + game.itemBoxs[_local7][3]]();
game[_local2].xtile = game.itemBoxs[_local7][1];
game[_local2].ytile = game.itemBoxs[_local7][2];
game[_local2].x = game[_local2].xtile * game.tileW;
game[_local2].y = game[_local2].ytile * game.tileH;
if (game.itemBoxs[_local7][3] == 1) {
game[(("t_" + game[_local2].ytile) + "_") + game[_local2].xtile].walkable = false;
game[(("t_" + game[_local2].ytile) + "_") + game[_local2].xtile].state = 1;
} else {
game[(("t_" + game[_local2].ytile) + "_") + game[_local2].xtile].state = 1;
}
my_depth = ((game[_local2].y * 300) + (game[_local2].x * game.leftRight)) + 1;
game.clip.attachMovie("itemBox", _local2, my_depth);
game[_local2].clip = game.clip[_local2];
game[_local2].clip.gotoAndStop(game.itemBoxs[_local7][0]);
game[_local2].clip._x = game[_local2].x;
game[_local2].clip._y = game[_local2].y;
_local7++;
}
var _local9 = this["enemy" + MapNum];
game.currentEnemies = _local9.length;
_local7 = 0;
while (_local7 < game.currentEnemies) {
var _local3 = "enemy" + _local7;
game[_local3] = new game.Enemyp();
game[_local3].xtile = _local9[_local7][1];
game[_local3].ytile = _local9[_local7][2];
game[_local3].x = (game[_local3].xtile * game.tileW) + (game.tileW / 2);
game[_local3].y = (game[_local3].ytile * game.tileH) + (game.tileH / 2);
my_depth = ((game[_local3].y * 300) + (game[_local3].x * game.leftRight)) + 1;
game.clip.attachMovie("enemy" + _local9[_local7][3], _local3, my_depth);
game[_local3].clip = game.clip[_local3];
game[_local3].width = game.clip[_local3].body._width / 2;
game[_local3].height = game.clip[_local3].body._height / 2;
game[_local3].clip._x = game[_local3].x;
game[_local3].clip._y = game[_local3].y;
game[_local3].clip.gotoAndStop(_local9[_local7][0]);
_local7++;
}
char.xtile = gameDefault.xtile;
char.ytile = gameDefault.ytile;
char.x = (char.xtile * game.tileW) + (game.tileW / 2);
char.y = (char.ytile * game.tileH) + (game.tileH / 2);
char.depth = ((char.y * 300) + (char.x * game.leftRight)) + 1;
game.clip.attachMovie("char", "char", char.depth);
char.clip = game.clip.char;
char.width = char.clip.hack._width / 2;
char.height = char.clip.hack._height / 2;
char.clip._x = char.x;
char.clip._y = char.y;
char.clip.gotoAndStop(char.state);
}
function detectKeys() {
if (this.sound == false) {
stopAllSounds();
}
this.enemyBrain();
this.bossMove();
if (((((this.char.state == "START") || (this.char.state == "DIE")) || (this.char.state == "REVIVAL")) || (this.char.state == "EFFECT")) || (this.char.state == "GAMEOVER")) {
return(undefined);
}
var _local2 = this.char;
var _local3 = false;
if (Key.isDown(39)) {
_local3 = this.moveChar(_local2, 1, 0);
} else if (Key.isDown(37)) {
_local3 = this.moveChar(_local2, -1, 0);
} else if (Key.isDown(38)) {
_local3 = this.moveChar(_local2, 0, -1);
} else if (Key.isDown(40)) {
_local3 = this.moveChar(_local2, 0, 1);
}
if ((this.char.state != "LOCK") && (false == _local3)) {
if (this.stay <= 0) {
_local2.clip.gotoAndStop(1);
this.stay = 100;
}
this.stay--;
} else if (this.char.state != "LOCK") {
this.char.state = "ACT";
}
}
function moveChar(ob, dirx, diry) {
getMyCorners(ob.x, ob.y + (ob.speed * diry), ob);
if (diry == -1) {
if (((ob.pushPower == true) && (1 == ob.upleft.state)) && (1 == ob.upright.state)) {
this.pushBox(ob.rightX, ob.upY, dirx, diry);
} else if (((((0 < ob.upleft.state) && (0 == ob.upright.state)) && (true == ob.upleft.walkable)) && (true == ob.upright.walkable)) && (0 > (game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._x - ob.x))) {
ob.x = ob.x + ob.speed;
if (((ob.x - game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._x) - ob.width) >= 40) {
ob.x = game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._x - ob.width;
}
} else if (((((0 == ob.upleft.state) && (0 < ob.upright.state)) && (true == ob.upleft.walkable)) && (true == ob.upright.walkable)) && (0 > ((ob.x - game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._x) - game.tileW))) {
ob.x = ob.x - ob.speed;
if (((ob.x - game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._x) - ob.width) <= 0) {
ob.x = game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._x + ob.width;
}
} else if ((((1 > ob.upleft.state) && (1 > ob.upright.state)) && (true == ob.upleft.walkable)) && (true == ob.upright.walkable)) {
ob.y = ob.y + (ob.speed * diry);
} else if (((true == ob.edges) && ((true == ob.upleft.walkable) || (1 == ob.upleft.state))) && (false == ob.upright.walkable)) {
ob.x = ob.x - ob.speed;
if (((ob.x - game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._x) - ob.width) <= 0) {
ob.x = game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._x + ob.width;
}
} else if (((true == ob.edges) && (false == ob.upleft.walkable)) && ((true == ob.upright.walkable) || (1 == ob.upright.state))) {
ob.x = ob.x + ob.speed;
if (((ob.x - game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._x) - ob.width) >= 40) {
ob.x = game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._x - ob.width;
}
} else {
if (((ob.pushPower == true) && (0 < ob.upleft.state)) && (0 == ob.upright.state)) {
this.pushBox(ob.leftX, ob.upY, dirx, diry);
} else if (((ob.pushPower == true) && (0 == ob.upleft.state)) && (0 < ob.upright.state)) {
this.pushBox(ob.rightX, ob.upY, dirx, diry);
}
ob.y = (ob.ytile * game.tileH) + ob.height;
}
}
if (diry == 1) {
if (((ob.pushPower == true) && (1 == ob.downleft.state)) && (1 == ob.downright.state)) {
this.pushBox(ob.rightX, ob.downY, dirx, diry);
} else if (((((0 < ob.downleft.state) && (0 == ob.downright.state)) && (true == ob.downleft.walkable)) && (true == ob.downright.walkable)) && (0 > (game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._x - ob.x))) {
ob.x = ob.x + ob.speed;
if (((ob.x - game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._x) - ob.width) >= 0) {
ob.x = game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._x + ob.width;
}
} else if (((((0 == ob.downleft.state) && (0 < ob.downright.state)) && (true == ob.downleft.walkable)) && (true == ob.downright.walkable)) && (0 > ((ob.x - game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._x) - game.tileW))) {
ob.x = ob.x - ob.speed;
if (((ob.x - game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._x) - ob.width) <= 0) {
ob.x = game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._x + ob.width;
}
} else if ((((1 > ob.downleft.state) && (1 > ob.downright.state)) && (true == ob.downleft.walkable)) && (true == ob.downright.walkable)) {
ob.y = ob.y + (ob.speed * diry);
} else if (((true == ob.edges) && ((true == ob.downleft.walkable) || (1 == ob.downright.state))) && (false == ob.downright.walkable)) {
ob.x = ob.x - ob.speed;
if (((ob.x - game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._x) - ob.width) <= 0) {
ob.x = game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._x + ob.width;
}
} else if (((true == ob.edges) && (false == ob.downleft.walkable)) && ((true == ob.downright.walkable) || (1 == ob.downright.state))) {
ob.x = ob.x + ob.speed;
if (((ob.x - game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._x) - ob.width) >= 0) {
ob.x = game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._x + ob.width;
}
} else {
if (((ob.pushPower == true) && (0 < ob.downleft.state)) && (0 == ob.downright.state)) {
this.pushBox(ob.leftX, ob.downY, dirx, diry);
} else if (((ob.pushPower == true) && (0 == ob.downleft.state)) && (0 < ob.downright.state)) {
this.pushBox(ob.rightX, ob.downY, dirx, diry);
}
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
}
}
getMyCorners(ob.x + (ob.speed * dirx), ob.y, ob);
if (dirx == -1) {
if (((ob.pushPower == true) && (1 == ob.downleft.state)) && (1 == ob.upleft.state)) {
this.pushBox(ob.leftX, ob.upY, dirx, diry);
} else if (((((0 < ob.downleft.state) && (0 == ob.upleft.state)) && (true == ob.downleft.walkable)) && (true == ob.upleft.walkable)) && (0 > (((ob.y - game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._y) - game.tileH) - ob.speed))) {
ob.y = ob.y - ob.speed;
if (((ob.y - game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._y) - ob.height) <= 0) {
ob.y = game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._y + ob.height;
}
} else if (((((0 == ob.downleft.state) && (0 < ob.upleft.state)) && (true == ob.downleft.walkable)) && (true == ob.upleft.walkable)) && (0 > ((game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._y - ob.y) - ob.speed))) {
ob.y = ob.y + ob.speed;
if (((ob.y - game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._y) - ob.height) >= 0) {
ob.y = game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._y + ob.height;
}
} else if ((((1 > ob.downleft.state) && (1 > ob.upleft.state)) && (true == ob.downleft.walkable)) && (true == ob.upleft.walkable)) {
ob.x = ob.x + (ob.speed * dirx);
} else if (((true == ob.edges) && ((true == ob.downleft.walkable) || (1 == ob.downleft.state))) && (false == ob.upleft.walkable)) {
ob.y = ob.y + ob.speed;
if (((ob.y - game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._y) - ob.height) >= 0) {
ob.y = game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._y + ob.height;
}
} else if (((true == ob.edges) && (false == ob.downleft.walkable)) && ((true == ob.upleft.walkable) || (1 == ob.upleft.state))) {
ob.y = ob.y - ob.speed;
if (((ob.y - game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._y) - ob.height) <= 0) {
ob.y = game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._y + ob.height;
}
} else {
if (((ob.pushPower == true) && (0 < ob.downleft.state)) && (0 == ob.upleft.state)) {
this.pushBox(ob.leftX, ob.downY, dirx, diry);
} else if (((ob.pushPower == true) && (0 == ob.downleft.state)) && (0 < ob.upleft.state)) {
this.pushBox(ob.leftX, ob.upY, dirx, diry);
}
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx == 1) {
if (((ob.pushPower == true) && (1 == ob.downright.state)) && (1 == ob.upright.state)) {
this.pushBox(ob.rightX, ob.upY, dirx, diry);
} else if (((((0 < ob.downright.state) && (0 == ob.upright.state)) && (true == ob.upright.walkable)) && (true == ob.downright.walkable)) && (0 > (((ob.y - game.clip.back[(("t_" + ob.upY) + "_") + ob.leftX]._y) - game.tileH) - ob.speed))) {
ob.y = ob.y - ob.speed;
if (((ob.y - game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._y) - ob.height) >= 0) {
ob.y = game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._y + ob.height;
}
} else if (((((0 == ob.downright.state) && (0 < ob.upright.state)) && (true == ob.upright.walkable)) && (true == ob.downright.walkable)) && (0 > ((game.clip.back[(("t_" + ob.downY) + "_") + ob.leftX]._y - ob.y) - ob.speed))) {
ob.y = ob.y + ob.speed;
if (((ob.y - game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._y) - ob.height) >= 0) {
ob.y = game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._y + ob.height;
}
} else if ((((1 > ob.downright.state) && (1 > ob.upright.state)) && (true == ob.upright.walkable)) && (true == ob.downright.walkable)) {
ob.x = ob.x + (ob.speed * dirx);
} else if (((true == ob.edges) && (true == ob.downright.walkable)) && (false == ob.upright.walkable)) {
ob.y = ob.y + ob.speed;
if (((ob.y - game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._y) - ob.height) >= 0) {
ob.y = game.clip.back[(("t_" + ob.downY) + "_") + ob.rightX]._y + ob.height;
}
} else if (((true == ob.edges) && (false == ob.downright.walkable)) && (true == ob.upright.walkable)) {
ob.y = ob.y - ob.speed;
if (((ob.y - game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._y) - ob.height) >= 0) {
ob.y = game.clip.back[(("t_" + ob.upY) + "_") + ob.rightX]._y + ob.height;
}
} else {
if (((ob.pushPower == true) && (0 < ob.downright.state)) && (0 == ob.upright.state)) {
this.pushBox(ob.rightX, ob.downY, dirx, diry);
} else if (((ob.pushPower == true) && (0 == ob.downright.state)) && (0 < ob.upright.state)) {
this.pushBox(ob.rightX, ob.upY, dirx, diry);
}
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.clip._x / game.tileW);
ob.ytile = Math.floor(ob.clip._y / game.tileH);
if (((ob.clip._name == "char") && (ob.state != "LOCK")) || (ob.clip._name != "char")) {
ob.clip.gotoAndStop((dirx + (diry * 2)) + 4);
}
if (((ob.clip._name == "char") && (ob.state != "LOCK")) && (ob.clip.mc.char != undefined)) {
ob.clip.mc.char.nextFrame();
}
if (ob.clip._name == "char") {
this.getItem(ob.xtile, ob.ytile);
}
ob.depth = ((ob.y * 300) + (ob.x * game.leftRight)) + 1;
ob.clip.swapDepths(ob.depth);
return(true);
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX];
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX];
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX];
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX];
}
function enemyBrain() {
var _local3 = 0;
while (_local3 < game.currentEnemies) {
var _local6 = "enemy" + _local3;
var _local2 = game[_local6];
if (_local2.state == "ACT") {
if (((_local2.xMove > 0) && (game[(("t_" + (_local2.ytile + _local2.yMove)) + "_") + (_local2.xtile + _local2.xMove)].state > 0)) || (game[(("t_" + _local2.ytile) + "_") + _local2.xtile].state > 0)) {
_local2.xMove = -1;
} else if (((_local2.xMove < 0) && (game[(("t_" + (_local2.ytile + _local2.yMove)) + "_") + (_local2.xtile + _local2.xMove)].state > 0)) || (game[(("t_" + _local2.ytile) + "_") + _local2.xtile].state > 0)) {
_local2.xMove = 1;
} else if (((_local2.yMove > 0) && (game[(("t_" + (_local2.ytile + _local2.yMove)) + "_") + (_local2.xtile + _local2.xMove)].state > 0)) || (game[(("t_" + _local2.ytile) + "_") + _local2.xtile].state > 0)) {
_local2.yMove = -1;
} else if (((_local2.yMove < 0) && (game[(("t_" + (_local2.ytile + _local2.yMove)) + "_") + (_local2.xtile + _local2.xMove)].state > 0)) || (game[(("t_" + _local2.ytile) + "_") + _local2.xtile].state > 0)) {
_local2.yMove = 1;
}
getMyCorners(_local2.x + (_local2.speed * _local2.xMove), _local2.y + (_local2.speed * _local2.yMove), _local2);
if ((((true == _local2.downleft.walkable) && (true == _local2.upleft.walkable)) && (true == _local2.downright.walkable)) && (true == _local2.upright.walkable)) {
moveChar(_local2, _local2.xMove, _local2.yMove);
} else if (_local2.xMove == 0) {
_local2.xMove = (random(2) * 2) - 1;
_local2.yMove = 0;
getMyCorners(_local2.x + (_local2.speed * _local2.xMove), _local2.y + (_local2.speed * _local2.yMove), _local2);
if ((((false == _local2.downleft.walkable) || (false == _local2.upleft.walkable)) || (false == _local2.downright.walkable)) || (false == _local2.upright.walkable)) {
_local2.xMove = -_local2.xMove;
}
} else {
_local2.xMove = 0;
_local2.yMove = (random(2) * 2) - 1;
getMyCorners(_local2.x + (_local2.speed * _local2.xMove), _local2.y + (_local2.speed * _local2.yMove), _local2);
if ((((false == _local2.downleft.walkable) || (false == _local2.upleft.walkable)) || (false == _local2.downright.walkable)) || (false == _local2.upright.walkable)) {
_local2.yMove = -_local2.yMove;
}
}
var _local5 = _local2.x - char.x;
var _local4 = _local2.y - char.y;
if ((this.char.state != "DIE") && (Math.sqrt((_local5 * _local5) + (_local4 * _local4)) < (_local2.width + (char.width / 10)))) {
this.char.state = "DIE";
if (this.sound == true) {
main_root.startSound(9, 1);
}
this.char.clip.gotoAndStop(this.char.state);
}
}
_local3++;
}
}
function pushBox(bx, by, dirx, diry) {
if (((((((this.char.state == "LOCK") || (this.char.state == "START")) || (this.char.state == "DIE")) || (this.char.state == "REVIVAL")) || (this.char.state == "EFFECT")) || (this.char.state == "GAMEOVER")) || (false == game[(("itemBox_" + by) + "_") + bx].move)) {
return(undefined);
}
var _local4 = game.clip[(("itemBox_" + by) + "_") + bx];
if (this.pushMc != _local4) {
this.pushMc = _local4;
this.delayPush = this.delayPushTime;
return(undefined);
}
if ((this.delayPush > 0) && (this.pushMc == _local4)) {
this.delayPush--;
return(undefined);
}
var name_x = (bx + dirx);
var name_y = (by + diry);
var i = 0;
while (i < game.currentEnemies) {
var _local3 = "enemy" + i;
if (((game.clip[_local3] != undefined) && (name_x == game[_local3].xtile)) && (name_y == game[_local3].ytile)) {
return(undefined);
}
i++;
}
ob = game[(("t_" + name_y) + "_") + name_x];
clip = game.clip.back[(("t_" + name_y) + "_") + name_x];
if (((game.clip[(("item_" + name_y) + "_") + name_x] == undefined) && (ob.state == 0)) && (true == ob.walkable)) {
var i = 30;
var myXY = "x";
_local4.onEnterFrame = function () {
if ((Math.abs(diry) == 1) && (clip._y != this._y)) {
this._y = this._y + ((i * diry) * 0.25);
myXY = "y";
} else if ((Math.abs(dirx) == 1) && (clip._x != this._x)) {
this._x = this._x + ((i * dirx) * 0.25);
myXY = "x";
}
i = i - 3;
if (((((dirx == -1) && (clip["_" + myXY] >= this["_" + myXY])) || ((dirx == 1) && (clip["_" + myXY] <= this["_" + myXY]))) || ((diry == -1) && (clip["_" + myXY] >= this["_" + myXY]))) || ((diry == 1) && (clip["_" + myXY] <= this["_" + myXY]))) {
this["_" + myXY] = clip["_" + myXY];
if (this._name != ((("itemBox_" + name_y) + "_") + name_x)) {
this.swapDepths((this._y * 300) + (this._x * game.leftRight));
this._name = (("itemBox_" + name_y) + "_") + name_x;
game[(("t_" + name_y) + "_") + name_x].state = 1;
game[(("t_" + by) + "_") + bx].state = 0;
_root.pushMc = undefined;
delete this.onEnterFrame;
}
}
};
}
}
function attackLock() {
if ((((((this.char.state == "LOCK") || (this.char.state == "START")) || (this.char.state == "DIE")) || (this.char.state == "REVIVAL")) || (this.char.state == "EFFECT")) || (this.char.state == "GAMEOVER")) {
return(undefined);
}
var _local2 = this.char;
if ((game[(("t_" + _local2.ytile) + "_") + _local2.xtile].state == 0) && (this.char.fire < this.char.bomb)) {
this.char.fire++;
var _local3 = (("bomb_" + _local2.ytile) + "_") + _local2.xtile;
bombList.push(_local3);
game[(("t_" + _local2.ytile) + "_") + _local2.xtile].state = 2;
var _local4 = (_local2.y * 300) + (_local2.x * game.leftRight);
game.clip.attachMovie("bomb", _local3, _local4, {_x:game.clip.back[(("t_" + _local2.ytile) + "_") + _local2.xtile]._x, _y:game.clip.back[(("t_" + _local2.ytile) + "_") + _local2.xtile]._y});
game.clip[_local3].gotoAndStop(1);
if (this.sound == true) {
main_root.startSound(6, 1);
}
}
}
function attackNow(mc, alen) {
var _local6 = mc._name.slice(0, 4);
if (_local6 == "bomb") {
alen = this.char.bomblen;
} else {
alen = 4;
}
var _local5 = mc._name.split("_");
var _local2 = parseInt(_local5[1]);
var _local3 = parseInt(_local5[2]);
var _local9 = _local3 * game.tileW;
var _local8 = _local2 * game.tileH;
var _local11 = ((_local8 * 300) + (_local9 * game.leftRight)) + 100;
var _local7 = (("attackEffect_" + _local2) + "_") + _local3;
game.clip.attachMovie("attackEffect", _local7, _local11, {_x:_local9, _y:_local8});
game.clip[_local7].gotoAndStop("center");
this.charLock(_local3, _local2);
if (this.sound == true) {
main_root.startSound(7, 1);
}
this.attackEffect("up", _local3, _local2, alen);
this.attackEffect("down", _local3, _local2, alen);
this.attackEffect("left", _local3, _local2, alen);
this.attackEffect("right", _local3, _local2, alen);
game[(("t_" + _local2) + "_") + _local3].state = 0;
if (_local6 == "bomb") {
this.char.fire--;
}
mc.removeMovieClip();
if (((this.char.state != "GAMEOVER") && (this.clearStage < 3)) && (this.killMon >= this["enemy" + this.clearStage].length)) {
this.char.state = "GAMEOVER";
this.char.clip.gotoAndStop("SUCCESS");
if (this.sound == true) {
main_root.startSound(12, 1);
}
var _local13 = setTimeout(this, "gameClear", 3000, "Clear");
}
}
function attackEffect(go, myX, myY, alen) {
if (alen == undefined) {
alen = this.char.bomblen;
}
var _local2 = get_possibleArea(myX, myY, alen, go);
var _local4 = Array();
var _local7;
var _local6;
var _local3 = 0;
while (_local3 < _local2.length) {
_local4.push([_local2[_local3][0], _local2[_local3][1]]);
if ((game[(("t_" + _local2[_local3][1]) + "_") + _local2[_local3][0]].state == 1) || (false == game[(("t_" + _local2[_local3][1]) + "_") + _local2[_local3][0]].walkable)) {
_local7 = _local2[_local3][0];
_local6 = _local2[_local3][1];
break;
}
if (game.clip[(("bomb_" + _local2[_local3][1]) + "_") + _local2[_local3][0]] != undefined) {
game.clip[(("bomb_" + _local2[_local3][1]) + "_") + _local2[_local3][0]].nextFrame();
game.clip[(("bomb_" + _local2[_local3][1]) + "_") + _local2[_local3][0]].mc.gotoAndPlay(9);
}
if (game.clip[(("abomb_" + _local2[_local3][1]) + "_") + _local2[_local3][0]] != undefined) {
game.clip[(("abomb_" + _local2[_local3][1]) + "_") + _local2[_local3][0]].nextFrame();
game.clip[(("abomb_" + _local2[_local3][1]) + "_") + _local2[_local3][0]].mc.gotoAndPlay(9);
}
_local3++;
}
_local3 = 0;
while (_local3 < _local4.length) {
if ((_local4[_local3][0] == _local7) && (_local4[_local3][1] == _local6)) {
if (undefined != game.clip[(("itemBox_" + _local6) + "_") + _local7]) {
game.clip[(("itemBox_" + _local6) + "_") + _local7].mc.nextFrame();
game.clip[(("itemBox_" + _local6) + "_") + _local7].mc.box.play();
return(undefined);
}
} else {
var _local11 = _local4[_local3][0] * game.tileW;
var _local10 = _local4[_local3][1] * game.tileH;
var _local8 = (_local4[_local3][1] + "_") + _local4[_local3][0];
var _local5 = "attackEffect_" + _local8;
var _local12 = ((_local10 * 300) + (_local11 * game.leftRight)) + 2;
game.clip.attachMovie("attackEffect", _local5, _local12, {_x:_local11, _y:_local10});
fname = go;
if (_local4.length == (_local3 + 1)) {
fname = go + "end";
}
game.clip[_local5].gotoAndStop(fname);
if (game.clip["item_" + _local8] != undefined) {
game.clip["item_" + _local8].removeMovieClip();
}
this.charLock(_local4[_local3][0], _local4[_local3][1]);
this.attackMon(game.clip[_local5], go);
this.bossHit(game.clip[_local5], go);
}
_local3++;
}
}
function attackMon(mc, go) {
if (0 >= game.currentEnemies) {
return(false);
}
var _local3 = 0;
while (_local3 < game.currentEnemies) {
var _local4 = "enemy" + _local3;
var _local2 = game[_local4];
if (mc.hack.hitTest(_local2.clip.hack) && (_local2.HP > 0)) {
_local2.HP--;
if (_local2.HP == 0) {
_local2.state = "DIE";
this.gamePoint[this.clearStage] = this.gamePoint[this.clearStage] + _local2.point;
if (this.sound == true) {
main_root.startSound(25, 1);
}
_local2.clip.gotoAndStop(_local2.state);
this.killMon++;
}
}
_local3++;
}
return(false);
}
function get_possibleArea(cur_x, cur_y, arange, vertical) {
var _local2 = new Array();
var _local1 = 0;
if ((undefined == vertical) || (vertical == "up")) {
var _local3 = 0;
while (_local3 < arange) {
_local2[_local1] = [];
_local2[_local1][0] = cur_x;
_local2[_local1][1] = cur_y - (_local3 + 1);
_local1++;
_local3++;
}
}
if ((undefined == vertical) || (vertical == "down")) {
var _local3 = 0;
while (_local3 < arange) {
_local2[_local1] = [];
_local2[_local1][0] = cur_x;
_local2[_local1][1] = cur_y + (_local3 + 1);
_local1++;
_local3++;
}
}
if ((undefined == vertical) || (vertical == "right")) {
var _local3 = 0;
while (_local3 < arange) {
_local2[_local1] = [];
_local2[_local1][0] = cur_x + (_local3 + 1);
_local2[_local1][1] = cur_y;
_local1++;
_local3++;
}
}
if ((undefined == vertical) || (vertical == "left")) {
var _local3 = 0;
while (_local3 < arange) {
_local2[_local1] = [];
_local2[_local1][0] = cur_x - (_local3 + 1);
_local2[_local1][1] = cur_y;
_local1++;
_local3++;
}
}
return(_local2);
}
function charLock(x, y) {
if ((this.char.state != "NORMAL") && (this.char.state != "ACT")) {
return(undefined);
}
if ((this.char.xtile == x) && (this.char.ytile == y)) {
if (this.char.tortoise != 1) {
this.char.tortoise = 1;
this.char.state = "EFFECT";
this.char.speed = this.mySpeed;
this.char.x;
this.char.clip.gotoAndStop("LOST");
} else {
this.char.state = "LOCK";
this.char.clip.gotoAndStop(this.char.state);
this.char.speed = 1;
if (this.sound == true) {
main_root.startSound(8, 1);
}
}
}
}
function chrDie() {
this.char.state = "DIE";
this.char.speed = this.mySpeed;
this.char.tortoise = 1;
this.char.life--;
this.mcUi.ui_life.gotoAndStop(this.char.life + 1);
if (this.char.life <= 0) {
if (this.sound == true) {
main_root.startSound(13, 1);
}
if (this.clearStage == 3) {
this.mcBoss.state = "STOP";
this.mcBoss.clip.gotoAndStop(15);
var _local4 = setTimeout(this, "gameClear", 3000, "Fail");
} else {
this.gameClear("Fail");
}
} else {
this.char.state = "REVIVAL";
this.char.xtile = gameDefault.xtile;
this.char.ytile = gameDefault.ytile;
this.char.x = (char.xtile * game.tileW) + (game.tileW / 2);
this.char.y = (char.ytile * game.tileH) + (game.tileH / 2);
this.char.clip._x = this.char.x;
this.char.clip._y = this.char.y;
var _local2 = ((this.char.y * 300) + (this.char.x * game.leftRight)) + 1;
this.char.clip.swapDepths(_local2);
if (this.sound == true) {
main_root.startSound(16, 1);
}
this.char.clip.gotoAndStop("START");
var _local3 = setTimeout(this, "charRevival", 1500);
}
}
function charRevival() {
this.char.state = "ACT";
}
function getItem(x, y) {
if (((this.char.state == "LOCK") || (this.char.state == "DIE")) || (this.char.state == "START")) {
return(undefined);
}
var _local2 = (("item_" + y) + "_") + x;
if (game.clip[_local2] != undefined) {
var _local3 = game.clip[_local2]._currentframe;
switch (_local3) {
case 4 :
if (this.char.tortoise == 1) {
this.char.speed = this.char.speed + 2;
if (this.char.speed > 8) {
this.char.speed = 8;
}
this.mySpeed = this.char.speed;
}
game.clip[_local2].removeMovieClip();
break;
case 5 :
this.item2++;
this.mcUi.ui_item2.gotoAndStop(this.item2 + 1);
game.clip[_local2].removeMovieClip();
break;
case 6 :
this.item1++;
this.mcUi.ui_item1.gotoAndStop(this.item1 + 1);
game.clip[_local2].removeMovieClip();
break;
case 7 :
if (this.char.bomb < 5) {
this.char.bomb++;
}
game.clip[_local2].removeMovieClip();
break;
case 8 :
if (this.char.bomblen < 5) {
this.char.bomblen++;
}
game.clip[_local2].removeMovieClip();
break;
case 9 :
if (this.char.tortoise == 1) {
this.char.speed = 3;
this.char.tortoise = 2;
this.char.clip.mc.gotoAndStop(this.char.tortoise);
}
game.clip[_local2].removeMovieClip();
break;
case 10 :
if (this.char.tortoise == 1) {
this.char.speed = 8;
this.char.tortoise = 3;
this.char.clip.mc.gotoAndStop(this.char.tortoise);
}
game.clip[_local2].removeMovieClip();
break;
default :
if (game.clip[_local2].mc._currentframe >= 12) {
break;
}
if (this.sound == true) {
main_root.startSound(14, 1);
}
this.gamePoint[this.clearStage] = this.gamePoint[this.clearStage] + this.itemPoint[_local3 - 1];
game.clip[_local2].mc.gotoAndPlay(12);
}
if (_local3 > 3) {
if (this.sound == true) {
main_root.startSound(14, 1);
}
}
}
}
function itemUse(k) {
if (((char["item" + k] < 1) || (this.stateChar == "DIE")) || (this.stateChar == "START")) {
return(undefined);
}
if ((1 == k) && (this.char.tortoise == 2)) {
if (this.sound == true) {
main_root.startSound(18, 1);
}
this.char.speed = 8;
this.char.tortoise = 3;
this.char.state = "EFFECT";
this.char.clip.gotoAndStop("CHANGE");
char["item" + k]--;
this.mcUi["ui_item" + k].gotoAndStop(char["item" + k] + 1);
} else if ((2 == k) && (this.char.state == "LOCK")) {
this.char.speed = this.mySpeed;
this.char.state = "ACT";
if (this.sound == true) {
main_root.startSound(10, 1);
}
this.char.clip.gotoAndStop("PANG");
char["item" + k]--;
this.mcUi["ui_item" + k].gotoAndStop(char["item" + k] + 1);
}
}
function makeItem(mc) {
var _local2 = mc._name.split("_");
var _local5 = this.decideItem();
if (_local5 > 0) {
var _local4 = (("item_" + _local2[1]) + "_") + _local2[2];
var _local6 = ((mc._y * 300) + (mc._x * game.leftRight)) + 1;
game.clip.attachMovie("item", _local4, _local6, {_x:mc._x, _y:mc._y});
game.clip[_local4].gotoAndStop(_local5);
}
mc.removeMovieClip();
game[(("t_" + _local2[1]) + "_") + _local2[2]].walkable = true;
game[(("t_" + _local2[1]) + "_") + _local2[2]].state = 0;
}
function itemPercentInit() {
numOfItem = new Array();
var _local2 = 20;
var _local1 = 0;
while (_local1 < itemPercent.length) {
numOfItem[_local1] = (_local1 + ":") + ((_local2 * Number(itemPercent[_local1])) / 100);
shuffleItem[_local1] = numOfItem[_local1];
_local1++;
}
}
function decideItem() {
if (shuffleItem.length == 0) {
return(-1);
}
var _local6 = this.randRange(0, shuffleItem.length - 1);
var _local5;
var _local8 = new Array();
_local8 = shuffleItem[_local6].split(":");
var _local4 = String(_local8[0]);
var _local7 = Number(_local8[1]);
var _local3;
var _local2 = 0;
while (_local2 < itemPercent.length) {
_local3 = String(numOfItem[_local2].split(":", 1));
if (_local3 == _local4) {
_local5 = Number(_local3);
break;
}
_local2++;
}
_local7--;
if (_local7 <= 0) {
shuffleItem.splice(_local6, 1);
} else {
shuffleItem[_local6] = (_local4 + ":") + _local7;
}
return(matchingItem(_local5));
}
function matchingItem(id) {
var _local1;
switch (id) {
case 0 :
_local1 = 1;
break;
case 1 :
_local1 = 2;
break;
case 2 :
_local1 = 3;
break;
case 3 :
_local1 = 4;
break;
case 4 :
_local1 = 7;
break;
case 5 :
_local1 = 8;
break;
case 6 :
_local1 = 9;
break;
case 7 :
_local1 = 10;
break;
case 8 :
_local1 = -1;
break;
default :
_local1 = -1;
}
return(_local1);
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function gameClear(result) {
this.char.state = "GAMEOVER";
for (mc in _root) {
_root[mc].removeMovieClip();
}
delete this.controller.onEnterFrame;
this.resultMode = result;
_root.gotoAndStop("gameResult");
}
this.stop();
var stageMap1 = [[["g0", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g1", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["b0", 1], ["t1", 0], ["b1", 1], ["t1", 0], ["b0", 1], ["t1", 0], ["b1", 1], ["t1", 0], ["b0", 1], ["t1", 0], ["b1", 1], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["b0", 1], ["t1", 0], ["b1", 1], ["t1", 0], ["b0", 1], ["t1", 0], ["b1", 1], ["t1", 0], ["b0", 1], ["t1", 0], ["b1", 1], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["b0", 1], ["t1", 0], ["b1", 1], ["t1", 0], ["b0", 1], ["t1", 0], ["b1", 1], ["t1", 0], ["b0", 1], ["t1", 0], ["b1", 1], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["b0", 1], ["t1", 0], ["b1", 1], ["t1", 0], ["b0", 1], ["t1", 0], ["b1", 1], ["t1", 0], ["b0", 1], ["t1", 0], ["b1", 1], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g2", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g3", 1]]];
var itemBoxs1 = [["box1", 2, 2, 0], ["box1", 4, 2, 0], ["box1", 6, 2, 0], ["box1", 8, 2, 0], ["box1", 10, 2, 0], ["box1", 2, 4, 0], ["box1", 4, 4, 0], ["box1", 6, 4, 0], ["box1", 8, 4, 0], ["box1", 10, 4, 0], ["box1", 2, 6, 0], ["box1", 4, 6, 0], ["box1", 6, 6, 0], ["box1", 8, 6, 0], ["box1", 10, 6, 0], ["box1", 2, 8, 0], ["box1", 4, 8, 0], ["box1", 6, 8, 0], ["box1", 8, 8, 0], ["box1", 10, 8, 0]];
var enemy1 = [["default", 4, 1, 0], ["default", 8, 1, 0], ["default", 4, 3, 0], ["default", 8, 3, 0], ["default", 4, 5, 0], ["default", 8, 5, 0], ["default", 4, 7, 0], ["default", 8, 7, 0]];
var stageMap2 = [[["g0", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g1", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["b0", 1], ["b1", 1], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["b1", 1], ["b0", 1], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["b1", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["b1", 1], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["b1", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["b1", 1], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["b0", 1], ["b1", 1], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["b1", 1], ["b0", 1], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g2", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g3", 1]]];
var itemBoxs2 = [["box2", 4, 2, 1], ["box3", 5, 2, 1], ["box2", 6, 2, 1], ["box3", 7, 2, 1], ["box2", 8, 2, 1], ["box2", 2, 4, 1], ["box2", 10, 4, 1], ["box3", 2, 5, 1], ["box3", 10, 5, 1], ["box2", 2, 6, 1], ["box2", 10, 6, 1], ["box2", 4, 8, 1], ["box3", 5, 8, 1], ["box2", 6, 8, 1], ["box3", 7, 8, 1], ["box2", 8, 8, 1], ["box1", 5, 4, 0], ["box1", 6, 4, 0], ["box1", 7, 4, 0], ["box1", 4, 5, 0], ["box1", 8, 5, 0], ["box1", 5, 6, 0], ["box1", 6, 6, 0], ["box1", 7, 6, 0]];
var enemy2 = [["default", 1, 1, 0], ["default", 11, 1, 0], ["default", 3, 3, 0], ["default", 9, 3, 0], ["default", 3, 7, 0], ["default", 9, 7, 0], ["default", 1, 9, 0], ["default", 11, 9, 0]];
var stageMap3 = [[["g0", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g4", 1], ["g1", 1]], [["g6", 1], ["s0", 1], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["s0", 1], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["g7", 1]], [["g6", 1], ["s1", 1], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["t0", 0], ["t1", 0], ["s1", 1], ["g7", 1]], [["g2", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g5", 1], ["g3", 1]]];
var itemBoxs3 = [["box2", 3, 1, 1], ["box2", 9, 1, 1], ["box3", 2, 2, 1], ["box3", 4, 2, 1], ["box3", 8, 2, 1], ["box3", 10, 2, 1], ["box2", 1, 3, 1], ["box2", 11, 3, 1], ["box3", 2, 4, 1], ["box3", 10, 4, 1], ["box2", 1, 5, 1], ["box2", 11, 5, 1], ["box3", 2, 6, 1], ["box3", 10, 6, 1], ["box2", 1, 7, 1], ["box2", 11, 7, 1], ["box3", 2, 8, 1], ["box3", 4, 8, 1], ["box3", 8, 8, 1], ["box3", 10, 8, 1], ["box2", 3, 9, 1], ["box2", 5, 9, 1], ["box2", 7, 9, 1], ["box2", 9, 9, 1]];
var bossMapPatten = [[6, 4], ["Attack1", 0], [6, 8], [3, 8], [3, 3], [6, 3], ["Attack4", 0], [9, 3], ["Attack2", 0], [9, 8], ["Attack2", 0], [6, 8], [6, 5], ["Attack4", 0], [2, 5], ["Attack3", 0], [2, 3], [6, 3], [6, 9], [9, 9], [9, 3], [6, 3]];
this.stop();
var bonusItem = 0;
var bonusItemCount = 0;
var gamePoint = new Array();
var itemPoint = new Array(5, 3, 1, 0, 0, 0, 0, 0, 0, 0);
var itemPercent = [5, 5, 5, 15, 15, 15, 10, 5, 25];
var numOfItem = new Array();
var shuffleItem = new Array();
var playTime = 0;
var playTimer = 0;
var totalTime = 0;
var resultMode = "Fail";
var delayPushTime = 3;
var delayPush;
var pushMc;
var bombList = Array();
var killMon = 0;
var mySpeed = 5;
var sound = true;
gameDefault = {};
gameDefault.xtile = 6;
gameDefault.ytile = 9;
gameDefault.speed = 5;
gameDefault.bomb = 1;
gameDefault.bomblen = 1;
gameDefault.fire = 0;
gameDefault.state = "START";
gameDefault.tortoise = 1;
gameDefault.item1 = 1;
gameDefault.item2 = 1;
gameDefault.HP = 1;
gameDefault.life = 3;
game = {startX:-21, startY:0, tileW:40, tileH:40};
game.leftRight = -1;
game.Tile0 = function () {
};
game.Tile0.prototype.walkable = true;
game.Tile0.prototype.state = 0;
game.Tile1 = function () {
};
game.Tile1.prototype.walkable = false;
game.itemBoxp0 = function () {
};
game.itemBoxp0.prototype.width = game.tileW;
game.itemBoxp0.prototype.height = game.tileH;
game.itemBoxp0.prototype.move = true;
game.itemBoxp1 = function () {
};
game.itemBoxp1.prototype.width = game.tileW;
game.itemBoxp1.prototype.height = game.tileH;
game.itemBoxp1.prototype.move = false;
game.Enemyp = function () {
};
game.Enemyp.prototype.HP = 1;
game.Enemyp.prototype.point = 5;
game.Enemyp.prototype.xMove = 1;
game.Enemyp.prototype.yMove = 0;
game.Enemyp.prototype.speed = 2;
game.Enemyp.prototype.turning = 5;
game.Enemyp.prototype.state = "ACT";
game.Enemyp.prototype.edges = false;
game.Enemyp.prototype.pushPower = false;
char = {width:20, height:20};
char.item1 = gameDefault.item1;
char.item2 = gameDefault.item2;
char.HP = gameDefault.HP;
char.life = gameDefault.life;
char.edges = true;
char.pushPower = true;
var stay = 100;
var flag_key1 = false;
var flag_key2 = false;
var flag_space = false;
var myKeyListener = new Object();
this.myKeyListener.onKeyDown = function () {
if ((Key.getCode() == 49) && (false == _root.flag_key1)) {
_root.itemUse(1);
_root.flag_key1 = true;
}
if ((Key.getCode() == 50) && (false == _root.flag_key2)) {
_root.itemUse(2);
_root.flag_key2 = true;
}
if ((Key.getCode() == 32) && (false == _root.flag_space)) {
_root.attackLock();
_root.flag_space = true;
}
};
this.myKeyListener.onKeyUp = function () {
if ((Key.getCode() == 49) && (true == _root.flag_key1)) {
_root.flag_key1 = false;
}
if ((Key.getCode() == 50) && (true == _root.flag_key2)) {
_root.flag_key2 = false;
}
if ((Key.getCode() == 32) && (true == _root.flag_space)) {
_root.flag_space = false;
}
};
Key.addListener(this.myKeyListener);
this.btn_soundOnOff.onRelease = function () {
if (_root.sound == true) {
_root.sound = false;
stopAllSounds();
this.gotoAndStop(2);
} else {
_root.sound = true;
startSound(_root.bgSound, 9999);
this.gotoAndStop(1);
}
};
this.btn_gameStart.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
main_root.gotoAndStop("stage1");
};
this.btn_gameStart.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_gameStart.onRollOut = function () {
this.gotoAndStop(1);
};
this.btn_gameHelp.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
this._parent.nextFrame();
};
this.btn_gameHelp.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_gameHelp.onRollOut = function () {
this.gotoAndStop(1);
};
this.btn_visit.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_visit.onRollOut = function () {
this.gotoAndStop(1);
};
this.btn_visit.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
getURL ("http://poptag.nexon.net/?PARTNERKEY=MK009SVG0071083", "_blank");
};
Frame 184
this.play();
this.btn_soundOnOff.onRelease = function () {
if (_root.sound == true) {
_root.sound = false;
stopAllSounds();
this.gotoAndStop(2);
} else {
_root.sound = true;
startSound(_root.bgSound, 9999);
this.gotoAndStop(1);
}
};
Frame 193
if (false) {
}
Frame 194
if (false) {
}
Frame 195
if (false) {
}
Frame 196
if (false) {
}
Frame 197
if (false) {
}
Frame 198
if (false) {
}
Frame 200
if (false) {
}
Frame 201
if (false) {
}
Frame 202
if (false) {
}
Frame 203
if (false) {
}
Frame 204
if (false) {
}
Frame 205
if (false) {
}
Frame 206
if (false) {
}
Frame 211
if (false) {
}
Frame 212
if (false) {
}
Frame 213
if (false) {
}
Frame 214
if (false) {
}
Frame 216
this.stop();
this.btn_gameStart.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
main_root.gotoAndStop("stage1");
};
this.btn_gameStart.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_gameStart.onRollOut = function () {
this.gotoAndStop(1);
};
Frame 217
this.stop();
stopAllSounds();
var clearStage = 1;
this.bgSound = 5;
if (this.sound == true) {
startSound(this.bgSound, 9999);
}
this.gamePoint = [];
this.gameStart();
this.btn_soundOnOff.swapDepths(this.getNextHighestDepth() + 1);
this.btn_soundOnOff.onRelease = function () {
if (_root.sound == true) {
_root.sound = false;
stopAllSounds();
this.gotoAndStop(2);
} else {
_root.sound = true;
startSound(_root.bgSound, 9999);
this.gotoAndStop(1);
}
};
Instance of Symbol 989 MovieClip [empty] "controller" in Frame 217
onClipEvent (enterFrame) {
_root.detectKeys();
}
Frame 218
this.stop();
stopAllSounds();
this.bgSound = 5;
if (this.sound == true) {
startSound(this.bgSound, 9999);
}
var clearStage = 2;
gameDefault.xtile = 6;
gameDefault.ytile = 5;
this.gameStart();
this.btn_soundOnOff.swapDepths(this.getNextHighestDepth() + 1);
this.btn_soundOnOff.onRelease = function () {
if (_root.sound == true) {
_root.sound = false;
stopAllSounds();
this.gotoAndStop(2);
} else {
_root.sound = true;
startSound(_root.bgSound, 9999);
this.gotoAndStop(1);
}
};
Instance of Symbol 989 MovieClip [empty] "controller" in Frame 218
onClipEvent (enterFrame) {
_root.detectKeys();
}
Frame 219
function bossDefaultSet() {
this.tiles.attachMovie("empty", "boss", 0);
game.clip = this.tiles;
var _local2 = mcBoss;
_local2.xtile = 6;
_local2.ytile = 2;
_local2.x = (_local2.xtile * game.tileW) + (game.tileW / 2);
_local2.y = _local2.ytile * game.tileH;
_local2.depth = ((_local2.y * 300) + (_local2.x * game.leftRight)) + 1;
game.clip.attachMovie("enemy1", "mcBoss", _local2.depth);
_local2.clip = game.clip.mcBoss;
_local2.clip._x = _local2.x;
_local2.clip._y = _local2.y;
_local2.clip.gotoAndStop(_local2.goFrame);
this.pNum = 0;
}
function bossMove() {
if (((this.mcBoss.state != "LOCK") && (this.mcBoss.state != "DIE")) && (this.mcBoss.state != "STOP")) {
this.getRoute();
if ((false == isNaN(this["move" + this.moveSelectXY])) && (this["target" + this.moveSelectXY] > 0)) {
if (this["move" + this.moveSelectXY] < 0) {
if (this["target" + this.moveSelectXY] > this.mcBoss.clip[this.moveSelectXY]) {
this.mcBoss.clip[this.moveSelectXY] = this.mcBoss.clip[this.moveSelectXY] + this.mcBoss.speed;
} else {
this.mcBoss.clip[this.moveSelectXY] = this["target" + this.moveSelectXY];
}
} else if (this["target" + this.moveSelectXY] < this.mcBoss.clip[this.moveSelectXY]) {
this.mcBoss.clip[this.moveSelectXY] = this.mcBoss.clip[this.moveSelectXY] - this.mcBoss.speed;
} else {
this.mcBoss.clip[this.moveSelectXY] = this["target" + this.moveSelectXY];
}
this.mcBoss.xtile = Math.floor(this.mcBoss.clip._x / game.tileW);
this.mcBoss.ytile = Math.floor(this.mcBoss.clip._y / game.tileH);
this.mcBoss.x = this.mcBoss.clip._x;
this.mcBoss.y = this.mcBoss.clip._y;
this.mcBoss.depth = ((this.mcBoss.y * 300) + (this.mcBoss.x * game.leftRight)) + 10000;
this.mcBoss.clip.swapDepths(this.mcBoss.depth);
}
}
if ((((char.state != "START") && (char.state != "DIE")) && (char.state != "REVIVAL")) && (char.state != "EFFECT")) {
var _local3 = 0;
while (_local3 < 6) {
if (this.mcBoss.clip["h" + _local3].hitTest(this.char.clip.hack)) {
if (this.mcBoss.state == "LOCK") {
this.mcBoss.state = "DIE";
this.mcBoss.clip.nextFrame();
} else if ((this.mcBoss.state != "DIE") && (char.state != "DIE")) {
char.state = "DIE";
if (this.sound == true) {
main_root.startSound(9, 1);
}
this.char.clip.gotoAndStop(char.state);
}
}
_local3++;
}
}
var _local3 = 0;
while (_local3 < 6) {
var _local2 = 0;
while (_local2 < this.bombList.length) {
if (game.clip[this.bombList[_local2]] != undefined) {
if (this.mcBoss.clip["h" + _local3].hitTest(game.clip[this.bombList[_local2]])) {
if ((this.mcBoss.state != "LOCK") && (this.mcBoss.state != "DIE")) {
game.clip[this.bombList[_local2]].nextFrame();
game.clip[this.bombList[_local2]].mc.gotoAndPlay(9);
}
}
}
_local2++;
}
_local3++;
}
}
function getRoute() {
if (this.mcBoss.state == "LOCK") {
return(undefined);
}
if ((this.moveIntervalCounter > 0) && ((this.target_x != this.mcBoss.clip._x) || (this.target_y != this.mcBoss.clip._y))) {
this.moveIntervalCounter--;
return(undefined);
}
if (this.bossMapPatten.length <= this.pNum) {
this.pNum = 0;
}
this.moveIntervalCounter = this.moveInterval;
this.target_bNum = this.pNum;
this.target_x = (this.bossMapPatten[this.target_bNum][0] * game.tileW) + (game.tileW / 2);
this.target_y = this.bossMapPatten[this.target_bNum][1] * game.tileH;
if (0 != this.bossMapPatten[this.target_bNum][1]) {
this.move_x = this.mcBoss.clip._x - this.target_x;
this.move_y = this.mcBoss.clip._y - this.target_y;
if (this.move_x == 0) {
if (this.sound == true) {
main_root.startSound(24, 1);
}
this.moveSelectXY = "_y";
if (this.move_y > 0) {
this.mcBoss.clip.gotoAndStop(4);
} else {
this.mcBoss.clip.gotoAndStop(1);
}
} else if (this.move_y == 0) {
if (this.sound == true) {
main_root.startSound(24, 1);
}
this.moveSelectXY = "_x";
if (this.move_x > 0) {
this.mcBoss.clip.gotoAndStop(2);
} else {
this.mcBoss.clip.gotoAndStop(3);
}
}
} else if ((this.mcBoss.clip._currentframe < 5) && (this.mcBoss.clip.energyBar._currentframe < 26)) {
if (this.sound == true) {
main_root.startSound(18, 1);
}
this.attackType = this.bossMapPatten[this.target_bNum][0];
if ("Attack4" == this.attackType) {
var _local2 = 5;
} else {
var _local2 = parseInt(this.bossMapPatten[this.target_bNum][0].substr(6, 7)) + 4;
}
this.mcBoss.clip.gotoAndStop(_local2);
}
this.pNum++;
}
function roundAttack() {
var _local3 = this.mcBoss.xtile;
var _local2 = this.mcBoss.ytile;
if (this.sound == true) {
main_root.startSound(19, 1);
}
attackEffect("up", _local3 - 3, _local2 + 2, 5);
attackEffect("down", _local3 + 3, _local2 - 3, 5);
attackEffect("left", _local3 + 3, _local2 + 2, 6);
attackEffect("right", _local3 - 3, _local2 - 3, 6);
}
function verticalBomb(xy, n) {
var myXtile = this.mcBoss.xtile;
var myYtile = this.mcBoss.ytile;
if (n == -1) {
if (xy == "x") {
myXtile = myXtile - 3;
myYtile--;
} else {
myYtile = myYtile - 2;
}
} else if (xy == "x") {
myXtile = myXtile + 3;
myYtile--;
} else {
myYtile = myYtile + 2;
}
at_x = myXtile * game.tileW;
at_y = myYtile * game.tileH;
var depth = (((at_y * 300) + (at_x * game.leftRight)) + 1);
var before_name = ((myYtile + "_") + myXtile);
game.clip.attachMovie("bomb", "abomb_" + before_name, depth, {_x:at_x, _y:at_y});
if (this.sound == true) {
main_root.startSound(19, 1);
}
game.clip["abomb_" + before_name].onEnterFrame = function () {
if (xy == "x") {
myXtile = Math.ceil((this._x + (40 * n)) / game.tileW);
} else {
myYtile = Math.ceil((this._y + (40 * n)) / game.tileH);
}
bomb_name = (myYtile + "_") + myXtile;
if ((((game["t_" + bomb_name].walkable == true) && (game["t_" + bomb_name].state == 0)) && (game["bomb_" + bomb_name] == undefined)) && ((char.xtile != myXtile) || (char.ytile != myYtile))) {
this._x = myXtile * game.tileW;
this._y = myYtile * game.tileH;
depth = (this._y * 300) + (this._x * game.leftRight);
this.swapDepths(depth);
} else {
this._name = "abomb_" + before_name;
game["t_" + before_name].state = 2;
delete this.onEnterFrame;
}
before_name = bomb_name;
};
}
function bossHit(mc) {
if ((this.mcBoss.state == "HIT") || (this.mcBoss.clip._currentframe > 8)) {
return(false);
}
var _local2 = 0;
while (_local2 < 6) {
if (mc.hack.hitTest(this.mcBoss.clip["h" + _local2])) {
if (this.sound == true) {
main_root.startSound(20, 1);
}
if (this.mcBoss.clip._currentframe < 5) {
add_fr = 8;
} else if ((this.mcBoss.clip._currentframe > 4) && (this.mcBoss.clip._currentframe < 9)) {
add_fr = 4;
}
add_fr = add_fr + this.mcBoss.clip._currentframe;
this.mcBoss.state = "HIT";
this.mcBoss.clip.gotoAndStop(add_fr);
this.mcBoss.HP--;
this.mcBoss.clip.energyBar.nextFrame();
if (this.mcBoss.HP <= 0) {
this.mcBoss.state = "LOCK";
this.gamePoint[this.clearStage] = this.gamePoint[this.clearStage] + this.mcBoss.point;
this.killMon++;
this.mcBoss.clip.gotoAndStop(13);
}
break;
}
_local2++;
}
}
function allClear() {
this.char.state = "EFFECT";
this.char.clip.gotoAndStop("SUCCESS");
if (this.sound == true) {
main_root.startSound(12, 1);
}
var _local2 = setTimeout(this, "gameClear", 3000, "Success");
}
this.stop();
stopAllSounds();
this.bgSound = 5;
if (this.sound == true) {
startSound(this.bgSound, 9999);
}
var clearStage = 3;
gameDefault.xtile = 6;
gameDefault.ytile = 9;
var moveBmin = 0;
var moveBmax = 19;
var moveInterval = 100;
var moveIntervalCounter = 0;
var boss_attackNum = 0;
var target_bNum = 0;
var pattenBlocks = Array();
var pNum = 0;
var moveSelectXY;
var move_x;
var move_y;
var target_x;
var target_y;
var attackType;
var mcBoss = {width:40, height:40};
mcBoss.HP = 5;
mcBoss.point = 30;
mcBoss.speed = 3;
mcBoss.state = "NONE";
this.bossDefaultSet();
this.gameStart();
this.bossDefaultSet();
this.tiles.attachMovie("soundOnOff", "btn_soundOnOff", 10, {_x:377.9, _y:6.9});
this.tiles.btn_soundOnOff.onRelease = function () {
if (_root.sound == true) {
_root.sound = false;
stopAllSounds();
this.gotoAndStop(2);
} else {
_root.sound = true;
startSound(_root.bgSound, 9999);
this.gotoAndStop(1);
}
};
Instance of Symbol 989 MovieClip [empty] "controller" in Frame 219
onClipEvent (enterFrame) {
_root.detectKeys();
}
Frame 220
this.stop();
stopAllSounds();
this.mcClear._visible = false;
this.mcSuccess._visible = false;
this.mcFail._visible = false;
this.playTime = getTimer() - this.playTimer;
this.playTime = Math.floor(this.playTime / 1000);
this.gamePoint[this.clearStage] = this.gamePoint[this.clearStage] + ((this.char.life * 50) + ((this.char.item1 + this.char.item2) * 10));
this.randBonus = (this.playTime % 2) + 1;
if (this.playTime <= 60) {
this.gamePoint[this.clearStage] = this.gamePoint[this.clearStage] + 100;
this.char.life++;
} else if (this.playTime <= 120) {
this.gamePoint[this.clearStage] = this.gamePoint[this.clearStage] + 70;
main_root.bonusItemCount = 2;
} else if (this.playTime <= 180) {
this.gamePoint[this.clearStage] = this.gamePoint[this.clearStage] + 50;
main_root.bonusItemCount = 1;
} else {
this.gamePoint[this.clearStage] = this.gamePoint[this.clearStage] + 30;
}
if (this.resultMode == "Clear") {
if (this.sound == true) {
main_root.startSound(1, 9999);
}
this.char["item" + this.randBonus] = this.char["item" + this.randBonus] + main_root.bonusItemCount;
main_root.sMons = this.killMon;
main_root.sTotal = this.gamePoint[this.clearStage];
main_root.sClock = this.playTime;
main_root.sLife = this.char.life;
main_root.clearStage = this.clearStage;
} else if (this.resultMode == "Success") {
this.mcClear._visible = false;
if (this.sound == true) {
main_root.startSound(2, 9999);
}
main_root.sItemCount0 = this.char.life;
main_root.sItemCount1 = this.char.item1;
main_root.sItemCount2 = this.char.item2;
if (undefined != this.gamePoint[1]) {
main_root.sStage1 = this.gamePoint[1];
} else {
main_root.sStage1 = 0;
}
if (undefined != this.gamePoint[2]) {
main_root.sStage2 = this.gamePoint[2];
} else {
main_root.sStage2 = 0;
}
if (undefined != this.gamePoint[3]) {
main_root.sStage3 = this.gamePoint[3];
} else {
main_root.sStage3 = 0;
}
main_root.scoreStage3 = main_root.sStage3;
main_root.sTotal = (main_root.sStage1 + main_root.sStage2) + main_root.sStage3;
if (main_root.sTotal >= 700) {
main_root.sRank = 1;
} else if (main_root.sTotal >= 500) {
main_root.sRank = 2;
} else if (main_root.sTotal >= 300) {
main_root.sRank = 3;
} else if (main_root.sTotal >= 100) {
main_root.sRank = 4;
} else {
main_root.sRank = 5;
}
this["mc" + main_root.resultMode]._visible = true;
this["mc" + main_root.resultMode].gotoAndPlay(2);
} else if (this.resultMode == "Fail") {
if (this.sound == true) {
main_root.startSound(3, 1);
}
}
this["mc" + main_root.resultMode]._visible = true;
this["mc" + main_root.resultMode].gotoAndPlay(2);
Frame 221
this.play();
Frame 222
if (false) {
}
Frame 223
if (false) {
}
Frame 224
if (false) {
}
Frame 234
if (false) {
}
Frame 235
if (false) {
}
Frame 236
if (false) {
}
Frame 237
if (false) {
}
Frame 238
if (false) {
}
Frame 239
if (false) {
}
Frame 240
if (false) {
}
Frame 241
if (false) {
}
Frame 247
this.stop();
_root.restartNow = true;
this.btn_restart.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
main_root.gotoAndPlay("STAGE1");
};
this.btn_restart.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_restart.onRollOut = function () {
this.gotoAndStop(1);
};
this.btn_visit.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_visit.onRollOut = function () {
this.gotoAndStop(1);
};
this.btn_visit.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
getURL ("http://poptag.nexon.net/?PARTNERKEY=MK009SVG0071083", "_blank");
};
Symbol 36 MovieClip Frame 1
_root.char.state = "ACT";
if (_root.char.tortoise > 1) {
this._parent.gotoAndStop(6);
}
Symbol 49 MovieClip Frame 1
this.stop();
Symbol 49 MovieClip Frame 2
this.play();
Symbol 49 MovieClip Frame 16
this.gotoAndPlay(2);
Symbol 60 MovieClip Frame 1
this.stop();
Symbol 60 MovieClip Frame 2
this.play();
Symbol 60 MovieClip Frame 13
this.gotoAndPlay(2);
Symbol 69 MovieClip Frame 1
this.stop();
Symbol 69 MovieClip Frame 2
this.play();
Symbol 69 MovieClip Frame 13
this.gotoAndPlay(2);
Symbol 70 MovieClip Frame 1
this.stop();
this.gotoAndStop(_root.char.tortoise);
Symbol 81 MovieClip Frame 1
this.stop();
Symbol 81 MovieClip Frame 2
this.play();
Symbol 81 MovieClip Frame 16
this.gotoAndPlay(2);
Symbol 92 MovieClip Frame 1
this.stop();
Symbol 92 MovieClip Frame 2
this.play();
Symbol 92 MovieClip Frame 13
this.gotoAndPlay(2);
Symbol 101 MovieClip Frame 1
this.stop();
Symbol 101 MovieClip Frame 2
this.play();
Symbol 101 MovieClip Frame 13
this.gotoAndPlay(2);
Symbol 102 MovieClip Frame 1
this.stop();
this.gotoAndStop(_root.char.tortoise);
Symbol 123 MovieClip Frame 25
this.stop();
this._parent.gotoAndStop(1);
Symbol 129 MovieClip Frame 1
this.stop();
Symbol 129 MovieClip Frame 2
this.play();
Symbol 129 MovieClip Frame 16
this.gotoAndPlay(2);
Symbol 135 MovieClip Frame 1
this.stop();
Symbol 135 MovieClip Frame 2
this.play();
Symbol 135 MovieClip Frame 13
this.gotoAndPlay(2);
Symbol 144 MovieClip Frame 1
this.stop();
Symbol 144 MovieClip Frame 2
this.play();
Symbol 144 MovieClip Frame 13
this.gotoAndPlay(2);
Symbol 145 MovieClip Frame 1
this.stop();
this.gotoAndStop(_root.char.tortoise);
Symbol 156 MovieClip Frame 1
this.stop();
Symbol 156 MovieClip Frame 2
this.play();
Symbol 156 MovieClip Frame 16
this.gotoAndPlay(2);
Symbol 167 MovieClip Frame 1
this.stop();
Symbol 167 MovieClip Frame 2
this.play();
Symbol 167 MovieClip Frame 13
this.gotoAndPlay(2);
Symbol 176 MovieClip Frame 1
this.stop();
Symbol 176 MovieClip Frame 2
this.play();
Symbol 176 MovieClip Frame 13
this.gotoAndPlay(2);
Symbol 177 MovieClip Frame 1
this.stop();
this.gotoAndStop(_root.char.tortoise);
Symbol 186 MovieClip Frame 1
this.play();
Symbol 186 MovieClip Frame 12
this._parent.gotoAndStop(1);
Symbol 210 MovieClip Frame 60
this.gotoAndPlay(39);
Symbol 211 MovieClip Frame 25
this.stop();
Symbol 216 MovieClip Frame 1
this.play();
Symbol 216 MovieClip Frame 118
main_root.startSound(9, 1);
Symbol 216 MovieClip Frame 122
this.stop();
_root.char.state = "DIE";
this._parent.gotoAndStop("DIE");
Symbol 233 MovieClip Frame 25
this.stop();
_root.chrDie();
Symbol 238 MovieClip Frame 1
this.play();
_root.char.state = "EFFECT";
Symbol 238 MovieClip Frame 12
_root.char.state = "ACT";
this._parent.gotoAndStop(6);
Symbol 245 MovieClip Frame 6
this._parent.gotoAndStop(1);
Symbol 246 MovieClip [char] Frame 1
stop();
Symbol 262 MovieClip Frame 10
_root.mcBoss.state = "OK";
Symbol 269 MovieClip Frame 1
this.stop();
Symbol 269 MovieClip Frame 2
this.play();
Symbol 269 MovieClip Frame 6
this.stop();
Symbol 269 MovieClip Frame 7
this.play();
Symbol 269 MovieClip Frame 11
this.stop();
Symbol 269 MovieClip Frame 12
this.play();
Symbol 269 MovieClip Frame 16
this.stop();
Symbol 269 MovieClip Frame 17
this.play();
Symbol 269 MovieClip Frame 21
this.stop();
Symbol 269 MovieClip Frame 22
this.play();
Symbol 269 MovieClip Frame 26
this.stop();
this._parent.gotoAndStop(13);
Symbol 284 MovieClip Frame 10
_root.mcBoss.state = "OK";
Symbol 297 MovieClip Frame 10
_root.mcBoss.state = "OK";
Symbol 310 MovieClip Frame 10
_root.mcBoss.state = "OK";
Symbol 321 MovieClip Frame 1
this.counter = 0;
Symbol 321 MovieClip Frame 2
this.play();
this.counter++;
_root.mcBoss.state = "OK";
Symbol 321 MovieClip Frame 10
if (this.counter == 2) {
if (_root.attackType != "Attack4") {
_root.verticalBomb("y", 1);
} else {
_root.roundAttack();
}
}
Symbol 321 MovieClip Frame 16
if (this.counter == 1) {
this.gotoAndPlay(2);
}
Symbol 321 MovieClip Frame 17
this.counter = 0;
this.gotoAndStop(1);
this._parent.gotoAndStop(1);
Symbol 334 MovieClip Frame 1
this.counter = 0;
Symbol 334 MovieClip Frame 2
this.play();
this.counter++;
_root.mcBoss.state = "OK";
Symbol 334 MovieClip Frame 10
if (this.counter == 2) {
if (_root.attackType != "Attack4") {
_root.verticalBomb("x", -1);
} else {
_root.roundAttack();
}
}
Symbol 334 MovieClip Frame 19
if (this.counter == 1) {
this.gotoAndPlay(2);
}
Symbol 334 MovieClip Frame 20
this.counter = 0;
this.gotoAndStop(1);
this._parent.gotoAndStop(1);
Symbol 345 MovieClip Frame 1
this.counter = 0;
Symbol 345 MovieClip Frame 2
this.play();
this.counter++;
_root.mcBoss.state = "OK";
Symbol 345 MovieClip Frame 11
if (_root.attackType != "Attack4") {
_root.verticalBomb("x", 1);
} else {
_root.roundAttack();
}
Symbol 345 MovieClip Frame 16
if (this.counter == 1) {
this.gotoAndPlay(2);
}
Symbol 345 MovieClip Frame 17
this.counter = 0;
this.gotoAndStop(1);
this._parent.gotoAndStop(1);
Symbol 356 MovieClip Frame 1
this.counter = 0;
Symbol 356 MovieClip Frame 2
this.play();
this.counter++;
_root.mcBoss.state = "OK";
Symbol 356 MovieClip Frame 14
if (this.counter == 2) {
if (_root.attackType != "Attack4") {
_root.verticalBomb("y", -1);
} else {
_root.roundAttack();
}
}
Symbol 356 MovieClip Frame 16
if (this.counter == 1) {
this.gotoAndPlay(2);
}
Symbol 356 MovieClip Frame 17
this.counter = 0;
this.gotoAndStop(1);
this._parent.gotoAndStop(1);
Symbol 367 MovieClip Frame 1
_root.mcBoss.state = "HIT";
Symbol 367 MovieClip Frame 15
cf = parseInt(main_root.mcBoss.clip._currentframe) - 8;
trace((("a: " + cf) + ": ") + this._parent._currentframe);
this._parent.gotoAndStop(cf);
Symbol 378 MovieClip Frame 1
_root.mcBoss.state = "HIT";
Symbol 378 MovieClip Frame 15
cf = parseInt(main_root.mcBoss.clip._currentframe) - 8;
trace((("b: " + cf) + ": ") + this._parent._currentframe);
this._parent.gotoAndStop(cf);
Symbol 389 MovieClip Frame 1
_root.mcBoss.state = "HIT";
Symbol 389 MovieClip Frame 15
cf = parseInt(main_root.mcBoss.clip._currentframe) - 8;
trace((("c: " + cf) + ": ") + this._parent._currentframe);
this._parent.gotoAndStop(cf);
Symbol 400 MovieClip Frame 1
_root.mcBoss.state = "HIT";
Symbol 400 MovieClip Frame 15
cf = parseInt(main_root.mcBoss.clip._currentframe) - 8;
trace((("d: " + cf) + ": ") + this._parent._currentframe);
this._parent.gotoAndStop(cf);
Symbol 451 MovieClip Frame 1
_root.mcBoss.state = "LOCK";
Symbol 451 MovieClip Frame 145
this.stop();
this._parent.nextFrame();
Symbol 490 MovieClip Frame 1
_root.mcBoss.state = "DIE";
this._parent.energyBar._visible = false;
Symbol 490 MovieClip Frame 39
this.stop();
trace("\uAC8C\uC784\uC624\uBC84");
_root.allClear();
Symbol 512 MovieClip [enemy1] Frame 1
this.stop();
Symbol 546 MovieClip Frame 12
this.stop();
trace("kill" + this._parent);
this._parent.removeMovieClip();
Symbol 558 MovieClip [enemy0] Frame 1
this.stop();
Symbol 560 MovieClip Frame 1
stop();
Symbol 588 MovieClip Frame 1
this.play();
Symbol 588 MovieClip Frame 11
this.gotoAndPlay(1);
Symbol 588 MovieClip Frame 12
this.play();
Symbol 588 MovieClip Frame 25
this.stop();
this._parent.removeMovieClip();
Symbol 608 MovieClip Frame 1
this.play();
Symbol 608 MovieClip Frame 11
this.gotoAndPlay(1);
Symbol 608 MovieClip Frame 12
this.play();
Symbol 608 MovieClip Frame 25
this.stop();
this._parent.removeMovieClip();
Symbol 628 MovieClip Frame 1
this.play();
Symbol 628 MovieClip Frame 11
this.gotoAndPlay(1);
Symbol 628 MovieClip Frame 12
this.play();
Symbol 628 MovieClip Frame 25
this.stop();
this._parent.removeMovieClip();
Symbol 685 MovieClip Frame 1
this.stop();
Symbol 722 MovieClip Frame 1
this.stop();
Symbol 723 MovieClip [item] Frame 1
stop();
Symbol 742 MovieClip Frame 1
this.play();
Symbol 742 MovieClip Frame 9
this.stop();
_root.makeItem(this._parent._parent);
Symbol 743 MovieClip Frame 1
stop();
Symbol 761 MovieClip Frame 1
this.play();
Symbol 761 MovieClip Frame 12
this.stop();
_root.makeItem(this._parent._parent);
Symbol 762 MovieClip Frame 1
this.stop();
Symbol 766 MovieClip Frame 1
this.play();
Symbol 766 MovieClip Frame 12
this.stop();
_root.makeItem(this._parent._parent);
Symbol 767 MovieClip Frame 1
this.stop();
Symbol 768 MovieClip [itemBox] Frame 1
this.stop();
Symbol 797 MovieClip [tile] Frame 1
!!!ERROR
Symbol 807 MovieClip Frame 73
!!!ERROR
Symbol 808 MovieClip Frame 1
!!!ERROR
Symbol 808 MovieClip Frame 9
!!!ERROR
Symbol 808 MovieClip Frame 10
!!!ERROR
Symbol 809 MovieClip [bomb] Frame 1
!!!ERROR
Symbol 810 MovieClip Frame 10
this.stop();
this._parent.removeMovieClip();
Symbol 821 MovieClip Frame 10
this.stop();
this._parent.removeMovieClip();
Symbol 832 MovieClip Frame 8
this.stop();
this._parent.removeMovieClip();
Symbol 843 MovieClip Frame 11
this.stop();
this._parent.removeMovieClip();
Symbol 854 MovieClip Frame 11
this.stop();
this._parent.removeMovieClip();
Symbol 887 MovieClip Frame 20
this.stop();
this._parent.removeMovieClip();
Symbol 920 MovieClip Frame 19
this.stop();
this._parent.removeMovieClip();
Symbol 953 MovieClip Frame 19
this.stop();
this._parent.removeMovieClip();
Symbol 986 MovieClip Frame 19
this.stop();
this._parent.removeMovieClip();
Symbol 987 MovieClip Frame 37
this._parent.removeMovieClip();
this.stop();
Symbol 988 MovieClip [attackEffect] Frame 1
!!!ERROR
Symbol 1013 MovieClip Frame 1
!!!ERROR
Symbol 1024 MovieClip Frame 1
!!!ERROR
Symbol 1028 MovieClip [soundOnOff] Frame 1
if (_root.sound == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
Symbol 1065 MovieClip Frame 1
!!!ERROR
Symbol 1066 MovieClip Frame 1
!!!ERROR
Symbol 1069 MovieClip Frame 1
!!!ERROR
Symbol 1151 MovieClip Frame 1
!!!ERROR
Symbol 1153 MovieClip Frame 1
!!!ERROR
Symbol 1154 MovieClip Frame 1
!!!ERROR
Symbol 1154 MovieClip Frame 2
!!!ERROR
Symbol 1154 MovieClip Frame 18
this.btn_reStart.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
main_root.restartNow = true;
main_root.gotoAndStop("stage" + main_root.clearStage);
};
this.btn_reStart.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_reStart.onRollOut = function () {
this.gotoAndStop(1);
};
this.btn_fullver.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
getURL ("http://poptag.nexon.net/?PARTNERKEY=MK009SVG0071083", "_blank");
};
this.btn_fullver.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_fullver.onRollOut = function () {
this.gotoAndStop(1);
};
Symbol 1154 MovieClip Frame 77
!!!ERROR
Symbol 1189 MovieClip Frame 1
!!!ERROR
Symbol 1211 MovieClip Frame 1
!!!ERROR
Symbol 1224 MovieClip Frame 1
!!!ERROR
Symbol 1246 MovieClip Frame 1
!!!ERROR
Symbol 1254 MovieClip Frame 1
!!!ERROR
Symbol 1255 MovieClip Frame 1
!!!ERROR
Symbol 1255 MovieClip Frame 2
!!!ERROR
Symbol 1255 MovieClip Frame 50
this.stop();
this.btn_reStart.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
main_root.gotoAndStop("Ending");
};
this.btn_reStart.rollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
this.gotoAndStop(2);
};
this.btn_reStart.rollOut = function () {
this.gotoAndStop(2);
};
this.scoreRank.rank.gotoAndStop(main_root.sRank + 1);
this.scoreItem.bonusItemCount0.gotoAndStop(main_root.sItemCount0 + 1);
this.scoreItem.bonusItemCount1.gotoAndStop(main_root.sItemCount1 + 1);
this.scoreItem.bonusItemCount2.gotoAndStop(main_root.sItemCount2 + 1);
var scoreName = Array("Stage1", "Stage2", "Stage3", "Total");
for (sName in scoreName) {
var numSize = main_root["s" + scoreName[sName]].toString(10).length;
var i = 0;
while (i < numSize) {
this.scoreBoard["score" + scoreName[sName]]["s" + ((numSize - 1) - i)].gotoAndStop(parseInt(main_root["s" + scoreName[sName]].toString(10).slice(0 + i, 1 + i)) + 2);
i++;
}
}
Symbol 1263 MovieClip Frame 1
!!!ERROR
Symbol 1273 MovieClip Frame 1
!!!ERROR
Symbol 1296 MovieClip Frame 1
!!!ERROR
Symbol 1305 MovieClip Frame 1
this.stop();
this.bonusBoard.bItem._visible = false;
this.bonusBoard.bNum._visible = false;
Symbol 1305 MovieClip Frame 2
!!!ERROR
Symbol 1305 MovieClip Frame 10
this.stop();
this.btn_nextStage.onRelease = function () {
if (_root.sound == true) {
main_root.startSound(15, 1);
}
if (main_root.clearStage < 3) {
main_root.gotoAndStop("stage" + (main_root.clearStage + 1));
trace(("stage" + (main_root.clearStage + 1)) + "\uB85C \uC774\uB3D9");
} else {
this._parent._parent.AllClear();
}
};
this.btn_nextStage.onRollOver = function () {
if (_root.sound == true) {
main_root.startSound(17, 1);
}
};
main_root["sStage" + main_root.clearStage] = main_root.sTotal;
this.bonusBoard.bItem._visible = true;
this.bonusBoard.bNum._visible = true;
this.bonusBoard.bItem.gotoAndStop(main_root.randBonus);
this.bonusBoard.bNum.gotoAndStop(main_root.bonusItemCount + 1);
var tmpHour = Math.floor(main_root.sClock / 60);
var tmpMin = (main_root.sClock % 60);
var tmpClock;
trace("tmpHour:" + tmpHour);
if (tmpHour < 1) {
this.tmpClock = "00";
} else if (tmpMin < 10) {
this.tmpClock = "0" + tmpHour.toString(10);
} else {
this.tmpClock = tmpHour.toString(10);
}
trace("tmpClock:" + tmpClock);
if (tmpMin < 10) {
this.tmpClock = this.tmpClock + ("0" + tmpMin.toString(10));
} else {
this.tmpClock = this.tmpClock + tmpMin.toString(10);
}
trace("tmpClock:" + this.tmpClock);
main_root.sClock = this.tmpClock;
this.scoreBoard.stageNum.gotoAndStop(main_root.clearStage);
var scoreName = Array("Mons", "Life", "Total", "Clock");
for (sName in scoreName) {
var numSize = main_root["s" + scoreName[sName]].toString(10).length;
var i = 0;
while (i < numSize) {
this.scoreBoard["score" + scoreName[sName]]["s" + ((numSize - 1) - i)].gotoAndStop(parseInt(main_root["s" + scoreName[sName]].toString(10).slice(0 + i, 1 + i)) + 2);
i++;
}
}
Symbol 1313 MovieClip Frame 1
!!!ERROR