Frame 1
_quality = "HIGH";
stop();
Frame 2
function spawnShip() {
layer++;
_root.attachMovie("ship", "ship", layer);
layer++;
}
function makeStats() {
textFormat = new TextFormat();
textFormat.color = 16777215 /* 0xFFFFFF */;
textFormat.font = "Verdana";
textFormat.size = 18;
_root.createTextField("scoreText", MAX_LAYER, scoreTextX, scoreTextY, 600, 50);
_root.createTextField("bonusText", MAX_LAYER + 1, bonusTextX, bonusTextY, 600, 50);
_root.createTextField("livesText", MAX_LAYER + 2, livesTextX, livesTextY, 300, 50);
_root.createTextField("multiText", MAX_LAYER + 3, multiTextX, multiTextY, 300, 50);
}
function randomizeWaves() {
i = 1;
while (i <= 6) {
_root["waveO" + i].species = "ufo" + Math.floor((Math.random() * 3.99) + 1);
_root["waveO" + i].funct = "wave" + Math.floor((Math.random() * 5.99) + 1);
_root["waveO" + i].population = Math.floor(Math.random() * 4) + 7;
_root["waveO" + i].shotProb = Math.random() * 0.015;
i++;
}
}
function powerUpDrop(pux, puy) {
layer++;
randomNum = Math.floor(Math.random() * 100);
if (randomNum < 15) {
PUtype = "rapidFire";
} else if (randomNum < 30) {
PUtype = "upgrade";
} else if (randomNum < 40) {
PUtype = "helper";
} else if (randomNum < 50) {
PUtype = "speedUp";
} else if (randomNum < 58) {
PUtype = "multiplierUp";
} else if (randomNum < 65) {
PUtype = "lifeUp";
} else if (randomNum < 70) {
PUtype = "death";
} else if (randomNum < 80) {
PUtype = "bankrupt";
} else if (randomNum < 90) {
PUtype = "slowDown";
} else {
PUtype = "scoreUp";
}
attachMovie(PUtype, PUtype + layer, layer);
_root[PUtype + _root.layer]._x = pux;
_root[PUtype + _root.layer]._y = puy;
}
function firstWave() {
clearInterval(newWaveInterval);
currentWave = waveO1;
intervalFunct = "createEnemy";
intervalTime = currentWave.freq;
intervalID = "waves";
waves = setInterval(createEnemy, currentWave.freq);
}
function newWave() {
clearInterval(newWaveInterval);
currentWave = currentWave.nextWave;
if (currentWave == null) {
currentWave = waveOne;
}
intervalFunct = "createEnemy";
intervalTime = currentWave.freq;
intervalID = "waves";
waves = setInterval(createEnemy, currentWave.freq);
}
function createEnemy() {
waveCount++;
layer++;
if ((fullRandom == true) && (currentWave != waveO6)) {
randomizeWaves();
fullRandom = false;
} else if (currentWave.randomWaves == true) {
fullRandom = true;
randomInt = Math.floor((Math.random() * 5.99) + 1);
currentWave.funct = "wave" + randomInt;
}
if (((currentWave.funct == "wave2") || (currentWave.funct == "wave4")) || (currentWave.funct == "wave6")) {
currentWave.startPoint = upperRight;
} else {
currentWave.startPoint = upperLeft;
}
_root.attachMovie(currentWave.species, currentWave.species + layer, layer, currentWave.startPoint);
_root[currentWave.species + layer].goFunct = _root[currentWave.funct];
_root[currentWave.species + layer].onEnterFrame = _root[currentWave.species + layer].goFunct;
if (currentWave.altFunct != null) {
tempFunctHolder = currentWave.funct;
currentWave.funct = currentWave.altFunct;
currentWave.altFunct = tempFunctHolder;
}
enemyArray[waveCount].destroy();
enemyArray[waveCount] = _root[currentWave.species + layer];
layer++;
if (waveCount >= currentWave.population) {
if (layer > (MAX_LAYER / 30)) {
layer = 5;
}
waveCount = 0;
clearInterval(waves);
intervalFunct = "newWave";
intervalTime = currentWave.nextWave.pause;
intervalID = "newWaveInterval";
newWaveInterval = setInterval(newWave, currentWave.nextWave.pause);
}
}
function pause() {
_quality = "HIGH";
clearInterval(waves);
clearInterval(newWaveInterval);
clearInterval(_root[intervalID]);
for (name in _root) {
_root[name]._alpha = 50;
_root[name].onEnterFrame = eval (null)();
}
showList._alpha = 100;
starBG.stop();
starBG2.stop();
starBG3.stop();
starBG4.stop();
_root.onEnterFrame = unpause;
}
function unpause() {
if (Key.isDown(32)) {
_quality = "LOW";
_root[intervalID] = setInterval(_root[intervalFunct], intervalTime);
for (name in _root) {
_root[name]._alpha = 100;
_root[name].onEnterFrame = _root[name]._root[name][_root[name].process];
}
showList._alpha = 0;
starBG.play();
starBG2.play();
starBG3.play();
starBG4.play();
_root.onEnterFrame = null;
}
}
function wave1() {
this.hitCheck();
this.fire();
if (this._x < 200) {
this.count++;
this._x = this._x + this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed--;
this.Hspeed++;
} else if (this._x < 650) {
this.count++;
this._x = this._x + this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed = this.Vspeed + 2;
this.Hspeed = this.Hspeed - 1;
}
if ((((this._y >= 600) || (this._y <= -50)) || (_x > 650)) || (_x < -50)) {
this.destroy();
}
}
function wave2() {
this.hitCheck();
this.fire();
if (this._x > 300) {
this.count++;
this._x = this._x - this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed--;
this.Hspeed++;
} else if (this._x > -50) {
this.count++;
this._x = this._x - this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed = this.Vspeed + 2;
this.Hspeed = this.Hspeed - 1;
}
if (((this._y >= 600) || (this._y <= -50)) || (this._x <= -50)) {
this.destroy();
}
}
function wave3() {
this.hitCheck();
this.fire();
if (this._x < 300) {
this.count = 1;
this._x = this._x + this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed--;
this.Hspeed = this.Hspeed + 2;
} else if (this._x < 650) {
this.count = 2;
this._x = this._x + this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed = this.Vspeed - 1;
this.Hspeed = this.Hspeed - 2.5;
}
if (((this._y >= 600) || (this._y <= -50)) || (this._x >= 650)) {
this.destroy();
}
}
function wave4() {
this.hitCheck();
this.fire();
if (this._x > 300) {
this.count = 1;
this._x = this._x - this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed--;
this.Hspeed = this.Hspeed + 2;
} else if (this._x > -50) {
this.count = 2;
this._x = this._x - this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed = this.Vspeed - 1;
this.Hspeed = this.Hspeed - 2.5;
}
if (((this._y >= 600) || (this._y <= -50)) || (this._x >= 650)) {
this.destroy();
}
}
function wave5() {
this.hitCheck();
this.fire();
if (this._x < 300) {
this.count = 1;
this._x = this._x + this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed--;
this.Hspeed = this.Hspeed + 2;
} else if (this._x < 650) {
this.count = 2;
this._x = this._x + this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed = this.Vspeed - 1;
this.Hspeed = this.Hspeed - 2.5;
}
if (((this._y >= 600) || (this._y <= -50)) || (this._x >= 650)) {
this.destroy();
}
}
function wave6() {
this.hitCheck();
this.fire();
if (this._x > 400) {
this.count++;
this._x = this._x - this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed--;
this.Hspeed++;
} else if (this._x > -50) {
this.count++;
this._x = this._x - this.Hspeed;
this._y = this._y + this.Vspeed;
this.Vspeed = this.Vspeed + 2;
this.Hspeed = this.Hspeed - 1;
}
if ((((this._y >= 600) || (this._y <= -50)) || (_x > 650)) || (_x < -50)) {
this.destroy();
}
}
_quality = "LOW";
showList._alpha = 0;
MAX_LAYER = 3000;
layer = 0;
score = 0;
lives = 5;
fullrandom = false;
scoreTextX = 0;
scoreTextY = 0;
bonusTextX = 0;
bonusTextY = 25;
livesTextX = 0;
livesTextY = 545;
multiTextX = 0;
multiTextY = 570;
_global.MAX_Y = 550;
_global.MAX_X = 550;
_global.MIN_Y = 150;
_global.MIN_X = 50;
upperLeft = new Object();
upperLeft._x = 0;
upperLeft._y = 0;
upperRight = new Object();
upperRight._x = 650;
upperRight._y = 0;
waveO1 = new Object();
waveO2 = new Object();
waveO3 = new Object();
waveO4 = new Object();
waveO5 = new Object();
waveO6 = new Object();
waveO1.pause = 1500;
waveO1.nextWave = waveO2;
waveO1.funct = "wave1";
waveO1.population = 7;
waveO1.species = "ufo1";
waveO1.freq = 200;
waveO1.shotProb = 0.005;
waveO2.pause = 2000;
waveO2.nextWave = waveO3;
waveO2.funct = "wave2";
waveO2.population = 5;
waveO2.species = "ufo2";
waveO2.freq = 200;
waveO2.shotProb = 0.015;
waveO3.pause = 800;
waveO3.nextWave = waveO4;
waveO3.funct = "wave3";
waveO3.population = 7;
waveO3.species = "ufo1";
waveO3.freq = 150;
waveO3.shotProb = 0.01;
waveO4.pause = 1500;
waveO4.nextWave = waveO5;
waveO4.funct = "wave4";
waveO4.population = 7;
waveO4.species = "ufo3";
waveO4.freq = 150;
waveO4.shotProb = 0.01;
waveO5.pause = 1000;
waveO5.nextWave = waveO6;
waveO5.funct = "wave6";
waveO5.altFunct = "wave3";
waveO5.population = 10;
waveO5.species = "ufo2";
waveO5.freq = 150;
waveO5.shotProb = 0.007;
waveO6.pause = 1200;
waveO6.nextWave = waveO1;
waveO6.randomWaves = true;
waveO6.funct = "wave1";
waveO6.population = 8;
waveO6.species = "ufo1";
waveO6.freq = 150;
waveO6.shotProb = 0.01;
spawnShip();
makeStats();
enemyArray = new Array();
intervalFunct = "firstWave";
intervalTime = 1000;
intervalID = "newWaveInterval";
newWaveInterval = setInterval(firstWave, 1000);
Frame 3
stop();
Frame 4
_quality = "HIGH";
stop();
clearInterval(newWaveInterval);
clearInterval(waves);
Instance of Symbol 81 MovieClip in Frame 4
on (release) {
for (name in _root) {
clearInterval(_root[name]);
delete _root[name];
_root[name].removeMovieClip();
}
_root.gotoAndPlay(2);
}
Symbol 5 MovieClip [ship] Frame 1
function speedUp() {
bonus = bonus + 100;
if (speed_p == 8) {
speed_p = 15;
} else {
speed_p = 20;
}
}
function slowDown() {
bonus = bonus + 100;
if (speed_p == 20) {
speed_p = 15;
} else {
speed_p = 8;
}
}
function lifeUp() {
bonus = bonus + 100;
_root.lives++;
}
function scoreUp() {
_root.score = _root.score + bonus;
bonus = bonus * 2;
}
function rapid() {
bonus = bonus + 100;
if (loadTime_p == 400) {
loadTime_p = 200;
} else if (loadTime_p == 200) {
loadTime_p = 100;
}
}
function multiplierUp() {
bonus = bonus + 100;
if (multiplier < 16) {
multiplier = multiplier * 2;
}
}
function upgrade() {
bonus = bonus + 100;
if ((shotType != "pulse") && (loadTime == 100)) {
loadTime_p = 200;
}
if (shotType == "bullet") {
shotType = "laser";
} else if (shotType == "laser") {
shotType = "triple";
} else if (shotType == "triple") {
shotType = "pulse";
}
}
function reload() {
clearInterval(reloadInterval);
armed = true;
}
function checkBounds() {
if (_x > MAX_X) {
_x = MAX_X;
} else if (_x < MIN_X) {
_x = MIN_X;
}
if (_y > MAX_Y) {
_y = MAX_Y;
} else if (_y < MIN_Y) {
_y = MIN_Y;
}
}
function showScore() {
_root.scoreText.text = "Score:" + _root.score;
_root.scoreText.setTextFormat(_root.textFormat);
_root.bonusText.text = "Bonus:" + bonus;
_root.bonusText.setTextFormat(_root.textFormat);
_root.livesText.text = "Lives:" + _root.lives;
_root.livesText.setTextFormat(_root.textFormat);
_root.multiText.text = "Multiplier X" + multiplier;
_root.multiText.setTextFormat(_root.textFormat);
}
function arrowsMove() {
showScore();
if (Key.isDown(left_k)) {
dir = L;
if (Key.isDown(up_k)) {
_x = (_x - ((speed_p * dir) * DIAG));
_y = (_y - (speed_p * DIAG));
} else if (Key.isDown(down_k)) {
_x = (_x - ((speed_p * dir) * DIAG));
_y = (_y + (speed_p * DIAG));
} else {
_x = (_x - (speed_p * dir));
}
} else if (Key.isDown(right_k)) {
dir = R;
if (Key.isDown(up_k)) {
_x = (_x - ((speed_p * dir) * DIAG));
_y = (_y - (speed_p * DIAG));
} else if (Key.isDown(down_k)) {
_x = (_x - ((speed_p * dir) * DIAG));
_y = (_y + (speed_p * DIAG));
} else {
_x = (_x - (speed_p * dir));
}
} else if (Key.isDown(up_k)) {
_y = (_y - speed_p);
} else if (Key.isDown(down_k)) {
_y = (_y + speed_p);
}
if (Key.isDown(shoot_k) && (armed == true)) {
_root.layer++;
_root.attachMovie(shotType, shotType + _root.layer, _root.layer);
_root[shotType + _root.layer]._x = this._x;
_root[shotType + _root.layer]._y = this._y;
_root.layer++;
armed = false;
reloadInterval = setInterval(reload, loadTime_p);
}
if (Key.isDown(pause_k)) {
_root.pause();
}
checkBounds();
}
function live() {
clearInterval(liveInterval);
alive = true;
gotoAndStop (10);
}
function destroy() {
clearInterval(liveInterval);
clearInterval(reloadInterval);
this.onEnterFrame = null;
this.play();
}
_x = 300;
_y = 550;
bonus = 0;
multiplier = 1;
DIAG = 0.8;
R = -1;
L = 1;
alive = false;
armed = true;
shotSpeed = 30;
shotDamage = 1;
shotLifeSpan = 50;
shotType = "bullet";
left_k = 37;
right_k = 39;
up_k = 38;
down_k = 40;
shoot_k = 32;
pause_k = 80;
loadTime_p = 400;
speed_p = 15;
this.onEnterFrame = arrowsMove;
process = "arrowsMove";
liveInterval = setInterval(live, 1500);
Symbol 5 MovieClip [ship] Frame 9
gotoAndPlay (2);
Symbol 5 MovieClip [ship] Frame 10
stop();
Symbol 5 MovieClip [ship] Frame 14
gotoAndPlay (10);
Symbol 5 MovieClip [ship] Frame 15
alive = false;
_root.score = _root.score + bonus;
bonus = 0;
showScore();
destroy();
Symbol 5 MovieClip [ship] Frame 50
_root.lives--;
showScore();
if (_root.lives <= 0) {
clearInterval(liveInterval);
clearInterval(reloadInterval);
_root.play();
this.removeMovieClip();
} else {
gotoAndPlay (1);
}
Symbol 9 MovieClip [bullet] Frame 1
function bulletGo() {
process = "bulletGo";
counter++;
if (counter > lifeSpan_p) {
this.onEnterFrame = null;
this.destroy();
}
_y = (_y - speed_p);
for (name in _root.enemyArray) {
if (hitTest(_root.enemyArray[name]) && (_root.enemyArray[name].alive == true)) {
_root.enemyArray[name].gotoAndPlay("hit");
gotoAndPlay (2);
}
}
}
function destroy() {
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
ship = _root.ship;
ship.armed = false;
speed_p = ship.shotSpeed;
lifeSpan_p = ship.shotLifeSpan;
damage_p = ship.shotDamage;
counter = 0;
this.onEnterFrame = bulletGo;
Symbol 9 MovieClip [bullet] Frame 2
this.onEnterFrame = null;
process = null;
Symbol 9 MovieClip [bullet] Frame 7
this.destroy();
Symbol 12 MovieClip [triple] Frame 1
function tripGo() {
counter++;
if (counter > lifeSpan_p) {
this.onEnterFrame = null;
this.destroy();
}
trip1._x = trip1._x - drift;
trip2._x = trip2._x + drift;
_y = (_y - speed_p);
for (name in _root.enemyArray) {
if (hitTest(_root.enemyArray[name]) && (_root.enemyArray[name].alive == true)) {
_root.enemyArray[name].gotoAndPlay("hit");
gotoAndPlay (2);
}
}
}
function destroy() {
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
drift = 2;
ship = _root.ship;
ship.armed = false;
speed_p = ship.shotSpeed;
lifeSpan_p = ship.shotLifeSpan;
damage_p = ship.shotDamage;
counter = 0;
process = "tripGo";
this.onEnterFrame = tripGo;
Symbol 12 MovieClip [triple] Frame 2
this.onEnterFrame = null;
process = null;
Symbol 12 MovieClip [triple] Frame 7
this.destroy();
Symbol 14 MovieClip [pulse] Frame 1
function pulseGo() {
counter++;
if (counter > lifeSpan_p) {
this.onEnterFrame = null;
this.destroy();
}
_y = (_y - speed_p);
for (name in _root.enemyArray) {
if (hitTest(_root.enemyArray[name]) && (_root.enemyArray[name].alive == true)) {
_root.enemyArray[name].gotoAndPlay("hit");
}
}
}
function destroy() {
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
ship = _root.ship;
ship.armed = false;
speed_p = ship.shotSpeed;
lifeSpan_p = ship.shotLifeSpan;
damage_p = ship.shotDamage;
counter = 0;
this.onEnterFrame = pulseGo;
process = "pulseGo";
Symbol 17 MovieClip [laser] Frame 1
function laserGo() {
counter++;
if (counter > lifeSpan_p) {
this.onEnterFrame = null;
this.destroy();
}
_y = (_y - speed_p);
for (name in _root.enemyArray) {
if (hitTest(_root.enemyArray[name]) && (_root.enemyArray[name].alive == true)) {
_root.enemyArray[name].gotoAndPlay("hit");
gotoAndPlay (2);
}
}
}
function destroy() {
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
ship = _root.ship;
ship.armed = false;
speed_p = ship.shotSpeed;
lifeSpan_p = ship.shotLifeSpan;
damage_p = ship.shotDamage;
counter = 0;
process = "laserGo";
this.onEnterFrame = laserGo;
Symbol 17 MovieClip [laser] Frame 2
this.onEnterFrame = null;
process = null;
Symbol 17 MovieClip [laser] Frame 7
this.destroy();
Symbol 19 MovieClip [ufo4] Frame 1
function hitCheck() {
if ((hitTest(_root.ship) && (_root.ship.alive == true)) && (alive == true)) {
clearInterval(hitCheckInterval);
_root.ship.gotoAndPlay("die");
gotoAndPlay (15);
}
}
function fire() {
if (Math.random() < firePercent) {
shoot();
clearInterval(fireInterval);
}
}
function shoot() {
_root.layer++;
_root.attachMovie("ufoShot", "ufoShot" + _root.layer, _root.layer);
_root["ufoShot" + _root.layer]._x = this._x;
_root["ufoShot" + _root.layer]._y = this._y;
_root.layer++;
}
function destroy() {
clearInterval(hitCheckInterval);
clearInterval(fireInterval);
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
shotType = "ufoShot";
PUprob = 0.6;
process = "goFunct";
worth = 100;
firePercent = 0.025;
count = 0;
Hspeed = 4;
Vspeed = 25;
alive = true;
Symbol 19 MovieClip [ufo4] Frame 15
this.onEnterFrame = null;
_root.score = _root.score + (worth * _root.ship.multiplier);
if (Math.random() < PUprob) {
_root.powerUpDrop(_x, _y);
}
alive = false;
Symbol 19 MovieClip [ufo4] Frame 23
destroy();
Symbol 21 MovieClip [ufo3] Frame 1
function hitCheck() {
if ((hitTest(_root.ship) && (_root.ship.alive == true)) && (alive == true)) {
clearInterval(hitCheckInterval);
_root.ship.gotoAndPlay("die");
gotoAndPlay (15);
}
}
function fire() {
if (Math.random() < firePercent) {
shoot();
clearInterval(fireInterval);
}
}
function shoot() {
_root.layer++;
_root.attachMovie("ufo3Shot", "ufo3Shot" + _root.layer, _root.layer);
_root["ufo3Shot" + _root.layer]._x = this._x;
_root["ufo3Shot" + _root.layer]._y = this._y;
_root.layer++;
}
function destroy() {
clearInterval(hitCheckInterval);
clearInterval(fireInterval);
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
shotType = "ufo3Shot";
process = "goFunct";
PUprob = 0.33;
worth = 250;
firePercent = _root.currentWave.shotProb;
count = 0;
Hspeed = 4;
Vspeed = 25;
alive = true;
Symbol 21 MovieClip [ufo3] Frame 15
this.onEnterFrame = null;
_root.score = _root.score + (worth * _root.ship.multiplier);
if (Math.random() < PUprob) {
_root.powerUpDrop(_x, _y);
}
alive = false;
Symbol 21 MovieClip [ufo3] Frame 23
destroy();
Symbol 23 MovieClip [ufo2] Frame 1
function hitCheck() {
if ((hitTest(_root.ship) && (_root.ship.alive == true)) && (alive == true)) {
clearInterval(hitCheckInterval);
_root.ship.gotoAndPlay("die");
gotoAndPlay (15);
}
}
function fire() {
if (Math.random() < firePercent) {
shoot();
clearInterval(fireInterval);
}
}
function shoot() {
_root.layer++;
_root.attachMovie("fighterShot", "fighterShot" + _root.layer, _root.layer);
_root["fighterShot" + _root.layer]._x = this._x;
_root["fighterShot" + _root.layer]._y = this._y;
_root.layer++;
}
function destroy() {
clearInterval(hitCheckInterval);
clearInterval(fireInterval);
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
process = "goFunct";
PUprob = 0.2;
worth = 200;
firePercent = _root.currentWave.shotProb;
count = 0;
Hspeed = 4;
Vspeed = 25;
alive = true;
Symbol 23 MovieClip [ufo2] Frame 15
this.onEnterFrame = null;
_root.score = _root.score + (worth * _root.ship.multiplier);
if (Math.random() < PUprob) {
_root.powerUpDrop(_x, _y);
}
alive = false;
Symbol 23 MovieClip [ufo2] Frame 23
destroy();
Symbol 25 MovieClip [ufo1] Frame 1
function hitCheck() {
if ((hitTest(_root.ship) && (_root.ship.alive == true)) && (alive == true)) {
clearInterval(hitCheckInterval);
_root.ship.gotoAndPlay("die");
gotoAndPlay (15);
}
}
function fire() {
if (Math.random() < firePercent) {
shoot();
clearInterval(fireInterval);
}
}
function shoot() {
_root.layer++;
_root.attachMovie("ufoShot", "ufoShot" + _root.layer, _root.layer);
_root["ufoShot" + _root.layer]._x = this._x;
_root["ufoShot" + _root.layer]._y = this._y;
_root.layer++;
}
function destroy() {
clearInterval(hitCheckInterval);
clearInterval(fireInterval);
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
PUprob = 0.15;
process = "goFunct";
firePercent = _root.currentWave.shotProb;
worth = 100;
count = 0;
Hspeed = 4;
Vspeed = 25;
alive = true;
Symbol 25 MovieClip [ufo1] Frame 15
this.onEnterFrame = null;
_root.score = _root.score + (worth * _root.ship.multiplier);
if (Math.random() < PUprob) {
_root.powerUpDrop(_x, _y);
}
alive = false;
Symbol 25 MovieClip [ufo1] Frame 23
destroy();
Symbol 27 MovieClip [ufo3Shot] Frame 1
function shotGo() {
this._y = this._y + speed;
speed = speed + 0.8;
if (hitTest(_root.ship) && (_root.ship.alive == true)) {
_root.ship.gotoAndPlay("die");
this.destroy();
}
if (_y > 650) {
this.destroy();
}
}
function destroy() {
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
stop();
speed = -8;
pitch = (Math.random() * 3) + 2;
this.onEnterFrame = shotGo;
process = "shotGo";
Symbol 29 MovieClip [fighterShot] Frame 1
function shotGo() {
this._y = this._y + speed;
if (hitTest(_root.ship) && (_root.ship.alive == true)) {
_root.ship.gotoAndPlay("die");
this.destroy();
}
if (_y > 650) {
this.destroy();
}
}
function destroy() {
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
speed = 8;
this.onEnterFrame = shotGo;
process = "shotGo";
Symbol 31 MovieClip [ufoShot] Frame 1
function shotGo() {
this._y = this._y + speed;
if (hitTest(_root.ship) && (_root.ship.alive == true)) {
_root.ship.gotoAndPlay("die");
this.destroy();
}
if (_y > 650) {
this.destroy();
}
}
function destroy() {
for (name in this) {
delete this[name];
}
delete this;
this.removeMovieClip();
}
speed = 8;
this.onEnterFrame = shotGo;
process = "shotGo";
Symbol 38 MovieClip [helper] Frame 1
function helperGo() {
_y = (_y + 4);
if (hitTest(_root.ship)) {
_root.ship.bonus = _root.ship.bonus + 50;
gotoAndPlay (2);
}
if (_y >= 600) {
this.removeMovieClip();
}
}
stop();
lifeSpan = 25;
process = "helperGo";
this.onEnterFrame = helperGo;
Symbol 38 MovieClip [helper] Frame 2
function helpingGo() {
if ((_x >= MAX_X) || (_x <= MIN_X)) {
Hveloc = Hveloc * -1;
count++;
}
if ((_y >= MAX_Y) || (_y <= 50)) {
Vveloc = Vveloc * -1;
count++;
}
_y = (_y + Vveloc);
_x = (_x + Hveloc);
for (name in _root.enemyArray) {
if (hitTest(_root.enemyArray[name]) && (_root.enemyArray[name].alive)) {
_root.enemyArray[name].gotoAndPlay("hit");
}
}
if (count >= lifeSpan) {
this.removeMovieClip();
}
}
stop();
process = "helpingGo";
Hveloc = 16;
Vveloc = 18;
this.onEnterFrame = helpingGo;
Symbol 41 MovieClip [multiplierUp] Frame 1
function MUGo() {
_y = (_y + 4);
if (hitTest(_root.ship)) {
_root.ship.multiplierUp();
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
process = "MUGo";
this.onEnterFrame = MUGo;
Symbol 44 MovieClip [scoreUp] Frame 1
function SUGo() {
_y = (_y + 4);
if (hitTest(_root.ship)) {
_root.ship.bonus = _root.ship.bonus + value;
_root.ship.scoreUp();
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
value = 100;
process = "SUGo";
this.onEnterFrame = SUGo;
Symbol 46 MovieClip [slowDown] Frame 1
function SDGo() {
_y = (_y + 4);
if (_x < _root.ship._x) {
_x = (_x + 2.5);
} else if (_x > _root.ship._x) {
_x = (_x - 2.5);
}
if (hitTest(_root.ship)) {
_root.ship.slowDown();
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
this.onEnterFrame = SDGo;
process = "SDGo";
Symbol 48 MovieClip [bankrupt] Frame 1
function bankruptGo() {
_y = (_y + 4);
if (_x < _root.ship._x) {
_x = (_x + 2.5);
} else if (_x > _root.ship._x) {
_x = (_x - 2.5);
}
if (hitTest(_root.ship)) {
_root.ship.bonus = 0;
_root.ship.shotType = "bullet";
_root.ship.multiplier = 1;
_root.ship.loadTime_p = 400;
_root.ship.speed_p = 12;
_root.score = _root.score - 5000;
if (_root.score < 0) {
_root.score = 0;
}
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
this.onEnterFrame = bankruptGo;
process = "bankruptGo";
Symbol 50 MovieClip [lifeUp] Frame 1
function lifeUpGo() {
_y = (_y + 4);
if (hitTest(_root.ship)) {
_root.ship.lifeUp();
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
process = "lifeUpGo";
this.onEnterFrame = lifeUpGo;
Symbol 53 MovieClip [death] Frame 1
function deathGo() {
process = "deathGo";
_y = (_y + 4);
if (_x < _root.ship._x) {
_x = (_x + 2.5);
} else if (_x > _root.ship._x) {
_x = (_x - 2.5);
}
if (hitTest(_root.ship)) {
_root.ship.gotoAndPlay("die");
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
this.onEnterFrame = deathGo;
Symbol 55 MovieClip [speedUp] Frame 1
function SpeedGo() {
_y = (_y + 4);
if (hitTest(_root.ship)) {
_root.ship.speedUp();
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
this.onEnterFrame = SpeedGo;
process = "SpeedGo";
Symbol 57 MovieClip [upgrade] Frame 1
function upgradeGo() {
_y = (_y + 4);
if (hitTest(_root.ship)) {
_root.ship.upgrade();
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
this.onEnterFrame = upgradeGo;
process = upgradeGo;
Symbol 59 MovieClip [rapidFire] Frame 1
function RFGo() {
_y = (_y + 4);
if (hitTest(_root.ship)) {
_root.ship.rapid();
this.removeMovieClip();
}
if (_y >= 600) {
this.removeMovieClip();
}
}
this.onEnterFrame = RFGo;
process = "RFGo";
Symbol 62 MovieClip Frame 1
stop();
_x = (Math.random() * 600);
_y = (Math.random() * 600);
_alpha = (Math.random() * 100);
_yscale = (Math.random() * 30);
_xscale = (Math.random() * 30);
Symbol 63 MovieClip Frame 1
_y = (_y+1);
if (_y > 600) {
_y = -600;
}
Symbol 64 MovieClip Frame 1
_y = (_y + 4);
if (_y > 600) {
_y = -600;
}
Symbol 64 MovieClip Frame 2
_y = (_y + 4);
if (_y > 600) {
_y = -600;
}
Symbol 74 Button
on (release) {
play();
}