Frame 1
function createMissile() {
_root.attachMovie("bullet", "bullet" + bulletCounter, bulletCounter);
_root["bullet" + bulletCounter]._x = _root.player._x;
_root["bullet" + bulletCounter]._y = _root.player._y - 17;
_root["bullet" + bulletCounter].depth = bulletCounter;
bulletCounter++;
if (bulletCounter > 1010) {
bulletCounter = 1000;
}
}
function createSpark(side) {
_root.attachMovie("spark", "spark" + sparkCounter, sparkCounter + 5000);
_root["spark" + sparkCounter]._x = _root.player._x + 30;
_root["spark" + sparkCounter]._y = _root.player._y + 10;
if (side == "left") {
_root["spark" + sparkCounter]._xscale = -100;
}
sparkCounter++;
if (sparkCounter > 6050) {
sparkCounter = 6000;
}
}
function createSmoke(x, y, depth) {
_root.attachMovie("smoke2", "smokeA" + depth, 8500);
_root["smokeA" + depth]._x = x;
_root["smokeA" + depth]._y = y;
}
function createPlayerMissile() {
_root.attachMovie("playerMissile", "playerMissile", 1016);
_root.attachMovie("smoke", "smoke", 1015);
_root.smoke._x = _root.player._x;
_root.smoke._y = _root.player._y - 30;
_root.playerMissile._x = _root.player._x;
_root.playerMissile._y = _root.player._y - 30;
}
function createBomb(x, y) {
_root.attachMovie("bomb", "bomb" + bombCounter, bombCounter);
_root["bomb" + bombCounter]._x = x;
_root["bomb" + bombCounter]._y = y;
bombCounter++;
}
function createbossMissile(x, y) {
_root.attachMovie("bossMissile", "bossMissile" + bossMissileCounter, bossMissileCounter);
_root["bossMissile" + bossMissileCounter]._x = x;
_root["bossMissile" + bossMissileCounter]._y = y;
bossMissileCounter++;
}
function createMan() {
_root.attachMovie("man", "man" + manCounter, manCounter);
if (random(2) == 0) {
_root["man" + manCounter]._x = _root.player._x + 220;
} else {
_root["man" + manCounter]._x = _root.player._x - 220;
}
_root["man" + manCounter]._y = _root.player._y;
manCounter++;
if (manCounter >= 5000) {
manCounter = 4000;
}
}
function createRobot() {
_root.attachMovie("robot", "robott", 5005);
_root.robott._x = _root.player._x + 250;
_root.robott._y = _root.player._y;
robot = true;
}
function createEnviro() {
_root.attachMovie("enviro", "enviro" + bgCounter, bgCounter);
if (random(2) == 0) {
_root["enviro" + bgCounter]._x = _root.player._x + 250;
} else {
_root["enviro" + bgCounter]._x = _root.player._x - 250;
}
_root["enviro" + bgCounter]._y = 300;
bgCounter++;
if (bgCounter >= 350) {
bgCounter = 250;
}
}
function clearAll() {
_root.player.removeMovieClip();
_root.playerMissile.removeMovieClip();
_root.robott.removeMovieClip();
i = 1000;
while (i <= 1010) {
_root["bullet" + i].removeMovieClip();
i++;
}
i = 1000;
while (i <= 1010) {
_root["bullet" + i].removeMovieClip();
i++;
}
i = 4000;
while (i <= 5000) {
_root["man" + i].removeMovieClip();
i++;
}
i = 7000;
while (i <= bombCounter) {
_root["bomb" + i].removeMovieClip();
i++;
}
}
Mouse.show();
Stage.showMenu = false;
stop();
globalsound = new Sound();
globalsound.setVolume(100);
globalsound.attachSound("song");
globalsound.start(0, 999);
_quality = "Medium";
rightShot = 0;
leftShot = 0;
bulletCounter = 1000;
playerMissileCounter = 1015;
bombCounter = 7000;
bossMissileCounter = 3000;
sparkCounter = 6000;
manCounter = 4000;
bgCounter = 250;
robot = false;
onEnterFrame = function () {
if ((_root.player._x <= (_root.endWall - 100)) && (random(20) == 0)) {
createMan();
}
if (((_root.player._x <= (_root.endWall - 400)) && (!robot)) && (random(10) == 1)) {
createRobot();
}
};
Frame 2
onEnterFrame = function () {
if (globalsound.getVolume() >= 0) {
globalsound.setVolume(globalsound.getVolume() - 5);
}
};
_root.clearAll();
stop();
_x = 0;
Mouse.show();
Frame 3
onEnterFrame = function () {
};
globalsound.stop("song");
globalsound.setVolume(100);
_root.clearAll();
stop();
_x = 0;
Symbol 16 MovieClip [spark] Frame 1
_x = (_x - (15 + random(30)));
_y = (_y - (15 + random(30)));
numb = random(2) + 1;
sfx = new Sound();
sfx.attachSound("bbounce" + numb);
sfx.start();
Symbol 16 MovieClip [spark] Frame 8
this.removeMovieClip();
Symbol 26 MovieClip Frame 78
_parent.gotoAndStop(2);
Symbol 33 MovieClip Frame 1
stop();
Symbol 33 MovieClip Frame 2
sfx = new Sound();
sfx.attachSound("missileSound");
sfx.start();
Symbol 33 MovieClip Frame 6
_root.createPlayerMissile();
Symbol 33 MovieClip Frame 21
stop();
counter = 15;
onEnterFrame = function () {
counter--;
if (counter < 0) {
play();
}
};
Symbol 33 MovieClip Frame 22
onEnterFrame = function () {
};
Symbol 38 MovieClip Frame 1
sfx = new Sound();
sfx.attachSound("shoot");
sfx.start();
Symbol 38 MovieClip Frame 2
_root.createMissile();
Symbol 38 MovieClip Frame 5
_parent._parent._parent.reloaded = true;
_parent.gotoAndStop("normal");
Symbol 39 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 54 MovieClip [player] Frame 1
onEnterFrame = function () {
health = 100;
};
stop();
Symbol 54 MovieClip [player] Frame 2
stop();
action = "standing";
direction = "right";
reloaded = true;
fire = false;
jump = 8;
health = 103;
walkSpeed = 4;
startX = _x;
missileFire = false;
onEnterFrame = function () {
if (health <= 0) {
_root.gotoAndStop(2);
}
if (Key.isDown(65)) {
if ((!fire) && (reloaded)) {
fire = true;
reloaded = false;
sprite.cannon.gotoAndStop("shoot");
}
} else {
fire = false;
}
if (Key.isDown(83)) {
if ((!missileFire) && (sprite.missile._currentframe == 1)) {
missileFire = true;
sprite.missile.play();
}
} else {
missileFire = false;
}
if (Key.isDown(37)) {
direction = "left";
} else if (Key.isDown(39)) {
direction = "right";
}
if (((action == "standing") || (action == "walking")) || (action == "reverse")) {
vSpeed = 3;
if (Key.isDown(37)) {
_x = (_x - walkSpeed);
action = "walking";
} else if (Key.isDown(39)) {
_x = (_x + walkSpeed);
action = "walking";
} else if (Key.isDown(Key.Down)) {
if (direction == "left") {
_x = (_x + walkSpeed);
}
if (direction == "right") {
_x = (_x - walkSpeed);
}
action = "reverse";
} else {
action = "standing";
}
if (Key.isDown(38)) {
action = "up";
vSpeed = -jump;
}
if ((!_root.floor.hitTest(this._x, this._y + 1, true)) && (!_root.floor.hitTest(this._x, this._y + 4, true))) {
action = "down";
vSpeed = 0;
}
} else if (action == "up") {
vSpeed = vSpeed + 0.6;
if (Key.isDown(37)) {
_x = (_x - walkSpeed);
} else if (Key.isDown(39)) {
_x = (_x + walkSpeed);
}
if (Key.isDown(38)) {
vSpeed = vSpeed - (jump * 0.04);
}
if (vSpeed > 0) {
action = "down";
}
} else if (action == "down") {
vSpeed = vSpeed + 0.6;
if (Key.isDown(37)) {
_x = (_x - (walkSpeed - 1));
} else if (Key.isDown(39)) {
_x = (_x + (walkSpeed - 1));
}
if (_root.floor.hitTest(this._x, this._y, true)) {
if (Key.isDown(37) || (Key.isDown(39))) {
action = "walking";
} else {
action = "standing";
}
}
} else if (action == "push") {
_x = (_x - walkSpeed);
ySpeed = 2;
}
_y = (_y + vspeed);
while ((vSpeed >= 0) && (_root.floor.hitTest(this._x, this._y - 0.1, true))) {
_y = (_y - 0.1);
}
_root._x = (-_x) + 200;
if (_x <= startX) {
_x = startX;
} else if (_x >= _root.endWall) {
_x = _root.endWall;
}
if (direction == "left") {
sprite._xscale = -100;
} else {
sprite._xscale = 100;
}
this.sprite.gotoAndStop(action);
};
Symbol 62 MovieClip Frame 4
if (_parent._x < _root.player._x) {
_root.createSpark("left");
} else {
_root.createSpark("right");
}
if (random(5) == 1) {
_root.player.sprite.damage.play();
_root.player.health--;
}
Symbol 73 MovieClip Frame 1
sfx = new Sound();
sfx.attachSound("squish");
sfx.start();
Symbol 73 MovieClip Frame 10
stop();
Symbol 80 MovieClip Frame 1
sfx = new Sound();
sfx.attachSound("pop");
sfx.start();
Symbol 80 MovieClip Frame 12
stop();
Symbol 81 MovieClip [man] Frame 1
action = random(3);
stop();
dead = false;
shot = 0;
active = false;
onEnterFrame = function () {
if ((action == 0) && (Math.abs(_x - _root.player._x) > 100)) {
action = random(2) + 1;
}
if (Math.abs(_x - _root.player._x) > 225) {
this.removeMovieClip();
}
if (active) {
if (!dead) {
if (shot == 1) {
_root.rightShot--;
shot = 0;
} else if (shot == 2) {
_root.leftShot--;
shot = 0;
}
if (action == 1) {
if (shot == 1) {
_root.rightShot--;
shot = 0;
} else if (shot == 2) {
_root.leftShot--;
shot = 0;
}
_x = (_x-1);
gotoAndStop (2);
} else if (action == 2) {
if (shot == 1) {
_root.rightShot--;
shot = 0;
} else if (shot == 2) {
_root.leftShot--;
shot = 0;
}
_x = (_x+1);
gotoAndStop (2);
_xscale = -100;
} else if (action == 0) {
gotoAndStop (1);
if (_root.player._x < _x) {
_xscale = 100;
if (shot == 0) {
shot = 1;
_root.rightShot++;
} else if (shot == 2) {
shot = 1;
_root.rightShot++;
_root.leftShot--;
}
} else {
_xscale = -100;
if (shot == 0) {
shot = 2;
_root.leftShot++;
} else if (shot == 1) {
shot = 2;
_root.leftShot++;
_root.rightShot--;
}
}
if ((Math.abs(_y - _root.player._y) > 50) || (Math.abs(_x - _root.player._x) > 100)) {
action = random(2) + 1;
}
}
if (((Math.abs(_y - _root.player._y) < 20) && (Math.abs(_x - _root.player._x) < 100)) && (random(5) == 0)) {
action = 0;
}
if (((_root.player.action == "walking") || (_root.player.action == "reverse")) && (_root.player.hitTest(_x, _y - 5, true))) {
dead = true;
} else if (((_root.player.action == "down") && (_root.player.hitTest(_x, _y - 5, true))) && (_root.player._y < _y)) {
dead = true;
}
if (_root.playerMissile.area.hitTest(this)) {
dead = true;
gotoAndStop (4);
}
i = 1000;
while (i <= 1010) {
if (_root["bullet" + i].hitTest(this)) {
dead = true;
_root["bullet" + i].gotoAndStop(2);
gotoAndStop (4);
}
i++;
}
} else {
gotoAndStop (3);
}
if (!_root.floor.hitTest(this._x, this._y, true)) {
if (vSPeed < 5) {
vSPeed = vSPeed + 0.5;
}
} else {
vSpeed = 1;
}
_y = (_y + vSpeed);
while (_root.floor.hitTest(this._x, this._y - 1, true)) {
_y = (_y-1);
}
} else if (Math.abs(_x - _root.player._x) < 240) {
active = true;
}
};
Symbol 81 MovieClip [man] Frame 3
if (shot == 1) {
_root.rightShot--;
shot = 0;
} else if (shot == 2) {
_root.leftShot--;
shot = 0;
}
stop();
if (random(2) == 0) {
_xscale = -100;
}
counter = 20;
onEnterFrame = function () {
counter--;
if (counter < 0) {
this.removeMovieClip();
}
if (!_root.floor.hitTest(this._x, this._y, true)) {
if (vSPeed < 5) {
vSPeed = vSPeed + 0.5;
}
} else {
vSpeed = 1;
}
_y = (_y + vSpeed);
while (_root.floor.hitTest(this._x, this._y - 1, true)) {
_y = (_y-1);
}
};
Symbol 81 MovieClip [man] Frame 4
if (shot == 1) {
_root.rightShot--;
shot = 0;
} else if (shot == 2) {
_root.leftShot--;
shot = 0;
}
stop();
if (random(2) == 0) {
_xscale = -100;
}
counter = 20;
onEnterFrame = function () {
counter--;
if (counter < 0) {
this.removeMovieClip();
}
if (!_root.floor.hitTest(this._x, this._y, true)) {
if (vSPeed < 5) {
vSPeed = vSPeed + 0.5;
}
} else {
vSpeed = 1;
}
_y = (_y + vSpeed);
while (_root.floor.hitTest(this._x, this._y - 1, true)) {
_y = (_y-1);
}
};
Symbol 84 MovieClip [bullet] Frame 1
stop();
direction = _root.player.direction;
speed = _root.player.walkSpeed;
if (direction == "left") {
_xscale = -100;
}
onEnterFrame = function () {
if (direction == "left") {
_x = (_x - (speed * 2));
} else {
_x = (_x + (speed * 2));
}
if (Math.abs(_x - _root.player._x) > 215) {
this.removeMovieClip();
}
};
Symbol 84 MovieClip [bullet] Frame 2
this.removeMovieClip();
Symbol 102 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 8
_root.createBomb(_parent._parent._x - 30, _parent._parent._y - 65);
Symbol 109 MovieClip Frame 1
numb = random(2) + 1;
sfx = new Sound();
sfx.attachSound("boop");
sfx.start();
Symbol 109 MovieClip Frame 8
_parent.gotoAndStop(1);
Symbol 116 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 1
_visible = false;
Symbol 153 MovieClip Frame 4
sfx = new Sound();
sfx.attachSound("robo2");
sfx.start();
Symbol 153 MovieClip Frame 40
sfx = new Sound();
sfx.attachSound("bbounce" + numb);
sfx.start();
Symbol 153 MovieClip Frame 52
sfx = new Sound();
sfx.attachSound("bbounce" + numb);
sfx.start();
Symbol 153 MovieClip Frame 66
sfx = new Sound();
sfx.attachSound("bbounce" + numb);
sfx.start();
Symbol 153 MovieClip Frame 74
stop();
onEnterFrame = function () {
_alpha = (_alpha * 0.8);
};
Symbol 154 MovieClip [robot] Frame 1
stop();
health = 15;
steps = 10;
pushTimer = 0;
onEnterFrame = function () {
if (_x >= (_root.endWall - 100)) {
health = 0;
}
if (health > 0) {
if ((sprite.hole._currentframe == 1) && (random(10) == 0)) {
sprite.hole.play();
}
if ((_x - _root.player._x) > 150) {
_x = (_x - 4);
steps++;
sprite.legs.play();
} else if ((_x - _root.player._x) < 100) {
if (steps > 0) {
steps--;
_x = (_x + 4);
sprite.legs.play();
}
} else {
sprite.legs.stop();
}
if (steps <= 0) {
pushTimer = 15;
}
if (pushTimer > 0) {
sprite.gotoAndStop(3);
_root.player.action = "push";
}
if (pushTimer == 0) {
sprite.gotoAndStop(1);
_root.player.action = "standing";
}
pushTimer--;
i = 1000;
while (i <= 1010) {
if (_root["bullet" + i].hitTest(this.hit)) {
health--;
sprite.gotoAndStop("hurt");
_root["bullet" + i].removeMovieClip();
}
i++;
}
if (_root.playerMissile.area.hitTest(this.hit)) {
health = health - 4;
sprite.gotoAndStop("hurt");
_root.playerMissile.removeMovieClip();
}
} else {
gotoAndStop (2);
}
if (!_root.floor.hitTest(this._x, this._y, true)) {
if (vSPeed < 10) {
vSPeed = vSPeed + 1;
}
} else {
vSpeed = 1;
}
_y = (_y + vSpeed);
while (_root.floor.hitTest(this._x, this._y - 1, true)) {
_y = (_y-1);
}
};
Symbol 154 MovieClip [robot] Frame 2
stop();
counter = 90;
if (_root.player.action == "push") {
_root.player.action = "standing";
}
onEnterFrame = function () {
counter--;
if (counter < 0) {
_root.robot = false;
this.removeMovieClip();
}
if (!_root.floor.hitTest(this._x, this._y, true)) {
if (vSPeed < 5) {
vSPeed = vSPeed + 0.5;
}
} else {
vSpeed = 1;
}
_y = (_y + vSpeed);
while (_root.floor.hitTest(this._x, this._y - 1, true)) {
_y = (_y-1);
}
};
Symbol 162 MovieClip [smoke2] Frame 1
_rotation = random(360);
Symbol 162 MovieClip [smoke2] Frame 16
stop();
Symbol 163 MovieClip [bomb] Frame 1
stop();
speed = 1;
onEnterFrame = function () {
_rotation = (_rotation - (speed * 3));
_x = (_x - speed);
if (_root.player.hitTest(this) && (Math.abs(_x - _root.player._x) < 6)) {
gotoAndStop (2);
}
if (!_root.floor.hitTest(this._x, this._y, true)) {
if (vSPeed < 10) {
vSPeed = vSPeed + 1;
}
} else {
vSpeed = 1;
if (speed < 5) {
speed = speed + 0.2;
}
}
_y = (_y + vSpeed);
while (_root.floor.hitTest(this._x, this._y - 1, true)) {
_y = (_y-1);
}
if (Math.abs(_x - _root.player._x) > 225) {
this.removeMovieClip();
}
};
Symbol 163 MovieClip [bomb] Frame 2
stop();
sfx = new Sound();
sfx.attachSound("pop");
sfx.start();
counter = 17;
_root.player.sprite.damage.play();
_root.player.health = _root.player.health - 4;
onEnterFrame = function () {
counter--;
if (counter < 0) {
this.removeMovieClip();
}
};
Symbol 166 MovieClip [bossMissile] Frame 1
stop();
xSpeed = 1;
onEnterFrame = function () {
if (xSpeed < 7) {
xSpeed = xSpeed + 1;
}
if (Math.abs(_x - _root.player._x) > 220) {
this.removeMovieClip();
}
if (_root.player.hitTest(this.hitarea)) {
gotoAndStop (2);
}
_x = (_x - xSpeed);
};
Symbol 166 MovieClip [bossMissile] Frame 2
stop();
counter = 3;
onEnterFrame = function () {
counter--;
if (counter < 0) {
this.removeMovieClip();
}
};
Symbol 167 MovieClip [playerMissile] Frame 1
direction = _root.player.direction;
if (direction == "left") {
_xscale = -100;
}
onEnterFrame = function () {
if (direction == "right") {
_x = (_x + 20);
} else {
_x = (_x - 20);
}
if (Math.abs(_x - _root.player._x) > 300) {
this.removeMovieClip();
}
};
onUnload = function () {
_root.createSmoke(_x, _y, depth);
};
Symbol 172 MovieClip [smoke] Frame 1
if (_root.player.direction == "left") {
_xscale = -100;
}
Symbol 172 MovieClip [smoke] Frame 16
this.removeMovieClip();
Symbol 188 MovieClip [enviro] Frame 1
while (_root.floor.hitTest(this._x, this._y - 8, true)) {
_y = (_y-1);
}
gotoAndStop(random(7) + 2);
onEnterFrame = function () {
if (Math.abs(_x - _root.player._x) > 300) {
this.removeMovieClip();
}
};
Symbol 190 MovieClip Frame 1
onEnterFrame = function () {
_x = ((-_root._x) * 0.9);
};
Symbol 198 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop(_root.player.health);
if (_root.player.health > 100) {
gotoAndStop (100);
}
};
Symbol 199 MovieClip Frame 1
onEnterFrame = function () {
_x = (_root.player._x - 200);
};
Symbol 215 MovieClip Frame 1
onEnterFrame = function () {
if ((_root.player.sprite.damage._currentframe == 1) && (_root.player.hitTest(this.hit))) {
_root.player.sprite.damage.play();
_root.player.health = _root.player.health - 8;
_root.createSpark("right");
_root.createSpark("right");
_root.createSpark("left");
_root.createSpark("left");
}
};
stop();
Symbol 221 MovieClip Frame 1
sfx = new Sound();
sfx.attachSound("boop");
sfx.start();
Symbol 221 MovieClip Frame 5
_parent.gotoAndStop("norm");
Symbol 222 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 1
sfx = new Sound();
sfx.attachSound("blastoff");
sfx.start();
Symbol 229 MovieClip Frame 42
stop();
counter = 50;
onEnterFrame = function () {
if (_root.globalsound.getVolume() >= 0) {
_root.globalsound.setVolume(_root.globalsound.getVolume() - 2);
}
counter--;
if (counter < 0) {
_root.gotoAndStop(3);
}
};
Symbol 230 MovieClip Frame 1
stop();
health = 50;
timer = 50;
onEnterFrame = function () {
if (Math.abs(_x - _root.player._x) < 320) {
i = 1000;
while (i <= 1010) {
if (_root["bullet" + i].hitTest(this.head)) {
health--;
sprite.gotoAndStop("hurt");
_root["bullet" + i].removeMovieClip();
}
i++;
}
if (_root.playerMissile.hitTest(this.head)) {
health = health - 5;
sprite.gotoAndStop("hurt");
_root.playerMissile.removeMovieClip();
}
if (timer <= 0) {
arm.play();
timer = random(10) + 45;
} else if (arm._currentframe == 1) {
timer--;
}
}
if (health < 0) {
gotoAndStop (2);
}
};
Symbol 230 MovieClip Frame 2
onEnterFrame = function () {
};
Symbol 232 MovieClip Frame 1
_root.endWall = _x;
_visible = false;
Symbol 244 Button
on (release) {
_parent.play();
}
Symbol 249 MovieClip Frame 1
stop();
_root._x = (-_x) + 200;
Symbol 249 MovieClip Frame 2
_root.attachMovie("player", "player", 9000);
_root.player._x = _x;
_root.player._y = 277;
Mouse.hide();
Symbol 249 MovieClip Frame 75
_visible = false;
stop();
Symbol 255 Button
on (release) {
_root.globalsound.setVolume(100);
_root.globalsound.stop();
_root.gotoAndStop(1);
}
Symbol 314 MovieClip Frame 435
_parent.gotoAndStop(2);
Symbol 318 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 2
stop();
Mouse.show();