Frame 1
stop();
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_quality = "HIGH";
_focusrect = false;
_global.masterVolume = new Sound();
restoreVolume = _global.masterVolume.getVolume();
MochiAd.showPreGameAd({id:"1ad6263aec168e51", res:"640x480", no_bg:true, color:7996, outline:5159});
Frame 2
stop();
gotoAndPlay ("menu");
Frame 21
function gotoGame() {
gotoAndPlay ("game");
}
function gotoMenu() {
gotoAndPlay ("menu");
}
function gotoGameFinished() {
finalBox._visible = false;
finalBox.fireworks.gotoAndStop("off");
titleBox._visible = true;
}
function fireworkBang() {
var _local2 = Math.floor(Math.random() * 3) + 1;
this["sfxFirework" + _local2].start();
}
function initSave() {
var _local1 = SharedObject.getLocal("timebot_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("timebot_save");
_local1.data.levels[lev] = codes[lev];
_local1.flush();
}
function getLevels() {
var _local2 = SharedObject.getLocal("timebot_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["fade" + lev]._visible = false;
selectBox["btn" + lev].enabled = true;
}
stop();
stopAllSounds();
if ((!gameComplete) || (gameComplete == undefined)) {
var gameComplete = false;
finalBox._visible = false;
} else {
gameComplete = false;
finalBox._visible = true;
titleBox._visible = false;
finalBox.fireworks.gotoAndStop("on");
}
helpBox._visible = false;
selectBox._visible = false;
var transFunc;
backgroundScrollerInst.init("LogoBG", 1.5, 0.75);
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 () {
transitionInst.gotoAndPlay("close");
transFunc = gotoGameFinished;
sfxClick.start();
};
selectBox.btnBack.onRelease = function () {
selectBox._visible = false;
titleBox._visible = true;
sfxClick.start();
};
var currRoom = 0;
var i = 1;
while (i < 13) {
selectBox["fade" + i]._visible = true;
selectBox["btn" + i].enabled = false;
selectBox["btn" + i].onRelease = function () {
currRoom = Number(substring(this._name, 4, -1)) - 1;
transitionInst.gotoAndPlay("close");
transFunc = gotoGame;
sfxClick.start();
sfxTitleLoop.stop();
};
i++;
}
sfxTimeJump = new Sound(this.createEmptyMovieClip("sfx1", 5001));
sfxTimeJump.attachSound("warp.wav");
sfxCollect = new Sound(this.createEmptyMovieClip("sfx2", 5002));
sfxCollect.attachSound("pickup.wav");
sfxClick = new Sound(this.createEmptyMovieClip("sfx3", 5003));
sfxClick.attachSound("click.wav");
sfxExplode = new Sound(this.createEmptyMovieClip("sfx4", 5004));
sfxExplode.attachSound("explode.wav");
sfxFirework1 = new Sound(this.createEmptyMovieClip("sfx5", 5005));
sfxFirework1.attachSound("firework01.wav");
sfxFirework2 = new Sound(this.createEmptyMovieClip("sfx6", 5006));
sfxFirework2.attachSound("firework02.wav");
sfxFirework3 = new Sound(this.createEmptyMovieClip("sfx7", 5007));
sfxFirework3.attachSound("firework03.wav");
var codes = new Array("lx8ty34i", "u1ac56bz", "w3e9jgr1", "op6bnv35", "rn25t7lv", "c9dsa83n", "e12gh4dy", "tu15xv9q", "m2cp73sf", "al95k4gr", "f3mlx62a", "x14bn7ck");
initSave();
saveLevel(0);
getLevels();
onEnterFrame = function () {
backgroundScrollerInst.update();
};
Frame 31
function pauseGame() {
isPaused = true;
btnQuit.enabled = false;
}
function resumeGame() {
isPaused = false;
btnQuit.enabled = true;
}
function gameInit() {
player = playerHolder.attachMovie("player", "player", Z_PLAYER);
buildMap(currentMap);
}
function clearMapData(w, h) {
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) {
currMapWidth = map[0].length;
currMapHeight = map.length;
clearMapData(currMapWidth, currMapHeight);
var _local5 = 0;
var _local4 = 0;
var _local6 = 0;
var _local8 = 0;
var _local3 = 0;
while (_local3 < currMapHeight) {
var _local2 = 0;
while (_local2 < currMapWidth) {
levelMap.attachMovie("tiles", (("t_" + _local2) + "_") + _local3, Z_TILES + _local8);
_local5 = map[_local3][_local2][0];
_local4 = map[_local3][_local2][1];
tiles[_local3][_local2] = _local5;
flags[_local3][_local2] = _local4;
levelMap[(("t_" + _local2) + "_") + _local3].gotoAndStop(_local5);
levelMap[(("t_" + _local2) + "_") + _local3]._x = _local2 * TILE_SIZE;
levelMap[(("t_" + _local2) + "_") + _local3]._y = _local3 * TILE_SIZE;
if (_local4 > 0) {
_local6 = Math.floor(_local4 / 100);
} else {
_local6 = Math.ceil(_local4 / 100);
}
switch (_local6) {
case TILE_START :
player.setPosition(_local2, _local3);
player.dir.x = 0;
player.dir.y = 1;
player.setAnimation();
player.speed.x = 0;
player.speed.y = 0;
break;
case TILE_DOORH :
case -TILE_DOORH :
levelMap[(("t_" + _local2) + "_") + _local3].anim.gotoAndStop(3);
break;
case TILE_DOORV :
case -TILE_DOORV :
levelMap[(("t_" + _local2) + "_") + _local3].anim.gotoAndStop(3);
break;
case TILE_COIN :
totalCoins++;
break;
case TILE_EXIT :
case -TILE_EXIT :
levelMap[(("t_" + _local2) + "_") + _local3].anim.gotoAndStop(3);
break;
}
_local8++;
_local2++;
}
_local3++;
}
currSwitches = this["switches" + currRoom];
initLasers();
}
function checkForCoins() {
if (coins == totalCoins) {
if (!isExitOpen) {
var _local2 = 0;
while (_local2 < currMapHeight) {
var _local1 = 0;
while (_local1 < currMapWidth) {
if (Math.abs(flags[_local2][_local1]) == 999) {
flags[_local2][_local1] = 998;
tiles[_local2][_local1] = tiles[_local2][_local1] + 4;
levelMap[(("t_" + _local1) + "_") + _local2].gotoAndStop(tiles[_local2][_local1]);
}
_local1++;
}
_local2++;
}
isExitOpen = true;
}
} else {
var _local4 = new Array();
var _local5 = new Array();
_local4.push(player.tile.x);
_local5.push(player.tile.y);
var _local6 = 0;
while (_local6 < numCopies) {
_local4.push(Math.floor(copies[_local6].xPos[time] / TILE_SIZE));
_local5.push(Math.floor(copies[_local6].yPos[time] / TILE_SIZE));
_local6++;
}
var _local3 = 0;
while (_local3 < _local4.length) {
if (flags[_local5[_local3]][_local4[_local3]] == (TILE_COIN * 100)) {
flags[_local5[_local3]][_local4[_local3]] = 201;
tiles[_local5[_local3]][_local4[_local3]] = 1;
levelMap[(("t_" + _local4[_local3]) + "_") + _local5[_local3]].gotoAndStop(tiles[_local5[_local3]][_local4[_local3]]);
sfxCollect.start();
coins++;
}
_local3++;
}
}
}
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) {
energy = 0;
}
}
function checkForPads() {
var _local7 = new Array();
var _local9 = new Array();
_local7.push(player.tile.x);
_local9.push(player.tile.y);
var _local5 = 0;
while (_local5 < numCopies) {
_local7.push(Math.floor(copies[_local5].xPos[time] / TILE_SIZE));
_local9.push(Math.floor(copies[_local5].yPos[time] / TILE_SIZE));
_local5++;
}
var _local3 = 0;
while (_local3 < _local7.length) {
var _local8 = flags[_local9[_local3]][_local7[_local3]];
var _local10 = Math.floor(Math.abs(_local8) / 100);
if (_local10 == TILE_PAD) {
levelMap[(("t_" + _local7[_local3]) + "_") + _local9[_local3]].gotoAndStop(18);
var _local2 = Math.abs(_local8) - (TILE_PAD * 100);
var _local4 = Math.floor(Math.abs(currSwitches[_local2].targetList[0]) / 100);
if ((_local4 == TILE_DOORH) || (_local4 == TILE_DOORV)) {
if (_local4 == TILE_DOORH) {
var _local11 = Math.abs(currSwitches[_local2].targetList[0]) - (TILE_DOORH * 100);
} else {
var _local11 = Math.abs(currSwitches[_local2].targetList[0]) - (TILE_DOORV * 100);
}
doorsAll[_local11] = true;
} else if (_local4 == TILE_PIT) {
var _local1 = 0;
while (_local1 < currSwitches[_local2].targetList.length) {
var _local6 = Math.abs(currSwitches[_local2].targetList[_local1]) - (TILE_PIT * 100);
pitsAll[_local6] = true;
_local1++;
}
}
}
_local3++;
}
}
function resetPads() {
var _local2 = 0;
while (_local2 < currMapHeight) {
var _local1 = 0;
while (_local1 < currMapWidth) {
var _local3 = Math.floor(Math.abs(flags[_local2][_local1]) / 100);
if (_local3 == TILE_PAD) {
levelMap[(("t_" + _local1) + "_") + _local2].gotoAndStop(17);
}
_local1++;
}
_local2++;
}
}
function updateLasers() {
if (isLaserFiring) {
var _local1 = 0;
while (_local1 < laserTiles.length) {
if (laserTiles[_local1] == levelMap[(("t_" + player.tile.x) + "_") + player.tile.y]) {
levelFailed();
}
_local1++;
}
}
currLaserTime++;
if ((currLaserTime > laserTimeOff) && (isLaserFiring)) {
fireLasers(false);
} else if ((currLaserTime > laserTimeOn) && (!isLaserFiring)) {
fireLasers(true);
}
}
function fireLasers(flag) {
var _local1 = 0;
while (_local1 < laserTiles.length) {
if (flag) {
laserTiles[_local1].laserBeam.gotoAndPlay("fire");
isLaserFiring = true;
} else {
laserTiles[_local1].laserBeam.gotoAndStop("off");
isLaserFiring = false;
}
_local1++;
}
currLaserTime = 0;
}
function initLasers() {
laserTiles = new Array();
var _local3 = 0;
while (_local3 < currMapHeight) {
var _local1 = 0;
while (_local1 < currMapWidth) {
var _local5 = Math.floor(Math.abs(flags[_local3][_local1]) / 100);
if (_local5 == TILE_BEAM) {
var _local4 = false;
var _local2 = 0;
while (!_local4) {
laserTiles.push(levelMap[(("t_" + (_local1 + _local2)) + "_") + _local3]);
levelMap[(("t_" + (_local1 + _local2)) + "_") + _local3].attachMovie("beam", "laserBeam", 0);
levelMap[(("t_" + (_local1 + _local2)) + "_") + _local3].laserBeam.gotoAndStop("off");
_local2++;
if (flags[_local3][_local1 + _local2] < 0) {
_local4 = true;
}
}
}
_local1++;
}
_local3++;
}
currLaserTime = 0;
isLaserFiring = false;
}
function setDoorStates() {
var _local2 = 0;
while (_local2 < currMapHeight) {
var _local1 = 0;
while (_local1 < currMapWidth) {
var _local3 = Math.abs(flags[_local2][_local1]);
var _local4 = Math.floor(_local3 / 100);
if (_local4 == TILE_DOORH) {
d = _local3 - (TILE_DOORH * 100);
if (doorsAll[d] == false) {
if (flags[_local2][_local1] > 0) {
flags[_local2][_local1] = Math.abs(flags[_local2][_local1]) * -1;
tiles[_local2][_local1] = tiles[_local2][_local1] - 4;
}
} else if (doorsAll[d] == true) {
if (flags[_local2][_local1] < 0) {
flags[_local2][_local1] = Math.abs(flags[_local2][_local1]);
tiles[_local2][_local1] = tiles[_local2][_local1] + 4;
}
}
levelMap[(("t_" + _local1) + "_") + _local2].gotoAndStop(tiles[_local2][_local1]);
if (time == 0) {
levelMap[(("t_" + _local1) + "_") + _local2].anim.gotoAndStop(3);
}
} else if (_local4 == TILE_DOORV) {
d = _local3 - (TILE_DOORV * 100);
if (((doorsAll[d] == false) && (tiles[_local2][_local1] != 5)) && (tiles[_local2][_local1] != 7)) {
if (flags[_local2][_local1] > 0) {
flags[_local2][_local1] = Math.abs(flags[_local2][_local1]) * -1;
tiles[_local2][_local1] = tiles[_local2][_local1] - 2;
tiles[_local2 - 1][_local1] = 5;
}
} else if (((doorsAll[d] == true) && (tiles[_local2][_local1] != 5)) && (tiles[_local2][_local1] != 7)) {
if (flags[_local2][_local1] < 0) {
flags[_local2][_local1] = Math.abs(flags[_local2][_local1]);
tiles[_local2][_local1] = tiles[_local2][_local1] + 2;
tiles[_local2 - 1][_local1] = 7;
}
}
levelMap[(("t_" + _local1) + "_") + _local2].gotoAndStop(tiles[_local2][_local1]);
if (time == 0) {
levelMap[(("t_" + _local1) + "_") + _local2].anim.gotoAndStop(3);
}
} else if (_local4 == TILE_PIT) {
d = _local3 - (TILE_PIT * 100);
if (pitsAll[d] == true) {
if (flags[_local2][_local1] < 800) {
flags[_local2][_local1] = flags[_local2][_local1] + 100;
tiles[_local2][_local1]++;
}
}
levelMap[(("t_" + _local1) + "_") + _local2].gotoAndStop(tiles[_local2][_local1]);
} else if (_local4 == TILE_BRIDGE) {
d = _local3 - (TILE_BRIDGE * 100);
if (pitsAll[d] == false) {
if (flags[_local2][_local1] > 799) {
flags[_local2][_local1] = flags[_local2][_local1] - 100;
tiles[_local2][_local1]--;
}
}
}
_local1++;
}
_local2++;
}
}
function closeAllDoors() {
var _local1 = 0;
while (_local1 < doorsAll.length) {
doorsAll[_local1] = false;
_local1++;
}
}
function openAllPits() {
var _local1 = 0;
while (_local1 < pitsAll.length) {
pitsAll[_local1] = false;
_local1++;
}
}
function checkForDoors() {
var _local5 = new Array();
var _local7 = new Array();
_local5.push(player.tile.x);
_local7.push(player.tile.y);
var _local2 = 0;
while (_local2 < numCopies) {
_local5.push(Math.floor(copies[_local2].xPos[time] / TILE_SIZE));
_local7.push(Math.floor(copies[_local2].yPos[time] / TILE_SIZE));
_local2++;
}
var _local1 = 0;
while (_local1 < _local5.length) {
var _local3 = flags[_local7[_local1]][_local5[_local1]];
var _local4 = Math.floor(Math.abs(_local3) / 100);
if (_local4 == TILE_DOORH) {
var _local6 = Math.abs(_local3) - (TILE_DOORH * 100);
doorsAll[_local6] = true;
} else if (_local4 == TILE_DOORV) {
var _local6 = Math.abs(_local3) - (TILE_DOORV * 100);
doorsAll[_local6] = true;
}
_local1++;
}
}
function checkForExits() {
var _local2 = player.tile.x + player.dir.x;
var _local1 = player.tile.y + player.dir.y;
if (_local1 == -1) {
levelComplete();
} else if (_local1 == currMapHeight) {
levelComplete();
}
if (_local2 == -1) {
levelComplete();
} else if (_local2 == currMapWidth) {
levelComplete();
}
}
function nextRoom() {
stopAllSounds();
completeBox._visible = false;
currRoom++;
if (currRoom < totalRooms) {
currentMap = rooms[currRoom];
jumps = numJumps[currRoom];
energy = 99;
coins = 0;
totalCoins = 0;
isExitOpen = false;
clearCopies();
buildMap(currentMap);
pauseGame();
startBox.level.text = currRoom + 1;
startBox.gotoAndPlay("start");
startBox._visible = true;
} else {
var _local2 = 0;
var _local1 = 0;
while (_local1 < rooms.length) {
_local2 = _local2 + grades[_local1];
_local1++;
}
finalGrade = Math.round(_local2 / rooms.length);
gameComplete = true;
gotoAndPlay ("menu");
}
}
function getKeyPresses() {
var _local2 = 0;
var _local1 = 0;
if (Key.isDown(37)) {
_local2 = -1;
} else if (Key.isDown(39)) {
_local2 = 1;
}
if (Key.isDown(38)) {
_local1 = -1;
} else if (Key.isDown(40)) {
_local1 = 1;
}
player.setDirection(_local2, _local1);
if (Key.isDown(32)) {
if (!isActionButton) {
if (jumps > 0) {
player.warpAnim.play();
isActionButton = true;
sfxTimeJump.start();
}
}
} else {
isActionButton = false;
}
}
function movePlayer(speed, damp) {
var _local2 = player._x;
var _local1 = player._y;
player.speed.x = player.speed.x + (speed * player.dir.x);
player.speed.y = player.speed.y + (speed * player.dir.y);
player.speed.x = player.speed.x * damp;
player.speed.y = player.speed.y * damp;
if (Math.abs(player.speed.x) < 0.5) {
player.speed.x = 0;
}
if (Math.abs(player.speed.y) < 0.5) {
player.speed.y = 0;
}
getPlayerCorners(_local2, _local1 + player.speed.y);
if (player.speed.y < 0) {
if (upLf && (upRt)) {
_local1 = _local1 + player.speed.y;
} else {
_local1 = (player.tile.y * TILE_SIZE) + player.halfHeight;
}
}
if (player.speed.y > 0) {
if (dnLf && (dnRt)) {
_local1 = _local1 + player.speed.y;
} else {
_local1 = ((player.tile.y + 1) * TILE_SIZE) - player.halfHeight;
}
}
getPlayerCorners(_local2 + player.speed.x, _local1);
if (player.speed.x < 0) {
if (dnLf && (upLf)) {
_local2 = _local2 + player.speed.x;
} else {
_local2 = (player.tile.x * TILE_SIZE) + player.halfWidth;
}
}
if (player.speed.x > 0) {
if (dnRt && (upRt)) {
_local2 = _local2 + player.speed.x;
} else {
_local2 = ((player.tile.x + 1) * TILE_SIZE) - player.halfWidth;
}
}
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.halfHeight) / TILE_SIZE);
var _local4 = Math.floor(((py + player.halfHeight) - 1) / TILE_SIZE);
var _local3 = Math.floor((px - player.halfWidth) / TILE_SIZE);
var _local1 = Math.floor(((px + player.halfWidth) - 1) / TILE_SIZE);
if (flags[_local2][_local3] < 0) {
upLf = false;
} else {
upLf = true;
}
if (flags[_local4][_local3] < 0) {
dnLf = false;
} else {
dnLf = true;
}
if (flags[_local2][_local1] < 0) {
upRt = false;
} else {
upRt = true;
}
if (flags[_local4][_local1] < 0) {
dnRt = false;
} else {
dnRt = true;
}
}
function addCopy() {
this["copy" + numCopies] = playerHolder.attachMovie("copy", "copy" + numCopies, Z_PLAYER - (numCopies + 1));
copies.push(new RecordedData());
copies[numCopies].copyData(playRecord);
var _local3 = 0;
while (_local3 < currMapHeight) {
var _local2 = 0;
while (_local2 < currMapWidth) {
if (flags[_local3][_local2] == 201) {
flags[_local3][_local2] = 200;
tiles[_local3][_local2] = 4;
levelMap[(("t_" + _local2) + "_") + _local3].gotoAndStop(tiles[_local3][_local2]);
}
_local2++;
}
_local3++;
}
if (isExitOpen) {
_local3 = 0;
while (_local3 < currMapHeight) {
var _local2 = 0;
while (_local2 < currMapWidth) {
if (Math.abs(flags[_local3][_local2]) == 998) {
flags[_local3][_local2] = -999;
tiles[_local3][_local2] = tiles[_local3][_local2] - 4;
levelMap[(("t_" + _local2) + "_") + _local3].gotoAndStop(tiles[_local3][_local2]);
levelMap[(("t_" + _local2) + "_") + _local3].anim.gotoAndStop(3);
}
_local2++;
}
_local3++;
}
isExitOpen = false;
}
fireLasers(false);
playRecord.clearData();
numCopies++;
time = 0;
coins = 0;
jumps--;
}
function playCopies() {
var _local2 = 0;
while (_local2 < numCopies) {
if (copies[_local2].xPos[time] == undefined) {
this["copy" + _local2]._visible = false;
} else {
this["copy" + _local2]._visible = true;
this["copy" + _local2]._x = copies[_local2].xPos[time];
this["copy" + _local2]._y = copies[_local2].yPos[time];
switch (copies[_local2].dir[time]) {
case 1 :
this["copy" + _local2].gotoAndPlay("up");
break;
case 2 :
this["copy" + _local2].gotoAndPlay("upright");
break;
case 3 :
this["copy" + _local2].gotoAndPlay("right");
break;
case 4 :
this["copy" + _local2].gotoAndPlay("downright");
break;
case 5 :
this["copy" + _local2].gotoAndPlay("down");
break;
case 6 :
this["copy" + _local2].gotoAndPlay("downleft");
break;
case 7 :
this["copy" + _local2].gotoAndPlay("left");
break;
case 8 :
this["copy" + _local2].gotoAndPlay("upleft");
}
}
_local2++;
}
}
function addWarpOutAnim(copy) {
var _local2 = copy.getDepth();
var _local5 = copy._x;
var _local4 = copy._y;
this["warpOut" + _local2] = playerHolder.attachMovie("warpOutClip", "warpOut" + _local2, _local2);
this["warpOut" + _local2]._x = _local5;
this["warpOut" + _local2]._y = _local4;
}
function clearCopies() {
var _local2 = 0;
while (_local2 < numCopies) {
this["copy" + _local2].removeMovieClip();
_local2++;
}
playRecord = new RecordedData();
copies = new Array();
numCopies = 0;
time = 0;
}
function sortDepths() {
var _local6 = new Array();
var _local3 = new Array();
var _local5 = new Array();
var _local7 = Z_PLAYER;
_local6.push(player);
var _local4 = 0;
while (_local4 < numCopies) {
_local6.push(this["copy" + _local4]);
_local4++;
}
var _local2 = 0;
while (_local2 < _local6.length) {
_local3.push(_local6[_local2]._y);
_local5.push(_local6[_local2]);
_local2++;
}
_local3.sort(Array.NUMERIC);
_local4 = 0;
while (_local4 < _local3.length) {
_local2 = 0;
while (_local2 < _local5.length) {
if (_local5[_local2]._y == _local3[_local4]) {
_local5[_local2].swapDepths(_local7);
_local3.splice(_local3[_local4], 1);
_local7++;
}
_local2++;
}
_local4++;
}
}
function updateHud() {
var _local1 = String(Math.ceil(energy));
txtEnergy1.text = _local1.charAt(0);
txtEnergy2.text = _local1.charAt(1);
iconEnergy.gotoAndStop(100 - Math.ceil(energy));
txtJumps.text = jumps;
txtLevel.text = currRoom + 1;
}
function levelFailed() {
sfxExplode.start();
explode._x = player._x;
explode._y = player._y;
explode.gotoAndPlay("explode");
player._visible = false;
txtEnergy1.text = 0;
txtEnergy2.text = 0;
iconEnergy.gotoAndStop(100);
pauseGame();
failedBox._visible = true;
isWaitingForRetryKey = true;
}
function levelComplete() {
pauseGame();
saveLevel(currRoom + 1);
completeBox._visible = true;
isWaitingForNextKey = true;
}
function gotoRetry() {
stopAllSounds();
player._visible = true;
jumps = numJumps[currRoom];
energy = 99;
coins = 0;
totalCoins = 0;
isExitOpen = false;
clearCopies();
buildMap(currentMap);
updateHud();
failedBox._visible = false;
pauseBox._visible = false;
startBox.level.text = currRoom + 1;
startBox.gotoAndPlay("start");
startBox._visible = true;
}
stop();
var PLAYER_SPEED = 2;
var PLAYER_DAMP = 0.65;
failedBox._visible = false;
completeBox._visible = false;
pauseBox._visible = false;
btnQuit.enabled = false;
var isWaitingForNextKey = false;
var isWaitingForRetryKey = false;
var playRecord = new RecordedData();
var copies = new Array();
var numCopies = 0;
var time = 0;
var room01 = [[[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [11, -999], [12, -999], [2, -100], [3, -100]], [[3, -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], [19, 0], [20, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [4, 200], [4, 200], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [4, 200], [1, 0], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [9, -301], [10, -301], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [11, -301], [12, -301], [2, -100], [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, -100]], [[3, -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], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [1, 0], [17, 600], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 200], [4, 200], [4, 200], [1, 0], [1, 0], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -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], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room02 = [[[3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]], [[3, -100], [2, -100], [11, -999], [12, -999], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100]], [[3, -100], [1, 0], [19, 0], [20, 0], [1, 0], [1, 100], [3, -100], [1, 0], [4, 200], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 100], [3, -100], [1, 0], [4, 200], [1, 0], [3, -100], [1, 0], [1, 0], [17, 601], [1, 0], [1, 0], [17, 602], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 100], [3, -100], [1, 0], [4, 200], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 100], [5, -402], [1, 0], [1, 0], [1, 0], [5, -403], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 100], [6, -402], [1, 0], [1, 0], [1, 0], [6, -403], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 100], [3, -100], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -301], [10, -301], [3, -100], [3, -100], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [11, -301], [12, -301], [2, -100], [2, -100], [2, -100], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [17, 600], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room03 = [[[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [11, -999], [12, -999], [2, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [19, 0], [20, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [17, 600], [1, 0], [17, 601], [1, 0], [1, 0], [1, 0], [5, -401], [1, 0], [4, 200], [4, 200], [4, 200], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [6, -401], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [3, -100], [9, -303], [10, -303], [3, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [2, -100], [11, -303], [12, -303], [2, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [3, -100], [3, -100], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [5, -402], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [2, -100], [2, -100], [2, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [6, -402], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [17, 602], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [4, 200], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 100], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [4, 200], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room04 = [[[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [11, -999], [12, -999], [2, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [23, 700], [23, 700], [23, 700], [23, 700], [3, -100], [1, 0], [19, 0], [20, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [17, 600], [1, 0], [17, 601], [1, 0], [3, -100], [1, 0], [4, 200], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [4, 200], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [4, 200], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [3, -100], [3, -100], [9, -302], [10, -302], [3, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [2, -100], [2, -100], [11, -302], [12, -302], [2, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [5, -401], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [6, -401], [1, 0], [1, 0], [1, 0], [21, 701], [21, 701], [21, 701], [21, 701], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [3, -100], [1, 0], [17, 602], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [4, 200], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room05 = [[[3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]], [[3, -100], [2, -100], [11, -999], [12, -999], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100]], [[3, -100], [1, 0], [19, 0], [20, 0], [1, 0], [1, 0], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [1, 0], [3, -100], [1, 0], [4, 200], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [1, 0], [3, -100], [1, 0], [17, 601], [17, 602], [1, 0], [3, -100]], [[3, -100], [23, 700], [23, 700], [23, 700], [23, 707], [23, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [17, 604], [17, 603], [1, 0], [3, -100]], [[3, -100], [21, 700], [21, 700], [21, 700], [21, 707], [21, 706], [21, 705], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 704], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [21, 700], [21, 700], [21, 700], [21, 701], [21, 702], [21, 703], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [3, -100], [3, -100], [9, -301], [10, -301], [3, -100], [3, -100]], [[3, -100], [21, 700], [21, 700], [21, 700], [21, 701], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [2, -100], [2, -100], [11, -301], [12, -301], [2, -100], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [1, 0], [17, 600], [1, 0], [4, 200], [4, 200], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room06 = [[[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [11, -999], [12, -999], [2, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [1, 0], [19, 0], [20, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [21, 701], [21, 701], [1, 0], [4, 200], [21, 700], [21, 700], [21, 700], [4, 200], [1, 0], [21, 702], [21, 702], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [4, 200], [21, 700], [21, 700], [21, 700], [4, 200], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [23, 702], [23, 700], [21, 700], [21, 700], [21, 700], [23, 700], [23, 701], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 100], [1, 0], [21, 700], [21, 700], [21, 702], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 701], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [17, 600], [1, 0], [21, 700], [21, 700], [23, 701], [23, 700], [21, 700], [21, 700], [21, 700], [23, 700], [23, 702], [21, 700], [21, 700], [1, 0], [1, 0], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 701], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 702], [21, 700], [21, 700], [1, 0], [1, 0], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [17, 601], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room07 = [[[3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]], [[3, -100], [2, -100], [11, -999], [12, -999], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100]], [[3, -100], [1, 0], [19, 0], [20, 0], [1, 0], [5, -402], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [6, -402], [1, 0], [1, 0], [4, 200], [4, 200], [4, 200], [1, 0], [1, 0], [3, -100], [1, 0], [17, 600], [1, 0], [17, 601], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [25, 500], [1, 0], [1, 0], [26, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [25, 500], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [26, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -303], [10, -303], [3, -100], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [11, -303], [12, -303], [2, -100], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [25, 500], [1, 0], [1, 0], [26, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [5, -401], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [6, -401], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [4, 200], [4, 200], [1, 0], [3, -100], [1, 0], [17, 602], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room08 = [[[3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]], [[3, -100], [2, -100], [11, -999], [12, -999], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100]], [[3, -100], [1, 0], [19, 0], [20, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 200], [1, 0], [3, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [17, 600], [1, 0], [3, -100]], [[3, -100], [3, 0], [9, -301], [10, -301], [3, -100], [3, -100], [1, 0], [4, 200], [1, 0], [3, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [2, 0], [11, -301], [12, -301], [2, -100], [3, -100], [1, 0], [4, 200], [1, 0], [3, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [3, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 100], [1, 0], [1, 0], [3, -100], [3, -100], [3, 700], [3, 700], [3, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [2, -100], [2, -100], [2, 700], [2, 700], [2, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [1, 0], [3, -100]], [[3, -100], [25, 500], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [26, 0], [3, -100]], [[3, -100], [25, 500], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [26, 0], [3, -100]], [[3, -100], [25, 500], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [26, 0], [3, -100]], [[3, -100], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [3, -100]], [[3, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room09 = [[[3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]], [[3, -100], [2, -100], [11, -999], [12, -999], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100]], [[3, -100], [1, 0], [19, 0], [20, 0], [1, 0], [23, 700], [23, 700], [3, -100], [4, 200], [4, 200], [3, -100], [1, 0], [1, 0], [1, 0], [23, 700], [23, 700], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [5, -403], [1, 0], [1, 0], [5, -402], [1, 0], [17, 602], [1, 0], [21, 700], [21, 700], [1, 0], [17, 601], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [21, 702], [21, 702], [6, -403], [1, 0], [1, 0], [6, -402], [1, 0], [1, 0], [1, 0], [21, 701], [21, 701], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [3, -100], [1, 0], [1, 0], [3, -100], [1, 0], [17, 604], [1, 0], [21, 700], [21, 700], [1, 0], [17, 603], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [2, -100], [4, 200], [4, 200], [2, -100], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -301], [10, -301], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [11, -301], [12, -301], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [4, 200], [4, 200], [4, 200], [1, 0], [1, 0], [1, 0], [17, 600], [1, 0], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -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], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room10 = [[[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [11, -999], [12, -999], [2, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [23, 700], [23, 700], [23, 700], [1, 0], [19, 0], [20, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [4, 200], [4, 200], [4, 200], [1, 0], [5, -401], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [6, -401], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [23, 700], [23, 703], [23, 700], [23, 700], [3, -100]], [[3, -100], [25, 500], [17, 601], [1, 0], [17, 602], [26, 0], [3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 703], [21, 700], [21, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [23, 700], [23, 700], [23, 702], [23, 700], [23, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 703], [21, 700], [21, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [21, 700], [21, 700], [21, 702], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 703], [21, 700], [21, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100], [21, 700], [21, 700], [21, 702], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 703], [21, 700], [21, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -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], [3, -100]], [[3, -100], [1, 0], [1, 100], [1, 0], [17, 600], [1, 0], [3, -100], [1, 0], [4, 200], [4, 200], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -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], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room11 = [[[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [11, -999], [12, -999], [2, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [1, 0], [19, 0], [20, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [17, 600], [1, 0], [17, 601], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [17, 602], [1, 0], [17, 603], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [23, 700], [23, 709], [23, 709], [23, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 709], [21, 709], [21, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 701], [21, 705], [21, 702], [21, 706], [21, 703], [21, 707], [21, 704], [21, 708], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [1, 0], [17, 604], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [4, 200], [4, 200], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [4, 200], [4, 200], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [4, 200], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [23, 700], [23, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var room12 = [[[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [9, -999], [10, -999], [3, -100], [3, -100]], [[3, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [2, -100], [11, -999], [12, -999], [2, -100], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [23, 700], [23, 0], [23, 0], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [23, 700], [1, 0], [19, 0], [20, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 100], [1, 0], [1, 0], [21, 700], [21, 0], [21, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 0], [21, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 0], [21, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [4, 200], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [4, 200], [4, 200], [4, 200], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [23, 700], [23, 703], [23, 700], [23, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [17, 600], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [3, -100], [27, 500], [21, 700], [21, 700], [21, 700], [21, 700], [21, 705], [21, 704], [21, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [17, 601], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [2, -100], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 700], [21, 701], [21, 700], [3, -100]], [[3, -100], [1, 0], [1, 0], [17, 602], [1, 0], [1, 0], [21, 700], [21, 700], [21, 700], [21, 700], [23, 700], [21, 700], [21, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 701], [21, 701], [1, 0], [21, 702], [21, 702], [21, 702], [1, 0], [21, 703], [21, 703], [1, 0], [4, 200], [4, 200], [1, 0], [3, -100]], [[3, -100], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [21, 700], [21, 700], [23, 700], [21, 700], [21, 700], [21, 700], [23, 700], [21, 700], [21, 700], [1, 0], [1, 0], [1, 0], [1, 0], [3, -100]], [[3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100], [3, -100]]];
var isActionButton = false;
var rooms = [room01, room02, room03, room04, room05, room06, room07, room08, room09, room10, room11, room12];
var currentMap = rooms[currRoom];
var totalRooms = rooms.length;
var SCREEN_X = 576;
var SCREEN_Y = 352;
var Z_TILES = 1000;
var Z_OBJ_LO = 2000;
var Z_PLAYER = 3000;
var Z_OBJ_HI = 4000;
var TILE_SIZE = 32;
var TILE_START = 1;
var TILE_COIN = 2;
var TILE_DOORH = 3;
var TILE_DOORV = 4;
var TILE_BEAM = 5;
var TILE_PAD = 6;
var TILE_PIT = 7;
var TILE_BRIDGE = 8;
var TILE_EXIT = 9;
var DIR_UP = 1;
var DIR_DOWN = 2;
var DIR_LEFT = 3;
var DIR_RIGHT = 4;
var tiles = new Array();
var flags = new Array();
var currMapWidth;
var currMapHeight;
var player;
var upLf = false;
var dnLf = false;
var upRt = false;
var dnRt = false;
var switches0 = new Array(new Switch("switch0", new Array(301, 301)));
var switches1 = new Array(new Switch("switch0", new Array(301, 301)), new Switch("switch1", new Array(402, 402)), new Switch("switch2", new Array(403, 403)));
var switches2 = new Array(new Switch("switch0", new Array(401, 401)), new Switch("switch1", new Array(303, 303)), new Switch("switch2", new Array(402, 402)));
var switches3 = new Array(new Switch("switch0", new Array(401, 401)), new Switch("switch1", new Array(302, 302)), new Switch("switch2", new Array(701, 703)));
var switches4 = new Array(new Switch("switch0", new Array(301, 301)), new Switch("switch1", new Array(701, 701, 702)), new Switch("switch2", new Array(702, 703, 704)), new Switch("switch3", new Array(704, 705, 706)), new Switch("switch4", new Array(706, 707, 707)));
var switches5 = new Array(new Switch("switch0", new Array(701, 701)), new Switch("switch1", new Array(702, 702)));
var switches6 = new Array(new Switch("switch0", new Array(401, 401)), new Switch("switch0", new Array(402, 402)), new Switch("switch0", new Array(303, 303)));
var switches7 = new Array(new Switch("switch0", new Array(301, 301)));
var switches8 = new Array(new Switch("switch0", new Array(301, 301)), new Switch("switch1", new Array(701, 701)), new Switch("switch2", new Array(402, 402)), new Switch("switch3", new Array(403, 403)), new Switch("switch4", new Array(702, 702)));
var switches9 = new Array(new Switch("switch0", new Array(401, 401)), new Switch("switch2", new Array(702, 702)), new Switch("switch3", new Array(703, 703)));
var switches10 = new Array(new Switch("switch0", new Array(701, 707)), new Switch("switch1", new Array(702, 708)), new Switch("switch2", new Array(704, 706)), new Switch("switch3", new Array(705, 703)), new Switch("switch4", new Array(709, 709)));
var switches11 = new Array(new Switch("switch0", new Array(701, 704)), new Switch("switch1", new Array(702, 704, 705)), new Switch("switch2", new Array(703, 705)));
var currSwitches = new Array();
var doorsAll = new Array(false, false, false, false, false, false, false, false, false, false, false, false, false);
var pitsAll = new Array(false, false, false, false, false, false, false, false, false, false, false, false, false);
var laserTiles = new Array();
var isLaserFiring = false;
var laserTimeOn = 90;
var laserTimeOff = 45;
var currLaserTime = 0;
var numJumps = new Array(1, 2, 2, 2, 2, 1, 2, 2, 3, 2, 3, 1);
var jumps = numJumps[currRoom];
var energy = 99;
var coins = 0;
var totalCoins = 0;
var isExitOpen = false;
var grades = new Array();
var finalGrade = 0;
startBox.level.text = currRoom + 1;
startBox.gotoAndPlay("start");
updateHud();
var isPaused = true;
gameInit();
completeBox.btnNext.onRelease = function () {
transitionInst.gotoAndPlay("close");
transFunc = nextRoom;
sfxClick.start();
isWaitingForNextKey = false;
};
failedBox.btnRetry.onRelease = function () {
transitionInst.gotoAndPlay("close");
transFunc = gotoRetry;
sfxClick.start();
isWaitingForRetryKey = false;
};
failedBox.btnQuit.onRelease = function () {
transitionInst.gotoAndPlay("close");
transFunc = gotoMenu;
sfxClick.start();
isWaitingForRetryKey = false;
};
btnQuit.onRelease = function () {
pauseGame();
pauseBox._visible = true;
sfxClick.start();
};
pauseBox.btnQuit.onRelease = function () {
transitionInst.gotoAndPlay("close");
transFunc = gotoMenu;
sfxClick.start();
};
pauseBox.btnRetry.onRelease = function () {
transitionInst.gotoAndPlay("close");
transFunc = gotoRetry;
sfxClick.start();
};
pauseBox.btnResume.onRelease = function () {
resumeGame();
pauseBox._visible = false;
sfxClick.start();
};
onEnterFrame = function () {
if (!isPaused) {
getKeyPresses();
movePlayer(PLAYER_SPEED, PLAYER_DAMP);
player.setAnimation();
checkForKeys();
playRecord.addData(player._x, player._y, player.dirRef);
playCopies();
sortDepths();
closeAllDoors();
openAllPits();
resetPads();
checkForPads();
checkForDoors();
checkForPits();
setDoorStates();
checkForExits();
updateLasers();
checkForCoins();
updateHud();
time++;
energy = energy - 0.05;
if (energy <= 0) {
levelFailed();
}
} else {
playCopies();
updateHud();
}
if (Key.isDown(13)) {
if (isWaitingForNextKey) {
transitionInst.gotoAndPlay("close");
transFunc = nextRoom;
sfxClick.start();
isWaitingForNextKey = false;
} else if (isWaitingForRetryKey) {
transitionInst.gotoAndPlay("close");
transFunc = gotoRetry;
sfxClick.start();
isWaitingForRetryKey = false;
}
}
};
Symbol 21 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 7
_parent._parent._parent.addCopy();
Symbol 29 MovieClip [player] Frame 1
#initclip 8
Object.registerClass("player", Player);
#endinitclip
Symbol 37 MovieClip Frame 1
stop();
Symbol 37 MovieClip Frame 7
_parent._parent._parent.addWarpOutAnim(_parent);
Symbol 46 MovieClip [copy] Frame 1
#initclip 7
Object.registerClass("copy", Player);
#endinitclip
Symbol 52 MovieClip [warpOutClip] Frame 6
this.removeMovieClip();
Symbol 235 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 236 MovieClip [__Packages.Player] Frame 0
class Player extends MovieClip
{
var stop, speed, dir, facing, tile, isUpLeft, isDownLeft, isUpRight, isDownRight, halfWidth, collisionClip, halfHeight, gotoAndStop, dirRef, _x, _y;
function Player () {
super();
stop();
speed = new Vector2D(0, 0);
dir = new Vector2D(0, 1);
facing = new Vector2D(0, 1);
tile = new Vector2D(1, 1);
isUpLeft = false;
isDownLeft = false;
isUpRight = false;
isDownRight = false;
halfWidth = collisionClip._width / 2;
halfHeight = collisionClip._height / 2;
}
function setDirection(dx, dy) {
dir.x = dx;
dir.y = dy;
}
function setAnimation() {
var _local3 = "";
var _local2 = "";
if (dir.x > 0) {
_local3 = "right";
} else if (dir.x < 0) {
_local3 = "left";
}
if (dir.y > 0) {
_local2 = "down";
} else if (dir.y < 0) {
_local2 = "up";
}
var _local4 = _local2 + _local3;
gotoAndStop(_local4);
switch (_local4) {
case "up" :
dirRef = 1;
break;
case "upright" :
dirRef = 2;
break;
case "right" :
dirRef = 3;
break;
case "downright" :
dirRef = 4;
break;
case "down" :
dirRef = 5;
break;
case "downleft" :
dirRef = 6;
break;
case "left" :
dirRef = 7;
break;
case "upleft" :
dirRef = 8;
}
}
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);
}
var TILE_SIZE = 32;
}
Symbol 237 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)));
}
}
Symbol 238 MovieClip [__Packages.TileRepeatScroller] Frame 0
class TileRepeatScroller extends MovieClip
{
var dx, dy, tiles, tWidth, tHeight, xMoved, yMoved, attachMovie;
function TileRepeatScroller () {
super();
dx = 0;
dy = 0;
tiles = 0;
tWidth = 0;
tHeight = 0;
xMoved = 0;
yMoved = 0;
}
function init(clip, dx, dy) {
this.dx = dx;
this.dy = dy;
var _local5 = false;
var _local2 = 0;
while (_local5 != true) {
attachMovie(clip, "tile" + _local2, _local2);
if (_local2 == 0) {
tWidth = this["tile" + _local2]._width;
tHeight = this["tile" + _local2]._height;
var _local3 = -tWidth;
var _local4 = -tHeight;
}
this["tile" + _local2]._x = _local3;
this["tile" + _local2]._y = _local4;
if (_local3 < 640) {
var _local3 = _local3 + tWidth;
} else if (_local4 < 480) {
var _local6 = (640 - _local3) - 39;
var _local3 = -tWidth;
var _local4 = _local4 + tHeight;
} else {
_local5 = true;
tiles = _local2 + 1;
}
_local2++;
}
}
function update() {
xMoved = xMoved + dx;
yMoved = yMoved + dy;
var _local2 = 0;
while (_local2 < tiles) {
this["tile" + _local2]._x = this["tile" + _local2]._x + dx;
this["tile" + _local2]._y = this["tile" + _local2]._y + dy;
_local2++;
}
if (xMoved >= tWidth) {
_local2 = 0;
while (_local2 < tiles) {
this["tile" + _local2]._x = this["tile" + _local2]._x - xMoved;
_local2++;
}
xMoved = 0;
}
if (yMoved >= tHeight) {
_local2 = 0;
while (_local2 < tiles) {
this["tile" + _local2]._y = this["tile" + _local2]._y - yMoved;
_local2++;
}
yMoved = 0;
}
}
}
Symbol 239 MovieClip [__Packages.RecordedData] Frame 0
class RecordedData
{
var xPos, yPos, dir, len;
function RecordedData () {
xPos = new Array();
yPos = new Array();
dir = new Array();
len = 0;
}
function addData(px, py, dir) {
xPos.push(px);
yPos.push(py);
this.dir.push(dir);
len++;
}
function copyData(src) {
clearData();
var _local2 = 0;
while (_local2 < src.len) {
if (src.xPos[_local2] != undefined) {
xPos.push(src.xPos[_local2]);
yPos.push(src.yPos[_local2]);
dir.push(src.dir[_local2]);
}
_local2++;
}
len = src.len;
}
function clearData() {
xPos.splice(0);
yPos.splice(0);
dir.splice(0);
}
}
Symbol 240 MovieClip [__Packages.Switch] Frame 0
class Switch
{
var id, targetList;
function Switch (id, target) {
this.id = id;
targetList = target;
}
}
Symbol 58 MovieClip Frame 1
stop();
sfx0 = createEmptyMovieClip("sfx0", 0);
gearClick1 = new Sound(sfx0);
gearClick1.attachSound("puzzle_gearclick1.wav");
sfx1 = createEmptyMovieClip("sfx1", 1);
gearClick2 = new Sound(sfx1);
gearClick2.attachSound("puzzle_gearclick2.wav");
sfx2 = createEmptyMovieClip("sfx2", 2);
chain = new Sound(sfx2);
chain.attachSound("puzzle_chain.wav");
sfx3 = createEmptyMovieClip("sfx3", 3);
metalClang = new Sound(sfx3);
metalClang.attachSound("puzzle_metalclang.wav");
Symbol 75 MovieClip Frame 3
stop();
Symbol 79 MovieClip Frame 3
stop();
Symbol 83 MovieClip Frame 3
stop();
Symbol 84 MovieClip Frame 3
stop();
Symbol 88 MovieClip Frame 3
stop();
Symbol 90 MovieClip Frame 3
stop();
Symbol 94 MovieClip Frame 3
stop();
Symbol 96 MovieClip Frame 3
stop();
Symbol 98 MovieClip Frame 3
stop();
Symbol 99 MovieClip Frame 3
stop();
Symbol 101 MovieClip Frame 3
stop();
Symbol 102 MovieClip Frame 3
stop();
Symbol 121 MovieClip [beam] Frame 1
stop();
Symbol 121 MovieClip [beam] Frame 11
stop();
Symbol 121 MovieClip [beam] Frame 25
gotoAndStop ("on");
Symbol 125 MovieClip Frame 1
_visible = false;
Symbol 126 MovieClip [bgScroller] Frame 1
#initclip 9
Object.registerClass("bgScroller", TileRepeatScroller);
#endinitclip
Symbol 179 MovieClip Frame 20
stop();
Symbol 180 MovieClip Frame 31
stop();
_parent._parent._parent._parent.fireworkBang();
Symbol 182 MovieClip Frame 1
stop();
Symbol 182 MovieClip Frame 11
stop();
Symbol 190 MovieClip Frame 1
blocker.useHandCursor = false;
Symbol 191 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 13
_parent.transFunc();
Symbol 191 MovieClip Frame 24
gotoAndStop ("off");
Symbol 202 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 61
stop();
_parent.resumeGame();
_visible = false;