Frame 1
function getScoresFromMochi(t) {
var _local2 = MochiAd.fetchHighScores({id:"f3f905528cbad789"}, t, "gotScores");
}
var ScoreInput = function (mc, name, callback) {
this.mc = mc;
this.callback = callback;
mc.addEventListener("unload", this);
this.setup(name);
};
ScoreInput.prototype.setup = function (name) {
var _local2 = this.mc.name_tf;
_local2.text = name;
var self = this;
_local2.onSetFocus = function () {
Key.addListener(self);
};
_local2.onKillFocus = function () {
Key.removeListener(self);
};
this.mc.btn_submit.onRelease = function () {
self.submit();
};
Selection.setFocus(_local2);
};
ScoreInput.prototype.onKeyDown = function () {
if (Key.getCode() === 13) {
this.submit();
}
};
ScoreInput.prototype.submit = function () {
Key.removeListener(this);
this.callback(this.mc.name_tf.text);
};
ScoreInput.prototype.unload = function (evt) {
Key.removeListener(this);
};
var TextScoreTable = function (mc, max_scores) {
this.mc = mc;
this.max_scores = max_scores || 10;
this.reset("");
};
TextScoreTable.prototype.reset = function (statusText) {
this.mc.ranks_text = "";
this.mc.names_text = "";
this.mc.scores_text = "";
this.mc.dates_text = "";
this.mc.status_text = statusText;
};
TextScoreTable.prototype.gotScores = function (scores, playerIndex) {
this.reset("");
if (playerIndex === undefined) {
playerIndex = -1;
}
var _local3 = Math.min(this.max_scores, scores.length);
if (_local3 == 0) {
highscore.highscore.text = "0000000";
highscore.highscoreName.text = "No scores!";
this.mc.status_text = "No scores";
} else {
var _local2 = scores[0];
highscore.highscoreName.text = _local2[0];
highscore.highscore.text = _local2[1];
}
};
var commafy = function (n) {
var _local1 = parseInt(n, 10) + "";
var _local2 = [];
while (_local1.length > 3) {
_local2.unshift(_local1.slice(_local1.length - 3, _local1.length));
_local1 = _local1.slice(0, _local1.length - 3);
}
_local2.unshift(_local1);
return(_local2.join(","));
};
var msecToDateString = function (msec) {
var _local1 = new Date(msec);
return([_local1.getFullYear(), 1 + _local1.getMonth(), _local1.getDate()].join("-"));
};
stop();
Frame 2
MochiAd.showPreGameAd({id:"f3f905528cbad789", res:"640x600"});
Frame 4
if (framesLoaded == totalFrames) {
gotoAndStop ("start");
} else {
gotoAndPlay ("loop");
}
Frame 5
fscommand ("allowscale", false);
Stage.showMenu = false;
sounds = new Object();
sounds.fire = new Sound();
sounds.fire.attachSound("ClassicZap");
sounds.fireMissile = new Sound();
sounds.fireMissile.attachSound("Homing");
sounds.ArcadeEnemyShot = new Sound();
sounds.ArcadeEnemyShot.attachSound("ArcadeEnemyShot");
sounds.SmartBombFx = new Sound();
sounds.SmartBombFx.attachSound("SmartBombFx");
sounds.ExplosionShip = new Sound();
sounds.ExplosionShip.attachSound("ExplosionShip");
sounds.UsePowerUp = new Sound();
sounds.UsePowerUp.attachSound("GainLife");
sounds.ExtraEnergy = new Sound();
sounds.ExtraEnergy.attachSound("GainBonus");
sounds.Artillery = new Sound();
sounds.Artillery.attachSound("Artillery");
sounds.Computer = new Sound();
sounds.Computer.attachSound("Computer");
sounds.LevelDefender = new Sound();
sounds.LevelDefender.attachSound("LevelDefender");
sounds.GameOverRobot = new Sound();
sounds.GameOverRobot.attachSound("GameOverRobot");
sounds.Appear = new Sound();
sounds.Appear.attachSound("Appear");
sounds.LoseEnergy = new Sound();
sounds.LoseEnergy.attachSound("ExUnderwaterShort");
function getDistance(mc1, mc2) {
var _local4 = mc1._x;
var _local3 = mc1._y;
var _local2 = mc2._x;
var _local1 = mc2._y;
_local2 = _local4 - _local2;
_local1 = _local3 - _local1;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function RandomNumber(x, y) {
return(Math.round(Math.random() * (y - x)) + x);
}
var movieWidth = Stage.width;
var movieHeight = Stage.height;
var missileDistFromGun = 40;
var gameWaveNames = new Array("enemy1", "enemy2", "enemy1", "enemy2", "enemy1", "enemy3", "enemy1", "enemy2", "enemy1", "enemy2", "enemy1", "enemy3", "enemy3", "enemy1", "enemy2", "enemy3", "enemy2", "enemy5", "enemy3", "enemy1", "enemy5", "enemy3", "enemy5", "enemy1", "enemy7", "enemy2", "enemy3", "enemy1", "enemy1", "enemy1", "enemy4", "enemy3", "enemy5", "enemy1", "enemy4", "enemy2", "enemy3", "enemy4", "enemy1", "enemy1", "enemy2", "enemy2", "enemy5", "enemy4", "enemy2", "enemy4", "enemy2", "enemy1", "enemy5", "enemy1", "enemy4", "enemy5", "enemy4", "enemy3", "enemy5", "enemy3", "enemy3", "enemy2", "enemy1", "enemy2", "enemy1", "enemy3", "enemy5", "enemy4", "enemy2", "enemy2", "enemy2", "enemy1", "enemy4", "enemy1", "enemy3", "enemy3", "enemy5", "enemy1", "enemy6", "enemy2", "enemy5", "enemy2", "enemy3", "enemy1", "enemy4", "enemy6", "enemy4", "enemy7", "enemy6", "enemy7", "enemy6", "enemy4", "enemy1", "enemy1", "enemy4", "enemy6", "enemy3", "enemy3", "enemy3", "enemy3", "enemy6", "enemy4", "enemy6", "enemy7");
var gameWaveSpeed = new Array(0.02, -0.02, 0.02, -0.02, 0.03, -0.02, 0.04, -0.02, 0.02, -0.02, 0.02, 0.02, 0.03, -0.02, 0.02, 0.03, 0.02, 0.02, 0.02, 0.02, 0.02, -0.02, 0.02, -0.02, 0.05, -0.05, 0.05, -0.03, 0.05, -0.04, 1, 0.02, 0.05, -0.03, 1, 0.05, 0.02, 1, 0.03, 0.02, 0.04, -0.03, 0.02, 1.6, 0.05, 1.2, 0.05, -0.05, 0.05, -0.05, 1, 0.03, 1.3, -0.03, 0.04, 0.02, 0.04, 0.03, 0.03, 0.03, 0.05, -0.04, 0.04, 1.4, 0.04, -0.05, 0.05, -0.05, 1.5, -0.05, 0.04, 0.04, 0.04, -0.04, -0.03, 0.04, 0.04, 0.04, 0.04, 0.04, 1.5, -0.03, 1.6, -0.05, 0.05, -0.05, -0.05, 1.5, 0.05, -0.05, 1.5, 0.04, 0.05, -0.06, 0.04, 0.04, -0.06, 1.5, 0.05, 0.06);
var gameWaveDelayTillNextMonster = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 5, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 2, 4, 2, 3, 2, 2, 3, 4, 2, 5, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 2, 5, 2, 2, 5, 2, 5, 2, 2, 5);
var gameWaveMoneyValue = new Array(5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 5, 5, 5, 5, 5, 5);
var delayGap = new Array(200, 200, 200, 200, 200, 200, 190, 190, 190, 190, 160, 160, 160, 160, 160, 160, 160, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 100, 140, 150, 150, 150, 150, 150, 150, 150, 150, 140, 150, 150, 150, 150, 150, 150, 150, 150, 150, 200, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100);
var gameWaveAmount = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 10, 10, 10, 10, 10, 10, 12, 10, 10, 10, 10, 10, 10, 14, 10, 10, 10, 10, 10, 11, 10, 10, 10, 10, 10, 1, 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 12, 10, 10, 10, 10, 10, 10, 10, 16, 10, 10, 15, 10, 10, 10, 10, 10, 10, 13, 10, 10, 10, 10, 10, 13, 10, 10, 13, 10, 12, 10, 10, 10, 14, 10, 10, 10, 10, 15, 15, 10, 10, 10, 10, 10, 10);
function setupStartFrame() {
logo._x = 68;
logo._y = 18;
warning._visible = true;
Mouse.show();
mousePointer.gotoAndStop(1);
this.home.removeMovieClip();
Game = new Game2(scoreMc, startingScore, startingEnergy, this);
Game.getScores();
this.gun.removeMovieClip();
var _local2 = 0;
while (_local2 < scoreDigits) {
var _local3 = this["scoreNumber" + _local2];
_local3.removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < waveLetters.length) {
var _local3 = this["waveLetter" + _local2];
_local3.removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < 18) {
var _local4 = outsideRingMc["edgeRing" + _local2];
_local4.removeMovieClip();
_local2++;
}
this.gameover.removeMovieClip();
playGame._visible = true;
highscore._x = 320;
highscore._y = 20;
var _local5 = this.createEmptyMovieClip("pMc", 9);
var _local6 = _local5.attachMovie("title", "title", 1);
_local6._x = movieWidth / 2;
_local6._y = 110;
var _local7 = _local5.attachMovie("info", "info", 2);
_local7._x = movieWidth / 2;
_local7._y = 210;
}
function runSounds() {
if (soundFade == "out") {
soundFadeControl = soundFadeControl - 2;
sounds.fire.setVolume(soundFadeControl);
if (soundFadeControl == 0) {
soundFade = "done";
}
} else if (soundFade == "in") {
soundFadeControl = soundFadeControl + 2;
sounds.fire.setVolume(soundFadeControl);
if (soundFadeControl == 100) {
soundFade = "done";
}
}
}
function setupWaveText() {
var _local2 = 0;
while (_local2 < waveLetters.length) {
var _local4 = this.attachMovie("number", "waveLetter" + _local2, 200 + _local2);
var _local7 = movieWidth / 2;
var _local6 = movieHeight / 2;
var _local5 = 295;
var _local3 = 30 + (_local2 * 4.7);
_local4._rotation = _local3 + 270;
_local3 = (Math.PI * _local3) / 180;
_local4._x = _local7 + (Math.cos(_local3) * _local5);
_local4._y = _local6 + (Math.sin(_local3) * _local5);
_local4.number.text = waveLetters.charAt(_local2);
_local2++;
}
}
function setupScore() {
var _local3 = 0;
while (_local3 < scoreDigits) {
var _local4 = this.attachMovie("number", "scoreNumber" + _local3, 100 + _local3);
var _local7 = movieWidth / 2;
var _local6 = movieHeight / 2;
var _local5 = 295;
var _local2 = scoreAngle + (_local3 * 4.7);
_local4._rotation = _local2 + 270;
_local2 = (Math.PI * _local2) / 180;
_local4._x = _local7 + (Math.cos(_local2) * _local5);
_local4._y = _local6 + (Math.sin(_local2) * _local5);
_local3++;
}
}
function newWaveArray(enemy) {
enemyArray[currentWave].push(enemy);
}
function runWave() {
if (Game.bonusWaveOn == 0) {
if (delayTillNextWave == 0) {
if (waveArray[Game.wave].currentMonsters < waveArray[Game.wave].waveAmount) {
if (waveArray[Game.wave].currentMonsters == 0) {
enemyArray.push(new Array());
}
if (waveArray[Game.wave].waveDelayTillNextMonster == 0) {
addMonster(allMonsters);
waveArray[Game.wave].currentMonsters++;
allMonsters++;
} else if (waveArray[Game.wave].waveMonsterDelay == 0) {
waveArray[Game.wave].waveMonsterDelay = waveArray[Game.wave].waveDelayTillNextMonster;
addMonster(allMonsters);
waveArray[Game.wave].currentMonsters++;
allMonsters++;
} else {
waveArray[Game.wave].waveMonsterDelay--;
}
} else {
delayTillNextWave = delayGap[Game.wave];
}
} else {
delayTillNextWave--;
if (delayTillNextWave == 0) {
currentWave++;
Game.increaseWave();
}
}
} else {
trace("bonus wave");
Game.bonusTimeRun();
}
}
function addMonster(allm) {
var _local3 = enemyMc.attachMovie(waveArray[Game.wave].waveName, "enemy" + allm, allm);
var _local2 = new Enemy(this, waveArray[Game.wave].waveMoneyValue, _local3, 0, 0, waveArray[Game.wave].waveName, waveArray[Game.wave].waveSpeed);
newWaveArray(_local2);
return(_local2);
}
function runParticles() {
var _local1 = 0;
while (_local1 < particles.length) {
particles[_local1].delayTillDeath--;
if (particles[_local1].delayTillDeath == 0) {
particles[_local1].mC.removeMovieClip();
particles.splice(_local1, 1);
}
_local1++;
}
}
function addPowerUp(powerupName) {
var _local2 = powerUpsMc.attachMovie(powerupName, "powerup" + powerups, powerups);
powerupsArray.push(new Powerup(this, _local2, 0.02, powerupName));
powerups++;
}
function loadWave(waveName, waveSpeed, waveAmount, waveDelayTillNextMonster, waveMoneyValue, gameWaveScreenSide) {
waveArray.push(new Wave(waveName, waveSpeed, waveAmount, waveDelayTillNextMonster, waveMoneyValue, this, gameWaveScreenSide));
}
function setupMonsters() {
waveArray.splice(0);
Game.startGame = 1;
currentWave = 0;
var _local1 = 0;
while (_local1 < gameWaveAmount.length) {
loadWave(gameWaveNames[_local1], gameWaveSpeed[_local1], gameWaveAmount[_local1], gameWaveDelayTillNextMonster[_local1], gameWaveMoneyValue[_local1], gameWaveScreenSide[_local1]);
_local1++;
}
}
function clearClips(instance) {
for (var _local2 in instance) {
if (typeof(instance[_local2]) == "movieclip") {
if (instance[_local2]._x < 40) {
instance[_local2].swapDepths(99);
instance[_local2].removeMovieClip();
}
}
}
}
function pauseClips(instance) {
for (var _local2 in instance) {
if (typeof(instance[_local2]) == "movieclip") {
instance[_local2].stop();
}
}
}
function playClips(instance) {
for (var _local2 in instance) {
if (typeof(instance[_local2]) == "movieclip") {
instance[_local2].play();
}
}
}
function pauseGame2() {
Game.startGame = 0;
pauseAllClips();
pauseMc.gotoAndStop(2);
}
function playGame2() {
Game.startGame = 1;
playAllClips();
pauseMc.gotoAndStop(1);
}
function playAllClips() {
var _local2 = this.home;
_local2.e.e.play();
playClips(enemyMc);
playClips(particlesMc);
playClips(missilesMc);
playClips(explosionMc);
playClips(scoreMc);
playClips(rocksMc);
playClips(powerUpsMc);
}
function pauseAllClips() {
var _local2 = this.home;
_local2.e.e.stop();
pauseClips(enemyMc);
pauseClips(particlesMc);
pauseClips(missilesMc);
pauseClips(explosionMc);
pauseClips(scoreMc);
pauseClips(rocksMc);
pauseClips(powerUpsMc);
}
function checkForRogueClips() {
clearClips(enemyMc);
clearClips(particlesMc);
clearClips(missilesMc);
clearClips(explosionMc);
clearClips(scoreMc);
clearClips(rocksMc);
clearClips(powerUpsMc);
}
function killEverything() {
Game.numberOfRockets = 0;
var _local2 = 0;
while (_local2 < missilesArray.length) {
var _local7 = missilesArray[_local2];
_local7.mC.removeMovieClip();
_local2++;
}
shotsFired = 0;
missilesArray.splice(0);
_local2 = 0;
while (_local2 < powerupsArray.length) {
powerupsArray[_local2].mC.swapDepths(100000);
powerupsArray[_local2].mC.removeMovieClip();
var _local3 = 0;
while (_local3 < particles.length) {
particlesArray[_local3].mC.removeMovieClip();
_local3++;
}
_local2++;
}
particles.splice(0);
powerupsArray.splice(0);
_local2 = 0;
while (_local2 < deadSporesArray.length) {
var _local5 = explosionMc.attachMovie("explosion", "explosion" + scoreIndex, scoreIndex);
_local5._x = deadSporesArray[_local2]._x;
_local5._y = deadSporesArray[_local2]._y;
deadSporesArray[_local2].removeMovieClip();
scoreIndex++;
_local2++;
}
deadSporesArray.splice(0);
_local2 = 0;
while (_local2 < enemyArray.length) {
var _local1 = 0;
while (_local1 < enemyArray[_local2].length) {
var _local5 = explosionMc.attachMovie("explosion", "explosion" + scoreIndex, scoreIndex);
_local5._x = enemyArray[_local2][_local1].mC._x;
_local5._y = enemyArray[_local2][_local1].mC._y;
trace(Game.energy);
if (Game.energy > 0) {
if (Game.startGame == 1) {
if ((enemyArray[_local2][_local1].gameObjectType == "enemy1") or (enemyArray[_local2][_local1].gameObjectType == "enemy2")) {
var _local6 = "score5";
Game.increaseScore(5);
} else if (enemyArray[_local2][_local1].gameObjectType == "enemy3") {
var _local6 = "score10";
Game.increaseScore(10);
} else if (enemyArray[_local2][_local1].gameObjectType == "enemy5") {
var _local6 = "score20";
Game.increaseScore(20);
} else if (enemyArray[_local2][_local1].gameObjectType == "enemy6") {
var _local6 = "score25";
Game.increaseScore(25);
} else if (enemyArray[_local2][_local1].gameObjectType == "enemy4") {
var _local6 = "score150";
Game.increaseScore(15);
} else if (enemyArray[_local2][_local1].gameObjectType == "enemy30") {
var _local6 = "score30";
Game.increaseScore(10);
}
var _local4 = scoreMc.attachMovie(_local6, "bonusx3" + scoreIndex, scoreIndex);
_local4._x = enemyArray[_local2][_local1].mC._x;
_local4._y = enemyArray[_local2][_local1].mC._y;
scoreIndex++;
}
}
enemyArray[_local2][_local1].mC.removeMovieClip();
_local1++;
}
_local2++;
}
enemyArray.splice(0);
enemyArray.push(new Array());
currentWave = 0;
delayTillNextWave = 20;
checkForRogueClips();
}
function rotateMcPosition() {
this._x = this.centerX + (Math.cos(this.angle) * this.radius);
this._y = this.centerY + (Math.sin(this.angle) * this.radius);
this.angle = this.angle + this.speed;
}
function gunMain() {
if (Game.startGame == 1) {
dx = this._x - _xmouse;
dy = this._y - _ymouse;
angle = Math.atan2(dy, dx);
this._rotation = (angle * 180) / Math.PI;
xVel = Math.cos(angle);
yVel = Math.sin(angle);
}
}
function setupGun() {
var _local2 = this.attachMovie("gun", "gun", 0);
_local2._x = movieWidth / 2;
_local2._y = movieHeight / 2;
_local2.onEnterFrame = gunMain;
_local2.g1.gotoAndStop(2);
}
function setupPlanet() {
var _local2 = this.attachMovie("earth", "home", 8);
_local2._x = movieWidth / 2;
_local2._y = movieHeight / 2;
}
function fireGun() {
sounds.fire.start(0, 1);
var _local5 = "bullet";
var _local7 = missilesMc.attachMovie(_local5, "missile" + _global.numberOfMissiles, _global.numberOfMissiles);
var _local10 = (angle * 180) / Math.PI;
_local7._rotation = _local10 + 180;
_global.numberOfMissiles++;
missilesArray.push(new Missile2(_local7, gun._x + ((-xVel) * missileDistFromGun), gun._y + ((-yVel) * missileDistFromGun), this, _local5));
missilesArray[missilesArray.length - 1].xVel = (-xVel) * 10;
missilesArray[missilesArray.length - 1].yVel = (-yVel) * 10;
var _local4 = 0;
while (_local4 < Game.powerUpsUsing.length) {
if (Game.powerUpsUsing[_local4] == 2) {
_local7 = missilesMc.attachMovie(_local5, "missile" + _global.numberOfMissiles, _global.numberOfMissiles);
var _local6 = int((angle * 180) / Math.PI);
_local6 = _local6 + 180;
var _local3 = (Math.PI * _local6) / 180;
_local7._rotation = _local6 + 180;
_global.numberOfMissiles++;
var _local8 = Math.cos(_local3);
var _local9 = Math.sin(_local3);
missilesArray.push(new Missile2(_local7, gun._x + (xVel * missileDistFromGun), gun._y + (yVel * missileDistFromGun), this, _local5));
missilesArray[missilesArray.length - 1].xVel = (-_local8) * 10;
missilesArray[missilesArray.length - 1].yVel = (-_local9) * 10;
} else if (Game.powerUpsUsing[_local4] == 3) {
_local7 = missilesMc.attachMovie(_local5, "missile" + _global.numberOfMissiles, _global.numberOfMissiles);
var _local6 = int((angle * 180) / Math.PI);
_local6 = _local6 + 120;
var _local3 = (Math.PI * _local6) / 180;
_local7._rotation = _local6 + 180;
_global.numberOfMissiles++;
var _local8 = Math.cos(_local3);
var _local9 = Math.sin(_local3);
missilesArray.push(new Missile2(_local7, gun._x - (_local8 * missileDistFromGun), gun._y - (_local9 * missileDistFromGun), this, _local5));
missilesArray[missilesArray.length - 1].xVel = (-_local8) * 10;
missilesArray[missilesArray.length - 1].yVel = (-_local9) * 10;
_local7 = missilesMc.attachMovie(_local5, "missile" + _global.numberOfMissiles, _global.numberOfMissiles);
_local6 = int((angle * 180) / Math.PI);
_local6 = _local6 + 240;
_local3 = (Math.PI * _local6) / 180;
_local7._rotation = _local6 + 180;
_global.numberOfMissiles++;
_local8 = Math.cos(_local3);
_local9 = Math.sin(_local3);
missilesArray.push(new Missile2(_local7, gun._x - (_local8 * missileDistFromGun), gun._y - (_local9 * missileDistFromGun), this, _local5));
missilesArray[missilesArray.length - 1].xVel = (-_local8) * 10;
missilesArray[missilesArray.length - 1].yVel = (-_local9) * 10;
} else if (Game.powerUpsUsing[_local4] == 4) {
if (Game.bonusTimeDelay == 0) {
if (Game.numberOfRockets < 10) {
Game.numberOfRockets++;
_local7 = missilesMc.attachMovie("missile", "rocket" + _global.numberOfMissiles, _global.numberOfMissiles);
_local10 = (angle * 180) / Math.PI;
_local7._rotation = _local10 + 180;
_global.numberOfMissiles++;
missilesArray.push(new Rocket(_local7, gun._x + ((-xVel) * missileDistFromGun), gun._y + ((-yVel) * missileDistFromGun), this));
missilesArray[missilesArray.length - 1].xVel = (-xVel) * 10;
missilesArray[missilesArray.length - 1].yVel = (-yVel) * 10;
missilesArray[missilesArray.length - 1].getTarget();
missilesArray[missilesArray.length - 1].getDirectionVector();
}
}
}
_local4++;
}
}
function setupGame() {
logo._x = 68;
logo._y = 580;
warning._visible = false;
Mouse.hide();
mousePointer.gotoAndStop(2);
delayTillNextWave = 0;
nextRing = 0;
delayTillNextRing = 1;
this.pMc.removeMovieClip();
playGame._visible = false;
highscore._x = 85;
highscore._y = 20;
highscore.highscore._x = -50;
highscore.highscore._y = 20;
highscore.highscoreName._x = -80;
setupRings = 1;
setupPlanet();
sounds.Appear.start(0, 1);
}
var startingScore = 0;
var startingEnergy = 100;
var scoreMc = this.createEmptyMovieClip("score", 6);
scoreMc._x = 0;
scoreMc._y = 0;
var outsideRingMc = this.createEmptyMovieClip("outsideRing", 7);
var outsideRingMc2 = this.createEmptyMovieClip("outsideRing2", 17);
outsideRingMc._x = 0;
outsideRingMc._y = 0;
var ringAngle = 0;
var scoreDigits = 7;
var scoreAngle = 120;
var waveLetters = "000 evaw";
var mousePointer = this.attachMovie("crosshair", "crosshair", 50);
mousePointer.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
};
var nextRing = 0;
var delayTillNextRing = 1;
var setupRings = 0;
setupStartFrame();
var Game;
var soundControl = 1;
var soundFade;
var soundFadeControl = 100;
soundMc.soundBtn.onRelease = function () {
if (soundControl == 0) {
soundControl = 1;
soundFade = "in";
soundMc.soundControlMc.gotoAndStop(1);
} else {
soundControl = 0;
soundFade = "out";
soundMc.soundControlMc.gotoAndStop(2);
}
};
var qualityControl = 0;
qualityMc.Btn.onRelease = function () {
if (qualityControl == 0) {
qualityControl = 1;
_quality = "LOW";
qualityMc.Mc.gotoAndStop(2);
} else {
qualityControl = 0;
_quality = "HIGH";
qualityMc.Mc.gotoAndStop(1);
}
};
var missilesArray = new Array();
var enemyArray = new Array();
var enemyMc = this.createEmptyMovieClip("enemy", 13);
var missilesMc = this.createEmptyMovieClip("missiles", 3);
var rocksMc = this.createEmptyMovieClip("rocks", 4);
var powerUpsMc = this.createEmptyMovieClip("powerUpsMc", 15);
var particlesMc = this.createEmptyMovieClip("particlesMc", 5);
var explosionMc = this.createEmptyMovieClip("explosionMc", 11);
var scoreMc = this.createEmptyMovieClip("scoreMc", 14);
var rocksArray = new Array();
var rocksNumber = 0;
_global.numberOfMissiles = 0;
var powerupsArray = new Array();
var delayTillNextWave = 0;
var waveArray = new Array();
var deadSporesArray = new Array();
var allMonsters = 0;
var enemyWaveArray = new Array();
var powerups = 0;
var numberOfParticles = 0;
var particles = new Array();
var powerUpsUsedArray = new Array();
var scoreIndex = 2000;
var numberOfWaves = 1;
var currentWave = 0;
var pauseMc = this.attachMovie("pause", "pausemc", 99999);
pauseMc._x = 320;
pauseMc._y = 300;
keyboard = new Object();
keyboard.onKeyDown = function () {
if (Key.isDown(32)) {
if (Game.gamePaused == 0) {
if (Game.startGame == 1) {
pauseGame2();
Game.gamePaused = 1;
}
} else {
playGame2();
Game.gamePaused = 0;
}
}
};
Key.addListener(keyboard);
monster.angle = 0;
monster.centerX = movieWidth / 2;
monster.centerY = movieHeight / 2;
monster.radius = 255;
monster.speed = 0.01;
monster2.angle = 0;
monster2.centerX = 0;
monster2.centerY = 0;
monster2.radius = monster._width + 10;
monster2.speed = 0.1;
monster2._xscale = 50;
monster2._yscale = monster2._xscale;
var fireDelay = 2;
this.onEnterFrame = function () {
if (Game.gamePaused == 0) {
if (Game.startGame == 1) {
fpsSpeedometer.cur.text = Game.currentPossiblePowerUpOld;
fpsSpeedometer.arr.text = Game.currentPossiblePowerUp;
runWave();
runSounds();
var _local2 = 0;
while (_local2 < missilesArray.length) {
missilesArray[_local2].missileControl(_local2);
_local2++;
}
_local2 = 0;
while (_local2 < enemyArray.length) {
var _local1 = 0;
while (_local1 < enemyArray[_local2].length) {
enemyArray[_local2][_local1].main(_local2, _local1);
_local1++;
}
_local2++;
}
_local2 = 0;
while (_local2 < powerupsArray.length) {
powerupsArray[_local2].main(_local2);
_local2++;
}
runParticles();
_local2 = 0;
while (_local2 < Game.powerUpsUsing.length) {
if (Game.powerUpsUsing[_local2] == 5) {
if (mouseButton == 1) {
fireDelay--;
if (fireDelay == 0) {
fireDelay = 4;
fireGun();
}
}
}
_local2++;
}
trace("enemy array length");
trace(enemyArray.length);
} else if (setupRings == 1) {
delayTillNextRing--;
if (delayTillNextRing == 0) {
delayTillNextRing = 2;
var _local2 = nextRing;
if (Game.bonusTimeDelay != 0) {
var _local4 = outsideRingMc2.attachMovie("edgeRing", "edgeRing" + _local2, 100 + _local2);
} else {
var _local4 = outsideRingMc.attachMovie("edgeRing", "edgeRing" + _local2, 100 + _local2);
}
var _local9 = movieWidth / 2;
var _local8 = movieHeight / 2;
var _local5 = 280;
var _local3 = ringAngle + (_local2 * 20);
_local4._rotation = _local3 + 270;
_local3 = (Math.PI * _local3) / 180;
_local4._x = _local9 + (Math.cos(_local3) * _local5);
_local4._y = _local8 + (Math.sin(_local3) * _local5);
_local4.seg.gotoAndStop(18);
if ((nextRing > 0) and (nextRing < 9)) {
_local2 = nextRing;
var _local7 = "edgeRing" + _local2;
var _local6 = outsideRingMc[_local7];
_local6.seg.gotoAndStop(10 - _local2);
}
if ((nextRing > 11) and (nextRing < 16)) {
var _local7 = "edgeRing" + _local2;
var _local6 = outsideRingMc[_local7];
_local6.gotoAndStop(_local2 - 10);
}
nextRing++;
if (nextRing == 18) {
setupRings = 0;
setupOutSideRing();
setupGun();
setupScore();
setupWaveText();
setupMonsters();
} else if (nextRing == 36) {
setupRings = 0;
nextRing = 18;
}
}
}
}
};
var dx = 0;
var dy = 0;
var angle = 0;
var xVel = 0;
var yVel = 0;
var mouseButton = 1;
this.onMouseUp = function () {
mouseButton = 0;
};
var shotsFired = 0;
var shotsLimit = 2;
this.onMouseDown = function () {
if (Game.startGame == 1) {
mouseButton = 1;
if (shotsFired < shotsLimit) {
shotsFired++;
fireGun();
}
}
};
Symbol 22 MovieClip [rocketmove] Frame 11
removeMovieClip("");
stop();
Symbol 25 MovieClip [BonusTimeClock] Frame 1
var timer = 60;
var timeDelay = 1;
this.onEnterFrame = function () {
if (_parent.Game.gamePaused == 0) {
txt.text = timer + " seconds";
timeDelay--;
if (timeDelay == 0) {
timeDelay = 9;
timer--;
if (timer == 0) {
_parent.Game.bonusTimeDelay = -1;
_parent.bonusTimeClock.removeMovieClip();
}
}
}
};
Symbol 32 MovieClip [particle] Frame 22
this.removeMovieClip();
Symbol 35 MovieClip [towerExplodeAnim] Frame 30
removeMovieClip("");
stop();
Symbol 36 MovieClip [explosion] Frame 1
var z = 0;
var Count = 0;
var particles = this.createEmptyMovieClip("particles", 0);
var mC = "";
var rot = 0;
var newMc;
particles.onEnterFrame = function () {
while (z < 20) {
Count++;
mC = "s" + Count;
rot = Number(random(360)) + 1;
newMc = attachMovie("towerExplodeAnim", mC, Count);
newMC._xscale = 20 + Number(Count * 0.5);
newMc._rotation = rot;
z++;
}
z = 0;
if (Count > 20) {
removeMovieClip(this);
}
};
Symbol 37 MovieClip [explosionEnemy] Frame 1
var z = 0;
var Count = 0;
var particles = this.createEmptyMovieClip("particles", 0);
var mC = "";
var rot = 0;
var newMc;
particles.onEnterFrame = function () {
while (z < 6) {
Count++;
mC = "s" + Count;
rot = Number(random(360)) + 1;
newMc = attachMovie("rocket", mC, Count);
newMC._xscale = 20 + Number(Count * 0.5);
newMc._rotation = rot;
z++;
}
z = 0;
if (Count > 20) {
removeMovieClip(this);
}
};
Symbol 42 MovieClip Frame 1
stop();
Symbol 49 MovieClip [ring1] Frame 1
stop();
Symbol 52 MovieClip [ring2] Frame 1
stop();
Symbol 56 MovieClip [ring3] Frame 1
stop();
Symbol 59 MovieClip [ring4] Frame 1
stop();
Symbol 73 MovieClip [M_stars1] Frame 15
this.removeMovieClip();
Symbol 74 MovieClip [starAnim] Frame 1
i = 1;
heart.onEnterFrame = function () {
if (_currentframe != 13) {
myMovie = heart.duplicateMovieClip("heart" + i, i);
myMovie._rotation = Math.random() * 360;
myMovie._xscale = scale;
myMovie._yscale = scale;
scale = (Math.random() * 80) + 20;
i++;
}
};
Symbol 74 MovieClip [starAnim] Frame 24
this.removeMovieClip();
stop();
Symbol 76 MovieClip [score10] Frame 25
this.removeMovieClip();
Symbol 79 MovieClip [score5] Frame 25
this.removeMovieClip();
Symbol 100 MovieClip Frame 1
stop();
Symbol 109 MovieClip [segmentSelected] Frame 1
stop();
Symbol 112 MovieClip [weapon2] Frame 1
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 129 MovieClip [edgeRing] Frame 1
stop();
powerupBtn.onRelease = function () {
if (frame._currentframe == 2) {
_parent._parent.Game.addPowerUp(this._parent);
}
};
powerupBtn.onRollOver = function () {
if (frame._currentframe == 2) {
segHighlight.gotoAndStop(2);
}
};
powerupBtn.onRollOut = function () {
segHighlight.gotoAndStop(1);
};
Symbol 130 MovieClip [gameover] Frame 1
function rotateMcPosition() {
this._rotation = this.angle + 270;
this.scA = (Math.PI * this.angle) / 180;
this._x = this.centerX + (Math.cos(this.scA) * this.radius);
this._y = this.centerY + (Math.sin(this.scA) * this.radius);
this.angle = this.angle + speed;
}
_root.killEverything();
var words = this.createEmptyMovieClip("words", 1);
var submitScore = this.attachMovie("submitBoxes", "submit", 2);
submitScore._x = 180;
submitScore._y = 160;
words._xscale = 10;
words._yscale = words._xscale;
var gameOver = "game over!";
var speed = 0;
var i = 0;
while (i < gameOver.length) {
var letter = words.attachMovie("letter", "letter" + i, 100 + i);
letter.angle = i * 20;
letter.centerX = 0;
letter.centerY = 0;
letter.radius = 60;
speed = 2;
letter.number.text = gameOver.charAt(gameOver.length - (i + 1));
letter.onEnterFrame = rotateMcPosition;
i++;
}
var delay = 1000;
words.onEnterFrame = function () {
delay--;
if (delay == 0) {
_parent.Game.gameOver();
}
if (this._xscale < 200) {
this._xscale = this._xscale + 4;
this._yscale = this._xscale;
}
};
Symbol 135 MovieClip [bonusMc] Frame 1
stop();
Symbol 135 MovieClip [bonusMc] Frame 10
stop();
Symbol 136 MovieClip [bonusTime] Frame 1
function setupWords2() {
var _local2 = 0;
while (_local2 < wordsT2.length) {
var _local1 = words2.attachMovie("letter", "letter" + (120 + _local2), 120 + _local2);
_local1.angle = _local2 * 14;
_local1.centerX = 0;
_local1.centerY = 0;
_local1.radius = 80;
speed = 3;
_local1.number.text = wordsT2.charAt(wordsT2.length - (_local2 + 1));
_local1._xscale = 80;
_local1._yscale = _local1._xscale;
_local1.onEnterFrame = rotateMcPosition2;
_local2++;
}
}
function words2Main() {
overallDelay2++;
if (this._xscale < 200) {
this._xscale = this._xscale + 4;
this._yscale = this._xscale;
}
if (overallDelay2 == 108) {
words2Stop = 1;
} else if (overallDelay2 > 140) {
if (this._alpha > 0) {
this._alpha = this._alpha - 2;
} else {
var _local4 = _parent.attachMovie("BonusTimeClock", "bonusTimeClock", 11001);
_local4._x = 320;
_local4._y = 110;
var _local3 = 1;
while (_local3 < _parent.Game.bossNumber) {
_local4 = _parent.enemyMc.attachMovie("boss1", "boss" + _local3, _local3);
var _local5 = new Enemy(_parent, _parent.Game.bossNumber * 100, _local4, 0, 0, "boss1", 0.02);
_parent.newWaveArray(_local5);
_parent.allMonsters++;
_local3++;
}
_parent.Game.bonusWaveOn = 1;
_parent.Game.startGame = 1;
_parent.bonusTime.removeMovieClip();
}
}
}
function rotateMcPosition1() {
if (words1Stop == 0) {
this._rotation = this.angle + 270;
this.scA = (Math.PI * this.angle) / 180;
this._x = this.centerX + (Math.cos(this.scA) * this.radius);
this._y = this.centerY + (Math.sin(this.scA) * this.radius);
this.angle = this.angle + speed;
}
}
function rotateMcPosition2() {
if (words2Stop == 0) {
this._rotation = this.angle + 270;
this.scA = (Math.PI * this.angle) / 180;
this._x = this.centerX + (Math.cos(this.scA) * this.radius);
this._y = this.centerY + (Math.sin(this.scA) * this.radius);
this.angle = this.angle + speed;
}
}
_parent.killEverything();
var words = this.createEmptyMovieClip("words", 1);
var words2 = this.createEmptyMovieClip("words2", 2);
words._xscale = 10;
words._yscale = words._xscale;
words2._xscale = 10;
words2._yscale = words2._xscale;
var wordsT1 = "Boss time!";
var wordsT2 = "Survive 60 seconds!";
var speed = 0;
var i = 0;
while (i < wordsT1.length) {
var letter = words.attachMovie("letter", "letter" + i, 100 + i);
letter.angle = 90;
letter.angle = letter.angle + (i * 20);
letter.centerX = 0;
letter.centerY = 0;
letter.radius = 60;
speed = 3;
letter.number.text = wordsT1.charAt(wordsT1.length - (i + 1));
letter.onEnterFrame = rotateMcPosition1;
i++;
}
var delay = 10;
var overallDelay = 0;
var words1Stop = 0;
var words2Stop = 0;
words.onEnterFrame = function () {
overallDelay++;
if (this._xscale < 200) {
this._xscale = this._xscale + 4;
this._yscale = this._xscale;
}
if (overallDelay == 50) {
bonusTxt.play();
bonusTxt.txt.bonus.text = "Shoot bullets to\nget bonus points!";
} else if (overallDelay == 90) {
words1Stop = 1;
} else if (overallDelay == 130) {
setupWords2();
words2.onEnterFrame = words2Main;
} else if (overallDelay > 100) {
if (this._alpha > 0) {
this._alpha = this._alpha - 2;
}
}
};
var overallDelay2 = 0;
Symbol 137 MovieClip [BonusTimeFin] Frame 1
function setupWords2() {
var _local2 = 0;
while (_local2 < wordsT2.length) {
var _local1 = words2.attachMovie("letter", "letter" + (120 + _local2), 120 + _local2);
_local1.angle = _local2 * 14;
_local1.centerX = 0;
_local1.centerY = 0;
_local1.radius = 80;
speed = 3;
_local1.number.text = wordsT2.charAt(wordsT2.length - (_local2 + 1));
_local1._xscale = 80;
_local1._yscale = _local1._xscale;
_local1.onEnterFrame = rotateMcPosition2;
_local2++;
}
}
function setupWords3() {
var _local2 = 0;
while (_local2 < wordsT3.length) {
var _local1 = words3.attachMovie("letter", "letter" + (120 + _local2), 120 + _local2);
_local1.angle = 120 + (_local2 * 14);
_local1.centerX = 0;
_local1.centerY = 0;
_local1.radius = 80;
speed = 3;
_local1.number.text = wordsT3.charAt(wordsT3.length - (_local2 + 1));
_local1._xscale = 80;
_local1._yscale = _local1._xscale;
_local1.onEnterFrame = rotateMcPosition3;
_local2++;
}
}
function words2Main() {
overallDelay2 = overallDelay2 + 0.5;
if (this._xscale < 200) {
this._xscale = this._xscale + 8;
this._yscale = this._xscale;
}
if (overallDelay2 == 59) {
words2Stop = 1;
} else if (overallDelay2 == 65) {
bonusTxt.play();
} else if ((overallDelay2 > 70) and (overallDelay2 < 100)) {
sporesBonus++;
if (_parent.Game.bonusBulletsHit == 0) {
bonusTxt.txt.bonus.text = "No bullets destroyed!";
} else if (sporesBonus < _parent.Game.bonusBulletsHit) {
_parent.Game.increaseScore(50);
bonusTxt.txt.bonus.text = (((sporesBonus + " bullets destroyed!\n=") + " ") + (sporesBonus * 50)) + " points!";
}
} else if (overallDelay2 > 101) {
if (this._alpha > 0) {
this._alpha = this._alpha - 2;
bonusTxt._alpha = bonusTxt._alpha - 2;
} else {
setupWords3();
words3.onEnterFrame = words3Main;
this.removeMovieClip();
}
}
}
function words3Main() {
overallDelay3++;
if (this._xscale < 200) {
this._xscale = this._xscale + 4;
this._yscale = this._xscale;
}
if (overallDelay3 == 90) {
words3Stop = 1;
} else if (overallDelay3 > 95) {
if (this._alpha > 0) {
this._alpha--;
} else {
_parent.Game.bonusWaveOn = 0;
_parent.Game.startGame = 1;
_parent.Game.bonusTime = 0;
_parent.Game.bonusTimeDelay = 0;
_parent.currentWave = 0;
_parent.Game.increaseWave();
_parent.delayTillNextWave = 0;
_parent.sounds.Appear.start(0, 1);
_parent.bonusTime.removeMovieClip();
}
}
}
function rotateMcPosition1() {
if (words1Stop == 0) {
this._rotation = this.angle + 270;
this.scA = (Math.PI * this.angle) / 180;
this._x = this.centerX + (Math.cos(this.scA) * this.radius);
this._y = this.centerY + (Math.sin(this.scA) * this.radius);
this.angle = this.angle + speed;
}
}
function rotateMcPosition2() {
if (words2Stop == 0) {
this._rotation = this.angle + 270;
this.scA = (Math.PI * this.angle) / 180;
this._x = this.centerX + (Math.cos(this.scA) * this.radius);
this._y = this.centerY + (Math.sin(this.scA) * this.radius);
this.angle = this.angle + speed;
}
}
function rotateMcPosition3() {
if (words3Stop == 0) {
this._rotation = this.angle + 270;
this.scA = (Math.PI * this.angle) / 180;
this._x = this.centerX + (Math.cos(this.scA) * this.radius);
this._y = this.centerY + (Math.sin(this.scA) * this.radius);
this.angle = this.angle + speed;
}
}
_parent.killEverything();
var words = this.createEmptyMovieClip("words", 1);
var words2 = this.createEmptyMovieClip("words2", 2);
words._xscale = 10;
words._yscale = words._xscale;
words2._xscale = 10;
words2._yscale = words2._xscale;
var words3 = this.createEmptyMovieClip("words3", 3);
words3._xscale = 10;
words3._yscale = words._xscale;
var wordsT1 = "good shooting!";
var wordsT2 = "Your bonus is..";
var wordsT3 = "Get Ready!";
var speed = 0;
var i = 0;
while (i < wordsT1.length) {
var letter = words.attachMovie("letter", "letter" + i, 100 + i);
letter.angle = 90;
letter.angle = letter.angle + (i * 20);
letter.centerX = 0;
letter.centerY = 0;
letter.radius = 60;
speed = 3;
letter.number.text = wordsT1.charAt(wordsT1.length - (i + 1));
letter.onEnterFrame = rotateMcPosition1;
i++;
}
var delay = 10;
var overallDelay = 0;
var words1Stop = 0;
var words2Stop = 0;
var words3Stop = 0;
words.onEnterFrame = function () {
overallDelay++;
if (this._xscale < 200) {
this._xscale = this._xscale + 4;
this._yscale = this._xscale;
}
if (overallDelay == 77) {
words1Stop = 1;
} else if (overallDelay > 100) {
if (this._alpha > 0) {
this._alpha = this._alpha - 2;
} else {
setupWords2();
words2.onEnterFrame = words2Main;
this.removeMovieClip();
}
}
};
var overallDelay2 = 0;
var sporesBonus = 0;
var overallDelay3 = 0;
Symbol 139 MovieClip [segHighLight] Frame 1
stop();
Symbol 142 MovieClip [particle2] Frame 17
this.removeMovieClip();
Symbol 148 MovieClip [enemy4] Frame 1
stop();
Symbol 156 MovieClip [powerup] Frame 1
stop();
Symbol 162 MovieClip [extraLife] Frame 1
stop();
Symbol 164 MovieClip [smartBomb] Frame 1
stop();
Symbol 184 MovieClip [explosion2] Frame 1
var z = 0;
var Count = 0;
var particles = this.createEmptyMovieClip("particles", 0);
var mC = "";
var rot = 0;
var newMc;
particles.onEnterFrame = function () {
while (z < 35) {
Count++;
mC = "s" + Count;
rot = Number(random(360)) + 1;
newMc = attachMovie("towerExplodeAnim", mC, Count);
newMC._xscale = 20 + Number(Count * 0.5);
newMc._rotation = rot;
z++;
}
z = 0;
if (Count > 30) {
removeMovieClip(this);
}
};
Symbol 192 MovieClip [gameComplete] Frame 1
score.text = _parent.Game.score;
Symbol 192 MovieClip [gameComplete] Frame 292
_parent.Game.gameOver();
this.removeMovieClip();
Symbol 195 MovieClip [sporeExplosion] Frame 1
this.onEnterFrame = function () {
var _local8 = 0;
var _local2 = 0;
while (_local2 < root.deadSporesArray.length) {
if (this.ex.hitTest(root.deadSporesArray[_local2])) {
var _local6 = root.explosionMc.attachMovie("sporeExplosion", "sporeexplosion" + root.scoreIndex, root.scoreIndex);
_local6._x = root.deadSporesArray[_local2]._x;
_local6._y = root.deadSporesArray[_local2]._y;
_local6.root = root;
_local6.explosionIndex = this.explosionIndex + 5;
root.scoreIndex++;
if (_local6.explosionIndex == 50) {
root.Game.increaseEnergy();
var _local7 = "scoreExtraEnergyAnim";
} else {
var _local7 = "score" + _local6.explosionIndex;
}
var _local5 = root.scoreMc.attachMovie(_local7, "bonusx3" + root.scoreIndex, root.scoreIndex);
trace(this.explosionIndex);
root.Game.increaseScore(this.explosionIndex);
_local5._x = root.deadSporesArray[_local2]._x;
_local5._y = root.deadSporesArray[_local2]._y;
root.scoreIndex++;
root.sounds.Artillery.start(0, 1);
root.deadSporesArray[_local2].removeMovieClip();
root.deadSporesArray.splice(_local2, 1);
}
_local2++;
}
_local2 = 0;
while (_local2 < root.enemyArray.length) {
var _local3 = 0;
while (_local3 < root.enemyArray[_local2].length) {
if (this.ex.hitTest(root.enemyArray[_local2][_local3].mC)) {
_local8 = 1;
root.sounds.ExplosionShip.start(0, 1);
if (root.enemyArray[_local2][_local3].gameObjectType == "enemy7") {
root.enemyArray[_local2][_local3].hits++;
if (root.enemyArray[_local2][_local3].hits == 3) {
var _local6 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local6._x = root.enemyArray[_local2][_local3].mC._x;
_local6._y = root.enemyArray[_local2][_local3].mC._y;
var _local7 = "score" + root.enemyArray[_local2][_local3].myScore;
var _local5 = root.scoreMc.attachMovie(_local7, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(root.enemyArray[_local2][_local3].myScore);
_local5._x = root.enemyArray[_local2][_local3].mC._x;
_local5._y = root.enemyArray[_local2][_local3].mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].remove();
}
} else {
var _local4 = 0;
while (_local4 < root.enemyArray[_local2].length) {
if (root.enemyArray[_local2][_local4] != root.enemyArray[_local2][_local3]) {
if (root.enemyArray[_local2][_local4].gameObjectType != "enemyBullet") {
root.enemyArray[_local2][_local4].DownRing();
}
}
_local4++;
}
var _local6 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local6._x = root.enemyArray[_local2][_local3].mC._x;
_local6._y = root.enemyArray[_local2][_local3].mC._y;
var _local7 = "score" + root.enemyArray[_local2][_local3].myScore;
var _local5 = root.scoreMc.attachMovie(_local7, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(root.enemyArray[_local2][_local3].myScore);
_local5._x = root.enemyArray[_local2][_local3].mC._x;
_local5._y = root.enemyArray[_local2][_local3].mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].remove(_local2, _local3);
}
}
_local3++;
}
_local2++;
}
};
var z = 0;
var Count = 0;
var particles = this.createEmptyMovieClip("particles", 0);
var mC = "";
var rot = 0;
var newMc;
particles.onEnterFrame = function () {
while (z < 6) {
Count++;
mC = "s" + Count;
rot = Number(random(360)) + 1;
newMc = attachMovie("rocketmove", mC, Count);
newMC._xscale = 20 + Number(Count * 0.5);
newMc._rotation = rot;
z++;
}
z = 0;
if (Count > 20) {
removeMovieClip(this);
}
};
Symbol 195 MovieClip [sporeExplosion] Frame 30
this.removeMovieClip();
Symbol 198 MovieClip [score15] Frame 25
this.removeMovieClip();
Symbol 201 MovieClip [score20] Frame 25
this.removeMovieClip();
Symbol 204 MovieClip [score25] Frame 25
this.removeMovieClip();
Symbol 207 MovieClip [score30] Frame 25
this.removeMovieClip();
Symbol 210 MovieClip [score35] Frame 25
this.removeMovieClip();
Symbol 213 MovieClip [score40] Frame 25
this.removeMovieClip();
Symbol 216 MovieClip [score45] Frame 25
this.removeMovieClip();
Symbol 219 MovieClip [score50] Frame 25
this.removeMovieClip();
Symbol 220 MovieClip [boss1] Frame 1
stop();
Symbol 223 MovieClip [scoreExtraEnergyAnim] Frame 39
this.removeMovieClip();
Symbol 224 MovieClip [crosshair] Frame 1
stop();
Symbol 243 MovieClip Frame 25
stop();
Symbol 244 MovieClip [earth] Frame 1
stop();
Symbol 244 MovieClip [earth] Frame 8
gotoAndStop (1);
Symbol 244 MovieClip [earth] Frame 46
stop();
Symbol 246 MovieClip [particle3] Frame 10
this.removeMovieClip();
Symbol 249 MovieClip [pause] Frame 1
stop();
Symbol 257 MovieClip [submitBoxes] Frame 1
stop();
Mouse.show();
_root.mousePointer.gotoAndStop(1);
score = _root.Game.score;
score_commafy = _root.commafy(score);
score_input._visible = true;
_root.score_table._visible = false;
var table = (new _root.TextScoreTable(_root.score_table));
var mc = this;
var callback = function (name) {
mc.score_input._visible = false;
mc.score_table._visible = true;
MochiAd.sendHighScore({id:"f3f905528cbad789", name:name, score:mc.score}, table, "gotScores");
_parent.delay = 50;
};
var input = (new _root.ScoreInput(score_input, "Your Name", callback));
Symbol 260 MovieClip [soundControlMc] Frame 1
stop();
Symbol 299 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 2
stop();
Symbol 299 MovieClip Frame 3
stop();
stop();
Symbol 299 MovieClip Frame 4
_parent._parent._parent.drumssound.start(0, 99);
stop();
Symbol 299 MovieClip Frame 5
stop();
Symbol 299 MovieClip Frame 6
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 2
_parent.sb.play();
Symbol 302 MovieClip Frame 1
stop();
Symbol 356 MovieClip Frame 49
stop();
Symbol 360 MovieClip Frame 239
_parent.gotoAndPlay(2);
Symbol 387 MovieClip [__Packages.Enemy] Frame 0
class Enemy
{
var root, currentRing, arrayIndex, hits, ringRadius, mC, myScore, homing, ringDrop, movingCloser, delayToFire, bossShotDelay;
function Enemy (rt, score, clip, xStart, yStart, enemyN, sp) {
root = rt;
currentRing = 1;
arrayIndex = 0;
hits = 0;
ringRadius = 255;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
delayToFireMissile = 1;
angle = 0.2;
degrees = 0;
radius = 255;
centerX = root.movieWidth / 2;
centerY = root.movieHeight / 2;
speed = sp;
if (sp < 0) {
angle = (Math.PI*2);
}
mC = clip;
numberOfMissiles = 0;
energyStart = 100;
energy = energyStart;
myScore = score;
gameObjectType = enemyN;
homing = 0;
ringDrop = 20;
movingCloser = 0;
delayToFire = 50;
if ((enemyN == "enemy3") or (enemyN == "enemy4")) {
degrees = root.RandomNumber(1, 259);
angle = (Math.PI * degrees) / 180;
updateRotation();
xOrigin = mC._x;
yOrigin = mC._y;
}
if (enemyN == "boss1") {
radius = 225;
degrees = root.RandomNumber(1, 259);
angle = (Math.PI * degrees) / 180;
updateRotation();
xOrigin = mC._x;
yOrigin = mC._y;
bossShotDelay = root.RandomNumber(40, 50);
}
}
function UpRing() {
movingCloser = 1;
ringRadius = ringRadius + ringDrop;
}
function DownRing() {
movingCloser = 1;
ringRadius = ringRadius - ringDrop;
}
function main(index1, index2) {
trace(angle);
if (gameObjectType == "boss1") {
if (delayToFire == 0) {
if (speed > 0) {
speed = -0.03;
} else {
speed = 0.03;
}
delayToFire = bossShotDelay;
root.sounds.ArcadeEnemyShot.start(0, 1);
var _local4 = root.enemyMc.attachMovie("enemyBullet", "enemyBullet" + root.allMonsters, root.allMonsters);
var _local2 = new Enemy(root, 5, _local4, 0, 0, "enemyBullet", 5);
root.newWaveArray(_local2);
root.waveArray[root.Game.wave].currentMonsters++;
root.allMonsters++;
_local2.degrees = degrees;
_local2.radius = radius;
_local2.angle = (Math.PI * _local2.degrees) / 180;
_local2.updateRotation();
_local2.xOrigin = mC._x;
_local2.yOrigin = mC._y;
} else {
delayToFire--;
}
angle = angle + (speed * 2);
updateRotation();
} else if (gameObjectType == "enemy4") {
var _local8 = 320 - mC._x;
var _local6 = 300 - mC._y;
var _local3 = Math.atan2(_local6, _local8);
mC._rotation = (_local3 * 180) / Math.PI;
xVel = xVel + Math.cos(_local3);
if (xVel > 2) {
xVel = 2;
}
if (xVel < -1) {
xVel = -1;
}
yVel = yVel + Math.sin(_local3);
if (yVel > 1) {
yVel = 1;
}
if (yVel < -1) {
yVel = -1;
}
xPos = xPos + (xVel * speed);
yPos = yPos + (yVel * speed);
updatePosition();
} else if (gameObjectType == "enemy5") {
radius = radius - 0.5;
angle = angle + (speed * 2);
updateRotation();
var _local4 = root.particlesMc.attachMovie("particle3", "particle" + root.numberOfParticles, 10000 + root.numberOfParticles);
_local4._x = mC._x - (xVel * 2);
_local4._y = mC._y - (yVel * 2);
_local4._rotation = int((angle * 180) / Math.PI);
root.particles.push(new Particle(20, _local4));
root.numberOfParticles++;
} else if (gameObjectType == "enemy6") {
if (delayToFire == 0) {
delayToFire = root.RandomNumber(50, 100);
root.sounds.ArcadeEnemyShot.start(0, 1);
var _local4 = root.enemyMc.attachMovie("enemyBullet", "enemyBullet" + root.allMonsters, root.allMonsters);
var _local2 = new Enemy(root, 5, _local4, 0, 0, "enemyBullet", 2);
root.newWaveArray(_local2);
root.waveArray[root.Game.wave].currentMonsters++;
root.allMonsters++;
_local2.degrees = degrees;
_local2.radius = radius;
_local2.angle = (Math.PI * _local2.degrees) / 180;
_local2.updateRotation();
_local2.xOrigin = mC._x;
_local2.yOrigin = mC._y;
} else {
delayToFire--;
}
angle = angle + (speed * 2);
updateRotation();
} else if (gameObjectType == "enemyBullet") {
radius = radius - speed;
mC._rotation = int((angle * 180) / Math.PI);
updateRotation();
} else if (movingCloser == 1) {
if (radius > ringRadius) {
radius = radius - (2 * currentRing);
updateRotation();
} else {
movingCloser = 0;
currentRing = currentRing + 0.3;
if (currentRing == 10) {
trace("stop");
}
}
} else {
var _local9 = degrees;
updateRotation();
trace(speed);
trace(currentRing);
trace(angle);
angle = angle + (speed * currentRing);
trace(angle);
if (angle > 0) {
if (degrees > 360) {
var _local7 = degrees - 360;
angle = (Math.PI * _local7) / 180;
DownRing();
}
} else if (degrees < 0) {
var _local7 = degrees + 360;
angle = (Math.PI * _local7) / 180;
DownRing();
}
mC._rotation = degrees;
}
degrees = int((angle * 180) / Math.PI);
var _local5 = root.getDistance(mC, root.home);
if (_local5 < 20) {
root.Game.decreaseEnergy(1);
remove(index1, index2);
}
trace(angle);
}
function remove(i, i3) {
mC.removeMovieClip();
root.enemyArray[i].splice(i3, 1);
}
function updateRotation() {
mC._x = centerX + (Math.cos(angle) * radius);
mC._y = centerY + (Math.sin(angle) * radius);
}
function updatePosition() {
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
var angle = 0;
var degrees = 0;
var centerX = 0;
var centerY = 0;
var radius = 0;
var speed = 0;
var cost = 0;
var playerleft = 0;
var playerright = 0;
var gameObjectType = "";
var energyStart = 0;
var energy = 0;
var delayToFireMissile = 60;
var numberOfMissiles = 0;
}
Symbol 388 MovieClip [__Packages.Particle] Frame 0
class Particle
{
var mC;
function Particle (d, m) {
delayTillDeath = d;
mC = m;
}
var delayTillDeath = 0;
}
Symbol 389 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 390 MovieClip [__Packages.Rocket] Frame 0
class Rocket
{
var root, angle, targetName, targetIndex1, targetIndex2, delayToFireParticle, mC, arrayIndex;
function Rocket (clip, xStart, yStart, rt) {
root = rt;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
xVel = 1;
yVel = 0;
angle = 0;
targetName = "";
targetIndex1 = 0;
targetIndex2 = 0;
delayToFireParticle = 1;
mC = clip;
}
function missileControl(ii) {
var _local2 = root.particlesMc.attachMovie("particle", "particle" + root.numberOfParticles, 10000 + root.numberOfParticles);
_local2._x = mC._x - (xVel * 2);
_local2._y = mC._y - (yVel * 2);
_local2._rotation = int((angle * 180) / Math.PI);
root.particles.push(new Particle(20, _local2));
root.numberOfParticles++;
getDirectionVector();
updatePosition();
checkForOffStage(ii);
collisionDetection();
}
function getTarget() {
targetIndex1 = root.RandomNumber(0, root.enemyArray.length - 1);
targetIndex2 = root.RandomNumber(0, root.enemyArray[targetIndex1].length - 1);
targetName = root.enemyArray[targetIndex1][targetIndex2].mC._name;
if (targetName == undefined) {
targetIndex1 = root.RandomNumber(0, root.enemyArray.length - 1);
targetIndex2 = root.RandomNumber(0, root.enemyArray[targetIndex1].length - 1);
targetName = root.enemyArray[targetIndex1][targetIndex2].mC._name;
if (targetName == undefined) {
targetIndex1 = root.RandomNumber(0, root.enemyArray.length - 1);
targetIndex2 = root.RandomNumber(0, root.enemyArray[targetIndex1].length - 1);
targetName = root.enemyArray[targetIndex1][targetIndex2].mC._name;
if (targetName == undefined) {
remove();
}
}
}
}
function getDirectionVector() {
if (root.enemyArray.length > 0) {
if (root.enemyArray.length == 1) {
if (root.enemyArray[0].length == 0) {
remove();
} else if (root.enemyArray[targetIndex1][targetIndex2].mC._name != targetName) {
getTarget();
}
} else if (root.enemyArray[targetIndex1][targetIndex2].mC._name != targetName) {
getTarget();
}
} else {
remove();
}
var _local3 = root.enemyArray[targetIndex1][targetIndex2].mC._x - mC._x;
var _local2 = root.enemyArray[targetIndex1][targetIndex2].mC._y - mC._y;
angle = Math.atan2(_local2, _local3);
mC._rotation = (angle * 180) / Math.PI;
xVel = xVel + Math.cos(angle);
if (xVel > 6) {
xVel = 6;
}
if (xVel < -6) {
xVel = -6;
}
yVel = yVel + Math.sin(angle);
if (yVel > 4) {
yVel = 4;
}
if (yVel < -6) {
yVel = -6;
}
}
function createRock() {
var _local2 = root.rocksMc.attachMovie("rock", "rock" + root.rocksNumber, root.rocksNumber);
root.rocksNumber++;
_local2._x = mC._x;
_local2._y = mC._y;
root.deadSporesArray.push(_local2);
}
function collisionDetection() {
var _local2 = 0;
while (_local2 < root.enemyArray.length) {
var _local3 = 0;
while (_local3 < root.enemyArray[_local2].length) {
if (mC.hitTest(root.enemyArray[_local2][_local3].mC)) {
root.sounds.ExplosionShip.start(0, 1);
if (root.enemyArray[_local2][_local3].gameObjectType == "boss1") {
remove();
return(undefined);
}
if (root.enemyArray[_local2][_local3].gameObjectType == "enemy7") {
root.enemyArray[_local2][_local3].hits++;
if (root.enemyArray[_local2][_local3].hits == 3) {
var _local6 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local6._x = mC._x;
_local6._y = mC._y;
var _local7 = "score30";
var _local5 = root.scoreMc.attachMovie(_local7, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(30);
_local5._x = mC._x;
_local5._y = mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].remove();
}
remove();
return(undefined);
}
if (root.enemyArray[_local2][_local3].gameObjectType == "enemy4") {
root.enemyArray[_local2][_local3].hits++;
if (root.enemyArray[_local2][_local3].hits == 3) {
var _local6 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local6._x = mC._x;
_local6._y = mC._y;
var _local7 = "score15";
var _local5 = root.scoreMc.attachMovie(_local7, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(15);
_local5._x = mC._x;
_local5._y = mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].remove();
}
remove();
return(undefined);
}
var _local4 = 0;
while (_local4 < root.enemyArray[_local2].length) {
if (root.enemyArray[_local2][_local4] != root.enemyArray[_local2][_local3]) {
if (root.enemyArray[_local2][_local4].gameObjectType != "enemyBullet") {
root.enemyArray[_local2][_local4].DownRing();
}
}
_local4++;
}
var _local6 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local6._x = mC._x;
_local6._y = mC._y;
if ((root.enemyArray[_local2][_local3].gameObjectType == "enemy1") or (root.enemyArray[_local2][_local3].gameObjectType == "enemy2")) {
var _local7 = "score5";
root.Game.increaseScore(5);
} else if (root.enemyArray[_local2][_local3].gameObjectType == "enemy3") {
var _local7 = "score10";
root.Game.increaseScore(10);
} else if (root.enemyArray[_local2][_local3].gameObjectType == "enemy5") {
var _local7 = "score20";
root.Game.increaseScore(20);
} else if (root.enemyArray[_local2][_local3].gameObjectType == "enemy6") {
var _local7 = "score25";
root.Game.increaseScore(25);
}
var _local5 = root.scoreMc.attachMovie(_local7, "bonusx3" + root.scoreIndex, root.scoreIndex);
_local5._x = mC._x;
_local5._y = mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].remove(_local2, _local3);
remove();
return(undefined);
}
_local3++;
}
_local2++;
}
}
function remove() {
root.Game.numberOfRockets--;
if (root.Game.numberOfRockets < 0) {
root.Game.numberOfRockets = 0;
}
var _local2 = 0;
while (_local2 < root.missilesArray.length) {
if (this == root.missilesArray[_local2]) {
arrayIndex = _local2;
}
_local2++;
}
mC.removeMovieClip();
root.missilesArray.splice(arrayIndex, 1);
}
function checkForOffStage(ii) {
if (mC._x < 0) {
remove();
}
if (mC._y < 0) {
remove();
}
if (mC._x > root.movieWidth) {
remove();
}
if (mC._y > root.movieHeight) {
remove();
}
}
function updatePosition() {
xPos = xPos + xVel;
yPos = yPos + yVel;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
}
Symbol 391 MovieClip [__Packages.Game] Frame 0
class Game
{
var root, startGame, money, energy;
function Game (m, e, rt) {
root = rt;
startGame = 0;
money = m;
energy = e;
}
function increaseMoney(increase) {
money = money + increase;
}
function decreaseMoney(decrease) {
money = money - decrease;
}
function increaseEnergy(increase) {
energy = energy - increase;
if (energy <= 0) {
energy = 0;
}
}
function decreaseEnergy(decrease) {
energy = energy - decrease;
if (energy <= 0) {
startGame = 0;
root._parent.gotoAndStop("gameOver");
}
}
}
Symbol 392 MovieClip [__Packages.Powerup] Frame 0
class Powerup
{
var root, currentRing, arrayIndex, ringRadius, delayToStartGoing, mC, homing, ringDrop, movingCloser, delayToFireParticle;
function Powerup (rt, clip, sp, pType) {
root = rt;
currentRing = 1;
arrayIndex = 0;
ringRadius = 255;
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
delayToFireMissile = 1;
delayToStartGoing = 300;
angle = 0.2;
degrees = 0;
radius = 255;
centerX = root.movieWidth / 2;
centerY = root.movieHeight / 2;
speed = sp;
if (sp < 0) {
angle = (Math.PI*2);
}
mC = clip;
numberOfMissiles = 0;
energyStart = 100;
energy = energyStart;
gameObjectType = pType;
homing = 0;
ringDrop = 20;
movingCloser = 0;
delayToFireParticle = 10;
}
function main(index1, index2) {
delayToStartGoing--;
if (delayToStartGoing == 20) {
mC.gotoAndStop(2);
} else if (delayToStartGoing == 0) {
remove();
}
delayToFireParticle--;
if (delayToFireParticle == 0) {
delayToFireParticle = 1;
var _local2 = root.particlesMc.attachMovie("particle2", "particle" + root.numberOfParticles, 10000 + root.numberOfParticles);
_local2._x = mC._x - (xVel * 4);
_local2._y = mC._y;
_local2._rotation = int((angle * 180) / Math.PI);
root.particles.push(new Particle(20, _local2));
root.numberOfParticles++;
}
trace(angle);
var _local3 = degrees;
updateRotation();
trace(speed);
trace(currentRing);
trace(angle);
angle = angle + (speed * currentRing);
trace(angle);
if (angle > 0) {
if (degrees > 360) {
degrees = degrees - 360;
angle = (Math.PI * degrees) / 180;
}
} else if (degrees < 0) {
degrees = degrees + 360;
angle = (Math.PI * degrees) / 180;
}
degrees = int((angle * 180) / Math.PI);
}
function remove(i) {
mC.removeMovieClip();
root.powerupsArray.splice(i, 1);
}
function updateRotation() {
mC._x = centerX + (Math.cos(angle) * radius);
mC._y = centerY + (Math.sin(angle) * radius);
}
function updatePosition() {
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
var angle = 0;
var degrees = 0;
var centerX = 0;
var centerY = 0;
var radius = 0;
var speed = 0;
var cost = 0;
var playerleft = 0;
var playerright = 0;
var gameObjectType = "";
var energyStart = 0;
var energy = 0;
var delayToFireMissile = 60;
var numberOfMissiles = 0;
}
Symbol 393 MovieClip [__Packages.Game2] Frame 0
class Game2
{
var mC, root, startGame, score, energy, wave, bonusWave, gameComplete, bonusWaveOn, gamePaused, bonusTimeDelay, sporesDestroyed, currentPossiblePowerUp, currentPossiblePowerUpOld, bossNumber, bossDead, numberOfRockets, powerUpsUsing, highScoreObject, highScoreArray, explosionScore, bonusBulletsHit;
function Game2 (mc, m, e, rt) {
mC = mc;
root = rt;
startGame = 0;
score = m;
energy = 8;
wave = 0;
bonusWave = 20;
gameComplete = 101;
bonusWaveOn = 0;
gamePaused = 0;
bonusTimeDelay = 0;
sporesDestroyed = 0;
currentPossiblePowerUp = 0;
currentPossiblePowerUpOld = 0;
bossNumber = 1;
bossDead = 1;
numberOfRockets = 0;
powerUpsUsing = new Array();
highScoreObject = new Object();
highScoreArray = new Array();
explosionScore = new Array();
bonusBulletsHit = 0;
}
function scoresCallback(result) {
if (result.success) {
var _local2 = 0;
while (_local2 < result.list.length) {
var _local4 = _local2 + 1;
highScoreArray[_local2 * 2] = result.list[_local2].username;
highScoreArray[(_local2 * 2) + 1] = result.list[_local2].score;
_local2++;
}
root.highscore.highscore.text = highScoreArray[1];
root.highscore.highscoreName.text = highScoreArray[0];
} else {
root.highscore.highscore.text = "100000";
root.highscore.highscoreName.text = "Bazoop.com";
}
}
function getScores() {
var _local2 = new root.TextScoreTable(root.score_table, 1);
_local2.reset("Fetching high scores...");
root.getScoresFromMochi(_local2);
}
function saveScore() {
}
function addPowerUp(p) {
if (startGame == 1) {
p.frame.gotoAndStop(1);
var _local2 = 0;
while (_local2 < powerUpsUsing.length) {
if (powerUpsUsing[_local2] == p._currentframe) {
return(undefined);
}
_local2++;
}
root.sounds.UsePowerUp.start(0, 1);
p.w.gotoAndStop(2);
currentPossiblePowerUp = 0;
currentPossiblePowerUpOld = -1;
powerUpsUsing.push(p._currentframe);
if (p._currentframe == 2) {
_local2 = 0;
while (_local2 < powerUpsUsing.length) {
if (powerUpsUsing[_local2] == 3) {
powerUpsUsing.splice(_local2, 1);
}
_local2++;
}
root.gun.g2.gotoAndStop(2);
root.gun.g5.gotoAndStop(1);
root.gun.g6.gotoAndStop(1);
root.gun.g3.gotoAndStop(1);
root.gun.g4.gotoAndStop(1);
var _local5 = "edgeRing13";
var _local4 = root.outsideRingMc[_local5];
_local4.w.gotoAndStop(1);
} else if (p._currentframe == 3) {
_local2 = 0;
while (_local2 < powerUpsUsing.length) {
if (powerUpsUsing[_local2] == 2) {
powerUpsUsing.splice(_local2, 1);
}
_local2++;
}
root.gun.g2.gotoAndStop(1);
root.gun.g5.gotoAndStop(1);
root.gun.g6.gotoAndStop(1);
root.gun.g3.gotoAndStop(2);
root.gun.g4.gotoAndStop(2);
var _local5 = "edgeRing12";
var _local4 = root.outsideRingMc[_local5];
_local4.w.gotoAndStop(1);
}
}
}
function increasePowerUpRing() {
var _local3 = 0;
while (_local3 < 4) {
var _local4 = "edgeRing" + (currentPossiblePowerUp + 12);
var _local2 = root.outsideRingMc[_local4];
if (_local2.w._currentframe == 1) {
if (_local2.frame._currentframe == 1) {
var _local7 = currentPossiblePowerUp - 1;
var _local6 = "edgeRing" + (currentPossiblePowerUpOld + 12);
var _local5 = root.outsideRingMc[_local6];
_local5.frame.gotoAndStop(1);
_local2.w._alpha = 100;
_local2.frame.gotoAndStop(2);
currentPossiblePowerUpOld = currentPossiblePowerUp;
currentPossiblePowerUp++;
if (currentPossiblePowerUp > 3) {
currentPossiblePowerUp = 0;
}
_local3 = 4;
return(undefined);
}
currentPossiblePowerUp++;
if (currentPossiblePowerUp > 3) {
currentPossiblePowerUp = 0;
}
} else {
currentPossiblePowerUp++;
if (currentPossiblePowerUp > 3) {
currentPossiblePowerUp = 0;
}
}
_local3++;
}
}
function increaseScore(increase) {
score = score + increase;
var _local5 = score % 1000;
if (_local5 == 0) {
root.sounds.GainBonus.start(0, 1);
increaseEnergy();
}
var _local3 = String(score);
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = Number(_local3.charAt(_local3.length - (_local2 + 1)));
root["scoreNumber" + _local2].number.text = _local4;
_local2++;
}
}
function bonusTimeRun() {
if (bonusTimeDelay < 0) {
startGame = 0;
var _local2 = root.attachMovie("BonusTimeFin", "bonusTime", 11000);
_local2._x = 320;
_local2._y = 300;
}
}
function increaseWave() {
if (startGame == 1) {
wave++;
if (wave == gameComplete) {
startGame = 0;
root.gun._visible = false;
root.home._visible = false;
root.killEverything();
var _local4 = root.attachMovie("gameComplete", "gamecomplete", 11002);
_local4._x = 320;
_local4._y = 300;
return(undefined);
}
var _local2 = String(wave);
var _local5 = wave % bonusWave;
if (_local5 == 0) {
startGame = 0;
bonusBulletsHit = 0;
var _local4 = root.attachMovie("bonusTime", "bonusTime", 11000);
_local4._x = 320;
_local4._y = 300;
sporesDestroyed = 0;
root.setupRings = 0;
bonusTimeDelay = 300;
bossNumber++;
root.sounds.LevelDefender.start(0, 1);
} else if (powerUpsUsing.length < 4) {
var _local3 = root.RandomNumber(1, 100);
if (_local3 > 80) {
if (energy < 8) {
root.addPowerUp("extraLife");
}
} else if (_local3 > 50) {
root.addPowerUp("powerUp");
} else if (_local3 > 45) {
root.addPowerUp("smartBomb");
}
}
if (wave < 10) {
root.waveLetter2.number.text = "0";
root.waveLetter1.number.text = "0";
root.waveLetter0.number.text = wave;
} else if (wave < 100) {
root.waveLetter1.number.text = _local2.charAt(0);
root.waveLetter0.number.text = _local2.charAt(1);
} else {
root.waveLetter2.number.text = _local2.charAt(0);
root.waveLetter1.number.text = _local2.charAt(1);
root.waveLetter0.number.text = _local2.charAt(2);
}
}
}
function decreaseScore(decrease) {
score = score - decrease;
}
function increaseEnergy() {
energy++;
if (energy > 8) {
energy = 8;
} else {
var _local4 = 8 - energy;
var _local3 = "edgeRing" + (_local4 + 1);
var _local2 = root.outsideRingMc[_local3];
_local2.seg.gotoAndStop(energy + 1);
}
}
function gameOver() {
saveScore();
root.setupStartFrame();
}
function decreaseEnergy(decrease) {
energy = energy - decrease;
root.home.gotoAndPlay(2);
if (energy <= 0) {
root.bonusTimeClock.removeMovieClip();
startGame = 0;
root.sounds.GameOverRobot.start(0, 1);
bossNumber = 1;
var _local3 = root.attachMovie("gameover", "gameover", 11000);
_local3._x = 320;
_local3._y = 300;
_local3.gotoAndStop("gameOver");
root.nextRing = 0;
var _local5 = 8 - energy;
var _local4 = "edgeRing" + _local5;
_local3 = root.outsideRingMc[_local4];
trace(10 + (8 - energy));
_local3.seg.gotoAndStop(10 + (7 - energy));
root.home.gotoAndPlay(9);
} else {
root.LoseEnergy.start(0, 1);
var _local5 = 8 - energy;
var _local4 = "edgeRing" + _local5;
var _local3 = root.outsideRingMc[_local4];
trace(10 + (8 - energy));
_local3.seg.gotoAndStop(10 + (7 - energy));
if (powerUpsUsing.length > 0) {
var _local2 = powerUpsUsing[powerUpsUsing.length - 1];
powerUpsUsing.pop();
currentPossiblePowerUp--;
if (currentPossiblePowerUp < 0) {
currentPossiblePowerUp = 0;
}
if (_local2 == 2) {
_local4 = "edgeRing12";
root.gun.g2.gotoAndStop(1);
root.gun.g5.gotoAndStop(1);
root.gun.g6.gotoAndStop(1);
root.gun.g3.gotoAndStop(1);
root.gun.g4.gotoAndStop(1);
} else if (_local2 == 3) {
_local4 = "edgeRing13";
root.gun.g2.gotoAndStop(1);
root.gun.g5.gotoAndStop(1);
root.gun.g6.gotoAndStop(1);
root.gun.g3.gotoAndStop(1);
root.gun.g4.gotoAndStop(1);
} else if (_local2 == 4) {
_local4 = "edgeRing14";
} else {
_local4 = "edgeRing15";
}
_local3 = root.outsideRingMc[_local4];
_local3.w.gotoAndStop(1);
}
}
}
}
Symbol 394 MovieClip [__Packages.Wave] Frame 0
class Wave
{
var root, sideOfScreen, waveSpeed, waveName, waveStartX, waveStartY, waveStartDir, waveAmount, waveDelayTillNextMonster, waveMonsterDelay, waveMoneyValue, currentMonsters;
function Wave (wName, wSpeed, wAmount, wDelayTillNextMonster, wMoneyValue, rt, side) {
root = rt;
sideOfScreen = side;
waveSpeed = wSpeed;
waveName = wName;
waveStartX = 0;
waveStartY = 0;
waveStartDir = 0;
waveAmount = wAmount;
waveDelayTillNextMonster = wDelayTillNextMonster;
waveMonsterDelay = 0;
waveMoneyValue = wMoneyValue;
currentMonsters = 0;
}
function waveControl(monsters, ii, missiles, root) {
}
function removeWave(ii) {
root.waveArray.splice(ii, 1);
}
}
Symbol 395 MovieClip [__Packages.Missile2] Frame 0
class Missile2
{
var root, mC, mType, arrayIndex;
function Missile2 (clip, xStart, yStart, rt, type) {
root = rt;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
xVel = 1;
yVel = 0;
mC = clip;
mType = type;
updatePosition();
}
function missileControl(ii) {
updatePosition();
collisionDetection();
checkForBug();
}
function checkForBug() {
var _local2 = root.getDistance(mC, root.home);
if (_local2 > 280) {
remove();
}
}
function createRock() {
var _local2 = root.rocksMc.attachMovie("rock", "rock" + root.rocksNumber, root.rocksNumber);
root.rocksNumber++;
_local2._x = mC._x;
_local2._y = mC._y;
root.deadSporesArray.push(_local2);
}
function collisionDetection() {
var _local2 = 0;
while (_local2 < root.powerupsArray.length) {
if (mC.hitTest(root.powerupsArray[_local2].mC)) {
var _local8 = "score25";
var _local6 = root.scoreMc.attachMovie(_local8, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(25);
_local6._x = root.powerupsArray[_local2].mC._x;
_local6._y = root.powerupsArray[_local2].mC._y;
root.scoreIndex++;
if (root.powerupsArray[_local2].gameObjectType == "extraLife") {
root.sounds.Computer.start(0, 1);
root.Game.increaseEnergy();
root.powerupsArray[_local2].remove(_local2);
} else if (root.powerupsArray[_local2].gameObjectType == "smartBomb") {
root.sounds.SmartBombFx.start(0, 1);
root.killEverything();
} else {
root.sounds.Computer.start(0, 1);
root.Game.increasePowerUpRing();
root.powerupsArray[_local2].remove(_local2);
}
var _local5 = 0;
while (_local5 < root.particles.length) {
root.particles[_local5].mC.removeMovieClip();
root.particles.splice(_local5, 1);
_local5++;
}
if (mType == "bullet") {
remove();
return(undefined);
}
}
_local2++;
}
_local2 = 0;
while (_local2 < root.deadSporesArray.length) {
if (mC.hitTest(root.deadSporesArray[_local2])) {
if (root.deadSporesArray[_local2]._xscale == 20) {
root.deadSporesArray[_local2].removeMovieClip();
root.deadSporesArray.splice(_local2, 1);
var _local7 = root.explosionMc.attachMovie("sporeExplosion", "spexplosion" + root.scoreIndex, root.scoreIndex);
_local7._x = mC._x;
_local7._y = mC._y;
_local7.root = root;
_local7.explosionIndex = 5;
root.scoreIndex++;
var _local8 = "score5";
var _local6 = root.scoreMc.attachMovie(_local8, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(_local7.explosionIndex);
_local6._x = mC._x;
_local6._y = mC._y;
root.scoreIndex++;
root.sounds.Artillery.start(0, 1);
if (root.Game.bonusWaveOn == 1) {
root.Game.increaseScore(10);
root.Game.sporesDestroyed++;
}
} else {
root.deadSporesArray[_local2]._xscale = root.deadSporesArray[_local2]._xscale - 10;
root.deadSporesArray[_local2]._yscale = root.deadSporesArray[_local2]._xscale;
}
if (mType == "bullet") {
remove();
}
return(undefined);
}
_local2++;
}
_local2 = 0;
while (_local2 < root.enemyArray.length) {
var _local3 = 0;
while (_local3 < root.enemyArray[_local2].length) {
if (mC.hitTest(root.enemyArray[_local2][_local3].mC)) {
root.sounds.ExplosionShip.start(0, 1);
if (root.enemyArray[_local2][_local3].gameObjectType == "enemyBullet") {
var _local7 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local7._x = mC._x;
_local7._y = mC._y;
var _local8 = "score5";
var _local6 = root.scoreMc.attachMovie(_local8, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(5);
_local6._x = mC._x;
_local6._y = mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].remove();
root.Game.bonusBulletsHit++;
remove();
return(undefined);
}
if (root.enemyArray[_local2][_local3].gameObjectType == "boss1") {
root.enemyArray[_local2][_local3].mC.gotoAndPlay(2);
root.enemyArray[_local2][_local3].hits++;
root.enemyArray[_local2][_local3].mC._xscale = root.enemyArray[_local2][_local3].mC._xscale - 10;
root.enemyArray[_local2][_local3].mC._yscale = root.enemyArray[_local2][_local3].mC._xscale;
if (root.enemyArray[_local2][_local3].hits == 5) {
var _local7 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local7._x = mC._x;
_local7._y = mC._y;
var _local8 = "score50";
var _local6 = root.scoreMc.attachMovie(_local8, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(50);
_local6._x = mC._x;
_local6._y = mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].mC.removeMovieClip();
root.enemyArray[_local2].splice(_local3, 1);
root.Game.bossDead++;
if (root.Game.bossNumber == root.Game.bossDead) {
root.Game.bossDead = 1;
root.Game.bonusTimeDelay = -1;
root.bonusTimeClock.removeMovieClip();
}
}
remove();
return(undefined);
}
if (root.enemyArray[_local2][_local3].gameObjectType == "enemy7") {
root.enemyArray[_local2][_local3].hits++;
if (root.enemyArray[_local2][_local3].hits == 3) {
var _local7 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local7._x = mC._x;
_local7._y = mC._y;
var _local8 = "score30";
var _local6 = root.scoreMc.attachMovie(_local8, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(30);
_local6._x = mC._x;
_local6._y = mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].remove();
} else {
createRock();
}
remove();
return(undefined);
}
if (root.enemyArray[_local2][_local3].gameObjectType == "enemy4") {
root.enemyArray[_local2][_local3].hits++;
if (root.enemyArray[_local2][_local3].hits == 3) {
var _local7 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local7._x = mC._x;
_local7._y = mC._y;
var _local8 = "score15";
var _local6 = root.scoreMc.attachMovie(_local8, "bonusx3" + root.scoreIndex, root.scoreIndex);
root.Game.increaseScore(15);
_local6._x = mC._x;
_local6._y = mC._y;
root.scoreIndex++;
root.enemyArray[_local2][_local3].remove();
} else {
root.enemyArray[_local2][_local3].mC.play();
}
remove();
return(undefined);
}
var _local4 = 0;
while (_local4 < root.enemyArray[_local2].length) {
if (root.enemyArray[_local2][_local4] != root.enemyArray[_local2][_local3]) {
if (root.enemyArray[_local2][_local4].gameObjectType != "enemyBullet") {
root.enemyArray[_local2][_local4].DownRing();
}
}
_local4++;
}
var _local7 = root.explosionMc.attachMovie("explosion", "explosion" + root.scoreIndex, root.scoreIndex);
_local7._x = mC._x;
_local7._y = mC._y;
if ((root.enemyArray[_local2][_local3].gameObjectType == "enemy1") or (root.enemyArray[_local2][_local3].gameObjectType == "enemy2")) {
var _local8 = "score5";
root.Game.increaseScore(5);
} else if (root.enemyArray[_local2][_local3].gameObjectType == "enemy3") {
var _local8 = "score10";
root.Game.increaseScore(10);
} else if (root.enemyArray[_local2][_local3].gameObjectType == "enemy5") {
var _local8 = "score20";
root.Game.increaseScore(20);
} else if (root.enemyArray[_local2][_local3].gameObjectType == "enemy6") {
var _local8 = "score25";
root.Game.increaseScore(25);
}
var _local6 = root.scoreMc.attachMovie(_local8, "bonusx3" + root.scoreIndex, root.scoreIndex);
_local6._x = mC._x;
_local6._y = mC._y;
root.scoreIndex++;
if (mType == "bullet") {
if (root.enemyArray[_local2][_local3].gameObjectType != "enemyBullet") {
createRock();
}
remove();
}
root.enemyArray[_local2][_local3].remove(_local2, _local3);
return(undefined);
}
_local3++;
}
_local2++;
}
}
function remove() {
var _local2 = 0;
while (_local2 < root.missilesArray.length) {
if (this == root.missilesArray[_local2]) {
arrayIndex = _local2;
}
_local2++;
}
mC.removeMovieClip();
root.missilesArray.splice(arrayIndex, 1);
root.shotsFired--;
if (root.shotsFired < 0) {
root.shotsFired = 0;
}
}
function checkForOffStage(ii) {
if (mC._x < 0) {
remove();
}
if (mC._y < 0) {
remove();
}
if (mC._x > root.movieWidth) {
remove();
}
if (mC._y > root.movieHeight) {
remove();
}
}
function updatePosition() {
xPos = xPos + xVel;
yPos = yPos + yVel;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
}
Symbol 374 Button
on (release) {
_parent.setupGame();
}
Symbol 378 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 1
logoBtn.onRelease = function () {
if (_parent.Game.startGame == 0) {
if (_parent.Game.bonusTimeDelay == 0) {
getURL ("http://www.bazoop.com", "blank");
}
}
};