Frame 1
stop();
onEnterFrame = function () {
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop (2);
onEnterFrame = function () {
};
}
};
Frame 2
stop();
Frame 36
stop();
Frame 106
_quality = "LOW";
Frame 341
_quality = "HIGH";
Frame 463
function spawnControl() {
if (!bossTime) {
spawnCount++;
if (spawnCount == currentSpawn) {
spawnCount = 0;
spawnTot = spawnTot + 0.2;
currentSpawn = currentSpawn + 1;
i = 0;
while (i < spawnTot) {
temp = random(3);
switch (temp) {
case 0 :
spawn("mom");
break;
case 1 :
spawn("nerd");
break;
case 2 :
spawn("fanboy");
}
i++;
}
}
}
}
function drops(posX, posY) {
cat = random(40);
if (cat == 4) {
tt = attachMovie("item_handheld", "b" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
tt._x = posX;
tt._y = posY;
}
if (cat == 2) {
tt = attachMovie("item_gamediscs", "b" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
tt._x = posX;
tt._y = posY;
}
if (cat == 3) {
tt = attachMovie("item_blueray", "b" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
tt._x = posX;
tt._y = posY;
}
}
function quick() {
if (foreGround.hydrant.hitTest(player)) {
if (!halfway) {
halfway = true;
for (var _local2 in _root) {
_root[_local2].removeMovieClip();
}
trace("cleanup");
}
}
}
function weaponControl() {
if (curPowerUp == "handheld") {
if (!Key.isDown(32)) {
spaceDown = false;
}
if (Key.isDown(32) && (spaceDown == false)) {
spaceDown = true;
throwing = true;
curPowerUp = "boomerang";
if (stateOf != "DuckIdle") {
g = _root.attachMovie("handheldClip", "td" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
g._x = player._x;
g._y = player._y;
if (_root.player._xscale < 0) {
g.val = -1;
} else {
g.val = 1;
}
g._xscale = g._xscale * g.val;
g.onEnterFrame = function () {
if ((_root.cstatus == 1) && (_root.pausing == false)) {
this._x = _root.player._x;
this._y = _root.player._y;
i = 0;
while (i < 10) {
if (this.hitTest(_root["mom" + i])) {
if (_root["mom" + i].active == true) {
boomerangHit.start();
_root["mom" + i].gotoAndStop("die");
_root["mom" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
if (this.hitTest(_root["fb" + i])) {
if (_root["fb" + i].active == true) {
boomerangHit.start();
_root["fb" + i].gotoAndStop("die");
_root["fb" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
if (this.hitTest(_root["nerd" + i])) {
if (_root["nerd" + i].active == true) {
boomerangHit.start();
_root["nerd" + i].gotoAndStop("die");
_root["nerd" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
i++;
}
}
};
}
}
}
if (curPowerUp == "blueray") {
if (!Key.isDown(32)) {
spaceDown = false;
}
if (Key.isDown(32) && (spaceDown == false)) {
spaceDown = true;
throwing = true;
curPowerUp = "boomerang";
if (stateOf != "DuckIdle") {
g = _root.attachMovie("blueraylaser", "td" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
g._x = player._x;
g._y = player._y;
if (_root.player._xscale < 0) {
g.val = -1;
} else {
g.val = 1;
}
g._xscale = g._xscale * g.val;
g.onEnterFrame = function () {
if ((_root.cstatus == 1) && (_root.pausing == false)) {
this._x = _root.player._x;
this._y = _root.player._y;
i = 0;
while (i < 10) {
if (this.hitTest(_root["mom" + i])) {
if (_root["mom" + i].active == true) {
boomerangHit.start();
_root["mom" + i].gotoAndStop("die");
_root["mom" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
if (this.hitTest(_root["fb" + i])) {
if (_root["fb" + i].active == true) {
boomerangHit.start();
_root["fb" + i].gotoAndStop("die");
_root["fb" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
if (this.hitTest(_root["nerd" + i])) {
if (_root["nerd" + i].active == true) {
boomerangHit.start();
_root["nerd" + i].gotoAndStop("die");
_root["nerd" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
i++;
}
}
};
}
}
}
if (curPowerUp == "gamediscs") {
if (totDiscs <= 0) {
totDiscs = 3;
curPowerUp = "boomerang";
}
if (!Key.isDown(32)) {
spaceDown = false;
}
if (Key.isDown(32) && (spaceDown == false)) {
spaceDown = true;
throwing = true;
if (stateOf != "DuckIdle") {
g = _root.attachMovie("disc", "td" + totDiscs, _root.getNextHighestDepth());
cdthrow.start();
totDiscs--;
g._x = player._x;
g._y = player._y;
if (_root.player._xscale < 0) {
g.val = -1;
} else {
g.val = 1;
}
g.onEnterFrame = function () {
if ((_root.cstatus == 1) && (_root.pausing == false)) {
this._x = this._x + (10 * this.val);
i = 0;
while (i < 10) {
if (this.hitTest(_root["mom" + i])) {
if (_root["mom" + i].active == true) {
boomerangHit.start();
_root["mom" + i].gotoAndStop("die");
_root["mom" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
if (this.hitTest(_root["fb" + i])) {
if (_root["fb" + i].active == true) {
boomerangHit.start();
_root["fb" + i].gotoAndStop("die");
_root["fb" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
if (this.hitTest(_root["nerd" + i])) {
if (_root["nerd" + i].active == true) {
boomerangHit.start();
_root["nerd" + i].gotoAndStop("die");
_root["nerd" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha == 50) {
drops(this._x, this._y);
}
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
}
};
}
}
i++;
}
}
};
}
}
}
if (curPowerUp == "boomerang") {
if (!Key.isDown(32)) {
spaceDown = false;
}
if (Key.isDown(32) && (spaceDown == false)) {
if (stateOf != "DuckIdle") {
spaceDown = true;
throwing = true;
if (boomOut <= 0) {
boomerangThrow.start();
g = _root.attachMovie("ps3control", "bkabg", _root.getNextHighestDepth());
boomOut++;
g._x = player._x;
g._y = player._y;
g._xscale = 50;
g._yscale = 50;
g.movement = "outward";
if (_root.player._xscale < 0) {
g.val = -150;
} else {
g.val = 150;
}
g.val2 = player._x;
g.onEnterFrame = function () {
if ((_root.cstatus == 1) && (_root.pausing == false)) {
this._rotation = this._rotation + 50;
if (this.movement == "outward") {
this._x = this._x - ((camSpeedX * 0.1) * ((this._x - this.val2) - this.val));
this._y = this._y - ((camSpeedX * 0.1) * (this._y - player._y));
if (Math.abs(this._x - (this.val2 + this.val)) <= 4) {
this.movement = "inward";
}
}
if (this.movement == "inward") {
this._x = this._x - ((camSpeedX * 0.1) * (this._x - player._x));
this._y = this._y - ((camSpeedX * 0.1) * (this._y - player._y));
}
if (this.hitTest(player) && (this.movement == "inward")) {
_root.boomOut--;
this.removeMovieClip();
}
if (this.movement == "outward") {
i = 0;
while (i < 10) {
if (this.hitTest(_root["mom" + i])) {
if (_root["mom" + i].active == true) {
boomerangHit.start();
_root["mom" + i].gotoAndStop("die");
_root["mom" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
drops(this._x, this._y);
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
this.onEnterFrame = function () {
};
}
};
}
this.movement = "inward";
} else if (this.hitTest(_root["fb" + i])) {
if (_root["fb" + i].active == true) {
boomerangHit.start();
_root["fb" + i].gotoAndStop("die");
_root["fb" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
drops(this._x, this._y);
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
this.onEnterFrame = function () {
};
}
};
}
this.movement = "inward";
} else if (this.hitTest(_root["nerd" + i])) {
boomerangHit.start();
if (_root["nerd" + i].active == true) {
_root["nerd" + i].gotoAndStop("die");
_root["nerd" + i].onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
drops(this._x, this._y);
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
this.onEnterFrame = function () {
};
}
};
}
this.movement = "inward";
}
i++;
}
}
}
};
}
}
}
}
}
function pauseScreen() {
if (Key.isDown(27) || (Key.isDown(80))) {
if (pauseKey == false) {
if (pausing == false) {
boomerangThrow.setVolume(25);
pausing = true;
pauseKey = true;
trace("paused");
pauseMenu._visible = true;
pauseMenu.gotoAndPlay(2);
pauseMenu._x = cam._x;
pauseMenu._y = cam._y - (yOffset / 2);
pauseMenu.swapDepths(_root.getNextHighestDepth());
} else if (pausing == true) {
boomerangThrow.setVolume(100);
pausing = false;
pauseKey = true;
pauseMenu._visible = false;
trace("unpaused");
}
}
} else {
pauseKey = false;
}
}
function spawn(chooser) {
if (chooser == "mom") {
i = 0;
while (i < 10) {
if (_root["mom" + i].active == false) {
define = i;
break;
}
i++;
}
if (define > 9) {
} else {
trace("Mom" + define);
g = "mom" + define;
_root[g].active = true;
_root[g]._alpha = 100;
_root[g]._x = (player._x + (random(2) * -600)) + 300;
_root[g]._y = origPlayerY;
_root[g].gotoAndStop("attack");
_root[g].speed = random(5) + 1;
_root[g].onEnterFrame = function () {
if ((_root.cstatus == 1) && (_root.pausing == false)) {
if (this.active == true) {
if (this._x >= _root.player._x) {
this._x = this._x - this.speed;
this._xscale = 20;
} else if (this._x < _root.player._x) {
this._x = this._x + this.speed;
this._xscale = -20;
}
if (this.hitTest(hitSquares.box1) || (this.hitTest(hitSquares.box2))) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
trace("hey");
}
if (this.hitTest(_root.player)) {
if (!invincible) {
_root.lives--;
}
invincible = true;
_root.wounds = true;
this.active = false;
this.gotoAndStop("die");
drops(this._x, this._y);
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
this.onEnterFrame = function () {
};
}
};
}
}
}
};
}
} else if (chooser == "fanboy") {
i = 0;
while (i < 10) {
if (_root["fb" + i].active == false) {
define = i;
break;
}
i++;
}
if (define > 9) {
} else {
trace("FANBOY" + define);
g = "fb" + define;
_root[g].active = true;
_root[g]._alpha = 100;
_root[g]._x = (player._x + (random(2) * -600)) + 300;
_root[g]._y = origPlayerY;
_root[g].gotoAndStop("attack");
_root[g].speed = random(4) + 1;
_root[g].onEnterFrame = function () {
if ((_root.cstatus == 1) && (_root.pausing == false)) {
if (this.active == true) {
if (this._x >= _root.player._x) {
this._x = this._x - this.speed;
this._xscale = 20;
} else if (this._x < _root.player._x) {
this._x = this._x + this.speed;
this._xscale = -20;
}
if (this.hitTest(hitSquares.box1) || (this.hitTest(hitSquares.box2))) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
trace("hey");
}
if (this.hitTest(_root.player)) {
if (!invincible) {
_root.lives--;
}
invincible = true;
_root.wounds = true;
this.active = false;
this.gotoAndStop("die");
drops(this._x, this._y);
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
this.onEnterFrame = function () {
};
}
};
}
}
}
};
}
} else if (chooser == "nerd") {
i = 0;
while (i < 10) {
if (_root["nerd" + i].active == false) {
define = i;
break;
}
i++;
}
if (define > 9) {
} else {
trace("NERD" + define);
g = "nerd" + define;
_root[g].active = true;
_root[g]._alpha = 100;
_root[g]._x = (player._x + (random(2) * -600)) + 300;
_root[g]._y = origPlayerY;
_root[g].gotoAndStop("walk");
_root[g].speed = random(2) + 0.5;
_root[g].counter = 0;
_root[g].counter2 = 0;
_root[g].counterGoal = random(40) + 100;
_root[g].current = "walk";
_root[g].onEnterFrame = function () {
if ((_root.cstatus == 1) && (_root.pausing == false)) {
if (this.active == true) {
this.counter++;
if (this.counter >= this.counterGoal) {
this.counter = 0;
this.gotoAndStop("attack");
this.current = "attack";
temp = random(2);
if (temp == 1) {
t = _root.attachMovie("can1", "can" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
} else {
t = _root.attachMovie("puffs1", "puffs" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
}
t._x = this._x;
t._y = this._y - 40;
t._xscale = 20;
t._yscale = 20;
t.mycounter = 0;
if (this._xscale < 0) {
t.factor = 1;
} else {
t.factor = -1;
}
t.onEnterFrame = function () {
if ((_root.cstatus == 1) && (_root.pausing == false)) {
mycounter++;
this._x = this._x + (5 * this.factor);
if (this.hitTest(_root.player)) {
if (!invincible) {
_root.lives--;
}
invincible = true;
wounds = true;
this.removeMovieClip();
}
}
};
}
if (this.current == "attack") {
this.counter2++;
}
if (this.counter2 >= 11) {
this.counter2 = 0;
this.gotoAndStop("walk");
this.current = "walk";
}
if (this.current == "walk") {
if (this._x >= _root.player._x) {
this._x = this._x - this.speed;
this._xscale = 20;
} else if (this._x < _root.player._x) {
this._x = this._x + this.speed;
this._xscale = -20;
}
}
if (this.hitTest(hitSquares.box1) || (this.hitTest(hitSquares.box2))) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
trace("hey");
}
if (this.hitTest(_root.player)) {
if (!invincible) {
_root.lives--;
}
invincible = true;
_root.wounds = true;
this.active = false;
this.gotoAndStop("die");
drops(this._x, this._y);
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.active = false;
this._x = this._x + 500000;
this._alpha = 100;
this.onEnterFrame = function () {
};
}
};
}
}
}
};
}
}
}
function movement() {
hitSquares._x = player._x;
if ((invincible && (invCount >= 50)) || (!invincible)) {
if (Key.isDown(37)) {
if ((stateOf != "DuckIdle") && (!wounds)) {
if (player._x >= origPlayerX) {
playerAcc = playerAcc - xspeed;
player._xscale = -20;
}
if (jumping == true) {
stateOf = "JumpLeft";
player._y = player._y - jumpAcc;
jumpAcc = jumpAcc - jumpFallSpeed;
if (player._y > jumpReturn) {
if (player._currentframe >= 80) {
player.jump.gotoAndPlay(1);
}
player._y = jumpReturn;
jumping = false;
}
} else if (jumping == false) {
stateOf = "WalkLeft";
running = true;
if (Key.isDown(38)) {
jumping = true;
jumpAcc = jumpStart;
}
}
}
} else if (Key.isDown(39)) {
if ((stateOf != "DuckIdle") && (!wounds)) {
playerAcc = playerAcc + xspeed;
player._xscale = 20;
if (jumping == true) {
stateOf = "JumpRight";
player._y = player._y - jumpAcc;
jumpAcc = jumpAcc - jumpFallSpeed;
if (player._y > jumpReturn) {
if (player._currentframe >= 80) {
player.jump.gotoAndPlay(1);
}
player._y = jumpReturn;
jumping = false;
}
} else if (jumping == false) {
stateOf = "WalkRight";
running = true;
if (Key.isDown(38)) {
jumping = true;
jumpAcc = jumpStart;
}
}
}
} else if (Key.isDown(40)) {
if (jumping == true) {
stateOf = "JumpIdle";
player._y = player._y - jumpAcc;
jumpAcc = jumpAcc - jumpFallSpeed;
if (player._y > jumpReturn) {
if (player._currentframe >= 80) {
player.jump.gotoAndPlay(1);
}
player._y = jumpReturn;
jumping = false;
}
} else if (jumping == false) {
stateOf = "DuckIdle";
if (Key.isDown(38)) {
jumping = true;
jumpAcc = jumpStart;
}
}
} else if (jumping == true) {
stateOf = "JumpIdle";
player._y = player._y - jumpAcc;
jumpAcc = jumpAcc - jumpFallSpeed;
if (player._y > jumpReturn) {
if (player._currentframe >= 80) {
player.jump.gotoAndPlay(1);
}
player._y = jumpReturn;
jumping = false;
}
} else if (jumping == false) {
stateOf = "IdleIdle";
running = false;
if (Key.isDown(38)) {
jumping = true;
jumpAcc = jumpStart;
}
}
if (playerAcc >= maxSpeed) {
playerAcc = maxSpeed;
}
if (playerAcc <= (-maxSpeed)) {
playerAcc = -maxSpeed;
}
player._x = player._x + playerAcc;
bg._x = bg._x + (playerAcc - (playerAcc / 4));
bg2._x = bg2._x + (playerAcc - (playerAcc / 8));
if ((playerAcc < 0.5) && (playerAcc > -0.5)) {
playerAcc = 0;
}
if (playerAcc > 0) {
playerAcc = playerAcc - playerDec;
}
if (playerAcc < 0) {
playerAcc = playerAcc + playerDec;
}
}
}
function cameraControl() {
if (!bossTime) {
if (!jumping) {
cam._x = cam._x - ((camSpeedX * 0.1) * ((cam._x - player._x) - 5));
cam._y = cam._y - ((camSpeedY * 0.1) * ((cam._y - player._y) - 5));
} else {
cam._x = cam._x - ((camSpeedX * 0.1) * ((cam._x - player._x) - 5));
cam._y = cam._y - ((camSpeedY * 0.1) * ((cam._y - player._y) - 20));
}
}
}
function interfacing() {
bar._x = cam._x;
bar._y = cam._y;
}
function facing() {
if (Key.isDown(38)) {
player.gotoAndStop("jump");
} else if (Key.isDown(32) && (Key.isDown(37) || (Key.isDown(39)))) {
if (curPowerUp == "handheld") {
player.gotoAndStop("runds");
} else if (curPowerUp == "blueray") {
player.gotoAndStop("runblueray");
} else if (curPowerUp == "gamediscs") {
player.gotoAndStop("rundrm");
} else if (curPowerUp == "boomerang") {
if (boomOut >= 1) {
player.gotoAndStop("runboom");
}
} else {
player.gotoAndStop("running");
}
} else if ((((((Key.isDown(37) || (Key.isDown(39))) && (!Key.isDown(38))) && (!Key.isDown(40))) && (!Key.isDown(32))) && (!jumping)) && ((stateOf == "WalkLeft") || (stateOf == "WalkRight"))) {
player.gotoAndStop("running");
} else if (((((!Key.isDown(37)) && (!Key.isDown(39))) && (!Key.isDown(38))) && (Key.isDown(40))) && (!Key.isDown(32))) {
player.gotoAndStop("idleduck");
} else if ((((((!Key.isDown(37)) && (!Key.isDown(39))) && (!Key.isDown(38))) && (!Key.isDown(40))) && (!Key.isDown(32))) && (!jumping)) {
player.gotoAndStop("idle");
} else if ((((Key.isDown(32) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(40))) && (!running)) {
if (curPowerUp == "handheld") {
player.gotoAndStop("idleds");
} else if (curPowerUp == "blueray") {
player.gotoAndStop("runblueray");
} else if (curPowerUp == "gamediscs") {
player.gotoAndStop("idledrm");
} else if (curPowerUp == "boomerang") {
if (boomOut >= 1) {
player.gotoAndStop("idleboom");
}
} else {
player.gotoAndStop("idle");
}
}
}
function wagonControl() {
if (player._xscale > 0) {
tempA = (camSpeedX * 0.1) * ((wagon._x - player._x) + 35);
wagon._x = wagon._x - tempA;
if (Math.abs(tempA) <= 1) {
wagon.wheel1._xscale = 100;
wagon.wheel2._xscale = 100;
wagon.wheel1.stop();
wagon.wheel2.stop();
} else {
wagon.wheel1.play();
wagon.wheel2.play();
}
} else if (player._xscale < 0) {
tempA = (camSpeedX * 0.1) * ((wagon._x - player._x) - 35);
wagon._x = wagon._x - tempA;
if (Math.abs(tempA) <= 1) {
wagon.wheel1._xscale = -100;
wagon.wheel2._xscale = -100;
wagon.wheel1.stop();
wagon.wheel2.stop();
} else {
wagon.wheel1._xscale = -100;
wagon.wheel2._xscale = -100;
wagon.wheel1.play();
wagon.wheel2.play();
}
}
}
function invince() {
if (invincible) {
if (invCount < 1) {
injured.start();
groaning.start();
livesMeter.nextFrame();
if (bossTime) {
player._x = foreGround._x + foreGround.bossPoint._x;
}
if (lives >= 1) {
t = _root.attachMovie("lifeWasLost", "t" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
t._x = wagon._x;
t._y = wagon._y;
t.onEnterFrame = function () {
this._x = wagon._x;
this._y = wagon._y;
};
}
}
if (invCount < 50) {
player.gotoAndStop("wounded");
}
invCount++;
if ((invCount >= 50) && (invCount < 100)) {
wounds = false;
if (blinkAlpha == false) {
blinkAlpha = true;
player._alpha = 100;
} else if (blinkAlpha == true) {
blinkAlpha = false;
player._alpha = 25;
}
}
if (invCount >= 100) {
invincible = false;
player._alpha = 100;
invCount = 0;
}
}
}
function lifeMeter() {
livesMeter._x = wagon._x;
livesMeter._y = wagon._y;
if (lives <= 0) {
onEnterFrame = function () {
};
_root.cstatus = 0;
_root._xscale = 100;
_root._yscale = 100;
_root._x = 0;
_root._y = 0;
_root._alpha = 100;
stopAllSounds();
gotoAndPlay (674);
trace("DEAD");
}
}
function finalBoss() {
if (player.hitTest(foreGround.bossPoint)) {
if (!playOnce) {
playOnce = true;
stopAllSounds();
finalMusic.start(0, 100);
}
bossTime = true;
}
if (bossTime) {
if (!defeated) {
foreGround.boss.play();
if (!jumping) {
cam._x = cam._x - ((camSpeedX * 0.1) * ((cam._x - player._x) - 5));
cam._y = cam._y - ((camSpeedY * 0.1) * ((cam._y - player._y) - 5));
} else {
cam._x = cam._x - ((camSpeedX * 0.1) * ((cam._x - player._x) - 5));
cam._y = cam._y - ((camSpeedY * 0.1) * ((cam._y - player._y) - 20));
}
if (player.hitTest(foreGround.boss)) {
_root.lives--;
invincible = true;
}
if (player.hitTest(foreGround.axe)) {
defeated = true;
foreGround.boss.stop();
foreGround.bridge.play();
stopAllSounds();
}
}
}
}
function finalSeq() {
if (defeated) {
_root.cstatus = 0;
cam._x = cam._x - ((camSpeedX * 0.1) * ((cam._x - ((foreGround._x + foreGround.bridge._x) + 200)) - 5));
cam._y = cam._y - ((camSpeedY * 0.1) * ((cam._y - (foreGround._y + foreGround.bridge._y)) - 20));
}
if (foreGround.bridge._currentframe == 50) {
foreGround.boss._y = foreGround.boss._y + 5;
}
if (foreGround.boss._y >= 350) {
cam._alpha = cam._alpha - 10;
}
if (cam._alpha <= 0) {
onEnterFrame = function () {
};
gotoAndPlay (464);
}
}
for (var mc in _root) {
_root[mc].removeMovieClip();
}
var cstatus = 1;
var xspeed = 0.5;
var playerAcc = 0;
var playerDec = 0.3;
var maxSpeed = 5;
var camSpeedX = 2;
var camSpeedY = 2;
var jumping = false;
var jumpSpeed = 1;
var jumpFallSpeed = 0.5;
var jumpStart = 8;
var jumpReturn = player._y;
var origPlayerX = player._x;
var origbg2X = bg2._x;
var origPlayerY = player._y;
var origbg2Y = bg2._y;
var invincible = false;
var yOffset = 100;
var stateOf = "idle";
var pausing = false;
var pauseKey = false;
pauseMenu._visible = false;
_quality = "AUTOHIGH";
var level = 1;
var lives = 3;
var spaceDown = false;
var enemiesLeft = 0;
var define = 0;
var wounds = false;
var tempCount = 0;
var bossTime = false;
var playOnce = false;
boomerangHit = new Sound(this);
boomerangHit.attachSound("punch");
boomerangThrow = new Sound(this);
boomerangThrow.attachSound("boomer");
injured = new Sound(this);
injured.attachSound("hitperson");
groaning = new Sound(this);
groaning.attachSound("groan");
cdthrow = new Sound(this);
cdthrow.attachSound("fwoofwoof");
finalMusic = new Sound(this);
finalMusic.attachSound("NG57536");
var halfway = false;
var curPowerUp = "none";
var totDiscs = 3;
var boomOut = 0;
var levelInc = 0.2;
var spawnCount = 0;
var spawnTot = 1;
var currentSpawn = 75;
tt = attachMovie("item_boomerang", "b" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
tt._x = player._x + 100;
tt._y = player._y;
i = 0;
while (i < 10) {
_root["mom" + i].active = false;
_root["fb" + i].active = false;
_root["geek" + i].active = false;
i++;
}
var invCount = 0;
var blinkAlpha = false;
var defeated = false;
onEnterFrame = function () {
pauseScreen();
if ((cstatus == 1) && (pausing == false)) {
movement();
cameraControl();
weaponControl();
spawnControl();
wagonControl();
if ((invincible && (invCount >= 50)) || (!invincible)) {
facing();
}
invince();
tempState._x = player._x;
tempState._y = player._y - 120;
lifeMeter();
finalBoss();
quick();
}
finalSeq();
};
stop();
Instance of Symbol 358 MovieClip "tempState" in Frame 463
onClipEvent (load) {
this._visible = false;
}
Frame 532
if (lives == 3) {
finalGrade = "A";
}
if (lives == 2) {
finalGrade = "B";
}
if (lives == 1) {
finalGrade = "C";
}
Frame 673
stop();
Frame 738
stop();
Frame 739
gotoAndStop (463);
Symbol 23 MovieClip [item_blueray] Frame 5
stop();
onEnterFrame = function () {
if (this.hitTest(_root.player)) {
_root.curPowerUp = "blueray";
play();
onEnterFrame = function () {
};
}
if (_root.cstatus != 1) {
this.removeMovieClip();
}
if (this.hitTest(_root.hitSquares.box1) || (this.hitTest(_root.hitSquares.box2))) {
this.removeMovieClip();
}
};
Symbol 23 MovieClip [item_blueray] Frame 50
stop();
this.removeMovieClip();
Symbol 29 MovieClip [item_handheld] Frame 5
stop();
onEnterFrame = function () {
if (this.hitTest(_root.player)) {
_root.curPowerUp = "handheld";
play();
onEnterFrame = function () {
};
}
if (_root.cstatus != 1) {
this.removeMovieClip();
}
if (this.hitTest(_root.hitSquares.box1) || (this.hitTest(_root.hitSquares.box2))) {
this.removeMovieClip();
}
};
Symbol 29 MovieClip [item_handheld] Frame 50
stop();
this.removeMovieClip();
Symbol 35 MovieClip [item_gamediscs] Frame 5
stop();
onEnterFrame = function () {
if (this.hitTest(_root.player)) {
_root.curPowerUp = "gamediscs";
_root.totDiscs = 3;
play();
onEnterFrame = function () {
};
}
if (_root.cstatus != 1) {
this.removeMovieClip();
}
if (this.hitTest(_root.hitSquares.box1) || (this.hitTest(_root.hitSquares.box2))) {
this.removeMovieClip();
}
};
Symbol 35 MovieClip [item_gamediscs] Frame 50
stop();
this.removeMovieClip();
Symbol 41 MovieClip [item_boomerang] Frame 5
stop();
onEnterFrame = function () {
if (this.hitTest(_root.player)) {
_root.curPowerUp = "boomerang";
play();
onEnterFrame = function () {
};
}
if (_root.cstatus != 1) {
this.removeMovieClip();
}
if (this.hitTest(_root.hitSquares.box1) || (this.hitTest(_root.hitSquares.box2))) {
this.removeMovieClip();
}
};
Symbol 41 MovieClip [item_boomerang] Frame 50
stop();
this.removeMovieClip();
Symbol 49 MovieClip [lifeWasLost] Frame 45
this.removeMovieClip();
Symbol 65 MovieClip [blueraylaser] Frame 16
this.removeMovieClip();
Symbol 71 MovieClip [handheldClip] Frame 21
this.removeMovieClip();
Symbol 101 MovieClip Frame 31
gotoAndPlay (9);
Symbol 102 MovieClip Frame 9
stop();
Symbol 103 MovieClip [fanboy] Frame 1
stop();
Symbol 103 MovieClip [fanboy] Frame 9
_root.enemiesLeft--;
Symbol 122 Button
on (release) {
getURL ("http://creativecommons.org/licenses/by-nc-nd/2.5/", "_blank");
}
Symbol 126 Button
on (release) {
_root.play();
}
Symbol 127 MovieClip Frame 9
stop();
Symbol 141 Button
on (release) {
stopAllSounds();
play();
}
Symbol 146 Button
on (release) {
getURL ("http://www.jmtb02.com/", "_blank");
}
Symbol 150 Button
on (release) {
getURL ("mailto:aegies2@gmail.com", "_blank");
}
Symbol 194 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local5 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local5);
_parent._y = (cY - (this._y * _local4)) + _root.yOffset;
_parent._xscale = 100 * _local5;
_parent._yscale = 100 * _local4;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
framebackground._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 248 MovieClip Frame 6
stop();
Symbol 257 MovieClip Frame 31
gotoAndPlay (11);
Symbol 258 MovieClip Frame 13
stop();
Symbol 266 MovieClip Frame 24
gotoAndPlay (11);
Symbol 270 MovieClip Frame 24
gotoAndPlay (11);
Symbol 276 MovieClip Frame 24
Symbol 276 MovieClip Frame 38
gotoAndPlay (11);
Symbol 277 MovieClip Frame 15
stop();
Symbol 278 MovieClip Frame 30
gotoAndPlay (23);
Symbol 279 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 50
stop();
Instance of Symbol 332 MovieClip "bossPoint" in Symbol 333 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 344 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 70
this._x = this._x - 30300;
stop();
Symbol 371 Button
on (release) {
_quality = "LOW";
}
Symbol 375 Button
on (release) {
_quality = "MEDIUM";
}
Symbol 379 Button
on (release) {
_quality = "HIGH";
}
Symbol 383 MovieClip Frame 12
stop();
Symbol 417 MovieClip Frame 10
stop();
Symbol 418 MovieClip Frame 1
stop();
Symbol 418 MovieClip Frame 9
_root.enemiesLeft--;
Symbol 422 MovieClip Frame 8
stop();
Symbol 423 MovieClip Frame 1
stop();
Symbol 423 MovieClip Frame 13
_root.enemiesLeft--;
Symbol 445 Button
on (release) {
play();
}
Symbol 446 Button
on (release) {
getURL ("http://www.jmtb02.com/", "_blank");
}
Symbol 451 Button
on (release) {
gotoAndPlay (3);
}
Symbol 452 Button
on (release) {
stopAllSounds();
gotoAndPlay (37);
}
Symbol 453 Button
on (release) {
stopAllSounds();
gotoAndPlay (3);
}
Symbol 456 Button
on (release) {
gotoAndStop (3);
}
Symbol 457 Button
on (release) {
gotoAndStop (463);
}