Frame 1
stop();
bombNum = 0;
lives = 3;
score = 0;
speed = 10;
_global.initAliens = function (mc) {
var _local3 = mc;
depth = 0;
var _local2 = 0;
while (_local2 < 3) {
var _local1 = 0;
while (_local1 < 10) {
attachMovie(_local3, ((_local3 + _local2) + "_") + _local1, 100 + depth);
_root[((_local3 + _local2) + "_") + _local1]._x = _local1 * 40;
_root[((_local3 + _local2) + "_") + _local1]._y = (_local2 * 40) - 80;
depth++;
_local1++;
}
_local2++;
}
};
_global.moveAliens = function (mc, frame, alspeed) {
_root.deadcount = 0;
var i = 0;
while (i < 3) {
var j = 0;
while (j < 10) {
_root[((mc + i) + "_") + j]._x = _root[((mc + i) + "_") + j]._x + speed;
if (_root[((mc + i) + "_") + j].hitTest(_root.defender)) {
cleanup(mc);
_root.gotoAndStop(1);
}
if (_root[((mc + i) + "_") + j] != null) {
_root.deadcount++;
}
bulleti = 6;
while ((--bulleti) > 0) {
if (_root[((mc + i) + "_") + j].hittest(eval ("_root.bullet" + bulleti))) {
_root[((mc + i) + "_") + j].removeMovieClip();
eval ("_root.bullet" + bulleti).removeMovieClip();
_root.score = _root.score + 1;
}
}
if (_root[((mc + i) + "_") + j]._x < 0) {
speed = alspeed;
dropdown = true;
break;
}
if (_root[((mc + i) + "_") + j]._x > Stage.width) {
speed = -alspeed;
dropdown = true;
break;
}
j++;
}
i++;
}
if (dropdown) {
var i = 0;
while (i < 3) {
var j = 0;
while (j < 10) {
_root[((mc + i) + "_") + j]._y = _root[((mc + i) + "_") + j]._y + 20;
j++;
}
i++;
}
}
dropdown = false;
if (_root.deadcount == 0) {
_root.bombspeed = 0;
_root.gotoAndStop(frame);
}
};
_global.initBombs = function (bombspeed) {
if (Math.random() < bombspeed) {
attachMovie("bomb", "bomb" + bombNum, 200 + bombNum);
eval ("_root.bomb" + bombNum)._x = random(700);
eval ("_root.bomb" + bombNum)._y = 300 * Math.random();
bombNum++;
if (bombNum > 10) {
bombNum = 0;
}
}
};
_global.moveBombs = function (mc) {
var _local2 = _root;
var bombi = 0;
while (bombi < 11) {
_local2["bomb" + bombi]._y = _local2["bomb" + bombi]._y + 5;
if (_local2["bomb" + bombi].hittest(_local2.defender)) {
_local2["bomb" + bombi].removeMovieClip();
_local2.lives = _local2.lives - 1;
if (_local2.lives <= 0) {
Mouse.show();
_local2.bombspeed = 0;
_local2.gotoAndStop(6);
var _local3 = 0;
while (_local3 < 3) {
var _local1 = 0;
while (_local1 < 10) {
_local2[((mc + _local3) + "_") + _local1]._visible = false;
_local1++;
}
_local3++;
}
return;
}
}
if (_local2["bomb" + bombi]._y > Stage.height) {
_local2["bomb" + bombi].removeMovieClip();
}
bombi++;
}
};
_global.cleanup = function (mc) {
var _local3 = _root;
_local3.bombspeed = 0;
var _local2 = 0;
while (_local2 < 3) {
var _local1 = 0;
while (_local1 < 10) {
_local3[((mc + _local2) + "_") + _local1]._visible = false;
_local1++;
}
_local2++;
}
};
Frame 2
stop();
bulletNum = 0;
dropdown = false;
speed = 10;
_root.bombspeed = 0.1;
initAliens("alien");
_root.onLoad = function () {
Mouse.hide();
};
_root.onEnterFrame = function () {
_root.defender._x = _root._xmouse;
_root.defender._y = 370;
var y = 0;
while (y < 6) {
eval ("_root.bullet" + y)._y = eval ("_root.bullet" + y)._y - 30;
y++;
}
moveBombs("alien");
moveAliens("alien", 3, 10);
initBombs(_root.bombspeed);
};
_root.onMouseDown = function () {
attachMovie("bullet", "bullet" + bulletNum, bulletNum);
eval ("_root.bullet" + bulletNum)._x = _root.defender._x;
eval ("_root.bullet" + bulletNum)._y = _root.defender._y;
bulletNum++;
if (bulletNum > 5) {
bulletNum = 0;
}
};
Frame 3
stop();
bulletNum = 0;
dropdown = false;
speed = 15;
_root.bombspeed = 0.1;
initAliens("bug");
_root.onLoad = function () {
Mouse.hide();
};
_root.onEnterFrame = function () {
_root.defender._x = _root._xmouse;
_root.defender._y = 370;
var y = 0;
while (y < 6) {
eval ("_root.bullet" + y)._y = eval ("_root.bullet" + y)._y - 30;
y++;
}
moveBombs("bug");
moveAliens("bug", 4, 15);
initBombs(_root.bombspeed);
};
_root.onMouseDown = function () {
attachMovie("bullet", "bullet" + bulletNum, bulletNum);
eval ("_root.bullet" + bulletNum)._x = _root.defender._x;
eval ("_root.bullet" + bulletNum)._y = _root.defender._y;
bulletNum++;
if (bulletNum > 5) {
bulletNum = 0;
}
};
Frame 4
stop();
stop();
bulletNum = 0;
dropdown = false;
speed = 20;
_root.bombspeed = 0.1;
initAliens("skull");
_root.onLoad = function () {
Mouse.hide();
};
_root.onEnterFrame = function () {
_root.defender._x = _root._xmouse;
_root.defender._y = 370;
var y = 0;
while (y < 6) {
eval ("_root.bullet" + y)._y = eval ("_root.bullet" + y)._y - 30;
y++;
}
moveBombs("skull");
moveAliens("skull", 5, 20);
initBombs(_root.bombspeed);
};
_root.onMouseDown = function () {
attachMovie("bullet", "bullet" + bulletNum, bulletNum);
eval ("_root.bullet" + bulletNum)._x = _root.defender._x;
eval ("_root.bullet" + bulletNum)._y = _root.defender._y;
bulletNum++;
if (bulletNum > 5) {
bulletNum = 0;
}
};
Frame 5
stop();
Frame 6
stop();
Instance of Symbol 21 MovieClip "confused occy" in Symbol 22 MovieClip [skull] Frame 1
onClipEvent (load) {
this._y = 135;
speed = 10;
}
Symbol 36 MovieClip Frame 1
this.background.gotoAndPlay("1");
Symbol 57 Button
on (release) {
_root.play();
}
Symbol 58 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 58 MovieClip Frame 2
gotoAndPlay (1);
Symbol 63 Button
on (release) {
stopAllSounds();
}
Symbol 93 Button
on (release) {
_root.lives = 3;
_root.score = 0;
_root.gotoAndStop(2);
this.gotoAndPlay("2");
}