Frame 1
function gameInit() {
var _local2 = ++gameLevel;
gameEndTrig = false;
map = new game.Map(this, this.gameM, _local2, col, row, spacing);
charMap = new game.CharMap(this, this.gameM, col, row, spacing);
map.setTile(this["tileArr" + _local2]);
map.setElement(_local2, this["obstacleArr" + _local2]);
map.setElement(_local2, this["blockArr" + _local2]);
map.setElement(_local2, this["movableBlockArr" + _local2]);
map.setElement(_local2, this["hiddenBlockArr" + _local2]);
map.setElement(_local2, this["shelterBlockArr" + _local2]);
visualLife(false);
visualItem(false);
gameLevelDataReset();
gameStart();
}
function gameStart() {
var _local7 = gameLevel;
var _local2 = this["playerInfoObj" + _local7];
player = new game.Player(this, this.gameM, col, row, _local2.intX, _local2.intY, spacing);
var _local4 = this["enermyArr" + _local7];
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local2 = _local4[_local3];
this["enermy" + _local3] = new game.Enermy(this, this.gameM, col, row, _local2.intX, _local2.intY, spacing);
_local3++;
}
var _local5 = this["monsterArr" + _local7];
_local6 = _local5.length;
_local3 = 0;
while (_local3 < _local6) {
_local2 = _local5[_local3];
this["monster" + _local3] = new game.Monster(this, this.gameM, col, row, _local2.intX, _local2.intY, spacing, _local2.name, _local2.pathArr, _local2.loopTrig);
_local3++;
}
gSound.start("BGSound" + _local7);
visualPopup(true, "start");
gameTime(true);
}
function gameEnd(bool) {
if (!gameEndTrig) {
gameEndTrig = true;
var _local5 = gameLevel;
gSound.stop("BGSound" + _local5);
gameTime(false);
var _local6 = this["monsterArr" + _local5];
var _local3 = _local6.length;
var _local2 = 0;
while (_local2 < _local3) {
this["monster" + _local2].gameEnd();
_local2++;
}
if (game.Player.getLifeData() < 0) {
bool = false;
}
if (bool) {
visualPopup(true, "win");
player.setStatus("win");
player.gameEnd();
} else {
visualPopup(true, "lose");
enermy0.setStatus("win");
enermy1.setStatus("win");
}
delayInterval = setInterval(this, "gameReset", delaySec);
}
}
function gameDataReset(clearTrig, level) {
clearTrig = (((clearTrig == undefined) or (clearTrig == null)) ? true : (clearTrig));
level = (((level == undefined) or (level == null)) ? 0 : (level));
game.Player.resetLifeData(clearTrig);
game.Player.resetCanData(clearTrig);
game.Player.resetNiddleData(clearTrig);
game.Player.resetShieldData(clearTrig);
game.Enermy.resetCountData();
gameLevel = level;
gameScore = 0;
gameScoreArr = new Array();
killMonster = 0;
gainCoin = 0;
gameSec = 0;
gameEndTrig = false;
}
function gameLevelDataReset() {
game.Enermy.resetCountData();
killMonster = 0;
gainCoin = 0;
gameSec = 0;
gameEndTrig = false;
}
function gameReset() {
clearInterval(delayInterval);
player.remove();
enermy0.remove();
enermy1.remove();
delete player;
delete enermy0;
delete enermy1;
var _local4 = this.gameLevel;
var _local5 = this["monsterArr" + _local4];
var _local3 = _local5.length;
var _local2 = 0;
while (_local2 < _local3) {
this["monster" + _local2].remove();
delete this["monster" + _local2];
_local2++;
}
map.removeTile();
map.removeAllItem();
this.gotoAndStop("resultL");
}
function visualPopup(bool, type) {
var _local2 = this.visualPopupM;
if (bool) {
_local2.gotoAndStop(type + "L");
} else {
_local2.gotoAndStop("offL");
}
}
function visualLife(bool, num) {
var _local3 = this.visualInterfaceM.visualLifeM;
var _local2;
if (bool) {
_local2 = num;
} else {
_local2 = game.Player.getLifeData();
}
_local3.numberM.gotoAndStop(("s" + _local2) + "L");
}
function visualItem(bool, type, num) {
var _local2 = this.visualInterfaceM.visualItemM;
if (bool) {
_local2[type + "Win"].text = num;
} else {
_local2.canWin.text = game.Player.getCanData();
_local2.niddleWin.text = game.Player.getNiddleData();
_local2.shieldWin.text = game.Player.getShieldData();
}
}
function gameTime(bool) {
if (bool) {
var _local2 = this.createEmptyMovieClip("timeM", 15);
_local2.path = this;
_local2.onEnterFrame = function () {
this.path.gameSec++;
};
} else {
var _local2 = this.timeM;
_local2.onEnterFrame = null;
}
}
function addCoin(num) {
gainCoin = gainCoin + num;
}
function addKillMonster(num) {
killMonster = killMonster + num;
}
Stage.showMenu = false;
Stage.scaleMode = "noScale";
_quality = "low";
var col = 9;
var row = 7;
var spacing = 40;
var gameLevel = 0;
var gameLevelMax = 5;
var gameScore = 0;
var gameScoreArr = new Array();
var gameEndTrig = false;
var killMonster = 0;
var gainCoin = 0;
var gameSec = 0;
var delayInterval;
var delaySec = 5000;
var playerInfoObj1 = {intX:8, intY:6};
var tileArr1 = [[1, 1, 1, 4, 4, 4, 2, 2, 2], [1, 1, 1, 3, 5, 3, 2, 2, 2], [1, 1, 1, 3, 5, 3, 2, 2, 2], [1, 1, 1, 3, 5, 3, 2, 2, 2], [1, 1, 1, 3, 5, 3, 2, 2, 2], [1, 1, 1, 3, 5, 3, 2, 2, 2], [1, 1, 1, 4, 4, 4, 2, 2, 2]];
var obstacleArr1 = [{x:2, y:0, name:"tree", type:"obstacle"}, {x:6, y:0, name:"tree", type:"obstacle"}, {x:2, y:2, name:"tree", type:"obstacle"}, {x:1, y:3, name:"tree", type:"obstacle"}, {x:7, y:3, name:"tree", type:"obstacle"}, {x:6, y:4, name:"tree", type:"obstacle"}, {x:2, y:6, name:"tree", type:"obstacle"}, {x:6, y:6, name:"tree", type:"obstacle"}, {x:7, y:1, name:"houseYellow", type:"obstacle"}, {x:0, y:2, name:"houseRed", type:"obstacle"}, {x:8, y:4, name:"houseRed", type:"obstacle"}, {x:1, y:5, name:"houseBlue", type:"obstacle"}];
var blockArr1 = [{x:7, y:0, name:"blockOrange", type:"block"}, {x:1, y:2, name:"blockOrange", type:"block"}, {x:8, y:2, name:"blockOrange", type:"block"}, {x:0, y:4, name:"blockOrange", type:"block"}, {x:7, y:5, name:"blockOrange", type:"block"}, {x:1, y:6, name:"blockOrange", type:"block"}, {x:8, y:0, name:"blockRed", type:"block"}, {x:1, y:1, name:"blockRed", type:"block"}, {x:7, y:2, name:"blockRed", type:"block"}, {x:1, y:4, name:"blockRed", type:"block"}, {x:7, y:4, name:"blockRed", type:"block"}, {x:0, y:6, name:"blockRed", type:"block"}];
var movableBlockArr1 = [{x:3, y:0, name:"blockGray", type:"movableBlock"}, {x:5, y:1, name:"blockGray", type:"movableBlock"}, {x:8, y:1, name:"blockGray", type:"movableBlock"}, {x:3, y:2, name:"blockGray", type:"movableBlock"}, {x:4, y:2, name:"blockGray", type:"movableBlock"}, {x:5, y:3, name:"blockGray", type:"movableBlock"}, {x:3, y:4, name:"blockGray", type:"movableBlock"}, {x:4, y:5, name:"blockGray", type:"movableBlock"}, {x:0, y:5, name:"blockGray", type:"movableBlock"}, {x:5, y:5, name:"blockGray", type:"movableBlock"}, {x:3, y:6, name:"blockGray", type:"movableBlock"}];
var hiddenBlockArr1 = [{x:2, y:1, name:"herb", type:"hiddenBlock"}, {x:6, y:1, name:"herb", type:"hiddenBlock"}, {x:0, y:3, name:"herb", type:"hiddenBlock"}, {x:2, y:3, name:"herb", type:"hiddenBlock"}, {x:6, y:3, name:"herb", type:"hiddenBlock"}, {x:8, y:3, name:"herb", type:"hiddenBlock"}, {x:2, y:5, name:"herb", type:"hiddenBlock"}, {x:6, y:5, name:"herb", type:"hiddenBlock"}];
var enermyArr1 = [{intX:0, intY:0}];
var playerInfoObj2 = {intX:7, intY:5};
var tileArr2 = [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]];
var obstacleArr2 = [{x:0, y:0, name:"structure1", type:"obstacle"}, {x:2, y:0, name:"structure2", type:"obstacle"}, {x:4, y:0, name:"cactus1", type:"obstacle"}, {x:2, y:4, name:"cactus1", type:"obstacle"}, {x:8, y:4, name:"cactus1", type:"obstacle"}, {x:8, y:0, name:"cactus2", type:"obstacle"}, {x:0, y:2, name:"cactus2", type:"obstacle"}, {x:0, y:6, name:"cactus2", type:"obstacle"}, {x:4, y:6, name:"cactus2", type:"obstacle"}, {x:8, y:6, name:"cactus2", type:"obstacle"}, {x:6, y:0, name:"rock", type:"obstacle"}, {x:2, y:2, name:"rock", type:"obstacle"}, {x:4, y:2, name:"rock", type:"obstacle"}, {x:2, y:6, name:"rock", type:"obstacle"}, {x:6, y:6, name:"rock", type:"obstacle"}, {x:3, y:4, name:"oasis", type:"obstacle"}, {x:3, y:3, name:"blank", type:"obstacle"}, {x:4, y:3, name:"blank", type:"obstacle"}, {x:5, y:3, name:"blank", type:"obstacle"}, {x:6, y:3, name:"blank", type:"obstacle"}, {x:4, y:4, name:"blank", type:"obstacle"}, {x:5, y:4, name:"blank", type:"obstacle"}, {x:6, y:4, name:"blank", type:"obstacle"}];
var blockArr2 = [{x:1, y:0, name:"block", type:"block"}, {x:3, y:0, name:"block", type:"block"}, {x:5, y:0, name:"block", type:"block"}, {x:7, y:0, name:"block", type:"block"}, {x:0, y:1, name:"block", type:"block"}, {x:1, y:1, name:"block", type:"block"}, {x:2, y:1, name:"block", type:"block"}, {x:5, y:1, name:"block", type:"block"}, {x:6, y:1, name:"block", type:"block"}, {x:7, y:1, name:"block", type:"block"}, {x:8, y:1, name:"block", type:"block"}, {x:7, y:2, name:"block", type:"block"}, {x:0, y:3, name:"block", type:"block"}, {x:7, y:3, name:"block", type:"block"}, {x:8, y:3, name:"block", type:"block"}, {x:1, y:4, name:"block", type:"block"}, {x:7, y:4, name:"block", type:"block"}, {x:0, y:5, name:"block", type:"block"}, {x:1, y:5, name:"block", type:"block"}, {x:2, y:5, name:"block", type:"block"}, {x:3, y:5, name:"block", type:"block"}, {x:4, y:5, name:"block", type:"block"}, {x:5, y:5, name:"block", type:"block"}, {x:8, y:5, name:"block", type:"block"}, {x:1, y:6, name:"block", type:"block"}, {x:3, y:6, name:"block", type:"block"}, {x:5, y:6, name:"block", type:"block"}];
var shelterBlockArr2 = [{x:6, y:2, name:"tentOrange", type:"shelterBlock"}, {x:8, y:2, name:"tentBlue", type:"shelterBlock"}, {x:0, y:4, name:"tentRed", type:"shelterBlock"}];
var enermyArr2 = [{intX:4, intY:1}, {intX:1, intY:2}];
var playerInfoObj3 = {intX:4, intY:5};
var tileArr3 = [[1, 2, 1, 2, 1, 2, 1, 2, 1], [2, 1, 2, 1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2, 1, 2, 1], [2, 1, 2, 1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2, 1, 2, 1], [2, 1, 2, 1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2, 1, 2, 1]];
var obstacleArr3 = [{x:3, y:2, name:"well", type:"obstacle"}, {x:1, y:5, name:"well", type:"obstacle"}, {x:5, y:5, name:"well", type:"obstacle"}, {x:3, y:1, name:"blank", type:"obstacle"}, {x:4, y:1, name:"blank", type:"obstacle"}, {x:5, y:1, name:"blank", type:"obstacle"}, {x:4, y:2, name:"blank", type:"obstacle"}, {x:5, y:2, name:"blank", type:"obstacle"}, {x:1, y:4, name:"blank", type:"obstacle"}, {x:2, y:4, name:"blank", type:"obstacle"}, {x:3, y:4, name:"blank", type:"obstacle"}, {x:2, y:5, name:"blank", type:"obstacle"}, {x:3, y:5, name:"blank", type:"obstacle"}, {x:5, y:4, name:"blank", type:"obstacle"}, {x:6, y:4, name:"blank", type:"obstacle"}, {x:7, y:4, name:"blank", type:"obstacle"}, {x:6, y:5, name:"blank", type:"obstacle"}, {x:7, y:5, name:"blank", type:"obstacle"}];
var blockArr3 = [{x:0, y:0, name:"blockGreen", type:"block"}, {x:8, y:0, name:"blockGreen", type:"block"}, {x:1, y:1, name:"blockGreen", type:"block"}, {x:7, y:1, name:"blockGreen", type:"block"}, {x:0, y:2, name:"blockGreen", type:"block"}, {x:2, y:2, name:"blockGreen", type:"block"}, {x:6, y:2, name:"blockGreen", type:"block"}, {x:8, y:2, name:"blockGreen", type:"block"}, {x:1, y:3, name:"blockGreen", type:"block"}, {x:7, y:3, name:"blockGreen", type:"block"}, {x:0, y:4, name:"blockGreen", type:"block"}, {x:8, y:4, name:"blockGreen", type:"block"}, {x:0, y:6, name:"blockGreen", type:"block"}, {x:2, y:6, name:"blockGreen", type:"block"}, {x:6, y:6, name:"blockGreen", type:"block"}, {x:8, y:6, name:"blockGreen", type:"block"}, {x:0, y:1, name:"blockPlant", type:"block"}, {x:8, y:1, name:"blockPlant", type:"block"}, {x:1, y:2, name:"blockPlant", type:"block"}, {x:7, y:2, name:"blockPlant", type:"block"}, {x:0, y:3, name:"blockPlant", type:"block"}, {x:2, y:3, name:"blockPlant", type:"block"}, {x:6, y:3, name:"blockPlant", type:"block"}, {x:8, y:3, name:"blockPlant", type:"block"}, {x:0, y:5, name:"blockPlant", type:"block"}, {x:8, y:5, name:"blockPlant", type:"block"}, {x:1, y:6, name:"blockPlant", type:"block"}, {x:7, y:6, name:"blockPlant", type:"block"}, {x:4, y:3, name:"blockFlower", type:"block"}];
var movableBlockArr3 = [{x:3, y:3, name:"blockBrown", type:"movableBlock"}, {x:5, y:3, name:"blockBrown", type:"movableBlock"}, {x:4, y:4, name:"blockBrown", type:"movableBlock"}];
var enermyArr3 = [{intX:4, intY:0}];
var monsterArr3 = [{intX:2, intY:0, name:"monster2", pathArr:[{x:2, y:0}, {x:6, y:0}, {x:6, y:3}, {x:8, y:3}, {x:8, y:6}, {x:0, y:6}, {x:0, y:3}, {x:2, y:3}], loopTrig:true}];
var playerInfoObj4 = {intX:4, intY:6};
var tileArr4 = [[1, 2, 1, 2, 1, 2, 1, 2, 1], [2, 1, 2, 1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2, 1, 2, 1], [2, 1, 2, 1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2, 1, 2, 1], [2, 1, 2, 1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2, 1, 2, 1]];
var obstacleArr4 = [{x:0, y:1, name:"rock1", type:"obstacle"}, {x:8, y:1, name:"rock1", type:"obstacle"}, {x:2, y:1, name:"rock2", type:"obstacle"}, {x:5, y:1, name:"rock2", type:"obstacle"}, {x:0, y:5, name:"fence1", type:"obstacle"}, {x:6, y:5, name:"fence1", type:"obstacle"}, {x:2, y:5, name:"fence2", type:"obstacle"}, {x:8, y:5, name:"fence2", type:"obstacle"}, {x:3, y:5, name:"pillar", type:"obstacle"}, {x:5, y:5, name:"pillar", type:"obstacle"}, {x:3, y:1, name:"blank", type:"obstacle"}, {x:6, y:1, name:"blank", type:"obstacle"}];
var blockArr4 = [{x:0, y:0, name:"blockBrown1", type:"block"}, {x:8, y:0, name:"blockBrown1", type:"block"}, {x:1, y:1, name:"blockBrown1", type:"block"}, {x:7, y:1, name:"blockBrown1", type:"block"}, {x:0, y:2, name:"blockBrown1", type:"block"}, {x:2, y:2, name:"blockBrown1", type:"block"}, {x:6, y:2, name:"blockBrown1", type:"block"}, {x:8, y:2, name:"blockBrown1", type:"block"}, {x:0, y:4, name:"blockBrown1", type:"block"}, {x:2, y:4, name:"blockBrown1", type:"block"}, {x:6, y:4, name:"blockBrown1", type:"block"}, {x:8, y:4, name:"blockBrown1", type:"block"}, {x:1, y:5, name:"blockBrown1", type:"block"}, {x:7, y:5, name:"blockBrown1", type:"block"}, {x:0, y:6, name:"blockBrown1", type:"block"}, {x:2, y:6, name:"blockBrown1", type:"block"}, {x:6, y:6, name:"blockBrown1", type:"block"}, {x:8, y:6, name:"blockBrown1", type:"block"}, {x:1, y:2, name:"blockBrown2", type:"block"}, {x:3, y:2, name:"blockBrown2", type:"block"}, {x:5, y:2, name:"blockBrown2", type:"block"}, {x:7, y:2, name:"blockBrown2", type:"block"}, {x:1, y:4, name:"blockBrown2", type:"block"}, {x:7, y:4, name:"blockBrown2", type:"block"}, {x:1, y:6, name:"blockBrown2", type:"block"}, {x:7, y:6, name:"blockBrown2", type:"block"}];
var movableBlockArr4 = [{x:4, y:1, name:"blockBrown", type:"movableBlock"}, {x:4, y:5, name:"blockBrown", type:"movableBlock"}];
var enermyArr4 = [{intX:1, intY:0}, {intX:7, intY:0}];
var monsterArr4 = [{intX:4, intY:3, name:"monster1", pathArr:[{x:4, y:3}, {x:0, y:3}, {x:4, y:3}, {x:4, y:0}, {x:4, y:3}, {x:8, y:3}, {x:4, y:3}, {x:4, y:6}], loopTrig:true}];
var playerInfoObj5 = {intX:4, intY:6};
var tileArr5 = [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 2, 1, 3, 1, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]];
var obstacleArr5 = [{x:0, y:0, name:"blockLine", type:"obstacle"}, {x:2, y:0, name:"blockLine", type:"obstacle"}, {x:4, y:0, name:"blockLine", type:"obstacle"}, {x:6, y:0, name:"blockLine", type:"obstacle"}, {x:8, y:0, name:"blockLine", type:"obstacle"}, {x:2, y:4, name:"blockLine", type:"obstacle"}, {x:6, y:4, name:"blockLine", type:"obstacle"}, {x:2, y:6, name:"blockLine", type:"obstacle"}, {x:6, y:6, name:"blockLine", type:"obstacle"}, {x:1, y:2, name:"block", type:"obstacle"}, {x:3, y:2, name:"block", type:"obstacle"}, {x:5, y:2, name:"block", type:"obstacle"}, {x:7, y:2, name:"block", type:"obstacle"}, {x:4, y:3, name:"block", type:"obstacle"}, {x:4, y:5, name:"block", type:"obstacle"}, {x:0, y:4, name:"glass", type:"obstacle"}, {x:8, y:4, name:"glass", type:"obstacle"}];
var blockArr5 = [{x:3, y:0, name:"blockBlue", type:"block"}, {x:5, y:0, name:"blockBlue", type:"block"}, {x:0, y:1, name:"blockBlue", type:"block"}, {x:4, y:1, name:"blockBlue", type:"block"}, {x:8, y:1, name:"blockBlue", type:"block"}, {x:2, y:3, name:"blockBlue", type:"block"}, {x:6, y:3, name:"blockBlue", type:"block"}, {x:0, y:3, name:"blockBlue", type:"block"}, {x:8, y:3, name:"blockBlue", type:"block"}, {x:1, y:4, name:"blockBlue", type:"block"}, {x:3, y:4, name:"blockBlue", type:"block"}, {x:5, y:4, name:"blockBlue", type:"block"}, {x:7, y:4, name:"blockBlue", type:"block"}, {x:0, y:5, name:"blockBlue", type:"block"}, {x:2, y:5, name:"blockBlue", type:"block"}, {x:6, y:5, name:"blockBlue", type:"block"}, {x:8, y:5, name:"blockBlue", type:"block"}, {x:1, y:6, name:"blockBlue", type:"block"}, {x:7, y:6, name:"blockBlue", type:"block"}, {x:1, y:1, name:"blockSky", type:"block"}, {x:7, y:1, name:"blockSky", type:"block"}, {x:0, y:2, name:"blockSky", type:"block"}, {x:8, y:2, name:"blockSky", type:"block"}, {x:1, y:3, name:"blockSky", type:"block"}, {x:3, y:3, name:"blockSky", type:"block"}, {x:5, y:3, name:"blockSky", type:"block"}, {x:7, y:3, name:"blockSky", type:"block"}, {x:4, y:4, name:"blockSky", type:"block"}, {x:1, y:5, name:"blockSky", type:"block"}, {x:7, y:5, name:"blockSky", type:"block"}, {x:1, y:0, name:"safety", type:"block"}, {x:7, y:0, name:"safety", type:"block"}, {x:4, y:2, name:"safety", type:"block"}, {x:0, y:6, name:"safety", type:"block"}, {x:8, y:6, name:"safety", type:"block"}];
var enermyArr5 = [{intX:2, intY:2}, {intX:6, intY:2}];
var monsterArr5 = [{intX:4, intY:2, name:"monster1", pathArr:[{x:4, y:2}, {x:4, y:1}, {x:2, y:1}, {x:2, y:3}, {x:3, y:3}, {x:3, y:4}, {x:5, y:4}, {x:5, y:3}, {x:6, y:3}, {x:6, y:1}, {x:4, y:1}], loopTrig:true}, {intX:1, intY:0, name:"monster3", pathArr:[{x:1, y:0}, {x:1, y:1}, {x:0, y:1}, {x:0, y:3}]}, {intX:7, intY:0, name:"monster3", pathArr:[{x:7, y:0}, {x:7, y:1}, {x:8, y:1}, {x:8, y:3}]}, {intX:0, intY:6, name:"monster3", pathArr:[{x:0, y:6}, {x:1, y:6}, {x:1, y:3}]}, {intX:8, intY:6, name:"monster3", pathArr:[{x:8, y:6}, {x:7, y:6}, {x:7, y:3}]}];
var soundArr = [{name:"introSound", volume:100, loopTrig:true}, {name:"BGSound1", volume:100, loopTrig:true}, {name:"BGSound2", volume:100, loopTrig:true}, {name:"BGSound3", volume:100, loopTrig:true}, {name:"BGSound4", volume:100, loopTrig:true}, {name:"BGSound5", volume:100, loopTrig:true}, {name:"startSound", volume:100}, {name:"winSound", volume:100}, {name:"loseSound", volume:100}, {name:"winBGSound", volume:100, loopTrig:true}, {name:"loseBGSound", volume:100}, {name:"rankBGSound", volume:100, loopTrig:true}, {name:"rebirthSound", volume:100}, {name:"itemGetSound", volume:100}, {name:"canSound", volume:100}, {name:"shieldSetSound", nextName:"shieldFlashSound", volume:100}, {name:"shieldFlashSound", volume:100}, {name:"bombSetSound", volume:100}, {name:"bombExplosionSound", volume:100}, {name:"bubbleLockSound", volume:100}, {name:"bubbleEscSound", volume:100}, {name:"bubbleDieSound", volume:100}, {name:"batCreateSound", volume:100}, {name:"batDieSound", volume:100}, {name:"mummyCreateSound", volume:100}, {name:"mummyDieSound", volume:100}];
var gSound = (new util.GameSound(this, soundArr, 60, 10));
stop();
Frame 2
Frame 40
this.gameInit();
Symbol 38 MovieClip Frame 1
var playTrig = false;
this.gotoAndStop("offL");
Symbol 38 MovieClip Frame 29
stop();
Symbol 39 MovieClip Frame 20
stop();
this.target = 0;
this.progress = 0;
this.speed = 0.08;
this.step = 8;
this.stepNum = 0;
this.onEnterFrame = function () {
this.target = (this._parent.getBytesLoaded() / this._parent.getBytesTotal()) * 100;
this.progress = this.progress + ((this.target - this.progress) * this.speed);
this.stepNum = Math.floor(this.progress / this.step);
if (!this["boxM" + this.stepNum].playTrig) {
this["boxM" + this.stepNum].playTrig = true;
this["boxM" + this.stepNum].gotoAndPlay("onL");
}
if ((this.progress >= 99) and (this.target == 100)) {
this.gotoAndPlay("closeL");
this.onEnterFrame = null;
}
};
Symbol 39 MovieClip Frame 35
this._parent.gotoAndStop("introL");
Symbol 1516 MovieClip [__Packages.game.Map] Frame 0
class game.Map
{
var rootMc, targetMc, level, col, row, spacing;
function Map (rootMc, targetMc, level, col, row, spacing) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.level = level;
this.col = col;
this.row = row;
this.spacing = spacing;
resetData(col, row);
}
function setTestTile() {
var _local5 = 1000000 /* 0x0F4240 */;
var _local4 = 0;
while (_local4 < row) {
var _local3 = 0;
while (_local3 < col) {
_local5++;
var _local2 = targetMc.attachMovie("tileM_test", (("tileM_test_" + _local3) + "_") + _local4, _local5);
_local2._x = _local3 * spacing;
_local2._y = _local4 * spacing;
_local2.BGM._visible = false;
_local2._visible = false;
_local2.path = this;
_local2.x = _local3;
_local2.y = _local4;
_local3++;
}
_local4++;
}
}
function setTile(tileArr) {
var _local5 = 1;
var _local4 = 0;
while (_local4 < row) {
var _local2 = 0;
while (_local2 < col) {
_local5++;
var _local3 = targetMc.mapM.attachMovie("tileM", (("tileM_" + _local2) + "_") + _local4, _local5);
_local3._x = _local2 * spacing;
_local3._y = _local4 * spacing;
_local3.level = level;
_local3.typeNum = tileArr[_local4][_local2];
_local2++;
}
_local4++;
}
}
function removeTile() {
var _local4 = 0;
while (_local4 < row) {
var _local2 = 0;
while (_local2 < col) {
var _local3 = targetMc.mapM[(("tileM_" + _local2) + "_") + _local4];
_local3.removeMovieClip();
_local2++;
}
_local4++;
}
}
function setElement(level, infoArr) {
var _local8 = infoArr.length;
var _local6;
var _local5;
var _local4;
var _local7;
var _local2 = new Object();
var _local3 = 0;
while (_local3 < _local8) {
_local2 = infoArr[_local3];
_local6 = _local2.x;
_local5 = _local2.y;
_local4 = _local2.name;
_local7 = _local2.type;
setItem(_local6, _local5, _local7, level, _local4, null);
_local3++;
}
}
function setItem(x, y, type, level, name, paramObj) {
if (type == "obstacle") {
var _local5 = new game.items.Obstacle(rootMc, targetMc, spacing, level, name);
} else if (type == "block") {
var _local5 = new game.items.Block(rootMc, targetMc, spacing, level, name);
} else if (type == "movableBlock") {
var _local5 = new game.items.MovableBlock(rootMc, targetMc, spacing, level, name);
} else if (type == "hiddenBlock") {
var _local5 = new game.items.HiddenBlock(rootMc, targetMc, spacing, level, name);
} else if (type == "shelterBlock") {
var _local5 = new game.items.ShelterBlock(rootMc, targetMc, spacing, level, name);
} else if (type == "bomb") {
var _local5 = new game.items.Bomb(rootMc, targetMc, spacing, bombDelaySec, paramObj);
} else if (type == "fire") {
var _local5 = new game.items.Fire(rootMc, targetMc, spacing, paramObj);
} else if (type == "item") {
var _local5 = new game.items.Item(rootMc, targetMc, spacing, name, paramObj);
}
var _local9 = _local5.depthMargin;
var _local7 = getSwap(x, y, _local9);
_local5.setPosition(x, y, _local7);
setData(x, y, _local5);
}
function removeItem(x, y) {
var _local2 = getData(x, y);
if ((_local2.type == "block") or (_local2.type == "movableBlock")) {
_local2.remove(false);
} else {
_local2.remove();
}
setData(x, y, null);
}
function removeAllItem() {
var _local3 = new Object();
var _local4 = 0;
while (_local4 < row) {
var _local2 = 0;
while (_local2 < col) {
_local3 = getData(_local2, _local4);
if ((_local3.type == "block") or (_local3.type == "movableBlock")) {
_local3.remove(false);
} else {
_local3.remove();
}
setData(_local2, _local4, null);
_local2++;
}
_local4++;
}
}
function getSwap(x, y, depthMargin) {
depthMargin = (((depthMargin == undefined) or (depthMargin == null)) ? 0 : (depthMargin));
var _local2 = (((y + 1) * 1000) + ((col - x) * 10)) + depthMargin;
return(_local2);
}
function resetData(col, row) {
var _local3 = 0;
while (_local3 < row) {
dataArr[_local3] = new Array();
var _local2 = 0;
while (_local2 < col) {
dataArr[_local3][_local2] = null;
_local2++;
}
_local3++;
}
}
function setData(x, y, obj) {
if ((obj == undefined) or (obj == null)) {
dataArr[y][x] = null;
} else {
dataArr[y][x] = obj;
}
}
function getData(x, y) {
if ((((x < 0) or (x >= col)) or (y < 0)) or (y >= row)) {
return(false);
}
var _local2 = new Object();
_local2 = dataArr[y][x];
if (_local2 == null) {
_local2 = new Object();
_local2.x = x;
_local2.y = y;
_local2.movable = true;
_local2.type = "ground";
}
return(_local2);
}
function explosion(x, y, power, dirType, playerObj) {
var _local13 = power;
var _local4 = new Array();
var _local3 = new Array();
var _local8 = new Object();
dirType = (((dirType == null) or (dirType == undefined)) ? "ALL" : (dirType));
if ((dirType == "ALL") or (dirType == "NS")) {
var _local6 = y - 1;
while (_local6 > ((y - 1) - _local13)) {
_local8 = getData(x, _local6);
if ((((_local8.type == "ground") or (_local8.type == "item")) or (_local8.type == "fire")) or (_local8.type == "shelterBlock")) {
_local4.push(_local8);
if (_local6 <= (((y - 1) - _local13) + 1)) {
_local3.push("edge");
} else {
_local3.push("line");
}
} else {
if ((((_local8.type == "block") or (_local8.type == "movableBlock")) or (_local8.type == "hiddenBlock")) or (_local8.type == "bomb")) {
_local4.push(_local8);
_local3.push("edge");
break;
}
if (_local8.type == "obstacle") {
break;
}
}
_local6--;
}
_local6 = y + 1;
while (_local6 < ((y + 1) + _local13)) {
_local8 = getData(x, _local6);
if ((((_local8.type == "ground") or (_local8.type == "item")) or (_local8.type == "fire")) or (_local8.type == "shelterBlock")) {
_local4.push(_local8);
if (_local6 >= (((y + 1) + _local13) - 1)) {
_local3.push("edge");
} else {
_local3.push("line");
}
} else {
if ((((_local8.type == "block") or (_local8.type == "movableBlock")) or (_local8.type == "hiddenBlock")) or (_local8.type == "bomb")) {
_local4.push(_local8);
_local3.push("edge");
break;
}
if (_local8.type == "obstacle") {
break;
}
}
_local6++;
}
}
if ((dirType == "ALL") or (dirType == "WE")) {
var _local7 = x - 1;
while (_local7 > ((x - 1) - _local13)) {
_local8 = getData(_local7, y);
if (((_local8.type == "ground") or (_local8.type == "item")) or (_local8.type == "fire")) {
_local4.push(_local8);
if (_local7 <= (((x - 1) - _local13) + 1)) {
_local3.push("edge");
} else {
_local3.push("line");
}
} else {
if ((((_local8.type == "block") or (_local8.type == "movableBlock")) or (_local8.type == "hiddenBlock")) or (_local8.type == "bomb")) {
_local4.push(_local8);
_local3.push("edge");
break;
}
if ((_local8.type == "obstacle") or (_local8.type == "shelterBlock")) {
break;
}
}
_local7--;
}
_local7 = x + 1;
while (_local7 < ((x + 1) + _local13)) {
_local8 = getData(_local7, y);
if (((_local8.type == "ground") or (_local8.type == "item")) or (_local8.type == "fire")) {
_local4.push(_local8);
if (_local7 >= (((x + 1) + _local13) - 1)) {
_local3.push("edge");
} else {
_local3.push("line");
}
} else {
if ((((_local8.type == "block") or (_local8.type == "movableBlock")) or (_local8.type == "hiddenBlock")) or (_local8.type == "bomb")) {
_local4.push(_local8);
_local3.push("edge");
break;
}
if ((_local8.type == "obstacle") or (_local8.type == "shelterBlock")) {
break;
}
}
_local7++;
}
}
_local13 = _local4.length;
var _local2 = new Object();
var _local9;
var _local5 = 0;
while (_local5 < _local13) {
_local2 = _local4[_local5];
_local9 = _local3[_local5];
if (_local2 != undefined) {
if ((_local2.type == "block") or (_local2.type == "movableBlock")) {
_local2.broke();
} else if (((_local2.type == "hiddenBlock") or (_local2.type == "item")) or (_local2.type == "fire")) {
_local2.remove();
_local8 = {x:x, y:y, playerObj:playerObj, aniType:_local9};
setItem(_local2.x, _local2.y, "fire", null, null, _local8);
} else if (_local2.type == "shelterBlock") {
_local2.explosionCheckStart();
} else if (_local2.type == "bomb") {
_local2.explosion();
_local2.remove();
_local8 = {x:x, y:y, playerObj:playerObj, aniType:"line"};
setItem(_local2.x, _local2.y, "fire", null, null, _local8);
} else if (_local2.type == "ground") {
_local8 = {x:x, y:y, playerObj:playerObj, aniType:_local9};
setItem(_local2.x, _local2.y, "fire", null, null, _local8);
}
}
_local5++;
}
}
function setBomb(x, y, playerObj) {
var _local2 = getData(x, y);
if (_local2.type == "ground") {
if (playerObj.type == "player") {
rootMc.gSound.start("bombSetSound");
}
setItem(x, y, "bomb", null, null, playerObj);
} else if (_local2.type == "hiddenBlock") {
_local2.changeBomb(bombDelaySec, playerObj);
} else if (_local2.type == "shelterBlock") {
_local2.changeBomb(bombDelaySec, playerObj);
}
}
function moveAfter(x, y) {
var _local2 = rootMc.charMap.getData(x, y, "monster");
if ((_local2 != null) and (_local2 != undefined)) {
_local2.birth();
}
}
function removeAfter(x, y) {
var _local2 = rootMc.charMap.getData(x, y, "monster");
if ((_local2 != null) and (_local2 != undefined)) {
_local2.birth();
} else {
dropRandomItem(x, y);
}
}
function dropCoinItem(x, y, type) {
var _local2;
if (random(2) == 0) {
if (type == "monster1") {
_local2 = "coinBronze";
} else if (type == "monster2") {
_local2 = "coinSilver";
} else if (type == "monster3") {
_local2 = "coinGold";
}
setItem(x, y, "item", null, _local2, {xs:x, ys:y});
}
}
function dropItems(xs, ys, dataArr) {
var _local8 = dataArr.length - 1;
var _local5;
var _local3;
var _local2;
_local8 = ((_local8 >= 8) ? 8 : (_local8));
var _local4 = 0;
while (_local4 <= _local8) {
do {
_local3 = random(col);
_local2 = random(row);
} while (getData(_local3, _local2).type != "ground");
_local5 = dataArr[_local4];
setItem(_local3, _local2, "item", null, _local5, {xs:xs, ys:ys});
_local4++;
}
}
function dropRandomItem(x, y) {
var _local3 = random(8) + 1;
var _local2;
if (_local3 == 1) {
_local2 = "bomb";
} else if (_local3 == 2) {
if (random(2) == 0) {
_local2 = "power";
}
} else if (_local3 == 3) {
if (random(2) == 0) {
_local2 = "speed";
}
} else if (_local3 == 4) {
if (random(2) == 0) {
_local2 = "slowTurtle";
}
} else if (_local3 == 5) {
if (random(4) == 0) {
_local2 = "fastTurtle";
}
} else if (_local3 == 6) {
if (random(2) == 0) {
_local2 = "coinGold";
}
} else if (_local3 == 7) {
if (random(2) == 0) {
_local2 = "coinSilver";
}
} else if (_local3 == 8) {
if (random(2) == 0) {
_local2 = "coinBronze";
}
}
if (_local2 != undefined) {
setItem(x, y, "item", null, _local2, {xs:x, ys:y});
}
}
function existNearBlock(x, y) {
var _local2 = getTimer();
var _local5 = getData(x, y - 1);
var _local3 = getData(x, y + 1);
var _local7 = getData(x - 1, y);
var _local4 = getData(x + 1, y);
if ((((((((_local5.type == "block") or (_local5.type == "movableBlock")) or (_local3.type == "block")) or (_local3.type == "movableBlock")) or (_local7.type == "block")) or (_local7.type == "movableBlock")) or (_local4.type == "block")) or (_local4.type == "movableBlock")) {
return(true);
}
return(false);
}
function existNearBlank(x, y) {
var _local3 = getTimer();
var _local6 = getData(x, y - 1);
var _local4 = getData(x, y + 1);
var _local8 = getData(x - 1, y);
var _local5 = getData(x + 1, y);
var _local2 = 0;
if ((_local6.type == "ground") or (_local6.type == "hiddenBlock")) {
_local2++;
}
if ((_local4.type == "ground") or (_local4.type == "hiddenBlock")) {
_local2++;
}
if ((_local8.type == "ground") or (_local8.type == "hiddenBlock")) {
_local2++;
}
if ((_local5.type == "ground") or (_local5.type == "hiddenBlock")) {
_local2++;
}
_local3 = getTimer() - _local3;
return(_local2);
}
function existNearItem(x, y) {
var _local2 = getTimer();
var _local7 = getData(x, y - 1);
var _local5 = getData(x, y + 1);
var _local8 = getData(x - 1, y);
var _local6 = getData(x + 1, y);
if ((((_local7.type == "item") or (_local5.type == "item")) or (_local8.type == "item")) or (_local6.type == "item")) {
return(true);
}
return(false);
}
function existOtherBomb(x, y) {
return(bombAreaArr[y][x]);
}
function searchBomb() {
var _local4 = new Array();
var _local2 = new Object();
var _local5 = 0;
while (_local5 < row) {
var _local3 = 0;
while (_local3 < col) {
_local2 = getData(_local3, _local5);
if (_local2.type == "bomb") {
_local4.push(_local2);
} else if ((_local2.type == "hiddenBlock") and _local2.bombOnTrig) {
_local4.push(_local2);
} else if ((_local2.type == "shelterBlock") and _local2.bombOnTrig) {
_local4.push(_local2);
}
_local3++;
}
_local5++;
}
return(_local4);
}
function updateBombArea() {
var _local16 = getTimer();
var _local15 = searchBomb();
var _local14 = _local15.length;
var _local11 = new Object();
var _local2 = new Object();
var _local12;
var _local6;
var _local5;
var _local10;
var _local9;
var _local4;
var _local3;
bombAreaArr = new Array();
var _local7 = 0;
while (_local7 < row) {
bombAreaArr[_local7] = new Array();
var _local8 = 0;
while (_local8 < col) {
bombAreaArr[_local7][_local8] = false;
_local8++;
}
_local7++;
}
if (_local14 > 0) {
var _local13 = 0;
while (_local13 < _local14) {
_local11 = _local15[_local13];
_local6 = _local11.x;
_local5 = _local11.y;
_local12 = _local11.power;
_local9 = _local5 - 1;
_local3 = _local5 - _local12;
_local3 = ((_local3 <= 0) ? 0 : (_local3));
if (_local9 >= _local3) {
_local7 = _local9;
while (_local7 >= _local3) {
_local2 = getData(_local6, _local7);
if (((_local2.type == "block") or (_local2.type == "movableBlock")) or (_local2.type == "obstacle")) {
break;
}
bombAreaArr[_local7][_local6] = true;
if (_local2.type == "hiddenBlock") {
break;
}
_local7--;
}
}
_local9 = _local5 + 1;
_local3 = _local5 + _local12;
_local3 = ((_local3 >= (row - 1)) ? (row - 1) : (_local3));
if (_local9 <= _local3) {
_local7 = _local9;
while (_local7 <= _local3) {
_local2 = getData(_local6, _local7);
if (((_local2.type == "block") or (_local2.type == "movableBlock")) or (_local2.type == "obstacle")) {
break;
}
bombAreaArr[_local7][_local6] = true;
if (_local2.type == "hiddenBlock") {
break;
}
_local7++;
}
}
if (_local11.type != "shelterBlock") {
_local10 = _local6 - 1;
_local4 = _local6 - _local12;
_local4 = ((_local4 <= 0) ? 0 : (_local4));
if (_local10 >= _local4) {
var _local8 = _local10;
while (_local8 >= _local4) {
_local2 = getData(_local8, _local5);
if (((_local2.type == "block") or (_local2.type == "movableBlock")) or (_local2.type == "obstacle")) {
break;
}
bombAreaArr[_local5][_local8] = true;
if (_local2.type == "hiddenBlock") {
break;
}
_local8--;
}
}
}
if (_local11.type != "shelterBlock") {
_local10 = _local6 + 1;
_local4 = _local6 + _local12;
_local4 = ((_local4 >= (col - 1)) ? (col - 1) : (_local4));
if (_local10 <= _local4) {
var _local8 = _local10;
while (_local8 <= _local4) {
_local2 = getData(_local8, _local5);
if (((_local2.type == "block") or (_local2.type == "movableBlock")) or (_local2.type == "obstacle")) {
break;
}
bombAreaArr[_local5][_local8] = true;
if (_local2.type == "hiddenBlock") {
break;
}
_local8++;
}
}
}
_local13++;
}
}
_local16 = getTimer() - _local16;
}
function checkSetBombAble(x, y) {
var _local5 = getTimer();
var _local8 = getData(x, y - 1);
var _local6 = getData(x, y + 1);
var _local9 = getData(x - 1, y);
var _local7 = getData(x + 1, y);
var _local2;
if ((_local8.type == "ground") or (_local8.type == "hiddenBlock")) {
_local2 = existNearBlank(x, y - 1);
if (_local2 >= 2) {
return(true);
}
}
if ((_local6.type == "ground") or (_local6.type == "hiddenBlock")) {
_local2 = existNearBlank(x, y + 1);
if (_local2 >= 2) {
return(true);
}
}
if ((_local9.type == "ground") or (_local9.type == "hiddenBlock")) {
_local2 = existNearBlank(x - 1, y);
if (_local2 >= 2) {
return(true);
}
}
if ((_local7.type == "ground") or (_local7.type == "hiddenBlock")) {
_local2 = existNearBlank(x + 1, y);
if (_local2 >= 2) {
return(true);
}
}
return(false);
}
function toString() {
trace("dataArr-----------------------------START");
trace("0\t1\t2\t3\t4\t5\t6\t7\t8");
var _local2 = 0;
while (_local2 < row) {
trace((_local2 + " -> ") + dataArr[_local2]);
_local2++;
}
trace("dataArr-----------------------------END");
}
var bombDelaySec = 2800;
var dataArr = new Array();
var bombAreaArr = new Array();
}
Symbol 1517 MovieClip [__Packages.game.items.Obstacle] Frame 0
class game.items.Obstacle
{
var rootMc, targetMc, spacing, typeNum, typeName, x, y, itemMc;
function Obstacle (rootMc, targetMc, spacing, typeNum, typeName) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.spacing = spacing;
this.typeNum = typeNum;
this.typeName = typeName;
}
function setPosition(x, y, depth) {
this.x = x;
this.y = y;
itemMc = targetMc.attachMovie(linkageName, (((linkageName + "_") + x) + "_") + y, depth);
itemMc._x = x * spacing;
itemMc._y = y * spacing;
setMcInit();
}
function setMcInit() {
itemMc.path = this;
itemMc.typeNum = typeNum;
itemMc.typeName = typeName;
}
function remove() {
itemMc.removeMovieClip();
}
var movable = false;
var type = "obstacle";
var linkageName = "obstacleM";
var depthMargin = 0;
}
Symbol 1518 MovieClip [__Packages.game.items.Block] Frame 0
class game.items.Block
{
var rootMc, targetMc, spacing, typeNum, typeName, x, y, itemMc;
function Block (rootMc, targetMc, spacing, typeNum, typeName) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.spacing = spacing;
this.typeNum = typeNum;
this.typeName = typeName;
}
function setPosition(x, y, depth) {
this.x = x;
this.y = y;
itemMc = targetMc.attachMovie(linkageName, (((linkageName + "_") + x) + "_") + y, depth);
itemMc._x = x * spacing;
itemMc._y = y * spacing;
setMcInit();
}
function setMcInit() {
itemMc.path = this;
itemMc.typeNum = typeNum;
itemMc.typeName = typeName;
itemMc.onAniFinished = function () {
this.path.remove();
};
}
function broke() {
itemMc.subM.subAniM.gotoAndPlay("brokeL");
}
function remove(itemTrig) {
itemTrig = (((itemTrig == undefined) or (itemTrig == null)) ? true : (itemTrig));
itemMc.removeMovieClip();
rootMc.map.setData(x, y, null);
if (itemTrig) {
rootMc.map.removeAfter(x, y);
}
}
var movable = false;
var type = "block";
var linkageName = "blockM";
var depthMargin = 0;
}
Symbol 1519 MovieClip [__Packages.game.items.MovableBlock] Frame 0
class game.items.MovableBlock
{
var rootMc, targetMc, spacing, typeNum, typeName, x, y, itemMc, xs, ys, depth;
function MovableBlock (rootMc, targetMc, spacing, typeNum, typeName) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.spacing = spacing;
this.typeNum = typeNum;
this.typeName = typeName;
}
function setPosition(x, y, depth) {
this.x = x;
this.y = y;
itemMc = targetMc.attachMovie(linkageName, (((linkageName + "_") + x) + "_") + y, depth);
itemMc._x = x * spacing;
itemMc._y = y * spacing;
setMcInit();
}
function setMcInit() {
itemMc.path = this;
itemMc.typeNum = typeNum;
itemMc.typeName = typeName;
itemMc.onAniFinished = function () {
this.path.remove();
};
}
function move(x, y) {
if (!moveOnTrig) {
var owner = this;
var _local7 = rootMc.map.getData(x, y);
var _local8 = rootMc.charMap.getData(x, y, "player");
var _local6 = rootMc.charMap.getData(x, y, "enermy1");
var _local5 = rootMc.charMap.getData(x, y, "enermy2");
var _local9 = rootMc.charMap.getData(x, y, "monster");
if (((((_local7.type == "ground") and (_local8 == null)) and (_local6 == null)) and (_local5 == null)) and (_local9 == null)) {
moveOnTrig = true;
var _local4 = new mx.transitions.Tween(itemMc, "_x", mx.transitions.easing.Regular.easeOut, this.x * spacing, x * spacing, 10);
_local4 = new mx.transitions.Tween(itemMc, "_y", mx.transitions.easing.Regular.easeOut, this.y * spacing, y * spacing, 10);
_local4.onMotionChanged = function () {
};
_local4.onMotionFinished = function () {
owner.rootMc.map.setData(owner.xs, owner.ys, null);
owner.moveOnTrig = false;
owner.rootMc.map.moveAfter(owner.xs, owner.ys);
};
rootMc.map.setData(x, y, this);
xs = this.x;
ys = this.y;
this.x = x;
this.y = y;
depth = rootMc.map.getSwap(x, y, depthMargin);
itemMc.swapDepths(depth);
return(true);
}
} else {
return(false);
}
}
function broke() {
itemMc.subM.subAniM.gotoAndPlay("onL");
}
function remove(itemTrig) {
itemTrig = (((itemTrig == undefined) or (itemTrig == null)) ? true : (itemTrig));
itemMc.removeMovieClip();
rootMc.map.setData(x, y, null);
if (itemTrig) {
rootMc.map.removeAfter(x, y);
}
}
var movable = false;
var type = "movableBlock";
var linkageName = "movableBlockM";
var depthMargin = 0;
var moveOnTrig = false;
}
Symbol 1520 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1521 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1522 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1523 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 1524 MovieClip [__Packages.game.items.HiddenBlock] Frame 0
class game.items.HiddenBlock
{
var rootMc, targetMc, spacing, typeNum, typeName, x, y, itemMc, delaySec, power, intervalID;
function HiddenBlock (rootMc, targetMc, spacing, typeNum, typeName) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.spacing = spacing;
this.typeNum = typeNum;
this.typeName = typeName;
}
function setPosition(x, y, depth) {
this.x = x;
this.y = y;
itemMc = targetMc.attachMovie(linkageName, (((linkageName + "_") + x) + "_") + y, depth);
itemMc._x = x * spacing;
itemMc._y = y * spacing;
setMcInit();
}
function setMcInit() {
itemMc.path = this;
itemMc.typeNum = typeNum;
itemMc.typeName = typeName;
itemMc.subM.subAniM.onAniFinished = function () {
this._parent._parent.path.remove();
};
}
function checkOn(type, playerObj) {
if (this[type] == null) {
this[type] = playerObj;
if (this[type].xs == x) {
itemMc.subM.subAniM.gotoAndPlay("in2L");
} else if (this[type].ys == y) {
itemMc.subM.subAniM.gotoAndPlay("in1L");
}
var _local3 = itemMc.createEmptyMovieClip(type, itemMc.getNextHighestDepth());
_local3.path = this;
_local3.visitorType = type;
_local3.visitor = this[type];
_local3.onEnterFrame = function () {
if ((this.visitor.x != this.path.x) or (this.visitor.y != this.path.y)) {
if (this.visitor.x == this.path.x) {
this.path.itemMc.subM.subAniM.gotoAndPlay("out2L");
} else if (this.visitor.y == this.path.y) {
this.path.itemMc.subM.subAniM.gotoAndPlay("out1L");
}
this.path[this.visitorType] = null;
this.onEnterFrame = null;
this.removeMovieClip();
}
};
}
}
function changeBomb(delaySec, playerObj) {
if (!bombOnTrig) {
if (playerObj.type == "player") {
rootMc.gSound.start("bombSetSound");
}
bombOnTrig = true;
this.delaySec = delaySec;
bomber = playerObj;
power = bomber.power;
bomber.setBombData(-1);
timerOn();
}
}
function timerOn() {
clearInterval(intervalID);
intervalID = setInterval(this, "explosion", delaySec);
rootMc.gSound.start("bombSetSound");
}
function explosion() {
clearInterval(intervalID);
explosionTrig = true;
type = "fire";
rootMc.map.explosion(x, y, power, "ALL", bomber);
itemMc.subM.subAniM.gotoAndStop("fireL");
rootMc.gSound.start("bombExplosionSound");
}
function remove() {
clearInterval(intervalID);
bomber.setBombData(1);
itemMc.removeMovieClip();
rootMc.map.setData(x, y, null);
}
var movable = true;
var type = "hiddenBlock";
var linkageName = "hiddenBlockM";
var depthMargin = 0;
var bomber = null;
var bombOnTrig = false;
var explosionTrig = false;
var player = null;
var enermy1 = null;
var enermy2 = null;
}
Symbol 1525 MovieClip [__Packages.game.items.ShelterBlock] Frame 0
class game.items.ShelterBlock
{
var rootMc, targetMc, spacing, typeNum, typeName, x, y, itemMc, delaySec, power, intervalID, explosionID;
function ShelterBlock (rootMc, targetMc, spacing, typeNum, typeName) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.spacing = spacing;
this.typeNum = typeNum;
this.typeName = typeName;
}
function setPosition(x, y, depth) {
this.x = x;
this.y = y;
itemMc = targetMc.attachMovie(linkageName, (((linkageName + "_") + x) + "_") + y, depth);
itemMc._x = x * spacing;
itemMc._y = y * spacing;
setMcInit();
}
function setMcInit() {
itemMc.path = this;
itemMc.typeNum = typeNum;
itemMc.typeName = typeName;
}
function checkOn(type, playerObj) {
if (this[type] == null) {
this[type] = playerObj;
itemMc.subM.subAniM.gotoAndPlay("inL");
var _local2 = itemMc.createEmptyMovieClip(type, itemMc.getNextHighestDepth());
_local2.path = this;
_local2.visitorType = type;
_local2.visitor = this[type];
_local2.onEnterFrame = function () {
if ((this.visitor.x != this.path.x) or (this.visitor.y != this.path.y)) {
this.path.itemMc.subM.subAniM.gotoAndPlay("outL");
this.path[this.visitorType] = null;
this.onEnterFrame = null;
this.removeMovieClip();
}
};
}
}
function changeBomb(delaySec, playerObj) {
if (!bombOnTrig) {
if (playerObj.type == "player") {
rootMc.gSound.start("bombSetSound");
}
bombOnTrig = true;
this.delaySec = delaySec;
bomber = playerObj;
power = bomber.power;
bomber.setBombData(-1);
timerOn();
}
}
function timerOn() {
clearInterval(intervalID);
intervalID = setInterval(this, "explosion", delaySec);
rootMc.gSound.start("bombSetSound");
}
function explosion() {
clearInterval(intervalID);
rootMc.map.explosion(x, y, power, "NS", bomber);
explosionCheckStart();
rootMc.gSound.start("bombExplosionSound");
}
function explosionCheckStart() {
clearInterval(explosionID);
explosionTrig = true;
explosionID = setInterval(this, "explosionCheckFinish", explosionSec);
}
function explosionCheckFinish() {
clearInterval(explosionID);
bomber.setBombData(1);
bombOnTrig = false;
explosionTrig = false;
}
function remove() {
clearInterval(intervalID);
itemMc.removeMovieClip();
}
var movable = false;
var type = "shelterBlock";
var linkageName = "shelterBlockM";
var depthMargin = 0;
var bomber = null;
var explosionSec = 300;
var bombOnTrig = false;
var explosionTrig = false;
var player = null;
var enermy1 = null;
var enermy2 = null;
}
Symbol 1526 MovieClip [__Packages.game.items.Bomb] Frame 0
class game.items.Bomb
{
var rootMc, targetMc, spacing, delaySec, power, x, y, itemMc, intervalID;
function Bomb (rootMc, targetMc, spacing, delaySec, playerObj) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.spacing = spacing;
this.delaySec = delaySec;
this.playerObj = playerObj;
power = playerObj.power;
this.playerObj.setBombData(-1);
}
function setPosition(x, y, depth) {
this.x = x;
this.y = y;
itemMc = targetMc.attachMovie(linkageName, (((linkageName + "_") + x) + "_") + y, depth);
itemMc._x = x * spacing;
itemMc._y = y * spacing;
setMcInit();
timerOn();
}
function setMcInit() {
itemMc.path = this;
itemMc.onAniFinished = function () {
this.path.remove();
};
}
function timerOn() {
clearInterval(intervalID);
intervalID = setInterval(this, "explosion", delaySec);
}
function explosion() {
if (!explosionTrig) {
explosionTrig = true;
clearInterval(intervalID);
movable = true;
type = "fire";
rootMc.map.explosion(x, y, power, "ALL", playerObj);
itemMc.gotoAndStop("fireL");
rootMc.gSound.start("bombExplosionSound");
}
}
function remove() {
clearInterval(intervalID);
playerObj.setBombData(1);
itemMc.removeMovieClip();
rootMc.map.setData(x, y, null);
}
var movable = false;
var type = "bomb";
var linkageName = "bombM";
var depthMargin = 0;
var explosionTrig = false;
var playerObj = null;
}
Symbol 1527 MovieClip [__Packages.game.items.Fire] Frame 0
class game.items.Fire
{
var rootMc, targetMc, spacing, tx, ty, playerObj, aniType, x, y, itemMc, typeName;
function Fire (rootMc, targetMc, spacing, paramObj) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.spacing = spacing;
tx = paramObj.x;
ty = paramObj.y;
playerObj = paramObj.playerObj;
aniType = paramObj.aniType;
}
function setPosition(x, y, depth) {
this.x = x;
this.y = y;
itemMc = targetMc.attachMovie(linkageName, (((linkageName + "_") + x) + "_") + y, depth);
itemMc._x = x * spacing;
itemMc._y = y * spacing;
setDirType();
setMcInit();
}
function setDirType() {
if (x != tx) {
if (x > tx) {
typeName = "Right";
} else if (x < tx) {
typeName = "Left";
}
}
if (y != ty) {
if (y > ty) {
typeName = "Down";
} else if (y < ty) {
typeName = "Up";
}
}
}
function setMcInit() {
itemMc.path = this;
itemMc.typeName = aniType + typeName;
itemMc.onAniFinished = function () {
this.path.remove();
};
}
function remove() {
itemMc.removeMovieClip();
rootMc.map.setData(x, y, null);
}
var movable = true;
var type = "fire";
var linkageName = "fireM";
var depthMargin = 0;
}
Symbol 1528 MovieClip [__Packages.game.items.Item] Frame 0
class game.items.Item
{
var rootMc, targetMc, spacing, typeName, xs, ys, x, y, depth, itemMc;
function Item (rootMc, targetMc, spacing, typeName, paramObj) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.spacing = spacing;
this.typeName = typeName;
xs = paramObj.xs;
ys = paramObj.ys;
}
function setPosition(x, y, depth) {
this.x = x;
this.y = y;
this.depth = depth;
count++;
itemMc = targetMc.attachMovie(linkageName, linkageName + count, depth);
itemMc._x = x * spacing;
itemMc._y = y * spacing;
moveCheck();
setMcInit();
}
function moveCheck() {
var _local2 = new mx.transitions.Tween(itemMc, "_xscale", mx.transitions.easing.Regular.easeOut, 30, 100, 10);
_local2 = new mx.transitions.Tween(itemMc, "_yscale", mx.transitions.easing.Regular.easeOut, 30, 100, 10);
if ((x != xs) or (y != ys)) {
itemMc.swapDepths(depth + movingDepth);
var owner = this;
_local2 = new mx.transitions.Tween(itemMc, "_x", mx.transitions.easing.Regular.easeOut, xs * spacing, x * spacing, 10);
_local2 = new mx.transitions.Tween(itemMc, "_y", mx.transitions.easing.Regular.easeOut, ys * spacing, y * spacing, 10);
_local2.onMotionChanged = function () {
};
_local2.onMotionFinished = function () {
owner.itemMc.swapDepths(owner.depth);
};
}
}
function setMcInit() {
itemMc.path = this;
itemMc.typeName = typeName;
}
function remove() {
itemMc.removeMovieClip();
rootMc.map.setData(x, y, null);
}
static var count = 0;
var movable = true;
var type = "item";
var linkageName = "itemM";
var depthMargin = 0;
var movingDepth = 0;
var moveOnTrig = false;
}
Symbol 1529 MovieClip [__Packages.util.GameSound] Frame 0
class util.GameSound
{
var rootMc, volumeMax, depth, soundMc, soundObj;
function GameSound (rootMc, dataArr, volumeMax, depth) {
this.rootMc = rootMc;
this.dataArr = dataArr;
this.volumeMax = volumeMax;
this.depth = depth;
soundMc = rootMc.createEmptyMovieClip("soundM", depth);
soundObj = new Sound(rootMc);
soundObj.setVolume(volumeMax);
Init();
}
function Init() {
var _local8 = dataArr.length;
var _local4 = new Object();
var _local2;
var nextName;
var _local6;
var _local7;
var _local5;
var _local3 = 1;
while (_local3 <= _local8) {
_local4 = dataArr[_local3 - 1];
_local2 = _local4.name;
nextName = _local4.nextName;
_local6 = _local4.volume;
_local7 = _local4.loopTrig;
_local5 = soundMc.createEmptyMovieClip(_local2 + "M", _local3);
_local5.volume = 0;
_local5.volumeMax = _local6;
_local5.name = _local2;
soundMc[_local2] = new Sound(_local5);
soundMc[_local2].attachSound(_local2);
soundMc[_local2].setVolume(_local6);
if (_local7) {
soundMc[_local2].onSoundComplete = function () {
this.start(0, 999);
};
}
if (nextName != undefined) {
soundMc[_local2].path = this;
soundMc[_local2].nextName = nextName;
soundMc[_local2].onSoundComplete = function () {
this.path.start(this.nextName);
};
}
_local3++;
}
}
function searchInfo(name) {
var _local5 = dataArr.length;
var _local3 = new Object();
var _local4 = false;
var _local2 = 1;
while (_local2 <= _local5) {
if (dataArr[_local2 - 1].name == name) {
_local3.trig = true;
_local3.name = dataArr[_local2 - 1].name;
_local3.volume = dataArr[_local2 - 1].volume;
_local3.loopTrig = dataArr[_local2 - 1].loopTrig;
_local4 = true;
break;
}
_local2++;
}
if (!_local4) {
_local3.trig = false;
}
return(_local3);
}
function start(name) {
var _local2 = searchInfo(name);
if (_local2.trig) {
if (_local2.loopTrig) {
soundMc[name].start(0, 999);
} else {
soundMc[name].start();
}
}
}
function stop(name) {
soundMc[name].stop();
}
function stopAllSounds() {
var _local5 = dataArr.length;
var _local3 = new Object();
var _local4;
var _local2 = 1;
while (_local2 <= _local5) {
_local3 = dataArr[_local2 - 1];
_local4 = _local3.name;
soundMc[_local4].stop();
_local2++;
}
}
function getVolume(value) {
var _local3 = arguments.length;
if (_local3 == 0) {
return(soundObj.getVolume());
}
if (_local3 == 1) {
return(soundMc[arguments[0]].getVolume());
}
}
function setVolume(value) {
var _local3 = arguments.length;
if (_local3 == 1) {
soundObj.setVolume(arguments[0]);
} else if (_local3 == 2) {
soundMc[arguments[0]].setVolume(arguments[1]);
}
}
function mute(bool) {
if (bool) {
setVolume(0);
} else {
setVolume(volumeMax);
}
}
function easing(name, startVolume, endVolume, duration) {
var owner = this;
setVolume(name, startVolume);
var _local2 = new mx.transitions.Tween(soundMc[name + "M"], "volume", mx.transitions.easing.Regular.easeOut, startVolume, endVolume, duration);
_local2.onMotionChanged = function () {
owner.setVolume(this.obj.name, this.obj.volume);
};
_local2.onMotionFinished = function () {
};
}
function easingStart(name, startVolume, endVolume, duration) {
var owner = this;
setVolume(name, startVolume);
start(name);
var _local2 = new mx.transitions.Tween(soundMc[name + "M"], "volume", mx.transitions.easing.Regular.easeOut, startVolume, endVolume, duration);
_local2.onMotionChanged = function () {
owner.setVolume(this.obj.name, this.obj.volume);
};
_local2.onMotionFinished = function () {
};
}
function easingEnd(name, startVolume, endVolume, duration) {
var owner = this;
soundMc[name].setVolume(startVolume);
var _local2 = new mx.transitions.Tween(soundMc[name + "M"], "volume", mx.transitions.easing.Regular.easeOut, startVolume, endVolume, duration);
_local2.onMotionChanged = function () {
owner.setVolume(this.obj.name, this.obj.volume);
};
_local2.onMotionFinished = function () {
owner.stop(this.obj.name);
};
}
var dataArr = new Array();
}
Symbol 1530 MovieClip [__Packages.game.Enermy] Frame 0
class game.Enermy
{
var rootMc, targetMc, col, row, intX, intY, spacing, speed, x, y, xs, ys, tx, ty, txs, tys, mc, myCount, depth, xPos, yPos, txPos, tyPos, selectRetryInterval, dirType, ysPos, xsPos, pty, ptx, txsPos, tysPos;
function Enermy (rootMc, targetMc, col, row, intX, intY, spacing) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.col = col;
this.row = row;
this.intX = intX;
this.intY = intY;
this.spacing = spacing;
speed = speedArr[speedStep];
birth();
}
static function resetCountData() {
count = 0;
}
function birth() {
x = intX;
y = intY;
xs = intX;
ys = intY;
tx = null;
ty = null;
txs = intX;
tys = intY;
pathStep = 0;
if (mc == undefined) {
count++;
myCount = count;
depthMargin = depthMargin + (myCount - 1);
depth = rootMc.charMap.getSwap(x, y, depthMargin);
mc = targetMc.attachMovie(linkageName, type + myCount, depth);
rootMc.map.removeItem(x, y);
}
mc._x = x * spacing;
mc._y = y * spacing;
xPos = (x * spacing) + 20;
yPos = (y * spacing) + 20;
txPos = null;
tyPos = null;
liveOnTrig = true;
resetItemData();
resetPriority(col, row);
resetBombMark(col, row);
setMcInit();
}
function die() {
clearInterval(selectRetryInterval);
liveOnTrig = false;
removeMcInit();
deadCount();
}
function deadCount() {
count--;
if (count <= 0) {
rootMc.gameEnd(true);
}
}
function setMcInit() {
mc.path = this;
mc.onAniFinished = function (type) {
if (type == "start") {
this.path.rootMc.charMap.setData(this.path.x, this.path.y, this.path.type + this.path.myCount, this.path);
this.path.selectPosition();
this.onEnterFrame = function () {
this.path.process();
};
} else if (type == "escape") {
this.path.setStatus("normal");
} else if (type == "dead") {
this.path.die();
this.path.setStatus("lose");
} else if (type == "rideOut") {
this.path.setStatus("normal");
} else if (type == "dropItems") {
this.path.rootMc.map.dropItems(this.path.x, this.path.y, this.path.itemArr);
} else if (type == "lose") {
this.path.remove();
}
};
}
function removeMcInit() {
mc.onEnterFrame = null;
}
function setStatus(type) {
if (type != statusType) {
var _local3 = statusType;
statusType = type;
if (type == "normal") {
setSpeed(2);
motionChange(dirType);
} else if (type == "jail") {
setSpeed(0);
motionChange("jail");
} else if (type == "fastRide") {
setSpeed(4);
dirType = ((((dirType == null) or (dirType == undefined)) or (dirType == "stand")) ? "down" : (dirType));
if (_local3 != "slowRide") {
statusOnceTrig = true;
}
motionChange(dirType);
} else if (type == "slowRide") {
setSpeed(1);
dirType = ((((dirType == null) or (dirType == undefined)) or (dirType == "stand")) ? "down" : (dirType));
if (_local3 != "fastRide") {
statusOnceTrig = true;
}
motionChange(dirType);
} else if (type == "win") {
statusOnChange = true;
removeMcInit();
if (liveOnTrig and (statusType != "lose")) {
motionChange("win");
}
} else if (type == "lose") {
liveOnTrig = false;
statusOnChange = true;
removeMcInit();
motionChange("lose");
}
}
}
function motionChange(type) {
if (!statusOnChange) {
if (((statusType == "normal") or (statusType == "fastRide")) or (statusType == "slowRide")) {
if ((((type == "left") or (type == "right")) or (type == "up")) or (type == "down")) {
var _local3 = ((statusType == "normal") ? "" : (statusType));
mc.gotoAndStop((_local3 + type) + "L");
} else if (type == "stand") {
if (statusType == "normal") {
mc.gotoAndStop("standL");
}
} else if (type == "rideOut") {
if ((statusType == "fastRide") or (statusType == "slowRide")) {
mc.subAniM.goFrameTrig = false;
mc.subAniM.frameName = "out";
mc.subAniM.loopEndTrig = true;
mc.subAniM.gotoAndPlay("outL");
}
} else if (type == "slideRide") {
if ((statusType == "fastRide") or (statusType == "slowRide")) {
mc.subAniM.goFrameTrig = false;
mc.subAniM.frameName = "change";
mc.subAniM.loopEndTrig = true;
mc.subAniM.gotoAndPlay("changeL");
}
}
} else if (type == "jail") {
mc.gotoAndStop("jailL");
} else if (type == "escape") {
mc.subAniM.frameName = "escape";
mc.subAniM.loopEndTrig = true;
mc.subAniM.gotoAndPlay("escapeL");
} else if (type == "dead") {
mc.subAniM.frameName = "dead";
mc.subAniM.loopEndTrig = true;
mc.subAniM.gotoAndPlay("deadL");
}
} else if (type == "win") {
mc.gotoAndStop("winL");
} else if (type == "lose") {
mc.gotoAndStop("loseL");
}
}
function motionAniControl() {
if (!statusOnChange) {
if (((statusType == "normal") or (statusType == "fastRide")) or (statusType == "slowRide")) {
if ((xPos != xsPos) or (yPos != ysPos)) {
mc.subAniM.play();
} else if ((statusType == "fastRide") or (statusType == "slowRide")) {
if (mc.subAniM.loopEndTrig) {
if (!mc.subAniM.goFrameTrig) {
mc.subAniM.goFrameTrig = true;
mc.subAniM.gotoAndPlay(mc.subAniM.frameName + "L");
}
} else {
mc.subAniM.gotoAndStop("loopL");
}
} else if (statusType == "normal") {
mc.subAniM.gotoAndStop(1);
}
}
xsPos = xPos;
ysPos = yPos;
}
}
function setSpeed(speedStep) {
this.speedStep = speedStep;
speed = speedArr[speedStep];
var _local7 = Math.floor((xPos - 20) / spacing);
var _local6 = Math.floor((yPos - 20) / spacing);
var _local2 = (xPos - (_local7 * spacing)) - 20;
var _local3 = (yPos - (_local6 * spacing)) - 20;
var _local4 = Math.floor(_local2 / speed);
var _local5 = Math.floor(_local3 / speed);
xPos = xPos - (_local2 - (_local4 * speed));
yPos = yPos - (_local3 - (_local5 * speed));
}
function speedUp() {
speedStep = ((speedStep <= 2) ? 2 : (speedStep));
speedStep++;
speedStep = ((speedStep >= 4) ? 4 : (speedStep));
setSpeed(speedStep);
}
function getItem(x, y) {
var _local2 = rootMc.map.getData(x, y);
if (!statusOnChange) {
if (_local2.type == "fire") {
if (statusType == "normal") {
setStatus("jail");
} else if ((statusType == "slowRide") or (statusType == "fastRide")) {
motionChange("rideOut");
}
} else if (_local2.type == "shelterBlock") {
if (_local2.explosionTrig) {
if (statusType == "normal") {
setStatus("jail");
} else if ((statusType == "slowRide") or (statusType == "fastRide")) {
motionChange("rideOut");
}
}
} else if (_local2.type == "item") {
if (_local2.typeName == "bomb") {
setBombTotal(true);
setBombData(1);
} else if (_local2.typeName == "power") {
setPower(1);
} else if (_local2.typeName == "speed") {
if (statusType == "normal") {
speedUp();
}
} else if (_local2.typeName == "slowTurtle") {
if (statusType == "normal") {
setStatus("slowRide");
}
} else if (_local2.typeName == "fastTurtle") {
if (statusType == "normal") {
setStatus("fastRide");
}
}
updateItemData(_local2.typeName);
_local2.remove();
}
}
}
function updateItemData(type) {
itemArr.push(type);
}
function resetItemData() {
itemArr = new Array();
}
function setPower(power) {
this.power = this.power + power;
this.power = ((this.power <= 1) ? 1 : (this.power));
}
function getPower() {
return(power);
}
function setBombData(num) {
bomb = bomb + num;
if (bomb >= bombTotal) {
bomb = bombTotal;
} else if (bomb <= 0) {
bomb = 0;
}
}
function getBombData() {
return(bomb);
}
function setBombTotal(bool) {
if (bool) {
bombTotal++;
} else {
bombTotal = 0;
}
}
function setBomb() {
if (getBombMark(x, y) == 1) {
if (!rootMc.map.existOtherBomb(x, y)) {
if (rootMc.map.checkSetBombAble(x, y)) {
if ((statusType != "jail") and (getBombData() > 0)) {
rootMc.map.setBomb(x, y, this);
}
} else {
setBombMark(x, y, 0);
}
} else {
setBombMark(x, y, 0);
}
}
}
function resetBombMark(col, row) {
var _local3 = 0;
while (_local3 < row) {
bombMarkArr[_local3] = new Array();
var _local2 = 0;
while (_local2 < col) {
bombMarkArr[_local3][_local2] = 0;
_local2++;
}
_local3++;
}
}
function setBombMark(x, y, num) {
bombMarkArr[y][x] = num;
}
function getBombMark(x, y) {
return(bombMarkArr[y][x]);
}
function selectPosition() {
clearInterval(selectRetryInterval);
selectOnTrig = true;
setBomb();
findAllPath(x, y);
updatePriority();
if ((x != ptx) or (y != pty)) {
selectOnTrig = false;
findShortPath(x, y, ptx, pty);
pathStep = 0;
changeNextPoint();
} else {
selectRetryInterval = setInterval(this, "selectPosition", selectRetrySec);
motionChange(dirType);
}
}
function resetPriority(col, row) {
var _local3 = 0;
while (_local3 < row) {
priorityArr[_local3] = new Array();
var _local2 = 0;
while (_local2 < col) {
priorityArr[_local3][_local2] = 0;
_local2++;
}
_local3++;
}
}
function setPriority(x, y, num) {
priorityArr[y][x] = num;
}
function getPriority(x, y) {
return(priorityArr[y][x]);
}
function updatePriority() {
var _local14 = getTimer();
var _local7;
var _local5;
var _local11;
var _local10;
var _local13 = rootMc.player.x;
var _local12 = rootMc.player.y;
var _local4;
var _local9;
var _local8;
var _local6 = new Object();
rootMc.map.updateBombArea();
var _local3 = 0;
while (_local3 < row) {
var _local2 = 0;
while (_local2 < col) {
if (pathAbleArr[_local3][_local2]) {
_local6 = rootMc.map.getData(_local2, _local3);
_local7 = Math.sqrt(((x - _local2) * (x - _local2)) + ((y - _local3) * (y - _local3)));
_local4 = 0;
_local8 = 0;
_local5 = 0;
if ((_local6.type == "ground") or (_local6.type == "hiddenBlock")) {
_local4 = _local4 - Math.floor(_local7 * 5);
if (rootMc.map.existNearBlock(_local2, _local3)) {
_local5 = _local5 + 2;
} else {
_local5 = _local5 - 5;
}
if (rootMc.map.existNearItem(_local2, _local3)) {
_local5 = _local5 - 5;
} else {
_local5 = _local5 + 3;
}
if (rootMc.map.existOtherBomb(_local2, _local3)) {
_local5 = _local5 - 7;
} else {
_local5 = _local5 + 2;
}
_local8 = (_local5 * 20) - Math.floor(_local7 * 20);
_local4 = _local4 + _local8;
if ((_local5 > 0) and (_local8 > 0)) {
setBombMark(_local2, _local3, 1);
} else {
setBombMark(_local2, _local3, 0);
}
if ((_local6.type == "hiddenBlock") and _local6.bombOnTrig) {
_local4 = _local4 - (300 + Math.floor(_local7 * 10));
}
} else if (_local6.type == "item") {
_local4 = 250 - Math.floor(_local7 * 10);
} else if (_local6.type == "fire") {
_local4 = _local4 - (300 + Math.floor(_local7 * 10));
setBombMark(_local2, _local3, 0);
} else if (_local6.type == "bomb") {
_local4 = _local4 - (300 + Math.floor(_local7 * 10));
setBombMark(_local2, _local3, 0);
}
if ((_local13 == _local2) and (_local12 == _local3)) {
_local8 = 200 - Math.floor(_local7 * 10);
_local4 = _local4 + _local8;
setBombMark(_local2, _local3, 1);
}
if ((_local9 == undefined) or (_local9 < _local4)) {
_local9 = _local4;
_local11 = _local2;
_local10 = _local3;
}
}
_local2++;
}
_local3++;
}
ptx = _local11;
pty = _local10;
_local14 = getTimer() - _local14;
}
function findAllWard(x, y) {
var _local2 = new Object();
pathAbleArr[y][x] = true;
if (!pathAbleArr[y - 1][x]) {
_local2 = rootMc.map.getData(x, y - 1);
if (_local2.movable and (_local2.type != "fire")) {
findAllWard(x, y - 1);
}
}
if (!pathAbleArr[y + 1][x]) {
_local2 = rootMc.map.getData(x, y + 1);
if (_local2.movable and (_local2.type != "fire")) {
findAllWard(x, y + 1);
}
}
if (!pathAbleArr[y][x - 1]) {
_local2 = rootMc.map.getData(x - 1, y);
if ((_local2.movable and (_local2.type != "fire")) and (_local2.type != "shelterBlock")) {
findAllWard(x - 1, y);
}
}
if (!pathAbleArr[y][x + 1]) {
_local2 = rootMc.map.getData(x + 1, y);
if ((_local2.movable and (_local2.type != "fire")) and (_local2.type != "shelterBlock")) {
findAllWard(x + 1, y);
}
}
}
function findAllPath(x, y) {
var _local4 = getTimer();
var _local3 = 0;
while (_local3 < row) {
pathAbleArr[_local3] = new Array();
var _local2 = 0;
while (_local2 < col) {
pathAbleArr[_local3][_local2] = false;
_local2++;
}
_local3++;
}
findAllWard(x, y);
_local4 = getTimer() - _local4;
}
function findNextPath(x, y, tx, ty) {
var _local12 = new Object();
var _local6;
var _local5;
var _local4;
var _local10;
var _local9;
var _local11;
pathCheckArr[y][x] = true;
if (rootMc.map.getData(x, y - 1).type != "fire") {
if (rootMc.map.getData(x, y - 1).movable and (!pathCheckArr[y - 1][x])) {
_local5 = Math.sqrt(((x - x) * (x - x)) + ((y - (y - 1)) * (y - (y - 1))));
_local4 = Math.sqrt(((x - tx) * (x - tx)) + (((y - 1) - ty) * ((y - 1) - ty)));
if ((_local6 == undefined) or (_local6 > (_local5 + _local4))) {
_local6 = _local5 + _local4;
_local10 = x;
_local9 = y - 1;
_local11 = "N";
}
}
}
if (rootMc.map.getData(x, y + 1).type != "fire") {
if (rootMc.map.getData(x, y + 1).movable and (!pathCheckArr[y + 1][x])) {
_local5 = Math.sqrt(((x - x) * (x - x)) + ((y - (y + 1)) * (y - (y + 1))));
_local4 = Math.sqrt(((x - tx) * (x - tx)) + (((y + 1) - ty) * ((y + 1) - ty)));
if ((_local6 == undefined) or (_local6 > (_local5 + _local4))) {
_local6 = _local5 + _local4;
_local10 = x;
_local9 = y + 1;
_local11 = "S";
}
}
}
if (rootMc.map.getData(x - 1, y).type != "fire") {
if (rootMc.map.getData(x - 1, y).movable and (!pathCheckArr[y][x - 1])) {
_local5 = Math.sqrt(((x - (x - 1)) * (x - (x - 1))) + ((y - y) * (y - y)));
_local4 = Math.sqrt((((x - 1) - tx) * ((x - 1) - tx)) + ((y - ty) * (y - ty)));
if ((_local6 == undefined) or (_local6 > (_local5 + _local4))) {
_local6 = _local5 + _local4;
_local10 = x - 1;
_local9 = y;
_local11 = "W";
}
}
}
if (rootMc.map.getData(x + 1, y).type != "fire") {
if (rootMc.map.getData(x + 1, y).movable and (!pathCheckArr[y][x + 1])) {
_local5 = Math.sqrt(((x - (x + 1)) * (x - (x + 1))) + ((y - y) * (y - y)));
_local4 = Math.sqrt((((x + 1) - tx) * ((x + 1) - tx)) + ((y - ty) * (y - ty)));
if ((_local6 == undefined) or (_local6 > (_local5 + _local4))) {
_local6 = _local5 + _local4;
_local10 = x + 1;
_local9 = y;
_local11 = "E";
}
}
}
if (rootMc.map.getData(x - 1, y - 1).type != "fire") {
if (rootMc.map.getData(x - 1, y - 1).movable and (!pathCheckArr[y - 1][x - 1])) {
_local5 = Math.sqrt(((x - (x - 1)) * (x - (x - 1))) + ((y - (y - 1)) * (y - (y - 1))));
_local4 = Math.sqrt((((x - 1) - tx) * ((x - 1) - tx)) + (((y - 1) - ty) * ((y - 1) - ty)));
if ((_local6 == undefined) or (_local6 > (_local5 + _local4))) {
if (rootMc.map.getData(x, y - 1).movable or rootMc.map.getData(x - 1, y).movable) {
if ((rootMc.map.getData(x, y - 1).type != "fire") or (rootMc.map.getData(x - 1, y).type != "fire")) {
_local6 = _local5 + _local4;
_local10 = x - 1;
_local9 = y - 1;
_local11 = "NW";
}
}
}
}
}
if (rootMc.map.getData(x + 1, y - 1).type != "fire") {
if (rootMc.map.getData(x + 1, y - 1).movable and (!pathCheckArr[y - 1][x + 1])) {
_local5 = Math.sqrt(((x - (x + 1)) * (x - (x + 1))) + ((y - (y - 1)) * (y - (y - 1))));
_local4 = Math.sqrt((((x + 1) - tx) * ((x + 1) - tx)) + (((y - 1) - ty) * ((y - 1) - ty)));
if ((_local6 == undefined) or (_local6 > (_local5 + _local4))) {
if (rootMc.map.getData(x, y - 1).movable or rootMc.map.getData(x + 1, y).movable) {
if ((rootMc.map.getData(x, y - 1).type != "fire") or (rootMc.map.getData(x + 1, y).type != "fire")) {
_local6 = _local5 + _local4;
_local10 = x + 1;
_local9 = y - 1;
_local11 = "NE";
}
}
}
}
}
if (rootMc.map.getData(x - 1, y + 1).type != "fire") {
if (rootMc.map.getData(x - 1, y + 1).movable and (!pathCheckArr[y + 1][x - 1])) {
_local5 = Math.sqrt(((x - (x - 1)) * (x - (x - 1))) + ((y - (y + 1)) * (y - (y + 1))));
_local4 = Math.sqrt((((x - 1) - tx) * ((x - 1) - tx)) + (((y + 1) - ty) * ((y + 1) - ty)));
if ((_local6 == undefined) or (_local6 > (_local5 + _local4))) {
if (rootMc.map.getData(x, y + 1).movable or rootMc.map.getData(x - 1, y).movable) {
if ((rootMc.map.getData(x, y + 1).type != "fire") or (rootMc.map.getData(x - 1, y).type != "fire")) {
_local6 = _local5 + _local4;
_local10 = x - 1;
_local9 = y + 1;
_local11 = "SW";
}
}
}
}
}
if (rootMc.map.getData(x + 1, y + 1).type != "fire") {
if (rootMc.map.getData(x + 1, y + 1).movable and (!pathCheckArr[y + 1][x + 1])) {
_local5 = Math.sqrt(((x - (x + 1)) * (x - (x + 1))) + ((y - (y + 1)) * (y - (y + 1))));
_local4 = Math.sqrt((((x + 1) - tx) * ((x + 1) - tx)) + (((y + 1) - ty) * ((y + 1) - ty)));
if ((_local6 == undefined) or (_local6 > (_local5 + _local4))) {
if (rootMc.map.getData(x, y + 1).movable or rootMc.map.getData(x + 1, y).movable) {
if ((rootMc.map.getData(x, y + 1).type != "fire") or (rootMc.map.getData(x + 1, y).type != "fire")) {
_local6 = _local5 + _local4;
_local10 = x + 1;
_local9 = y + 1;
_local11 = "SE";
}
}
}
}
}
if (_local11 != undefined) {
_local12.trig = true;
_local12.x = _local10;
_local12.y = _local9;
} else {
_local12.trig = false;
_local12.x = x;
_local12.y = y;
}
return(_local12);
}
function findShortPath(x, y, tx, ty) {
var _local12 = getTimer();
var _local3 = new Array();
var _local11 = true;
var _local16 = x;
var _local15 = y;
var _local9 = tx;
var _local8 = ty;
var _local7 = x;
var _local6 = y;
var _local5 = new Object();
var _local10;
if ((x != tx) or (y != ty)) {
var _local4 = 0;
while (_local4 < row) {
pathCheckArr[_local4] = new Array();
var _local2 = 0;
while (_local2 < col) {
pathCheckArr[_local4][_local2] = false;
_local2++;
}
_local4++;
}
_local3.push({x:x, y:y});
while (_local11) {
_local5 = findNextPath(_local7, _local6, _local9, _local8);
if (_local5.trig) {
_local7 = _local5.x;
_local6 = _local5.y;
_local3.push(_local5);
if ((_local7 == _local9) and (_local6 == _local8)) {
pathCheckArr[_local8][_local9] = true;
_local3.push({x:_local9, y:_local8});
_local11 = false;
}
} else {
_local3.pop();
_local10 = _local3.length;
if (_local10 > 0) {
_local7 = _local3[_local10 - 1].x;
_local6 = _local3[_local10 - 1].y;
} else {
_local11 = false;
_local3 = [];
_local3.push({x:x, y:y});
}
}
}
} else {
_local3.push({x:x, y:y});
}
sortPath(_local3);
_local12 = getTimer() - _local12;
}
function sortPath(pathDataArr) {
var _local6 = new Array();
var _local7 = pathDataArr;
var _local2 = new Object();
var _local8 = new Object();
var _local5 = new Object();
var _local4 = new Object();
var _local9 = pathDataArr.length;
var _local3 = 0;
while (_local3 < _local9) {
_local2 = _local7[_local3];
_local8 = _local7[_local3 - 1];
_local5 = _local7[_local3 + 1];
if ((_local2.x != _local8.x) or (_local2.y != _local8.y)) {
_local6.push(_local2);
if (_local3 < (_local9 - 1)) {
if ((_local2.x != _local5.x) and (_local2.y != _local5.y)) {
_local4 = {};
if (rootMc.map.getData(_local5.x, _local2.y).movable) {
_local4.x = _local5.x;
_local4.y = _local2.y;
_local6.push(_local4);
} else {
_local4.x = _local2.x;
_local4.y = _local5.y;
_local6.push(_local4);
}
}
}
}
_local3++;
}
pathArr = [];
pathArr = _local6.concat();
}
function process() {
if (!statusOnChange) {
if (liveOnTrig) {
moveCheck();
positionChange(x, y);
motionAniControl();
if (statusType == "jail") {
otherPlayerCheck();
} else {
getItem(x, y);
}
visible(x, y);
updateMapInfo();
}
}
}
function getDirType(x, y, tx, ty) {
var _local2 = dirType;
var _local6 = x;
var _local5 = y;
var _local4 = tx;
var _local3 = ty;
if (_local6 != _local4) {
if (_local6 < _local4) {
_local2 = "right";
} else if (_local6 > _local4) {
_local2 = "left";
}
}
if (_local5 != _local3) {
if (_local5 < _local3) {
_local2 = "down";
} else if (_local5 > _local3) {
_local2 = "up";
}
}
if ((_local6 == _local4) and (_local5 == _local3)) {
_local2 = "stand";
}
return(_local2);
}
function changeNextPoint() {
checkPointTrig = false;
var _local2 = pathArr.length;
setBomb();
pathStep++;
if (pathStep > _local2) {
if (pathStep == (_local2 + 1)) {
selectPosition();
}
} else {
txs = (((tx == undefined) or (tx == null)) ? (intX) : (tx));
tys = (((ty == undefined) or (ty == null)) ? (intY) : (ty));
tx = pathArr[pathStep - 1].x;
ty = pathArr[pathStep - 1].y;
txsPos = (txs * spacing) + 20;
tysPos = (tys * spacing) + 20;
txPos = (tx * spacing) + 20;
tyPos = (ty * spacing) + 20;
dirType = getDirType(txs, tys, tx, ty);
if (dirType != "stand") {
motionChange(dirType);
}
}
}
function checkPoint() {
var _local3 = (xPos - 20) / spacing;
var _local2 = (yPos - 20) / spacing;
if (dirType != undefined) {
if ((dirType == "left") or (dirType == "right")) {
if (tx == _local3) {
return(true);
}
return(false);
}
if ((dirType == "up") or (dirType == "down")) {
if (ty == _local2) {
return(true);
}
return(false);
}
if (dirType == "stand") {
if ((tx == _local3) and (ty == _local2)) {
return(true);
}
return(false);
}
return(false);
}
}
function escapeStand() {
var _local4 = (x * spacing) + 20;
var _local3 = (y * spacing) + 20;
var _local2;
if (xPos > _local4) {
_local2 = "left";
} else if (xPos < _local4) {
_local2 = "right";
}
if (yPos > _local3) {
_local2 = "up";
} else if (yPos < _local3) {
_local2 = "down";
}
if (_local2 != undefined) {
trace("escapeStand");
dirType = _local2;
pathArr = [];
pathArr = [{x:x, y:y}];
pathStep = 0;
txs = tx;
tys = ty;
tx = x;
ty = y;
txsPos = (txs * spacing) + 20;
tysPos = (tys * spacing) + 20;
txPos = (tx * spacing) + 20;
tyPos = (ty * spacing) + 20;
}
}
function moveCheck() {
if (!selectOnTrig) {
var _local6 = true;
if (dirType == "stand") {
if (!checkPoint()) {
escapeStand();
}
}
if (dirType == "left") {
xPos = xPos - speed;
} else if (dirType == "right") {
xPos = xPos + speed;
} else if (dirType == "up") {
yPos = yPos - speed;
} else if (dirType == "down") {
yPos = yPos + speed;
}
var _local10 = Math.floor((yPos + 19) / spacing);
var _local7 = Math.floor((yPos - 19) / spacing);
var _local8 = Math.floor((xPos - 19) / spacing);
var _local9 = Math.floor((xPos + 19) / spacing);
var _local2 = rootMc.map.getData(_local8, _local7);
var _local4 = rootMc.map.getData(_local9, _local7);
var _local3 = rootMc.map.getData(_local8, _local10);
var _local5 = rootMc.map.getData(_local9, _local10);
if (!checkPointTrig) {
if (dirType == "up") {
if (_local2.movable and _local4.movable) {
if ((_local2.type == "fire") or (_local4.type == "fire")) {
if ((_local2.y != y) or (_local4.y != y)) {
if ((_local2.y < (row - 1)) and (_local4.y < (row - 1))) {
yPos = yPos + speed;
}
}
}
} else if ((_local2.type == "bomb") or (_local4.type == "bomb")) {
if ((_local2.y != y) or (_local4.y != y)) {
if ((_local2.y < (row - 1)) and (_local4.y < (row - 1))) {
_local6 = false;
yPos = yPos + speed;
}
}
} else if ((_local2.type == "movableBlock") and (_local4.type == "movableBlock")) {
if (!_local2.move(_local2.x, _local2.y - 1)) {
_local6 = false;
yPos = yPos + speed;
}
} else if ((_local2.type == "shelterBlock") and (_local4.type == "shelterBlock")) {
} else {
_local6 = false;
yPos = yPos + speed;
}
if (yPos > tysPos) {
yPos = yPos - speed;
}
}
if (dirType == "down") {
if (_local3.movable and _local5.movable) {
if ((_local3.type == "fire") or (_local5.type == "fire")) {
if ((_local3.y != y) or (_local5.y != y)) {
if ((_local3.y > 1) and (_local5.y > 1)) {
yPos = yPos - speed;
}
}
}
} else if ((_local3.type == "bomb") or (_local5.type == "bomb")) {
if ((_local3.y != y) or (_local5.y != y)) {
if ((_local3.y > 1) and (_local5.y > 1)) {
_local6 = false;
yPos = yPos - speed;
}
}
} else if ((_local3.type == "movableBlock") and (_local5.type == "movableBlock")) {
if (!_local3.move(_local3.x, _local3.y + 1)) {
_local6 = false;
yPos = yPos - speed;
}
} else if ((_local3.type == "shelterBlock") and (_local5.type == "shelterBlock")) {
} else {
_local6 = false;
yPos = yPos - speed;
}
if (yPos < tysPos) {
yPos = yPos + speed;
}
}
if (dirType == "left") {
if (_local2.movable and _local3.movable) {
if ((_local2.type == "fire") or (_local3.type == "fire")) {
if ((_local2.x != x) or (_local3.x != x)) {
if ((_local2.x < (col - 1)) and (_local3.x < (col - 1))) {
xPos = xPos + speed;
}
}
}
} else if ((_local2.type == "bomb") or (_local3.type == "bomb")) {
if ((_local2.x != x) or (_local3.x != x)) {
if ((_local2.x < (col - 1)) and (_local3.x < (col - 1))) {
_local6 = false;
xPos = xPos + speed;
}
}
} else if ((_local2.type == "movableBlock") and (_local3.type == "movableBlock")) {
if (!_local2.move(_local2.x - 1, _local2.y)) {
_local6 = false;
xPos = xPos + speed;
}
} else {
_local6 = false;
xPos = xPos + speed;
}
if (xPos > txsPos) {
xPos = xPos - speed;
}
}
if (dirType == "right") {
if (_local4.movable and _local5.movable) {
if ((_local4.type == "fire") or (_local5.type == "fire")) {
if ((_local4.x != x) or (_local5.x != x)) {
if ((_local4.x > 1) and (_local5.x > 1)) {
xPos = xPos - speed;
}
}
}
} else if ((_local4.type == "bomb") or (_local5.type == "bomb")) {
if ((_local4.x != x) or (_local5.x != x)) {
if ((_local4.x > 1) and (_local5.x > 1)) {
_local6 = false;
xPos = xPos - speed;
}
}
} else if ((_local4.type == "movableBlock") and (_local5.type == "movableBlock")) {
if (!_local4.move(_local4.x + 1, _local4.y)) {
_local6 = false;
xPos = xPos - speed;
}
} else {
_local6 = false;
xPos = xPos - speed;
}
if (xPos < txsPos) {
xPos = xPos + speed;
}
}
if (!_local6) {
}
}
x = Math.floor(xPos / spacing);
y = Math.floor(yPos / spacing);
checkPointTrig = checkPoint();
if (checkPointTrig) {
changeNextPoint();
} else if (!_local6) {
selectPosition();
}
}
}
function positionChange(x, y) {
mc._x = xPos - 20;
mc._y = yPos - 20;
swap(x, y);
}
function swap(x, y) {
depth = rootMc.charMap.getSwap(x, y, depthMargin);
mc.swapDepths(depth);
}
function visible(x, y) {
var _local2 = rootMc.map.getData(x, y);
if ((_local2.type == "hiddenBlock") or (_local2.type == "shelterBlock")) {
_local2.checkOn(type + myCount, this);
mc._visible = false;
} else {
mc._visible = true;
}
}
function updateMapInfo() {
if ((x != xs) or (y != ys)) {
rootMc.charMap.setData(x, y, type + myCount, this);
rootMc.charMap.setData(xs, ys, type + myCount, null);
xs = x;
ys = y;
if (!liveOnTrig) {
rootMc.charMap.setData(x, y, type + myCount, null);
rootMc.charMap.setData(xs, ys, type + myCount, null);
}
}
}
function otherPlayerCheck() {
var _local4;
var _local3 = false;
var _local6 = "player";
var _local7 = ((myCount == 1) ? "enermy2" : "enermy1");
var _local5 = "monster";
var _local2 = new Object();
if (!_local3) {
_local2 = rootMc.charMap.getData(x, y, _local6);
if ((((_local2 != null) and (_local2 != undefined)) and (_local2.statusType != "jail")) and _local2.liveOnTrig) {
_local4 = _local6;
_local3 = true;
}
}
if (!_local3) {
_local2 = rootMc.charMap.getData(x, y, _local7);
if ((((_local2 != null) and (_local2 != undefined)) and (_local2.statusType != "jail")) and _local2.liveOnTrig) {
_local4 = _local7;
_local3 = true;
}
}
if (!_local3) {
_local2 = rootMc.charMap.getData(x, y, _local5);
if (((_local2 != null) and (_local2 != undefined)) and _local2.liveOnTrig) {
_local4 = _local5;
_local3 = true;
}
}
if (_local3) {
if (_local4 == _local6) {
liveOnTrig = false;
motionChange("dead");
trace("Enermy : hit player!!");
} else if ((_local4 == _local7) or (_local4 == _local5)) {
motionChange("escape");
trace("Enermy : hit same!!");
}
}
}
function remove() {
mc.onEnterFrame = null;
mc.removeMovieClip();
rootMc.charMap.setData(x, y, type + myCount, null);
rootMc.charMap.setData(xs, ys, type + myCount, null);
}
static var count = 0;
var movable = true;
var type = "enermy";
var linkageName = "enermyM";
var depthMargin = 2;
var speedStep = 2;
var speedArr = [1, 2, 4, 5, 8];
var itemArr = new Array();
var power = 1;
var bombTotal = 1;
var bomb = 1;
var pathArr = new Array();
var pathStep = 0;
var liveOnTrig = true;
var statusType = "normal";
var statusOnceTrig = true;
var statusOnChange = false;
var checkPointTrig = false;
var selectOnTrig = false;
var selectRetrySec = 1000;
var priorityArr = new Array();
var pathAbleArr = new Array();
var pathCheckArr = new Array();
var bombMarkArr = new Array();
}
Symbol 1531 MovieClip [__Packages.game.CharMap] Frame 0
class game.CharMap
{
var rootMc, targetMc, col, row, spacing;
function CharMap (rootMc, targetMc, col, row, spacing) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.col = col;
this.row = row;
this.spacing = spacing;
resetData(col, row);
}
function resetData(col, row) {
var _local3 = 0;
while (_local3 < row) {
dataArr[_local3] = new Array();
var _local2 = 0;
while (_local2 < col) {
var _local4 = {player:null, enermy1:null, enermy2:null, monster:null};
dataArr[_local3][_local2] = _local4;
_local2++;
}
_local3++;
}
}
function setData(x, y, type, obj) {
if ((obj == undefined) or (obj == null)) {
dataArr[y][x][type] = null;
} else {
dataArr[y][x][type] = obj;
}
}
function getData(x, y, type) {
var _local2 = new Object();
_local2 = dataArr[y][x][type];
return(_local2);
}
function getSwap(x, y, depthMargin) {
depthMargin = (((depthMargin == undefined) or (depthMargin == null)) ? 0 : (depthMargin));
var _local2 = ((((y + 1) * 1000) + ((col - x) * 10)) + depthMargin) + 100;
return(_local2);
}
function toString() {
trace("dataArr-----------------------------START");
trace("0\t1\t2\t3\t4\t5\t6\t7\t8");
var _local2 = 0;
while (_local2 < row) {
trace((_local2 + " -> ") + dataArr[_local2]);
_local2++;
}
trace("dataArr-----------------------------END");
}
function remove() {
}
var bombDelaySec = 1000;
var dataArr = new Array();
}
Symbol 1532 MovieClip [__Packages.game.Monster] Frame 0
class game.Monster
{
var rootMc, targetMc, col, row, intX, intY, x, y, spacing, typeName, pathLen, speed, rebirthInterval, xs, ys, tx, ty, txs, tys, pastx, pasty, dirType, mc, depth, xPos, yPos, xsPos, ysPos, txPos, tyPos, liveOnTrig, txsPos, tysPos;
function Monster (rootMc, targetMc, col, row, intX, intY, spacing, typeName, pathArr, loopTrig) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.col = col;
this.row = row;
this.intX = intX;
this.intY = intY;
x = intX;
y = intY;
this.spacing = spacing;
this.typeName = typeName;
this.pathArr = pathArr;
pathLen = pathArr.length;
this.loopTrig = ((loopTrig == undefined) ? false : (loopTrig));
if (typeName == "monster1") {
speed = 4;
} else if (typeName == "monster2") {
speed = 2;
} else if (typeName == "monster3") {
speed = 5;
}
birthCheck();
}
function gameEnd() {
clearInterval(rebirthInterval);
gameEndTrig = true;
removeMcInit();
}
function birthCheck() {
clearInterval(rebirthInterval);
if (!gameEndTrig) {
x = intX;
y = intY;
if (rootMc.map.getData(x, y).type == "ground") {
birth();
} else if ((rootMc.map.getData(x, y).type == "item") or (rootMc.map.getData(x, y).type == "bomb")) {
rootMc.map.removeItem(x, y);
birth();
} else {
rootMc.charMap.setData(x, y, type, this);
}
}
}
function birth() {
clearInterval(rebirthInterval);
x = intX;
y = intY;
xs = intX;
ys = intY;
tx = null;
ty = null;
txs = intX;
tys = intY;
pastx = null;
pasty = null;
pathStep = 0;
pathDir = 1;
dirType = null;
if (mc == undefined) {
count++;
depth = rootMc.charMap.getSwap(x, y, depthMargin);
mc = targetMc.attachMovie(linkageName, type + count, depth);
rootMc.map.removeItem(x, y);
}
mc._x = x * spacing;
mc._y = y * spacing;
xPos = (x * spacing) + 20;
yPos = (y * spacing) + 20;
xsPos = xPos;
ysPos = yPos;
txPos = null;
tyPos = null;
liveOnTrig = true;
setMcInit();
motionChange("start");
}
function die() {
if (!statusOnChange) {
if (liveOnTrig) {
liveOnTrig = false;
removeMcInit();
motionChange("end");
rootMc.charMap.setData(x, y, type, null);
rootMc.map.dropCoinItem(x, y, typeName);
}
}
}
function rebirth() {
clearInterval(rebirthInterval);
rebirthInterval = setInterval(this, "birthCheck", rebirthSec);
}
function setMcInit() {
mc.path = this;
mc.typeName = typeName;
mc.onAniFinished = function (type) {
if (type == "start") {
this.path.rootMc.charMap.setData(this.path.x, this.path.y, this.path.type, this.path);
this.path.changeNextPoint(this.path.pathDir);
this.onEnterFrame = function () {
this.path.process();
};
} else if (type == "end") {
this.path.motionChange("off");
this.path.rebirth();
}
if (this.path.gameEndTrig) {
this.path.removeMcInit();
}
};
}
function removeMcInit() {
mc.onEnterFrame = null;
}
function motionChange(type) {
if (!statusOnChange) {
mc.subM.gotoAndStop(type + "L");
}
}
function motionAniControl() {
if (!statusOnChange) {
if ((xPos != xsPos) or (yPos != ysPos)) {
mc.subM.subAniM.play();
} else {
mc.subM.subAniM.gotoAndStop(1);
}
xsPos = xPos;
ysPos = yPos;
}
}
function getItem(x, y) {
var _local2 = rootMc.map.getData(x, y);
if (!statusOnChange) {
if (_local2.type == "fire") {
if (_local2.playerObj.type == "player") {
rootMc.addKillMonster(1);
}
die();
}
}
}
function process() {
if (!statusOnChange) {
if (liveOnTrig) {
moveCheck();
positionChange(x, y);
getItem(x, y);
updateMapInfo();
}
}
}
function getDirType(x, y, tx, ty) {
var _local2 = dirType;
var _local6 = x;
var _local5 = y;
var _local4 = tx;
var _local3 = ty;
if (_local6 != _local4) {
if (_local6 < _local4) {
_local2 = "right";
} else if (_local6 > _local4) {
_local2 = "left";
}
}
if (_local5 != _local3) {
if (_local5 < _local3) {
_local2 = "down";
} else if (_local5 > _local3) {
_local2 = "up";
}
}
return(_local2);
}
function changeNextPoint(num) {
checkPointTrig = false;
pathStep = pathStep + num;
if (loopTrig) {
if (pathStep <= 0) {
pathStep = pathLen;
} else if (pathStep > pathLen) {
pathStep = 1;
}
} else if (pathStep <= 0) {
pathDir = 1;
pathStep = 1;
} else if (pathStep >= pathLen) {
pathDir = -1;
pathStep = pathLen;
}
txs = (((tx == undefined) or (tx == null)) ? (intX) : (tx));
tys = (((ty == undefined) or (ty == null)) ? (intY) : (ty));
tx = pathArr[pathStep - 1].x;
ty = pathArr[pathStep - 1].y;
txPos = (tx * spacing) + 20;
tyPos = (ty * spacing) + 20;
txsPos = (txs * spacing) + 20;
tysPos = (tys * spacing) + 20;
dirType = getDirType(txs, tys, tx, ty);
motionChange(dirType);
}
function checkPoint() {
var _local3 = (xPos - 20) / spacing;
var _local2 = (yPos - 20) / spacing;
if (dirType != undefined) {
if ((dirType == "left") or (dirType == "right")) {
if (tx == _local3) {
return(true);
}
return(false);
}
if ((dirType == "up") or (dirType == "down")) {
if (ty == _local2) {
return(true);
}
return(false);
}
return(false);
}
if ((tx == _local3) and (ty == _local2)) {
return(true);
}
return(false);
}
function movableCheck() {
var _local4 = rootMc.map.getData(x, y - 1);
var _local2 = rootMc.map.getData(x, y + 1);
var _local5 = rootMc.map.getData(x - 1, y);
var _local3 = rootMc.map.getData(x + 1, y);
if ((((!_local4.movable) and (!_local2.movable)) and (!_local5.movable)) and (!_local3.movable)) {
return(true);
}
return(false);
}
function turnAbleCheck() {
if ((((xs < 0) or (xs >= col)) or (ys < 0)) or (ys >= row)) {
return(false);
}
var _local2 = rootMc.map.getData(pastx, pasty);
if (_local2.movable) {
return(true);
}
return(false);
}
function moveCheck() {
var _local2 = true;
var _local11 = movableCheck();
if (_local11) {
}
if (dirType == "left") {
xPos = xPos - speed;
} else if (dirType == "right") {
xPos = xPos + speed;
} else if (dirType == "up") {
yPos = yPos - speed;
} else if (dirType == "down") {
yPos = yPos + speed;
}
var _local9 = Math.floor((yPos + 19) / spacing);
var _local3 = Math.floor((yPos - 19) / spacing);
var _local6 = Math.floor((xPos - 19) / spacing);
var _local7 = Math.floor((xPos + 19) / spacing);
var _local5 = rootMc.map.getData(_local6, _local3);
var _local10 = rootMc.map.getData(_local7, _local3);
var _local8 = rootMc.map.getData(_local6, _local9);
var _local4 = rootMc.map.getData(_local7, _local9);
if (!checkPointTrig) {
if (dirType == "up") {
if (_local5.movable and _local10.movable) {
} else {
_local2 = false;
yPos = yPos + speed;
}
if (yPos >= tysPos) {
yPos = yPos - speed;
}
}
if (dirType == "down") {
if (_local8.movable and _local4.movable) {
} else {
_local2 = false;
yPos = yPos - speed;
}
if (yPos <= tysPos) {
yPos = yPos + speed;
}
}
if (dirType == "left") {
if (_local5.movable and _local8.movable) {
} else {
_local2 = false;
xPos = xPos + speed;
}
if (xPos >= txsPos) {
xPos = xPos - speed;
}
}
if (dirType == "right") {
if (_local10.movable and _local4.movable) {
} else {
_local2 = false;
xPos = xPos - speed;
}
if (xPos <= txsPos) {
xPos = xPos + speed;
}
}
if (!_local2) {
}
}
x = Math.floor(xPos / spacing);
y = Math.floor(yPos / spacing);
mc.win4.text = (("x : " + x) + " - y : ") + y;
checkPointTrig = checkPoint();
if (checkPointTrig) {
changeNextPoint(pathDir);
} else if (!_local2) {
if (turnAbleCheck()) {
if (loopTrig) {
pathDir = pathDir * -1;
} else if ((pathStep > 1) and (pathStep < pathLen)) {
pathDir = pathDir * -1;
}
changeNextPoint(pathDir);
}
}
}
function positionChange(x, y) {
mc._x = xPos - 20;
mc._y = yPos - 20;
swap(x, y);
}
function swap(x, y) {
depth = rootMc.charMap.getSwap(x, y, depthMargin);
mc.swapDepths(depth);
}
function updateMapInfo() {
if ((x != xs) or (y != ys)) {
rootMc.charMap.setData(x, y, type, this);
rootMc.charMap.setData(xs, ys, type, null);
pastx = xs;
pasty = ys;
xs = x;
ys = y;
if (!liveOnTrig) {
rootMc.charMap.setData(x, y, type, null);
rootMc.charMap.setData(xs, ys, type, null);
}
}
}
function remove() {
mc.onEnterFrame = null;
mc.removeMovieClip();
rootMc.charMap.setData(x, y, type, null);
rootMc.charMap.setData(xs, ys, type, null);
}
static var count = 0;
var movable = true;
var type = "monster";
var linkageName = "monsterM";
var depthMargin = 1;
var loopTrig = false;
var pathArr = new Array();
var pathStep = 1;
var pathDir = 1;
var statusOnChange = false;
var checkPointTrig = false;
var rebirthSec = 2000;
var gameEndTrig = false;
}
Symbol 1533 MovieClip [__Packages.game.Player] Frame 0
class game.Player
{
var rootMc, targetMc, col, row, intX, intY, spacing, keyOffinterval, x, y, xs, ys, mc, depth, xPos, yPos, speed, keyPressSave, keyPress;
function Player (rootMc, targetMc, col, row, intX, intY, spacing) {
this.rootMc = rootMc;
this.targetMc = targetMc;
this.col = col;
this.row = row;
this.intX = intX;
this.intY = intY;
this.spacing = spacing;
birth();
}
static function setEastEggData(bool) {
eastEggTrig = bool;
}
static function getEastEggData() {
return(eastEggTrig);
}
function gameEnd() {
clearInterval(keyOffinterval);
gameEndTrig = true;
removeMcInit();
}
static function setLifeData(num) {
life = life + num;
if (life < 0) {
life = -1;
} else if (life >= lifeMax) {
life = lifeMax;
}
}
static function getLifeData() {
return(life);
}
static function resetLifeData(clearTrig) {
if (clearTrig) {
if (life <= lifeBasic) {
life = lifeBasic;
}
} else {
life = lifeBasic;
}
}
function birth() {
clearInterval(keyOffinterval);
x = intX;
y = intY;
xs = intX;
ys = intY;
if (mc == undefined) {
depth = rootMc.charMap.getSwap(x, y, depthMargin);
mc = targetMc.attachMovie(linkageName, linkageName, depth);
} else {
mc._visible = true;
swap(x, y);
}
mc._x = x * spacing;
mc._y = y * spacing;
xPos = (x * spacing) + 20;
yPos = (y * spacing) + 20;
speedStep = 2;
speed = speedArr[speedStep];
liveOnTrig = true;
statusType = "normal";
statusOnChange = false;
if (!gameEndTrig) {
motionChange("start");
resetItemData();
setMcInit();
} else {
setStatus("win");
}
}
function die() {
clearInterval(keyOffinterval);
removeKeyControl();
removeMcInit();
failCheck();
}
function rebirthCheck() {
setLifeData(-1);
rootMc.visualLife(true, life);
if (getLifeData() < 0) {
remove();
} else {
rootMc.gSound.start("rebirthSound");
birth();
}
}
function failCheck() {
if (getLifeData() <= 0) {
rootMc.gameEnd(false);
}
}
function setMcInit() {
mc.path = this;
mc.onAniFinished = function (type) {
if (type == "start") {
this.path.rootMc.charMap.setData(this.path.x, this.path.y, this.path.type, this.path);
this.path.setStatus("normal");
this.path.setKeyControl();
this.onEnterFrame = function () {
this.path.process();
};
} else if (type == "escape") {
this.path.setStatus("normal");
} else if (type == "dead") {
this.path.die();
this.path.setStatus("lose");
} else if (type == "rideOut") {
this.path.setStatus("normal");
} else if (type == "rideChange") {
if (this.path.statusType == "fastRide") {
this.path.setStatus("slowRide");
} else if (this.path.statusType == "slowRide") {
this.path.setStatus("fastRide");
}
} else if (type == "dropItems") {
this.path.rootMc.map.dropItems(this.path.x, this.path.y, this.path.itemArr);
} else if (type == "lose") {
this.path.rebirthCheck();
} else if (type == "shieldOff") {
this.path.removeShield();
}
};
}
function removeMcInit() {
mc.onEnterFrame = null;
}
function setKeyControl() {
Key.removeListener(keyListener);
keyListener.path = this;
keyListener.onKeyDown = function () {
if (!this.path.statusOnChange) {
if (Key.isDown(32)) {
this.path.setBomb();
} else if (Key.isDown(49)) {
if (this.path.statusType == "slowRide") {
if (game.Player.getCanData() > 0) {
this.path.rootMc.gSound.start("canSound");
game.Player.setCanData(-1);
this.path.rootMc.visualItem(true, "can", game.Player.can);
this.path.motionChange("slideRide");
}
}
} else if (Key.isDown(50)) {
if (this.path.statusType == "jail") {
if (game.Player.getNiddleData() > 0) {
game.Player.setNiddleData(-1);
this.path.rootMc.visualItem(true, "niddle", game.Player.niddle);
this.path.motionChange("escape");
}
}
} else if (Key.isDown(51)) {
if (!this.shieldOnTrig) {
if (((this.path.statusType != "jail") and (this.path.statusType != "win")) and (this.path.statusType != "lose")) {
if (game.Player.getShieldData() > 0) {
this.path.rootMc.gSound.start("shieldSetSound");
game.Player.setShieldData(-1);
this.path.rootMc.visualItem(true, "shield", game.Player.shield);
this.path.setShield();
}
}
}
}
}
};
Key.addListener(keyListener);
}
function removeKeyControl() {
Key.removeListener(keyListener);
}
function setStatus(type) {
if (type != statusType) {
var _local3 = statusType;
statusType = type;
if (type == "normal") {
setSpeed(2);
motionChange("stand");
} else if (type == "jail") {
setSpeed(0);
motionChange("jail");
} else if (type == "fastRide") {
setSpeed(4);
keyPressSave = (((keyPressSave == null) or (keyPressSave == undefined)) ? "down" : (keyPressSave));
if (_local3 != "slowRide") {
statusOnceTrig = true;
}
motionChange(keyPressSave);
} else if (type == "slowRide") {
setSpeed(1);
keyPressSave = (((keyPressSave == null) or (keyPressSave == undefined)) ? "down" : (keyPressSave));
if (_local3 != "fastRide") {
statusOnceTrig = true;
}
motionChange(keyPressSave);
} else if (type == "win") {
statusOnChange = true;
removeMcInit();
removeKeyControl();
motionChange("win");
} else if (type == "lose") {
liveOnTrig = false;
statusOnChange = true;
removeMcInit();
removeKeyControl();
motionChange("lose");
}
}
}
function motionChange(type) {
if (!statusOnChange) {
if (((statusType == "normal") or (statusType == "fastRide")) or (statusType == "slowRide")) {
if ((type != null) and (type != undefined)) {
clearInterval(keyOffinterval);
}
if ((((type == "left") or (type == "right")) or (type == "up")) or (type == "down")) {
keyOffTrig = false;
var _local3 = ((statusType == "normal") ? "" : (statusType));
mc.gotoAndStop((_local3 + type) + "L");
mc.subAniM.play();
} else if (type == "start") {
mc.gotoAndStop("startL");
} else if (type == "stand") {
mc.gotoAndStop("standL");
} else if (type == "rideOut") {
if ((statusType == "fastRide") or (statusType == "slowRide")) {
mc.subAniM.frameName = "out";
mc.subAniM.loopEndTrig = true;
mc.subAniM.gotoAndPlay("outL");
}
} else if (type == "slideRide") {
if ((statusType == "fastRide") or (statusType == "slowRide")) {
mc.subAniM.frameName = "change";
mc.subAniM.loopEndTrig = true;
mc.subAniM.gotoAndPlay("changeL");
}
} else {
if (statusType == "normal") {
if (!keyOffTrig) {
keyOffTrig = true;
clearInterval(keyOffinterval);
keyOffinterval = setInterval(this, "motionChange", keyOffSec, "stand");
}
}
if (statusType == "normal") {
mc.subAniM.gotoAndStop(1);
} else if ((statusType == "fastRide") or (statusType == "slowRide")) {
mc.subAniM.gotoAndStop("loopL");
}
}
} else {
clearInterval(keyOffinterval);
if (type == "jail") {
mc.gotoAndStop("jailL");
} else if (type == "escape") {
mc.subAniM.frameName = "escape";
mc.subAniM.loopEndTrig = true;
mc.subAniM.gotoAndPlay("escapeL");
} else if (type == "dead") {
mc.subAniM.frameName = "dead";
mc.subAniM.loopEndTrig = true;
mc.subAniM.gotoAndPlay("deadL");
}
}
} else if (type == "win") {
mc.gotoAndStop("winL");
} else if (type == "lose") {
mc.gotoAndStop("loseL");
}
}
function setSpeed(speedStep) {
this.speedStep = speedStep;
speed = speedArr[speedStep];
var _local7 = Math.floor((xPos - 20) / spacing);
var _local6 = Math.floor((yPos - 20) / spacing);
var _local2 = (xPos - (_local7 * spacing)) - 20;
var _local3 = (yPos - (_local6 * spacing)) - 20;
var _local4 = Math.floor(_local2 / speed);
var _local5 = Math.floor(_local3 / speed);
xPos = xPos - (_local2 - (_local4 * speed));
yPos = yPos - (_local3 - (_local5 * speed));
}
function speedUp() {
speedStep = ((speedStep <= 2) ? 2 : (speedStep));
speedStep++;
speedStep = ((speedStep >= 4) ? 4 : (speedStep));
setSpeed(speedStep);
}
function getItem(x, y) {
var _local2 = rootMc.map.getData(x, y);
if (!statusOnChange) {
if (_local2.type == "fire") {
fireContactTrig = true;
if (!shieldOnTrig) {
if (statusType == "normal") {
setStatus("jail");
} else if ((statusType == "slowRide") or (statusType == "fastRide")) {
motionChange("rideOut");
}
}
} else if (_local2.type == "shelterBlock") {
fireContactTrig = true;
if (!shieldOnTrig) {
if (_local2.explosionTrig) {
if (statusType == "normal") {
setStatus("jail");
} else if ((statusType == "slowRide") or (statusType == "fastRide")) {
motionChange("rideOut");
}
}
}
} else {
fireContactTrig = false;
if (_local2.type == "item") {
if (_local2.typeName == "slowTurtle") {
if (statusType == "normal") {
setStatus("slowRide");
}
} else if (_local2.typeName == "fastTurtle") {
if (statusType == "normal") {
setStatus("fastRide");
}
} else if (_local2.typeName == "bomb") {
setBombTotal(true);
setBombData(1);
} else if (_local2.typeName == "power") {
setPower(1);
} else if (_local2.typeName == "speed") {
if (statusType == "normal") {
speedUp();
}
} else if (_local2.typeName == "niddle") {
setNiddleData(1);
rootMc.visualItem(true, "niddle", niddle);
} else if (_local2.typeName == "shield") {
setShieldData(1);
rootMc.visualItem(true, "shield", shield);
} else if (_local2.typeName == "can") {
setCanData(1);
rootMc.visualItem(true, "can", can);
} else if (_local2.typeName == "coinGold") {
addCoin(5);
} else if (_local2.typeName == "coinSilver") {
addCoin(2);
} else if (_local2.typeName == "coinBronze") {
addCoin(1);
}
updateItemData(_local2.typeName);
rootMc.gSound.start("itemGetSound");
_local2.remove();
}
}
}
}
function updateItemData(type) {
itemArr.push(type);
}
function resetItemData() {
itemArr = new Array();
power = 1;
bombTotal = 1;
bomb = 1;
}
function setPower(power) {
this.power = this.power + power;
this.power = ((this.power <= 1) ? 1 : (this.power));
}
function getPower() {
return(power);
}
function setBombData(num) {
bomb = bomb + num;
if (bomb >= bombTotal) {
bomb = bombTotal;
} else if (bomb <= 0) {
bomb = 0;
}
}
function getBombData() {
return(bomb);
}
function setBombTotal(bool) {
if (bool) {
bombTotal++;
} else {
bombTotal = 0;
}
}
function getBombTotal() {
return(bombTotal);
}
function setBomb() {
if ((statusType != "jail") and (getBombData() > 0)) {
rootMc.map.setBomb(x, y, this);
}
}
static function setCanData(num) {
can = can + num;
if (can <= 0) {
can = 0;
} else if (can >= canMax) {
can = canMax;
}
}
static function getCanData() {
return(can);
}
static function resetCanData(clearTrig) {
if (clearTrig) {
if (can <= canBasic) {
can = canBasic;
}
} else {
can = canBasic;
}
}
static function setNiddleData(num) {
niddle = niddle + num;
if (niddle <= 0) {
niddle = 0;
} else if (niddle >= niddleMax) {
niddle = niddleMax;
}
}
static function getNiddleData() {
return(niddle);
}
static function resetNiddleData(clearTrig) {
if (clearTrig) {
if (niddle <= niddleBasic) {
niddle = niddleBasic;
}
} else {
niddle = niddleBasic;
}
}
static function setShieldData(num) {
shield = shield + num;
if (shield <= 0) {
shield = 0;
} else if (shield >= shieldMax) {
shield = shieldMax;
}
}
static function getShieldData() {
return(shield);
}
static function resetShieldData(clearTrig) {
if (clearTrig) {
if (shield <= shieldBasic) {
shield = shieldBasic;
}
} else {
shield = shieldBasic;
}
}
function setShield() {
if (!shieldOnTrig) {
shieldOnTrig = true;
mc.shieldM.shieldOn();
}
}
function removeShield() {
shieldOnTrig = false;
}
function addCoin(score) {
rootMc.addCoin(score);
}
function process() {
if (!statusOnChange) {
if (liveOnTrig) {
moveCheck();
positionChange(x, y);
motionChange(keyPress);
if (statusType == "jail") {
otherPlayerCheck();
} else {
getItem(x, y);
}
visible(x, y);
monsterCheck(x, y);
updateMapInfo();
}
}
}
function moveCheck() {
keyPressSave = ((keyPress != null) ? (keyPress) : (keyPressSave));
keyPress = null;
xs = Math.floor(xPos / spacing);
ys = Math.floor(yPos / spacing);
var _local10 = rootMc.map.getData(xs, ys);
if (Key.isDown(37)) {
keyPress = "left";
if ((_local10.type != "shelterBlock") and ((xPos - speed) >= 20)) {
xPos = xPos - speed;
}
} else if (Key.isDown(39)) {
keyPress = "right";
if ((_local10.type != "shelterBlock") and ((xPos + speed) <= (((col - 1) * spacing) + 20))) {
xPos = xPos + speed;
}
} else if (Key.isDown(38)) {
keyPress = "up";
yPos = yPos - speed;
} else if (Key.isDown(40)) {
keyPress = "down";
yPos = yPos + speed;
}
var _local9 = Math.floor((yPos + 19) / spacing);
var _local6 = Math.floor((yPos - 19) / spacing);
var _local7 = Math.floor((xPos - 19) / spacing);
var _local8 = Math.floor((xPos + 19) / spacing);
var _local2 = rootMc.map.getData(_local7, _local6);
var _local4 = rootMc.map.getData(_local8, _local6);
var _local3 = rootMc.map.getData(_local7, _local9);
var _local5 = rootMc.map.getData(_local8, _local9);
if (_local2.movable and _local4.movable) {
} else if ((_local2.type == "bomb") or (_local4.type == "bomb")) {
if ((_local2.y != y) or (_local4.y != y)) {
if ((_local2.y < (row - 1)) and (_local4.y < (row - 1))) {
yPos = yPos + speed;
}
}
} else if ((_local2.type == "movableBlock") and (_local4.type == "movableBlock")) {
if (!_local2.move(_local2.x, _local2.y - 1)) {
yPos = yPos + speed;
}
} else if ((_local2.type == "shelterBlock") and (_local4.type == "shelterBlock")) {
} else {
yPos = yPos + speed;
}
if (_local3.movable and _local5.movable) {
} else if ((_local3.type == "bomb") or (_local5.type == "bomb")) {
if ((_local3.y != y) or (_local5.y != y)) {
if ((_local3.y > 1) and (_local5.y > 1)) {
yPos = yPos - speed;
}
}
} else if ((_local3.type == "movableBlock") and (_local5.type == "movableBlock")) {
if (!_local3.move(_local3.x, _local3.y + 1)) {
yPos = yPos - speed;
}
} else if ((_local3.type == "shelterBlock") and (_local5.type == "shelterBlock")) {
} else {
yPos = yPos - speed;
}
if (_local2.movable and _local3.movable) {
} else if ((_local2.type == "bomb") or (_local3.type == "bomb")) {
if ((_local2.x != x) or (_local3.x != x)) {
if ((_local2.x < (col - 1)) and (_local3.x < (col - 1))) {
xPos = xPos + speed;
}
}
} else if ((_local2.type == "movableBlock") and (_local3.type == "movableBlock")) {
if (!_local2.move(_local2.x - 1, _local2.y)) {
xPos = xPos + speed;
}
} else {
xPos = xPos + speed;
}
if (_local4.movable and _local5.movable) {
} else if ((_local4.type == "bomb") or (_local5.type == "bomb")) {
if ((_local4.x != x) or (_local5.x != x)) {
if ((_local4.x > 1) and (_local5.x > 1)) {
xPos = xPos - speed;
}
}
} else if ((_local4.type == "movableBlock") and (_local5.type == "movableBlock")) {
if (!_local4.move(_local4.x + 1, _local4.y)) {
xPos = xPos - speed;
}
} else {
xPos = xPos - speed;
}
x = Math.floor(xPos / spacing);
y = Math.floor(yPos / spacing);
}
function positionChange(x, y) {
mc._x = xPos - 20;
mc._y = yPos - 20;
swap(x, y);
}
function swap(x, y) {
depth = rootMc.charMap.getSwap(x, y, depthMargin);
mc.swapDepths(depth);
mc.win10.text = depth;
}
function visible(x, y) {
var _local2 = rootMc.map.getData(x, y);
if ((_local2.type == "hiddenBlock") or (_local2.type == "shelterBlock")) {
_local2.checkOn(type, this);
mc._visible = false;
} else {
mc._visible = true;
}
}
function updateMapInfo() {
if ((x != xs) or (y != ys)) {
rootMc.charMap.setData(x, y, type, this);
rootMc.charMap.setData(xs, ys, type, null);
xs = x;
ys = y;
if (!liveOnTrig) {
rootMc.charMap.setData(x, y, type, null);
rootMc.charMap.setData(xs, ys, type, null);
}
}
}
function otherPlayerCheck() {
var _local6;
var _local4 = false;
var _local5;
var _local2 = new Object();
var _local3 = 1;
while (_local3 <= 2) {
if (!_local4) {
_local5 = "enermy" + _local3;
_local2 = rootMc.charMap.getData(x, y, _local5);
if ((((_local2 != null) and (_local2 != undefined)) and (_local2.statusType != "jail")) and _local2.liveOnTrig) {
_local4 = true;
break;
}
}
_local3++;
}
if (_local4) {
liveOnTrig = false;
motionChange("dead");
}
}
function monsterCheck(x, y) {
var _local2 = rootMc.charMap.getData(x, y, "monster");
if (!statusOnChange) {
if (_local2.type == "monster") {
monsterContactTrig = true;
if (!shieldOnTrig) {
liveOnTrig = false;
rootMc.gSound.start("bubbleDieSound");
statusOnChange = true;
die();
setStatus("lose");
}
} else {
monsterContactTrig = false;
}
}
}
function remove() {
clearInterval(keyOffinterval);
mc.onEnterFrame = null;
mc.removeMovieClip();
rootMc.charMap.setData(x, y, type, null);
rootMc.charMap.setData(xs, ys, type, null);
}
static var eastEggTrig = false;
static var life = 3;
static var lifeBasic = 3;
static var lifeMax = 9;
static var can = 1;
static var canBasic = 1;
static var canMax = 9;
static var niddle = 1;
static var niddleBasic = 1;
static var niddleMax = 9;
static var shield = 1;
static var shieldBasic = 1;
static var shieldMax = 9;
var type = "player";
var linkageName = "playerM";
var depthMargin = 5;
var speedStep = 2;
var speedArr = [1, 2, 4, 5, 8];
var keyOffSec = 2000;
var keyOffTrig = false;
var keyListener = new Object();
var liveOnTrig = true;
var statusType = "normal";
var statusOnceTrig = true;
var statusOnChange = false;
var itemArr = new Array();
var power = 1;
var bombTotal = 1;
var bomb = 1;
var shieldOnTrig = false;
var fireContactTrig = false;
var monsterContactTrig = false;
var gameEndTrig = false;
}
Symbol 58 MovieClip Frame 8
stop();
this._parent.gotoAndStop("flashL");
Symbol 75 MovieClip Frame 8
if (!this._parent.loopTrig) {
this._parent._parent.onAniFinished("shieldOff");
this._parent.gotoAndStop("offL");
}
Symbol 76 MovieClip Frame 1
function shieldOn() {
clearInterval(shieldInterval);
shieldInterval = setInterval(this, "shieldOff", shieldSec);
loopTrig = true;
this.gotoAndStop("onL");
}
function shieldOff() {
clearInterval(shieldInterval);
loopTrig = false;
}
var shieldInterval;
var shieldSec = 2800;
var loopTrig = false;
this.gotoAndStop("offL");
Symbol 79 MovieClip Frame 1
if (game.Player.getEastEggData()) {
this.gotoAndStop("onL");
} else {
this.gotoAndStop("offL");
}
Symbol 79 MovieClip Frame 20
this.onPress = function () {
this.gotoAndStop("offL");
this.onPress = null;
};
Symbol 100 MovieClip Frame 78
stop();
this._parent.onAniFinished("start");
Symbol 174 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 174 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 174 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 174 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 174 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 174 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 174 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 189 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 189 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 189 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 189 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 189 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 189 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 189 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 204 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 204 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 204 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 204 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 204 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 204 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 204 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 219 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 219 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 219 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 219 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 219 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 219 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 219 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 229 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 229 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 229 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 229 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 229 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 229 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 229 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 239 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 239 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 239 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 239 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 239 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 239 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 239 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 249 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 249 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 249 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 249 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 249 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 249 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 249 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 259 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 259 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 259 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 259 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 259 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 259 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 259 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 288 MovieClip Frame 1
function move(bool) {
if (bool) {
this.intYPos = 0;
this.moveCount = 0;
this.yPosMax = 3;
this.onEnterFrame = function () {
this.moveCount++;
this._y = this.intYPos + (Math.sin(((10 * this.moveCount) * Math.PI) / 180) * this.yPosMax);
if ((this.moveCount % 30) == 0) {
this.path.rootMc.gSound.start("bubbleLockSound");
}
};
} else {
this.onEnterFrame = null;
this.moveCount = 0;
this._y = 0;
}
}
function timeOn(bool) {
if (bool) {
var owner = this;
timeTween = new mx.transitions.Tween(bubbleM, "_alpha", mx.transitions.easing.Regular.easeOut, 50, 100, 210);
timeTween.onMotionFinished = function () {
owner.gotoAndPlay("deadL");
};
} else {
timeTween.stop();
}
}
var path = this._parent.path;
var onceTrig = true;
var loopEndTrig = false;
var frameName = "dead";
var timeTween;
this._parent.path.statusOnChange = true;
if (!this.path.liveOnTrig) {
this.gotoAndPlay(frameName + "L");
} else {
this.path.rootMc.gSound.start("bubbleLockSound");
}
Symbol 288 MovieClip Frame 11
if (this.onceTrig) {
this.onceTrig = false;
this.move(true);
this.timeOn(true);
this.path.statusOnChange = false;
this._name = "subAniM";
}
Symbol 288 MovieClip Frame 22
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this.gotoAndPlay(this.frameName + "L");
}
Symbol 288 MovieClip Frame 31
this.path.rootMc.gSound.start("bubbleEscSound");
this.path.statusOnChange = true;
this._name = null;
this.move(false);
this.timeOn(false);
Symbol 288 MovieClip Frame 45
stop();
this.path.statusOnChange = false;
this._parent.onAniFinished("escape");
Symbol 288 MovieClip Frame 51
this.path.rootMc.gSound.start("bubbleDieSound");
this.path.statusOnChange = true;
this._name = null;
this.move(false);
Symbol 288 MovieClip Frame 62
stop();
this._parent.onAniFinished("dead");
Symbol 293 MovieClip Frame 105
stop();
this._parent.onAniFinished("win");
Symbol 316 MovieClip Frame 25
this._parent.onAniFinished("dropItems");
Symbol 316 MovieClip Frame 84
stop();
this._parent.onAniFinished("lose");
Symbol 317 MovieClip [playerM] Frame 1
Symbol 328 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 346 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 354 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 372 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 394 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 395 MovieClip [obstacleM] Frame 1
function open() {
this.gotoAndStop(("s" + this.typeNum) + "L");
this.subM.gotoAndStop(this.typeName + "L");
}
function remove() {
this.removeMovieClip();
}
var typeNum;
var typeName;
this.open();
Symbol 412 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 412 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 413 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 432 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 432 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 433 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 450 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 450 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 451 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 452 MovieClip [movableBlockM] Frame 1
function open() {
this.gotoAndStop(("s" + this.typeNum) + "L");
this.subM.gotoAndStop(this.typeName + "L");
}
var typeNum;
var typeName;
this.open();
Symbol 473 MovieClip Frame 13
stop();
this._parent.onAniFinished();
Symbol 474 MovieClip Frame 1
var path = this._parent._parent;
this.gotoAndStop("offL");
Symbol 474 MovieClip Frame 20
if (this._parent._parent.path.explosionTrig) {
this.gotoAndStop("fireL");
}
Symbol 474 MovieClip Frame 26
if (this._parent._parent.path.explosionTrig) {
this.gotoAndStop("fireL");
} else {
this.gotoAndStop("offL");
}
Symbol 474 MovieClip Frame 30
if (this._parent._parent.path.explosionTrig) {
this.gotoAndStop("fireL");
}
Symbol 474 MovieClip Frame 36
if (this._parent._parent.path.explosionTrig) {
this.gotoAndStop("fireL");
} else {
this.gotoAndStop("offL");
}
Symbol 475 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 476 MovieClip [hiddenBlockM] Frame 1
function open() {
this.gotoAndStop(("s" + this.typeNum) + "L");
this.subM.gotoAndStop(this.typeName + "L");
}
function remove() {
this.removeMovieClip();
}
var typeNum;
var typeName;
this.open();
Symbol 487 MovieClip Frame 13
stop();
this._parent.onAniFinished();
Symbol 506 MovieClip Frame 13
stop();
this._parent.onAniFinished();
Symbol 507 MovieClip [fireM] Frame 1
function open() {
this.gotoAndStop(this.typeName + "L");
}
var typeName;
this.open();
Symbol 516 MovieClip Frame 20
this.gotoAndPlay(1);
Symbol 517 MovieClip [bombM] Frame 1
this.gotoAndStop("offL");
Symbol 534 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 534 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 551 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 551 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 552 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 569 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 569 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 570 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 587 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 587 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 604 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 604 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 621 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 621 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 622 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 639 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 639 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 656 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 656 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 657 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 674 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 674 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 691 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 691 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 708 MovieClip Frame 1
this.gotoAndStop("offL");
Symbol 708 MovieClip Frame 28
this._parent._parent.onAniFinished();
Symbol 709 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 710 MovieClip [blockM] Frame 1
function open() {
this.gotoAndStop(("s" + this.typeNum) + "L");
this.subM.gotoAndStop(this.typeName + "L");
}
var typeNum;
var typeName;
this.open();
Symbol 717 MovieClip Frame 1
var path = this._parent._parent;
this.gotoAndStop("offL");
Symbol 717 MovieClip Frame 26
this.gotoAndStop("offL");
Symbol 724 MovieClip Frame 1
var path = this._parent._parent;
this.gotoAndStop("offL");
Symbol 724 MovieClip Frame 26
this.gotoAndStop("offL");
Symbol 731 MovieClip Frame 1
var path = this._parent._parent;
this.gotoAndStop("offL");
Symbol 731 MovieClip Frame 26
this.gotoAndStop("offL");
Symbol 732 MovieClip Frame 1
var name = this._parent.typeName;
this.gotoAndStop(this.name + "L");
Symbol 733 MovieClip [shelterBlockM] Frame 1
function open() {
this.gotoAndStop(("s" + this.typeNum) + "L");
this.subM.gotoAndStop(this.typeName + "L");
}
function remove() {
this.removeMovieClip();
}
var typeNum;
var typeName;
this.open();
Symbol 744 MovieClip Frame 1
var numV = this._parent.typeNumV;
this.gotoAndStop(("s" + this.numV) + "L");
Symbol 747 MovieClip Frame 1
var numV = this._parent.typeNumV;
this.gotoAndStop(("s" + this.numV) + "L");
Symbol 752 MovieClip Frame 1
var numV = this._parent.typeNumV;
this.gotoAndStop(("s" + this.numV) + "L");
Symbol 757 MovieClip Frame 1
var numV = this._parent.typeNumV;
this.gotoAndStop(("s" + this.numV) + "L");
Symbol 764 MovieClip Frame 1
var numV = this._parent.typeNumV;
this.gotoAndStop(("s" + this.numV) + "L");
Symbol 765 MovieClip [tileM] Frame 1
function open() {
this.gotoAndStop(("s" + this.level) + "L");
this.subM.gotoAndStop(("s" + this.typeNum) + "L");
}
function remove() {
this.removeMovieClip();
}
var level;
var typeNum;
this.open();
Symbol 782 MovieClip Frame 1
var path = this._parent.path;
this.path.statusOnChange = true;
this.path.rootMc.gSound.start("batCreateSound");
Symbol 782 MovieClip Frame 24
stop();
this._parent._parent.path.statusOnChange = false;
this._parent._parent.onAniFinished("start");
Symbol 825 MovieClip Frame 1
var path = this._parent.path;
this.path.statusOnChange = true;
this.path.rootMc.gSound.start("batDieSound");
Symbol 825 MovieClip Frame 24
stop();
this._parent._parent.path.statusOnChange = false;
this._parent._parent.onAniFinished("end");
Symbol 826 MovieClip Frame 1
var path = this._parent.path;
this.gotoAndStop("startL");
Symbol 847 MovieClip Frame 1
var path = this._parent.path;
this.path.statusOnChange = true;
this.path.rootMc.gSound.start("mummyCreateSound");
Symbol 847 MovieClip Frame 30
stop();
this._parent._parent.path.statusOnChange = false;
this._parent._parent.onAniFinished("start");
Symbol 898 MovieClip Frame 1
var path = this._parent.path;
this.path.statusOnChange = true;
this.path.rootMc.gSound.start("mummyDieSound");
Symbol 898 MovieClip Frame 20
stop();
this._parent._parent.path.statusOnChange = false;
this._parent._parent.onAniFinished("end");
Symbol 899 MovieClip Frame 1
var path = this._parent.path;
this.gotoAndStop("startL");
Symbol 918 MovieClip Frame 1
var path = this._parent.path;
this.path.statusOnChange = true;
this.path.rootMc.gSound.start("mummyCreateSound");
Symbol 918 MovieClip Frame 30
stop();
this._parent._parent.path.statusOnChange = false;
this._parent._parent.onAniFinished("start");
Symbol 971 MovieClip Frame 1
var path = this._parent.path;
this.path.statusOnChange = true;
this.path.rootMc.gSound.start("mummyDieSound");
Symbol 971 MovieClip Frame 20
stop();
this._parent._parent.path.statusOnChange = false;
this._parent._parent.onAniFinished("end");
Symbol 972 MovieClip Frame 1
var path = this._parent.path;
this.gotoAndStop("startL");
Symbol 973 MovieClip [monsterM] Frame 1
function open() {
this.gotoAndStop(this.typeName + "L");
}
var typeName;
this.open();
Symbol 1048 MovieClip [itemM] Frame 1
function open() {
this.gotoAndStop(this.typeName + "L");
this.move(true);
}
function remove() {
this.removeMovieClip();
}
function move(bool) {
var _local2 = this.subM;
if (bool) {
_local2.intYPos = _local2._y;
_local2.moveCount = 0;
_local2.yPosMax = 3;
_local2.onEnterFrame = function () {
this.moveCount++;
this._y = this.intYPos + (Math.sin(((10 * this.moveCount) * Math.PI) / 180) * this.yPosMax);
};
} else {
_local2.onEnterFrame = null;
}
}
var typeName;
this.open();
Symbol 1071 MovieClip Frame 75
stop();
this._parent.onAniFinished("start");
Symbol 1138 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 1138 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1138 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1138 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1138 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 1138 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1138 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 1148 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 1148 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1148 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1148 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1148 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 1148 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1148 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 1158 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 1158 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1158 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1158 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1158 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 1158 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1158 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 1168 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 1168 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1168 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1168 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1168 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 1168 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1168 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 1173 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 1173 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1173 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1173 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1173 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 1173 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1173 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 1178 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 1178 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1178 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1178 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1178 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 1178 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1178 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 1183 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 1183 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1183 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1183 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1183 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 1183 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1183 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 1188 MovieClip Frame 1
var onceTrig = true;
var loopEndTrig = false;
var frameName;
if (!this._parent.path.statusOnceTrig) {
this.gotoAndPlay("loopL");
} else {
this._parent.path.statusOnChange = true;
}
Symbol 1188 MovieClip Frame 16
if (this.onceTrig) {
this.onceTrig = false;
this._name = "subAniM";
this._parent.path.statusOnceTrig = false;
this._parent.path.statusOnChange = false;
}
if (this.loopEndTrig) {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1188 MovieClip Frame 34
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this._name = null;
this.gotoAndPlay(frameName + "L");
}
Symbol 1188 MovieClip Frame 40
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1188 MovieClip Frame 55
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideOut");
Symbol 1188 MovieClip Frame 75
this._name = null;
this._parent.path.statusOnChange = true;
Symbol 1188 MovieClip Frame 106
stop();
this._parent.path.statusOnChange = false;
this._parent.onAniFinished("rideChange");
Symbol 1197 MovieClip Frame 1
function move(bool) {
if (bool) {
this.intYPos = 0;
this.moveCount = 0;
this.yPosMax = 3;
this.onEnterFrame = function () {
this.moveCount++;
this._y = this.intYPos + (Math.sin(((10 * this.moveCount) * Math.PI) / 180) * this.yPosMax);
if ((this.moveCount % 30) == 0) {
}
};
} else {
this.onEnterFrame = null;
this.moveCount = 0;
this._y = 0;
}
}
function timeOn(bool) {
if (bool) {
var owner = this;
timeTween = new mx.transitions.Tween(bubbleM, "_alpha", mx.transitions.easing.Regular.easeOut, 50, 100, 210);
timeTween.onMotionFinished = function () {
owner.gotoAndPlay("deadL");
};
} else {
timeTween.stop();
}
}
var path = this._parent.path;
var onceTrig = true;
var loopEndTrig = false;
var frameName = "dead";
var timeTween;
this.path.statusOnChange = true;
Symbol 1197 MovieClip Frame 10
if (this.onceTrig) {
this.onceTrig = false;
this.move(true);
this.timeOn(true);
this.path.statusOnChange = false;
this._name = "subAniM";
}
Symbol 1197 MovieClip Frame 21
if (!this.loopEndTrig) {
this.gotoAndPlay("loopL");
} else {
this.gotoAndPlay(this.frameName + "L");
}
Symbol 1197 MovieClip Frame 30
this.path.rootMc.gSound.start("bubbleEscSound");
this.path.statusOnChange = true;
this._name = null;
this.move(false);
this.timeOn(false);
Symbol 1197 MovieClip Frame 44
stop();
this.path.statusOnChange = false;
this._parent.onAniFinished("escape");
Symbol 1197 MovieClip Frame 50
this.path.rootMc.gSound.start("bubbleDieSound");
this.path.statusOnChange = true;
this._name = null;
this.move(false);
Symbol 1197 MovieClip Frame 61
stop();
this._parent.onAniFinished("dead");
Symbol 1202 MovieClip Frame 144
stop();
this._parent.onAniFinished("win");
Symbol 1225 MovieClip Frame 25
this._parent.onAniFinished("dropItems");
Symbol 1225 MovieClip Frame 76
stop();
this._parent.onAniFinished("lose");
Symbol 1226 MovieClip [enermyM] Frame 1
this.gotoAndStop("startL");
Symbol 1253 MovieClip Frame 1
var path = this._parent;
Symbol 1253 MovieClip Frame 181
path.gSound.start("introSound");
Symbol 1253 MovieClip Frame 196
this.btn_gameHelp.enabled = false;
Symbol 1253 MovieClip Frame 198
this.btn_gameStart.enabled = false;
Symbol 1253 MovieClip Frame 208
stop();
this.btn_gameHelp.enabled = true;
this.btn_gameHelp.onPress = function () {
this._parent._parent.gotoAndStop("helpL");
};
this.btn_gameStart.enabled = true;
this.btn_gameStart.onPress = function () {
this._parent._parent.gSound.stop("introSound");
this._parent._parent.gameDataReset(false);
this._parent._parent.gotoAndStop("gameL");
};
Symbol 1266 MovieClip Frame 1
this.onPress = function () {
game.Player.setEastEggData(true);
this.onPress = null;
};
Symbol 1267 MovieClip Frame 33
this.btn_gameStart.enabled = false;
Symbol 1267 MovieClip Frame 43
stop();
this.btn_gameStart.enabled = true;
this.btn_gameStart.onPress = function () {
this._parent._parent.gSound.stop("introSound");
this._parent._parent.gameDataReset(false);
this._parent._parent.gotoAndStop("gameL");
};
Symbol 1320 MovieClip Frame 1
var path = this._parent.path;
Symbol 1320 MovieClip Frame 31
this.path.gSound.start("startSound");
Symbol 1320 MovieClip Frame 35
stop();
this._parent.path.visualPopup(false);
Symbol 1327 MovieClip Frame 1
var path = this._parent.path;
Symbol 1327 MovieClip Frame 2
this.path.gSound.start("winSound");
Symbol 1327 MovieClip Frame 41
stop();
Symbol 1334 MovieClip Frame 1
var path = this._parent.path;
Symbol 1334 MovieClip Frame 2
this.path.gSound.start("loseSound");
Symbol 1334 MovieClip Frame 40
stop();
Symbol 1335 MovieClip Frame 1
var path = this._parent;
Symbol 1373 MovieClip Frame 1
function show(num) {
var _local5 = String(num);
var _local6 = _local5.length;
if (_local6 < len) {
var _local2 = 1;
while (_local2 <= (len - _local6)) {
_local5 = "x" + _local5;
_local2++;
}
}
var _local7 = _local5.split("");
var _local2 = len;
while (_local2 >= 1) {
var _local3 = this["numberM" + _local2];
var _local4 = _local7[_local2 - 1];
if (_local4 != "x") {
_local3._visible = true;
_local3.gotoAndStop(("s" + _local4) + "L");
} else {
_local3._visible = false;
}
_local2--;
}
this._visible = true;
}
var len = 5;
this._visible = false;
Symbol 1374 MovieClip Frame 1
function calSec(frames) {
totalSec = Math.floor(frames / fps);
sec = totalSec % 60;
min = Math.floor(totalSec / 60);
}
function show(num) {
calSec(num);
var _local7 = 2;
var _local6 = String(min);
if (_local6.length < 2) {
_local6 = "0" + _local6;
}
var _local5 = _local6.split("");
var _local2 = 1;
while (_local2 <= 2) {
var _local3 = this["minM" + _local2];
var _local4 = _local5[_local2 - 1];
_local3.gotoAndStop(("s" + _local4) + "L");
_local2++;
}
_local6 = String(sec);
if (_local6.length < 2) {
_local6 = "0" + _local6;
}
_local5 = _local6.split("");
_local2 = 1;
while (_local2 <= 2) {
var _local3 = this["secM" + _local2];
var _local4 = _local5[_local2 - 1];
_local3.gotoAndStop(("s" + _local4) + "L");
_local2++;
}
this._visible = true;
}
var totalSec;
var min;
var sec;
var fps = 60;
this._visible = false;
Symbol 1396 MovieClip Frame 1
function show(num) {
var _local5 = String(num);
var _local6 = _local5.length;
if (_local6 < len) {
var _local2 = 1;
while (_local2 <= (len - _local6)) {
_local5 = "x" + _local5;
_local2++;
}
}
var _local7 = _local5.split("");
var _local2 = len;
while (_local2 >= 1) {
var _local3 = this["numberM" + _local2];
var _local4 = _local7[_local2 - 1];
if (_local4 != "x") {
_local3._visible = true;
_local3.gotoAndStop(("s" + _local4) + "L");
} else {
_local3._visible = false;
}
_local2--;
}
this._visible = true;
}
var len = 7;
this._visible = false;
Symbol 1409 MovieClip Frame 1
function show(num) {
this.gotoAndStop(("s" + num) + "L");
}
Symbol 1410 MovieClip Frame 1
var path = this._parent;
var level = path.level;
var gainCoin = path.gainCoin;
var killEnermy = (path.killEnermy + path.killMonster);
var gameSec = path.gameSec;
var levelScore = path.levelScore;
Symbol 1410 MovieClip Frame 2
stop();
this.visualStageM.show(level);
this.numbersM_coin.show(gainCoin);
this.numbersM_time.show(gameSec);
this.numbersM_kill.show(killEnermy);
this.numbersM_score.show(levelScore);
Symbol 1419 MovieClip Frame 1
function show(name) {
this.gotoAndStop(name + "L");
}
Symbol 1424 MovieClip Frame 1
function show(num) {
this.gotoAndStop(("s" + num) + "L");
}
Symbol 1425 MovieClip Frame 1
var path = this._parent;
var bonusName = path.bonusName;
var bonusCount = path.bonusCount;
Symbol 1425 MovieClip Frame 2
stop();
this.viusalSubItemM.show(bonusName);
this.textM.show(bonusCount);
Symbol 1434 MovieClip Frame 1
var path = this._parent.path;
if (this._parent.level < this._parent.levelMax) {
this.gotoAndStop("nextL");
} else {
this.gotoAndStop("rankL");
}
Symbol 1434 MovieClip Frame 10
this.btn_gameNext.onPress = function () {
this._parent.path.gSound.stop("winBGSound");
this._parent.path.gotoAndStop("gameL");
};
Symbol 1434 MovieClip Frame 20
this.btn_gameRank.onPress = function () {
this._parent.path.gSound.stop("winBGSound");
this._parent._parent.gotoAndPlay("rankL");
};
Symbol 1475 MovieClip Frame 1
function show(num) {
this.gotoAndStop(("s" + num) + "L");
}
Symbol 1484 MovieClip Frame 2
this.numberM1.show(game.Player.getLifeData());
this.numberM2.show(game.Player.getCanData());
this.numberM3.show(game.Player.getNiddleData());
this.numberM4.show(game.Player.getShieldData());
stop();
Symbol 1501 MovieClip Frame 1
function show(str) {
this.gotoAndStop(str + "L");
}
Symbol 1502 MovieClip Frame 1
var path = this._parent;
var rankGrade = path.rankGrade;
Symbol 1502 MovieClip Frame 2
stop();
this.textM.show(rankGrade);
Symbol 1509 MovieClip Frame 1
var path = this._parent;
var gameScoreArr = path.path.gameScoreArr.concat();
var totalScore = path.totalScore;
Symbol 1509 MovieClip Frame 2
stop();
var i = 1;
while (i <= 5) {
var mc = this["numbersM" + i];
var num = gameScoreArr[i - 1];
if (num == undefined) {
num = 0;
}
mc.show(num);
i++;
}
this.numbersM_totalScore.show(totalScore);
Symbol 1515 MovieClip Frame 1
function init() {
level = path.gameLevel;
levelMax = path.gameLevelMax;
gainCoin = path.gainCoin;
killEnermy = path["enermyArr" + level].length;
killMonster = path.killMonster;
gameSec = path.gameSec;
selectPage();
}
function selectPage() {
if (game.Player.getLifeData() >= 0) {
this.gotoAndPlay("winL");
} else {
this.gotoAndPlay("loseL");
}
}
function winPageInit() {
path.gSound.start("winBGSound");
var _local1 = new Object();
levelScore = levelScore + gainCoin;
levelScore = levelScore + scoreEnermy(killEnermy);
levelScore = levelScore + scoreMonster(killMonster);
levelScore = levelScore + scoreTime(gameSec);
path.gameScoreArr[level - 1] = levelScore;
bonusCheck(levelScore);
visualWin("WIN");
}
function losePageInit() {
path.gSound.start("loseBGSound");
visualWin("LOSE");
}
function rankPageInit() {
path.gSound.stop("winBGSound");
path.gSound.start("rankBGSound");
totalScore = totalScore + getTotalScore();
totalScore = totalScore + scoreLife(game.Player.getLifeData());
totalScore = totalScore + scoreItem(game.Player.getCanData());
totalScore = totalScore + scoreItem(game.Player.getNiddleData());
totalScore = totalScore + scoreItem(game.Player.getShieldData());
rankGrade = rankCheck(totalScore);
visualWin("RANK");
}
function scoreTime(frame) {
var _local1 = Math.floor(frame / fps);
var _local2;
if ((_local1 >= 0) and (_local1 <= 60)) {
_local2 = 100;
} else if ((_local1 >= 61) and (_local1 <= 120)) {
_local2 = 70;
} else if ((_local1 >= 121) and (_local1 <= 180)) {
_local2 = 50;
} else if (_local1 >= 181) {
_local2 = 30;
}
return(_local2);
}
function scoreEnermy(num) {
return(num * 50);
}
function scoreMonster(num) {
return(num * 10);
}
function scoreItem(num) {
return(num * 10);
}
function scoreLife(num) {
return(num * 50);
}
function getTotalScore() {
var _local2 = 0;
var _local1 = 0;
while (_local1 <= 4) {
if ((path.gameScoreArr[_local1] != undefined) and (path.gameScoreArr[_local1] != null)) {
_local2 = _local2 + path.gameScoreArr[_local1];
}
_local1++;
}
return(_local2);
}
function bonusCheck(score) {
var _local5;
var _local1 = new Object();
var _local3;
var _local4;
if ((score >= 0) and (score <= 100)) {
_local1 = bonusArr[0][0];
} else if ((score >= 101) and (score <= 200)) {
_local5 = random(3);
_local1 = bonusArr[1][_local5];
} else if ((score >= 201) and (score <= 300)) {
_local5 = random(3);
_local1 = bonusArr[2][_local5];
} else if ((score >= 301) and (score <= 500)) {
_local5 = random(3);
_local1 = bonusArr[3][_local5];
} else if (score >= 500) {
_local1 = bonusArr[4][0];
}
_local3 = _local1.name;
_local4 = _local1.count;
bonusName = _local3;
bonusCount = _local4;
if (_local3 == "niddle") {
game.Player.setNiddleData(_local4);
} else if (_local3 == "can") {
game.Player.setCanData(_local4);
} else if (_local3 == "shield") {
game.Player.setShieldData(_local4);
} else if (_local3 == "life") {
game.Player.setLifeData(_local4);
}
}
function rankCheck(score) {
var _local2;
if ((score >= 0) and (score <= 150)) {
_local2 = "F";
} else if ((score >= 151) and (score <= 300)) {
_local2 = "E";
} else if ((score >= 301) and (score <= 500)) {
_local2 = "D";
} else if ((score >= 501) and (score <= 1000)) {
_local2 = "C";
} else if ((score >= 1001) and (score <= 1300)) {
_local2 = "B";
} else if ((score >= 1301) and (score <= 1500)) {
_local2 = "A";
} else if (score >= 1501) {
_local2 = "S";
}
return(_local2);
}
function visualWin(type) {
this.desWin.text = ("page : " + type) + newline;
this.desWin.text = this.desWin.text + "-----------------------------------------------\n";
this.desWin.text = this.desWin.text + (((("coin : " + gainCoin) + " --> ") + gainCoin) + newline);
this.desWin.text = this.desWin.text + (((("killEnermy : " + killEnermy) + " --> ") + scoreEnermy(killEnermy)) + newline);
this.desWin.text = this.desWin.text + (((("killMonster : " + killMonster) + " --> ") + scoreMonster(killMonster)) + newline);
this.desWin.text = this.desWin.text + (((("gameSec : " + gameSec) + " --> ") + scoreTime(gameSec)) + newline);
this.desWin.text = this.desWin.text + "-----------------------------------------------\n";
var _local2 = 0;
while (_local2 <= 4) {
this.desWin.text = this.desWin.text + (((_local2 + " : levelScore : ") + path.gameScoreArr[_local2]) + newline);
_local2++;
}
this.desWin.text = this.desWin.text + "-----------------------------------------------\n";
this.desWin.text = this.desWin.text + (("totalScore : " + totalScore) + newline);
this.desWin.text = this.desWin.text + ("rank : " + rankCheck(totalScore));
this.desWin.text = this.desWin.text + "-----------------------------------------------\n";
this.desWin.text = this.desWin.text + (("bonusName : " + bonusName) + newline);
this.desWin.text = this.desWin.text + (("bonusCount : " + bonusCount) + newline);
}
var path = this._parent;
var level;
var levelMax;
var gainCoin;
var killMonster;
var killEnermy;
var gameSec;
var levelScore = 0;
var totalScore = 0;
var rankGrade;
var bonusName;
var bonusCount;
var bonusArr = [[{name:"niddle", count:1}], [{name:"niddle", count:1}, {name:"can", count:1}, {name:"shield", count:1}], [{name:"niddle", count:1}, {name:"can", count:2}, {name:"shield", count:2}], [{name:"niddle", count:2}, {name:"can", count:2}, {name:"shield", count:2}], [{name:"life", count:1}]];
var fps = 36;
init();
Symbol 1515 MovieClip Frame 10
winPageInit();
Symbol 1515 MovieClip Frame 32
stop();
Symbol 1515 MovieClip Frame 40
losePageInit();
Symbol 1515 MovieClip Frame 43
this.btnM_goHome.enabled = false;
Symbol 1515 MovieClip Frame 44
this.btn_gameRetry.enabled = false;
Symbol 1515 MovieClip Frame 54
this.btn_gameRetry.enabled = true;
this.btn_gameRetry.onPress = function () {
this._parent.path.gSound.stop("loseBGSound");
this._parent.path.gameDataReset(false, this._parent.level - 1);
this._parent.path.gotoAndStop("gameL");
};
this.btnM_goHome.enabled = true;
this.btnM_goHome.onRelease = function () {
getURL ("http://tw.bnb.gamania.com", "_blank");
};
stop();
Symbol 1515 MovieClip Frame 60
rankPageInit();
Symbol 1515 MovieClip Frame 71
this.btnM_goHome.enabled = false;
Symbol 1515 MovieClip Frame 79
this.btn_gameReplay.enabled = false;
Symbol 1515 MovieClip Frame 83
this.btnM_goHome.enabled = true;
this.btnM_goHome.onRelease = function () {
getURL ("http://tw.bnb.gamania.com", "_blank");
};
Symbol 1515 MovieClip Frame 90
this.btn_gameReplay.enabled = true;
this.btn_gameReplay.onPress = function () {
this._parent.path.gSound.stop("rankBGSound");
this._parent.path.gameDataReset(true);
this._parent.path.gotoAndStop("gameL");
};
stop();