Instance of Symbol 52 MovieClip in Frame 1
onClipEvent (load) {
_visible = false;
}
Frame 3
stop();
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_quality = "HIGH";
_focusrect = false;
_global.masterVolume = new Sound();
restoreVolume = _global.masterVolume.getVolume();
var isMusicOn = true;
gotoAndStop ("menu");
Frame 21
function gotoGame() {
gotoAndPlay ("game");
}
function gotoMenu() {
gotoAndPlay ("menu");
}
function gotoRestart() {
gotoAndPlay ("restart");
}
function initSave() {
var _local1 = SharedObject.getLocal("backfire_save");
var _local2 = false;
for (i in _local1.data) {
_local2 = true;
}
if (!_local2) {
_local1.data.levels = new Array();
_local1.flush();
}
}
function saveLevel(lev, time) {
var _local1 = SharedObject.getLocal("backfire_save");
_local1.data.levels[lev] = codes[lev];
_local1.flush();
}
function getLevels() {
var _local2 = SharedObject.getLocal("backfire_save");
var _local1 = 0;
while (_local1 < _local2.data.levels.length) {
if (_local2.data.levels[_local1] == codes[_local1]) {
unlockLevel(_local1 + 1);
}
_local1++;
}
}
function unlockLevel(lev) {
selectBox["btn" + lev].enabled = true;
selectBox["btn" + lev]._alpha = 100;
}
stop();
if ((!gameComplete) || (gameComplete == undefined)) {
var gameComplete = false;
finalBox._visible = false;
} else {
gameComplete = false;
finalBox._visible = true;
titleBox._visible = false;
}
helpBox._visible = false;
selectBox._visible = false;
optionsBox._visible = false;
var transFunc;
titleBox.btnPlay.onRelease = function () {
titleBox._visible = false;
selectBox._visible = true;
sfxClick.start();
};
titleBox.btnHelp.onRelease = function () {
helpBox._visible = true;
titleBox._visible = false;
sfxClick.start();
};
helpBox.btnBack.onRelease = function () {
helpBox._visible = false;
titleBox._visible = true;
sfxClick.start();
};
finalBox.btnBack.onRelease = function () {
finalBox._visible = false;
titleBox._visible = true;
sfxClick.start();
};
selectBox.btnBack.onRelease = function () {
selectBox._visible = false;
titleBox._visible = true;
sfxClick.start();
};
titleBox.btnOptions.onRelease = function () {
optionsBox._visible = true;
titleBox._visible = false;
if (isMusicOn) {
optionsBox.btnMusic.music.text = "OFF";
optionsBox.music.text = "ON";
} else {
optionsBox.btnMusic.music.text = "ON";
optionsBox.music.text = "OFF";
}
sfxClick.start();
};
optionsBox.btnBack.onRelease = function () {
optionsBox._visible = false;
titleBox._visible = true;
sfxClick.start();
};
optionsBox.btnMusic.onRelease = function () {
if (isMusicOn) {
isMusicOn = false;
optionsBox.btnMusic.music.text = "ON";
optionsBox.music.text = "OFF";
} else {
isMusicOn = true;
optionsBox.btnMusic.music.text = "OFF";
optionsBox.music.text = "ON";
}
sfxClick.start();
};
optionsBox.btnMusic.onRollOver = function () {
this.gotoAndStop(2);
};
optionsBox.btnMusic.onRollOut = function () {
this.gotoAndStop(1);
};
optionsBox.btnMusic.onDragOut = function () {
this.gotoAndStop(1);
};
var currRoom = 0;
var i = 1;
while (i < 16) {
selectBox["btn" + i].enabled = false;
selectBox["btn" + i]._alpha = 25;
selectBox["btn" + i].num.text = i;
selectBox["btn" + i].onRelease = function () {
currRoom = Number(substring(this._name, 4, -1)) - 1;
transition.gotoAndPlay("close");
transFunc = gotoGame;
sfxClick.start();
sfxTitleLoop.stop();
};
selectBox["btn" + i].onRollOver = function () {
this.gotoAndStop(2);
};
selectBox["btn" + i].onRollOut = function () {
this.gotoAndStop(1);
};
selectBox["btn" + i].onDragOut = function () {
this.gotoAndStop(1);
};
i++;
}
sfxClick = new Sound(this.createEmptyMovieClip("sfx1", 5001));
sfxClick.attachSound("click.wav");
sfxBounce1 = new Sound(this.createEmptyMovieClip("sfx2", 5002));
sfxBounce1.attachSound("bounce1.wav");
sfxFire = new Sound(this.createEmptyMovieClip("sfx3", 5003));
sfxFire.attachSound("fire.wav");
sfxExplode1 = new Sound(this.createEmptyMovieClip("sfx4", 5004));
sfxExplode1.attachSound("explode1.wav");
sfxGameLoop1 = new Sound(this.createEmptyMovieClip("sfx5", 5005));
sfxGameLoop1.attachSound("loop1.wav");
sfxGameLoop1.onSoundComplete = function () {
sfxGameLoop2.start(0, 4);
};
sfxGameLoop2 = new Sound(this.createEmptyMovieClip("sfx6", 5006));
sfxGameLoop2.attachSound("loop2.wav");
sfxGameLoop2.onSoundComplete = function () {
sfxGameLoop1.start(0, 4);
};
sfxComplete = new Sound(this.createEmptyMovieClip("sfx7", 5007));
sfxComplete.attachSound("complete.wav");
var codes = new Array("d2koe31t", "p4fl9crg", "jk5tq63x", "bne21hm7", "lx8ty34i", "u1ac56bz", "w3e9jgr1", "op6bnv35", "rn25t7lv", "c9dsa83n", "e12gh4dy", "tu15xv9q", "m2cp73sf", "al95k4gr", "f3mlx62a", "x14bn7ck");
initSave();
saveLevel(0);
getLevels();
Frame 31
function startGame() {
getReadyBox._visible = false;
getReadyBox.gotoAndStop(1);
if (isMusicOn) {
sfxGameLoop1.start(0, 4);
}
isPaused = false;
btnPause.enabled = true;
btnHelp.enabled = true;
}
function stageClear() {
saveLevel(currRoom + 1);
completeBox._visible = true;
isLevelComplete = true;
isPaused = true;
sfxComplete.start();
stopMusic();
btnPause.enabled = false;
btnHelp.enabled = false;
}
function stopMusic() {
sfxGameLoop1.stop();
sfxGameLoop2.stop();
}
function gameInit() {
player = playerHolder.attachMovie("player", "player", 0);
player._visible = false;
buildMap(currentMap, levelMap);
isPaused = true;
var _local2 = false;
while (!_local2) {
var _local1 = 0;
while (_local1 < numEnemies) {
levelMap["enemy" + _local1].update();
if (levelMap["enemy" + _local1].fireCount == 1) {
_local2 = true;
}
_local1++;
}
}
btnPause.enabled = false;
btnHelp.enabled = false;
}
function clearMapData(w, h) {
numEnemies = 0;
var _local2 = 0;
while (_local2 < h) {
tiles[_local2] = new Array(w);
flags[_local2] = new Array(w);
var _local1 = 0;
while (_local1 < w) {
tiles[_local2][_local1] = 0;
flags[_local2][_local1] = 0;
_local1++;
}
_local2++;
}
}
function buildMap(map, holder) {
currMapWidth = map[0].length;
currMapHeight = map.length;
clearMapData(currMapWidth, currMapHeight);
var _local6 = 0;
var _local4 = 0;
var _local10 = 0;
var _local3 = 0;
while (_local3 < currMapHeight) {
var _local1 = 0;
while (_local1 < currMapWidth) {
holder.attachMovie("tiles", (("t_" + _local1) + "_") + _local3, _local10);
_local6 = map[_local3][_local1][0];
_local4 = map[_local3][_local1][1];
tiles[_local3][_local1] = _local6;
flags[_local3][_local1] = _local4;
holder[(("t_" + _local1) + "_") + _local3].gotoAndStop(_local6);
holder[(("t_" + _local1) + "_") + _local3]._x = _local1 * TILE_SIZE;
holder[(("t_" + _local1) + "_") + _local3]._y = _local3 * TILE_SIZE;
var _local5 = Math.floor(_local4 / 100);
switch (_local5) {
case TILE_START :
player._x = (_local1 * TILE_SIZE) + (TILE_SIZE * 0.5);
player._y = (_local3 * TILE_SIZE) + (TILE_SIZE * 0.5);
player.radius = 15;
break;
case TURRET_FIXED :
var _local7 = Math.floor((_local4 - (_local5 * 100)) / 10);
var _local8 = (_local4 - (_local5 * 100)) - (_local7 * 10);
holder.attachMovie("turretFixed1", "enemy" + numEnemies, Z_OBJECTS + numEnemies);
holder["enemy" + numEnemies]._x = (_local1 * TILE_SIZE) + (TILE_SIZE * 0.5);
holder["enemy" + numEnemies]._y = (_local3 * TILE_SIZE) + (TILE_SIZE * 0.5);
holder["enemy" + numEnemies].setGunDirection(_local8);
holder["enemy" + numEnemies].setFireRate(_local7);
numEnemies++;
break;
case TURRET_SPIN :
_local7 = Math.floor((_local4 - (_local5 * 100)) / 10);
holder.attachMovie("turretSpin1", "enemy" + numEnemies, Z_OBJECTS + numEnemies);
holder["enemy" + numEnemies]._x = (_local1 * TILE_SIZE) + (TILE_SIZE * 0.5);
holder["enemy" + numEnemies]._y = (_local3 * TILE_SIZE) + (TILE_SIZE * 0.5);
holder["enemy" + numEnemies].setFireRate(_local7);
numEnemies++;
break;
case ENEMY_MINE :
holder.attachMovie("mine1", "mine" + numMines, (Z_OBJECTS + 100) + numMines);
holder["mine" + numMines]._x = (_local1 * TILE_SIZE) + (TILE_SIZE * 0.5);
holder["mine" + numMines]._y = (_local3 * TILE_SIZE) + (TILE_SIZE * 0.5);
numMines++;
break;
}
_local10++;
_local1++;
}
_local3++;
}
}
function moveBalls() {
var _local4 = 0;
var _local3 = 0;
var _local1 = 0;
while (_local1 < numBalls) {
if (balls[_local1].isAlive) {
_local4 = balls[_local1]._x;
_local3 = balls[_local1]._y;
getBallCorners(_local4, _local3 + balls[_local1].speed.y, balls[_local1]);
if (balls[_local1].speed.y < 0) {
if (balls[_local1].isUpLeft && (balls[_local1].isUpRight)) {
_local3 = _local3 + balls[_local1].speed.y;
} else {
balls[_local1].speed.y = balls[_local1].speed.y * -1;
}
}
if (balls[_local1].speed.y > 0) {
if (balls[_local1].isDownLeft && (balls[_local1].isDownRight)) {
_local3 = _local3 + balls[_local1].speed.y;
} else {
balls[_local1].speed.y = balls[_local1].speed.y * -1;
}
}
getBallCorners(_local4 + balls[_local1].speed.x, _local3, balls[_local1]);
if (balls[_local1].speed.x < 0) {
if (balls[_local1].isDownLeft && (balls[_local1].isUpLeft)) {
_local4 = _local4 + balls[_local1].speed.x;
} else {
balls[_local1].speed.x = balls[_local1].speed.x * -1;
}
}
if (balls[_local1].speed.x > 0) {
if (balls[_local1].isDownRight && (balls[_local1].isUpRight)) {
_local4 = _local4 + balls[_local1].speed.x;
} else {
balls[_local1].speed.x = balls[_local1].speed.x * -1;
}
}
balls[_local1]._x = _local4;
balls[_local1]._y = _local3;
balls[_local1].tile.x = Math.floor(balls[_local1]._x / TILE_SIZE);
balls[_local1].tile.y = Math.floor(balls[_local1]._y / TILE_SIZE);
if (player.isAlive) {
colBallPlayer(balls[_local1]);
}
var _local2 = 0;
while (_local2 < numEnemies) {
if (levelMap["enemy" + _local2].isOn) {
colBallTurret(balls[_local1], levelMap["enemy" + _local2]);
}
_local2++;
}
}
_local1++;
}
}
function movePlayer() {
var _local2 = player._x;
var _local1 = player._y;
if (!player.isShield) {
player.speed.x = player.speed.x + player.dir.x;
player.speed.y = player.speed.y + player.dir.y;
}
player.speed.x = player.speed.x * 0.8;
player.speed.y = player.speed.y * 0.8;
getPlayerCorners(_local2, _local1 + player.speed.y);
if (player.speed.y < 0) {
if (player.isUpLeft && (player.isUpRight)) {
_local1 = _local1 + player.speed.y;
} else {
_local1 = (player.tile.y * TILE_SIZE) + player.radius;
}
}
if (player.speed.y > 0) {
if (player.isDownLeft && (player.isDownRight)) {
_local1 = _local1 + player.speed.y;
} else {
_local1 = ((player.tile.y + 1) * TILE_SIZE) - player.radius;
}
}
getPlayerCorners(_local2 + player.speed.x, _local1);
if (player.speed.x < 0) {
if (player.isDownLeft && (player.isUpLeft)) {
_local2 = _local2 + player.speed.x;
} else {
_local2 = (player.tile.x * TILE_SIZE) + player.radius;
}
}
if (player.speed.x > 0) {
if (player.isDownRight && (player.isUpRight)) {
_local2 = _local2 + player.speed.x;
} else {
_local2 = ((player.tile.x + 1) * TILE_SIZE) - player.radius;
}
}
player._x = _local2;
player._y = _local1;
player.tile.x = Math.floor(player._x / TILE_SIZE);
player.tile.y = Math.floor(player._y / TILE_SIZE);
}
function getPlayerCorners(px, py) {
var _local2 = Math.floor((py - player.radius) / TILE_SIZE);
var _local4 = Math.floor(((py + player.radius) - 1) / TILE_SIZE);
var _local3 = Math.floor((px - player.radius) / TILE_SIZE);
var _local1 = Math.floor(((px + player.radius) - 1) / TILE_SIZE);
if (flags[_local2][_local3] < 0) {
player.isUpLeft = false;
} else {
player.isUpLeft = true;
}
if (flags[_local4][_local3] < 0) {
player.isDownLeft = false;
} else {
player.isDownLeft = true;
}
if (flags[_local2][_local1] < 0) {
player.isUpRight = false;
} else {
player.isUpRight = true;
}
if (flags[_local4][_local1] < 0) {
player.isDownRight = false;
} else {
player.isDownRight = true;
}
}
function checkForPits() {
var _local4 = player.tile.x;
var _local3 = player.tile.y;
var _local2 = flags[_local3][_local4];
var _local1 = Math.floor(Math.abs(_local2) / 100);
if (_local1 == TILE_PIT) {
player.kill();
addEffect("explode4", player._x, player._y);
sfxExplode1.start();
stopMusic();
gameoverBox._visible = true;
btnPause.enabled = false;
btnHelp.enabled = false;
timerStop();
}
}
function getBallCorners(px, py, ball) {
var _local3 = Math.floor((py - ball.radius) / TILE_SIZE);
var _local5 = Math.floor(((py + ball.radius) - 1) / TILE_SIZE);
var _local4 = Math.floor((px - ball.radius) / TILE_SIZE);
var _local2 = Math.floor(((px + ball.radius) - 1) / TILE_SIZE);
if (flags[_local3][_local4] < 0) {
ball.isUpLeft = false;
} else {
ball.isUpLeft = true;
}
if (flags[_local5][_local4] < 0) {
ball.isDownLeft = false;
} else {
ball.isDownLeft = true;
}
if (flags[_local3][_local2] < 0) {
ball.isUpRight = false;
} else {
ball.isUpRight = true;
}
if (flags[_local5][_local2] < 0) {
ball.isDownRight = false;
} else {
ball.isDownRight = true;
}
}
function updateEnemies() {
var _local1 = 0;
while (_local1 < numEnemies) {
levelMap["enemy" + _local1].update();
_local1++;
}
}
function updateMines() {
var _local5 = 0;
var _local4 = 0;
var _local1 = 0;
while (_local1 < numMines) {
if (levelMap["mine" + _local1].isAlive) {
levelMap["mine" + _local1]._rotation = levelMap["mine" + _local1]._rotation + 5;
_local5 = levelMap["mine" + _local1]._x;
_local4 = levelMap["mine" + _local1]._y;
getBallCorners(_local5, _local4 + levelMap["mine" + _local1].speed.y, levelMap["mine" + _local1]);
if (levelMap["mine" + _local1].speed.y < 0) {
if (levelMap["mine" + _local1].isUpLeft && (levelMap["mine" + _local1].isUpRight)) {
_local4 = _local4 + levelMap["mine" + _local1].speed.y;
} else {
levelMap["mine" + _local1].speed.y = levelMap["mine" + _local1].speed.y * -1;
}
}
if (levelMap["mine" + _local1].speed.y > 0) {
if (levelMap["mine" + _local1].isDownLeft && (levelMap["mine" + _local1].isDownRight)) {
_local4 = _local4 + levelMap["mine" + _local1].speed.y;
} else {
levelMap["mine" + _local1].speed.y = levelMap["mine" + _local1].speed.y * -1;
}
}
getBallCorners(_local5 + levelMap["mine" + _local1].speed.x, _local4, levelMap["mine" + _local1]);
if (levelMap["mine" + _local1].speed.x < 0) {
if (levelMap["mine" + _local1].isDownLeft && (levelMap["mine" + _local1].isUpLeft)) {
_local5 = _local5 + levelMap["mine" + _local1].speed.x;
} else {
levelMap["mine" + _local1].speed.x = levelMap["mine" + _local1].speed.x * -1;
}
}
if (levelMap["mine" + _local1].speed.x > 0) {
if (levelMap["mine" + _local1].isDownRight && (levelMap["mine" + _local1].isUpRight)) {
_local5 = _local5 + levelMap["mine" + _local1].speed.x;
} else {
levelMap["mine" + _local1].speed.x = levelMap["mine" + _local1].speed.x * -1;
}
}
levelMap["mine" + _local1]._x = _local5;
levelMap["mine" + _local1]._y = _local4;
levelMap["mine" + _local1].tile.x = Math.floor(levelMap["mine" + _local1]._x / TILE_SIZE);
levelMap["mine" + _local1].tile.y = Math.floor(levelMap["mine" + _local1]._y / TILE_SIZE);
if (player.isAlive) {
colBallPlayer(levelMap["mine" + _local1]);
}
var _local2 = 0;
while (_local2 < numEnemies) {
if (levelMap["enemy" + _local2].isOn) {
colBallTurret(levelMap["mine" + _local1], levelMap["enemy" + _local2]);
}
_local2++;
}
var _local3 = 0;
while (_local3 < numBalls) {
colBallMine(levelMap["ball" + _local3], levelMap["mine" + _local1]);
_local3++;
}
}
_local1++;
}
}
function fire(sx, sy, dx, dy) {
var _local1 = levelMap.attachMovie("ball", "ball" + numBalls, Z_BULLETS + numBalls);
_local1._x = sx;
_local1._y = sy;
_local1.speed.x = dx;
_local1.speed.y = dy;
_local1.setColour(0);
balls.push(_local1);
numBalls++;
sfxFire.start();
}
function nextRoom() {
if (currRoom < 14) {
currRoom++;
currentMap = rooms[currRoom];
startNextRoom();
} else {
gameComplete = true;
transition.gotoAndPlay("close");
transFunc = gotoMenu;
}
}
function startNextRoom() {
player._visible = false;
completeBox._visible = false;
var _local2 = 0;
while (_local2 < numBalls) {
levelMap["ball" + _local2].removeMovieClip();
_local2++;
}
balls.splice(0);
numBalls = 0;
var _local1 = 0;
while (_local1 < numMines) {
levelMap["mine" + _local1].removeMovieClip();
_local1++;
}
mines.splice(0);
numMines = 0;
isMovingToNext = false;
buildMap(currentMap, levelMap);
isLevelComplete = false;
isPaused = true;
getReadyBox._visible = true;
getReadyBox.play();
gotoAndStop ("restart");
}
function checkLevelComplete() {
if ((!isLevelComplete) && (player.isAlive)) {
var _local2 = 0;
var _local1 = 0;
while (_local1 < numEnemies) {
_local2 = _local2 + levelMap["enemy" + _local1].hp;
if (_local2 > 0) {
return(undefined);
}
_local1++;
}
stageClear();
}
}
function colPlayerTurret(t) {
var _local1 = new Vector2D(player._x - t._x, player._y - t._y);
var _local3 = (player.radius + t.radius) - _local1.getMagnitude();
if (_local3 > 0) {
player.kill();
addEffect("explode4", player._x, player._y);
sfxExplode1.start();
stopMusic();
gameoverBox._visible = true;
btnPause.enabled = false;
btnHelp.enabled = false;
timerStop();
}
}
function colBallMine(b, m) {
var _local3 = new Vector2D(b._x - m._x, b._y - m._y);
var _local4 = (b.radius + m.radius) - _local3.getMagnitude();
if (_local4 < 0) {
return(undefined);
}
var _local1 = new Vector2D(_local3.x, _local3.y);
_local1.normalise();
b._x = b._x + (_local1.x * _local4);
b._y = b._y + (_local1.y * _local4);
var _local7 = 1;
var _local13 = 1;
var _local12 = 1;
var _local6 = (b.speed.x * _local1.x) + (b.speed.y * _local1.y);
var _local9 = ((-b.speed.x) * _local1.y) + (b.speed.y * _local1.x);
var _local5 = 0;
var _local8 = 0;
var _local11 = _local6 + (((1 + _local7) * (_local5 - _local6)) / (1 + (_local13 / _local12)));
var _local10 = _local5 + (((1 + _local7) * (_local6 - _local5)) / (1 + (_local12 / _local13)));
var _local15 = (_local10 * _local1.x) - (_local8 * _local1.y);
var _local14 = (_local10 * _local1.y) + (_local8 * _local1.x);
b.speed.x = ((_local11 * _local1.x) - (_local9 * _local1.y)) - _local15;
b.speed.y = ((_local11 * _local1.y) + (_local9 * _local1.x)) - _local14;
}
function colBallTurret(b, t) {
var _local4 = new Vector2D(b._x - t._x, b._y - t._y);
var _local5 = (b.radius + t.radius) - _local4.getMagnitude();
if (_local5 < 0) {
return(undefined);
}
var _local1 = new Vector2D(_local4.x, _local4.y);
_local1.normalise();
b._x = b._x + (_local1.x * _local5);
b._y = b._y + (_local1.y * _local5);
var _local8 = 1;
var _local14 = 1;
var _local13 = 1;
var _local7 = (b.speed.x * _local1.x) + (b.speed.y * _local1.y);
var _local10 = ((-b.speed.x) * _local1.y) + (b.speed.y * _local1.x);
var _local6 = (t.speed.x * _local1.x) + (t.speed.y * _local1.y);
var _local9 = ((-t.speed.x) * _local1.y) + (t.speed.y * _local1.x);
var _local12 = _local7 + (((1 + _local8) * (_local6 - _local7)) / (1 + (_local14 / _local13)));
var _local11 = _local6 + (((1 + _local8) * (_local7 - _local6)) / (1 + (_local13 / _local14)));
t.speed.x = (_local11 * _local1.x) - (_local9 * _local1.y);
t.speed.y = (_local11 * _local1.y) + (_local9 * _local1.x);
b.speed.x = ((_local12 * _local1.x) - (_local10 * _local1.y)) - t.speed.x;
b.speed.y = ((_local12 * _local1.y) + (_local10 * _local1.x)) - t.speed.y;
if (b.colour == 1) {
t.hp--;
if (t.hp <= 0) {
t.isOn = false;
t.gotoAndStop("off");
addEffect("explode5", t._x, t._y);
}
b.kill();
addEffect("explode1", b._x, b._y);
}
t.speed.x = 0;
t.speed.y = 0;
}
function colBallPlayer(b) {
var _local3 = new Vector2D(b._x - player._x, b._y - player._y);
var _local4 = (b.radius + player.radius) - _local3.getMagnitude();
if (_local4 < 0) {
return(undefined);
}
var _local7 = new Vector2D(_local3.x, _local3.y);
_local7.normalise();
b._x = b._x + (_local7.x * _local4);
b._y = b._y + (_local7.y * _local4);
if ((!player.isShield) || (!player.shield.hitTest(b._x, b._y, true))) {
player.kill();
b.kill();
addEffect("explode4", player._x, player._y);
sfxExplode1.start();
stopMusic();
gameoverBox._visible = true;
btnPause.enabled = false;
btnHelp.enabled = false;
timerStop();
return(undefined);
}
var _local8 = 1;
var _local14 = 1;
var _local13 = 1;
var _local1 = new Vector2D();
_local1.vector(player._rotation);
var _local6 = (b.speed.x * _local1.x) + (b.speed.y * _local1.y);
var _local10 = ((-b.speed.x) * _local1.y) + (b.speed.y * _local1.x);
var _local5 = (0 * _local1.x) + (0 * _local1.y);
var _local9 = (0 * _local1.y) + (0 * _local1.x);
var _local12 = _local6 + (((1 + _local8) * (_local5 - _local6)) / (1 + (_local14 / _local13)));
var _local11 = _local5 + (((1 + _local8) * (_local6 - _local5)) / (1 + (_local13 / _local14)));
var _local16 = (_local11 * _local1.x) - (_local9 * _local1.y);
var _local15 = (_local11 * _local1.y) + (_local9 * _local1.x);
b.speed.x = ((_local12 * _local1.x) - (_local10 * _local1.y)) - _local16;
b.speed.y = ((_local12 * _local1.y) + (_local10 * _local1.x)) - _local15;
b.setColour(1);
addEffect("explode2", b._x, b._y);
sfxBounce1.start();
}
function addEffect(clip, px, py) {
var _local1 = levelMap.attachMovie(clip, "effect" + numEffects, Z_EFFECTS + numEffects);
_local1._x = px;
_local1._y = py;
numEffects++;
}
stop();
gameoverBox._visible = false;
completeBox._visible = false;
pauseBox._visible = false;
gameHelpBox._visible = false;
btnPause.onRelease = function () {
isPaused = true;
pauseBox._visible = true;
btnPause.enabled = false;
btnHelp.enabled = false;
};
pauseBox.btnResume.onRelease = function () {
isPaused = false;
pauseBox._visible = false;
btnPause.enabled = true;
btnHelp.enabled = true;
};
pauseBox.btnMenu.onRelease = function () {
sfxClick.start();
transition.gotoAndPlay("close");
transFunc = gotoMenu;
btnPause.enabled = true;
btnHelp.enabled = true;
};
btnHelp.onRelease = function () {
isPaused = true;
gameHelpBox._visible = true;
btnPause.enabled = false;
btnHelp.enabled = false;
};
gameHelpBox.btnResume.onRelease = function () {
isPaused = false;
gameHelpBox._visible = false;
btnPause.enabled = true;
btnHelp.enabled = true;
};
gameoverBox.btnRetry.onRelease = function () {
sfxClick.start();
gotoAndStop ("restart");
};
gameoverBox.btnMenu.onRelease = function () {
sfxClick.start();
transition.gotoAndPlay("close");
transFunc = gotoMenu;
};
completeBox.btnNext.onRelease = function () {
sfxClick.start();
nextRoom();
};
completeBox.btnMenu.onRelease = function () {
sfxClick.start();
transition.gotoAndPlay("close");
transFunc = gotoMenu;
};
var KEY_LF = 37;
var KEY_RT = 39;
var TILE_SIZE = 32;
var TILE_START = 1;
var TILE_RAIL = 4;
var TURRET_FIXED = 5;
var TURRET_TRACK = 6;
var TURRET_SPIN = 7;
var ENEMY_MINE = 8;
var TILE_PIT = 9;
var Z_TILES = 1000;
var Z_OBJECTS = 2000;
var Z_BULLETS = 3000;
var Z_EFFECTS = 4000;
var FIRE_VERYSLOW = 0;
var FIRE_SLOW = 1;
var FIRE_MEDIUM = 2;
var FIRE_FAST = 3;
var FIRE_VERYFAST = 4;
var DIR_UP = 0;
var DIR_UPLEFT = 1;
var DIR_LEFT = 2;
var DIR_DOWNLEFT = 3;
var DIR_DOWN = 4;
var DIR_DOWNRIGHT = 5;
var DIR_RIGHT = 6;
var DIR_UPR = 7;
var room01 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 510], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 520], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room02 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 534], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 500], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room03 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 520], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 530], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 520], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room04 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 720], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 520], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room05 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 800], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 530], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 530], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 530], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room06 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 508], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [4, 100], [1, 0], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 506], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room07 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 740], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room08 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 800], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 520], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 520], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room09 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 538], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 720], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room10 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 710], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 720], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room11 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 800], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 526], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 520], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 518], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room12 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 710], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 720], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room13 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 504], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [4, 100], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 520], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 502], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room14 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 507], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 507], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 800], [1, 0], [1, 0], [1, 0], [1, 507], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 507], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 507], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var room15 = [[[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 730], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 526], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [4, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 522], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 720], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [3, 900], [2, -100]], [[2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100]]];
var rooms = [room01, room02, room03, room04, room05, room06, room07, room08, room09, room10, room11, room12, room13, room14, room15, room16];
var currentMap = rooms[currRoom];
var tiles = new Array();
var flags = new Array();
var currMapWidth;
var currMapHeight;
var player;
var isPaused = false;
var isMovingToNext = false;
var xMoveTo = 0;
var yMoveTo = 0;
var numEnemies = 0;
var enemies = new Array();
var numBalls = 0;
var balls = new Array();
var numMines = 0;
var mines = new Array();
var vm = new Vector2D(0, 0);
var playerState = 0;
player.gotoAndStop("normal");
var numEffects = 0;
var score = 0;
var isLevelComplete = false;
gameInit();
onEnterFrame = function () {
if (!isPaused) {
timerUpdate();
if (!isMovingToNext) {
if (player.isAlive) {
updateEnemies();
vm.x = _xmouse - player._x;
vm.y = _ymouse - player._y;
if (!player.isShield) {
if (vm.getMagnitude() > player.radius) {
vm.normalise();
player.dir.x = 2 * vm.x;
player.dir.y = 2 * vm.y;
} else {
player.dir.x = 0;
player.dir.y = 0;
}
}
player._rotation = vm.angle();
movePlayer();
var _local1 = 0;
while (_local1 < numEnemies) {
if (levelMap["enemy" + _local1].isOn) {
colPlayerTurret(levelMap["enemy" + _local1]);
}
_local1++;
}
checkForPits();
}
checkLevelComplete();
updateMines();
moveBalls();
} else {
moveToNext();
}
}
};
onMouseDown = function () {
if (!isPaused) {
player.dir.x = 0;
player.dir.y = 0;
player.speed.x = 0;
player.speed.y = 0;
player.gotoAndStop("colour1");
player.isShield = true;
}
};
onMouseUp = function () {
if (!isPaused) {
player.gotoAndStop("colour0");
player.isShield = false;
}
};
Frame 41
gotoAndStop ("game");
Symbol 9 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 10 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 10 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 60
Symbol 25 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 27 MovieClip Frame 1
this._visible = false;
Symbol 33 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 38 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 38 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 38 MovieClip Frame 12
stop();
Symbol 49 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 100
stop();
Symbol 51 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 52 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 27 MovieClip "mcIntro" in Symbol 52 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 52 MovieClip Frame 2
_visible = true;
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 51 MovieClip "mcLoadingAnimated" in Symbol 52 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 52 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 52 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
_root.gotoAndStop(2);
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 328 MovieClip [__Packages.Turret] Frame 0
class Turret extends MovieClip
{
var stop, fireRate, fireCount, speed, dir, radius, base, hp, isOn, gunDir, bang, gun;
function Turret () {
super();
stop();
fireRate = 60;
fireCount = fireRate;
speed = new Vector2D(0, 0);
dir = new Vector2D(0, 0);
radius = base._width / 2;
hp = 3;
isOn = true;
gunDir = null;
bang.stop();
}
function setGunDirection(dir) {
switch (dir) {
case 0 :
gunDir = null;
break;
case 1 :
gunDir = 0;
break;
case 2 :
gunDir = 45;
break;
case 3 :
gunDir = 90;
break;
case 4 :
gunDir = 135;
break;
case 5 :
gunDir = 180;
break;
case 6 :
gunDir = 225;
break;
case 7 :
gunDir = 270;
break;
case 8 :
gunDir = 315;
}
gun._rotation = gunDir;
}
function setFireRate(rate) {
switch (rate) {
case 0 :
fireRate = 180;
break;
case 1 :
fireRate = 150;
break;
case 2 :
fireRate = 120;
break;
case 3 :
fireRate = 90;
break;
case 4 :
fireRate = 60;
}
fireCount = fireRate;
}
}
Symbol 329 MovieClip [__Packages.Vector2D] Frame 0
class Vector2D
{
var x, y;
function Vector2D (vx, vy) {
x = vx;
y = vy;
}
function addVector(v) {
x = x + v.x;
y = y + v.y;
}
function getMagnitude() {
return(Math.sqrt((x * x) + (y * y)));
}
function normalise() {
var _local2 = getMagnitude();
x = x / _local2;
y = y / _local2;
}
function dot(v) {
var _local2 = (x * v.x) + (y * v.y);
return(_local2);
}
function angle() {
var _local3 = Math.atan2(-y, -x);
var _local2 = Math.round(_local3 * D180_OVER_PI);
_local2 = _local2 - 90;
if (_local2 > 360) {
_local2 = _local2 - 360;
}
if (_local2 <= 0) {
_local2 = 360 + _local2;
}
return(_local2);
}
function vector(a) {
x = Math.sin(a * PI_OVER_D180);
y = -Math.cos(a * PI_OVER_D180);
}
var D180_OVER_PI = 57.2957795130823;
var PI_OVER_D180 = (Math.PI/180);
}
Symbol 330 MovieClip [__Packages.TurretFixed] Frame 0
class TurretFixed extends Turret
{
var isOn, gunDir, _x, _parent, dir, _y, gun, fireCount, radius, bang, fireRate;
function TurretFixed () {
super();
}
function update() {
if (isOn) {
if (gunDir == null) {
dir.x = _parent._parent.player._x - _x;
dir.y = _parent._parent.player._y - _y;
} else {
dir.vector(gun._rotation);
}
dir.normalise();
gun._rotation = dir.angle();
fireCount--;
if (fireCount == 0) {
var _local5 = _x + (dir.x * radius);
var _local3 = _y + (dir.y * radius);
var _local4 = 6 * dir.x;
var _local2 = 6 * dir.y;
bang.play();
_parent._parent.fire(_local5, _local3, _local4, _local2);
fireCount = fireRate;
}
}
}
}
Symbol 331 MovieClip [__Packages.TurretSpin] Frame 0
class TurretSpin extends Turret
{
var isOn, gun, dir, fireCount, bang, radius, _x, _y, _parent, fireRate;
function TurretSpin () {
super();
}
function update() {
if (isOn) {
gun._rotation++;
dir.vector(gun._rotation);
dir.normalise();
gun._rotation = dir.angle();
fireCount--;
if (fireCount == 0) {
bang.play();
var _local5 = _x + (dir.x * radius);
var _local3 = _y + (dir.y * radius);
var _local4 = 6 * dir.x;
var _local2 = 6 * dir.y;
_parent._parent.fire(_local5, _local3, _local4, _local2);
fireCount = fireRate;
}
}
}
}
Symbol 332 MovieClip [__Packages.Player] Frame 0
class Player extends MovieClip
{
var stop, speed, dir, tile, isUpLeft, isDownLeft, isUpRight, isDownRight, radius, _width, shieldRadius, isAlive, isShield, _x, _y, _visible;
function Player () {
super();
stop();
speed = new Vector2D(0, 0);
dir = new Vector2D(0, 0);
tile = new Vector2D(1, 1);
isUpLeft = false;
isDownLeft = false;
isUpRight = false;
isDownRight = false;
radius = _width / 2;
shieldRadius = radius + 1;
isAlive = true;
isShield = false;
}
function setPosition(px, py) {
tile.x = px;
tile.y = py;
_x = (px * TILE_SIZE) + (TILE_SIZE * 0.5);
_y = (py * TILE_SIZE) + (TILE_SIZE * 0.5);
}
function kill() {
_visible = false;
isAlive = false;
}
var TILE_SIZE = 32;
}
Symbol 333 MovieClip [__Packages.Ball] Frame 0
class Ball extends MovieClip
{
var stop, speed, dir, tile, isUpLeft, isDownLeft, isUpRight, isDownRight, radius, _width, colour, isAlive, gotoAndStop, gotoAndPlay, _visible;
function Ball () {
super();
stop();
speed = new Vector2D(0, 0);
dir = new Vector2D(0, 0);
tile = new Vector2D(1, 1);
isUpLeft = false;
isDownLeft = false;
isUpRight = false;
isDownRight = false;
radius = _width / 2;
colour = 0;
isAlive = true;
}
function setColour(col) {
colour = col;
if (colour == 0) {
gotoAndStop("colour0");
} else {
gotoAndPlay("colour1");
}
}
function kill() {
isAlive = false;
_visible = false;
}
}
Symbol 334 MovieClip [__Packages.Mine] Frame 0
class Mine extends MovieClip
{
var stop, speed, dir, tile, isUpLeft, isDownLeft, isUpRight, isDownRight, radius, _width, isAlive;
function Mine () {
super();
stop();
speed = new Vector2D(2, 2);
dir = new Vector2D(0, 0);
tile = new Vector2D(1, 1);
isUpLeft = false;
isDownLeft = false;
isUpRight = false;
isDownRight = false;
radius = _width / 2;
isAlive = true;
}
}
Symbol 54 MovieClip [mine1] Frame 1
#initclip 12
Object.registerClass("mine1", Mine);
#endinitclip
Symbol 57 MovieClip [explode3] Frame 1
stop();
Symbol 63 MovieClip [turretFixed1] Frame 1
#initclip 8
Object.registerClass("turretFixed1", TurretFixed);
#endinitclip
Symbol 67 MovieClip [turretSpin1] Frame 1
#initclip 9
Object.registerClass("turretSpin1", TurretSpin);
#endinitclip
Symbol 72 MovieClip [player] Frame 1
#initclip 10
Object.registerClass("player", Player);
#endinitclip
Symbol 140 MovieClip Frame 80
stop();
_parent._parent._parent.player._visible = true;
Symbol 146 MovieClip [explode1] Frame 12
stop();
_visible = false;
Symbol 149 MovieClip [explode2] Frame 7
stop();
_visible = false;
Symbol 169 MovieClip [explode4] Frame 16
stop();
_visible = false;
Symbol 178 MovieClip [explode5] Frame 16
stop();
_visible = false;
Symbol 183 MovieClip [ball] Frame 1
#initclip 11
Object.registerClass("ball", Ball);
#endinitclip
Symbol 183 MovieClip [ball] Frame 150
this.colour = 0;
this.gotoAndStop("colour0");
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 2
stop();
Symbol 249 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 2
stop();
Symbol 255 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 259 MovieClip Frame 1
blocker.useHandCursor = false;
Symbol 290 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 22
_parent.transFunc();
Symbol 290 MovieClip Frame 37
gotoAndStop ("off");
Symbol 320 MovieClip Frame 95
_parent.startGame();