Frame 1
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
this.loadBar._width = getPercent * 100;
this.loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
Instance of Symbol 512 MovieClip in Frame 1
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
var getPercent = (bytes_loaded / bytes);
if (bytes_loaded == bytes) {
_root.gotoAndPlay(2);
this.loadtxt = "Done";
} else {
_root.gotoAndStop(1);
this.loadtxt = Math.round(getPercent * 100) + "%";
}
}
Frame 2
this.gotoAndPlay(1);
Frame 3
stop();
_root.the_container.attachMovie("the_game", "the_game1", this.getNextHighestDepth(), {_x:0, _y:0});
_root.the_container._xscale = 62.5;
_root.the_container._yscale = 62.5;
Symbol 52 MovieClip [the_game] Frame 1
function changeSoundVolume(clip, track, targetVolume, forceStart, nextTrack) {
var volumeIncrement = 1;
var i = track.getVolume();
if (forceStart) {
i = 0;
track.setVolume(i);
track.start(0, 99);
} else if (i > targetVolume) {
volumeIncrement = volumeIncrement * -1;
}
clip.onEnterFrame = function () {
if (i == targetVolume) {
delete clip.onEnterFrame;
if (nextTrack) {
changeSoundVolume(clip, nextTrack, 100, true);
}
} else if (i > 100) {
track.setVolume(100);
delete clip.onEnterFrame;
if (nextTrack) {
changeSoundVolume(clip, nextTrack, 100, true);
}
} else if (i < 0) {
trackName.setVolume(0);
delete clip.onEnterFrame;
if (nextTrack) {
changeSoundVolume(clip, nextTrack, 100, true);
}
} else {
i = i + volumeIncrement;
track.setVolume(i);
}
};
}
function loadLevelMenu(fromwhere) {
_root.levelMenu.removeMovieClip();
_root.attachMovie("levelMenu", "levelMenu", _root.getNextHighestDepth());
if (fromwhere == "gamestart") {
levelMenu.gotoAndStop(4);
} else {
levelMenu.gotoAndStop(2);
}
_root.levelMenu.onEnterFrame = function () {
levelMenu.logo_animations.btn_maxgames_animation.onRelease = function () {
getURL ("http://www.maxgames.com", _blank);
};
levelMenu.gameVer.text = "Ver. 1.2";
if (levelMenu._currentframe == 1) {
playMenuMusic();
if (levelMedals.level1 == null) {
levelMenu.continue_btn._alpha = 20;
levelMenu.continue_btn.enabled = false;
} else {
levelMenu.continue_btn._alpha = 100;
levelMenu.continue_btn.enabled = true;
}
levelMenu.newgame_btn.onRelease = function () {
gamedata_so.clear();
newGame();
levelMenu.gotoAndStop(2);
};
levelMenu.continue_btn.onRelease = function () {
levelMenu.gotoAndStop(2);
};
levelMenu.credits_btn.onRelease = function () {
levelMenu.gotoAndStop(5);
};
levelMenu.btn_maxgames_menus.onRelease = function () {
getURL ("http://www.maxgames.com/", _blank);
};
levelMenu.btn_nupixo_menu.onRelease = function () {
getURL ("http://www.nupixo.com/games", _blank);
};
}
if (levelMenu._currentframe == 5) {
levelMenu.rootmenu_btn.onRelease = function () {
levelMenu.gotoAndStop(1);
};
}
if (levelMenu._currentframe == 6) {
levelMenu.rootmenu_btn.onRelease = function () {
levelMenu.gotoAndStop(1);
};
}
if (levelMenu._currentframe == 2) {
playMenuMusic();
levelMenu.backtowelcome_btn.onRelease = function () {
levelMenu.gotoAndStop(1);
};
levelMenu.btn_maxgames_menus.onRelease = function () {
getURL ("http://www.maxgames.com/", _blank);
};
var _local2 = 1;
while (_local2 <= 15) {
levelMenu["btn_stageselect" + _local2]._alpha = 15;
prevLevelPassed = _local2 - 1;
levelMenu["selectLevel_btn" + _local2].levelValue = _local2;
levelMenu.btn_stageselect1._alpha = 100;
levelMenu.selectLevel_btn1.onRelease = function () {
loadLevel(1);
};
if (((levelMenu["theMedalWon" + prevLevelPassed]._currentframe == 2) || (levelMenu["theMedalWon" + prevLevelPassed]._currentframe == 3)) || (levelMenu["theMedalWon" + prevLevelPassed]._currentframe == 4)) {
levelMenu["btn_stageselect" + _local2]._alpha = 100;
levelMenu["selectLevel_btn" + _local2].onRelease = function () {
loadLevel(this.levelValue);
};
}
if ((levelMedals["level" + _local2] == "3") && ((prevLevelMedals["level" + _local2] == "3") || (prevLevelMedals["level" + _local2] == null))) {
levelMenu["theMedalWon" + _local2].gotoAndStop(4);
}
if (((levelMedals["level" + _local2] == "2") && ((prevLevelMedals["level" + _local2] == "3") || (prevLevelMedals["level" + _local2] == null))) || (prevLevelMedals["level" + _local2] == "2")) {
levelMenu["theMedalWon" + _local2].gotoAndStop(3);
}
if ((levelMedals["level" + _local2] == "1") || (prevLevelMedals["level" + _local2] == "1")) {
levelMenu["theMedalWon" + _local2].gotoAndStop(2);
}
_local2++;
}
}
};
}
function loadLevelGlobal() {
ground = 660;
floorOne = 520;
floorTwo = 380;
floorThree = 240;
initial_playerx = 560;
initial_playery = ground - 61;
mainTimer = 0;
greenGems = 0;
prisonersRescued = 0;
bonusItems = 0;
teleport_distancex = 320;
teleport_distancey = 280;
cloaking = false;
easing = 5;
xspeed = 0;
yspeed = 0;
max_yspeed = 20;
walk_speed = 10;
scroll_speed = 10;
bg1_multiplier = 0.05;
bg2_multiplier = 0.1;
bg3_multiplier = 0.5;
climb_speed = 2;
climbing = false;
jumping = false;
walking = false;
falling = false;
lockpicking = false;
teleportingy = false;
teleportingx = false;
centeringx = false;
can_jump = true;
alert_level = 0;
alert_level_speed = 26;
safe_level_speed = 0.5;
patrolTowardRight = true;
patrolTowardLeft = false;
platformGoingUp = true;
platformGoingDown = false;
dead = false;
finished = false;
menuMusicPlaying = false;
gravity = 4;
jump_power = 40;
walking_while_jumping = false;
var _local6 = 16777215 /* 0xFFFFFF */;
var _local12 = 0.5;
var _local9 = 3;
var _local8 = 3;
var _local10 = 4;
var _local4 = 5;
var _local7 = false;
var _local11 = false;
var _local5 = new flash.filters.GlowFilter(_local6, _local12, _local9, _local8, _local10, _local4, _local7, _local11);
var filterArray = new Array();
filterArray.push(_local5);
onEnterFrame = function () {
stealthBar.hudGreenGems.text = greenGems;
stealthBar.hudPrisoners.text = prisonersRescued;
stealthBar.hudCloak.text = cloak;
stealthBar.hudTeleport.text = teleport;
display.text = mainTimer;
infobox.text = levelMedals.level1;
log.text = levelMedals.level2;
state.text = levelMedals.level3;
stealthBar.stealthFill._width = alert_level;
if (((((mainTimer >= 0) && (!dead)) && (!finished)) && (levelRendered)) && (!isPaused)) {
mainTimer++;
clock = Math.round(mainTimer / 30);
}
stealthBar.btn_maxgames_ingame.onRelease = function () {
getURL ("http://www.maxgames.com/", _blank);
};
if (((alert_level > 200) && (!dead)) && (!deadScreenBg._visible)) {
danger.text = "DEAD!";
dead = true;
deadScreen();
}
};
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:initial_playerx, _y:initial_playery});
player.onEnterFrame = function () {
if (((!finished) && (levelRendered)) && (!isPaused)) {
sp1.teleportBeam._x = player._x;
sp1.teleportBeam._y = player._y;
if (((((((Key.isDown(37) && (!Key.isDown(39))) && (!Key.isDown(32))) && (!lockpicking)) && (!teleportingx)) && (!teleportingy)) && (!predict_wall_left_side())) && (!dead)) {
if (this._xscale != -100) {
this._xscale = -100;
}
if ((this._currentframe != 2) && (!jumping)) {
this.gotoAndPlay(2);
}
lev._x = lev._x + scroll_speed;
bg1._x = bg1._x + (scroll_speed * bg1_multiplier);
bg2._x = bg2._x + (scroll_speed * bg2_multiplier);
bg3._x = bg3._x + (scroll_speed * bg3_multiplier);
fg1._x = fg1._x + scroll_speed;
fg2._x = fg2._x + scroll_speed;
fg3._x = fg3._x + scroll_speed;
walking = true;
}
if ((((((Key.isDown(39) && (!Key.isDown(32))) && (!lockpicking)) && (!teleportingx)) && (!teleportingy)) && (!predict_wall_right_side())) && (!dead)) {
if (this._xscale != 100) {
this._xscale = 100;
}
if ((this._currentframe != 2) && (!jumping)) {
this.gotoAndPlay(2);
}
lev._x = lev._x - scroll_speed;
bg1._x = bg1._x - (scroll_speed * bg1_multiplier);
bg2._x = bg2._x - (scroll_speed * bg2_multiplier);
bg3._x = bg3._x - (scroll_speed * bg3_multiplier);
fg1._x = fg1._x - scroll_speed;
fg2._x = fg2._x - scroll_speed;
fg3._x = fg3._x - scroll_speed;
walking = true;
}
if ((!Key.isDown(39)) && (!Key.isDown(37))) {
walking = false;
}
if (Key.isDown(39) || (Key.isDown(37))) {
if (Key.isDown(32)) {
sp1.teleportBeam._visible = 100;
if (this._currentframe != 1) {
this.gotoAndPlay(1);
}
}
}
if (Key.isDown(38)) {
if (Key.isDown(32)) {
sp1.teleportBeam._visible = 0;
}
}
if (((((((((Key.isDown(38) && (can_jump)) && (!jumping)) && (!climbing)) && (!jumppressed)) && (!lockpicking)) && (!Key.isDown(32))) && (!teleportingx)) && (!teleportingy)) && (!dead)) {
yspeed = yspeed - jump_power;
jumping = true;
jumppressed = true;
walking = false;
jumpDelay = 1;
}
if ((yspeed > 0) && (!platform_under_my_feet())) {
sp1.teleportBeam._visible = 0;
if (this._currentframe != 3) {
this.gotoAndPlay(3);
}
}
if ((yspeed < 0) && (jumping)) {
if (this._currentframe != 4) {
this.gotoAndPlay(4);
}
}
if (((yspeed == 0) && (platform_under_my_feet())) && (!walking)) {
if (this._currentframe != 1) {
this.gotoAndPlay(1);
}
}
if ((predict_wall_right_side() && (platform_under_my_feet())) || (predict_wall_left_side() && (platform_under_my_feet()))) {
if (this._currentframe != 1) {
this.gotoAndPlay(1);
}
}
if ((!Key.isDown(38)) && (this._currentframe != 3)) {
if (jumpDelay == 0) {
jumppressed = false;
}
}
if (teleport_impossible_up()) {
sp1.teleportBeam.teleport_arrow_up._visible = 0;
} else if (!teleport_impossible_up()) {
sp1.teleportBeam.teleport_arrow_up._visible = 100;
}
if (teleport_impossible_right()) {
sp1.teleportBeam.teleport_arrow_right._visible = 0;
} else if (!teleport_impossible_right()) {
sp1.teleportBeam.teleport_arrow_right._visible = 100;
}
if (teleport_impossible_left()) {
sp1.teleportBeam.teleport_arrow_left._visible = 0;
} else if (!teleport_impossible_left()) {
sp1.teleportBeam.teleport_arrow_left._visible = 100;
}
if ((((((Key.isDown(32) && (!lockpicking)) && (!teleportingx)) && (!teleportingy)) && (!walking)) && (!jumping)) && (!dead)) {
sp1.teleportBeam._visible = 100;
if (this._currentframe != 1) {
this.gotoAndPlay(1);
}
if ((Key.isDown(38) && (teleport > 0)) && (!teleport_impossible_up())) {
lev.objects.attachMovie("smoke", "smoke", lev.objects.getNextHighestDepth(), {_x:player._x + (lev._x * -1), _y:player._y});
this._y = this._y - teleport_distancey;
teleportingy = true;
teleport = teleport - 1;
sp1.teleportBeam._visible = 0;
}
if ((Key.isDown(39) && (teleport > 0)) && (!teleport_impossible_right())) {
lev.objects.attachMovie("smoke", "smoke", lev.objects.getNextHighestDepth(), {_x:player._x + (lev._x * -1), _y:player._y});
this._x = this._x + teleport_distancex;
teleportingx = true;
teleport = teleport - 1;
whatx = fg2._x - teleport_distancex;
whatxx = bg1._x - (teleport_distancex * bg1_multiplier);
whatxxx = bg2._x - (teleport_distancex * bg2_multiplier);
whatxxxx = bg3._x - (teleport_distancex * bg3_multiplier);
sp1.teleportBeam._visible = 0;
}
if ((Key.isDown(37) && (teleport > 0)) && (!teleport_impossible_left())) {
lev.objects.attachMovie("smoke", "smoke", lev.objects.getNextHighestDepth(), {_x:player._x + (lev._x * -1), _y:player._y});
this._x = this._x - teleport_distancex;
teleportingx = true;
teleport = teleport - 1;
whatx = fg2._x + teleport_distancex;
whatxx = bg1._x + (teleport_distancex * bg1_multiplier);
whatxxx = bg2._x + (teleport_distancex * bg2_multiplier);
whatxxxx = bg3._x + (teleport_distancex * bg3_multiplier);
sp1.teleportBeam._visible = 0;
}
}
if (!Key.isDown(32)) {
teleportingy = false;
sp1.teleportBeam._visible = 0;
}
if ((((((((((Key.isDown(40) && (can_jump)) && (!jumping)) && (!climbing)) && (!jumppressed)) && (!lockpicking)) && (!Key.isDown(32))) && (!teleportingx)) && (!teleportingy)) && (this._y <= 480)) && (!dead)) {
if (this._currentframe != 3) {
this.gotoAndPlay(3);
}
this._y = this._y + 14;
yspeed = yspeed + jump_power;
jumping = true;
jumppressed = true;
walking = false;
jumpDelay = 1;
}
if (((Key.isDown(88) && (!cloaking)) && (cloak > 0)) && (!dead)) {
cloaking = true;
cloakDelay = 75;
this._alpha = 30;
player.filters = filterArray;
cloak = cloak - 1;
heartbeat = new Sound(soundEffects);
heartbeat.attachSound("heartbeat");
heartbeat.start();
}
if (cloaking) {
if (cloakDelay > 0) {
cloakDelay--;
} else if (cloakDelay == 0) {
cloaking = false;
this._alpha = 100;
player.filters = undefined;
heartbeat.stop();
}
}
if (!climbing) {
yspeed = yspeed + gravity;
}
if (yspeed > max_yspeed) {
yspeed = max_yspeed;
}
forecast_x = this._x + xspeed;
forecast_y = this._y + yspeed;
while (_root.lev.platforms.hitTest(forecast_x, (forecast_y + (this._height / 2)) - 1, true)) {
forecast_y--;
if (yspeed > 0) {
if ((((!jumping) && (!walking)) && (this._currentframe != 1)) && (!Key.isDown(32))) {
this.gotoAndPlay(1);
}
if (dead) {
this.gotoAndPlay(5);
}
xspeed = 0;
yspeed = 0;
jumping = false;
}
}
if (_root.lev.objects.finish_line.hitTest((forecast_x - (this._width / 2)) + 1, forecast_y, true)) {
getScore();
finished = true;
this.gotoAndStop(1);
levelCompleteSound = new Sound(soundEffects);
levelCompleteSound.attachSound("levelCompleteSound");
levelCompleteSound.start();
levelTrack.stop();
levelCompleteTrack = new Sound(soundTracksSwap);
levelCompleteTrack.attachSound("track4");
changeSoundVolume(soundTracksSwap, levelCompleteTrack, 100, true);
levelComplete.swapDepths(3000);
}
while (_root.lev.walls.hitTest((forecast_x - (this._width / 2)) + 1, forecast_y, true)) {
forecast_x++;
xspeed = 0;
trace("wall");
}
while (_root.lev.walls.hitTest(forecast_x + (this._width / 2), forecast_y, true)) {
forecast_x--;
xspeed = 0;
}
this._x = forecast_x;
this._y = forecast_y;
if (teleportingx) {
easer(this, "_x", initial_playerx, easing);
easer(sp1.teleportBeam, "_x", initial_playerx, easing);
easer(fg1, "_x", whatx, easing);
easer(fg2, "_x", whatx, easing);
easer(fg3, "_x", whatx, easing);
easer(bg1, "_x", whatxx, easing);
easer(bg2, "_x", whatxxx, easing);
easer(bg3, "_x", whatxxxx, easing);
easer(lev, "_x", whatx, easing);
if (((((((((this._x == initial_playerx) && (fg1._x == whatx)) && (fg2._x == whatx)) && (fg3._x == whatx)) && (bg1._x == whatxx)) && (bg2._x == whatxxx)) && (bg3._x == whatxxxx)) && (sp1.teleportBeam._x == initial_playerx)) && (lev._x == whatx)) {
teleportingx = false;
lev.objects.smoke.removeMovieClip();
}
}
if (!jumping) {
if (jumpDelay > 0) {
jumpDelay--;
}
}
if (((this._y > 800) && (!dead)) && (!deadScreenBg._visible)) {
danger.text = "DEAD!";
deadFall = true;
dead = true;
deadScreen();
}
if (this._y > 610) {
this.swapDepths(fg1);
}
var _local3 = 1;
while (_local3 <= 8) {
if (_root.lev.objects["tutorialWall" + _local3].hitTest((forecast_x - (this._width / 2)) + 1, forecast_y, true)) {
openTutorialPopup(_local3);
}
_local3++;
}
}
};
easer = function (mc, prop, trgt, ease) {
if (((mc[prop] <= (trgt + 1)) and (mc[prop] >= (trgt - 1))) and (mc[prop] != trgt)) {
mc[prop] = trgt;
} else if ((mc[prop] > (trgt + 1)) or (mc[prop] < (trgt - 1))) {
mc[prop] = mc[prop] + ((trgt - mc[prop]) / ease);
}
};
}
function platform_under_my_feet() {
return(_root.lev.platforms.hitTest(player._x, (player._y + (player._height / 2)) + 6, true));
}
function predict_wall_right_side() {
return(_root.lev.walls.hitTest((forecast_x + (player._width / 2)) + 10, forecast_y, true));
}
function predict_wall_left_side() {
return(_root.lev.walls.hitTest((forecast_x - (player._width / 2)) - 10, forecast_y, true));
}
function teleport_impossible_up() {
return(player._y <= (floorTwo - (player._height / 2)));
}
function teleport_impossible_right() {
return((lev._x + lev.objects.finish_line._x) < 1280);
}
function teleport_impossible_left() {
return(lev._x > 0);
}
function deadScreen() {
levelTrack.stop();
var _local2 = 1;
while (_local2 <= 10) {
_root.lev.objects["prisoner" + _local2].qtEventLockpick.removeMovieClip();
_local2++;
}
_root.tutorialPopup.removeMovieClip();
turnThisDark(fg1);
turnThisDark(fg2);
turnThisDark(fg3);
turnThisBlack(lev.objects);
turnThisBlack(player);
_root.attachMovie("deadScreenBg", "deadScreenBg", 310, {_x:0, _y:0});
_root.attachMovie("deadScreenText", "deadScreenText", 2800, {_x:640, _y:360});
if ((!deadSpiked) && (!deadFall)) {
deadScreenText.deadReason.text = "You were detected!";
} else {
deadScreenText.deadReason.text = "You were killed!";
}
deadScreenText.btn_replay2.onRelease = function () {
resetGame();
loadLevel(currentLevel);
};
deadScreenText.backtowelcome3_btn.onRelease = function () {
resetGame();
loadLevelMenu();
levelMenu.gotoAndStop(2);
};
gameOver = new Sound(soundEffects);
gameOver.attachSound("gameOver");
gameOver.start();
}
function turnThisBlack(mc) {
var _local1 = new Color(mc);
_local1.setRGB(0);
}
function turnThisDark(mc) {
var _local1 = new Color(mc);
_local1.setRGB(2097152);
}
function openHudInventory(item) {
_root.attachMovie("hudInventory", "hudInventory", 2900, {_x:70, _y:150});
hudInventory._alpha = 0;
hudInventory.hudInventoryText.text = item;
_root.hudInventory.onEnterFrame = function () {
if (this._y < 160) {
this._alpha = this._alpha + 5;
this._y = this._y + 0.5;
}
if ((this._y >= 160) && (this._y < 170)) {
this._alpha = this._alpha - 5;
this._y = this._y + 0.5;
}
if (this._y >= 170) {
this.removeMovieClip();
}
};
}
function displayObjectives(obj) {
_root.attachMovie("hudObjectives", "hudObjectives", 2900, {_x:640, _y:300});
hudObjectives._alpha = 0;
hudObjectives.hudObjectivesText.htmlText = obj;
_root.hudObjectives.onEnterFrame = function () {
if (this._y < 310) {
this._alpha = this._alpha + 5;
this._y = this._y + 0.2;
}
if ((this._y >= 310) && (this._y < 320)) {
this._alpha = this._alpha - 5;
this._y = this._y + 0.2;
}
if (this._y >= 320) {
this.removeMovieClip();
}
};
}
function loadLevel(levelNumber) {
currentLevel = levelNumber;
_root.levelMenu.removeMovieClip();
switch (levelNumber) {
case 1 :
loadLevel1();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 2 :
loadLevel2();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 3 :
loadLevel3();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 4 :
loadLevel4();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 5 :
loadLevel5();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 6 :
loadLevel6();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 7 :
loadLevel7();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 8 :
loadLevel8();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 9 :
loadLevel9();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 10 :
loadLevel10();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 11 :
loadLevel11();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 12 :
loadLevel12();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 13 :
loadLevel13();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 14 :
loadLevel14();
displayObjectives(((("<u>Objectives:</u><br>Rescue at least " + reqPrisoners) + " prisoner(s)<br>Collect at least ") + reqGems) + " gemstones");
break;
case 15 :
loadLevel15();
displayObjectives(("<u>Objectives:</u><br>Rescue the village elder!<br>Collect at least " + reqGems) + " gemstones");
}
var _local2;
if (Math.ceil(Math.random() * 1000) % 2) {
_local2 = "track2";
} else {
_local2 = "track6";
}
trace("playing track " + _local2);
levelTrack = new Sound(soundTracks);
levelTrack.attachSound(_local2);
changeSoundVolume(soundTracks, levelTrack, levelTrackStartVolume, true);
}
function playCutScene() {
viewedCutScene1 = true;
_root.attachMovie("cutScene1", "cutScene1", _root.getNextHighestDepth());
cutScene1.gotoAndPlay();
_root.cutScene1.onEnterFrame = function () {
if (cutScene1._currentframe == cutScene1._totalframes) {
pauseGame();
this.removeMovieClip();
}
};
}
function getScore() {
_root.levelComplete.removeMovieClip();
_root.attachMovie("levelComplete", "levelComplete", _root.getNextHighestDepth());
_root.levelComplete.onEnterFrame = function () {
levelComplete.btn_replay.onRelease = function () {
resetGame();
loadLevel(currentLevel);
};
levelComplete.backtowelcome2_btn.onRelease = function () {
resetGame();
loadLevelMenu();
levelMenu.gotoAndStop(1);
};
levelComplete.btn_maxgames_menus.onRelease = function () {
getURL ("http://www.maxgames.com/", _blank);
};
levelComplete.btn_next.onRelease = function () {
resetGame();
if (currentLevel != 15) {
loadLevel(currentLevel + 1);
} else {
loadLevelMenu();
levelMenu.gotoAndStop(6);
}
};
if ((levelMedals["level" + currentLevel] < 4) || (prevLevelMedals["level" + currentLevel] < 4)) {
levelComplete.btn_next._alpha = 100;
levelComplete.btn_next.enabled = true;
if (Key.isDown(78)) {
resetGame();
if (currentLevel != 15) {
loadLevel(currentLevel + 1);
} else {
loadLevelMenu();
levelMenu.gotoAndStop(6);
}
}
} else {
levelComplete.btn_next._alpha = 20;
levelComplete.btn_next.enabled = false;
}
};
if (bonusItemsTotal == undefined) {
bonusItemsTotal = 0;
}
levelComplete.whatLevel.text = currentLevel;
levelComplete.totalGems.text = (greenGems + "/") + greenGemsTotal;
levelComplete.totalRescued.text = (prisonersRescued + "/") + prisonersTotal;
levelComplete.totalBonus.text = (bonusItems + "/") + bonusItemsTotal;
myScore = 0;
prisExtra = 0;
gemExtra = 0;
bonusExtra = 0;
myExtra = 0;
if (greenGems >= reqGems) {
myScore = myScore + 1000;
gemExtra = ((greenGems - reqGems) / (greenGemsTotal - reqGems)) * 100;
if (isNaN(gemExtra)) {
gemExtra = 100;
}
trace("passedGems");
levelComplete.objective_gems.gotoAndStop(2);
}
if (prisonersRescued >= reqPrisoners) {
myScore = myScore + 1000;
prisExtra = ((prisonersRescued - reqPrisoners) / (prisonersTotal - reqPrisoners)) * 100;
if (isNaN(prisExtra)) {
prisExtra = 100;
}
trace("passedPrisoners");
levelComplete.objective_prisoners.gotoAndStop(2);
}
if (bonusItems > 0) {
bonusExtra = (bonusItems / bonusItemsTotal) * 100;
}
myExtra = ((prisExtra * 0.333333333333333) + (gemExtra * 0.333333333333333)) + (bonusExtra * 0.333333333333333);
if (myExtra > 99) {
myScore = myScore + 1000;
trace("he = " + myExtra);
} else if ((myExtra >= 50) && (myExtra < 100)) {
myScore = myScore + 500;
trace("te = " + myExtra);
}
if (myScore < 2000) {
var _local2 = 0;
} else if ((myScore >= 2000) && (myScore < 2500)) {
var _local2 = 60;
} else if ((myScore >= 2500) && (myScore < 3000)) {
var _local2 = 80;
} else if (myScore >= 3000) {
var _local2 = 100;
}
if ((_local2 >= 100) && (bonusExtra == 100)) {
levelComplete.medal_flag.gotoAndStop(4);
if (prevLevelMedals["level" + currentLevel] < levelMedals["level" + currentLevel]) {
prevLevelMedals["level" + currentLevel] = prevLevelMedals["level" + currentLevel];
} else {
prevLevelMedals["level" + currentLevel] = levelMedals["level" + currentLevel];
}
levelMedals["level" + currentLevel] = "1";
} else if (_local2 >= 80) {
levelComplete.medal_flag.gotoAndStop(3);
if (prevLevelMedals["level" + currentLevel] < levelMedals["level" + currentLevel]) {
prevLevelMedals["level" + currentLevel] = prevLevelMedals["level" + currentLevel];
} else {
prevLevelMedals["level" + currentLevel] = levelMedals["level" + currentLevel];
}
levelMedals["level" + currentLevel] = "2";
} else if (_local2 >= 60) {
levelComplete.medal_flag.gotoAndStop(2);
if (prevLevelMedals["level" + currentLevel] < levelMedals["level" + currentLevel]) {
prevLevelMedals["level" + currentLevel] = prevLevelMedals["level" + currentLevel];
} else if (_local2 >= 60) {
prevLevelMedals["level" + currentLevel] = levelMedals["level" + currentLevel];
}
levelMedals["level" + currentLevel] = "3";
} else {
levelComplete.medal_flag.gotoAndStop(0);
if (prevLevelMedals["level" + currentLevel] < levelMedals["level" + currentLevel]) {
prevLevelMedals["level" + currentLevel] = prevLevelMedals["level" + currentLevel];
} else {
prevLevelMedals["level" + currentLevel] = levelMedals["level" + currentLevel];
}
levelMedals["level" + currentLevel] = "4";
}
gamedata_so.clear();
var _local3 = new Array();
_local3.push(levelMedals);
gamedata_so.data.levelMedals = _local3;
var _local4 = new Array();
_local4.push(prevLevelMedals);
gamedata_so.data.prevLevelMedals = _local4;
gamedata_so.flush();
if ((clock < 60) && (myScore >= 2000)) {
myScore = myScore + ((60 - clock) * 20);
timeBonus = (60 - clock) * 20;
levelComplete.totalClock.text = timeBonus;
}
levelComplete.totalScore.text = myScore;
}
function newGame() {
var _local1 = 1;
while (_local1 <= 15) {
levelMedals["level" + _local1] = null;
_local1++;
}
viewedCutScene1 = false;
}
function pauseGame() {
pauseSound = new Sound(soundEffects);
pauseSound.attachSound("pauseSound");
isPaused = !isPaused;
if (isPaused) {
_root.pauseScreen.removeMovieClip();
_root.attachMovie("pauseScreen", "pauseScreen", _root.getNextHighestDepth());
_root.pauseScreen.pauseScreenText.htmlText = "Game Paused<br><br>Tip: Special abilities can be used in combination.<br>Try teleporting immediately after cloaking to reach positions previously thought impossible.";
_root.pauseScreen.onEnterFrame = function () {
if (!cutScene1) {
pauseScreen.btn_continue_unpause.onRelease = function () {
pauseSound.start(0, 1);
_root.pauseScreen.removeMovieClip();
isPaused = false;
};
}
};
}
if (!isPaused) {
pauseSound.start(0, 1);
_root.pauseScreen.removeMovieClip();
trace("unpaused");
}
}
function openTutorialPopup(number) {
tutorialSound = new Sound(soundEffects);
tutorialSound.attachSound("tutorialSound");
_root.lev.objects["tutorialWall" + number].removeMovieClip();
_root.tutorialPopup.removeMovieClip();
_root.attachMovie("tutorialPopup", "tutorialPopup", _root.getNextHighestDepth());
switch (number) {
case 1 :
var _local2 = "<b>Welcome to the tutorial level!</b><br><br>Use the \"forward\" and \"back\" arrow keys to move. Press \"up\" to jump.<br><br>HINT: Backtracking can be useful for collecting certain items.";
break;
case 2 :
_local2 = "<b>Objectives:</b><br><br>Help the villagers take back what the evil samurai clan stole from them by collecting as many gemstones as you can.<br><br>You can restart at any time by pressing \"r\".";
tutorialSound.start(0, 1);
break;
case 3 :
_local2 = "<b>Avoiding Detection:</b><br><br>Avoid hostile enemies by paying attention to their field of detection.<br><br>Try jumping on the tree to avoid the guard. Press the \"down\" key to quickly drop off any platform.";
tutorialSound.start(0, 1);
break;
case 4 :
_local2 = "<b>Cloaking:</b><br><br>Pickup the blue orb. You can avoid enemies by using the cloak ability.<br><br>Press \"x\" to trigger it, but remember, cloaking only lasts 3 seconds.";
tutorialSound.start(0, 1);
break;
case 5 :
_local2 = "<b>Teleporting:</b><br><br>Pickup the red orbs. Use this ability to reach positions normally out of reach.<br><br>Hold \"space\" and press the arrow key in the desired direction to teleport.";
tutorialSound.start(0, 1);
break;
case 6 :
_local2 = "<b>Rescue Prisoners:</b><br><br>Rescuing captured villagers will earn you mission points.<br><br>When approaching a prisoner, free them by entering the correct key sequence (WASD) before the lock breaks.";
tutorialSound.start(0, 1);
break;
case 7 :
_local2 = "You are approaching the end of the stage!<br><br>You must reach the exit marker for each stage to complete it.";
tutorialSound.start(0, 1);
}
_root.tutorialPopup.tutorialPopupText.htmlText = _local2;
}
function resetGame() {
menuTrack.stop();
levelTrack.stop();
levelCompleteTrack.stop();
danger.text = "reset";
deadFall = false;
deadSpiked = false;
dead = false;
isPaused = false;
mainTimer = 0;
greenGems = 0;
prisonersRescued = 0;
bonusItems = 0;
reqGems = 0;
reqPrisoners = 0;
cloaking = false;
climbing = false;
jumping = false;
walking = false;
falling = false;
lockpicking = false;
teleportingy = false;
teleportingx = false;
centeringx = false;
can_jump = true;
alert_level = 0;
platformGoingUp = true;
platformGoingDown = false;
finished = false;
levelRendered = false;
menuMusicPlaying = false;
_root.deadScreenBg.removeMovieClip();
_root.deadScreenText.removeMovieClip();
_root.bg1.removeMovieClip();
_root.bg2.removeMovieClip();
_root.bg3.removeMovieClip();
_root.fg2.removeMovieClip();
_root.fg3.removeMovieClip();
_root.fg1.removeMovieClip();
_root.lev.removeMovieClip();
_root.sp1.removeMovieClip();
_root.player.removeMovieClip();
_root.levelComplete.removeMovieClip();
_root.tutorialPopup.removeMovieClip();
}
function miniMap() {
_root.mini_map.removeMovieClip();
_root.attachMovie("miniMap", "mini_map", _root.getNextHighestDepth(), {_x:0, _y:38});
_root.mini_map.box._width = (_root.lev.objects.finish_line._x + 640) / 20;
_root.mini_map._x = 640 - (_root.mini_map.box._width / 2);
_root.mini_map.exit._x = _root.lev.objects.finish_line._x / 20;
_root.mini_map._x = _root.mini_map._x + 226;
_root.mini_map.onEnterFrame = function () {
_root.mini_map.me._x = ((_root.lev._x * -1) + _root.player._x) / 20;
};
}
function playMenuMusic() {
if (!menuMusicPlaying) {
menuTrack = new Sound(menuTracks);
menuTrack.attachSound("menuTrack");
menuTrack.start(0, 99);
menuMusicPlaying = true;
}
}
stop();
this._lockroot = true;
MovieClip.prototype.oldHitTest = MovieClip.prototype.hitTest;
MovieClip.prototype.hitTest = function (x, y, sf) {
var _local3 = {x:x, y:y};
_root._parent.localToGlobal(_local3);
return(this.oldHitTest(_local3.x, _local3.y, sf));
};
_quality = "medium";
qualitySetting = "medium";
var levelTrack;
var levelTrackStartVolume = 100;
var soundEffects = this.createEmptyMovieClip("soundEffects", this.getNextHighestDepth());
var soundTracks = this.createEmptyMovieClip("soundTracks", this.getNextHighestDepth());
var soundTracksSwap = this.createEmptyMovieClip("soundTracksSwap", this.getNextHighestDepth());
var menuTracks = this.createEmptyMovieClip("menuTracks", this.getNextHighestDepth());
var gamedata_so = SharedObject.getLocal("gamedata", "/");
var levelMedals = {level1:null, level2:null, level3:null, level4:null, level5:null, level6:null, level7:null, level8:null, level9:null, level10:null, level11:null, level12:null, level13:null, level14:null, level15:null};
var prevLevelMedals = {level1:null, level2:null, level3:null, level4:null, level5:null, level6:null, level7:null, level8:null, level9:null, level10:null, level11:null, level12:null, level13:null, level14:null, level15:null};
if (gamedata_so.data.levelMedals != undefined) {
levelMedals = gamedata_so.data.levelMedals[0];
prevLevelMedals = gamedata_so.data.prevLevelMedals[0];
}
var keyListener = new Object();
Key.addListener(keyListener);
keyListener.onKeyUp = function () {
if (((((((((Key.getCode() == 80) && (!dead)) && (!finished)) && (!deadScreenBg._visible)) && (!lockpicking)) && (!cloaking)) && (!teleportingx)) && (!teleportingy)) && (!levelMenu._visible)) {
pauseGame();
cutScene1.removeMovieClip();
}
if ((Key.getCode() == 77) && (!isPaused)) {
resetGame();
loadLevelMenu();
}
if ((Key.getCode() == 82) && (!isPaused)) {
heartbeat.stop();
resetGame();
loadLevel(currentLevel);
}
if ((Key.getCode() == 81) && (!isPaused)) {
if (qualitySetting == "medium") {
_quality = "high";
qualitySetting = "high";
} else if (qualitySetting == "high") {
_quality = "medium";
qualitySetting = "medium";
}
}
if (Key.getCode() == 85) {
if (levelTrack.getVolume() > 0) {
levelTrackStartVolume = 0;
} else {
levelTrackStartVolume = 100;
}
levelTrack.setVolume(levelTrackStartVolume);
}
};
loadLevelMenu("gamestart");
viewedCutScene1 = false;
function generateRandomString(newLength) {
var _local5 = "wasd";
var _local2 = _local5.split("");
var _local3 = "";
var _local1 = 0;
while (_local1 < newLength) {
_local3 = _local3 + _local2[Math.floor(Math.random() * _local2.length)];
_local1++;
}
return(_local3);
}
function mergeObjects(obj, objOverrides) {
for (var _local3 in objOverrides) {
obj[_local3] = objOverrides[_local3];
}
return(obj);
}
createLevelPlatforms = function (xPos, yPos, version) {
platfCount++;
_root.lev.platforms.attachMovie("platf" + version, "platf" + platfCount, lev.platforms.getNextHighestDepth(), {_x:xPos, _y:yPos});
};
createLevelPflex = function (xPos, yPos, setwidth) {
pflexCount++;
_root.lev.platforms.attachMovie("platf_flex", "pflex" + pflexCount, lev.platforms.getNextHighestDepth(), {_x:xPos, _y:yPos, _width:setwidth});
};
createLevelWall = function (xPos, yPos, setwidth, setheight, version) {
wallCount++;
_root.lev.walls.attachMovie("wall" + version, "wall" + wallCount, lev.walls.getNextHighestDepth(), {_x:xPos, _y:yPos, _width:setwidth, _height:setheight});
};
createLevelPortals = function (xPos, yPos, version) {
portalCount++;
_root.lev.objects.attachMovie("portal" + version, "portal" + portalCount, lev.objects.getNextHighestDepth(), {_x:xPos, _y:yPos});
};
createLevelBG1 = function (xPos, yPos) {
_root.bg1.attachMovie("bg_moon", "bg_moon", bg1.getNextHighestDepth(), {_x:xPos, _y:yPos});
};
createLevelBG2 = function (xPos, yPos) {
montCount++;
_root.bg2.attachMovie("bg_mountains", "bg_mountains" + montCount, bg2.getNextHighestDepth(), {_x:xPos, _y:yPos});
};
createLevelBG3 = function (xPos, yPos) {
treesCount++;
_root.bg3.attachMovie("bg_trees", "bg_trees" + treesCount, bg3.getNextHighestDepth(), {_x:xPos, _y:yPos});
};
createLevelFG1 = function (xPos, yPos, version) {
fg1Count++;
_root.fg1.attachMovie("fg_lightstand", "fg_lightstand" + fg1Count, fg1.getNextHighestDepth(), {_x:xPos, _y:yPos});
_root.fg1.attachMovie("fg_ground" + version, "fg_ground" + fg1Count, fg1.getNextHighestDepth(), {_x:xPos, _y:yPos});
};
createLevelFG2 = function (xPos, yPos, version) {
fg2Count++;
_root.fg2.attachMovie("fg_roofedpath" + version, "fg_roofedpath" + fg2Count, fg2.getNextHighestDepth(), {_x:xPos, _y:yPos});
};
createLevelGuards = function (custom_properties, version) {
var _local5 = {initx:0, inity:ground, scopex:160, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, yspeed:0, version:1};
var _local4 = mergeObjects(_local5, custom_properties);
_local4._x = _local4.initx;
_local4._y = _local4.inity;
guardCount++;
_root.lev.objects.attachMovie("guard" + _local4.version, "guard" + guardCount, lev.objects.getNextHighestDepth(), _local4);
_root.lev.objects["guard" + guardCount].onEnterFrame = function () {
if (!isPaused) {
if (this.patrolTowardRight == true) {
if (this._xscale != 100) {
this._xscale = 100;
this.dangerIcon._xscale = 100;
}
this._x = this._x - this.speed;
if (this._x < (this.initx - this.patrol_dist)) {
this.patrolTowardRight = false;
this.patrolTowardLeft = true;
}
}
if (this.patrolTowardLeft == true) {
if (this._xscale != -100) {
this._xscale = -100;
this.dangerIcon._xscale = -100;
}
this._x = this._x + this.speed;
if (this._x > (this.initx + this.patrol_dist)) {
this.patrolTowardRight = true;
this.patrolTowardLeft = false;
}
}
var _local3 = lev._x + this._x;
if (((((_local3 < (initial_playerx + this.scopex)) && (_local3 > (initial_playerx - this.scopex))) && (player._y <= this._y)) && (player._y > (this._y - this.scopey))) && (!cloaking)) {
this.dangerIcon._visible = 100;
if (alert_level <= 200) {
alert_level = alert_level + alert_level_speed;
}
} else {
this.dangerIcon._visible = 0;
if ((alert_level > 0) && (alert_level <= 200)) {
alert_level = alert_level - safe_level_speed;
}
}
if (!this.climbing) {
this.yspeed = this.yspeed + gravity;
}
if (this.yspeed > max_yspeed) {
this.yspeed = max_yspeed;
}
this.forecast_y = this._y + this.yspeed;
while (_root.lev.platforms.hitTest(_local3, this.forecast_y - 1, true)) {
this.forecast_y--;
this.yspeed = 0;
}
this._y = this.forecast_y;
}
};
};
createLevelGems = function (custom_properties, version) {
var _local4 = {initx:0, inity:ground, version:1};
var _local3 = mergeObjects(_local4, custom_properties);
_local3._x = _local3.initx;
_local3._y = _local3.inity;
gemCount++;
_root.lev.objects.attachMovie("gem" + _local3.version, "gem" + gemCount, lev.objects.getNextHighestDepth(), _local3);
greenGemsTotal = gemCount;
_root.lev.objects["gem" + gemCount].onEnterFrame = function () {
if (this.hitTest(forecast_x - 25, forecast_y, true)) {
this.removeMovieClip();
audioItemPickup = new Sound(soundEffects);
audioItemPickup.attachSound("blip1");
audioItemPickup.start();
greenGems = greenGems + 1;
openHudInventory("+1 gemstone");
}
};
};
createLevelPowerups = function (custom_properties, version) {
var _local3 = {initx:0, inity:ground, version:1};
var initial_properties = mergeObjects(_local3, custom_properties);
initial_properties._x = initial_properties.initx;
initial_properties._y = initial_properties.inity;
powerupCount++;
_root.lev.objects.attachMovie("powerup" + initial_properties.version, "powerup" + powerupCount, lev.objects.getNextHighestDepth(), initial_properties);
_root.lev.objects["powerup" + powerupCount].onEnterFrame = function () {
if (this.hitTest(forecast_x - 25, forecast_y, true)) {
this.removeMovieClip();
if (initial_properties.version == 1) {
audioItemPickup = new Sound(soundEffects);
audioItemPickup.attachSound("blip2");
audioItemPickup.start();
teleport = teleport + 1;
openHudInventory("+1 teleport ability");
}
if (initial_properties.version == 2) {
audioItemPickup = new Sound(soundEffects);
audioItemPickup.attachSound("blip2");
audioItemPickup.start();
cloak = cloak + 1;
openHudInventory("+1 cloak ability");
}
}
};
};
createLevelBonuses = function (custom_properties, version) {
var _local3 = {initx:0, inity:ground, version:1};
var initial_properties = mergeObjects(_local3, custom_properties);
initial_properties._x = initial_properties.initx;
initial_properties._y = initial_properties.inity;
bonusCount++;
_root.lev.objects.attachMovie("bonus" + initial_properties.version, "bonus" + bonusCount, lev.objects.getNextHighestDepth(), initial_properties);
bonusItemsTotal = bonusCount;
_root.lev.objects["bonus" + bonusCount].onEnterFrame = function () {
if (this.hitTest(forecast_x - 25, forecast_y, true)) {
this.removeMovieClip();
if (initial_properties.version == 1) {
audioItemPickup = new Sound(soundEffects);
audioItemPickup.attachSound("blip1");
audioItemPickup.start();
bonusItems = bonusItems + 1;
openHudInventory("Bonus Item: +1 gourd of wisdom");
}
if (initial_properties.version == 2) {
audioItemPickup = new Sound(soundEffects);
audioItemPickup.attachSound("blip1");
audioItemPickup.start();
bonusItems = bonusItems + 1;
openHudInventory("Bonus Item: +1 precious coin");
}
if (initial_properties.version == 3) {
audioItemPickup = new Sound(soundEffects);
audioItemPickup.attachSound("blip1");
audioItemPickup.start();
bonusItems = bonusItems + 1;
openHudInventory("Bonus Item: +1 golden fan");
}
if (initial_properties.version == 4) {
audioItemPickup = new Sound(soundEffects);
audioItemPickup.attachSound("blip1");
audioItemPickup.start();
bonusItems = bonusItems + 1;
openHudInventory("Bonus Item: +1 jade scroll");
}
}
};
};
createLevelSpikes = function (custom_properties, version) {
var _local4 = {initx:0, inity:ground, version:1};
var _local3 = mergeObjects(_local4, custom_properties);
_local3._x = _local3.initx;
_local3._y = _local3.inity;
spikeCount++;
_root.lev.objects.attachMovie("spike" + _local3.version, "spike" + spikeCount, lev.objects.getNextHighestDepth(), _local3);
_root.lev.objects["spike" + spikeCount].onEnterFrame = function () {
if (((this.hitTest(forecast_x, (forecast_y + (_root.player._height / 2)) - 1, true) || (this.hitTest((forecast_x - (_root.player._width / 2)) + 1, forecast_y, true))) || (this.hitTest(forecast_x + (_root.player._width / 2), forecast_y, true))) && (!deadScreenBg._visible)) {
danger.text = "DEAD!";
heartbeat.stop();
player._alpha = 100;
audioSpikes = new Sound(soundEffects);
audioSpikes.attachSound("audioSpikes");
audioSpikes.setVolume(25);
audioSpikes.start();
dead = true;
deadSpiked = true;
deadScreen();
}
};
};
createLevelPrisoners = function (custom_properties, prisonerVer, cageVer) {
var _local4 = {initx:0, inity:ground, prisonerVer:1, cageVer:1};
var _local3 = mergeObjects(_local4, custom_properties);
_local3._x = _local3.initx;
_local3._y = _local3.inity;
prisonerCount++;
_root.lev.objects.attachMovie("prisoner" + _local3.prisonerVer, "prisoner" + prisonerCount, lev.objects.getNextHighestDepth(), _local3);
_root.lev.objects.attachMovie("prisonerCage" + _local3.cageVer, "prisonerCage" + prisonerCount, lev.objects.getNextHighestDepth(), _local3);
prisonersTotal = prisonerCount;
_root.lev.objects["prisoner" + prisonerCount].onEnterFrame = function () {
this.theLock._alpha = 0;
if ((this.hitTest(forecast_x, (forecast_y + (_root.player._height / 2)) - 1, true) || (this.hitTest((forecast_x - (_root.player._width / 2)) + 1, forecast_y, true))) || (this.hitTest(forecast_x + (_root.player._width / 2), forecast_y, true))) {
if (((!this.lockpicking) && (!lockpicking)) && (this.theLock)) {
qtEventLockpick(this, generateRandomString(1), generateRandomString(1), generateRandomString(1), generateRandomString(1));
}
}
if (this.lockpicking) {
this.qtEventLockpick.lockpickBar._width = ((this.lockpickDelay * 137) / 135) - 15.2222222222222;
if (this.lockpickDelay > 15) {
this.lockpickDelay--;
this.qtEventLockpick.qtEventMatch.onChanged = function () {
if (this._parent._parent.qtEventLockpick.unlock_cue._x < 22) {
this._parent._parent.qtEventLockpick.unlock_cue._alpha = 100;
this._parent._parent.qtEventLockpick.unlock_cue._x = this._parent._parent.qtEventLockpick.unlock_cue._x + 35;
}
if (this.text == this._parent.qtEventField.text) {
this._parent._parent.qtEventLockpick.lockStates.gotoAndStop(2);
audioUnlock = new Sound(soundEffects);
audioUnlock.attachSound("audioUnlock");
audioUnlock.start();
prisonersRescued = prisonersRescued + 1;
lockpicking = false;
openHudInventory("+1 saved prisoner");
trace("saved");
}
if ((this.length == 4) && (this.text != this._parent.qtEventField.text)) {
this._parent._parent.qtEventLockpick.lockStates.gotoAndStop(3);
this._parent._parent.villager1.gotoAndStop(2);
audioLockfail = new Sound(soundEffects);
audioLockfail.attachSound("audioLockfail");
audioLockfail.start();
trace("not saved");
}
};
} else if ((this.lockpickDelay <= 15) && (this.lockpickDelay > 0)) {
this.qtEventLockpick.qtEventMatch._visible = 0;
this.lockpickDelay--;
if (this.qtEventLockpick.lockStates._currentframe == 1) {
this.qtEventLockpick.lockStates.gotoAndStop(3);
if (this.lockpickDelay == 14) {
this.villager1.gotoAndStop(2);
audioLockfail = new Sound(soundEffects);
audioLockfail.attachSound("audioLockfail");
audioLockfail.start();
trace("time out 15");
}
}
if (this.qtEventLockpick.lockStates._currentframe == 2) {
this._visible = 0;
}
} else if (this.lockpickDelay == 0) {
this.qtEventLockpick.removeMovieClip();
this.theLock.swapDepths(777);
this.theLock.removeMovieClip();
this.lockpicking = false;
lockpicking = false;
trace("time out 0");
}
}
};
};
qtEventLockpick = function (currentLock, btn1, btn2, btn3, btn4) {
currentLock.attachMovie("qtEventLockpick", "qtEventLockpick", currentLock.getNextHighestDepth(), {_x:0, _y:-120});
currentLock.qtEventLockpick.attachMovie("qtEventBtn_" + btn1, "qtEventBtn1", currentLock.qtEventLockpick.getNextHighestDepth(), {_x:-68, _y:-54});
currentLock.qtEventLockpick.attachMovie("qtEventBtn_" + btn2, "qtEventBtn2", currentLock.qtEventLockpick.getNextHighestDepth(), {_x:-33, _y:-54});
currentLock.qtEventLockpick.attachMovie("qtEventBtn_" + btn3, "qtEventBtn3", currentLock.qtEventLockpick.getNextHighestDepth(), {_x:2, _y:-54});
currentLock.qtEventLockpick.attachMovie("qtEventBtn_" + btn4, "qtEventBtn4", currentLock.qtEventLockpick.getNextHighestDepth(), {_x:37, _y:-54});
currentLock.qtEventLockpick.qtEventField._y = 2000;
currentLock.qtEventLockpick.qtEventMatch._y = 2000;
currentLock.qtEventLockpick.qtEventMatch.restrict = "a-z";
currentLock.qtEventLockpick.qtEventField.text = ((btn1 + btn2) + btn3) + btn4;
Selection.setFocus(currentLock.qtEventLockpick.qtEventMatch);
currentLock.lockpicking = true;
lockpicking = true;
currentLock.lockpickDelay = 135;
};
function loadLevel15() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 35;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPflex(1440, floorTwo, 960);
createLevelPflex(3880, floorOne, 160);
createLevelPflex(3880, floorTwo, 160);
createLevelPflex(3880, floorThree, 160);
createLevelPflex(4200, floorOne, 160);
createLevelPflex(4200, floorTwo, 160);
createLevelPflex(4200, floorThree, 160);
createLevelPflex(4600, floorOne, 160);
createLevelPflex(4600, floorTwo, 160);
createLevelPflex(4600, floorThree, 160);
createLevelPflex(4920, floorOne, 160);
createLevelPflex(4920, floorTwo, 160);
createLevelPflex(4920, floorThree, 160);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:3000, inity:ground, scopex:200, scopey:140, patrol_dist:260, patrolTowardRight:false, patrolTowardLeft:true, speed:2.5, version:3}, {initx:3400, inity:ground, scopex:200, scopey:140, patrol_dist:260, patrolTowardRight:true, patrolTowardLeft:false, speed:2.5, version:3}, {initx:3960, inity:floorOne, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:3960, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:4280, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:4280, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:4680, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:4680, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:5000, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:5000, inity:floorOne, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:2760, inity:floorTwo - 60, version:2}, {initx:2840, inity:floorTwo - 60, version:2}, {initx:3160, inity:floorTwo - 60, version:2}, {initx:3240, inity:floorTwo - 60, version:2}, {initx:3560, inity:floorTwo - 60, version:2}, {initx:3640, inity:floorTwo - 60, version:2}, {initx:2720, inity:floorOne - 60, version:2}, {initx:2800, inity:floorOne - 60, version:2}, {initx:2880, inity:floorOne - 60, version:2}, {initx:3120, inity:floorOne - 60, version:2}, {initx:3200, inity:floorOne - 60, version:2}, {initx:3280, inity:floorOne - 60, version:2}, {initx:3520, inity:floorOne - 60, version:2}, {initx:3600, inity:floorOne - 60, version:2}, {initx:3680, inity:floorOne - 60, version:2}, {initx:2760, inity:ground - 60, version:2}, {initx:2840, inity:ground - 60, version:2}, {initx:3160, inity:ground - 60, version:2}, {initx:3240, inity:ground - 60, version:2}, {initx:3560, inity:ground - 60, version:2}, {initx:3640, inity:ground - 60, version:2}, {initx:3920, inity:floorTwo - 60, version:1}, {initx:4000, inity:floorTwo - 60, version:1}, {initx:4240, inity:floorTwo - 60, version:1}, {initx:4320, inity:floorTwo - 60, version:1}, {initx:4640, inity:floorTwo - 60, version:1}, {initx:4720, inity:floorTwo - 60, version:1}, {initx:4960, inity:floorTwo - 60, version:1}, {initx:5040, inity:floorTwo - 60, version:1}, {initx:3920, inity:floorThree - 60, version:1}, {initx:4000, inity:floorThree - 60, version:1}, {initx:4240, inity:floorThree - 60, version:1}, {initx:4320, inity:floorThree - 60, version:1}, {initx:4640, inity:floorThree - 60, version:1}, {initx:4720, inity:floorThree - 60, version:1}, {initx:4960, inity:floorThree - 60, version:1}, {initx:5040, inity:floorThree - 60, version:1}, {initx:3920, inity:floorOne - 60, version:1}, {initx:4000, inity:floorOne - 60, version:1}, {initx:4240, inity:floorOne - 60, version:1}, {initx:4320, inity:floorOne - 60, version:1}, {initx:4640, inity:floorOne - 60, version:1}, {initx:4720, inity:floorOne - 60, version:1}, {initx:4960, inity:floorOne - 60, version:1}, {initx:5040, inity:floorOne - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:1640, inity:ground - 60, version:1}, {initx:1720, inity:ground - 60, version:1}, {initx:1800, inity:ground - 60, version:1}, {initx:1880, inity:ground - 60, version:1}, {initx:1960, inity:ground - 60, version:1}, {initx:2040, inity:ground - 60, version:1}, {initx:2120, inity:ground - 60, version:1}, {initx:2200, inity:ground - 60, version:1}, {initx:1640, inity:floorTwo - 60, version:2}, {initx:1720, inity:floorTwo - 60, version:2}, {initx:1800, inity:floorTwo - 60, version:2}, {initx:1880, inity:floorTwo - 60, version:2}, {initx:1960, inity:floorTwo - 60, version:2}, {initx:2040, inity:floorTwo - 60, version:2}, {initx:2120, inity:floorTwo - 60, version:2}, {initx:2200, inity:floorTwo - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:4480, inity:floorThree - 60, version:3}, {initx:4480, inity:floorTwo - 60, version:2}, {initx:4480, inity:floorOne - 60, version:1}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [{initx:4080, inity:ground, version:1}, {initx:4160, inity:ground, version:1}, {initx:4800, inity:ground, version:1}, {initx:4880, inity:ground, version:1}];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:4480, inity:ground, prisonerVer:2, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_flag1", "fg_flag1", fg3.getNextHighestDepth(), {_x:320, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag2", fg3.getNextHighestDepth(), {_x:640, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag3", fg3.getNextHighestDepth(), {_x:960, _y:ground});
_root.fg3.attachMovie("fg_templebig_frame1", "fg_templebig1", fg3.getNextHighestDepth(), {_x:1300, _y:ground});
_root.fg1.attachMovie("fg_templebig_rail", "fg_templebig_rail1", fg1.getNextHighestDepth(), {_x:1300, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower1", fg3.getNextHighestDepth(), {_x:3840, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower2", fg3.getNextHighestDepth(), {_x:4160, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower3", fg3.getNextHighestDepth(), {_x:4560, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower4", fg3.getNextHighestDepth(), {_x:4880, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost1", fg3.getNextHighestDepth(), {_x:3000, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost2", fg3.getNextHighestDepth(), {_x:3400, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:5760, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn15.onRelease = function () {
currentLevel = 15;
loadLevel(15);
};
function loadLevel14() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 32;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 2);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPflex(2880, floorTwo, 3200);
createLevelPflex(2720, floorOne, 160);
createLevelPflex(2720, floorThree, 160);
createLevelPflex(3360, floorOne, 160);
createLevelPflex(3360, floorThree, 160);
createLevelPflex(5440, floorOne, 160);
createLevelPflex(5440, floorThree, 160);
createLevelPflex(6080, floorOne, 160);
createLevelPflex(6080, floorThree, 160);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:3120, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:3120, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:3760, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:4180, inity:floorTwo, scopex:200, scopey:140, patrol_dist:260, patrolTowardRight:true, patrolTowardLeft:false, speed:2.5, version:3}, {initx:4780, inity:floorTwo, scopex:200, scopey:140, patrol_dist:260, patrolTowardRight:false, patrolTowardLeft:true, speed:2.5, version:3}, {initx:5200, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:5840, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:5840, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:6700, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1720, inity:(floorOne - 60) - 20, version:1}, {initx:1800, inity:(floorOne - 60) - 20, version:1}, {initx:1880, inity:((floorOne - 60) - 110) - 20, version:2}, {initx:1960, inity:((floorOne - 60) - 110) - 20, version:2}, {initx:2040, inity:(floorOne - 60) - 20, version:1}, {initx:2120, inity:(floorOne - 60) - 20, version:1}, {initx:2960, inity:floorTwo - 60, version:1}, {initx:3040, inity:floorTwo - 60, version:1}, {initx:3120, inity:floorTwo - 60, version:1}, {initx:3200, inity:floorTwo - 60, version:1}, {initx:3280, inity:floorTwo - 60, version:1}, {initx:4080, inity:ground - 60, version:1}, {initx:4160, inity:ground - 60, version:1}, {initx:4240, inity:ground - 60, version:1}, {initx:4320, inity:ground - 60, version:1}, {initx:4640, inity:ground - 60, version:1}, {initx:4720, inity:ground - 60, version:1}, {initx:4800, inity:ground - 60, version:1}, {initx:4880, inity:ground - 60, version:1}, {initx:4240, inity:floorTwo - 60, version:1}, {initx:4320, inity:floorTwo - 60, version:1}, {initx:4400, inity:floorTwo - 60, version:1}, {initx:4560, inity:floorTwo - 60, version:1}, {initx:4640, inity:floorTwo - 60, version:1}, {initx:4720, inity:floorTwo - 60, version:1}, {initx:2760, inity:floorThree - 60, version:1}, {initx:2840, inity:floorThree - 60, version:1}, {initx:3400, inity:floorThree - 60, version:1}, {initx:3480, inity:floorThree - 60, version:1}, {initx:5480, inity:floorThree - 60, version:1}, {initx:5560, inity:floorThree - 60, version:1}, {initx:5680, inity:floorTwo - 60, version:1}, {initx:5760, inity:floorTwo - 60, version:1}, {initx:5840, inity:floorTwo - 60, version:1}, {initx:5920, inity:floorTwo - 60, version:1}, {initx:6000, inity:floorTwo - 60, version:1}, {initx:6120, inity:floorThree - 60, version:1}, {initx:6200, inity:floorThree - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:2800, inity:ground - 60, version:2}, {initx:3440, inity:ground - 60, version:1}, {initx:5520, inity:ground - 60, version:2}, {initx:4440, inity:(ground - 60) - 110, version:1}, {initx:4520, inity:(ground - 60) - 110, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:4480, inity:(floorTwo - 60) - 110, version:3}, {initx:6160, inity:ground - 60, version:2}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [{initx:2760, inity:ground, version:2}, {initx:2840, inity:ground, version:2}, {initx:3400, inity:ground, version:2}, {initx:3480, inity:ground, version:2}, {initx:4080, inity:ground, version:2}, {initx:4160, inity:ground, version:2}, {initx:4240, inity:ground, version:2}, {initx:4320, inity:ground, version:2}, {initx:4640, inity:ground, version:2}, {initx:4720, inity:ground, version:2}, {initx:4800, inity:ground, version:2}, {initx:4880, inity:ground, version:2}, {initx:5480, inity:ground, version:2}, {initx:5560, inity:ground, version:2}, {initx:6120, inity:ground, version:2}, {initx:6200, inity:ground, version:2}];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:4480, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 2);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
createLevelFG2(2880, ground, 1);
createLevelFG2(2960, ground, 1);
createLevelFG2(3040, ground, 1);
createLevelFG2(3120, ground, 1);
createLevelFG2(3200, ground, 1);
createLevelFG2(3280, ground, 1);
createLevelFG2(3520, ground, 1);
createLevelFG2(3600, ground, 1);
createLevelFG2(3680, ground, 1);
createLevelFG2(3760, ground, 1);
createLevelFG2(3840, ground, 1);
createLevelFG2(3920, ground, 1);
createLevelFG2(4960, ground, 1);
createLevelFG2(5040, ground, 1);
createLevelFG2(5120, ground, 1);
createLevelFG2(5200, ground, 1);
createLevelFG2(5280, ground, 1);
createLevelFG2(5360, ground, 1);
createLevelFG2(5600, ground, 1);
createLevelFG2(5680, ground, 1);
createLevelFG2(5760, ground, 1);
createLevelFG2(5840, ground, 1);
createLevelFG2(5920, ground, 1);
createLevelFG2(6000, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_tower2", "fg_tower1", fg3.getNextHighestDepth(), {_x:2680, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower2", fg3.getNextHighestDepth(), {_x:3320, _y:ground});
_root.fg3.attachMovie("fg_templebig_frame1", "fg_templebig1", fg3.getNextHighestDepth(), {_x:3860, _y:ground});
_root.fg1.attachMovie("fg_templebig_rail", "fg_templebig_rail1", fg1.getNextHighestDepth(), {_x:3860, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower3", fg3.getNextHighestDepth(), {_x:5400, _y:ground});
_root.fg3.attachMovie("fg_tower2", "fg_tower4", fg3.getNextHighestDepth(), {_x:6040, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost1", fg3.getNextHighestDepth(), {_x:3120, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost1", fg3.getNextHighestDepth(), {_x:5840, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag1", fg3.getNextHighestDepth(), {_x:320, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag2", fg3.getNextHighestDepth(), {_x:640, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag3", fg3.getNextHighestDepth(), {_x:960, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:7040, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn14.onRelease = function () {
currentLevel = 14;
loadLevel(14);
};
function loadLevel13() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 19;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPflex(1300, floorOne, 560);
createLevelPflex(1480, floorTwo, 560);
createLevelPflex(1300, floorThree, 560);
createLevelPflex(2280, floorOne, 160);
createLevelPflex(2280, floorTwo, 160);
createLevelPflex(2280, floorThree, 160);
createLevelPflex(2680, floorOne, 160);
createLevelPflex(2680, floorTwo, 160);
createLevelPflex(2680, floorThree, 160);
createLevelPflex(3080, floorThree, 560);
createLevelPflex(3260, floorTwo, 560);
createLevelPflex(3840, floorOne, 160);
createLevelPflex(4080, floorTwo, 320);
createLevelPflex(3900, floorThree, 140);
createLevelPflex(4640, floorTwo, 720);
createLevelPflex(5360, floorOne, 160);
createLevelPflex(5360, floorTwo, 160);
createLevelPflex(5360, floorThree, 160);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1580, inity:floorOne, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:2360, inity:floorOne, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:2760, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:3240, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:3660, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:3970, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:5440, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:6000, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:false, patrolTowardLeft:true, speed:4, version:4}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1550, inity:floorTwo - 60, version:1}, {initx:1630, inity:floorTwo - 60, version:1}, {initx:1710, inity:floorTwo - 60, version:1}, {initx:1790, inity:floorTwo - 60, version:1}, {initx:1390, inity:floorThree - 60, version:1}, {initx:1470, inity:floorThree - 60, version:1}, {initx:1550, inity:floorThree - 60, version:1}, {initx:1630, inity:floorThree - 60, version:1}, {initx:1710, inity:floorThree - 60, version:1}, {initx:1790, inity:floorThree - 60, version:1}, {initx:2720, inity:floorThree - 60, version:1}, {initx:2800, inity:floorThree - 60, version:1}, {initx:2720, inity:floorOne - 60, version:1}, {initx:2800, inity:floorOne - 60, version:1}, {initx:3880, inity:floorOne - 60, version:1}, {initx:3960, inity:floorOne - 60, version:1}, {initx:4160, inity:floorTwo - 60, version:1}, {initx:4240, inity:floorTwo - 60, version:1}, {initx:4320, inity:floorTwo - 60, version:1}, {initx:4800, inity:floorTwo - 60, version:1}, {initx:4880, inity:floorTwo - 60, version:1}, {initx:4960, inity:(floorTwo - 60) - 110, version:2}, {initx:5040, inity:(floorTwo - 60) - 110, version:2}, {initx:5120, inity:(floorTwo - 60) - 110, version:2}, {initx:5200, inity:floorTwo - 60, version:1}, {initx:5280, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:1350, inity:floorOne - 60, version:2}, {initx:2320, inity:floorThree - 60, version:1}, {initx:2400, inity:floorThree - 60, version:2}, {initx:1810, inity:floorOne - 60, version:1}, {initx:3450, inity:floorTwo - 60, version:1}, {initx:5600, inity:ground - 60, version:1}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:1230, inity:(floorThree - 60) - 110, version:2}, {initx:5440, inity:floorOne - 60, version:1}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [{initx:1320, inity:ground, version:2}, {initx:1400, inity:ground, version:2}, {initx:1480, inity:ground, version:2}, {initx:1560, inity:ground, version:2}, {initx:1640, inity:ground, version:2}, {initx:1720, inity:ground, version:2}, {initx:1800, inity:ground, version:2}, {initx:1880, inity:ground, version:2}, {initx:1960, inity:ground, version:2}, {initx:2040, inity:ground, version:2}, {initx:2120, inity:ground, version:2}, {initx:2200, inity:ground, version:2}, {initx:2280, inity:ground, version:2}, {initx:2360, inity:ground, version:2}, {initx:2440, inity:ground, version:2}, {initx:2520, inity:ground, version:2}, {initx:2600, inity:ground, version:2}, {initx:2640, inity:ground, version:2}, {initx:2720, inity:ground, version:2}, {initx:2800, inity:ground, version:2}, {initx:2880, inity:ground, version:2}, {initx:2960, inity:ground, version:2}, {initx:3040, inity:ground, version:2}, {initx:3120, inity:ground, version:2}, {initx:3200, inity:ground, version:2}, {initx:3280, inity:ground, version:2}, {initx:3360, inity:ground, version:2}, {initx:3440, inity:ground, version:2}, {initx:3520, inity:ground, version:2}, {initx:3600, inity:ground, version:2}, {initx:3640, inity:ground, version:2}, {initx:3720, inity:ground, version:2}, {initx:3800, inity:ground, version:2}, {initx:3880, inity:ground, version:2}, {initx:3960, inity:ground, version:2}, {initx:4040, inity:ground, version:2}, {initx:4120, inity:ground, version:2}, {initx:4200, inity:ground, version:2}, {initx:4280, inity:ground, version:2}, {initx:4360, inity:ground, version:2}, {initx:4440, inity:ground, version:2}, {initx:4520, inity:ground, version:2}, {initx:4600, inity:ground, version:2}, {initx:4640, inity:ground, version:2}, {initx:4720, inity:ground, version:2}, {initx:4800, inity:ground, version:2}, {initx:4880, inity:ground, version:2}, {initx:4960, inity:ground, version:2}, {initx:5040, inity:ground, version:2}, {initx:5120, inity:ground, version:2}, {initx:5200, inity:ground, version:2}, {initx:5280, inity:ground, version:2}, {initx:5360, inity:ground, version:2}, {initx:5440, inity:ground, version:2}, {initx:5520, inity:ground, version:2}];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:2360, inity:floorTwo, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
createLevelFG2(4640, ground, 1);
createLevelFG2(4720, ground, 1);
createLevelFG2(4800, ground, 1);
createLevelFG2(4880, ground, 1);
createLevelFG2(4960, ground, 1);
createLevelFG2(5040, ground, 1);
createLevelFG2(5120, ground, 1);
createLevelFG2(5200, ground, 1);
createLevelFG2(5280, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_bambooscaffold1", "fg_bambooscaffold1", fg3.getNextHighestDepth(), {_x:1300, _y:ground});
_root.fg3.attachMovie("fg_bambooscaffold2", "fg_bambooscaffold2", fg3.getNextHighestDepth(), {_x:3080, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower1", fg3.getNextHighestDepth(), {_x:2240, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower2", fg3.getNextHighestDepth(), {_x:2640, _y:ground});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree1", fg3.getNextHighestDepth(), {_x:4080, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower3", fg3.getNextHighestDepth(), {_x:5320, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost1", fg3.getNextHighestDepth(), {_x:5700, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:7040, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn13.onRelease = function () {
currentLevel = 13;
loadLevel(13);
};
function loadLevel12() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 19;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPflex(1280, floorOne, 160);
createLevelPflex(1520, floorTwo, 320);
createLevelPflex(1340, floorThree, 140);
createLevelPflex(2000, floorTwo, 320);
createLevelPflex(2320, floorOne, 160);
createLevelPflex(2320, floorThree, 160);
createLevelPflex(2480, floorTwo, 400);
createLevelPflex(3120, floorOne, 160);
createLevelPflex(3120, floorTwo, 160);
createLevelPflex(3120, floorThree, 160);
createLevelPflex(3520, floorTwo, 400);
createLevelPflex(3920, floorOne, 160);
createLevelPflex(3920, floorThree, 160);
createLevelPflex(4080, floorTwo, 320);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1600, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:1680, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:2400, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:2400, inity:floorOne, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:2400, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:2980, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:3200, inity:floorOne, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:3420, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:4000, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:4000, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:4000, inity:floorOne, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:4000, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:false, patrolTowardLeft:true, speed:4, version:4}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1560, inity:floorTwo - 60, version:1}, {initx:1640, inity:floorTwo - 60, version:1}, {initx:1720, inity:floorTwo - 60, version:1}, {initx:1800, inity:floorTwo - 60, version:1}, {initx:1480, inity:ground - 60, version:1}, {initx:1560, inity:ground - 60, version:1}, {initx:1640, inity:ground - 60, version:1}, {initx:1720, inity:ground - 60, version:1}, {initx:2080, inity:floorTwo - 60, version:1}, {initx:2160, inity:floorTwo - 60, version:1}, {initx:2240, inity:floorTwo - 60, version:1}, {initx:2640, inity:ground - 60, version:1}, {initx:2800, inity:ground - 60, version:1}, {initx:3600, inity:floorTwo - 60, version:1}, {initx:3680, inity:floorTwo - 60, version:1}, {initx:3760, inity:floorTwo - 60, version:1}, {initx:3840, inity:floorTwo - 60, version:1}, {initx:3960, inity:floorThree - 60, version:1}, {initx:4040, inity:floorThree - 60, version:1}, {initx:4160, inity:floorTwo - 60, version:1}, {initx:4320, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:1360, inity:floorOne - 60, version:2}, {initx:1880, inity:(floorTwo - 60) - 110, version:1}, {initx:1960, inity:(floorTwo - 60) - 110, version:2}, {initx:1880, inity:(ground - 60) - 110, version:1}, {initx:1960, inity:(ground - 60) - 110, version:2}, {initx:2720, inity:ground - 60, version:2}, {initx:3200, inity:floorThree - 60, version:1}, {initx:4240, inity:floorTwo - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:3200, inity:ground - 60, version:3}, {initx:4680, inity:floorTwo - 60, version:4}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:1920, inity:ground, prisonerVer:1, cageVer:1}, {initx:3200, inity:floorTwo, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG2(2000, ground, 1);
createLevelFG2(2080, ground, 1);
createLevelFG2(2160, ground, 1);
createLevelFG2(2240, ground, 1);
createLevelFG2(2480, ground, 1);
createLevelFG2(2560, ground, 1);
createLevelFG2(2640, ground, 1);
createLevelFG2(2720, ground, 1);
createLevelFG2(2800, ground, 1);
createLevelFG2(3520, ground, 1);
createLevelFG2(3600, ground, 1);
createLevelFG2(3680, ground, 1);
createLevelFG2(3760, ground, 1);
createLevelFG2(3840, ground, 1);
createLevelFG2(4080, ground, 1);
createLevelFG2(4160, ground, 1);
createLevelFG2(4240, ground, 1);
createLevelFG2(4320, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree1", fg3.getNextHighestDepth(), {_x:1520, _y:ground});
_root.fg3.attachMovie("fg_tower2", "fg_tower1", fg3.getNextHighestDepth(), {_x:2280, _y:ground});
_root.fg3.attachMovie("fg_tower1", "fg_tower2", fg3.getNextHighestDepth(), {_x:3080, _y:ground});
_root.fg3.attachMovie("fg_tower2", "fg_tower3", fg3.getNextHighestDepth(), {_x:3880, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:5760, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn12.onRelease = function () {
currentLevel = 12;
loadLevel(12);
};
function loadLevel11() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 12;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 2);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPflex(1120, floorTwo, 320);
createLevelPflex(1440, floorTwo, 960);
createLevelPflex(2400, floorTwo, 1300);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1700, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:2140, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:1920, inity:floorTwo, scopex:200, scopey:140, patrol_dist:260, patrolTowardRight:true, patrolTowardLeft:false, speed:2.5, version:3}, {initx:2980, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:3420, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:3200, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:4, version:4}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1640, inity:floorTwo - 60, version:1}, {initx:1720, inity:floorTwo - 60, version:1}, {initx:1800, inity:floorTwo - 60, version:1}, {initx:2040, inity:floorTwo - 60, version:1}, {initx:2120, inity:floorTwo - 60, version:1}, {initx:2200, inity:floorTwo - 60, version:1}, {initx:1480, inity:ground - 60, version:1}, {initx:1560, inity:ground - 60, version:1}, {initx:1880, inity:(floorTwo - 60) - 110, version:2}, {initx:1960, inity:(floorTwo - 60) - 110, version:2}, {initx:2280, inity:ground - 60, version:1}, {initx:2360, inity:ground - 60, version:1}, {initx:2920, inity:ground - 60, version:1}, {initx:3000, inity:ground - 60, version:1}, {initx:3080, inity:ground - 60, version:1}, {initx:3320, inity:ground - 60, version:1}, {initx:3400, inity:ground - 60, version:1}, {initx:3480, inity:ground - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:600, inity:(floorOne - 60) - 80, version:1}, {initx:680, inity:(floorOne - 60) - 80, version:2}, {initx:1880, inity:floorTwo - 60, version:1}, {initx:1960, inity:floorTwo - 60, version:2}, {initx:2560, inity:floorTwo - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:3200, inity:(floorTwo - 60) - 110, version:1}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:1920, inity:ground, prisonerVer:1, cageVer:1}, {initx:3200, inity:floorTwo, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 2);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG2(1120, ground, 1);
createLevelFG2(1200, ground, 1);
createLevelFG2(1280, ground, 1);
createLevelFG2(1360, ground, 1);
createLevelFG2(2400, ground, 1);
createLevelFG2(2480, ground, 1);
createLevelFG2(2560, ground, 1);
createLevelFG2(2640, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_templebig_frame1", "fg_templebig1", fg3.getNextHighestDepth(), {_x:1300, _y:ground});
_root.fg1.attachMovie("fg_templebig_rail", "fg_templebig_rail1", fg1.getNextHighestDepth(), {_x:1300, _y:ground});
_root.fg3.attachMovie("fg_templebig_frame1", "fg_templebig2", fg3.getNextHighestDepth(), {_x:2580, _y:ground});
_root.fg1.attachMovie("fg_templebig_rail", "fg_templebig_rail2", fg1.getNextHighestDepth(), {_x:2580, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost1", fg3.getNextHighestDepth(), {_x:1200, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost2", fg3.getNextHighestDepth(), {_x:4000, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:4480, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn11.onRelease = function () {
currentLevel = 11;
loadLevel(11);
};
function loadLevel10() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 14;
reqPrisoners = 3;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPlatforms(8960, ground, 1);
createLevelPflex(1370, floorOne, 220);
createLevelPflex(1680, floorTwo, 400);
createLevelPflex(2240, floorTwo, 240);
createLevelPflex(2650, floorOne, 220);
createLevelPflex(2960, floorTwo, 400);
createLevelPflex(3520, floorTwo, 240);
createLevelPflex(3930, floorOne, 220);
createLevelPflex(4240, floorTwo, 400);
createLevelPflex(4800, floorTwo, 240);
createLevelPflex(5210, floorOne, 220);
createLevelPflex(5520, floorTwo, 400);
createLevelPflex(6080, floorTwo, 240);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1580, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:2360, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:2860, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:3640, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:4040, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:4, version:4}, {initx:4440, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:5720, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:5420, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:5320, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:4, version:4}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1720, inity:floorTwo - 60, version:1}, {initx:1800, inity:floorTwo - 60, version:1}, {initx:1960, inity:floorTwo - 60, version:1}, {initx:2040, inity:floorTwo - 60, version:1}, {initx:3000, inity:floorTwo - 60, version:1}, {initx:3080, inity:floorTwo - 60, version:1}, {initx:3240, inity:floorTwo - 60, version:1}, {initx:3320, inity:floorTwo - 60, version:1}, {initx:2120, inity:floorThree - 60, version:2}, {initx:2200, inity:floorThree - 60, version:2}, {initx:3400, inity:floorThree - 60, version:2}, {initx:3480, inity:floorThree - 60, version:2}, {initx:4680, inity:floorThree - 60, version:2}, {initx:4760, inity:floorThree - 60, version:2}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:1880, inity:floorTwo - 60, version:1}, {initx:3160, inity:floorTwo - 60, version:2}, {initx:5320, inity:floorOne - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:5120, inity:ground - 60, version:2}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [{initx:2120, inity:ground, version:1}, {initx:2200, inity:ground, version:1}, {initx:3400, inity:ground, version:1}, {initx:3480, inity:ground, version:1}, {initx:4680, inity:ground, version:1}, {initx:4760, inity:ground, version:1}, {initx:5960, inity:ground, version:1}, {initx:6040, inity:ground, version:1}];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:1880, inity:ground, prisonerVer:1, cageVer:1}, {initx:3160, inity:ground, prisonerVer:1, cageVer:1}, {initx:4440, inity:ground, prisonerVer:1, cageVer:1}, {initx:5720, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG2(8960, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelBG3(8960, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
createLevelFG1(8960, ground, 1);
createLevelFG2(1680, ground, 1);
createLevelFG2(1760, ground, 1);
createLevelFG2(1840, ground, 1);
createLevelFG2(1920, ground, 1);
createLevelFG2(2000, ground, 1);
createLevelFG2(2240, ground, 1);
createLevelFG2(2320, ground, 1);
createLevelFG2(2400, ground, 1);
createLevelFG2(2960, ground, 1);
createLevelFG2(3040, ground, 1);
createLevelFG2(3120, ground, 1);
createLevelFG2(3200, ground, 1);
createLevelFG2(3280, ground, 1);
createLevelFG2(3520, ground, 1);
createLevelFG2(3600, ground, 1);
createLevelFG2(3680, ground, 1);
createLevelFG2(4240, ground, 1);
createLevelFG2(4320, ground, 1);
createLevelFG2(4400, ground, 1);
createLevelFG2(4480, ground, 1);
createLevelFG2(4560, ground, 1);
createLevelFG2(4800, ground, 1);
createLevelFG2(4880, ground, 1);
createLevelFG2(4960, ground, 1);
createLevelFG2(5520, ground, 1);
createLevelFG2(5600, ground, 1);
createLevelFG2(5680, ground, 1);
createLevelFG2(5760, ground, 1);
createLevelFG2(5840, ground, 1);
createLevelFG2(6080, ground, 1);
createLevelFG2(6160, ground, 1);
createLevelFG2(6240, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("barrels", "berrels1", fg3.getNextHighestDepth(), {_x:1370, _y:ground});
_root.fg3.attachMovie("barrels", "berrels2", fg3.getNextHighestDepth(), {_x:1480, _y:ground});
_root.fg3.attachMovie("barrels", "berrels4", fg3.getNextHighestDepth(), {_x:2650, _y:ground});
_root.fg3.attachMovie("barrels", "berrels5", fg3.getNextHighestDepth(), {_x:2760, _y:ground});
_root.fg3.attachMovie("barrels", "berrels7", fg3.getNextHighestDepth(), {_x:3930, _y:ground});
_root.fg3.attachMovie("barrels", "berrels8", fg3.getNextHighestDepth(), {_x:4040, _y:ground});
_root.fg3.attachMovie("barrels", "berrels10", fg3.getNextHighestDepth(), {_x:5210, _y:ground});
_root.fg3.attachMovie("barrels", "berrels11", fg3.getNextHighestDepth(), {_x:5320, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag1", fg3.getNextHighestDepth(), {_x:320, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag2", fg3.getNextHighestDepth(), {_x:640, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag3", fg3.getNextHighestDepth(), {_x:960, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:7040, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn10.onRelease = function () {
currentLevel = 10;
loadLevel(10);
};
function loadLevel9() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 10;
reqPrisoners = 2;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPlatforms(8960, ground, 1);
createLevelPflex(1420, ground - 320, 280);
createLevelPflex(1680, floorTwo, 1440);
createLevelPflex(3100, ground - 320, 280);
createLevelPflex(3440, floorOne, 160);
createLevelPflex(3680, floorTwo, 320);
createLevelPflex(3500, floorThree, 140);
createLevelPflex(4160, floorTwo, 240);
createLevelPflex(4220, floorThree, 560);
createLevelPflex(4400, floorTwo, 560);
createLevelPflex(4960, floorTwo, 800);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1800, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:4, version:4}, {initx:2000, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:2800, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:2160, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:2640, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:4600, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:5360, inity:floorTwo, scopex:200, scopey:140, patrol_dist:260, patrolTowardRight:false, patrolTowardLeft:true, speed:2.5, version:3}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:2320, inity:floorThree - 60, version:1}, {initx:2480, inity:floorThree - 60, version:1}, {initx:3160, inity:floorThree - 130, version:1}, {initx:3240, inity:floorThree - 130, version:1}, {initx:3320, inity:floorThree - 130, version:1}, {initx:3760, inity:floorTwo - 60, version:1}, {initx:3840, inity:floorTwo - 60, version:1}, {initx:3920, inity:floorTwo - 60, version:1}, {initx:4040, inity:floorThree - 110, version:1}, {initx:4120, inity:floorThree - 110, version:1}, {initx:5120, inity:floorTwo - 60, version:1}, {initx:5200, inity:floorTwo - 60, version:1}, {initx:5280, inity:floorTwo - 60, version:1}, {initx:5360, inity:floorTwo - 60, version:1}, {initx:5440, inity:floorTwo - 60, version:1}, {initx:5520, inity:floorTwo - 60, version:1}, {initx:5600, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:1560, inity:ground - 60, version:1}, {initx:1560, inity:floorTwo - 100, version:2}, {initx:2400, inity:floorThree - 60, version:2}, {initx:4600, inity:floorThree - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:4080, inity:floorThree - 240, version:2}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [{initx:4360, inity:ground, version:2}, {initx:4440, inity:ground, version:2}, {initx:4760, inity:ground, version:2}, {initx:4840, inity:ground, version:2}];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:2400, inity:ground, prisonerVer:1, cageVer:1}, {initx:4600, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG2(8960, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelBG3(8960, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
createLevelFG1(8960, ground, 1);
createLevelFG2(1680, ground, 1);
createLevelFG2(1760, ground, 1);
createLevelFG2(1840, ground, 1);
createLevelFG2(1920, ground, 1);
createLevelFG2(2000, ground, 1);
createLevelFG2(2080, ground, 1);
createLevelFG2(2160, ground, 1);
createLevelFG2(2240, ground, 1);
createLevelFG2(2320, ground, 1);
createLevelFG2(2400, ground, 1);
createLevelFG2(2480, ground, 1);
createLevelFG2(2560, ground, 1);
createLevelFG2(2640, ground, 1);
createLevelFG2(2720, ground, 1);
createLevelFG2(2800, ground, 1);
createLevelFG2(2880, ground, 1);
createLevelFG2(2960, ground, 1);
createLevelFG2(3040, ground, 1);
createLevelFG2(4160, ground, 1);
createLevelFG2(4240, ground, 2);
createLevelFG2(4320, ground, 2);
createLevelFG2(4960, ground, 2);
createLevelFG2(5040, ground, 1);
createLevelFG2(5120, ground, 1);
createLevelFG2(5200, ground, 1);
createLevelFG2(5280, ground, 1);
createLevelFG2(5360, ground, 1);
createLevelFG2(5440, ground, 1);
createLevelFG2(5520, ground, 1);
createLevelFG2(5600, ground, 1);
createLevelFG2(5680, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_templesmall", "fg_templesmall1", fg3.getNextHighestDepth(), {_x:1380, _y:ground});
_root.fg3.attachMovie("fg_templesmall", "fg_templesmall2", fg3.getNextHighestDepth(), {_x:3060, _y:ground});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree1", fg3.getNextHighestDepth(), {_x:3680, _y:ground});
_root.fg3.attachMovie("fg_bambooscaffold2", "fg_bambooscaffold1", fg3.getNextHighestDepth(), {_x:4220, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost1", fg3.getNextHighestDepth(), {_x:1120, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag1", fg3.getNextHighestDepth(), {_x:320, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag2", fg3.getNextHighestDepth(), {_x:640, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag3", fg3.getNextHighestDepth(), {_x:960, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:7040, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn9.onRelease = function () {
currentLevel = 9;
loadLevel(9);
};
function loadLevel8() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 21;
reqPrisoners = 2;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 2);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 2);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPlatforms(8960, ground, 1);
createLevelPflex(2730, floorTwo, 330);
createLevelPflex(2550, floorThree, 560);
createLevelPflex(3060, ground - 320, 280);
createLevelPflex(3340, floorTwo, 510);
createLevelPflex(3110, floorThree, 560);
createLevelPflex(2700, floorOne, 220);
createLevelPflex(3480, floorOne, 220);
createLevelPflex(5520, floorTwo, 2040);
createLevelWall(0, ground, 20, 560, 1);
var _local5 = [{initx:2810, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:3590, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:3200, inity:floorThree, scopex:200, scopey:140, patrol_dist:260, patrolTowardRight:true, patrolTowardLeft:false, speed:2.5, version:3}, {initx:3740, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:4480, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:4, version:4}, {initx:4480, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:7040, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1840, inity:floorTwo - 60, version:2}, {initx:1920, inity:floorTwo - 60, version:2}, {initx:2000, inity:floorTwo - 60, version:2}, {initx:3000, inity:floorThree - 60, version:1}, {initx:3080, inity:floorThree - 60, version:1}, {initx:3160, inity:floorThree - 60, version:1}, {initx:3240, inity:floorThree - 60, version:1}, {initx:3320, inity:floorThree - 60, version:1}, {initx:3400, inity:floorThree - 60, version:1}, {initx:5640, inity:floorTwo - 60, version:1}, {initx:5720, inity:floorTwo - 60, version:1}, {initx:5800, inity:floorTwo - 60, version:1}, {initx:5880, inity:floorTwo - 60, version:1}, {initx:5960, inity:floorTwo - 60, version:1}, {initx:6040, inity:floorTwo - 60, version:1}, {initx:6120, inity:floorTwo - 60, version:1}, {initx:6200, inity:floorTwo - 60, version:1}, {initx:6280, inity:floorTwo - 60, version:1}, {initx:6360, inity:floorTwo - 60, version:1}, {initx:6440, inity:floorTwo - 60, version:1}, {initx:6520, inity:floorTwo - 60, version:1}, {initx:6600, inity:floorTwo - 60, version:1}, {initx:6680, inity:floorTwo - 60, version:1}, {initx:6760, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:2920, inity:floorThree - 60, version:1}, {initx:3480, inity:floorThree - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:3200, inity:(ground - 320) - 60, version:2}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [{initx:6000, inity:ground, version:1}, {initx:6080, inity:ground, version:1}, {initx:6160, inity:ground, version:1}];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:2920, inity:floorTwo, prisonerVer:1, cageVer:1}, {initx:3480, inity:floorTwo, prisonerVer:1, cageVer:1}, {initx:3200, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG2(8960, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelBG3(8960, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 2);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 2);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
createLevelFG1(8960, ground, 1);
createLevelFG2(5520, ground, 1);
createLevelFG2(5600, ground, 1);
createLevelFG2(5680, ground, 1);
createLevelFG2(5760, ground, 1);
createLevelFG2(5840, ground, 1);
createLevelFG2(5920, ground, 1);
createLevelFG2(6000, ground, 1);
createLevelFG2(6080, ground, 1);
createLevelFG2(6160, ground, 1);
createLevelFG2(6240, ground, 1);
createLevelFG2(6320, ground, 1);
createLevelFG2(6400, ground, 1);
createLevelFG2(6480, ground, 1);
createLevelFG2(6560, ground, 1);
createLevelFG2(6640, ground, 1);
createLevelFG2(6720, ground, 1);
createLevelFG2(6800, ground, 1);
createLevelFG2(6880, ground, 1);
createLevelFG2(6960, ground, 1);
createLevelFG2(7040, ground, 1);
createLevelFG2(7120, ground, 1);
createLevelFG2(7200, ground, 1);
createLevelFG2(7280, ground, 1);
createLevelFG2(7360, ground, 1);
createLevelFG2(7440, ground, 1);
createLevelFG2(7520, ground, 1);
createLevelFG2(7600, ground, 1);
createLevelFG2(7680, ground, 1);
createLevelFG2(7760, ground, 1);
createLevelFG2(7840, ground, 1);
createLevelFG2(7920, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_bambooscaffold2", "fg_bambooscaffold1", fg3.getNextHighestDepth(), {_x:2550, _y:ground});
_root.fg3.attachMovie("fg_bambooscaffold2", "fg_bambooscaffold2", fg3.getNextHighestDepth(), {_x:3110, _y:ground});
_root.fg3.attachMovie("fg_templesmall", "fg_templesmall1", fg3.getNextHighestDepth(), {_x:3020, _y:ground});
_root.fg3.attachMovie("barrels", "berrels1", fg3.getNextHighestDepth(), {_x:2700, _y:ground});
_root.fg3.attachMovie("barrels", "berrels2", fg3.getNextHighestDepth(), {_x:2810, _y:ground});
_root.fg3.attachMovie("barrels", "berrels3", fg3.getNextHighestDepth(), {_x:3480, _y:ground});
_root.fg3.attachMovie("barrels", "berrels4", fg3.getNextHighestDepth(), {_x:3590, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost1", fg3.getNextHighestDepth(), {_x:1120, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost2", fg3.getNextHighestDepth(), {_x:5380, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:7040, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn8.onRelease = function () {
currentLevel = 8;
loadLevel(8);
};
function loadLevel7() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 24;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPflex(1200, floorOne, 160);
createLevelPflex(1440, floorTwo, 320);
createLevelPflex(1260, floorThree, 140);
createLevelPflex(1920, floorTwo, 960);
createLevelPflex(2880, floorThree, 560);
createLevelPflex(3060, floorTwo, 560);
createLevelPflex(3600, floorTwo, 480);
createLevelPflex(4080, floorThree, 560);
createLevelPflex(4260, floorTwo, 560);
createLevelPflex(4800, floorTwo, 720);
createLevelPflex(5720, floorOne, 160);
createLevelPflex(5960, floorTwo, 320);
createLevelPflex(5780, floorThree, 140);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:3060, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:3400, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:4400, inity:floorThree, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:4800, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:6120, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1240, inity:floorOne - 60, version:1}, {initx:1320, inity:floorOne - 60, version:1}, {initx:1520, inity:floorTwo - 60, version:1}, {initx:1600, inity:floorTwo - 60, version:1}, {initx:1680, inity:floorTwo - 60, version:1}, {initx:1800, inity:floorThree - 60, version:2}, {initx:1880, inity:floorThree - 60, version:2}, {initx:2000, inity:floorTwo - 60, version:1}, {initx:2080, inity:floorTwo - 60, version:1}, {initx:2160, inity:floorTwo - 60, version:1}, {initx:2320, inity:floorTwo - 60, version:1}, {initx:2400, inity:floorTwo - 60, version:1}, {initx:2480, inity:floorTwo - 60, version:1}, {initx:2640, inity:floorTwo - 60, version:1}, {initx:2720, inity:floorTwo - 60, version:1}, {initx:2800, inity:floorTwo - 60, version:1}, {initx:3760, inity:floorTwo - 60, version:1}, {initx:3920, inity:floorTwo - 60, version:1}, {initx:4880, inity:floorTwo - 60, version:1}, {initx:4960, inity:floorTwo - 60, version:1}, {initx:5040, inity:floorTwo - 60, version:1}, {initx:5120, inity:floorTwo - 60, version:1}, {initx:5200, inity:floorTwo - 60, version:1}, {initx:5280, inity:floorTwo - 60, version:1}, {initx:5360, inity:floorTwo - 60, version:1}, {initx:6040, inity:floorTwo - 60, version:1}, {initx:6120, inity:floorTwo - 60, version:1}, {initx:6200, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:2240, inity:floorTwo - 60, version:1}, {initx:2560, inity:floorTwo - 60, version:2}, {initx:3840, inity:floorTwo - 60, version:1}, {initx:4240, inity:floorThree - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:4880, inity:ground - 60, version:2}, {initx:5860, inity:floorThree - 60, version:1}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [{initx:2880, inity:ground, version:1}, {initx:2960, inity:ground, version:1}, {initx:3040, inity:ground, version:1}, {initx:3120, inity:ground, version:1}, {initx:3200, inity:ground, version:1}, {initx:3280, inity:ground, version:1}, {initx:3360, inity:ground, version:1}, {initx:3440, inity:ground, version:1}, {initx:3520, inity:ground, version:1}, {initx:3600, inity:ground, version:1}, {initx:4080, inity:ground, version:1}, {initx:4160, inity:ground, version:1}, {initx:4240, inity:ground, version:1}, {initx:4320, inity:ground, version:1}, {initx:4400, inity:ground, version:1}, {initx:4480, inity:ground, version:1}, {initx:4560, inity:ground, version:1}, {initx:4640, inity:ground, version:1}, {initx:4720, inity:ground, version:1}, {initx:4800, inity:ground, version:1}];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:3720, inity:ground, prisonerVer:1, cageVer:1}, {initx:3960, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
createLevelFG2(1920, ground, 1);
createLevelFG2(2000, ground, 1);
createLevelFG2(2080, ground, 2);
createLevelFG2(2160, ground, 1);
createLevelFG2(2240, ground, 1);
createLevelFG2(2320, ground, 1);
createLevelFG2(2400, ground, 1);
createLevelFG2(2480, ground, 1);
createLevelFG2(2560, ground, 1);
createLevelFG2(2640, ground, 1);
createLevelFG2(2720, ground, 2);
createLevelFG2(2800, ground, 2);
createLevelFG2(3600, ground, 1);
createLevelFG2(3680, ground, 1);
createLevelFG2(3760, ground, 1);
createLevelFG2(3840, ground, 1);
createLevelFG2(3920, ground, 1);
createLevelFG2(4000, ground, 1);
createLevelFG2(4800, ground, 1);
createLevelFG2(4880, ground, 1);
createLevelFG2(4960, ground, 1);
createLevelFG2(5040, ground, 1);
createLevelFG2(5120, ground, 1);
createLevelFG2(5200, ground, 1);
createLevelFG2(5280, ground, 2);
createLevelFG2(5360, ground, 1);
createLevelFG2(5440, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree1", fg3.getNextHighestDepth(), {_x:1440, _y:ground});
_root.fg3.attachMovie("fg_bambooscaffold2", "fg_bambooscaffold1", fg3.getNextHighestDepth(), {_x:2880, _y:ground});
_root.fg3.attachMovie("fg_bambooscaffold2", "fg_bambooscaffold2", fg3.getNextHighestDepth(), {_x:4080, _y:ground});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree2", fg3.getNextHighestDepth(), {_x:5960, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:7040, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn7.onRelease = function () {
currentLevel = 7;
loadLevel(7);
};
function loadLevel6() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 11;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 2);
createLevelPlatforms(7680, ground, 1);
createLevelPlatforms(8960, ground, 1);
createLevelPflex(1980, floorOne, 560);
createLevelPflex(2160, floorTwo, 560);
createLevelPflex(1980, floorThree, 560);
createLevelPflex(5420, floorThree, 560);
createLevelPflex(5600, floorTwo, 560);
createLevelPflex(1200, floorTwo, 1680);
createLevelPflex(3120, floorTwo, 320);
createLevelPflex(3680, floorTwo, 560);
createLevelPflex(4480, floorTwo, 320);
createLevelPflex(4960, floorTwo, 320);
createLevelPflex(6160, floorTwo, 160);
createLevelPflex(3420, ground - 320, 280);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1600, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:2200, inity:floorTwo, scopex:200, scopey:140, patrol_dist:260, patrolTowardRight:false, patrolTowardLeft:true, speed:2.5, version:3}, {initx:3280, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:0, version:2}, {initx:4360, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:5040, inity:ground, scopex:200, scopey:140, patrol_dist:320, patrolTowardRight:false, patrolTowardLeft:true, speed:2.5, version:3}, {initx:5860, inity:floorTwo, scopex:200, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2.5, version:3}, {initx:6520, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:3, version:4}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1400, inity:floorTwo - 60, version:1}, {initx:1480, inity:floorTwo - 60, version:1}, {initx:1720, inity:floorTwo - 60, version:1}, {initx:1800, inity:floorTwo - 60, version:1}, {initx:2220, inity:floorThree - 60, version:1}, {initx:2300, inity:floorThree - 60, version:1}, {initx:2380, inity:floorThree - 60, version:1}, {initx:2220, inity:ground - 60, version:1}, {initx:2300, inity:ground - 60, version:1}, {initx:2380, inity:ground - 60, version:1}, {initx:3480, inity:(floorTwo - 60) - 40, version:1}, {initx:3560, inity:(floorTwo - 60) - 40, version:1}, {initx:3640, inity:(floorTwo - 60) - 40, version:1}, {initx:3840, inity:floorTwo - 60, version:1}, {initx:3920, inity:floorTwo - 60, version:1}, {initx:4000, inity:floorTwo - 60, version:1}, {initx:4080, inity:floorTwo - 60, version:1}, {initx:4835, inity:floorThree - 60, version:2}, {initx:4905, inity:floorThree - 60, version:2}, {initx:5660, inity:floorTwo - 60, version:1}, {initx:5740, inity:floorTwo - 60, version:1}, {initx:5820, inity:floorTwo - 60, version:1}, {initx:5900, inity:floorTwo - 60, version:1}, {initx:5980, inity:floorTwo - 60, version:1}, {initx:6060, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:1360, inity:ground - 60, version:2}, {initx:1560, inity:floorTwo - 60, version:1}, {initx:1640, inity:floorTwo - 60, version:2}, {initx:1840, inity:ground - 60, version:1}, {initx:2800, inity:floorTwo - 60, version:2}, {initx:4600, inity:floorTwo - 60, version:1}, {initx:4680, inity:floorTwo - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:320, inity:floorOne - 60, version:1}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [{initx:2880, inity:ground, version:1}, {initx:2960, inity:ground, version:1}, {initx:3040, inity:ground, version:1}, {initx:3120, inity:ground, version:1}];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:4640, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG2(8960, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelBG3(8960, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 2);
createLevelFG1(7680, ground, 1);
createLevelFG1(8960, ground, 1);
createLevelFG2(1200, ground, 1);
createLevelFG2(1280, ground, 1);
createLevelFG2(1360, ground, 1);
createLevelFG2(1440, ground, 1);
createLevelFG2(1520, ground, 1);
createLevelFG2(1600, ground, 1);
createLevelFG2(1680, ground, 1);
createLevelFG2(1760, ground, 1);
createLevelFG2(1840, ground, 1);
createLevelFG2(1920, ground, 1);
createLevelFG2(2000, ground, 1);
createLevelFG2(2080, ground, 2);
createLevelFG2(2720, ground, 2);
createLevelFG2(2800, ground, 2);
createLevelFG2(3120, ground, 1);
createLevelFG2(3200, ground, 1);
createLevelFG2(3280, ground, 1);
createLevelFG2(3360, ground, 1);
createLevelFG2(3680, ground, 1);
createLevelFG2(3760, ground, 1);
createLevelFG2(3840, ground, 1);
createLevelFG2(3920, ground, 1);
createLevelFG2(4000, ground, 1);
createLevelFG2(4080, ground, 1);
createLevelFG2(4160, ground, 1);
createLevelFG2(4480, ground, 2);
createLevelFG2(4560, ground, 1);
createLevelFG2(4640, ground, 1);
createLevelFG2(4720, ground, 1);
createLevelFG2(4960, ground, 1);
createLevelFG2(5040, ground, 1);
createLevelFG2(5120, ground, 1);
createLevelFG2(5200, ground, 1);
createLevelFG2(6160, ground, 2);
createLevelFG2(6240, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_bambooscaffold1", "fg_bambooscaffold1", fg3.getNextHighestDepth(), {_x:1980, _y:ground});
_root.fg3.attachMovie("fg_bambooscaffold2", "fg_bambooscaffold2", fg3.getNextHighestDepth(), {_x:5420, _y:ground});
_root.fg3.attachMovie("fg_templesmall", "fg_templesmall1", fg3.getNextHighestDepth(), {_x:3380, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost1", fg3.getNextHighestDepth(), {_x:1120, _y:ground});
_root.fg3.attachMovie("sp_lamppost", "sp_lamppost2", fg3.getNextHighestDepth(), {_x:4000, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag1", fg3.getNextHighestDepth(), {_x:320, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag2", fg3.getNextHighestDepth(), {_x:640, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag3", fg3.getNextHighestDepth(), {_x:960, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:8320, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn6.onRelease = function () {
currentLevel = 6;
loadLevel(6);
};
function loadLevel5() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 11;
reqPrisoners = 2;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 5);
createLevelPlatforms(2560, ground, 3);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 3);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPlatforms(8960, ground, 1);
createLevelPflex(1810, floorOne - 20, 220);
createLevelPflex(3950, floorOne, 220);
createLevelPflex(4370, floorOne, 220);
createLevelPflex(4790, floorOne, 220);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1920, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:2920, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:3480, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:4280, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:4, version:4}, {initx:4680, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:false, patrolTowardLeft:true, speed:4, version:4}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1840, inity:(floorTwo - 60) - 20, version:1}, {initx:2000, inity:(floorTwo - 60) - 20, version:1}, {initx:3160, inity:floorOne - 110, version:2}, {initx:3240, inity:floorOne - 110, version:2}, {initx:2560, inity:floorOne - 60, version:1}, {initx:2480, inity:floorOne - 60, version:1}, {initx:2640, inity:floorOne - 60, version:1}, {initx:4230, inity:floorTwo - 60, version:1}, {initx:4310, inity:floorTwo - 60, version:1}, {initx:4630, inity:floorTwo - 60, version:1}, {initx:4710, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:1920, inity:(floorTwo - 60) - 20, version:2}, {initx:1920, inity:(floorOne - 60) - 20, version:1}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:2560, inity:floorTwo - 60, version:3}, {initx:4280, inity:ground - 60, version:4}, {initx:4680, inity:ground - 60, version:2}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:4060, inity:ground, prisonerVer:1, cageVer:1}, {initx:4480, inity:ground, prisonerVer:1, cageVer:1}, {initx:4900, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG2(8960, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelBG3(8960, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 5);
createLevelFG1(2560, ground, 3);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 3);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
createLevelFG1(8960, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("barrels", "berrels1", fg3.getNextHighestDepth(), {_x:1810, _y:ground - 20});
_root.fg3.attachMovie("barrels", "berrels2", fg3.getNextHighestDepth(), {_x:1920, _y:ground - 20});
_root.fg3.attachMovie("barrels", "berrels3", fg3.getNextHighestDepth(), {_x:3950, _y:ground});
_root.fg3.attachMovie("barrels", "berrels4", fg3.getNextHighestDepth(), {_x:4060, _y:ground});
_root.fg3.attachMovie("barrels", "berrels5", fg3.getNextHighestDepth(), {_x:4370, _y:ground});
_root.fg3.attachMovie("barrels", "berrels6", fg3.getNextHighestDepth(), {_x:4480, _y:ground});
_root.fg3.attachMovie("barrels", "berrels7", fg3.getNextHighestDepth(), {_x:4790, _y:ground});
_root.fg3.attachMovie("barrels", "berrels8", fg3.getNextHighestDepth(), {_x:4900, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag1", fg3.getNextHighestDepth(), {_x:6720, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag2", fg3.getNextHighestDepth(), {_x:7040, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag3", fg3.getNextHighestDepth(), {_x:7360, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:7040, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn5.onRelease = function () {
currentLevel = 5;
loadLevel(5);
};
function loadLevel4() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 20;
reqPrisoners = 2;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPflex(1450, floorOne, 220);
createLevelPflex(2000, floorTwo, 320);
createLevelPflex(2440, floorOne, 160);
createLevelPflex(2680, floorTwo, 320);
createLevelPflex(2500, floorThree, 140);
createLevelPflex(3990, floorTwo, 640);
createLevelPflex(4750, floorOne, 160);
createLevelPflex(4990, floorTwo, 320);
createLevelPflex(4810, floorThree, 140);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1560, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:2500, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:3470, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:5410, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1520, inity:floorOne - 60, version:1}, {initx:1600, inity:floorOne - 60, version:1}, {initx:2080, inity:floorTwo - 60, version:1}, {initx:2240, inity:floorTwo - 60, version:1}, {initx:2760, inity:floorTwo - 60, version:1}, {initx:2840, inity:floorTwo - 60, version:1}, {initx:2920, inity:floorTwo - 60, version:1}, {initx:3290, inity:ground - 60, version:1}, {initx:3290, inity:floorOne - 60, version:1}, {initx:3210, inity:floorOne - 60, version:1}, {initx:3370, inity:floorOne - 60, version:1}, {initx:3710, inity:ground - 60, version:1}, {initx:3710, inity:floorOne - 60, version:1}, {initx:3630, inity:floorOne - 60, version:1}, {initx:3790, inity:floorOne - 60, version:1}, {initx:4070, inity:floorTwo - 60, version:1}, {initx:4150, inity:floorTwo - 60, version:1}, {initx:4230, inity:floorTwo - 60, version:1}, {initx:4310, inity:floorTwo - 60, version:1}, {initx:4390, inity:floorTwo - 60, version:1}, {initx:4470, inity:floorTwo - 60, version:1}, {initx:4550, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:2160, inity:floorTwo - 60, version:1}, {initx:3290, inity:floorTwo - 60, version:2}, {initx:4890, inity:floorThree - 60, version:1}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:2560, inity:ground - 60, version:3}, {initx:3710, inity:floorTwo - 60, version:1}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:1880, inity:ground, prisonerVer:1, cageVer:1}, {initx:2840, inity:ground, prisonerVer:1, cageVer:1}, {initx:4405, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("barrels", "berrels1", fg3.getNextHighestDepth(), {_x:1450, _y:ground});
_root.fg3.attachMovie("barrels", "berrels2", fg3.getNextHighestDepth(), {_x:1560, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame1", "fg_peasanthouse_frame2", fg3.getNextHighestDepth(), {_x:2000, _y:ground});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree1", fg3.getNextHighestDepth(), {_x:2680, _y:ground});
_root.fg3.attachMovie("clothesline", "clothesline1", fg3.getNextHighestDepth(), {_x:3270, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame2", "fg_peasanthouse_frame3", fg3.getNextHighestDepth(), {_x:3990, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame1", "fg_peasanthouse_frame4", fg3.getNextHighestDepth(), {_x:4310, _y:ground});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree1", fg3.getNextHighestDepth(), {_x:4990, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:7040, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn4.onRelease = function () {
currentLevel = 4;
loadLevel(4);
};
function loadLevel3() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 17;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 5);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 3);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPflex(1440, floorTwo, 640);
createLevelPflex(2240, floorOne, 160);
createLevelPflex(2480, floorTwo, 320);
createLevelPflex(2300, floorThree, 140);
createLevelPflex(3760, floorOne, 160);
createLevelPflex(4000, floorTwo, 320);
createLevelPflex(3820, floorThree, 140);
createLevelPflex(4480, floorTwo, 320);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1520, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:1760, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:4, version:4}, {initx:2640, inity:floorTwo, scopex:180, scopey:140, patrol_dist:140, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:3240, inity:floorTwo, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:4320, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1520, inity:floorTwo - 60, version:1}, {initx:1600, inity:floorTwo - 60, version:1}, {initx:1680, inity:floorTwo - 60, version:1}, {initx:1840, inity:floorTwo - 60, version:1}, {initx:1920, inity:floorTwo - 60, version:1}, {initx:2000, inity:floorTwo - 60, version:1}, {initx:2120, inity:floorThree - 110, version:2}, {initx:2200, inity:floorThree - 110, version:2}, {initx:2330, inity:floorThree - 60, version:1}, {initx:2410, inity:floorThree - 60, version:1}, {initx:2560, inity:floorTwo - 60, version:1}, {initx:2720, inity:floorTwo - 60, version:1}, {initx:3160, inity:floorOne - 110, version:2}, {initx:3240, inity:floorOne - 110, version:2}, {initx:4080, inity:floorTwo - 60, version:1}, {initx:4160, inity:floorTwo - 60, version:1}, {initx:4240, inity:floorTwo - 60, version:1}, {initx:4560, inity:floorTwo - 60, version:1}, {initx:4640, inity:floorTwo - 60, version:1}, {initx:4720, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:920, inity:(ground - 60) - 20, version:2}, {initx:1000, inity:(ground - 60) - 20, version:2}, {initx:1760, inity:floorTwo - 60, version:2}, {initx:4320, inity:ground - 60, version:1}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:2640, inity:floorTwo - 60, version:4}, {initx:3520, inity:floorThree - 60, version:1}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:4640, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 5);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 3);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_peasanthouse_frame1", "fg_peasanthouse_frame1", fg3.getNextHighestDepth(), {_x:1440, _y:ground});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree1", fg3.getNextHighestDepth(), {_x:2480, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame2b", "fg_peasanthouse_frame2", fg3.getNextHighestDepth(), {_x:1760, _y:ground});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree2", fg3.getNextHighestDepth(), {_x:4000, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame3", "fg_peasanthouse_frame3", fg3.getNextHighestDepth(), {_x:4480, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag3", fg3.getNextHighestDepth(), {_x:1200, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:5760, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn3.onRelease = function () {
currentLevel = 3;
loadLevel(3);
};
function loadLevel2() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 18;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 5);
createLevelPlatforms(6400, ground, 1);
createLevelPflex(1700, floorTwo, 640);
createLevelPflex(2720, floorTwo, 320);
createLevelPflex(3360, floorTwo, 320);
createLevelPflex(4040, floorTwo, 960);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:1480, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:2400, inity:ground, scopex:160, scopey:140, patrol_dist:320, patrolTowardRight:true, patrolTowardLeft:false, speed:4, version:4}, {initx:2080, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:2, version:1}, {initx:4200, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:1780, inity:floorTwo - 60, version:1}, {initx:1860, inity:floorTwo - 60, version:1}, {initx:1940, inity:floorTwo - 60, version:1}, {initx:2100, inity:floorTwo - 60, version:1}, {initx:2180, inity:floorTwo - 60, version:1}, {initx:2260, inity:floorTwo - 60, version:1}, {initx:2800, inity:floorTwo - 60, version:1}, {initx:2960, inity:floorTwo - 60, version:1}, {initx:3160, inity:floorOne - 110, version:2}, {initx:3240, inity:floorOne - 110, version:2}, {initx:3480, inity:floorThree - 110, version:1}, {initx:3560, inity:floorThree - 110, version:1}, {initx:4120, inity:ground - 60, version:1}, {initx:4280, inity:ground - 60, version:1}, {initx:4360, inity:floorTwo - 60, version:1}, {initx:4440, inity:floorTwo - 60, version:1}, {initx:4520, inity:floorTwo - 60, version:1}, {initx:4600, inity:floorTwo - 60, version:1}, {initx:4680, inity:floorTwo - 60, version:1}, {initx:4760, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:920, inity:ground - 60, version:1}, {initx:1000, inity:ground - 60, version:2}, {initx:2020, inity:floorTwo - 60, version:1}, {initx:2880, inity:floorTwo - 60, version:1}, {initx:3520, inity:floorTwo - 60, version:1}, {initx:4280, inity:floorTwo - 60, version:2}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:4200, inity:ground - 60, version:3}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:3080, inity:ground, prisonerVer:1, cageVer:1}, {initx:3320, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 5);
createLevelFG1(6400, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.fg3.attachMovie("fg_peasanthouse_frame1", "fg_peasanthouse_frame1", fg3.getNextHighestDepth(), {_x:1700, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame2b", "fg_peasanthouse_frame2", fg3.getNextHighestDepth(), {_x:2020, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame4", "fg_peasanthouse_frame3", fg3.getNextHighestDepth(), {_x:2720, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame1", "fg_peasanthouse_frame4", fg3.getNextHighestDepth(), {_x:3360, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame2", "fg_peasanthouse_frame5", fg3.getNextHighestDepth(), {_x:4040, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame1", "fg_peasanthouse_frame6", fg3.getNextHighestDepth(), {_x:4360, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame4", "fg_peasanthouse_frame7", fg3.getNextHighestDepth(), {_x:4680, _y:ground});
_root.fg3.attachMovie("fg_flag1", "fg_flag3", fg3.getNextHighestDepth(), {_x:1120, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:5760, _y:ground - 19});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn2.onRelease = function () {
currentLevel = 2;
loadLevel(2);
};
function loadLevel1() {
resetGame();
loadLevelGlobal();
teleport = 0;
cloak = 0;
reqGems = 9;
reqPrisoners = 1;
platfCount = 0;
wallCount = 0;
portalCount = 0;
gemCount = 0;
powerupCount = 0;
bonusCount = 0;
spikeCount = 0;
prisonerCount = 0;
guardCount = 0;
treesCount = 0;
montCount = 0;
fg1Count = 0;
fg2Count = 0;
pflexCount = 0;
stealthBar.stealthFill._width = 0;
jumppressed = false;
player._x = initial_playerx;
player._y = initial_playery;
_root.createEmptyMovieClip("bg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg3", _root.getNextHighestDepth());
_root.createEmptyMovieClip("fg1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("lev", _root.getNextHighestDepth());
_root.createEmptyMovieClip("sp1", _root.getNextHighestDepth());
_root.lev.createEmptyMovieClip("platforms", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("walls", _root.lev.getNextHighestDepth());
_root.lev.createEmptyMovieClip("objects", _root.lev.getNextHighestDepth());
createLevelPlatforms(-1280, ground, 1);
createLevelPlatforms(0, ground, 1);
createLevelPlatforms(1280, ground, 1);
createLevelPlatforms(2560, ground, 1);
createLevelPlatforms(3840, ground, 1);
createLevelPlatforms(5120, ground, 1);
createLevelPlatforms(6400, ground, 1);
createLevelPlatforms(7680, ground, 1);
createLevelPlatforms(8960, ground, 1);
createLevelPflex(3020, floorOne, 160);
createLevelPflex(3260, floorTwo, 320);
createLevelPflex(3080, floorThree, 140);
createLevelPflex(5420, floorTwo, 320);
createLevelPflex(5980, floorTwo, 320);
createLevelWall(0, ground, 30, 560, 1);
var _local5 = [{initx:3340, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}, {initx:4640, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:true, patrolTowardLeft:false, speed:0, version:2}, {initx:5820, inity:ground, scopex:180, scopey:140, patrol_dist:160, patrolTowardRight:false, patrolTowardLeft:true, speed:2, version:1}];
for (var _local10 in _local5) {
createLevelGuards(_local5[_local10], 1);
}
var _local7 = [{initx:300, inity:ground - 60, version:1}, {initx:1600, inity:ground - 60, version:1}, {initx:1680, inity:ground - 60, version:1}, {initx:1760, inity:ground - 60, version:1}, {initx:1840, inity:floorOne - 110, version:2}, {initx:1920, inity:floorOne - 110, version:2}, {initx:2000, inity:floorOne - 110, version:2}, {initx:2080, inity:ground - 60, version:1}, {initx:2160, inity:ground - 60, version:1}, {initx:2240, inity:ground - 60, version:1}, {initx:6060, inity:floorTwo - 60, version:1}, {initx:6220, inity:floorTwo - 60, version:1}];
for (var _local13 in _local7) {
createLevelGems(_local7[_local13], 1);
}
var _local2 = [{initx:4340, inity:ground - 60, version:2}, {initx:5480, inity:ground - 60, version:1}, {initx:5660, inity:floorTwo - 60, version:1}];
for (var _local11 in _local2) {
createLevelPowerups(_local2[_local11], 1);
}
var _local6 = [{initx:6140, inity:floorTwo - 60, version:4}];
for (var _local8 in _local6) {
createLevelBonuses(_local6[_local8], 1);
}
var _local4 = [];
for (var _local9 in _local4) {
createLevelSpikes(_local4[_local9], 1);
}
var _local3 = [{initx:6940, inity:ground, prisonerVer:1, cageVer:1}, {initx:7180, inity:ground, prisonerVer:1, cageVer:1}, {initx:7420, inity:ground, prisonerVer:1, cageVer:1}];
for (var _local12 in _local3) {
createLevelPrisoners(_local3[_local12], 1);
}
createLevelBG1(560, 0);
createLevelBG2(-1280, ground);
createLevelBG2(0, ground);
createLevelBG2(1280, ground);
createLevelBG2(2560, ground);
createLevelBG2(3840, ground);
createLevelBG2(5120, ground);
createLevelBG2(6400, ground);
createLevelBG2(7680, ground);
createLevelBG2(8960, ground);
createLevelBG3(-1280, ground);
createLevelBG3(0, ground);
createLevelBG3(1280, ground);
createLevelBG3(2560, ground);
createLevelBG3(3840, ground);
createLevelBG3(5120, ground);
createLevelBG3(6400, ground);
createLevelBG3(7680, ground);
createLevelBG3(8960, ground);
createLevelFG1(-1280, ground, 1);
createLevelFG1(0, ground, 1);
createLevelFG1(1280, ground, 1);
createLevelFG1(2560, ground, 1);
createLevelFG1(3840, ground, 1);
createLevelFG1(5120, ground, 1);
createLevelFG1(6400, ground, 1);
createLevelFG1(7680, ground, 1);
createLevelFG1(8960, ground, 1);
_root.sp1.attachMovie("teleportBeam", "teleportBeam", sp1.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.lev.objects.attachMovie("tutorialWall", "tutorialWall1", lev.objects.getNextHighestDepth(), {_x:540, _y:ground});
_root.lev.objects.attachMovie("tutorialWall", "tutorialWall2", lev.objects.getNextHighestDepth(), {_x:1280, _y:ground});
_root.lev.objects.attachMovie("tutorialWall", "tutorialWall3", lev.objects.getNextHighestDepth(), {_x:2560, _y:ground});
_root.lev.objects.attachMovie("tutorialWall", "tutorialWall4", lev.objects.getNextHighestDepth(), {_x:3840, _y:ground});
_root.lev.objects.attachMovie("tutorialWall", "tutorialWall5", lev.objects.getNextHighestDepth(), {_x:5120, _y:ground});
_root.lev.objects.attachMovie("tutorialWall", "tutorialWall6", lev.objects.getNextHighestDepth(), {_x:6400, _y:ground});
_root.lev.objects.attachMovie("tutorialWall", "tutorialWall7", lev.objects.getNextHighestDepth(), {_x:7680, _y:ground});
_root.fg3.attachMovie("fg_bigtree1", "fg_bigtree1", fg3.getNextHighestDepth(), {_x:3260, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame1", "fg_peasanthouse_frame1", fg3.getNextHighestDepth(), {_x:5420, _y:ground});
_root.fg3.attachMovie("fg_peasanthouse_frame4", "fg_peasanthouse_frame2", fg3.getNextHighestDepth(), {_x:5980, _y:ground});
_root.lev.objects.attachMovie("finish_line", "finish_line", lev.objects.getNextHighestDepth(), {_x:8320, _y:ground});
bg1.swapDepths(100);
bg2.swapDepths(200);
bg3.swapDepths(300);
fg2.swapDepths(320);
fg3.swapDepths(340);
player.swapDepths(360);
lev.swapDepths(380);
fg1.swapDepths(600);
sp1.swapDepths(800);
lev.platforms._visible = 0;
lev.walls._visible = 0;
sp1.teleportBeam._visible = 0;
stealthBar.swapDepths(2000);
levelRendered = true;
miniMap();
}
levelMenu.selectLevel_btn1.onRelease = function () {
currentLevel = 1;
loadLevel(1);
};
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 2
stop();
Symbol 90 MovieClip Frame 3
stop();
Symbol 100 MovieClip [qtEventLockpick] Frame 1
stop();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
stop();
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 2
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 16
stop();
Symbol 168 MovieClip [player] Frame 1
stop();
Symbol 168 MovieClip [player] Frame 2
stop();
Symbol 168 MovieClip [player] Frame 3
stop();
Symbol 168 MovieClip [player] Frame 4
stop();
Symbol 168 MovieClip [player] Frame 5
stop();
Symbol 168 MovieClip [player] Frame 6
stop();
Symbol 208 MovieClip [smoke] Frame 22
stop();
Symbol 216 MovieClip [theMedalWon] Frame 1
stop();
Symbol 216 MovieClip [theMedalWon] Frame 2
stop();
Symbol 216 MovieClip [theMedalWon] Frame 3
stop();
Symbol 216 MovieClip [theMedalWon] Frame 4
stop();
Symbol 282 MovieClip Frame 1
_parent.stop();
Symbol 282 MovieClip Frame 186
_parent.play();
Symbol 283 MovieClip Frame 2
stop();
_root.levelMenu.gotoAndStop(1);
Symbol 294 MovieClip [levelMenu] Frame 1
stop();
Symbol 294 MovieClip [levelMenu] Frame 2
stop();
Symbol 294 MovieClip [levelMenu] Frame 3
stop();
Symbol 294 MovieClip [levelMenu] Frame 4
stop();
Symbol 294 MovieClip [levelMenu] Frame 5
stop();
Symbol 294 MovieClip [levelMenu] Frame 6
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 2
stop();
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 2
stop();
Symbol 323 MovieClip Frame 3
stop();
Symbol 323 MovieClip Frame 4
stop();
Symbol 490 MovieClip [cutScene1] Frame 450
stop();
Symbol 495 MovieClip [block] Frame 1
stop();
Symbol 522 Button
on (release) {
getURL ("http://www.maxgames.com", _blank);
}