Frame 1
stop();
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
_root.kongregateServices.connect();
mochi.MochiServices.connect("5a57d51f7dfb3a84");
Stage.showMenu = false;
__com_mochibot__("1521b876", this, 10301, true);
Frame 2
function playSound(soundName) {
if (_root.soundMute == false) {
sound = new Sound();
sound.attachSound(soundName);
sound.setVolume(_root.gameVolume);
sound.start(0.05, 0);
}
}
function playMusic(musicName) {
if (_root.musicMute == false) {
music = new Sound();
music.attachSound(musicName);
music.setVolume(_root.gameVolume);
music.start(0, 100);
}
}
stop();
_root.pauseScreen.getNextHighestDepth();
_root.pauseScreen.removeMovieClip();
if (particleEffects == undefined) {
particleEffects = "high";
particles = 30;
}
if (qualitySetting == undefined) {
qualitySetting = "high";
}
if (_root.gameVolume == undefined) {
gameVolume = 100;
}
if (musicMute == undefined) {
musicMute = false;
}
if (soundMute == undefined) {
soundMute = false;
}
Instance of Symbol 58 MovieClip "wall3" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.player.test)) {
_root.player._y = this._y - 13;
_root.player.vSpeed = 0;
}
}
Instance of Symbol 58 MovieClip "wall1" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.player.test)) {
_root.player._y = this._y + 13;
_root.player.vSpeed = 0;
}
}
Instance of Symbol 58 MovieClip "wall4" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.player.test)) {
_root.player._x = this._x - 13;
_root.player.hSpeed = 0;
}
}
Instance of Symbol 58 MovieClip "wall2" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.player.test)) {
_root.player._x = this._x + 13;
_root.player.hSpeed = 0;
}
}
Instance of Symbol 66 MovieClip in Frame 2
onClipEvent (load) {
stopAllSounds();
_root.playMusic("menuMusic");
timer = 30;
}
onClipEvent (enterFrame) {
if (timer <= 0) {
_root.clearScreen.play();
timer = 180;
} else {
timer--;
}
}
Frame 3
function newWave() {
if (wave == 2) {
_root.codeClip.xActive = true;
_root.codeClip.spawnCircleTimerNew = _root.codeClip.spawnCircleTimerNew - 2;
} else if (wave == 3) {
_root.codeClip.spawnCircleTimerNew = _root.codeClip.spawnCircleTimerNew - 2;
_root.codeClip.spawnXTimerNew = _root.codeClip.spawnXTimerNew - 2;
} else if (wave == 4) {
_root.codeClip.flyActive = true;
_root.codeClip.spawnCircleTimerNew = _root.codeClip.spawnCircleTimerNew - 2;
_root.codeClip.spawnXTimerNew = _root.codeClip.spawnXTimerNew - 2;
} else if (wave == 5) {
_root.codeClip.enemy3Active = true;
_root.codeClip.spawnCircleTimerNew = _root.codeClip.spawnCircleTimerNew - 3;
_root.codeClip.spawnFlyTimerNew = _root.codeClip.spawnFlyTimerNew - 3;
_root.codeClip.spawnXTimerNew = _root.codeClip.spawnXTimerNew - 2;
} else if (wave >= 6) {
_root.codeClip.spawnCircleTimerNew = _root.codeClip.spawnCircleTimerNew - 3;
_root.codeClip.spawnFlyTimerNew = _root.codeClip.spawnFlyTimerNew - 4;
_root.codeClip.spawnXTimerNew = _root.codeClip.spawnXTimerNew - 3;
_root.codeClip.spawn3TimerNew = _root.codeClip.spawn3TimerNew - 4;
}
}
tgh_startgame(_root.gameOver.finalScore, 0, 0);
test = 0;
walls = 4;
score = 0;
bits = 0;
spreadShot = false;
blastRadius = 0;
weaponUpgrade = 0;
wave = 1;
gamePaused = false;
Instance of Symbol 86 MovieClip "enemy" in Frame 3
onClipEvent (load) {
enemyDown = false;
countdown = false;
timer = 15;
active = true;
noPoints = false;
noBits = false;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (this.test.hitTest(_root.player.test)) {
if ((_root.player.invincible == false) and (_root.player.active == true)) {
_root.player.dead.nextFrame();
_root.player.active = false;
this.gotoAndStop("explode");
}
}
if (this.hitTest(_root.clearScreen.wave1) or this.hitTest(_root.clearScreen.wave2)) {
this.gotoAndStop("explode");
noPoints = true;
noBits = true;
}
if (countdown == true) {
timer--;
if (timer <= 0) {
active = false;
_root.codeClip.enemyCheck(number);
this.getNextHighestDepth();
this.removeMovieClip();
}
}
}
}
Instance of Symbol 66 MovieClip "codeClip" in Frame 3
onClipEvent (load) {
function enemyCheck(number) {
checkNum = 0;
i = 1;
while (i <= number) {
if ((_root["enemy" + i].active == undefined) or (_root["enemy" + i].active == false)) {
checkNum++;
}
i++;
}
if (checkNum == number) {
enemyMin = number;
}
}
_root.playMusic("gameMusic");
omegaActive = false;
omegaBallTimer = random(450) + 900;
active = false;
circleActive = true;
spawnCircleTimerNew = 30;
spawnCircleTimer = 0;
xActive = false;
spawnXTimerNew = 60;
spawnXTimer = 60;
enemy3Active = false;
spawn3TimerNew = 200;
spawn3Timer = 100;
flyActive = false;
spawnFlyTimerNew = 60;
spawnFlyTimer = 15;
enemyNum = 1;
enemyMin = 1;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (active == true) {
if (omegaActive == false) {
omegaBallTimer--;
if (omegaBallTimer <= 0) {
_root.omegaBall._x = random(500) + 25;
_root.omegaBall._y = random(320) + 50;
_root.omegaBall.gotoAndStop(1);
_root.omegaBall.spawned = true;
omegaBallTimer = random(450) + 900;
omegaActive = true;
}
}
if (circleActive == true) {
spawnCircleTimer--;
if (spawnCircleTimer <= 0) {
_root.enemy.duplicateMovieClip("enemy" + enemyNum, enemyNum);
_root["enemy" + enemyNum].number = enemyNum;
if (_root.player.cornerHit == false) {
do {
_root["enemy" + enemyNum]._x = random(500) + 25;
_root["enemy" + enemyNum]._y = random(320) + 50;
} while (_root["enemy" + enemyNum].hitTest(_root.player.spawnTest) == true);
} else {
_root["enemy" + enemyNum]._x = random(500) + 25;
_root["enemy" + enemyNum]._y = random(320) + 50;
}
enemyNum++;
spawnCircleTimer = spawnCircleTimerNew;
}
}
if (xActive == true) {
spawnXTimer--;
if (spawnXTimer <= 0) {
_root.enemyX.duplicateMovieClip("enemy" + enemyNum, enemyNum);
_root["enemy" + enemyNum].number = enemyNum;
if (_root.player.cornerHit == false) {
do {
_root["enemy" + enemyNum]._x = random(500) + 25;
_root["enemy" + enemyNum]._y = random(320) + 50;
} while (_root["enemy" + enemyNum].hitTest(_root.player.spawnTest) == true);
} else {
_root["enemy" + enemyNum]._x = random(500) + 25;
_root["enemy" + enemyNum]._y = random(320) + 50;
}
enemyNum++;
spawnXTimer = spawnXTimerNew;
}
}
if (enemy3Active == true) {
spawn3Timer--;
if (spawn3Timer <= 0) {
_root.enemySpawner.duplicateMovieClip("enemy" + enemyNum, enemyNum);
_root["enemy" + enemyNum].number = enemyNum;
if (_root.player.cornerHit == false) {
do {
_root["enemy" + enemyNum]._x = random(500) + 25;
_root["enemy" + enemyNum]._y = random(320) + 50;
} while (_root["enemy" + enemyNum].hitTest(_root.player.spawnTest) == true);
} else {
_root["enemy" + enemyNum]._x = random(500) + 25;
_root["enemy" + enemyNum]._y = random(320) + 50;
}
enemyNum++;
spawn3Timer = spawn3TimerNew;
}
}
if (flyActive == true) {
spawnFlyTimer--;
if (spawnFlyTimer <= 0) {
_root.enemyFly.duplicateMovieClip("enemy" + enemyNum, enemyNum);
_root["enemy" + enemyNum].number = enemyNum;
if (_root.player.cornerHit == false) {
do {
_root["enemy" + enemyNum]._x = random(500) + 25;
_root["enemy" + enemyNum]._y = random(320) + 50;
} while (_root["enemy" + enemyNum].hitTest(_root.player.spawnTest) == true);
} else {
_root["enemy" + enemyNum]._x = random(500) + 25;
_root["enemy" + enemyNum]._y = random(320) + 50;
}
enemyNum++;
spawnFlyTimer = spawnFlyTimerNew;
}
}
}
}
}
Instance of Symbol 89 MovieClip "enemyX" in Frame 3
onClipEvent (load) {
movement = false;
noPoints = false;
noBits = false;
active = true;
this._alpha = 0;
enemyDown = false;
countdown = false;
timer = 15;
moveDirection = random(10) + 1;
xSpeed = 0;
ySpeed = 0;
if (moveDirection <= 5) {
xSpeed = 5;
} else {
ySpeed = 5;
}
xNeg = random(10) + 1;
yNeg = random(10) + 1;
if (xNeg <= 5) {
xSpeed = xSpeed * -1;
}
if (yNeg <= 5) {
ySpeed = ySpeed * -1;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (this.test.hitTest(_root.player.test)) {
if ((_root.player.invincible == false) and (_root.player.active == true)) {
_root.player.dead.nextFrame();
_root.player.active = false;
this.gotoAndStop("explode");
}
}
if (this._name != "enemyX") {
if (this.hitTest(_root.clearScreen.wave1) or this.hitTest(_root.clearScreen.wave2)) {
this.gotoAndStop("explode");
noPoints = true;
noBits = true;
}
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
}
if (enemyDown == false) {
if (movement == true) {
this._x = this._x + xSpeed;
if (this.test.hitTest(_root.wall4) or this.test.hitTest(_root.wall2)) {
xSpeed = xSpeed * -1;
}
this._y = this._y + ySpeed;
if (this.test.hitTest(_root.wall1) or this.test.hitTest(_root.wall3)) {
ySpeed = ySpeed * -1;
}
}
}
if (countdown == true) {
timer--;
if (timer <= 0) {
active = false;
_root.codeClip.enemyCheck(number);
this.getNextHighestDepth();
this.removeMovieClip();
}
}
}
}
}
Instance of Symbol 94 MovieClip "enemySpawner" in Frame 3
onClipEvent (load) {
enemyDown = false;
countdown = false;
timer = 15;
active = true;
noPoints = false;
noBits = false;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (this.test.hitTest(_root.player.test)) {
if ((_root.player.invincible == false) and (_root.player.active == true)) {
_root.player.dead.nextFrame();
_root.player.active = false;
this.gotoAndStop("explode");
}
}
if (this.hitTest(_root.clearScreen.wave1) or this.hitTest(_root.clearScreen.wave2)) {
this.gotoAndStop("explode");
noPoints = true;
noBits = true;
}
if (this._name == "enemySpawner") {
this.gotoAndStop(1);
}
if (countdown == true) {
timer--;
if (timer <= 0) {
active = false;
_root.codeClip.enemyCheck(number);
this.getNextHighestDepth();
this.removeMovieClip();
}
}
}
}
Instance of Symbol 180 MovieClip "enemy3Spawn" in Frame 3
onClipEvent (load) {
enemyDown = false;
countdown = false;
timer = 15;
active = true;
noPoints = false;
noBits = false;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (this.test.hitTest(_root.player.test)) {
if ((_root.player.invincible == false) and (_root.player.active == true)) {
_root.player.dead.nextFrame();
_root.player.active = false;
this.gotoAndStop("explode");
}
}
if (this.hitTest(_root.clearScreen.wave1) or this.hitTest(_root.clearScreen.wave2)) {
this.gotoAndStop("explode");
noPoints = true;
noBits = true;
}
if (enemyDown == false) {
this._x = this._x + xSpeed;
this._y = this._y + ySpeed;
if (this.hitTest(_root.wall4) or this.hitTest(_root.wall2)) {
xSpeed = xSpeed * -1;
}
this._y = this._y + ySpeed;
if (this.hitTest(_root.wall1) or this.hitTest(_root.wall3)) {
ySpeed = ySpeed * -1;
}
}
if (countdown == true) {
timer--;
if (timer <= 0) {
active = false;
_root.codeClip.enemyCheck(number);
this.getNextHighestDepth();
this.removeMovieClip();
}
}
}
}
Instance of Symbol 99 MovieClip "enemyFly" in Frame 3
onClipEvent (load) {
popIn = true;
moveSpeed = 3;
enemyDown = false;
countdown = false;
timer = 15;
active = true;
noPoints = false;
noBits = false;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (this.test.hitTest(_root.player.test)) {
if ((_root.player.invincible == false) and (_root.player.active == true)) {
_root.player.dead.nextFrame();
_root.player.active = false;
this.gotoAndStop("explode");
}
}
if (this.hitTest(_root.clearScreen.wave1) or this.hitTest(_root.clearScreen.wave2)) {
this.gotoAndStop("explode");
noPoints = true;
noBits = true;
}
xDist = this._x - _root.player._x;
yDist = this._y - _root.player._y;
distance = Math.sqrt((xDist * xDist) + (yDist * yDist));
cos = xDist / distance;
rad = Math.acos(cos);
deg = Math.floor(180 / (Math.PI / rad));
if (yDist < 0) {
rad = -rad;
deg = -deg;
}
this._rotation = deg - 90;
if (popIn == false) {
if (this._name != "enemyFly") {
if (enemyDown == false) {
xSpeed = moveSpeed * Math.cos(rad);
ySpeed = moveSpeed * Math.sin(rad);
this._x = this._x - xSpeed;
this._y = this._y - ySpeed;
}
}
if (countdown == true) {
timer--;
if (timer <= 0) {
active = false;
_root.codeClip.enemyCheck(number);
this.getNextHighestDepth();
this.removeMovieClip();
}
}
}
}
}
Instance of Symbol 183 MovieClip "waveMC" in Frame 3
onClipEvent (load) {
this.play();
active = true;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (active == true) {
this.play();
}
} else if (active == true) {
this.stop();
}
}
Instance of Symbol 110 MovieClip "omegaBall" in Frame 3
onClipEvent (load) {
spawned = false;
active = false;
enemyMin = 0;
enemyMax = 0;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (spawned == true) {
if (active == false) {
if (this.hitTest(_root.player.test)) {
active = true;
enemyNum = _root.codeClip.enemyMin;
enemyMax = _root.codeClip.enemyNum;
this.animation.play();
this.nextFrame();
}
}
if (active == true) {
i = enemyNum;
while (i < enemyMax) {
_root.omegaBullet.duplicateMovieClip("omegaBullet" + i, i + 2000);
_root["omegaBullet" + i].active = true;
_root["omegaBullet" + i].i = i;
_root["omegaBullet" + i]._x = this._x;
_root["omegaBullet" + i]._y = this._y;
i++;
}
active = false;
spawned = false;
_root.codeClip.omegaActive = false;
}
}
}
}
Instance of Symbol 185 MovieClip "omegaBullet" in Frame 3
onClipEvent (load) {
moveSpeed = random(5) + 15;
timer = 60;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (active == true) {
timer--;
if (timer <= 0) {
this.removeMovieClip();
}
xDist = this._x - _root["enemy" + i]._x;
yDist = this._y - _root["enemy" + i]._y;
distance = Math.sqrt((xDist * xDist) + (yDist * yDist));
cos = xDist / distance;
rad = Math.acos(cos);
if (yDist < 0) {
rad = -rad;
}
xSpeed = moveSpeed * Math.cos(rad);
ySpeed = moveSpeed * Math.sin(rad);
this._x = this._x - xSpeed;
this._y = this._y - ySpeed;
if (this.hitTest(_root["enemy" + i])) {
_root["enemy" + i].noBits = true;
_root["enemy" + i].gotoAndStop("explode");
this.getNextHighestDepth();
this.removeMovieClip();
}
if ((_root["enemy" + i].active == false) or (_root["enemy" + i].active == undefined)) {
this.getNextHighestDepth();
this.removeMovieClip();
}
}
}
}
Instance of Symbol 198 MovieClip "lives" in Frame 3
onClipEvent (load) {
this.gotoAndStop(4);
gameOver = false;
}
Instance of Symbol 201 MovieClip "timerBar" in Frame 3
onClipEvent (load) {
function reset() {
if (_root.wave < 5) {
timerFull = timerFull + 300;
} else {
timerFull = timerFull + 150;
}
timer = timerFull;
}
refill = true;
this._xscale = 0;
active = false;
timer = 0;
timerFull = 0;
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (active == true) {
this._xscale = (timer / timerFull) * 100;
if (timer <= 0) {
_root.codeClip.active = false;
_root.clearScreen.play();
active = false;
_root.player.active = false;
_root.player.firing = false;
_root.player.firingRate = 0;
} else {
timer--;
}
}
if (refill == true) {
if (this._xscale < 100) {
this._xscale = this._xscale + 2;
}
}
}
}
Instance of Symbol 207 MovieClip "player" in Frame 3
onClipEvent (load) {
function reset() {
n = 200;
up = false;
down = false;
left = false;
right = false;
hSpeed = 0;
vSpeed = 0;
}
invincible = false;
this.nextFrame();
cornerHit = false;
cornerHitNum = 0;
active = true;
firingRateReset = 6;
firingRate = firingRateReset;
firing = false;
maxSpeed = 7;
acc = 0.75;
bulletSpeed = 15;
turretRad = 0;
hitWall = false;
hitWallNum = 0;
reset();
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
if (active == true) {
i = 1;
while (i <= 4) {
if (this.test.hitTest(_root["cornerTest" + i])) {
cornerHitNum++;
}
i++;
}
if (cornerHitNum == 1) {
cornerHit = true;
cornerHitNum = 0;
} else {
cornerHitNum = 0;
cornerHit = false;
}
x = _root._xmouse - this._x;
y = _root._ymouse - this._y;
hyp = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
cos = x / hyp;
rad = Math.acos(cos);
deg = Math.floor(180 / (Math.PI / rad));
if (y < 0) {
deg = -deg;
rad = -rad;
}
this._rotation = deg;
this.test._rotation = -deg;
this._x = this._x + hSpeed;
if (Key.isDown(39) or Key.isDown(68)) {
right = true;
if (hSpeed < maxSpeed) {
hSpeed = hSpeed + acc;
}
} else if (right == true) {
right = false;
}
if (Key.isDown(37) or Key.isDown(65)) {
left = true;
if (hSpeed > (-maxSpeed)) {
hSpeed = hSpeed - acc;
}
} else if (left == true) {
left = false;
}
if ((left == false) and (right == false)) {
if (hSpeed > 0) {
hSpeed = hSpeed - acc;
if (hSpeed < acc) {
hSpeed = 0;
}
} else if (hSpeed < 0) {
hSpeed = hSpeed + acc;
if (hSpeed > acc) {
hSpeed = 0;
}
}
}
this._y = this._y + vSpeed;
if (Key.isDown(40) or Key.isDown(83)) {
down = true;
if (vSpeed < maxSpeed) {
vSpeed = vSpeed + acc;
}
} else if (down == true) {
down = false;
}
if (Key.isDown(38) or Key.isDown(87)) {
up = true;
if (vSpeed > (-maxSpeed)) {
vSpeed = vSpeed - acc;
}
} else if (up == true) {
up = false;
}
if ((down == false) and (up == false)) {
if (vSpeed > 0) {
vSpeed = vSpeed - acc;
if (vSpeed < acc) {
vSpeed = 0;
}
} else if (vSpeed < 0) {
vSpeed = vSpeed + acc;
if (vSpeed > acc) {
vSpeed = 0;
}
}
}
if (firing == true) {
if (firingRate <= 0) {
_root.playSound("gunfire");
_root.bullet.duplicateMovieClip("bullet" + n, n);
_root["bullet" + n].xSpeed = bulletSpeed * Math.cos(rad);
_root["bullet" + n].ySpeed = bulletSpeed * Math.sin(rad);
_root["bullet" + n]._x = this._x;
_root["bullet" + n]._y = this._y;
_root["bullet" + n]._rotation = deg;
_root["bullet" + n].deg = deg;
n++;
firingRate = firingRateReset;
} else {
firingRate--;
}
}
}
}
}
onClipEvent (mouseDown) {
if (_root.gamePaused == false) {
if (active == true) {
firing = true;
}
}
}
onClipEvent (mouseUp) {
if (_root.gamePaused == false) {
if (active == true) {
firing = false;
}
}
}
Instance of Symbol 209 MovieClip "bullet" in Frame 3
onClipEvent (load) {
if (_root.spreadShot == true) {
deltaX = ((random(100) + 1) / 25) - 1;
deltaY = ((random(100) + 1) / 25) - 1;
} else {
deltaX = 0;
deltaY = 0;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
this._x = this._x + (xSpeed + deltaX);
this._y = this._y + (ySpeed + deltaY);
i = 1;
while (i <= 4) {
if (this.hitTest(_root["wall" + i])) {
if (_root.particleEffects == "high") {
_root.bulletSplash.duplicateMovieClip("bulletSplash" + i, i + 1000);
if (i == 1) {
_root["bulletSplash" + i]._rotation = 180;
this._y = _root["wall" + i]._y;
} else if (i == 2) {
this._x = _root["wall" + i]._x;
_root["bulletSplash" + i]._rotation = 90;
} else if (i == 3) {
this._y = _root["wall" + i]._y;
_root["bulletSplash" + i]._rotation = 0;
} else if (i == 4) {
this._x = _root["wall" + i]._x;
_root["bulletSplash" + i]._rotation = 270;
}
_root["bulletSplash" + i]._x = this._x;
_root["bulletSplash" + i]._y = this._y;
this.removeMovieClip();
} else {
this.removeMovieClip();
}
}
i++;
}
i = _root.codeClip.enemyMin;
while (i <= _root.codeClip.enemyNum) {
if (this.hitTest(_root["enemy" + i].test)) {
if (_root["enemy" + i].enemyDown == false) {
_root["enemy" + i].nextFrame();
}
if (_root.particleEffects == "high") {
_root.bulletSplash.duplicateMovieClip("bulletSplash" + i, i + 1000);
_root["bulletSplash" + i]._rotation = deg - 90;
_root["bulletSplash" + i]._x = this._x;
_root["bulletSplash" + i]._y = this._y;
this.removeMovieClip();
} else {
this.removeMovieClip();
}
}
i++;
}
}
}
Instance of Symbol 221 MovieClip "gameOver" in Frame 3
onClipEvent (load) {
this._alpha = 0;
active = false;
}
onClipEvent (enterFrame) {
if (active == true) {
this.nextFrame();
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
}
}
}
Instance of Symbol 275 MovieClip "upgrades" in Frame 3
onClipEvent (load) {
this._alpha = 0;
active = false;
}
onClipEvent (enterFrame) {
if (active == true) {
this.nextFrame();
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
}
}
}
Instance of Symbol 292 MovieClip "pauseScreen" in Frame 3
onClipEvent (keyDown) {
if (_root.upgrades.active == false) {
if (Key.getCode() == 80) {
this.getNextHighestDepth();
this.swapDepths(5000);
if (_root.gamePaused == false) {
_root.gamePaused = true;
this.gotoAndStop(2);
_root.playSound("pause");
} else {
this.gotoAndStop(1);
_root.gamePaused = false;
_root.playSound("unpause");
}
}
}
}
Frame 4
_root.gotoAndStop("menu");
Symbol 18 MovieClip [bulletSplash] Frame 6
this.removeMovieClip();
Symbol 23 Button
on (release) {
getURL ("http://www.freshnewgames.com", "_blank");
}
Symbol 54 Button
on (release) {
play();
}
Symbol 56 MovieClip Frame 2
if ((getBytesLoaded() / getBytesTotal()) >= 1) {
gotoAndPlay (3);
} else {
freloaderbar.gotoAndStop(int((getBytesLoaded() / getBytesTotal()) * 100));
gotoAndPlay (1);
}
Symbol 56 MovieClip Frame 16
stop();
Symbol 56 MovieClip Frame 89
_root.play();
stop();
Symbol 293 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.31");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 294 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 49
gotoAndStop (1);
Symbol 71 Button
on (release) {
nextFrame();
}
Symbol 73 Button
on (release) {
gotoAndStop ("options");
}
Symbol 75 Button
on (release) {
mochi.MochiScores.showLeaderboard({boardID:"0c0001a92c0f59c8"});
}
Symbol 77 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 79 Button
on (release) {
getURL ("http://www.freshnewgames.com", "_blank");
}
Symbol 82 MovieClip Frame 7
stop();
Symbol 84 MovieClip Frame 14
stop();
Symbol 85 MovieClip Frame 1
i = 1;
while (i <= _root.particles) {
_parent.explosion.particle.duplicateMovieClip("particle" + i, i);
_parent.explosion["particle" + i]._xscale = random(50) + 50;
_parent.explosion["particle" + i]._yscale = random(50) + 50;
_parent.explosion["particle" + i]._rotation = random(360) + 1;
i++;
}
Symbol 86 MovieClip Frame 1
stop();
enemyDown = false;
Symbol 86 MovieClip Frame 2
countdown = true;
enemyDown = true;
if (_root.soundMute == false) {
enemyExplode = new Sound();
enemyExplode.attachSound("enemyExplode");
enemyExplode.setVolume(_root.gameVolume);
enemyExplode.start();
}
if (noBits == false) {
_root.bits = _root.bits + 5;
}
if (noPoints == false) {
_root.score = _root.score + 100;
}
Symbol 88 MovieClip Frame 20
stop();
_parent.movement = true;
Symbol 89 MovieClip Frame 1
stop();
enemyDown = false;
Instance of Symbol 88 MovieClip "rotateMC" in Symbol 89 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.enemyDown == false) {
if (_root.gamePaused == false) {
this._rotation = this._rotation + 20;
}
}
}
Symbol 89 MovieClip Frame 3
countdown = true;
enemyDown = true;
if (_root.soundMute == false) {
enemyExplode = new Sound();
enemyExplode.attachSound("enemyExplode");
enemyExplode.setVolume(_root.gameVolume);
enemyExplode.start();
}
if (noBits == false) {
_root.bits = _root.bits + 5;
}
if (noPoints == false) {
_root.score = _root.score + 250;
}
Symbol 91 MovieClip Frame 10
stop();
_parent.nextFrame();
Symbol 93 MovieClip Frame 120
i = 1;
while (i <= 4) {
enemyNum = _root.codeClip.enemyNum;
_root.enemy3Spawn.duplicateMovieClip("enemy" + enemyNum, enemyNum);
_root["enemy" + enemyNum]._x = _parent._x;
_root["enemy" + enemyNum]._y = _parent._y;
_root["enemy" + enemyNum].number = enemyNum;
if (i == 1) {
_root["enemy" + enemyNum].xSpeed = -5;
_root["enemy" + enemyNum].ySpeed = -2.5;
} else if (i == 2) {
_root["enemy" + enemyNum].xSpeed = -5;
_root["enemy" + enemyNum].ySpeed = 2.5;
} else if (i == 3) {
_root["enemy" + enemyNum].xSpeed = 5;
_root["enemy" + enemyNum].ySpeed = 2.5;
} else if (i == 4) {
_root["enemy" + enemyNum].xSpeed = 5;
_root["enemy" + enemyNum].ySpeed = -2.5;
}
_root.codeClip.enemyNum++;
i++;
}
gotoAndPlay (1);
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 11
countdown = true;
enemyDown = true;
if (_root.soundMute == false) {
enemyExplode = new Sound();
enemyExplode.attachSound("enemyExplode");
enemyExplode.setVolume(_root.gameVolume);
enemyExplode.start();
}
if (noBits == false) {
_root.bits = _root.bits + 15;
}
if (noPoints == false) {
_root.score = _root.score + 500;
}
Symbol 98 MovieClip Frame 1
play();
Symbol 98 MovieClip Frame 10
stop();
_parent.popIn = false;
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 2
countdown = true;
enemyDown = true;
if (_root.soundMute == false) {
enemyExplode = new Sound();
enemyExplode.attachSound("enemyExplode");
enemyExplode.setVolume(_root.gameVolume);
enemyExplode.start();
}
if (noBits == false) {
_root.bits = _root.bits + 5;
}
if (noPoints == false) {
_root.score = _root.score + 250;
}
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 16
stop();
_root.omegaBall._x = -100;
Symbol 109 MovieClip Frame 32
gotoAndPlay (8);
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
_root.playSound("omegaSound");
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 15
gotoAndStop (1);
Symbol 133 Button
on (release) {
stopAllSounds();
_root.nextFrame();
}
Symbol 136 Button
on (release) {
gotoAndStop ("main");
}
Instance of Symbol 142 MovieClip "slider" in Symbol 143 MovieClip Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag(false, 0, -13.3, 200, -13.3);
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Symbol 150 MovieClip Frame 1
stop();
_root.musicMute = false;
Symbol 150 MovieClip Frame 2
_root.musicMute = true;
Symbol 151 MovieClip Frame 1
stop();
_root.soundMute = false;
Symbol 151 MovieClip Frame 2
_root.soundMute = true;
Instance of Symbol 158 MovieClip in Symbol 159 MovieClip Frame 1
onClipEvent (load) {
if (_root.particleEffects == "high") {
this._x = 125;
} else if (_root.particleEffects == "low") {
this._x = -125;
} else if (_root.particleEffects == "medium") {
this._x = 0;
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag(false, -125, 0, 125, 0);
}
}
onClipEvent (mouseUp) {
this.stopDrag();
if (this._x < -50) {
this._x = -125;
_root.particleEffects = "low";
_root.particles = 10;
} else if (this._x > 50) {
this._x = 125;
_root.particleEffects = "high";
_root.particles = 30;
} else {
this._x = 0;
_root.particleEffects = "medium";
_root.particles = 20;
}
}
Instance of Symbol 158 MovieClip in Symbol 160 MovieClip Frame 1
onClipEvent (load) {
if (_root.qualitySetting == "high") {
this._x = 125;
} else if (_root.qualitySetting == "low") {
this._x = -125;
} else if (_root.qualitySetting == "medium") {
this._x = 0;
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag(false, -125, 0, 125, 0);
}
}
onClipEvent (mouseUp) {
this.stopDrag();
if (this._x < -50) {
this._x = -125;
_root._quality = "low";
_root.qualitySetting = "low";
} else if (this._x > 50) {
this._x = 125;
_root._quality = "high";
_root.qualitySetting = "high";
} else {
this._x = 0;
_root._quality = "medium";
_root.qualitySetting = "medium";
}
}
Symbol 164 Button
on (release) {
gotoAndStop (1);
}
Symbol 167 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/108415", "_blank");
}
Symbol 174 Button
on (release) {
getURL ("http://www.doubleedgegames.com", "_blank");
}
Symbol 176 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/62788", "_blank");
}
Symbol 177 MovieClip Frame 1
stop();
Instance of Symbol 117 MovieClip in Symbol 177 MovieClip Frame 2
onClipEvent (enterFrame) {
this.play();
}
Instance of Symbol 143 MovieClip in Symbol 177 MovieClip Frame 3
onClipEvent (load) {
if (_root.gameVolume >= 0) {
this.slider._x = _root.gameVolume * 2;
}
}
onClipEvent (enterFrame) {
_root.gameVolume = Math.ceil(this.slider._x / 2);
_root.sound.setVolume(_root.gameVolume);
}
Instance of Symbol 150 MovieClip in Symbol 177 MovieClip Frame 3
onClipEvent (load) {
if (_root.musicMute == true) {
this.gotoAndStop(2);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (_root.musicMute == false) {
this.nextFrame();
stopAllSounds();
} else {
menuMusic = new Sound();
menuMusic.attachSound("menuMusic");
menuMusic.setVolume(_root.gameVolume);
menuMusic.start(0, 100);
this.prevFrame();
}
}
}
Instance of Symbol 151 MovieClip in Symbol 177 MovieClip Frame 3
onClipEvent (load) {
if (_root.soundMute == true) {
this.gotoAndStop(2);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (_root.soundMute == false) {
this.nextFrame();
} else {
this.prevFrame();
}
}
}
Symbol 179 MovieClip Frame 1
particleNum = _root.particles / 2;
i = 1;
while (i <= particleNum) {
_parent.explosion.particle.duplicateMovieClip("particle" + i, i);
_parent.explosion["particle" + i]._xscale = random(50) + 50;
_parent.explosion["particle" + i]._yscale = random(50) + 50;
_parent.explosion["particle" + i]._rotation = random(360) + 1;
i++;
}
Symbol 180 MovieClip Frame 1
stop();
enemyDown = false;
Symbol 180 MovieClip Frame 2
countdown = true;
enemyDown = true;
if (_root.soundMute == false) {
enemyExplode = new Sound();
enemyExplode.attachSound("enemyExplode");
enemyExplode.setVolume(_root.gameVolume);
enemyExplode.start();
}
if (noBits == false) {
_root.bits = _root.bits + 1;
}
if (noPoints == false) {
_root.score = _root.score + 10;
}
Symbol 183 MovieClip Frame 2
_root.timerBar.refill = true;
_root.playSound("timerBarFill");
Symbol 183 MovieClip Frame 75
_root.timerBar.refill = false;
_root.timerBar.reset();
_root.timerBar.active = true;
_root.codeClip.active = true;
_root.newWave();
active = false;
gotoAndStop (1);
Symbol 198 MovieClip Frame 1
stop();
gameOver = true;
Symbol 198 MovieClip Frame 4
gameOver = false;
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 2
_root.playSound("clearScreen");
Symbol 202 MovieClip Frame 49
_root.upgrades.active = true;
gotoAndStop (1);
Symbol 205 MovieClip Frame 2
_root.playSound("playerSpawn");
Symbol 205 MovieClip Frame 25
_root.codeClip.enemyMin = 1;
_root.codeClip.enemyNum = 1;
_root.codeClip.active = true;
_parent.active = true;
_root.timerBar.active = true;
Symbol 205 MovieClip Frame 106
_parent.invincible = false;
_parent.nextFrame();
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 2
i = _root.codeClip.enemyMin;
while (i <= _root.codeClip.enemyNum) {
_root["enemy" + i].noPoints = true;
_root["enemy" + i].noBits = true;
_root["enemy" + i].gotoAndStop("explode");
i++;
}
_root.playSound("playerDie");
_root.codeClip.active = false;
_parent.active = false;
_root.timerBar.active = false;
_parent.reset();
_parent.firing = false;
_parent.firingRate = 0;
deathTimer = false;
timer = 30;
_root.lives.prevFrame();
_parent.invincible = true;
i = 1;
iMax = _root.particles * 2;
_root.onEnterFrame = function () {
if (_root.gamePaused == false) {
if (deathTimer == false) {
if (i < iMax) {
_parent.dead.particle.duplicateMovieClip("particle" + i, i);
_parent.dead["particle" + i]._xscale = random(50) + 250;
_parent.dead["particle" + i]._yscale = random(50) + 250;
_parent.dead["particle" + i]._rotation = random(360) + 1;
i++;
_parent.dead.particle.duplicateMovieClip("particle" + i, i);
_parent.dead["particle" + i]._xscale = random(50) + 250;
_parent.dead["particle" + i]._yscale = random(50) + 250;
_parent.dead["particle" + i]._rotation = random(360) + 1;
i++;
} else if (_root.lives.gameOver == false) {
deathTimer = true;
} else {
_root.gameOver.active = true;
}
}
if (deathTimer == true) {
timer--;
if (timer <= 0) {
_parent.prevFrame();
}
}
}
};
Symbol 207 MovieClip Frame 1
stop();
Instance of Symbol 205 MovieClip in Symbol 207 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.gamePaused == false) {
this.play();
} else {
this.stop();
}
}
Symbol 207 MovieClip Frame 2
stop();
Symbol 212 Button
on (release) {
mochi.MochiScores.showLeaderboard({boardID:"0c0001a92c0f59c8", score:finalScore});
}
Symbol 214 Button
on (release) {
stopAllSounds();
_root.pauseScreen.getNextHighestDepth();
_root.pauseScreen.removeMovieClip();
i = 1;
while (i <= 1000) {
_root["bullet" + i].removeMovieClip();
_root["enemy" + i].removeMovieClip();
i++;
}
_root.gotoAndStop("menu");
}
Symbol 221 MovieClip Frame 1
stop();
finalScore = 0;
Symbol 221 MovieClip Frame 2
finalScore = _root.score + (_root.bits * 10);
_root.pauseScreen.getNextHighestDepth();
_root.pauseScreen.removeMovieClip();
_root.HPScoreService.postScore(finalScore, "");
_root.kongregateScores.submit(finalScore);
tgh_submitscore(finalScore);
Symbol 230 Button
on (release) {
if (_root.weaponUpgrade == 0) {
if (_root.bits >= 50) {
_root.player.firingRateReset--;
_root.playSound("pause");
upgrade.nextFrame();
_root.weaponUpgrade++;
_root.bits = _root.bits - 50;
} else {
notice.play();
}
} else if (_root.weaponUpgrade == 1) {
if (_root.bits >= 150) {
_root.player.firingRateReset--;
_root.playSound("pause");
upgrade.nextFrame();
_root.weaponUpgrade++;
_root.bits = _root.bits - 150;
} else {
notice.play();
}
} else if (_root.weaponUpgrade == 2) {
if (_root.bits >= 300) {
_root.spreadShot = true;
_root.playSound("pause");
upgrade.nextFrame();
_root.weaponUpgrade++;
_root.bits = _root.bits - 300;
} else {
notice.play();
}
} else if (_root.weaponUpgrade == 3) {
if (_root.bits >= 500) {
_root.player.firingRateReset--;
_root.playSound("pause");
upgrade.nextFrame();
_root.weaponUpgrade++;
_root.bits = _root.bits - 500;
} else {
notice.play();
}
} else if (_root.weaponUpgrade == 4) {
if (_root.bits >= 750) {
_root.player.firingRateReset--;
_root.playSound("pause");
upgrade.nextFrame();
_root.weaponUpgrade++;
_root.bits = _root.bits - 750;
} else {
notice.play();
}
}
}
Symbol 262 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 6
Symbol 265 Button
on (release) {
if (_root.lives._currentframe != 10) {
if (_root.bits >= 1000) {
_root.lives.nextFrame();
_root.bits = _root.bits - 1000;
} else {
notice.play();
}
}
}
Symbol 270 Button
on (release) {
_root.upgrades.active = false;
_root.upgrades._alpha = 0;
_root.player.active = true;
_root.waveMC.play();
_root.waveMC.active = true;
_root.wave++;
_root.player.reset();
_root.codeClip.enemyMin = 1;
_root.codeClip.enemyNum = 1;
prevFrame();
}
Symbol 274 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 31
gotoAndStop (1);
Symbol 275 MovieClip Frame 1
stop();
Instance of Symbol 262 MovieClip "upgrade" in Symbol 275 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(_root.weaponUpgrade + 1);
}
Symbol 279 Button
on (release) {
nextFrame();
}
Symbol 282 Button
on (release) {
gotoAndStop (4);
}
Symbol 287 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("menu");
_root.gamePaused = false;
i = 1;
while (i <= 1000) {
_root["bullet" + i].removeMovieClip();
_root["enemy" + i].removeMovieClip();
i++;
}
_root.pauseScreen.getNextHighestDepth();
_root.pauseScreen.removeMovieClip();
}
Symbol 290 Button
on (release) {
prevFrame();
}
Symbol 291 Button
on (release) {
gotoAndStop (2);
}
Symbol 292 MovieClip Frame 1
stop();
Instance of Symbol 143 MovieClip in Symbol 292 MovieClip Frame 2
onClipEvent (load) {
if (_root.gameVolume >= 0) {
this.slider._x = _root.gameVolume * 2;
}
}
onClipEvent (enterFrame) {
_root.gameVolume = Math.ceil(this.slider._x / 2);
_root.sound.setVolume(_root.gameVolume);
}
Instance of Symbol 150 MovieClip in Symbol 292 MovieClip Frame 2
onClipEvent (load) {
if (_root.musicMute == true) {
this.gotoAndStop(2);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (_root.musicMute == false) {
this.nextFrame();
stopAllSounds();
} else {
menuMusic = new Sound();
menuMusic.attachSound("gameMusic");
menuMusic.setVolume(_root.gameVolume);
menuMusic.start(0, 100);
this.prevFrame();
}
}
}
Instance of Symbol 151 MovieClip in Symbol 292 MovieClip Frame 2
onClipEvent (load) {
if (_root.soundMute == true) {
this.gotoAndStop(2);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (_root.soundMute == false) {
this.nextFrame();
} else {
this.prevFrame();
}
}
}
Instance of Symbol 117 MovieClip in Symbol 292 MovieClip Frame 4
onClipEvent (enterFrame) {
this.play();
}