Frame 1
function starsGo() {
j = 2;
while (j <= numStars) {
starName = "star" + j;
_root.star.duplicateMovieClip(starName, j);
j++;
}
}
stop();
numStars = 100;
j = 1;
starsGo();
Instance of Symbol 52 MovieClip [star] "star" in Frame 1
onClipEvent (load) {
function reset() {
this._y = -10;
this._x = Math.random() * 550;
enemySpeed = (Math.random() * 2) + 1;
}
reset();
}
onClipEvent (enterFrame) {
this._y = this._y + enemySpeed;
if (this._y > 610) {
reset();
}
}
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
function moveHero(speed) {
if (Key.isDown(38)) {
_root.hero._y = _root.hero._y - speed;
}
if (Key.isDown(37)) {
_root.hero._x = _root.hero._x - speed;
}
if (Key.isDown(40)) {
_root.hero._y = _root.hero._y + speed;
}
if (Key.isDown(39)) {
_root.hero._x = _root.hero._x + speed;
}
if (Key.isDown(32)) {
if (fire == false) {
fireBullets();
}
}
}
function fireBullets() {
fire = true;
_root.hero.gotoAndPlay(2);
i++;
herobullet_newname = "herobullet_normal" + i;
_root.attachMovie("bullet", herobullet_newname, i * 100);
_root[herobullet_newname]._y = _root.hero._y;
_root[herobullet_newname]._x = _root.hero._x;
_root[herobullet_newname].onEnterFrame = function () {
bullet_speed = 7;
this._y = this._y - bullet_speed;
if (this._y < -20) {
this.removeMovieClip();
}
h = 1;
while (h <= numEnemy) {
if (this.hitTest(_root["enemy" + h])) {
this.removeMovieClip();
_root["enemy" + h].play();
}
h++;
}
h2 = 1;
while (h2 <= numEnemy2) {
if (this.hitTest(_root["enemy2" + h2])) {
this.removeMovieClip();
_root["enemy2" + h2].play();
}
h2++;
}
h3 = 1;
while (h3 <= numEnemy3) {
if (this.hitTest(_root["enemy3" + h3])) {
this.removeMovieClip();
_root["enemy3" + h3].play();
}
h3++;
}
};
}
function enemyBullets(enemy) {
bulletnumber++;
enemybullet_newname = "enemybullet_normal" + bulletnumber;
_root.attachMovie("bullet", enemybullet_newname, bulletnumber * 400);
_root[enemybullet_newname]._y = enemy._y;
_root[enemybullet_newname]._x = enemy._x;
_root[enemybullet_newname].onEnterFrame = function () {
bullet_speed = 7;
this._y = this._y + bullet_speed;
if (this._y > 625) {
this.removeMovieClip();
}
if (this.hitTest(_root.hero)) {
_root.health = _root.health - 5;
this.removeMovieClip();
}
};
}
function enemyBulletsCannon(enemy) {
bulletnumber2++;
newname2 = "enemybullet_cannon" + bulletnumber2;
_root.attachMovie("bullet2", newname2, bulletnumber2 * 400);
_root[newname2]._y = enemy._y;
_root[newname2]._x = enemy._x;
_root[newname2].onEnterFrame = function () {
bullet_speed = 10;
this._y = this._y + bullet_speed;
if (this._y > 625) {
this.removeMovieClip();
}
if (this.hitTest(_root.hero)) {
this.play();
}
};
}
function Enemys() {
j = 2;
while (j <= numEnemy) {
enemyname = "enemy" + j;
_root.enemy1.duplicateMovieClip(enemyname, j);
j++;
}
}
function Enemys2() {
j2 = 2;
while (j2 <= numEnemy2) {
enemyname2 = "enemy2" + j2;
_root.enemy2.duplicateMovieClip(enemyname2, j2);
j2++;
}
}
function Enemys3() {
j3 = 2;
while (j3 <= numEnemy3) {
enemyname3 = "enemy3" + j3;
_root.enemy3.duplicateMovieClip(enemyname3, j3);
j3++;
}
}
stop();
_root.score = 0;
i = 0;
fire = false;
health = 150;
_root.shipmoving = false;
bulletnumber = 1;
bulletnumber2 = 1;
numEnemy = 7;
j = 1;
numEnemy2 = 3;
j2 = 1;
numEnemy3 = 2;
j3 = 1;
Enemys();
Enemys2();
_root.onEnterFrame = function () {
_root.healthbar._width = health;
moveHero(5);
if (_root.hero._x < 10) {
_root.hero._x = 10;
_root.shipmoving = true;
} else if (_root.hero._x > 540) {
_root.hero._x = 540;
_root.shipmoving = true;
} else if (_root.hero._y < 50) {
_root.hero._y = 50;
_root.shipmoving = true;
} else if (_root.hero._y > 550) {
_root.hero._y = 550;
_root.shipmoving = true;
} else {
_root.shipmoving = false;
}
if (_root.health < 0) {
_root.play();
health = 1;
}
};
Instance of Symbol 130 MovieClip "hugeship" in Frame 6
onClipEvent (load) {
_global.intshoot = 100;
}
onClipEvent (enterFrame) {
this._y = this._y + 1;
if (this.hitTest(_root.hero._x, _root.hero._y, true)) {
_root.health = _root.health - 1;
}
if (_global.intshoot > 0) {
_global.intshoot = _global.intshoot - 1;
} else {
this.play();
}
if (this._y > 800) {
this._y = -400;
}
}
Instance of Symbol 133 MovieClip "hugeship2" in Frame 6
onClipEvent (load) {
_global.intshoot2 = 150;
}
onClipEvent (enterFrame) {
this._y = this._y + 0.8;
if (this.hitTest(_root.hero._x, _root.hero._y, true)) {
_root.health = _root.health - 1;
}
if (_global.intshoot2 > 0) {
_global.intshoot2 = _global.intshoot2 - 1;
} else {
this.play();
}
if (this._y > 900) {
this._y = -400;
}
}
Instance of Symbol 42 MovieClip [enemy_1] "enemy1" in Frame 6
onClipEvent (load) {
function reset() {
if (dealhealth) {
_root.health = _root.health - 5;
dealhealth = false;
}
yspawn = Math.random() * 50;
this._y = (yspawn - yspawn) - 100;
this._x = Math.random() * 550;
enemySpeed = (Math.random() * 2) + 1;
}
dealhealth = false;
reset();
}
onClipEvent (enterFrame) {
this._y = this._y + enemySpeed;
if (this._y > 625) {
reset();
}
if (this.hitTest(_root.hero)) {
this.play();
dealhealth = true;
}
}
Instance of Symbol 109 MovieClip "enemy2" in Frame 6
onClipEvent (load) {
function reset() {
clearInterval(_global.shoot);
if (dealhealth) {
_root.health = _root.health - 5;
dealhealth = false;
}
yspawn = Math.random() * 50;
this._y = (yspawn - yspawn) - 100;
this._x = Math.random() * 550;
enemySpeed = (Math.random() * 2) + 1;
interval = (Math.random() * 1000) + 1000;
_global.shoot = setInterval(_root.enemyBullets, interval, this);
}
dealhealth = false;
reset();
}
onClipEvent (enterFrame) {
this._y = this._y + enemySpeed;
if (this._y > 625) {
reset();
}
if (this.hitTest(_root.hero)) {
this.play();
dealhealth = true;
}
}
Instance of Symbol 49 MovieClip [enemy3] "enemy3" in Frame 6
onClipEvent (load) {
function reset() {
clearInterval(_global.shoot_2);
if (dealhealth) {
_root.health = _root.health - 5;
dealhealth = false;
}
yspawn = Math.random() * 50;
this._y = (yspawn - yspawn) - 100;
this._x = Math.random() * 550;
enemySpeed = (Math.random() * 2) + 0.2;
interval_2 = (Math.random() * 2000) + 500;
_global.shoot_2 = setInterval(_root.enemyBulletsCannon, interval_2, this);
}
dealhealth = false;
reset();
}
onClipEvent (enterFrame) {
this._y = this._y + enemySpeed;
if (this._y > 625) {
reset();
}
if (this.hitTest(_root.hero)) {
this.play();
dealhealth = true;
}
}
Instance of Symbol 99 MovieClip in Frame 6
onClipEvent (load) {
function reset() {
if (heal) {
_root.health = _root.health + 20;
heal = false;
}
yspawn = Math.random() * 50;
this._y = -1000;
this._x = Math.random() * 550;
enemySpeed = (Math.random() * 3) + 1;
}
healsound = new Sound(this);
healsound.attachSound("healwav");
heal = false;
reset();
}
onClipEvent (enterFrame) {
this._y = this._y + enemySpeed;
if (this._y > 625) {
reset();
}
if (this.hitTest(_root.hero)) {
healsound.start(0, 1);
reset();
heal = true;
}
}
Frame 7
_root.stop();
_root.stopAllSounds();
clearInterval(_global.shoot);
clearInterval(_global.shoot_2);
delete _global.shoot;
delete _global.shoot_2;
_root.h = 1;
while (_root.h <= _root.numEnemy) {
_root["enemy" + h].removeMovieClip();
_root.h++;
}
_root.h2 = 1;
while (_root.h2 <= _root.numEnemy2) {
_root["enemy2" + h2].removeMovieClip();
_root.h2++;
}
_root.h3 = 1;
while (_root.h3 <= _root.numEnemy3) {
_root["enemy3" + h3].removeMovieClip();
_root.h3++;
}
Frame 8
_root.stop();
Symbol 5 MovieClip [bullet] Frame 1
stop();
Symbol 5 MovieClip [bullet] Frame 15
this.removeMovieClip();
Symbol 10 MovieClip [bullet2] Frame 1
stop();
Symbol 10 MovieClip [bullet2] Frame 2
_root.health = _root.health - 20;
Symbol 10 MovieClip [bullet2] Frame 15
this.removeMovieClip();
Symbol 15 MovieClip Frame 7
stop();
Symbol 24 MovieClip [enemy_4] Frame 1
stop();
Instance of Symbol 18 MovieClip "turret" in Symbol 24 MovieClip [enemy_4] Frame 1
onClipEvent (load) {
function lookathero() {
updateAfterEvent();
point = new Object();
point.x = this._x;
point.y = this._y;
_root.enemy4.localToGlobal(point);
xdiff = _root.hero._x - point.x;
ydiff = _root.hero._y - point.y;
angle = Math.atan2(ydiff, xdiff);
angle = (angle * 180) / Math.PI;
this._rotation = angle;
}
speed = 7;
depth = 0;
nose = 50;
}
onClipEvent (enterFrame) {
lookathero();
}
Symbol 24 MovieClip [enemy_4] Frame 2
stop();
Symbol 24 MovieClip [enemy_4] Frame 3
stop();
Symbol 24 MovieClip [enemy_4] Frame 4
stop();
Symbol 24 MovieClip [enemy_4] Frame 5
stop();
Symbol 24 MovieClip [enemy_4] Frame 6
stop();
Symbol 24 MovieClip [enemy_4] Frame 7
stop();
Symbol 24 MovieClip [enemy_4] Frame 8
stop();
Symbol 24 MovieClip [enemy_4] Frame 9
stop();
Symbol 24 MovieClip [enemy_4] Frame 10
stop();
Symbol 24 MovieClip [enemy_4] Frame 11
_root.score = _root.score + 20;
Symbol 24 MovieClip [enemy_4] Frame 29
this.reset();
gotoAndStop (1);
Symbol 32 MovieClip [bullet3] Frame 4
gotoAndPlay (1);
Symbol 32 MovieClip [bullet3] Frame 15
_root.health = _root.health - 10;
this.removeMovieClip();
Symbol 37 MovieClip [hero] Frame 1
stop();
Symbol 37 MovieClip [hero] Frame 10
_root.fire = false;
Symbol 42 MovieClip [enemy_1] Frame 1
stop();
Symbol 42 MovieClip [enemy_1] Frame 2
_root.score = _root.score + 5;
Symbol 42 MovieClip [enemy_1] Frame 12
this.reset();
gotoAndStop (1);
Symbol 49 MovieClip [enemy3] Frame 1
stop();
Symbol 49 MovieClip [enemy3] Frame 2
stop();
Symbol 49 MovieClip [enemy3] Frame 3
stop();
Symbol 49 MovieClip [enemy3] Frame 4
_root.score = _root.score + 30;
Symbol 49 MovieClip [enemy3] Frame 20
this.reset();
gotoAndStop (1);
Symbol 70 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 75 Button
on (release) {
_root.play();
}
Symbol 76 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 76 MovieClip Frame 2
gotoAndPlay (1);
Symbol 84 Button
on (release) {
getURL ("http://www.armorbot.com/mytable/?id=459&p=1", "_blank");
}
Symbol 87 Button
on (release) {
gotoAndPlay (6);
}
Symbol 90 Button
on (release) {
gotoAndPlay (4);
}
Symbol 93 Button
on (release) {
gotoAndPlay (5);
}
Symbol 102 Button
on (release) {
gotoAndPlay (3);
}
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 2
stop();
Symbol 109 MovieClip Frame 3
_root.score = _root.score + 20;
Symbol 109 MovieClip Frame 16
this.reset();
gotoAndStop (1);
Symbol 130 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 108
_global.intshoot = 100;
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 95
_global.intshoot2 = 150;
Symbol 144 Button
on (release) {
gotoAndPlay (3);
}
Symbol 147 Button
on (release) {
ab20_09 = new LoadVars();
ab20_09.z = _root.namevar;
ab20_09.x = _root.score;
ab20_09.c = 459;
ab20_09.v = "OGDLCT";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
_root.play();
}
Symbol 149 Button
on (release) {
getURL ("http://www.armorbot.com/mytable/?id=459&p=1", "_blank");
}