Frame 1
restart = [0, 1, 3, 1];
myFadeColor = new Color(this);
myFadeTransform = new Object();
fade = function (destination) {
locked = true;
Mouse.show();
clearPopups();
gameActive = false;
fader.focuser = null;
fader.destination = destination;
competedMessage._visible = false;
fader.gotoAndPlay(2);
};
_quality = "BEST";
Frame 2
ifFrameLoaded (42) {
gotoAndStop (4);
}
Frame 3
gotoAndPlay (2);
Frame 4
best = 10000;
musicPlaying = false;
fade("back");
Frame 25
onEnterFrame = function () {
if (game.discovered) {
bit = bit + (dir * 40);
if (bit > 255) {
bit = 255;
dir = dir * -1;
}
if (bit < 0) {
bi = 0;
dir = dir * -1;
}
myColorTransform.rb = bit;
myColor.setTransform(myColorTransform);
myColor2.setTransform(myColorTransform);
}
};
player = 1;
building = 1;
buildingList = [];
buildingList[1] = "Level 1: Infiltrate the Parking Garage";
buildingList[2] = "Level 2: Infiltrate the Main Office";
buildingList[3] = "Level 3: Infiltrate the Executive Suites";
playAgain.label = buildingList[building];
dir = 1;
bit = 0;
var myColor = new Color(background);
var myColor2 = new Color(game);
var myColorTransform = new Object();
myColorTransform.ra = 100;
myColorTransform.rb = 0;
myColorTransform.ga = 100;
myColorTransform.gb = 0;
myColorTransform.ba = 100;
myColorTransform.bb = 0;
myColorTransform.aa = 100;
myColorTransform.ab = 0;
myColor.setTransform(myColorTransform);
myColor2.setTransform(myColorTransform);
stop();
Frame 35
fade("back");
Frame 42
_root.sounds.music.stop();
Symbol 4 MovieClip Frame 1
total = _root.getBytesTotal();
Symbol 4 MovieClip Frame 2
percent = _root.getBytesLoaded() / total;
bar._xscale = percent * 100;
Symbol 4 MovieClip Frame 3
gotoAndPlay (2);
Symbol 12 MovieClip Frame 1
changeColor = function (percent) {
_parent.myFadeTransform.rb = 3 * percent;
_parent.myFadeTransform.gb = 3 * percent;
_parent.myFadeTransform.bb = 2.55 * percent;
_parent.myFadeColor.setTransform(_parent.myFadeTransform);
};
changeColor(0);
stop();
Symbol 12 MovieClip Frame 2
changeColor(20);
play();
Symbol 12 MovieClip Frame 3
changeColor(40);
_root.sounds.fx.window.start();
Symbol 12 MovieClip Frame 4
changeColor(60);
Symbol 12 MovieClip Frame 5
changeColor(60);
Symbol 12 MovieClip Frame 6
changeColor(100);
_parent.gotoAndStop(destination);
Symbol 12 MovieClip Frame 8
changeColor(80);
Symbol 12 MovieClip Frame 10
changeColor(60);
Symbol 12 MovieClip Frame 12
changeColor(40);
Symbol 12 MovieClip Frame 14
changeColor(20);
Symbol 12 MovieClip Frame 16
changeColor(0);
Symbol 12 MovieClip Frame 18
changeColor(20);
Symbol 12 MovieClip Frame 20
changeColor(40);
Symbol 12 MovieClip Frame 22
play();
changeColor(60);
Symbol 12 MovieClip Frame 24
changeColor(80);
Symbol 12 MovieClip Frame 26
changeColor(100);
Symbol 12 MovieClip Frame 27
changeColor(80);
Symbol 12 MovieClip Frame 28
changeColor(60);
Symbol 12 MovieClip Frame 29
changeColor(40);
Symbol 12 MovieClip Frame 30
changeColor(20);
Symbol 20 Button
on (release) {
_parent.fade("back");
}
Symbol 24 Button
on (release) {
_parent.fade("help");
}
Symbol 30 Button
on (release) {
_parent.fade("game");
}
Symbol 42 MovieClip Frame 1
gotoAndStop(_parent.building);
Symbol 86 MovieClip Frame 1
_visible = false;
Symbol 97 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 10
_root.sounds.win.start();
Symbol 104 MovieClip Frame 15
_root.sounds.music.stop();
Symbol 107 MovieClip Frame 1
gotoAndPlay(14 + random(14));
Symbol 107 MovieClip Frame 34
gotoAndPlay (12);
Symbol 110 MovieClip Frame 1
play();
Symbol 110 MovieClip Frame 11
stop();
Symbol 111 MovieClip Frame 1
gotoAndPlay(random(18) + 2);
Symbol 111 MovieClip Frame 22
gotoAndPlay (2);
Symbol 111 MovieClip Frame 23
_root.sounds.music.stop();
_root.sounds.explode.start();
Symbol 113 MovieClip Frame 1
onEnterFrame = function () {
if (hitTest(_parent._parent._parent._parent.detector)) {
_parent._parent._parent._parent.detected();
}
};
_visible = false;
Symbol 152 MovieClip Frame 1
onEnterframe = function () {
if (hitTest(_parent._parent._parent.detector)) {
}
};
Symbol 153 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 1
wall = new Array();
floor = new Array();
wall[0] = new Array();
wall[1] = new Array();
wall[2] = new Array();
wall[3] = new Array();
wall[4] = new Array();
wall[5] = new Array();
floor[0] = new Array();
floor[1] = new Array();
floor[2] = new Array();
floor[3] = new Array();
floor[4] = new Array();
floor[5] = new Array();
n = 0;
while (n < floor.length) {
m = 0;
while (m <= 14) {
duplicateMovieClip ("floorKing", ("floor" + m) + n, (m * 300) + n);
floor[n].push(eval (("floor" + m) + n));
floor[n][m]._x = (m * _parent.spacing) + 25;
floor[n][m]._y = (n * _parent.level_spacing) - 5;
floor[n][m].gotoAndStop(_parent.floor[n][m] + 1);
duplicateMovieClip ("wallKing", ("wall" + m) + n, ((m * 300) + n) + 45);
wall[n].push(eval (("wall" + m) + n));
wall[n][m]._x = (m * _parent.spacing) + 25;
wall[n][m]._y = (n * _parent.level_spacing) - 5;
wall[n][m].gotoAndStop(_parent.wall[n][m] + 2);
m++;
}
n++;
}
Symbol 156 MovieClip Frame 1
onEnterFrame = function () {
_parent._parent._parent.detector = this;
_parent._parent._parent._parent.detector = this;
};
_visible = false;
Symbol 177 MovieClip Frame 3
_root.sounds.steps.start("walk");
Symbol 177 MovieClip Frame 7
_root.sounds.steps.start("walk");
Symbol 178 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 10
_root.sounds.thud.start();
Symbol 221 MovieClip Frame 4
_root.sounds.steps.start("run");
Symbol 221 MovieClip Frame 8
_root.sounds.steps.start("run");
Symbol 240 MovieClip Frame 7
_root.sounds.thud.start();
Symbol 241 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 5
_root.sounds.thud.start();
Symbol 246 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 11
_root.sounds.thud.start();
Symbol 258 MovieClip Frame 1
stop();
Symbol 261 MovieClip Frame 22
stop();
Symbol 262 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 4
_root.sounds.thud.start();
Symbol 290 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 1
_root.sounds.thud.start();
Symbol 340 MovieClip Frame 4
_root.sounds.thud.start();
Symbol 380 MovieClip Frame 5
stop();
Symbol 392 MovieClip Frame 4
_root.sounds.thud.start();
Symbol 392 MovieClip Frame 6
stop();
Symbol 394 MovieClip Frame 1
withGuard = function () {
whacking = false;
for (var _local2 in _parent.guardList[_parent.currentRoom]) {
if (((_parent.guardList[_parent.currentRoom][_local2].clip._visible and (_parent.guardList[_parent.currentRoom][_local2].clip.position == position)) and (!_parent.guardList[_parent.currentRoom][_local2].clip.dead)) and (_parent.guardList[_parent.currentRoom][_local2].clip.level == level)) {
victim = _parent.guardList[_parent.currentRoom][_local2].clip;
whacking = true;
}
}
if (whacking) {
gotoAndPlay ("whack");
}
};
withGuard();
hanging = false;
if (wasDiscovered) {
gotoAndPlay ("discover");
}
smacktest = function (where, high) {
tamp = where + facing;
temp = eval (("_parent.wall" + tamp) + high);
place = _parent.enviro.wall[high][where + facing];
return(_parent.wall[high][where + facing]);
};
if (smacktest(position - facing, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (_parent.floor[level][position] == 0) {
action = "fall";
}
if (action == "walk_left") {
if (facing == -1) {
gotoAndPlay ("walk");
} else {
gotoAndPlay ("spin");
}
}
if (action == "walk_right") {
if (facing == 1) {
gotoAndPlay ("walk");
} else {
gotoAndPlay ("spin");
}
}
if (action == "run_left") {
if (facing == -1) {
gotoAndPlay ("run");
} else {
gotoAndPlay ("spin");
}
}
if (action == "run_right") {
if (facing == 1) {
gotoAndPlay ("run");
} else {
gotoAndPlay ("spin");
}
}
if (action == "jump") {
gotoAndPlay ("jump");
}
if (action == "runjump") {
gotoAndPlay ("runjump");
}
if (action == "fall") {
gotoAndPlay ("fall");
}
if (action == "reach") {
gotoAndPlay ("reach");
}
if (action == "down") {
gotoAndPlay ("lower");
}
if (action == "scattle") {
gotoAndPlay ("scattle");
}
if (_parent.wall[level][position] == -1) {
place = _parent.enviro.wall[level][position];
gotoAndPlay ("enter");
}
Symbol 394 MovieClip Frame 2
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 12
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stand");
}
if (smacktest(position, level) == 8) {
action = "stand";
gotoAndPlay ("stand");
}
if (smacktest(position - facing, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
}
withGuard();
Symbol 394 MovieClip Frame 14
position = position + facing;
if (smacktest(position, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
if (_parent.floor[level][position] == 0) {
action = "fall";
}
if ((action == "walk_right") and (facing == -1)) {
gotoAndPlay ("spin");
} else if ((action == "walk_left") and (facing == 1)) {
gotoAndPlay ("spin");
} else if ((action != "walk_left") and (action != "walk_right")) {
gotoAndPlay ("stand");
}
withGuard();
Symbol 394 MovieClip Frame 16
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stand");
}
if (smacktest(position, level) == 8) {
action = "stand";
gotoAndPlay ("stand");
}
if (smacktest(position - facing, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
whacking = false;
for (var i in _parent.guardList[_parent.currentRoom]) {
if (((_parent.guardList[_parent.currentRoom][i].clip._visible and (_parent.guardList[_parent.currentRoom][i].clip.position == (position + facing))) and (!_parent.guardList[_parent.currentRoom][i].clip.dead)) and (_parent.guardList[_parent.currentRoom][i].clip.level == level)) {
victim = _parent.guardList[_parent.currentRoom][i].clip;
whacking = true;
}
}
if (whacking) {
gotoAndPlay ("whack");
}
}
withGuard();
Symbol 394 MovieClip Frame 18
position = position + facing;
if (smacktest(position, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
if (_parent.floor[level][position] == 0) {
action = "fall";
}
if ((action == "walk_right") and (facing == -1)) {
gotoAndPlay ("spin");
} else if ((action == "walk_left") and (facing == 1)) {
gotoAndPlay ("spin");
} else if ((action != "walk_left") and (action != "walk_right")) {
gotoAndPlay ("stand");
}
withGuard();
Symbol 394 MovieClip Frame 20
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stand");
}
if (smacktest(position - facing, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
whacking = false;
for (var i in _parent.guardList[_parent.currentRoom]) {
if (((_parent.guardList[_parent.currentRoom][i].clip._visible and (_parent.guardList[_parent.currentRoom][i].clip.position == (position + facing))) and (!_parent.guardList[_parent.currentRoom][i].clip.dead)) and (_parent.guardList[_parent.currentRoom][i].clip.level == level)) {
victim = _parent.guardList[_parent.currentRoom][i].clip;
whacking = true;
}
}
if (whacking) {
gotoAndPlay ("whack");
} else {
gotoAndPlay ("walk");
}
}
withGuard();
Symbol 394 MovieClip Frame 23
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 26
facing = -facing;
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
gotoAndPlay ("stand");
}
Symbol 394 MovieClip Frame 32
wasDiscovered = false;
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stumble");
}
if (smacktest(position, level) == 8) {
action = "stand";
gotoAndPlay ("stumble");
}
if (smacktest(position - facing, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
Symbol 394 MovieClip Frame 36
if (smacktest(position, level) == 2) {
wasDiscovered = true;
}
Symbol 394 MovieClip Frame 37
if (smacktest(position + facing, level) == 1) {
position = position + facing;
action = "stand";
gotoAndPlay ("stumble");
}
if (smacktest(position + facing, level) == 8) {
position = position + facing;
action = "stand";
gotoAndPlay ("stumble");
}
if (smacktest(position + facing, level) == 2) {
wasDiscovered = true;
}
Symbol 394 MovieClip Frame 39
temp = position + (3 * facing);
if (smacktest(position + (facing * 2), level) == 2) {
wasDiscovered = true;
gotoAndPlay ("discover");
}
if (_parent.floor[level][temp] == 0) {
position = temp;
action = "fall";
gotoAndPlay ("fall");
} else if (smacktest(position + (2 * facing), level) == 1) {
position = position + (facing * 2);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + (2 * facing), level) == 8) {
position = position + (facing * 2);
action = "stand";
gotoAndPlay ("stumble");
}
Symbol 394 MovieClip Frame 42
position = position + (3 * facing);
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stand");
}
if (smacktest(position, level) == 8) {
action = "stand";
gotoAndPlay ("stand");
}
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 44
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
trace(smacktest(position, level));
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stumble");
}
if (smacktest(position, level) == 8) {
action = "stand";
gotoAndPlay ("stumble");
}
if (smacktest(position - facing, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
if (_parent.wall[level][position] == -1) {
gotoAndPlay ("enter");
}
}
Symbol 394 MovieClip Frame 45
if (action == "runjump") {
gotoAndPlay ("runjump");
}
Symbol 394 MovieClip Frame 46
tromp = position + facing;
trace(smacktest(position, level));
if (_parent.floor[level][temp] == 0) {
action = "fall";
position = temp;
gotoAndPlay ("fall");
} else if (smacktest(position + facing, level) == 1) {
position = position + facing;
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + facing, level) == 8) {
position = position + facing;
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position, level) == 2) {
position = position + facing;
action = "stand";
gotoAndPlay ("discover");
} else if (smacktest(position, level) == 3) {
position = position + facing;
action = "stand";
gotoAndPlay ("explode");
} else if (action == "runjump") {
position = tromp;
gotoAndPlay ("runjump");
}
if (_parent.wall[level][position + facing] == -1) {
position = position + facing;
gotoAndPlay ("enter");
}
Symbol 394 MovieClip Frame 47
if (action == "runjump") {
position = position + facing;
gotoAndPlay ("runjump");
}
Symbol 394 MovieClip Frame 48
position = position + (2 * facing);
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
if (_parent.wall[level][position] == -1) {
gotoAndPlay ("enter");
}
if (_parent.floor[level][position] == 0) {
action = "fall";
gotoAndPlay ("fall");
} else if (action == "runjump") {
gotoAndPlay ("runjump");
} else if ((action == "run_right") and (facing == 1)) {
gotoAndPlay ("run");
} else if ((action == "run_left") and (facing == -1)) {
gotoAndPlay ("run");
} else {
action = stand;
gotoAndPlay ("stand");
}
}
Symbol 394 MovieClip Frame 52
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stumble");
}
if (smacktest(position, level) == 8) {
action = "stand";
gotoAndPlay ("stumble");
}
Symbol 394 MovieClip Frame 54
temp = position + facing;
if (_parent.floor[level][temp] == 0) {
action = "fall";
position = temp;
gotoAndPlay ("fall");
} else if (smacktest(position + facing, level) == 1) {
position = position + facing;
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + facing, level) == 8) {
position = position + facing;
action = "stand";
gotoAndPlay ("stumble");
}
Symbol 394 MovieClip Frame 56
position = position + (2 * facing);
if (_parent.floor[level][position] == 0) {
level--;
action = "fall";
gotoAndPlay ("fall");
}
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 60
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (_parent.floor[level][position] == 0) {
action = "fall";
position = temp;
gotoAndPlay ("fall");
}
Symbol 394 MovieClip Frame 61
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position, level) == 8) {
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position - facing, level) == 2) {
position = position + facing;
action = "stand";
gotoAndPlay ("discover");
}
Symbol 394 MovieClip Frame 62
if (smacktest(position + facing, level) == 1) {
position = position + (facing * 1);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + facing, level) == 8) {
position = position + (facing * 1);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position, level) == 2) {
position = position + facing;
action = "stand";
gotoAndPlay ("discover");
}
temp = level - 1;
tamp = position + (facing * 1);
tump = position + (facing * 2);
if ((_parent.floor[temp][tamp] == 2) and (_parent.floor[temp][tump] == 1)) {
position = tamp;
_x = (_x + (_parent.spacing * 1));
gotoAndPlay ("hang");
}
Symbol 394 MovieClip Frame 63
if (smacktest(position + (2 * facing), level) == 1) {
position = position + (facing * 2);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + (2 * facing), level) == 8) {
position = position + (facing * 2);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + facing, level) == 2) {
position = position + facing;
action = "stand";
gotoAndPlay ("discover");
}
temp = level - 1;
tamp = position + (facing * 2);
tump = position + (facing * 3);
if ((_parent.floor[temp][tamp] == 2) and (_parent.floor[temp][tump] == 1)) {
position = tamp;
_x = (_x + (_parent.spacing * 2));
gotoAndPlay ("hang");
}
Symbol 394 MovieClip Frame 64
if (smacktest(position + (3 * facing), level) == 1) {
position = position + (facing * 3);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + (3 * facing), level) == 8) {
position = position + (facing * 3);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + (facing * 2), level) == 2) {
position = position + facing;
action = "stand";
gotoAndPlay ("discover");
}
temp = level - 1;
tamp = position + (facing * 3);
tump = position + (facing * 4);
if ((_parent.floor[temp][tamp] == 2) and (_parent.floor[temp][tump] == 1)) {
position = tamp;
_x = (_x + (_parent.spacing * 3));
gotoAndPlay ("hang");
}
Symbol 394 MovieClip Frame 65
if (smacktest(position + (4 * facing), level) == 1) {
position = position + (facing * 4);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + (4 * facing), level) == 8) {
position = position + (facing * 4);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + (facing * 3), level) == 2) {
position = position + facing;
action = "stand";
gotoAndPlay ("discover");
}
temp = level - 1;
tamp = position + (facing * 4);
tump = position + (facing * 5);
if ((_parent.floor[temp][tamp] == 2) and (_parent.floor[temp][tump] == 1)) {
position = tamp;
_x = (_x + (_parent.spacing * 4));
gotoAndPlay ("hang");
}
Symbol 394 MovieClip Frame 66
temp = position + (5 * facing);
if (_parent.floor[level][temp] == 0) {
position = temp;
action = "fall";
gotoAndPlay ("fall");
} else if (smacktest(position + (4 * facing), level) == 1) {
position = position + (facing * 4);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + (4 * facing), level) == 8) {
position = position + (facing * 4);
action = "stand";
gotoAndPlay ("stumble");
} else if (smacktest(position + (4 * facing), level) == 2) {
position = position + facing;
action = "stand";
gotoAndPlay ("discover");
} else if (smacktest(position + (4 * facing), level) == 3) {
position = position + facing;
action = "stand";
gotoAndPlay ("explode");
}
Symbol 394 MovieClip Frame 68
position = position + (5 * facing);
if (_parent.floor[level][position] == 0) {
action = "fall";
position = temp;
gotoAndPlay ("fall");
} else {
gotoAndPlay ("slow");
}
Symbol 394 MovieClip Frame 76
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
temp = position + facing;
level++;
_y = (_y + 240);
if (_parent.floor[level][temp] == 1) {
}
Symbol 394 MovieClip Frame 78
temp = position + facing;
tamp = level - 1;
if (_parent.floor[tamp][temp] == 2) {
trace("he should be hanging");
position = position + facing;
gotoAndPlay ("hang");
} else {
trace("he shouldn't be hanging");
}
Symbol 394 MovieClip Frame 80
temp = position + facing;
if (_parent.floor[level][temp] == 0) {
position = temp;
action = "fall";
guy.inside.gotoAndPlay(1);
gotoAndPlay ("fall");
}
withGuard();
Symbol 394 MovieClip Frame 86
position = position + (1 * facing);
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 88
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (smacktest(position - facing, level) == -1) {
action = "enter";
gotoAndPlay ("enter");
}
Symbol 394 MovieClip Frame 93
if ((_parent.floor[level - 1][position] == 2) and (_parent.floor[level - 1][position + facing] == 1)) {
gotoAndPlay ("hang");
}
if ((_parent.floor[level - 1][position + facing] == 2) and (_parent.floor[level - 1][position + (facing * 2)] == 1)) {
_x = (_x + (spacing * facing));
position = position + facing;
gotoAndPlay ("hang");
}
Symbol 394 MovieClip Frame 100
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 102
hanging = true;
if (action == "reach") {
gotoAndPlay ("pullup");
}
if (action == "runjump") {
gotoAndPlay ("pullup");
}
if (action == "down") {
gotoAndPlay ("drop");
}
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (smacktest(position - facing, level) == 2) {
hanging = false;
wasDiscovered = true;
action = "down";
gotoAndPlay ("drop");
}
Symbol 394 MovieClip Frame 103
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
gotoAndPlay ("hang");
}
Symbol 394 MovieClip Frame 110
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 116
hanging = false;
level--;
Symbol 394 MovieClip Frame 118
withGuard();
Symbol 394 MovieClip Frame 119
withGuard();
Symbol 394 MovieClip Frame 120
chump = smacktest(position - facing, level);
trace("chump is " + chump);
if (chump == 8) {
state = "crouchd";
gotoAndPlay ("crouched");
} else {
withGuard();
}
Symbol 394 MovieClip Frame 121
withGuard();
Symbol 394 MovieClip Frame 122
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 125
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 128
if (_parent.floor[level][position] == 0) {
hanging = false;
level++;
guy.inside.gotoAndPlay(1);
gotoAndPlay ("drop");
}
Symbol 394 MovieClip Frame 132
action = "stand";
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 135
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
tamp = position + facing;
lookright = _parent.floor[level][tamp];
if ((_parent.floor[level][position] != 2) or (lookright != 1)) {
gotoAndPlay ("crouch");
}
Symbol 394 MovieClip Frame 141
level = level + 1;
hanging = true;
Symbol 394 MovieClip Frame 147
gotoAndPlay ("hang");
Symbol 394 MovieClip Frame 150
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 151
gotoAndPlay ("crouched");
Symbol 394 MovieClip Frame 155
state = "crouched";
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
if (_parent.floor[level][position] == 0) {
action = "fall";
state = "falling";
gotoAndPlay ("fall");
}
if ((action == "walk_left") or (action == "run_left")) {
if (facing == -1) {
gotoAndPlay ("scattle");
} else {
gotoAndPlay ("crouchspin");
}
}
if ((action == "walk_right") or (action == "run_right")) {
if (facing == 1) {
gotoAndPlay ("scattle");
} else {
gotoAndPlay ("crouchspin");
}
}
if (action == "down") {
tamp = position + facing;
lookright = _parent.floor[level][tamp];
if (_parent.floor[level][position] == 2) {
if (lookright != 1) {
facing = facing * -1;
}
gotoAndPlay ("lower");
}
}
chump = smacktest(position - facing, level);
if (((action == "reach") or (action == "runjump")) and (chump != 8)) {
state = "standing";
gotoAndPlay ("uncrouch");
}
Symbol 394 MovieClip Frame 156
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
gotoAndPlay ("crouched");
}
Symbol 394 MovieClip Frame 163
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 165
action = "stand";
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 172
facing = -facing;
gotoAndPlay ("crouched");
Symbol 394 MovieClip Frame 180
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (smacktest(position, level) == 1) {
action = "stand";
gotoAndPlay ("stand");
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
Symbol 394 MovieClip Frame 185
position = position + facing;
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
if (_parent.floor[level][position] == 0) {
action = "fall";
}
if ((action == "walk_right") and (facing == -1)) {
gotoAndPlay ("crouchspin");
} else if ((action == "walk_left") and (facing == 1)) {
gotoAndPlay ("crouchspin");
} else if ((action != "walk_left") and (action != "walk_right")) {
gotoAndPlay ("crouched");
}
if (action == "scattle") {
gotoAndPlay ("scattle");
} else {
gotoAndPlay ("crouched");
}
}
Symbol 394 MovieClip Frame 190
position = position + facing;
if (wasDiscovered) {
gotoAndPlay ("discover");
} else {
if (_parent.floor[level][position] == 0) {
action = "fall";
}
if ((action == "walk_right") and (facing == -1)) {
gotoAndPlay ("crouchspin");
} else if ((action == "walk_left") and (facing == 1)) {
gotoAndPlay ("crouchspin");
} else if ((action != "walk_left") and (action != "walk_right")) {
gotoAndPlay ("crouched");
}
if (action == "scattle") {
} else {
gotoAndPlay ("crouched");
}
}
Symbol 394 MovieClip Frame 194
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 200
position = position - facing;
gotoAndPlay ("sitting");
Symbol 394 MovieClip Frame 204
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (_parent.floor[level][position] == 0) {
action = "fall";
gotoAndPlay ("fall");
}
if (action == "reach") {
gotoAndPlay ("getup");
}
Symbol 394 MovieClip Frame 205
gotoAndPlay ("sitting");
Symbol 394 MovieClip Frame 210
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 223
gotoAndPlay ("stand");
Symbol 394 MovieClip Frame 246
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 247
_parent.doDiscovered();
Symbol 394 MovieClip Frame 258
_parent.doLose();
stop();
Symbol 394 MovieClip Frame 260
trace("whack!!");
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
Symbol 394 MovieClip Frame 263
victim.gotoAndStop("collapse");
victim.dead = true;
Symbol 394 MovieClip Frame 266
victim = null;
gotoAndPlay ("stand");
Symbol 424 MovieClip Frame 1
stop();
Symbol 440 MovieClip Frame 5
stop();
Symbol 456 MovieClip Frame 8
stop();
Symbol 458 MovieClip Frame 1
if (wasDiscovered) {
gotoAndPlay ("discover");
}
smacktest = function (where, high) {
tamp = where + facing;
temp = eval (("_parent.wall" + tamp) + high);
return(_parent.wall[high][where + facing]);
};
if (smacktest(position - facing, level) == 2) {
action = "stand";
gotoAndPlay ("discover");
}
if (smacktest(position - facing, level) == 3) {
action = "stand";
gotoAndPlay ("explode");
}
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (_parent.floor[level][position] == 0) {
action = "fall";
}
if (action == "walk_left") {
if (facing == -1) {
gotoAndPlay ("walk");
} else {
gotoAndPlay ("spin");
}
}
if (action == "walk_right") {
if (facing == 1) {
gotoAndPlay ("walk");
} else {
gotoAndPlay ("spin");
}
}
if (action == "run_left") {
if (facing == -1) {
gotoAndPlay ("run");
} else {
gotoAndPlay ("spin");
}
}
if (action == "run_right") {
if (facing == 1) {
gotoAndPlay ("run");
} else {
gotoAndPlay ("spin");
}
}
Symbol 458 MovieClip Frame 2
gotoAndPlay ("stand");
Symbol 458 MovieClip Frame 12
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
if (_parent.discoverd) {
gotoAndStop ("shoot");
}
Symbol 458 MovieClip Frame 15
position = position + facing;
if (level == _parent.hero.level) {
if (((((!_parent.inShadow) and (facing < 0)) and (_parent.hero.position < position)) and _visible) and (room == _parent.currentRoom)) {
if (Math.abs(position - _parent.hero.position) < 6) {
trace("go to shoot, you moron");
gotoAndStop ("shoot");
_parent.hero.wasDiscovered = true;
}
}
if (((((!_parent.inShadow) and (facing > 0)) and (_parent.hero.position > position)) and _visible) and (room == _parent.currentRoom)) {
if (Math.abs(position - _parent.hero.position) < 6) {
trace("go to shoot, you moron");
gotoAndStop ("shoot");
_parent.hero.wasDiscovered = true;
}
}
if ((((!_parent.inShadow) and _visible) and (room == _parent.currentRoom)) and ((_parent.hero.action == "run_left") or (_parent.hero.action == "run_right"))) {
if (Math.abs(position - _parent.hero.position) < 6) {
_parent.hero.wasDiscovered = true;
if (((facing == -1) and (_parent.hero.position > position)) or ((facing == 1) and (_parent.hero.position < position))) {
facing = facing * -1;
gotoAndPlay ("spinshoot");
} else {
gotoAndStop ("shoot");
}
}
}
}
if (_parent.discoverd) {
gotoAndStop ("shoot");
}
Symbol 458 MovieClip Frame 18
if (level == _parent.hero.level) {
if (((((!_parent.inShadow) and (facing < 0)) and (_parent.hero.position < position)) and _visible) and (room == _parent.currentRoom)) {
if (Math.abs(position - _parent.hero.position) < 6) {
trace("go to shoot, you moron");
gotoAndStop ("shoot");
_parent.hero.wasDiscovered = true;
}
}
if (((((!_parent.inShadow) and (facing > 0)) and (_parent.hero.position > position)) and _visible) and (room == _parent.currentRoom)) {
if (Math.abs(position - _parent.hero.position) < 6) {
gotoAndStop ("shoot");
_parent.hero.wasDiscovered = true;
}
}
if ((((!_parent.inShadow) and _visible) and (room == _parent.currentRoom)) and ((_parent.hero.action == "run_left") or (_parent.hero.action == "run_right"))) {
if (Math.abs(position - _parent.hero.position) < 6) {
_parent.hero.wasDiscovered = true;
if (((facing == -1) and (_parent.hero.position > position)) or ((facing == 1) and (_parent.hero.position < position))) {
facing = facing * -1;
gotoAndPlay ("spinshoot");
} else {
gotoAndStop ("shoot");
}
}
}
}
if (!_parent.hero.wasDiscovered) {
if (((position + facing) >= right) and (action == "walk_right")) {
action = "walk_left";
gotoAndPlay ("spin");
trace("spinning to the left");
} else if (((position - facing) <= left) and (action == "walk_left")) {
action = "walk_right";
gotoAndPlay ("spin");
trace("spinning to the right");
} else {
gotoAndPlay ("walk");
}
} else {
trace("going to shoot");
action = "stand";
gotoAndStop ("shoot");
}
Symbol 458 MovieClip Frame 23
if (_parent.discoverd) {
gotoAndStop ("shoot");
}
Symbol 458 MovieClip Frame 24
facing = -facing;
gotoAndPlay ("stand");
Symbol 458 MovieClip Frame 34
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
stop();
Symbol 458 MovieClip Frame 42
if (facing == -1) {
guy.gotoAndStop(2);
} else {
guy.gotoAndStop(1);
}
stop();
Symbol 459 MovieClip Frame 1
playing = false;
firstTime = [true, true, true, true, true, true];
guardList = [];
restart = [];
if (_parent.building == 1) {
restart[0] = [[0, 2, 2, 1], [0, 0, 2, 1], [0, 0, 2, 1], [0, 0, 2, 1]];
restart[1] = [[0, 2, 2, 1], [0, 0, 2, 1], [0, 0, 2, 1], [0, 0, 2, 1]];
restart[2] = [[2, 2, 13, -1], [2, 2, 13, -1], [2, 3, 2, 1], [2, 3, 2, 1]];
restart[3] = [[2, 2, 13, -1], [2, 2, 13, -1], [2, 3, 2, 1], [2, 3, 2, 1]];
restart[4] = [[0, 5, 2, 1], [0, 5, 2, 1], [0, 5, 2, 1], [2, 3, 2, 1]];
restart[5] = [[0, 5, 2, 1], [0, 5, 2, 1], [0, 5, 2, 1], [0, 5, 2, 1]];
}
Guard = function (level, position, room, facing) {
guardCount++;
duplicateMovieClip ("guardKing", "guard" + guardCount, guardCount + 1000);
this.clip = eval ("guard" + guardCount);
this.clip.facing = facing;
this.clip.level = level;
this.clip.room = room;
this.clip.position = position;
this.clip.dead = false;
this.clip.left = 2;
this.clip.right = 14;
if (this.clip.facing == 1) {
this.clip.action = "walk_right";
} else {
this.clip.action = "walk_left";
}
};
findGuardBoundaries = function () {
for (var _local2 in guardList[currentRoom]) {
g = guardList[currentRoom][_local2].clip;
good = g.position;
var _local1 = g.position;
while (_local1 > 0) {
if ((floor[g.level][_local1 - 1] > 0) and ((wall[g.level][_local1 - 1] == 0) or (wall[g.level][_local1 - 1] > 3))) {
good = _local1;
} else {
break;
}
_local1--;
}
g.left = good;
good = g.position;
_local1 = g.position;
while (_local1 < 16) {
if ((floor[g.level][_local1 - 1] > 0) and ((wall[g.level][_local1 - 1] == 0) or (wall[g.level][_local1 - 1] > 3))) {
good = _local1;
} else {
break;
}
_local1++;
}
g.right = good;
}
};
layoutRoom = function (x, y) {
clearGuards();
trace("the big x is " + x);
scenery.gotoAndStop(x + 1);
currentRoom = x;
resetGuards();
guardCreate = [];
if (x == 0) {
wall[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5];
floor[0] = [0, 2, 2, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1];
wall[1] = [0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0];
floor[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
wall[2] = [0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1];
floor[2] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
wall[3] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8];
floor[3] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
wall[4] = [1, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1];
floor[4] = [1, 2, 0, 0, 2, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1];
wall[5] = [1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0];
floor[5] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
guardCreate = [3, 2, 3, -1, 2, 4, 1, 2, 7, 1];
}
if (x == 1) {
wall[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
floor[0] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0];
wall[1] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0];
floor[1] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
wall[2] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1];
floor[2] = [1, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1, 0, 0, 2, 1];
wall[3] = [8, 8, 8, 8, 8, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0];
floor[3] = [1, 1, 2, 0, 0, 1, 2, 0, 0, 2, 1, 1, 1, 1, 1];
wall[4] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0];
floor[4] = [1, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 1, 1];
wall[5] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
floor[5] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
guardCreate = [1, 5, 4, 1];
}
if (x == 2) {
wall[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
floor[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
wall[1] = [0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 5, 5];
floor[1] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
wall[2] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
floor[2] = [1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 1];
wall[3] = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0];
floor[3] = [1, 2, 0, 2, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 1];
wall[4] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 1];
floor[4] = [1, 1, 2, 0, 0, 2, 1, 1, 1, 1, 2, 0, 0, 2, 1];
wall[5] = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0];
floor[5] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
guardCreate = [1, 2, 12, 1];
}
if (x == 3) {
wall[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
floor[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
wall[1] = [0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 1];
floor[1] = [1, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 1, 1];
wall[2] = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
floor[2] = [1, 2, 0, 2, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1];
wall[3] = [0, 0, 0, 0, 8, 8, 8, 1, 1, 0, 0, 0, 0, 0, 1];
floor[3] = [1, 1, 1, 2, 0, 0, 2, 1, 1, 2, 0, 0, 2, 1, 1];
wall[4] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
floor[4] = [1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 2, 1, 1, 1];
wall[5] = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
floor[5] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
guardCreate = [3, 1, 11, 1, 5, 7, 1, 5, 10, -1];
}
if (firstTime[x]) {
if (guardCreate.length > 0) {
guardList[x] = [];
var _local4 = guardCreate[0];
var _local1 = 0;
while (_local1 < _local4) {
var _local3 = (_local1 * 3) + 1;
guardList[x][_local1] = new Guard(guardCreate[_local3], guardCreate[_local3 + 1], x, guardCreate[_local3 + 2]);
_local1++;
}
findGuardBoundaries();
firstTime[x] = false;
}
} else {
for (var _local5 in guardList[x]) {
guardList[x][_local5].clip._visible = true;
}
}
};
detected = function () {
if (!inShadow) {
hero.wasDiscovered = true;
}
};
clearGuards = function () {
for (var _local1 in guardList[currentRoom]) {
guardList[currentRoom][_local1].clip._visible = false;
}
};
resetGuards = function () {
for (var _local1 in guardList[currentRoom]) {
if (guardList[currentRoom][_local1].clip.facing == 1) {
guardList[currentRoom][_local1].clip.action = "walk_right";
} else {
guardList[currentRoom][_local1].clip.action = "walk_left";
}
}
};
redraw = function (roomx, roomy) {
trace("the room is " + roomy);
wall = new Array();
floor = new Array();
layoutRoom(roomx, roomy);
k = 0;
while (k <= wall.length) {
i = 0;
while (i <= 14) {
trace("wah fah");
enviro.floor[k][i].gotoAndStop(floor[k][i] + 1);
if (k == 0) {
enviro.floor[k][i].gotoAndStop(1);
}
enviro.wall[k][i].gotoAndStop(wall[k][i] + 2);
i++;
}
k++;
}
if ((enviro.wall[0][12]._currentframe == 6) and (currentRoom == 1)) {
enviro.wall[0][12].inside.gotoAndPlay(44);
}
};
beginRound = function () {
if (!playing) {
_root.musicPlaying = true;
_root.sounds.music.start();
playing = true;
}
};
doKeys = function () {
if ((Key.isDown(32) and Key.isDown(16)) and (Key.isDown(37) or Key.isDown(39))) {
beginRound();
trace("should be doing a run jump");
hero.action = "runjump";
} else if (Key.isDown(32)) {
beginRound();
hero.action = "jump";
} else if (Key.isDown(38)) {
beginRound();
hero.action = "reach";
} else if (Key.isDown(40) and (Key.isDown(37) or Key.isDown(39))) {
beginRound();
hero.action = "scattle";
} else if (Key.isDown(40)) {
beginRound();
hero.action = "down";
} else if (Key.isDown(39)) {
if (Key.isDown(16)) {
beginRound();
hero.action = "run_right";
} else {
beginRound();
hero.action = "walk_right";
}
} else if (Key.isDown(37)) {
if (Key.isDown(16)) {
beginRound();
hero.action = "run_left";
} else {
beginRound();
hero.action = "walk_left";
}
} else {
hero.action = "stand";
}
};
redrawRoom = function () {
if (hero.position > 14) {
hero.position = hero.position - 15;
roomx = roomx + 1;
redraw(roomx, roomy);
}
if (hero.position < 0) {
hero.position = hero.position + 15;
roomx = roomx - 1;
redraw(roomx, roomy);
}
underground = hero.level - 1;
if (hero.hanging) {
underground--;
}
underground = Math.min(wall.length - 3, underground);
};
moveGuards = function () {
for (var _local1 in guardList[currentRoom]) {
guardList[currentRoom][_local1].clip._x = ((guardList[currentRoom][_local1].clip.position * spacing) + 25) - 375;
guardList[currentRoom][_local1].clip._y = ((guardList[currentRoom][_local1].clip.level * level_spacing) - 5) - 250;
}
};
moveHero = function () {
hero._x = ((hero.position * spacing) + 25) - 375;
hero._y = ((hero.level * level_spacing) - 5) - 250;
_y = (inity - (underground * level_spacing));
};
doDisplay = function () {
framecount++;
time = framecount / 18;
if (time == 0) {
displayTime = "0.00";
} else {
displayTime = int(time * 100) / 100;
}
};
doWin = function () {
_parent.score = displayTime;
playing = false;
gameOver = true;
_parent.fade("leveler");
};
doLose = function () {
_parent.restart = restart[hero.level][currentRoom];
playing = false;
gameOver = true;
_parent.ender.gotoAndStop(3);
};
init = function () {
time = 0;
displayTime = "0.0";
scenery.init = scenery._y;
guardCount = 0;
inShadow = false;
gameOver = false;
framecount = 0;
playing = false;
hanging = false;
time = 0;
displayTime = "0.00";
hero.facing = 1;
hero.position = 4;
hero.level = 3;
inity = _y;
level_spacing = 240;
spacing = 50;
roomx = 0;
roomy = 2;
redraw(roomx, roomy);
count = 0;
victory = false;
};
findLocation = function () {
location = enviro.wall[hero.level][hero.position]._currentframe;
inShadow = location == 7;
};
doDiscovered = function () {
_root.sounds.music.stop();
_root.sounds.alert.start();
discovered = true;
};
begin = function () {
_root.sounds.music.start();
playing = true;
};
doTime = function () {
if (playing) {
time++;
var _local1 = (int((time / 18) * 100) * 0.01) + (random(10) * 0.01);
displayTime = _local1;
}
};
onEnterFrame = function () {
doTime();
findLocation();
if ((!gameOver) and (!victory)) {
doKeys();
} else {
hero.action = "stand";
}
redrawRoom();
moveHero();
moveGuards();
if (playing) {
doDisplay();
}
findLocation();
scenery._y = (scenery.init + 240) + (1 * level_spacing);
blah = scenery._y;
if (hero.guy.hitter.hitTest(scenery.victory) and (!victory)) {
_root.time = displayTime;
victory = true;
_root.fade("victory");
}
};
init();
createBall();
Symbol 468 Button
on (release) {
_parent.gotoAndStop("transition");
}
Symbol 470 MovieClip Frame 30
_parent._parent.fade("back");
Symbol 471 MovieClip Frame 1
stop();
Symbol 475 Button
on (release) {
_visible = false;
_parent.game.begin();
}
on (rollOver) {
overlay.gotoAndPlay("over");
}
on (rollOut, releaseOutside) {
overlay.gotoAndStop(1);
}
Symbol 476 MovieClip Frame 1
stop();
Symbol 480 MovieClip Frame 1
stop();
Symbol 482 Button
on (release) {
if (goals[0] == 100) {
goals[0] = 0;
} else {
goals[0] = 100;
}
}
Symbol 486 MovieClip Frame 1
function start() {
gotoAndPlay (2);
}
stop();
Symbol 488 MovieClip Frame 1
function start(input) {
steps++;
if (steps > 3) {
steps = 1;
}
frame = input + steps;
gotoAndPlay(frame);
}
stop();
Symbol 488 MovieClip Frame 9
stop();
Symbol 488 MovieClip Frame 18
stop();
Symbol 488 MovieClip Frame 26
function start(input) {
steps++;
if (steps > 3) {
steps = 1;
}
frame = input + steps;
gotoAndPlay(frame);
}
stop();
Symbol 488 MovieClip Frame 33
stop();
Symbol 488 MovieClip Frame 42
stop();
Symbol 491 MovieClip Frame 1
function start() {
_parent.volumes[1] = 100;
_parent.goals[1] = 100;
gotoAndPlay("start" + _parent._parent.building);
}
function stop() {
gotoAndPlay("stop" + _parent._parent.building);
}
stop();
Symbol 491 MovieClip Frame 3
stop();
Symbol 491 MovieClip Frame 15
stop();
Symbol 491 MovieClip Frame 18
play();
Symbol 493 MovieClip Frame 1
function start() {
gotoAndPlay (2);
}
stop();
Symbol 495 MovieClip Frame 1
function start() {
gotoAndPlay (2);
}
stop();
Symbol 498 MovieClip Frame 1
function start() {
gotoAndPlay (2);
}
stop();
Symbol 500 MovieClip Frame 1
function start() {
gotoAndPlay (2);
}
stop();
Symbol 501 MovieClip Frame 1
instance = new Array();
soundbutton.tabEnabled = false;
names = ["this", "music", "drop", "buzzer"];
goals = [100, 100, 100, 100, 100, 0];
volumes = [100, 100, 100, 100, 100, 0];
adjustments = [5, 5, 4, 5, 10, 10];
i = 0;
while (i < names.length) {
instance[i] = new Sound(eval (names[i]));
instance[i].setVolume(volumes[i]);
i++;
}
onEnterFrame = function () {
i = 0;
while (i < names.length) {
if (goals[i] < volumes[i]) {
volumes[i] = volumes[i] - adjustments[i];
} else if (goals[i] > volumes[i]) {
volumes[i] = volumes[i] + adjustments[i];
}
if (Math.abs(goals[i] - volumes[i]) < adjustments[i]) {
volumes[i] - goals[i];
}
instance[i].setVolume(volumes[i]);
i++;
}
frame = int(volumes[0] / 10) + 1;
speaker.gotoAndStop(frame);
};
Symbol 501 MovieClip Frame 2
stop();
Symbol 509 MovieClip Frame 1
if (_root.best == 10000) {
_visible = false;
}
Symbol 516 Button
on (release) {
_parent.fade("back");
}
Symbol 519 MovieClip Frame 1
if (_root.time < _root.best) {
_root.best = _root.time;
}