Frame 1
function menuChoiceOne() {
getURL ("http://www.thegamehomepage.com/", "_blank");
}
stop();
fscommand ("allowscale", 0);
NewMenu = new ContextMenu();
NewMenu.hideBuiltInItems();
NewMenu.customItems.push(new ContextMenuItem("Visit The Game Homepage", menuChoiceOne));
this.menu = NewMenu;
this.onEnterFrame = function () {
sofar = this.getBytesLoaded();
total = this.getBytesTotal();
PcTxt.text = int((sofar / total) * 100) + "%";
if (sofar == total) {
delete this.onEnterFrame;
gotoAndPlay (2);
}
};
Instance of Symbol 27 MovieClip [Alien3] "Alien" in Frame 1
onClipEvent (enterFrame) {
i = i + 0.25;
i = i % 2;
gotoAndStop(i + 1);
}
Frame 80
Mouse.show();
so = SharedObject.getLocal("neaveInvaders");
if (!playerName.length) {
playerName = so.data.playerName;
}
score = 0;
gameOver = true;
this.onKeyDown = function () {
if (Over._visible) {
return(undefined);
}
if (Key.isDown(83)) {
if (_xscale == 100) {
_yscale = 50;
_xscale = 50;
_x = 125;
_y = 100;
} else {
_yscale = 100;
_xscale = 100;
_y = 0;
_x = 0;
}
}
if (gameOver) {
return(undefined);
}
if (Key.isDown(80)) {
if (Quitter._visible) {
return(undefined);
}
paused = !paused;
if (paused) {
Pause.play();
} else {
Pause.stop();
}
Pause._visible = paused;
Alien._alpha = (paused ? 15 : 100);
if (UFO._visible) {
SndUFO.gotoAndStop(Number(!paused) + 1);
}
}
if (Key.isDown(81)) {
Pause.stop();
Pause._visible = false;
Quitter._visible = (paused = true);
Alien._alpha = 15;
SndUFO.gotoAndStop(1);
}
if (!Quitter._visible) {
return(undefined);
}
if (Key.isDown(78)) {
Quitter._visible = (paused = false);
Alien._alpha = 100;
if (UFO._visible) {
SndUFO.gotoAndStop(2);
}
}
if (Key.isDown(89)) {
gotoAndStop (2);
}
};
Key.addListener(this);
stop();
Frame 81
stop();
Frame 82
function setLives() {
var _local2 = 8;
while (_local2 > 0) {
_root["Life" + _local2]._visible = lives >= _local2;
_local2--;
}
}
function setScore() {
ScoreTxt.text = String(score);
}
function resetLaser() {
tellTarget ("Laser") {
_visible = false;
_y = yPos;
};
}
function makeAlien(i) {
Alien.createEmptyMovieClip(i, i);
Alien[i]._y = ((i * 30) + playTop) + 1;
var _local5 = Math.ceil((i / 2) + 1);
switch (_local5) {
case 1 :
var _local2 = 40;
break;
case 2 :
_local2 = 20;
break;
default :
_local2 = 10;
}
var _local1 = 0;
while (_local1 < 11) {
Alien[i].attachMovie("Alien" + _local5, _local1, _local1, {_x:((_local1 * 30) + playMin) + 83, val:_local2});
_local1++;
}
}
function fMakeStarburst(xPos, yPos, basehit) {
s = Root.createEmptyMovieClip("burstClip", Root.depth++);
s.cnt = 0;
s.onEnterFrame = function () {
if ((this.cnt++) == 40) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
s._x = xPos;
s._y = yPos;
x = 0;
while (x < amountOfStars) {
ran = random(4) + 1;
if (basehit) {
ran = ran + 4;
}
v = s.attachMovie("explosionStar" + ran, "str" + x, s.getNextHighestDepth());
v.speed = random(10) + 10;
v.movSpdX = random(10) - 5;
v.movSpdY = (-1 * random(15)) + 1;
v._xscale = (v._yscale = random(40) + 30);
v._alpha = 150;
v.onEnterFrame = function () {
this._rotation = this._rotation + this.speed;
this._alpha = this._alpha - (this.speed / 3);
this._x = this._x + this.movSpdX;
this._y = this._y + this.movSpdY;
this.movSpdY++;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
x++;
}
}
Mouse.hide();
rnd = Math.random;
lives = 3;
setLives();
score = 0;
moveDown = false;
setScore();
powerupml = false;
powerupinv = false;
poweruprev = false;
playMax = 480;
playMin = 20;
playTop = 64;
playBtm = 176;
_global.Root = this;
var depth = 1;
var amountOfStars = 6;
Instance of Symbol 70 MovieClip "Pause" in Frame 82
onClipEvent (load) {
stop();
_visible = false;
}
Instance of Symbol 72 MovieClip "Quitter" in Frame 82
onClipEvent (load) {
stop();
_visible = false;
}
Instance of Symbol 84 MovieClip "Base" in Frame 82
onClipEvent (enterFrame) {
if (_root.paused || ((_currentframe > 42) && (_currentframe < 66))) {
return(undefined);
}
if (!_root.poweruprev) {
_x = _root._xmouse;
} else {
_x = (500 - _root._xmouse);
}
_y = _root._ymouse;
}
onClipEvent (mouseDown) {
if (!_root.Laser._visible) {
_root.SndFire.play();
_root.Laser._x = _x;
_root.Laser._y = _y;
_root.Laser._visible = true;
}
}
Instance of Symbol 103 MovieClip "Fire1" in Frame 82
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 103 MovieClip "Fire2" in Frame 82
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 103 MovieClip "Fire3" in Frame 82
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 105 MovieClip "Fire4" in Frame 82
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 107 MovieClip "Laser" in Frame 82
onClipEvent (load) {
_visible = false;
yPos = _y;
}
onClipEvent (enterFrame) {
if (_root.paused) {
return(undefined);
}
if (_visible) {
if (_y < 50) {
_visible = false;
}
_y = (_y - 12);
}
}
Frame 92
i = 5;
this.onEnterFrame = function () {
i--;
makeAlien(i);
if (!i) {
delete this.onEnterFrame;
}
};
Instance of Symbol 141 MovieClip "UFO" in Frame 92
onClipEvent (load) {
rnd = Math.random;
dir = 1;
}
onClipEvent (enterFrame) {
if (_root.paused || (_root.newLife)) {
return(undefined);
}
if (_visible) {
if (_currentframe == 1) {
if ((_x > 550) || (_x < -50)) {
_visible = false;
_root.SndUFO.gotoAndStop(1);
}
_x = (_x + (dir * 3));
}
} else if ((rnd() < 0.002) && (_root.Alien[1]._y > 108)) {
dir = (int(rnd() * 2) * 2) - 1;
_x = (250 - (dir * 300));
_visible = true;
_root.SndUFO.gotoAndStop(2);
}
}
Frame 106
stop();
dir = 4;
dead = (time = (tonePos = 0));
paused = (gameOver = (newLife = false));
if (playTop < playBtm) {
playTop = playTop + 14;
}
speed = (playTop + 120) * 2;
this.onEnterFrame = function () {
if (paused || (newLife)) {
return(undefined);
}
for (var i in Alien) {
for (var j in Alien[i]) {
var A = Alien[i][j];
if (A.hitTest(Base) && (!powerupinv)) {
F._visible = (Laser._visible = (UFO._visible = false));
resetLaser();
UFO.gotoAndStop(1);
SndUFO.gotoAndStop(1);
var n = 4;
while (n > 0) {
_root["Fire" + n]._visible = false;
n--;
}
Base.gotoAndPlay("imhit");
newLife = true;
lives--;
if (!lives) {
gameOver = true;
gotoAndStop ("gameOver");
return(undefined);
}
return(undefined);
}
if ((typeof(A) == "movieclip") && (A.hitTest(Laser))) {
Explode._x = Number(A._x) + Number(A._parent._x);
Explode._y = Number(A._y) + Number(A._parent._y);
Explode.gotoAndPlay(2);
_root.fMakeStarburst(Explode._x, Explode._y, false);
score = score + A.val;
setScore();
dead++;
A.removeMovieClip();
if (!powerupml) {
resetLaser();
}
break;
}
}
}
if (Laser._visible) {
for (var i in Brk) {
var B = Brk[i];
if (B._visible) {
if (B.hitTest(Laser)) {
if (B._currentframe == 4) {
B._visible = false;
} else {
B.nextFrame();
}
resetLaser();
break;
}
}
}
}
if (UFO._visible && (UFO._currentframe == 1)) {
if (UFO.hitTest(Laser)) {
SndUFO.gotoAndStop(1);
UFO.gotoAndPlay(2);
resetLaser();
}
}
rate = (1000 - speed) - (dead * 4);
if (rate < 0) {
rate = 0;
}
var n = 4;
while (n > 0) {
var F = _root["Fire" + n];
if (F._visible) {
with (F) {
if (n < 4) {
_y = _y + 6;
}
if (_y > 390) {
_visible = false;
}
}
for (var i in Brk) {
var B = Brk[i];
if (B._visible) {
if (B.hitTest(F)) {
F._visible = false;
if (B._currentframe == 4) {
B._visible = false;
} else {
B.nextFrame();
}
break;
}
}
}
if (Base.hitTest(F) && (!powerupinv)) {
F._visible = (Laser._visible = (UFO._visible = false));
resetLaser();
UFO.gotoAndStop(1);
SndUFO.gotoAndStop(1);
var n = 4;
while (n > 0) {
_root["Fire" + n]._visible = false;
n--;
}
Base.gotoAndPlay("imhit");
newLife = true;
lives--;
if (!lives) {
gameOver = true;
gotoAndStop ("gameOver");
return(undefined);
}
}
}
if (((rate - 8) * rnd()) < 4) {
var j = int(rnd() * 11);
for (var i in Alien) {
var A = Alien[i][j];
if (((typeof(A) == "movieclip") && (A._visible)) && (!F._visible)) {
F._x = Number(A._x) + Number(A._parent._x);
F._y = (Number(A._y) + Number(A._parent._y)) + 16;
F._visible = true;
if (n == 4) {
F.gotoAndPlay(2);
}
break;
}
}
}
n--;
}
if ((getTimer() - time) < rate) {
return(undefined);
}
time = getTimer();
Tone.gotoAndStop(tonePos + 2);
tonePos++;
tonePos = tonePos % 4;
xMax = playMin;
xMin = playMax;
allGone = true;
for (var i in Alien) {
if (moveDown) {
Alien[i]._y = Alien[i]._y + 14;
} else {
Alien[i]._x = Alien[i]._x + (dir * 1.5);
}
for (var j in Alien[i]) {
if (typeof(Alien[i][j]) != "movieclip") {
continue;
}
allGone = false;
Alien[i][j].nextFrame();
var x = (Number(Alien[i]._x) + Number(Alien[i][j]._x));
if (x < xMin) {
xMin = x;
}
if (x > xMax) {
xMax = x;
}
if (moveDown) {
if ((Number(Alien[i]._y) + Number(Alien[i][j]._y)) > 320) {
lives = 0;
newLife = (gameOver = true);
SndUFO.gotoAndStop(1);
Base.gotoAndPlay(2);
delete this.onEnterFrame;
gotoAndStop ("gameOver");
return(undefined);
}
}
}
}
if ((!moveDown) && ((xMax > playMax) || (xMin < playMin))) {
dir = dir * -1;
speed = speed + 30;
moveDown = true;
} else {
moveDown = false;
}
if (allGone) {
score = score + 1000;
setScore();
if (lives < 9) {
lives++;
setLives();
}
SndUFO.gotoAndStop(1);
delete this.onEnterFrame;
gotoAndPlay ("newGame");
}
};
Frame 107
delete this.onEnterFrame;
Mouse.show();
setScore();
Symbol 20 MovieClip [Alien1] Frame 1
stop();
Symbol 20 MovieClip [Alien1] Frame 3
gotoAndStop (1);
Symbol 24 MovieClip [Alien2] Frame 1
stop();
Symbol 24 MovieClip [Alien2] Frame 3
gotoAndStop (1);
Symbol 27 MovieClip [Alien3] Frame 1
stop();
Symbol 27 MovieClip [Alien3] Frame 3
gotoAndStop (1);
Symbol 33 Button
on (release) {
getURL ("http://www.thegamehomepage.com/", "_blank");
}
Symbol 41 MovieClip Frame 63
stop();
Symbol 45 Button
on (release) {
gotoAndPlay (82);
}
Symbol 50 Button
on (release) {
getURL ("http://www.thegamehomepage.com/", "_blank");
}
Symbol 54 Button
on (release) {
nextFrame();
}
Symbol 58 Button
on (release) {
getURL ("http://www.thegamehomepage.com/freesitecontent/", "_blank");
}
Symbol 62 Button
on (release) {
prevFrame();
}
Symbol 84 MovieClip Frame 1
_root.newLife = false;
_root.powerupinv = true;
count = 1;
Symbol 84 MovieClip Frame 42
if (count > 0) {
count--;
gotoAndPlay (2);
} else {
_root.powerupinv = false;
_root.newLife = false;
stop();
}
Symbol 84 MovieClip Frame 43
_root.setLives();
_root.fMakeStarburst(_x, _y, true);
_root.powerupinv = true;
Symbol 84 MovieClip Frame 67
if (_root.gameOver) {
stop();
}
Symbol 84 MovieClip Frame 68
_root.newLife = false;
gotoAndPlay (1);
Symbol 84 MovieClip Frame 69
start = getTimer();
beginTime = getTimer();
_root.powerupinv = true;
Symbol 84 MovieClip Frame 70
curTime = getTimer() - beginTime;
if (curTime > 7000) {
gotoAndPlay (1);
}
Symbol 84 MovieClip Frame 71
gotoAndPlay ("invtime");
Symbol 89 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 2
play();
Symbol 105 MovieClip Frame 6
if (_visible) {
if (_root.paused) {
gotoAndPlay (5);
} else {
_y = (_y + 32);
gotoAndPlay (2);
}
} else {
gotoAndStop (1);
}
Symbol 112 MovieClip Frame 1
if (_root.newLife || (_root.gameOver)) {
this.removeMovieClip;
}
if (this.hitTest(_root.Base)) {
_root.Base.gotoAndPlay("invincible");
gotoAndPlay (3);
}
Symbol 112 MovieClip Frame 2
gotoAndPlay (1);
Symbol 112 MovieClip Frame 3
swapDepths(500);
Symbol 112 MovieClip Frame 30
_x = -200;
swapDepths(1);
Symbol 117 MovieClip Frame 1
start = getTimer();
beginTime = getTimer();
Symbol 117 MovieClip Frame 2
curTime = getTimer() - beginTime;
if (curTime > 20000) {
ran = Math.random() * 10;
if (ran < 4) {
_root.inv._x = (Math.random() * 460) + 20;
_root.inv._y = (Math.random() * 370) + 20;
} else if (ran < 8) {
_root.megalaser._x = (Math.random() * 460) + 20;
_root.megalaser._y = (Math.random() * 370) + 20;
} else {
_root.reverse.gotoAndPlay(2);
}
beginTime = getTimer();
}
Symbol 117 MovieClip Frame 3
gotoAndPlay (2);
Symbol 120 MovieClip Frame 1
if (_root.newLife || (_root.gameOver)) {
removeMovieClip(this);
}
if (this.hitTest(_root.Base)) {
_root.powerupml = true;
gotoAndPlay (3);
}
Symbol 120 MovieClip Frame 2
gotoAndPlay (1);
Symbol 120 MovieClip Frame 3
swapDepths(500);
Symbol 120 MovieClip Frame 30
_x = -200;
swapDepths(1);
Symbol 120 MovieClip Frame 31
start = getTimer();
beginTime = getTimer();
Symbol 120 MovieClip Frame 32
curTime = getTimer() - beginTime;
if (curTime > 8000) {
_root.powerupml = false;
gotoAndPlay (1);
}
Symbol 120 MovieClip Frame 33
gotoAndPlay (32);
Symbol 125 MovieClip Frame 1
_x = -200;
stop();
if (_root.newLife) {
removeMovieClip(this);
}
Symbol 125 MovieClip Frame 2
_x = 270;
_root.poweruprev = true;
_root.Base.gotoAndPlay(1);
Symbol 125 MovieClip Frame 60
_x = 270;
Symbol 125 MovieClip Frame 61
_x = -200;
start = getTimer();
beginTime = getTimer();
Symbol 125 MovieClip Frame 62
curTime = getTimer() - beginTime;
if (curTime > 9000) {
_root.Base.gotoAndPlay(1);
_root.poweruprev = false;
gotoAndStop (1);
}
Symbol 125 MovieClip Frame 63
gotoAndPlay (62);
Symbol 128 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
_visible = false;
Symbol 141 MovieClip Frame 2
ufoScore = (int(Math.random() * 6) * 50) + 50;
_root.score = _root.score + ufoScore;
_root.setScore();
Symbol 147 Button
on (release) {
getURL ("http://www.thegamehomepage.com/", "_blank");
}
Symbol 151 Button
on (release) {
gotoAndStop ("menu");
}