Frame 1
function deadClick() {
}
function gotoMySite() {
getURL ("http://www.avgames.co.uk", "_blank");
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var copyrightNotice = new ContextMenuItem("\u00A9 2008 stoneagegames.com", deadClick);
copyrightNotice.separatorBefore = true;
var mySiteLink = new ContextMenuItem("Designed by avgames.co.uk", gotoMySite);
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
_root.loadBar._width = getPercent * 100;
_root.loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(4);
}
Instance of Symbol 30 MovieClip in Frame 1
on (release) {
getURL ("http://www.stoneagegames.com", "_blank");
}
Frame 2
gotoAndPlay (1);
Frame 3
stopAllSounds();
Frame 4
stopAllSounds();
_root.attachMovie("setin", "setin", 3, {_x:5, _y:382});
setin._alpha = 0;
_root.attachMovie("sound_contr", "sound_contr", 4, {_x:470, _y:3000});
sound_contr._alpha = 0;
Instance of Symbol 570 MovieClip in Frame 5
on (release) {
getURL ("http://www.stoneagegames.com", "_blank");
}
Frame 6
stopAllSounds();
stop();
won = false;
score = 0;
gun = 0;
qset = 0;
num = 0;
clickedStart = false;
qualityControl.qual.text = "High";
lives = 5;
mission = 1;
gameOn = false;
startG.onRelease = function () {
clickedStart = true;
gotoAndStop ("controls");
};
logoSmall.onPress = function () {
getURL ("http://www.stoneagegames.com", "_blank");
};
Instance of Symbol 584 MovieClip in Frame 6
on (release) {
getURL (" http://www.stoneagegames.com/hiscore/9", "_blank");
}
Instance of Symbol 585 MovieClip in Frame 6
on (release) {
getURL ("http://www.stoneagegames.com", "_blank");
}
Frame 7
stop();
startB.onRelease = function () {
gotoAndStop ("stage1");
};
Frame 8
stop();
stopAllSounds();
gun = 0;
if (lives > -1) {
score = 0;
if (mission == 1) {
_root.gotoAndPlay("stage1");
}
if (mission == 2) {
_root.gotoAndPlay("stage2");
}
if (mission == 3) {
_root.gotoAndPlay("stage3");
}
if (mission == 4) {
_root.gotoAndPlay("stage4");
}
if (mission == 5) {
_root.gotoAndPlay("stage5");
}
}
Frame 9
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 10);
hit_._y = hit_._y + ((endY - hit_._y) - 10);
}
function skipit() {
if (ready > 0) {
ready = 5;
}
}
function removepowerbell() {
i = powerbell.length - 1;
while (i >= 0) {
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
i--;
}
}
function removebossHealth() {
i = bossHealth.length - 1;
while (i >= 0) {
bossHealth[i].removeMovieClip();
bossHealth.splice(i, 1);
i--;
}
}
function removeBoss() {
i = bosses.length - 1;
while (i >= 0) {
bosses[i].removeMovieClip();
bosses.splice(i, 1);
i--;
}
}
function removeEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
i--;
}
}
function removeBullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
i--;
}
}
function removeenemies() {
i = enemies.length - 1;
while (i >= 0) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
i--;
}
}
function removeenemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removewaveNum() {
i = waveNum.length - 1;
while (i >= 0) {
waveNum[i].removeMovieClip();
waveNum.splice(i, 1);
i--;
}
}
function removespecial() {
i = special.length - 1;
while (i >= 0) {
special[i].removeMovieClip();
special.splice(i, 1);
i--;
}
}
function removepowerUp1() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
i--;
}
}
function playersHealthBar() {
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
}
function BossHealthBar() {
i = bosses.length - 1;
while (i >= 0) {
bossHealthBar._xscale = bossHealth[i];
if (bossHealth[i] < 25) {
bossHealthBar.gotoAndStop("normal");
} else {
bossHealthBar.gotoAndStop("max");
}
i--;
}
}
function death() {
if (playerHealth < 1) {
playerHealth = 0;
if (un == 1) {
lives--;
un = 0;
}
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
brg.removeMovieClip();
gameOn = false;
alive = false;
player.gotoAndStop("dead");
stopAllSounds();
}
}
function collectPowerUp() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i]._rotation = powerUp1[i]._rotation + 10;
if (powerUp1[i].hitTest(hit_)) {
collectPup_sound.start();
powerUpOnScreen = false;
randomNum++;
_root.attachMovie("explosion2", "explosion2" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun++;
if (gun > 4) {
gun = 4;
}
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
}
i--;
}
}
function collectBell() {
i = powerbell.length - 1;
while (i >= 0) {
if (powerbell[i].hitTest(hit_)) {
score = score + 300;
collectPup_sound.start();
randomNum++;
bellPop = _root.attachMovie("explosion_pup", "explosion_pup" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
bellPop._xscale = 170;
bellPop._yscale = 170;
randomNum++;
plusTen = _root.attachMovie("plusTen", "plusTen" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
}
i--;
}
}
function dropBell() {
randomNumber++;
bell = _root.attachMovie("bell", "bell" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerbell.push(bell);
bell._xscale = 170;
bell._yscale = 170;
bell.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 150);
this._y = this._y + ((endY - this._y) / 150);
};
}
function dropPowerUp() {
randomNumber++;
StarShot = _root.attachMovie("pup", "star" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerUp1.push(StarShot);
StarShot.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 30);
this._y = this._y + ((endY - this._y) / 30);
};
}
function playerHitByEnemyBullet() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function playerHitByBoss() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
player._x = player._x - 10;
}
i--;
}
}
function playerHit() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
tango_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function EnemyBulletHitBomb() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(deathBomb)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function enemyHitBomb() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(deathBomb)) {
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 10;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
i--;
}
}
function bossBombed() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(deathBomb)) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
brg.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 1000;
}
}
i--;
}
}
function bossSot() {
i = bosses.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (bosses[i].hitTest(bullets[j])) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 0.1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
brg.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 1000;
}
}
j--;
}
i--;
}
}
function enemySot() {
i = enemies.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (enemies[i].hitTest(bullets[j]) or enemies[i].hitTest(deathBomb)) {
score = score + 5;
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyMovement() {
i = enemies.length - 1;
while (i >= 0) {
if (waveNum[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemies[i]._x = enemies[i]._x + ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y + ((endY - enemies[i]._y) / 60);
if (player._x > enemies[i]._x) {
enemies[i]._xscale = -100;
} else {
enemies[i]._xscale = 100;
}
}
if (waveNum[i] == 2) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 3) {
enemies[i]._xscale = 250;
enemies[i]._yscale = 250;
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
}
if (waveNum[i] == 4) {
enemies[i]._rotation = -90;
enemies[i]._y = enemies[i]._y + enemySpeed;
}
if (waveNum[i] == 4.5) {
enemies[i]._rotation = 90;
enemies[i]._y = enemies[i]._y - enemySpeed;
}
if (waveNum[i] == 5) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6) {
enemies[i]._y = enemies[i]._y + 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6.5) {
enemies[i]._y = enemies[i]._y - 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 7) {
enemies[i]._xscale = -250;
enemies[i]._yscale = 250;
enemies[i]._x = enemies[i]._x + (enemySpeed / 1.5);
special[i]--;
if (special[i] == 0) {
shake++;
randomNum++;
_root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
randomNum++;
enemy1 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x + 15, _y:enemies[i]._y});
enemies.push(enemy1);
enemyHealth.push(1);
waveNum.push(1);
randomNum++;
enemy2 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x - 15, _y:enemies[i]._y});
enemies.push(enemy2);
waveNum.push(1);
enemyHealth.push(1);
randomNum++;
enemy3 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y - 15});
enemies.push(enemy3);
enemyHealth.push(1);
waveNum.push(1);
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
if (waveNum[i] == 9) {
special[i]--;
enemies[i]._xscale = 250;
enemies[i]._yscale = 250;
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("enemy_shot", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
}
};
}
}
i--;
}
}
function attackTimers() {
if (Start) {
attackOneTimer--;
attackOneTimer2--;
attackOneTimer3--;
attackOneTimer4--;
attackOneTimer5--;
attackOneTimer6--;
attackOneTimer7--;
attackOneTimer8--;
attackOneTimer9--;
if (attackOneTimer == 1) {
attackOneTimer = 0;
position = 1;
minus = 3;
attackOneTimer2 = 160;
}
if (attackOneTimer2 == 1) {
attackOneTimer2 = 0;
position = 1;
minus = 3;
attackOneTimer3 = 320;
}
if (attackOneTimer3 == 1) {
attackOneTimer3 = 0;
position = 1;
minus = 3;
attackOneTimer4 = 320;
}
if (attackOneTimer4 == 1) {
attackOneTimer4 = 0;
position = 1;
minus = 3;
attackOneTimer5 = 320;
}
if (attackOneTimer5 == 1) {
attackOneTimer5 = 0;
position = 1;
minus = 3;
attackOneTimer6 = 320;
}
if (attackOneTimer6 == 1) {
attackOneTimer6 = 0;
position = 1;
minus = 3;
attackOneTimer7 = 320;
}
if (attackOneTimer7 == 1) {
attackOneTimer7 = 0;
position = 1;
minus = 3;
attackOneTimer8 = 160;
}
if (attackOneTimer8 == 1) {
attackOneTimer8 = 0;
position = 1;
minus = 3;
attackOneTimer9 = 320;
}
if (attackOneTimer9 == 1) {
attackOneTimer9 = 0;
position = 1;
minus = 3;
points.removeMovieClip();
_root.attachMovie("healthBar2", "bossHealthBar", _root.getNextHighestDepth(), {_x:400, _y:20});
_root.attachMovie("barBoarder2", "barBoarder2", _root.getNextHighestDepth(), {_x:400, _y:20});
FirstBoss = _root.attachMovie("bossOne", "bossOne", 999999, {_x:900, _y:200});
bosses.push(FirstBoss);
bossHealth.push(100);
_root.attachMovie("brg", "brg", 999998);
brg._alpha = 0;
brg.onEnterFrame = function () {
brg._x = FirstBoss._x + 50;
brg._y = FirstBoss._y;
if (brg._alpha > 100) {
brg._alpha = 100;
}
if (FirstBoss._x == 430) {
brg._alpha = brg._alpha + 10;
}
};
FirstBoss.onEnterFrame = function () {
if (!Pause) {
if (this._x > 430) {
this._x = this._x - 2;
}
if (goingUp) {
if (this._x == 430) {
this._y = this._y - 1;
}
}
if (goingDown) {
if (this._x == 430) {
this._y = this._y + 1;
}
}
if (this._y == 145) {
goingUp = false;
goingDown = true;
}
if (this._y == 250) {
goingUp = true;
goingDown = false;
}
}
if (brg._alpha > 100) {
if (!Pause) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:brg._x - 235, _y:brg._y + 80});
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 12;
}
};
}
if (position == 2) {
randomNum++;
bulletGD2 = _root.attachMovie("bossBullet", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:brg._x - 235, _y:brg._y + 80});
enemyBullet.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
if (!Pause) {
this._y = this._y + 18;
this._x = this._x - 8;
}
};
randomNum++;
bulletGU3 = _root.attachMovie("bossBullet", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:brg._x - 235, _y:brg._y + 80});
enemyBullet.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
if (!Pause) {
this._y = this._y - 18;
this._x = this._x - 8;
}
};
randomNum++;
bulletU2 = _root.attachMovie("bossBullet", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:brg._x - 200, _y:brg._y + 170});
enemyBullet.push(bulletU2);
bulletU2.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
this._y = this._y + 5;
}
};
randomNum++;
bulletD3 = _root.attachMovie("bossBullet", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:brg._x - 235, _y:brg._y + 80});
enemyBullet.push(bulletD3);
bulletD3.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
this._y = this._y - 5;
}
};
}
if (position == 1) {
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:brg._x - 235, _y:brg._y + 80});
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 12;
}
};
}
}
enemyBullet.push(eBullet);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
};
}
}
}
function attachEnemy() {
if (Start) {
if (attackOneTimer > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(1);
enemyHealth.push(1);
}
}
if (attackOneTimer2 > 0) {
if ((timeLastEnemyAttached + 700) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(2);
enemyHealth.push(1);
}
}
if (attackOneTimer3 > 0) {
if ((timeLastEnemyAttached + 3000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer4 > 0) {
if ((timeLastEnemyAttached + 600) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 7) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:425, _y:-30});
waveNum.push(4);
}
if (position == 6) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:275, _y:570});
waveNum.push(4.5);
}
if (position == 5) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:125, _y:-30});
waveNum.push(4);
}
if (position == 4) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:450, _y:570});
waveNum.push(4.5);
}
if (position == 3) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:350, _y:-30});
waveNum.push(4);
}
if (position == 2) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:200, _y:570});
waveNum.push(4.5);
}
if (position == 1) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:50, _y:-30});
waveNum.push(4);
}
enemies.push(enemy);
enemyHealth.push(3);
minus--;
if (minus == 0) {
position--;
minus = 5;
}
if (position == 0) {
position = 7;
}
}
}
if (attackOneTimer5 > 0) {
if ((timeLastEnemyAttached + 400) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(5);
enemyHealth.push(3);
}
}
if (attackOneTimer6 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 2) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:440});
waveNum.push(6.5);
}
if (position == 1) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:-40});
waveNum.push(6);
}
enemies.push(enemy);
enemyHealth.push(5);
minus--;
if (minus == 0) {
position--;
minus = 5;
}
if (position == 0) {
position = 2;
}
}
}
if (attackOneTimer7 > 0) {
if ((timeLastEnemyAttached + 3000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:-10, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:-10, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:-10, _y:150});
}
enemies.push(enemy);
waveNum.push(7);
special.push(32);
enemyHealth.push(15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
}
if (attackOneTimer8 > 0) {
if ((timeLastEnemyAttached + 700) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(1);
enemyHealth.push(3);
}
}
if (attackOneTimer9 > 0) {
if ((timeLastEnemyAttached + 3000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("enemy_one", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(9);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
}
function noOverLap() {
i = enemies.length - 1;
while (i >= 0) {
j = enemies.length - 1;
while (j >= 0) {
if (!(enemies[i] === enemies[j])) {
if (enemies[i].hitTest(enemies[j])) {
endX = _root.enemies[j]._x;
endY = _root.enemies[j]._y;
enemies[i]._x = enemies[i]._x - ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y - ((endY - enemies[i]._y) / 60);
}
}
j--;
}
i--;
}
}
function ereaseEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
if ((((enemyBullet[i]._x > 550) or (enemyBullet[i]._x < 0)) or (enemyBullet[i]._y > 400)) or (enemyBullet[i]._y < 0)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function ereaseBullets() {
i = bullets.length - 1;
while (i >= 0) {
if ((((bullets[i]._x > 550) or (bullets[i]._x < 0)) or (bullets[i]._y > 400)) or (bullets[i]._y < 0)) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
}
i--;
}
}
function ereaseEnemies() {
i = enemies.length - 1;
while (i >= 0) {
if ((((enemies[i]._x > 750) or (enemies[i]._x < -100)) or (enemies[i]._y > 600)) or (enemies[i]._y < -100)) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function beingHit() {
if (alive) {
if (taking_damage) {
ouch = ouch - 1;
player.gotoAndStop("hit");
if (ouch == 0) {
taking_damage = false;
ouch = 5;
}
}
}
}
function bomb() {
if (alive) {
if (dropBomb) {
boom = boom - 1;
player.gotoAndStop("bomb");
if (boom == 0) {
dropBomb = false;
canDrop = true;
boom = 18;
bombNum--;
}
}
}
}
function playerBounds() {
if (player._x > 510) {
player._x = 510;
}
if (player._x < 40) {
player._x = 40;
}
if (player._y > 370) {
player._y = 370;
}
if (player._y < 30) {
player._y = 30;
}
}
function playerMovement() {
if (alive) {
if (!taking_damage) {
if (!dropBomb) {
if (!shooting) {
player.gotoAndStop("normal");
}
if (shooting) {
player.gotoAndStop("shooting");
}
if (Key.isDown(38) or Key.isDown(87)) {
player._y = player._y - speed;
}
if (Key.isDown(39) or Key.isDown(68)) {
player._x = player._x + speed;
}
if (Key.isDown(37) or Key.isDown(65)) {
player._x = player._x - speed;
}
if (Key.isDown(40) or Key.isDown(83)) {
player._y = player._y + speed;
}
}
}
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function fire() {
if (shooting) {
if (gun == 0) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "standard shot_mc" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
}
}
if (gun == 1) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 2) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 3) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
}
}
if (gun == 4) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGU3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
randomNum++;
bulletU4 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU4);
bulletU4.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 13;
};
randomNum++;
bulletD5 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD5);
bulletD5.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 13;
};
}
}
}
}
function firing() {
if (gameOn) {
if (canDrop) {
if (Key.isDown(88)) {
if (bombNum > 0) {
dropBomb = true;
_root.attachMovie("playerEffect", "playerEffect", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.attachMovie("deathBomb", "deathBomb", 2);
dropDabomb_sound.start();
canDrop = false;
}
}
}
if (Key.isDown(90) or Key.isDown(80)) {
pullitfire_sound.start();
shooting = true;
} else {
shooting = false;
}
}
}
function showBombNumber() {
if (bombNum == 3) {
bombCounter.gotoAndStop("three");
}
if (bombNum == 2) {
bombCounter.gotoAndStop("two");
}
if (bombNum == 1) {
bombCounter.gotoAndStop("one");
}
if (bombNum == 0) {
bombCounter.gotoAndStop("zero");
}
}
function StaeCompleted() {
if (completed) {
stageClear.sc.text = score;
if (score < target) {
score = score + 4;
}
if (score == target) {
if (once == 0) {
_root.attachMovie("fade", "fade", _root.getNextHighestDepth());
once = 1;
}
completedTimer++;
}
if (completedTimer == 64) {
stopAllSounds();
gameOn = false;
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
backdrop_c.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
stageClear.removeMovieClip();
player.removeMovieClip();
bullshit1.removeMovieClip();
hit_.removeMovieClip();
soundstages.removeMovieClip();
_root.gotoAndStop("stage2");
}
}
}
function pause_game() {
if (!Pause) {
if (Key.isDown(80)) {
Pause = true;
_root.attachMovie("pauseScreen", "pauseScreen", _root.getNextHighestDepth(), {_x:0, _y:0});
sound_contr._alpha = 100;
sound_contr._y = 380;
_root.attachMovie("qualityControl", "qualityControl", _root.getNextHighestDepth(), {_x:5, _y:382});
}
}
}
function unpause_game() {
if (Pause) {
if (Key.isDown(85)) {
Pause = false;
sound_contr._alpha = 0;
sound_contr._y = 3000;
qualityControl.removeMovieClip();
pauseScreen.removeMovieClip();
}
}
}
stop();
setin._alpha = 100;
Pause = false;
mission = 1;
pullitfire_sound = new Sound();
pullitfire_sound.attachSound("pullitfire");
dropDabomb_sound = new Sound();
dropDabomb_sound.attachSound("dropDabomb");
collectPup_sound = new Sound();
collectPup_sound.attachSound("collectPup");
tango_sound = new Sound();
tango_sound.attachSound("soundfoe");
boom_sound = new Sound();
boom_sound.attachSound("boom");
_root.attachMovie("backdrop_c", "backdrop_c", 1);
_root.attachMovie("bullshit1", "bullshit1", _root.getNextHighestDepth(), {_x:18, _y:45});
_root.attachMovie("points", "points", _root.getNextHighestDepth(), {_x:300, _y:0});
_root.attachMovie("bombCounter", "bombCounter", _root.getNextHighestDepth(), {_x:160, _y:28});
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:20, _y:20});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:18, _y:20});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:80, _y:200});
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth());
hit_._alpha = 0;
_root.attachMovie("st1_mc", "st1_mc", _root.getNextHighestDepth(), {_x:275, _y:200});
onMouseDown = function () {
if ((_xmouse > 390) && (_ymouse > 360)) {
skipit();
}
};
ready = 2299;
barBoarder.lvs.text = lives;
un = 1;
target = 0;
once = 0;
goingUp = true;
goingDown = false;
alive = true;
gOt = 29;
speed = 7;
bombNum = 3;
pinkCombo = 0;
blueCombo = 0;
randomNum = 0;
randomNumber = 0;
canDrop = true;
Start = false;
StartTimer = 121;
taking_damage = false;
shootingBeam = false;
bulletSpeed = 25;
completed = false;
completedTimer = 0;
ouch = 5;
shake = 0;
beamTimer = 22;
enemySpeed = 10;
playerHealth = 100;
timeOfLastShot = 0;
dropBomb = false;
boom = 18;
timeLastEnemyAttached = 0;
powerUpOnScreen = false;
shooting = false;
var bullets = new Array();
var enemies = new Array();
var enemyBullet = new Array();
var enemyHealth = new Array();
var waveNum = new Array();
var special = new Array();
var powerUp1 = new Array();
var bosses = new Array();
var bossHealth = new Array();
var powerbell = new Array();
minus = 3;
position = 1;
attackOneTimer = 320;
attackOneTimer2 = 0;
attackOneTimer3 = 0;
attackOneTimer4 = 0;
attackOneTimer5 = 0;
attackOneTimer6 = 0;
attackOneTimer7 = 0;
attackOneTimer8 = 0;
attackOneTimer9 = 0;
crosshair.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
};
player.onEnterFrame = function () {
if (!Pause) {
ready--;
if (ready == 1) {
st1_mc.removeMovieClip();
_root.attachMovie("sounds1", "soundstages", _root.getNextHighestDepth());
_root.attachMovie("fadeIn", "fadeIn", _root.getNextHighestDepth());
_root.attachMovie("lvl1", "lvl1", _root.getNextHighestDepth(), {_x:125, _y:150});
gameOn = true;
}
if (ready < 0) {
ready = 0;
}
if (ready == 0) {
StartTimer--;
}
if (StartTimer == 0) {
Start = true;
StartTimer = 0;
}
if (!dropBomb) {
fire();
}
if (bombNum < 0) {
bombNum == 0;
}
points.pts.text = score;
playerMovement();
firing();
ereaseBullets();
playerBounds();
attachEnemy();
enemyMovement();
noOverLap();
enemySot();
shaker();
playerHit();
beingHit();
collectPowerUp();
attackTimers();
ereaseEnemies();
death();
playersHealthBar();
bomb();
enemyHitBomb();
showBombNumber();
playerHitByEnemyBullet();
ereaseEnemyBullets();
EnemyBulletHitBomb();
BossHealthBar();
bossSot();
bossBombed();
playerHitByBoss();
collectBell();
StaeCompleted();
attachHit_();
}
};
setin.onEnterFrame = function () {
if (gameOn) {
pause_game();
unpause_game();
}
if (!alive) {
gOt--;
}
if (gOt < 0) {
backdrop_c.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
points.removeMovieClip();
player.removeMovieClip();
bullshit1.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
if (lives < 0) {
gotoAndStop ("submit");
} else {
_root.gotoAndStop("reset");
}
}
if (Key.isDown(81)) {
if (num == 0) {
qset++;
num = 1;
}
} else {
num = 0;
}
if (qset == 0) {
qualityControl.qual.text = "High";
_quality = "high";
}
if (qset == 1) {
qualityControl.qual.text = "Medium";
_quality = "medium";
}
if (qset == 2) {
qualityControl.qual.text = "Low";
_quality = "low";
}
if (qset > 2) {
qset = 0;
}
};
Frame 10
function skipit() {
if (ready > 0) {
ready = 5;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 10);
hit_._y = hit_._y + ((endY - hit_._y) - 10);
}
function removepowerbell() {
i = powerbell.length - 1;
while (i >= 0) {
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
i--;
}
}
function removebossHealth() {
i = bossHealth.length - 1;
while (i >= 0) {
bossHealth[i].removeMovieClip();
bossHealth.splice(i, 1);
i--;
}
}
function removeBoss() {
i = bosses.length - 1;
while (i >= 0) {
bosses[i].removeMovieClip();
bosses.splice(i, 1);
i--;
}
}
function removeEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
i--;
}
}
function removeBullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
i--;
}
}
function removeenemies() {
i = enemies.length - 1;
while (i >= 0) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
i--;
}
}
function removeenemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removewaveNum() {
i = waveNum.length - 1;
while (i >= 0) {
waveNum[i].removeMovieClip();
waveNum.splice(i, 1);
i--;
}
}
function removespecial() {
i = special.length - 1;
while (i >= 0) {
special[i].removeMovieClip();
special.splice(i, 1);
i--;
}
}
function removepowerUp1() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
i--;
}
}
function playersHealthBar() {
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
}
function BossHealthBar() {
i = bosses.length - 1;
while (i >= 0) {
bossHealthBar._xscale = bossHealth[i];
if (bossHealth[i] < 25) {
bossHealthBar.gotoAndStop("normal");
} else {
bossHealthBar.gotoAndStop("max");
}
i--;
}
}
function death() {
if (playerHealth < 1) {
playerHealth = 0;
if (un == 1) {
lives--;
un = 0;
}
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
bbg.removeMovieClip();
gameOn = false;
alive = false;
player.gotoAndStop("dead");
stopAllSounds();
}
}
function collectPowerUp() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i]._rotation = powerUp1[i]._rotation + 10;
if (powerUp1[i].hitTest(hit_)) {
collectPup_sound.start();
powerUpOnScreen = false;
randomNum++;
_root.attachMovie("explosion2", "explosion2" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun++;
if (gun > 4) {
gun = 4;
}
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
}
i--;
}
}
function collectBell() {
i = powerbell.length - 1;
while (i >= 0) {
if (powerbell[i].hitTest(hit_)) {
score = score + 300;
collectPup_sound.start();
randomNum++;
bellPop = _root.attachMovie("explosion_pup", "explosion_pup" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
bellPop._xscale = 170;
bellPop._yscale = 170;
randomNum++;
plusTen = _root.attachMovie("plusTen", "plusTen" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
}
i--;
}
}
function dropBell() {
randomNumber++;
bell = _root.attachMovie("bell", "bell" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerbell.push(bell);
bell._xscale = 170;
bell._yscale = 170;
bell.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 150);
this._y = this._y + ((endY - this._y) / 150);
};
}
function dropPowerUp() {
randomNumber++;
StarShot = _root.attachMovie("pup", "star" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerUp1.push(StarShot);
StarShot.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 30);
this._y = this._y + ((endY - this._y) / 30);
};
}
function playerHitByEnemyBullet() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function playerHitByBoss() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
player._x = player._x - 10;
}
i--;
}
}
function playerHit() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
tango_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function EnemyBulletHitBomb() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(deathBomb)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function enemyHitBomb() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(deathBomb)) {
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 10;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
i--;
}
}
function bossBombed() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(deathBomb)) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
bbg.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 2000;
}
}
i--;
}
}
function bossSot() {
i = bosses.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (bosses[i].hitTest(bullets[j])) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 0.1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
bbg.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 2000;
}
}
j--;
}
i--;
}
}
function enemySot() {
i = enemies.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (enemies[i].hitTest(bullets[j]) or enemies[i].hitTest(deathBomb)) {
score = score + 5;
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyMovement() {
i = enemies.length - 1;
while (i >= 0) {
if (waveNum[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemies[i]._x = enemies[i]._x + ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y + ((endY - enemies[i]._y) / 60);
if (player._x > enemies[i]._x) {
enemies[i]._xscale = -100;
} else {
enemies[i]._xscale = 100;
}
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("enemy_shot", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
}
};
}
}
if (waveNum[i] == 2) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 3) {
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
}
};
}
}
if (waveNum[i] == 4) {
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("enemy_shot", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
}
};
}
}
if (waveNum[i] == 4.5) {
enemies[i]._x = enemies[i]._x - (enemySpeed * 2);
}
if (waveNum[i] == 5) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6) {
enemies[i]._y = enemies[i]._y + 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6.5) {
enemies[i]._y = enemies[i]._y - 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 7) {
enemies[i]._xscale = -250;
enemies[i]._yscale = 250;
enemies[i]._x = enemies[i]._x + (enemySpeed / 1.5);
special[i]--;
if (special[i] == 0) {
shake++;
randomNum++;
_root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
randomNum++;
enemy1 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x + 15, _y:enemies[i]._y});
enemies.push(enemy1);
enemyHealth.push(1);
waveNum.push(1);
randomNum++;
enemy2 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x - 15, _y:enemies[i]._y});
enemies.push(enemy2);
waveNum.push(1);
enemyHealth.push(1);
randomNum++;
enemy3 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y - 15});
enemies.push(enemy3);
enemyHealth.push(1);
waveNum.push(1);
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
if (waveNum[i] == 9) {
special[i]--;
enemies[i]._x = enemies[i]._x - enemySpeed;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
}
};
}
}
i--;
}
}
function attackTimers() {
if (Start) {
attackOneTimer--;
attackOneTimer2--;
attackOneTimer3--;
attackOneTimer4--;
attackOneTimer5--;
attackOneTimer6--;
attackOneTimer7--;
attackOneTimer8--;
attackOneTimer9--;
if (attackOneTimer == 1) {
attackOneTimer = 0;
position = 1;
minus = 3;
attackOneTimer2 = 160;
}
if (attackOneTimer2 == 1) {
attackOneTimer2 = 0;
position = 1;
minus = 3;
attackOneTimer3 = 320;
}
if (attackOneTimer3 == 1) {
attackOneTimer3 = 0;
position = 1;
minus = 3;
attackOneTimer4 = 320;
}
if (attackOneTimer4 == 1) {
attackOneTimer4 = 0;
position = 1;
minus = 3;
attackOneTimer5 = 320;
}
if (attackOneTimer5 == 1) {
attackOneTimer5 = 0;
position = 1;
minus = 3;
attackOneTimer6 = 320;
}
if (attackOneTimer6 == 1) {
attackOneTimer6 = 0;
position = 1;
minus = 3;
attackOneTimer7 = 320;
}
if (attackOneTimer7 == 1) {
attackOneTimer7 = 0;
position = 1;
minus = 3;
attackOneTimer8 = 160;
}
if (attackOneTimer8 == 1) {
attackOneTimer8 = 0;
position = 1;
minus = 3;
attackOneTimer9 = 320;
}
if (attackOneTimer9 == 1) {
attackOneTimer9 = 0;
position = 1;
minus = 3;
points.removeMovieClip();
_root.attachMovie("healthBar2", "bossHealthBar", _root.getNextHighestDepth(), {_x:400, _y:20});
_root.attachMovie("barBoarder2", "barBoarder2", _root.getNextHighestDepth(), {_x:400, _y:20});
SecondBoss = _root.attachMovie("bossTwo", "bossTwo", _root.getNextHighestDepth(), {_x:900, _y:200});
bosses.push(SecondBoss);
bossHealth.push(100);
_root.attachMovie("bbg", "bbg", _root.getNextHighestDepth(), {_x:SecondBoss._x, _y:SecondBoss._y});
bbg.onEnterFrame = function () {
endY = _root.player._y;
bbg._y = bbg._y + ((endY - bbg._y) / 100);
bbg._x = SecondBoss._x;
};
SecondBoss.onEnterFrame = function () {
if (!Pause) {
if (this._x > 400) {
this._x = this._x - 2;
}
if (goingUp) {
if (this._x == 400) {
this._y = this._y - 1;
}
}
if (goingDown) {
if (this._x == 400) {
this._y = this._y + 1;
}
}
if (this._y == 145) {
goingUp = false;
goingDown = true;
}
if (this._y == 250) {
goingUp = true;
goingDown = false;
}
}
if (!Pause) {
specialAttackTimer--;
if (specialAttackTimer < 0) {
if ((timeLastEnemyAttached + 100) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
eBullet = _root.attachMovie("bossBullet2", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:bbg._x, _y:bbg._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 12;
}
};
}
}
if (specialAttackTimer == -96) {
sickEmBoys();
specialAttackTimer = 64;
}
}
};
}
}
}
function sickEmBoys() {
i = bosses.length - 1;
while (i >= 0) {
randomNum++;
bulletGD2 = _root.attachMovie("bossBullet2", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bbg._x, _y:bbg._y});
enemyBullet.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
if (!Pause) {
this._y = this._y + 5;
this._x = this._x - 1;
}
};
randomNum++;
bulletGU3 = _root.attachMovie("bossBullet2", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bbg._x, _y:bbg._y});
enemyBullet.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
if (!Pause) {
this._y = this._y - 5;
this._x = this._x - 1;
}
};
randomNum++;
bulletU2 = _root.attachMovie("bossBullet2", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bbg._x, _y:bbg._y});
enemyBullet.push(bulletU2);
bulletU2.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 3;
this._y = this._y + 1;
}
};
randomNum++;
bulletD3 = _root.attachMovie("bossBullet2", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bbg._x, _y:bbg._y});
enemyBullet.push(bulletD3);
bulletD3.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 3;
this._y = this._y - 1;
}
};
randomNum++;
bulletU4 = _root.attachMovie("bossBullet2", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bbg._x, _y:bbg._y});
enemyBullet.push(bulletU4);
bulletU4.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
this._y = this._y + 4;
}
};
randomNum++;
bulletD5 = _root.attachMovie("bossBullet2", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bbg._x, _y:bbg._y});
enemyBullet.push(bulletD5);
bulletD5.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
this._y = this._y - 4;
}
};
i--;
}
}
function attachEnemy() {
if (Start) {
if (attackOneTimer > 0) {
if ((timeLastEnemyAttached + 2000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("lineEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("lineEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("lineEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(10);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer2 > 0) {
if ((timeLastEnemyAttached + 600) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("midgetEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(2);
enemyHealth.push(5);
special.push(Math.round(Math.random() * 17) + 15);
}
}
if (attackOneTimer3 > 0) {
if ((timeLastEnemyAttached + 3000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("smallEnemy2", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("smallEnemy2", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("smallEnemy2", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(9);
enemyHealth.push(10);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer4 > 0) {
if ((timeLastEnemyAttached + 2000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 7) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:280});
waveNum.push(4);
}
if (position == 6) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:200});
waveNum.push(4.5);
}
if (position == 5) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
waveNum.push(4);
}
if (position == 4) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:250});
waveNum.push(4.5);
}
if (position == 3) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:275});
waveNum.push(4);
}
if (position == 2) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:50});
waveNum.push(4.5);
}
if (position == 1) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:350});
waveNum.push(4);
}
special.push(Math.round(Math.random() * 17) + 15);
enemies.push(enemy);
enemyHealth.push(5);
minus--;
if (minus == 0) {
position--;
minus = 5;
}
if (position == 0) {
position = 7;
}
}
}
if (attackOneTimer5 > 0) {
if ((timeLastEnemyAttached + 800) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallEnemy2", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
special.push(Math.round(Math.random() * 17) + 15);
waveNum.push(1);
enemyHealth.push(15);
}
}
if (attackOneTimer6 > 0) {
if ((timeLastEnemyAttached + 3000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("lineEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("lineEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("lineEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(9);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer7 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("midgetEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(4);
enemyHealth.push(5);
special.push(Math.round(Math.random() * 17) + 15);
}
}
}
if (attackOneTimer8 > 0) {
if ((timeLastEnemyAttached + 6000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemy._xscale = 250;
enemy._yscale = 250;
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(50);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer9 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("redEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemy._xscale = 250;
enemy._yscale = 250;
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
}
function noOverLap() {
i = enemies.length - 1;
while (i >= 0) {
j = enemies.length - 1;
while (j >= 0) {
if (!(enemies[i] === enemies[j])) {
if (enemies[i].hitTest(enemies[j])) {
endX = _root.enemies[j]._x;
endY = _root.enemies[j]._y;
enemies[i]._x = enemies[i]._x - ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y - ((endY - enemies[i]._y) / 60);
}
}
j--;
}
i--;
}
}
function ereaseEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
if ((((enemyBullet[i]._x > 550) or (enemyBullet[i]._x < 0)) or (enemyBullet[i]._y > 400)) or (enemyBullet[i]._y < 0)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function ereaseBullets() {
i = bullets.length - 1;
while (i >= 0) {
if ((((bullets[i]._x > 550) or (bullets[i]._x < 0)) or (bullets[i]._y > 400)) or (bullets[i]._y < 0)) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
}
i--;
}
}
function ereaseEnemies() {
i = enemies.length - 1;
while (i >= 0) {
if ((((enemies[i]._x > 750) or (enemies[i]._x < -100)) or (enemies[i]._y > 600)) or (enemies[i]._y < -100)) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function beingHit() {
if (alive) {
if (taking_damage) {
ouch = ouch - 1;
player.gotoAndStop("hit");
if (ouch == 0) {
taking_damage = false;
ouch = 5;
}
}
}
}
function bomb() {
if (alive) {
if (dropBomb) {
boom = boom - 1;
player.gotoAndStop("bomb");
if (boom == 0) {
dropBomb = false;
canDrop = true;
boom = 18;
bombNum--;
}
}
}
}
function playerBounds() {
if (player._x > 510) {
player._x = 510;
}
if (player._x < 40) {
player._x = 40;
}
if (player._y > 370) {
player._y = 370;
}
if (player._y < 30) {
player._y = 30;
}
}
function playerMovement() {
if (alive) {
if (!taking_damage) {
if (!dropBomb) {
if (!shooting) {
player.gotoAndStop("normal");
}
if (shooting) {
player.gotoAndStop("shooting");
}
if (Key.isDown(38)) {
player._y = player._y - speed;
}
if (Key.isDown(39)) {
player._x = player._x + speed;
}
if (Key.isDown(37)) {
player._x = player._x - speed;
}
if (Key.isDown(40)) {
player._y = player._y + speed;
}
}
}
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function fire() {
if (shooting) {
if (gun == 0) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "standard shot_mc" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
}
}
if (gun == 1) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 2) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 3) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
}
}
if (gun == 4) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGU3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
randomNum++;
bulletU4 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU4);
bulletU4.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 13;
};
randomNum++;
bulletD5 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD5);
bulletD5.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 13;
};
}
}
}
}
function firing() {
if (gameOn) {
if (canDrop) {
if (Key.isDown(88)) {
if (bombNum > 0) {
dropBomb = true;
_root.attachMovie("playerEffect", "playerEffect", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.attachMovie("deathBomb", "deathBomb", 2);
dropDabomb_sound.start();
canDrop = false;
}
}
}
if (Key.isDown(90)) {
pullitfire_sound.start();
shooting = true;
} else {
shooting = false;
}
}
}
function showBombNumber() {
if (bombNum == 3) {
bombCounter.gotoAndStop("three");
}
if (bombNum == 2) {
bombCounter.gotoAndStop("two");
}
if (bombNum == 1) {
bombCounter.gotoAndStop("one");
}
if (bombNum == 0) {
bombCounter.gotoAndStop("zero");
}
}
function StaeCompleted() {
if (completed) {
stageClear.sc.text = score;
if (score < target) {
score = score + 8;
}
if (score == target) {
if (once == 0) {
_root.attachMovie("fade", "fade", _root.getNextHighestDepth());
once = 1;
}
completedTimer++;
}
if (completedTimer == 64) {
stopAllSounds();
gameOn = false;
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
background2.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
stageClear.removeMovieClip();
player.removeMovieClip();
bullshit1.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
_root.gotoAndStop("stage3");
}
}
}
function pause_game() {
if (!Pause) {
if (Key.isDown(80)) {
Pause = true;
_root.attachMovie("pauseScreen", "pauseScreen", _root.getNextHighestDepth(), {_x:0, _y:0});
sound_contr._alpha = 100;
sound_contr._y = 380;
_root.attachMovie("qualityControl", "qualityControl", _root.getNextHighestDepth(), {_x:5, _y:382});
}
}
}
function unpause_game() {
if (Pause) {
if (Key.isDown(85)) {
Pause = false;
sound_contr._alpha = 0;
sound_contr._y = 3000;
qualityControl.removeMovieClip();
pauseScreen.removeMovieClip();
}
}
}
stop();
_root.attachMovie("sounds2", "soundstages", _root.getNextHighestDepth());
Pause = false;
mission = 2;
pullitfire_sound = new Sound();
pullitfire_sound.attachSound("pullitfire");
dropDabomb_sound = new Sound();
dropDabomb_sound.attachSound("dropDabomb");
collectPup_sound = new Sound();
collectPup_sound.attachSound("collectPup");
tango_sound = new Sound();
tango_sound.attachSound("soundfoe");
boom_sound = new Sound();
boom_sound.attachSound("boom");
_root.attachMovie("background2", "background2", 1);
_root.attachMovie("bullshit2", "bullshit1", _root.getNextHighestDepth(), {_x:18, _y:45});
_root.attachMovie("points", "points", _root.getNextHighestDepth(), {_x:300, _y:0});
_root.attachMovie("bombCounter", "bombCounter", _root.getNextHighestDepth(), {_x:160, _y:28});
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:20, _y:20});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:18, _y:20});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:80, _y:200});
_root.attachMovie("st2_mc", "st2_mc", _root.getNextHighestDepth(), {_x:275, _y:200});
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth());
onMouseDown = function () {
skipit();
};
hit_._alpha = 0;
ready = 40;
barBoarder.lvs.text = lives;
un = 1;
target = 0;
once = 0;
goingUp = true;
goingDown = false;
alive = true;
gOt = 29;
speed = 7;
bombNum = 3;
pinkCombo = 0;
blueCombo = 0;
randomNum = 0;
randomNumber = 0;
canDrop = true;
Start = false;
StartTimer = 121;
taking_damage = false;
shootingBeam = false;
bulletSpeed = 25;
completed = false;
completedTimer = 0;
ouch = 5;
shake = 0;
beamTimer = 22;
enemySpeed = 10;
playerHealth = 100;
timeOfLastShot = 0;
dropBomb = false;
boom = 18;
specialAttackTimer = 64;
timeLastEnemyAttached = 0;
powerUpOnScreen = false;
shooting = false;
var bullets = new Array();
var enemies = new Array();
var enemyBullet = new Array();
var enemyHealth = new Array();
var waveNum = new Array();
var special = new Array();
var powerUp1 = new Array();
var bosses = new Array();
var bossHealth = new Array();
var powerbell = new Array();
minus = 3;
position = 1;
attackOneTimer = 320;
attackOneTimer2 = 0;
attackOneTimer3 = 0;
attackOneTimer4 = 0;
attackOneTimer5 = 0;
attackOneTimer6 = 0;
attackOneTimer7 = 0;
attackOneTimer8 = 0;
attackOneTimer9 = 0;
crosshair.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
};
player.onEnterFrame = function () {
if (!Pause) {
ready--;
if (ready == 1) {
st2_mc.removeMovieClip();
_root.attachMovie("fadeIn", "fadeIn", _root.getNextHighestDepth());
_root.attachMovie("lvl2", "lvl2", _root.getNextHighestDepth(), {_x:125, _y:150});
gameOn = true;
}
if (ready < 0) {
ready = 0;
}
if (ready == 0) {
StartTimer--;
}
if (StartTimer == 0) {
Start = true;
StartTimer = 0;
}
if (!dropBomb) {
fire();
}
if (bombNum < 0) {
bombNum == 0;
}
points.pts.text = score;
playerMovement();
firing();
ereaseBullets();
playerBounds();
attachEnemy();
enemyMovement();
noOverLap();
enemySot();
shaker();
playerHit();
beingHit();
collectPowerUp();
attackTimers();
ereaseEnemies();
death();
playersHealthBar();
bomb();
enemyHitBomb();
showBombNumber();
playerHitByEnemyBullet();
ereaseEnemyBullets();
EnemyBulletHitBomb();
BossHealthBar();
bossSot();
bossBombed();
playerHitByBoss();
collectBell();
StaeCompleted();
attachHit_();
}
};
setin.onEnterFrame = function () {
if (gameOn) {
pause_game();
unpause_game();
}
if (!alive) {
gOt--;
}
if (gOt < 0) {
backdrop_c.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
points.removeMovieClip();
player.removeMovieClip();
bullshit1.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
if (lives < 0) {
gotoAndStop ("submit");
} else {
_root.gotoAndStop("reset");
}
}
if (Key.isDown(81)) {
if (num == 0) {
qset++;
num = 1;
}
} else {
num = 0;
}
if (qset == 0) {
qualityControl.qual.text = "High";
_quality = "high";
}
if (qset == 1) {
qualityControl.qual.text = "Medium";
_quality = "medium";
}
if (qset == 2) {
qualityControl.qual.text = "Low";
_quality = "low";
}
if (qset > 2) {
qset = 0;
}
};
Frame 11
function skipit() {
if (ready > 0) {
ready = 5;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 10);
hit_._y = hit_._y + ((endY - hit_._y) - 10);
}
function removepowerbell() {
i = powerbell.length - 1;
while (i >= 0) {
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
i--;
}
}
function removebossHealth() {
i = bossHealth.length - 1;
while (i >= 0) {
bossHealth[i].removeMovieClip();
bossHealth.splice(i, 1);
i--;
}
}
function removeBoss() {
i = bosses.length - 1;
while (i >= 0) {
bosses[i].removeMovieClip();
bosses.splice(i, 1);
i--;
}
}
function removeEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
i--;
}
}
function removeBullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
i--;
}
}
function removeenemies() {
i = enemies.length - 1;
while (i >= 0) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
i--;
}
}
function removeenemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removewaveNum() {
i = waveNum.length - 1;
while (i >= 0) {
waveNum[i].removeMovieClip();
waveNum.splice(i, 1);
i--;
}
}
function removespecial() {
i = special.length - 1;
while (i >= 0) {
special[i].removeMovieClip();
special.splice(i, 1);
i--;
}
}
function removepowerUp1() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
i--;
}
}
function playersHealthBar() {
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
}
function BossHealthBar() {
i = bosses.length - 1;
while (i >= 0) {
bossHealthBar._xscale = bossHealth[i];
if (bossHealth[i] < 25) {
bossHealthBar.gotoAndStop("normal");
} else {
bossHealthBar.gotoAndStop("max");
}
i--;
}
}
function death() {
if (playerHealth < 1) {
playerHealth = 0;
if (un == 1) {
lives--;
un = 0;
}
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
gameOn = false;
alive = false;
player.gotoAndStop("dead");
stopAllSounds();
}
}
function collectPowerUp() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i]._rotation = powerUp1[i]._rotation + 10;
if (powerUp1[i].hitTest(hit_)) {
collectPup_sound.start();
powerUpOnScreen = false;
randomNum++;
_root.attachMovie("explosion2", "explosion2" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun++;
if (gun > 4) {
gun = 4;
}
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
}
i--;
}
}
function collectBell() {
i = powerbell.length - 1;
while (i >= 0) {
if (powerbell[i].hitTest(hit_)) {
score = score + 300;
collectPup_sound.start();
randomNum++;
bellPop = _root.attachMovie("explosion_pup", "explosion_pup" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
bellPop._xscale = 170;
bellPop._yscale = 170;
randomNum++;
plusTen = _root.attachMovie("plusTen", "plusTen" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
}
i--;
}
}
function dropBell() {
randomNumber++;
bell = _root.attachMovie("bell", "bell" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerbell.push(bell);
bell._xscale = 170;
bell._yscale = 170;
bell.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 150);
this._y = this._y + ((endY - this._y) / 150);
};
}
function dropPowerUp() {
randomNumber++;
StarShot = _root.attachMovie("pup", "star" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerUp1.push(StarShot);
StarShot.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 30);
this._y = this._y + ((endY - this._y) / 30);
};
}
function playerHitByEnemyBullet() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function playerHitByBoss() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
player._x = player._x - 10;
}
i--;
}
}
function playerHit() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
tango_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function EnemyBulletHitBomb() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(deathBomb)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function enemyHitBomb() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(deathBomb)) {
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 10;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
i--;
}
}
function bossBombed() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(deathBomb)) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 2000;
}
}
i--;
}
}
function bossSot() {
i = bosses.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (bosses[i].hitTest(bullets[j])) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 0.1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 2000;
}
}
j--;
}
i--;
}
}
function enemySot() {
i = enemies.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (enemies[i].hitTest(bullets[j]) or enemies[i].hitTest(deathBomb)) {
score = score + 5;
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyMovement() {
i = enemies.length - 1;
while (i >= 0) {
if (waveNum[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemies[i]._x = enemies[i]._x + ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y + ((endY - enemies[i]._y) / 60);
if (player._x > enemies[i]._x) {
enemies[i]._xscale = -100;
} else {
enemies[i]._xscale = 100;
}
}
if (waveNum[i] == 2) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 3) {
enemies[i]._xscale = 250;
enemies[i]._yscale = 250;
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
}
if (waveNum[i] == 4) {
enemies[i]._rotation = -90;
enemies[i]._y = enemies[i]._y + enemySpeed;
}
if (waveNum[i] == 4.5) {
enemies[i]._rotation = 90;
enemies[i]._y = enemies[i]._y - enemySpeed;
}
if (waveNum[i] == 5) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6) {
enemies[i]._y = enemies[i]._y + 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6.5) {
enemies[i]._y = enemies[i]._y - 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 7) {
enemies[i]._xscale = -250;
enemies[i]._yscale = 250;
enemies[i]._x = enemies[i]._x + (enemySpeed / 1.5);
special[i]--;
if (special[i] == 0) {
shake++;
randomNum++;
_root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
randomNum++;
enemy1 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x + 15, _y:enemies[i]._y});
enemies.push(enemy1);
enemyHealth.push(1);
waveNum.push(1);
randomNum++;
enemy2 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x - 15, _y:enemies[i]._y});
enemies.push(enemy2);
waveNum.push(1);
enemyHealth.push(1);
randomNum++;
enemy3 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y - 15});
enemies.push(enemy3);
enemyHealth.push(1);
waveNum.push(1);
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
if (waveNum[i] == 9) {
special[i]--;
enemies[i]._xscale = 250;
enemies[i]._yscale = 250;
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("enemy_shot", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
}
};
}
}
i--;
}
}
function attackTimers() {
if (Start) {
attackOneTimer--;
attackOneTimer2--;
attackOneTimer3--;
attackOneTimer4--;
attackOneTimer5--;
attackOneTimer6--;
attackOneTimer7--;
attackOneTimer8--;
attackOneTimer9--;
if (attackOneTimer == 1) {
attackOneTimer = 0;
position = 1;
minus = 3;
attackOneTimer2 = 160;
}
if (attackOneTimer2 == 1) {
attackOneTimer2 = 0;
position = 1;
minus = 3;
attackOneTimer3 = 320;
}
if (attackOneTimer3 == 1) {
attackOneTimer3 = 0;
position = 1;
minus = 3;
attackOneTimer4 = 320;
}
if (attackOneTimer4 == 1) {
attackOneTimer4 = 0;
position = 1;
minus = 3;
attackOneTimer5 = 320;
}
if (attackOneTimer5 == 1) {
attackOneTimer5 = 0;
position = 1;
minus = 3;
attackOneTimer6 = 320;
}
if (attackOneTimer6 == 1) {
attackOneTimer6 = 0;
position = 1;
minus = 3;
attackOneTimer7 = 320;
}
if (attackOneTimer7 == 1) {
attackOneTimer7 = 0;
position = 1;
minus = 3;
attackOneTimer8 = 320;
}
if (attackOneTimer8 == 1) {
attackOneTimer8 = 0;
position = 1;
minus = 3;
attackOneTimer9 = 160;
}
if (attackOneTimer9 == 1) {
attackOneTimer9 = 0;
position = 1;
minus = 3;
points.removeMovieClip();
_root.attachMovie("healthBar2", "bossHealthBar", _root.getNextHighestDepth(), {_x:400, _y:20});
_root.attachMovie("barBoarder2", "barBoarder2", _root.getNextHighestDepth(), {_x:400, _y:20});
FirstBoss = _root.attachMovie("bosson3", "bosson3", _root.getNextHighestDepth(), {_x:900, _y:200});
bosses.push(FirstBoss);
bossHealth.push(100);
FirstBoss.onEnterFrame = function () {
if (!Pause) {
if (this._x > 400) {
this._x = this._x - 2;
}
}
if (!Pause) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
eBullet = _root.attachMovie("lit", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:FirstBoss._x, _y:FirstBoss._y - 100});
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 12;
}
};
}
if (position == 2) {
eBullet = _root.attachMovie("lit", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:FirstBoss._x, _y:FirstBoss._y});
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 18;
}
};
}
if (position == 1) {
eBullet = _root.attachMovie("lit", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:FirstBoss._x, _y:FirstBoss._y + 100});
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 12;
}
};
}
enemyBullet.push(eBullet);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
};
}
}
}
function attachEnemy() {
if (Start) {
if (attackOneTimer > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(1);
enemyHealth.push(1);
}
}
if (attackOneTimer2 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(2);
enemyHealth.push(1);
}
}
if (attackOneTimer3 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("midgetEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("midgetEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("midgetEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(30);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer4 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 7) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:425, _y:-30});
waveNum.push(4);
}
if (position == 6) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:275, _y:570});
waveNum.push(4.5);
}
if (position == 5) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:125, _y:-30});
waveNum.push(4);
}
if (position == 4) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:450, _y:570});
waveNum.push(4.5);
}
if (position == 3) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:350, _y:-30});
waveNum.push(4);
}
if (position == 2) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:200, _y:570});
waveNum.push(4.5);
}
if (position == 1) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:50, _y:-30});
waveNum.push(4);
}
enemies.push(enemy);
enemyHealth.push(6);
minus--;
if (minus == 0) {
position--;
minus = 5;
}
if (position == 0) {
position = 7;
}
}
}
if (attackOneTimer5 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallEnemy2", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(5);
enemyHealth.push(3);
}
}
if (attackOneTimer6 > 0) {
if ((timeLastEnemyAttached + 800) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 2) {
enemy = _root.attachMovie("midgetEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:440});
waveNum.push(6.5);
}
if (position == 1) {
enemy = _root.attachMovie("midgetEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:-40});
waveNum.push(6);
}
enemies.push(enemy);
enemyHealth.push(5);
minus--;
if (minus == 0) {
position--;
minus = 5;
}
if (position == 0) {
position = 2;
}
}
}
if (attackOneTimer7 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:-10, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:-10, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:-10, _y:150});
}
enemies.push(enemy);
waveNum.push(7);
special.push(32);
enemyHealth.push(15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
}
if (attackOneTimer8 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("midgetEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(1);
enemyHealth.push(3);
}
}
if (attackOneTimer9 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("smallEnemy2", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("smallEnemy2", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("smallEnemy2", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(9);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
}
function noOverLap() {
i = enemies.length - 1;
while (i >= 0) {
j = enemies.length - 1;
while (j >= 0) {
if (!(enemies[i] === enemies[j])) {
if (enemies[i].hitTest(enemies[j])) {
endX = _root.enemies[j]._x;
endY = _root.enemies[j]._y;
enemies[i]._x = enemies[i]._x - ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y - ((endY - enemies[i]._y) / 60);
}
}
j--;
}
i--;
}
}
function ereaseEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
if ((((enemyBullet[i]._x > 550) or (enemyBullet[i]._x < 0)) or (enemyBullet[i]._y > 400)) or (enemyBullet[i]._y < 0)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function ereaseBullets() {
i = bullets.length - 1;
while (i >= 0) {
if ((((bullets[i]._x > 550) or (bullets[i]._x < 0)) or (bullets[i]._y > 400)) or (bullets[i]._y < 0)) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
}
i--;
}
}
function ereaseEnemies() {
i = enemies.length - 1;
while (i >= 0) {
if ((((enemies[i]._x > 750) or (enemies[i]._x < -100)) or (enemies[i]._y > 600)) or (enemies[i]._y < -100)) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function beingHit() {
if (alive) {
if (taking_damage) {
ouch = ouch - 1;
player.gotoAndStop("hit");
if (ouch == 0) {
taking_damage = false;
ouch = 5;
}
}
}
}
function bomb() {
if (alive) {
if (dropBomb) {
boom = boom - 1;
player.gotoAndStop("bomb");
if (boom == 0) {
dropBomb = false;
canDrop = true;
boom = 18;
bombNum--;
}
}
}
}
function playerBounds() {
if (player._x > 510) {
player._x = 510;
}
if (player._x < 40) {
player._x = 40;
}
if (player._y > 370) {
player._y = 370;
}
if (player._y < 30) {
player._y = 30;
}
}
function playerMovement() {
if (alive) {
if (!taking_damage) {
if (!dropBomb) {
if (!shooting) {
player.gotoAndStop("normal");
}
if (shooting) {
player.gotoAndStop("shooting");
}
if (Key.isDown(38)) {
player._y = player._y - speed;
}
if (Key.isDown(39)) {
player._x = player._x + speed;
}
if (Key.isDown(37)) {
player._x = player._x - speed;
}
if (Key.isDown(40)) {
player._y = player._y + speed;
}
}
}
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function fire() {
if (shooting) {
if (gun == 0) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "standard shot_mc" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
}
}
if (gun == 1) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 2) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 3) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
}
}
if (gun == 4) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGU3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
randomNum++;
bulletU4 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU4);
bulletU4.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 13;
};
randomNum++;
bulletD5 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD5);
bulletD5.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 13;
};
}
}
}
}
function firing() {
if (gameOn) {
if (canDrop) {
if (Key.isDown(88)) {
if (bombNum > 0) {
dropBomb = true;
_root.attachMovie("playerEffect", "playerEffect", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.attachMovie("deathBomb", "deathBomb", 2);
dropDabomb_sound.start();
canDrop = false;
}
}
}
if (Key.isDown(90)) {
pullitfire_sound.start();
shooting = true;
} else {
shooting = false;
}
}
}
function showBombNumber() {
if (bombNum == 3) {
bombCounter.gotoAndStop("three");
}
if (bombNum == 2) {
bombCounter.gotoAndStop("two");
}
if (bombNum == 1) {
bombCounter.gotoAndStop("one");
}
if (bombNum == 0) {
bombCounter.gotoAndStop("zero");
}
}
function StaeCompleted() {
if (completed) {
stageClear.sc.text = score;
if (score < target) {
score = score + 8;
}
if (score == target) {
if (once == 0) {
_root.attachMovie("fade", "fade", _root.getNextHighestDepth());
once = 1;
}
completedTimer++;
}
if (completedTimer == 64) {
stopAllSounds();
won = true;
gameOn = false;
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
backGround.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
stageClear.removeMovieClip();
player.removeMovieClip();
bullshit1.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
_root.gotoAndStop("stage4");
}
}
}
function pause_game() {
if (!Pause) {
if (Key.isDown(80)) {
Pause = true;
_root.attachMovie("pauseScreen", "pauseScreen", _root.getNextHighestDepth(), {_x:0, _y:0});
sound_contr._alpha = 100;
sound_contr._y = 380;
_root.attachMovie("qualityControl", "qualityControl", _root.getNextHighestDepth(), {_x:5, _y:382});
}
}
}
function unpause_game() {
if (Pause) {
if (Key.isDown(85)) {
Pause = false;
sound_contr._alpha = 0;
sound_contr._y = 3000;
qualityControl.removeMovieClip();
pauseScreen.removeMovieClip();
}
}
}
stop();
Pause = false;
mission = 3;
pullitfire_sound = new Sound();
pullitfire_sound.attachSound("pullitfire");
dropDabomb_sound = new Sound();
dropDabomb_sound.attachSound("dropDabomb");
collectPup_sound = new Sound();
collectPup_sound.attachSound("collectPup");
tango_sound = new Sound();
tango_sound.attachSound("soundfoe");
boom_sound = new Sound();
boom_sound.attachSound("boom");
_root.attachMovie("backGround", "backGround", 1, {_x:0, _y:-115});
_root.attachMovie("bullshit3", "bullshit1", _root.getNextHighestDepth(), {_x:18, _y:45});
_root.attachMovie("points", "points", _root.getNextHighestDepth(), {_x:300, _y:0});
_root.attachMovie("bombCounter", "bombCounter", _root.getNextHighestDepth(), {_x:160, _y:28});
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:20, _y:20});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:18, _y:20});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:80, _y:200});
_root.attachMovie("st3_mc", "st3_mc", _root.getNextHighestDepth(), {_x:275, _y:200});
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth());
onMouseDown = function () {
if ((_xmouse > 390) && (_ymouse > 360)) {
skipit();
}
};
hit_._alpha = 0;
ready = 614;
barBoarder.lvs.text = lives;
un = 1;
target = 0;
once = 0;
goingUp = true;
goingDown = false;
alive = true;
gOt = 29;
speed = 7;
bombNum = 3;
pinkCombo = 0;
blueCombo = 0;
randomNum = 0;
randomNumber = 0;
canDrop = true;
Start = false;
StartTimer = 121;
taking_damage = false;
shootingBeam = false;
bulletSpeed = 25;
completed = false;
completedTimer = 0;
ouch = 5;
shake = 0;
beamTimer = 22;
enemySpeed = 10;
playerHealth = 100;
timeOfLastShot = 0;
dropBomb = false;
boom = 18;
specialAttackTimer = 64;
timeLastEnemyAttached = 0;
powerUpOnScreen = false;
shooting = false;
var bullets = new Array();
var enemies = new Array();
var enemyBullet = new Array();
var enemyHealth = new Array();
var waveNum = new Array();
var special = new Array();
var powerUp1 = new Array();
var bosses = new Array();
var bossHealth = new Array();
var powerbell = new Array();
minus = 3;
position = 1;
attackOneTimer = 320;
attackOneTimer2 = 0;
attackOneTimer3 = 0;
attackOneTimer4 = 0;
attackOneTimer5 = 0;
attackOneTimer6 = 0;
attackOneTimer7 = 0;
attackOneTimer8 = 0;
attackOneTimer9 = 0;
crosshair.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
};
player.onEnterFrame = function () {
if (!Pause) {
ready--;
if (ready == 1) {
st3_mc.removeMovieClip();
_root.attachMovie("sounds3", "soundstages", _root.getNextHighestDepth());
_root.attachMovie("fadeIn", "fadeIn", _root.getNextHighestDepth());
_root.attachMovie("lvl3", "lvl3", _root.getNextHighestDepth(), {_x:125, _y:150});
gameOn = true;
}
if (ready < 0) {
ready = 0;
}
if (ready == 0) {
StartTimer--;
}
if (StartTimer == 0) {
Start = true;
StartTimer = 0;
}
if (!dropBomb) {
fire();
}
if (bombNum < 0) {
bombNum == 0;
}
points.pts.text = score;
playerMovement();
firing();
ereaseBullets();
playerBounds();
attachEnemy();
enemyMovement();
noOverLap();
enemySot();
shaker();
playerHit();
beingHit();
collectPowerUp();
attackTimers();
ereaseEnemies();
death();
playersHealthBar();
bomb();
enemyHitBomb();
showBombNumber();
playerHitByEnemyBullet();
ereaseEnemyBullets();
EnemyBulletHitBomb();
BossHealthBar();
bossSot();
bossBombed();
playerHitByBoss();
collectBell();
StaeCompleted();
attachHit_();
}
};
setin.onEnterFrame = function () {
if (gameOn) {
pause_game();
unpause_game();
}
if (!alive) {
gOt--;
}
if (gOt < 0) {
backdrop_c.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
points.removeMovieClip();
player.removeMovieClip();
bullshit1.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
if (lives < 0) {
gotoAndStop ("submit");
} else {
_root.gotoAndStop("reset");
}
}
if (Key.isDown(81)) {
if (num == 0) {
qset++;
num = 1;
}
} else {
num = 0;
}
if (qset == 0) {
qualityControl.qual.text = "High";
_quality = "high";
}
if (qset == 1) {
qualityControl.qual.text = "Medium";
_quality = "medium";
}
if (qset == 2) {
qualityControl.qual.text = "Low";
_quality = "low";
}
if (qset > 2) {
qset = 0;
}
};
Frame 12
function skipit() {
if (ready > 0) {
ready = 5;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 10);
hit_._y = hit_._y + ((endY - hit_._y) - 10);
}
function removepowerbell() {
i = powerbell.length - 1;
while (i >= 0) {
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
i--;
}
}
function removebossHealth() {
i = bossHealth.length - 1;
while (i >= 0) {
bossHealth[i].removeMovieClip();
bossHealth.splice(i, 1);
i--;
}
}
function removeBoss() {
i = bosses.length - 1;
while (i >= 0) {
bosses[i].removeMovieClip();
bosses.splice(i, 1);
i--;
}
}
function removeEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
i--;
}
}
function removeBullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
i--;
}
}
function removeenemies() {
i = enemies.length - 1;
while (i >= 0) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
i--;
}
}
function removeenemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removewaveNum() {
i = waveNum.length - 1;
while (i >= 0) {
waveNum[i].removeMovieClip();
waveNum.splice(i, 1);
i--;
}
}
function removespecial() {
i = special.length - 1;
while (i >= 0) {
special[i].removeMovieClip();
special.splice(i, 1);
i--;
}
}
function removepowerUp1() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
i--;
}
}
function playersHealthBar() {
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
}
function BossHealthBar() {
i = bosses.length - 1;
while (i >= 0) {
bossHealthBar._xscale = bossHealth[i];
if (bossHealth[i] < 25) {
bossHealthBar.gotoAndStop("normal");
} else {
bossHealthBar.gotoAndStop("max");
}
i--;
}
}
function death() {
if (playerHealth < 1) {
playerHealth = 0;
if (un == 1) {
lives--;
un = 0;
}
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
gameOn = false;
alive = false;
player.gotoAndStop("dead");
stopAllSounds();
}
}
function collectPowerUp() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i]._rotation = powerUp1[i]._rotation + 10;
if (powerUp1[i].hitTest(hit_)) {
collectPup_sound.start();
powerUpOnScreen = false;
randomNum++;
_root.attachMovie("explosion2", "explosion2" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun++;
if (gun > 4) {
gun = 4;
}
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
}
i--;
}
}
function collectBell() {
i = powerbell.length - 1;
while (i >= 0) {
if (powerbell[i].hitTest(hit_)) {
score = score + 300;
collectPup_sound.start();
randomNum++;
bellPop = _root.attachMovie("explosion_pup", "explosion_pup" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
bellPop._xscale = 170;
bellPop._yscale = 170;
randomNum++;
plusTen = _root.attachMovie("plusTen", "plusTen" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
}
i--;
}
}
function dropBell() {
randomNumber++;
bell = _root.attachMovie("bell", "bell" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerbell.push(bell);
bell._xscale = 170;
bell._yscale = 170;
bell.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 150);
this._y = this._y + ((endY - this._y) / 150);
};
}
function dropPowerUp() {
randomNumber++;
StarShot = _root.attachMovie("pup", "star" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerUp1.push(StarShot);
StarShot.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 30);
this._y = this._y + ((endY - this._y) / 30);
};
}
function playerHitByEnemyBullet() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function playerHitByBoss() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
player._x = player._x - 10;
}
i--;
}
}
function playerHit() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
tango_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function EnemyBulletHitBomb() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(deathBomb)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function enemyHitBomb() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(deathBomb)) {
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 10;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
i--;
}
}
function bossBombed() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(deathBomb)) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
fgl1.removeMovieClip();
fgl2.removeMovieClip();
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 2000;
}
}
i--;
}
}
function bossSot() {
i = bosses.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (bosses[i].hitTest(bullets[j])) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 0.1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
fgl1.removeMovieClip();
fgl2.removeMovieClip();
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 2000;
}
}
j--;
}
i--;
}
}
function enemySot() {
i = enemies.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (enemies[i].hitTest(bullets[j]) or enemies[i].hitTest(deathBomb)) {
score = score + 5;
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyMovement() {
i = enemies.length - 1;
while (i >= 0) {
if (waveNum[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemies[i]._x = enemies[i]._x + ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y + ((endY - enemies[i]._y) / 60);
if (player._x > enemies[i]._x) {
enemies[i]._xscale = -100;
} else {
enemies[i]._xscale = 100;
}
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("enemy_shot", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
}
};
}
}
if (waveNum[i] == 2) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 3) {
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
}
};
}
}
if (waveNum[i] == 4) {
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("enemy_shot", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
}
};
}
}
if (waveNum[i] == 4.5) {
enemies[i]._x = enemies[i]._x - (enemySpeed * 2);
}
if (waveNum[i] == 5) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6) {
enemies[i]._y = enemies[i]._y + 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6.5) {
enemies[i]._y = enemies[i]._y - 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 7) {
enemies[i]._xscale = -170;
enemies[i]._yscale = 170;
enemies[i]._x = enemies[i]._x + (enemySpeed / 1.5);
special[i]--;
if (special[i] == 0) {
shake++;
randomNum++;
_root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
randomNum++;
enemy1 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x + 15, _y:enemies[i]._y});
enemies.push(enemy1);
enemyHealth.push(1);
waveNum.push(1);
randomNum++;
enemy2 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x - 15, _y:enemies[i]._y});
enemies.push(enemy2);
waveNum.push(1);
enemyHealth.push(1);
randomNum++;
enemy3 = _root.attachMovie("tinyEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y - 15});
enemies.push(enemy3);
enemyHealth.push(1);
waveNum.push(1);
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
if (waveNum[i] == 9) {
special[i]--;
enemies[i]._x = enemies[i]._x - enemySpeed;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
}
};
}
}
i--;
}
}
function attackTimers() {
if (Start) {
attackOneTimer--;
attackOneTimer2--;
attackOneTimer3--;
attackOneTimer4--;
attackOneTimer5--;
attackOneTimer6--;
attackOneTimer7--;
attackOneTimer8--;
attackOneTimer9--;
if (attackOneTimer == 1) {
attackOneTimer = 0;
position = 1;
minus = 3;
attackOneTimer2 = 160;
}
if (attackOneTimer2 == 1) {
attackOneTimer2 = 0;
position = 1;
minus = 3;
attackOneTimer3 = 320;
}
if (attackOneTimer3 == 1) {
attackOneTimer3 = 0;
position = 1;
minus = 3;
attackOneTimer4 = 320;
}
if (attackOneTimer4 == 1) {
attackOneTimer4 = 0;
position = 1;
minus = 3;
attackOneTimer5 = 320;
}
if (attackOneTimer5 == 1) {
attackOneTimer5 = 0;
position = 1;
minus = 3;
attackOneTimer6 = 320;
}
if (attackOneTimer6 == 1) {
attackOneTimer6 = 0;
position = 1;
minus = 3;
attackOneTimer7 = 320;
}
if (attackOneTimer7 == 1) {
attackOneTimer7 = 0;
position = 1;
minus = 3;
attackOneTimer8 = 320;
}
if (attackOneTimer8 == 1) {
attackOneTimer8 = 0;
position = 1;
minus = 3;
attackOneTimer9 = 320;
}
if (attackOneTimer9 == 1) {
attackOneTimer9 = 0;
position = 1;
minus = 3;
points.removeMovieClip();
_root.attachMovie("healthBar2", "bossHealthBar", _root.getNextHighestDepth(), {_x:400, _y:20});
_root.attachMovie("barBoarder2", "barBoarder2", _root.getNextHighestDepth(), {_x:400, _y:20});
SecondBoss = _root.attachMovie("bosson4", "bosson4", _root.getNextHighestDepth(), {_x:900, _y:200});
bosses.push(SecondBoss);
bossHealth.push(100);
_root.attachMovie("fgl", "fgl1", _root.getNextHighestDepth(), {_x:SecondBoss._x, _y:SecondBoss._y - 100});
_root.attachMovie("fgl", "fgl2", _root.getNextHighestDepth(), {_x:SecondBoss._x, _y:SecondBoss._y + 100});
SecondBoss.onEnterFrame = function () {
if (!Pause) {
fgl1._x = SecondBoss._x;
fgl1._y = SecondBoss._y - 100;
fgl2._x = SecondBoss._x;
fgl2._y = SecondBoss._y + 100;
if (this._x > 400) {
this._x = this._x - 2;
}
if (goingUp) {
if (this._x == 400) {
this._y = this._y - 1;
}
}
if (goingDown) {
if (this._x == 400) {
this._y = this._y + 1;
}
}
if (this._y == 145) {
goingUp = false;
goingDown = true;
}
if (this._y == 250) {
goingUp = true;
goingDown = false;
}
}
if (!Pause) {
specialAttackTimer--;
if (specialAttackTimer < 0) {
if ((timeLastEnemyAttached + 100) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
eBullet = _root.attachMovie("mBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:FinalBoss._x, _y:(FinalBoss._y + Math.round(Math.random() * 45)) - 25});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 12;
}
};
}
}
if (specialAttackTimer == -96) {
sickEmBoys();
specialAttackTimer = 64;
}
}
};
}
}
}
function sickEmBoys() {
i = bosses.length - 1;
while (i >= 0) {
randomNum++;
bulletGD2 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y - 100});
enemyBullet.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
if (!Pause) {
this._y = this._y + 5;
this._x = this._x - 1;
}
};
randomNum++;
bulletGU3 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y - 100});
enemyBullet.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
if (!Pause) {
this._y = this._y - 5;
this._x = this._x - 1;
}
};
randomNum++;
bulletU2 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y - 100});
enemyBullet.push(bulletU2);
bulletU2.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 3;
this._y = this._y + 1;
}
};
randomNum++;
bulletD3 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y - 100});
enemyBullet.push(bulletD3);
bulletD3.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 3;
this._y = this._y - 1;
}
};
randomNum++;
bulletU4 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y - 100});
enemyBullet.push(bulletU4);
bulletU4.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
this._y = this._y + 4;
}
};
randomNum++;
bulletD5 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y - 100});
enemyBullet.push(bulletD5);
bulletD5.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
this._y = this._y - 4;
}
};
randomNum++;
bulletGD2 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y + 100});
enemyBullet.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
if (!Pause) {
this._y = this._y + 5;
this._x = this._x - 1;
}
};
randomNum++;
bulletGU3 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y + 100});
enemyBullet.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
if (!Pause) {
this._y = this._y - 5;
this._x = this._x - 1;
}
};
randomNum++;
bulletU2 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y + 100});
enemyBullet.push(bulletU2);
bulletU2.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 3;
this._y = this._y + 1;
}
};
randomNum++;
bulletD3 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y + 100});
enemyBullet.push(bulletD3);
bulletD3.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 3;
this._y = this._y - 1;
}
};
randomNum++;
bulletU4 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y + 100});
enemyBullet.push(bulletU4);
bulletU4.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
this._y = this._y + 4;
}
};
randomNum++;
bulletD5 = _root.attachMovie("bossBullet3", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y + 100});
enemyBullet.push(bulletD5);
bulletD5.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 7;
this._y = this._y - 4;
}
};
i--;
}
}
function attachEnemy() {
if (Start) {
if (attackOneTimer > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(9);
enemyHealth.push(5);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer2 > 0) {
if ((timeLastEnemyAttached + 700) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(2);
enemyHealth.push(5);
special.push(Math.round(Math.random() * 17) + 15);
}
}
if (attackOneTimer3 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer4 > 0) {
if ((timeLastEnemyAttached + 700) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 7) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:280});
waveNum.push(4);
}
if (position == 6) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:200});
waveNum.push(4.5);
}
if (position == 5) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
waveNum.push(4);
}
if (position == 4) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:250});
waveNum.push(4.5);
}
if (position == 3) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:275});
waveNum.push(4);
}
if (position == 2) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:50});
waveNum.push(4.5);
}
if (position == 1) {
enemy = _root.attachMovie("strangeEnemy_mc", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:350});
waveNum.push(4);
}
special.push(Math.round(Math.random() * 17) + 15);
enemies.push(enemy);
enemyHealth.push(6);
minus--;
if (minus == 0) {
position--;
minus = 5;
}
if (position == 0) {
position = 7;
}
}
}
if (attackOneTimer5 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
special.push(Math.round(Math.random() * 17) + 15);
waveNum.push(1);
enemyHealth.push(3);
}
}
if (attackOneTimer6 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemy._xscale = 250;
enemy._yscale = 250;
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer7 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(4);
enemyHealth.push(5);
special.push(Math.round(Math.random() * 17) + 15);
}
}
}
if (attackOneTimer8 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("smallEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemy._xscale = 170;
enemy._yscale = 170;
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer9 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(9);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
}
function noOverLap() {
i = enemies.length - 1;
while (i >= 0) {
j = enemies.length - 1;
while (j >= 0) {
if (!(enemies[i] === enemies[j])) {
if (enemies[i].hitTest(enemies[j])) {
endX = _root.enemies[j]._x;
endY = _root.enemies[j]._y;
enemies[i]._x = enemies[i]._x - ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y - ((endY - enemies[i]._y) / 60);
}
}
j--;
}
i--;
}
}
function ereaseEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
if ((((enemyBullet[i]._x > 550) or (enemyBullet[i]._x < 0)) or (enemyBullet[i]._y > 400)) or (enemyBullet[i]._y < 0)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function ereaseBullets() {
i = bullets.length - 1;
while (i >= 0) {
if ((((bullets[i]._x > 550) or (bullets[i]._x < 0)) or (bullets[i]._y > 400)) or (bullets[i]._y < 0)) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
}
i--;
}
}
function ereaseEnemies() {
i = enemies.length - 1;
while (i >= 0) {
if ((((enemies[i]._x > 750) or (enemies[i]._x < -100)) or (enemies[i]._y > 600)) or (enemies[i]._y < -100)) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function beingHit() {
if (alive) {
if (taking_damage) {
ouch = ouch - 1;
player.gotoAndStop("hit");
if (ouch == 0) {
taking_damage = false;
ouch = 5;
}
}
}
}
function bomb() {
if (alive) {
if (dropBomb) {
boom = boom - 1;
player.gotoAndStop("bomb");
if (boom == 0) {
dropBomb = false;
canDrop = true;
boom = 18;
bombNum--;
}
}
}
}
function playerBounds() {
if (player._x > 510) {
player._x = 510;
}
if (player._x < 40) {
player._x = 40;
}
if (player._y > 370) {
player._y = 370;
}
if (player._y < 30) {
player._y = 30;
}
}
function playerMovement() {
if (alive) {
if (!taking_damage) {
if (!dropBomb) {
if (!shooting) {
player.gotoAndStop("normal");
}
if (shooting) {
player.gotoAndStop("shooting");
}
if (Key.isDown(38)) {
player._y = player._y - speed;
}
if (Key.isDown(39)) {
player._x = player._x + speed;
}
if (Key.isDown(37)) {
player._x = player._x - speed;
}
if (Key.isDown(40)) {
player._y = player._y + speed;
}
}
}
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function fire() {
if (shooting) {
if (gun == 0) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "standard shot_mc" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
}
}
if (gun == 1) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 2) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 3) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
}
}
if (gun == 4) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGU3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
randomNum++;
bulletU4 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU4);
bulletU4.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 13;
};
randomNum++;
bulletD5 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD5);
bulletD5.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 13;
};
}
}
}
}
function firing() {
if (gameOn) {
if (canDrop) {
if (Key.isDown(88)) {
if (bombNum > 0) {
dropBomb = true;
_root.attachMovie("playerEffect", "playerEffect", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.attachMovie("deathBomb", "deathBomb", 2);
dropDabomb_sound.start();
canDrop = false;
}
}
}
if (Key.isDown(90)) {
pullitfire_sound.start();
shooting = true;
} else {
shooting = false;
}
}
}
function showBombNumber() {
if (bombNum == 3) {
bombCounter.gotoAndStop("three");
}
if (bombNum == 2) {
bombCounter.gotoAndStop("two");
}
if (bombNum == 1) {
bombCounter.gotoAndStop("one");
}
if (bombNum == 0) {
bombCounter.gotoAndStop("zero");
}
}
function StaeCompleted() {
if (completed) {
stageClear.sc.text = score;
if (score < target) {
score = score + 8;
}
if (score == target) {
if (once == 0) {
_root.attachMovie("fade", "fade", _root.getNextHighestDepth());
once = 1;
}
completedTimer++;
}
if (completedTimer == 64) {
stopAllSounds();
won = true;
gameOn = false;
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
thstage.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
stageClear.removeMovieClip();
fgl1.removeMovieClip();
fgl2.removeMovieClip();
player.removeMovieClip();
bullshit1.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
_root.gotoAndStop("stage5");
}
}
}
function pause_game() {
if (!Pause) {
if (Key.isDown(80)) {
Pause = true;
_root.attachMovie("pauseScreen", "pauseScreen", _root.getNextHighestDepth(), {_x:0, _y:0});
sound_contr._alpha = 100;
sound_contr._y = 380;
_root.attachMovie("qualityControl", "qualityControl", _root.getNextHighestDepth(), {_x:5, _y:382});
}
}
}
function unpause_game() {
if (Pause) {
if (Key.isDown(85)) {
Pause = false;
sound_contr._alpha = 0;
sound_contr._y = 3000;
qualityControl.removeMovieClip();
pauseScreen.removeMovieClip();
}
}
}
stop();
_root.attachMovie("sounds4", "soundstages", _root.getNextHighestDepth());
Pause = false;
mission = 4;
pullitfire_sound = new Sound();
pullitfire_sound.attachSound("pullitfire");
dropDabomb_sound = new Sound();
dropDabomb_sound.attachSound("dropDabomb");
collectPup_sound = new Sound();
collectPup_sound.attachSound("collectPup");
tango_sound = new Sound();
tango_sound.attachSound("soundfoe");
boom_sound = new Sound();
boom_sound.attachSound("boom");
_root.attachMovie("thstage", "thstage", 1, {_x:-160, _y:-70});
_root.attachMovie("bullshit4", "bullshit1", _root.getNextHighestDepth(), {_x:18, _y:45});
_root.attachMovie("points", "points", _root.getNextHighestDepth(), {_x:300, _y:0});
_root.attachMovie("bombCounter", "bombCounter", _root.getNextHighestDepth(), {_x:160, _y:28});
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:20, _y:20});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:18, _y:20});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:80, _y:200});
_root.attachMovie("st4_mc", "st4_mc", _root.getNextHighestDepth(), {_x:275, _y:200});
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth());
hit_._alpha = 0;
onMouseDown = function () {
skipit();
};
ready = 40;
barBoarder.lvs.text = lives;
un = 1;
target = 0;
once = 0;
goingUp = true;
goingDown = false;
alive = true;
gOt = 29;
speed = 7;
bombNum = 3;
pinkCombo = 0;
blueCombo = 0;
randomNum = 0;
randomNumber = 0;
canDrop = true;
Start = false;
StartTimer = 121;
taking_damage = false;
shootingBeam = false;
bulletSpeed = 25;
completed = false;
completedTimer = 0;
ouch = 5;
shake = 0;
beamTimer = 22;
enemySpeed = 10;
playerHealth = 100;
timeOfLastShot = 0;
dropBomb = false;
boom = 18;
specialAttackTimer = 64;
timeLastEnemyAttached = 0;
powerUpOnScreen = false;
shooting = false;
var bullets = new Array();
var enemies = new Array();
var enemyBullet = new Array();
var enemyHealth = new Array();
var waveNum = new Array();
var special = new Array();
var powerUp1 = new Array();
var bosses = new Array();
var bossHealth = new Array();
var powerbell = new Array();
minus = 3;
position = 1;
attackOneTimer = 320;
attackOneTimer2 = 0;
attackOneTimer3 = 0;
attackOneTimer4 = 0;
attackOneTimer5 = 0;
attackOneTimer6 = 0;
attackOneTimer7 = 0;
attackOneTimer8 = 0;
attackOneTimer9 = 0;
crosshair.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
};
player.onEnterFrame = function () {
if (!Pause) {
ready--;
if (ready == 1) {
st4_mc.removeMovieClip();
_root.attachMovie("fadeIn", "fadeIn", _root.getNextHighestDepth());
_root.attachMovie("fourth", "fourth", _root.getNextHighestDepth(), {_x:125, _y:150});
gameOn = true;
}
if (ready < 0) {
ready = 0;
}
if (ready == 0) {
StartTimer--;
}
if (StartTimer == 0) {
Start = true;
StartTimer = 0;
}
if (!dropBomb) {
fire();
}
if (bombNum < 0) {
bombNum == 0;
}
points.pts.text = score;
playerMovement();
firing();
ereaseBullets();
playerBounds();
attachEnemy();
enemyMovement();
noOverLap();
enemySot();
shaker();
playerHit();
beingHit();
collectPowerUp();
attackTimers();
ereaseEnemies();
death();
playersHealthBar();
bomb();
enemyHitBomb();
showBombNumber();
playerHitByEnemyBullet();
ereaseEnemyBullets();
EnemyBulletHitBomb();
BossHealthBar();
bossSot();
bossBombed();
playerHitByBoss();
collectBell();
StaeCompleted();
attachHit_();
}
};
setin.onEnterFrame = function () {
if (gameOn) {
pause_game();
unpause_game();
}
if (!alive) {
gOt--;
}
if (gOt < 0) {
backdrop_c.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
points.removeMovieClip();
player.removeMovieClip();
bullshit1.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
if (lives < 0) {
gotoAndStop ("submit");
} else {
_root.gotoAndStop("reset");
}
}
if (Key.isDown(81)) {
if (num == 0) {
qset++;
num = 1;
}
} else {
num = 0;
}
if (qset == 0) {
qualityControl.qual.text = "High";
_quality = "high";
}
if (qset == 1) {
qualityControl.qual.text = "Medium";
_quality = "medium";
}
if (qset == 2) {
qualityControl.qual.text = "Low";
_quality = "low";
}
if (qset > 2) {
qset = 0;
}
};
Frame 13
function skipit() {
if (ready > 0) {
ready = 5;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 10);
hit_._y = hit_._y + ((endY - hit_._y) - 10);
}
function removepowerbell() {
i = powerbell.length - 1;
while (i >= 0) {
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
i--;
}
}
function removebossHealth() {
i = bossHealth.length - 1;
while (i >= 0) {
bossHealth[i].removeMovieClip();
bossHealth.splice(i, 1);
i--;
}
}
function removeBoss() {
i = bosses.length - 1;
while (i >= 0) {
bosses[i].removeMovieClip();
bosses.splice(i, 1);
i--;
}
}
function removeEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
i--;
}
}
function removeBullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
i--;
}
}
function removeenemies() {
i = enemies.length - 1;
while (i >= 0) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
i--;
}
}
function removeenemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removewaveNum() {
i = waveNum.length - 1;
while (i >= 0) {
waveNum[i].removeMovieClip();
waveNum.splice(i, 1);
i--;
}
}
function removespecial() {
i = special.length - 1;
while (i >= 0) {
special[i].removeMovieClip();
special.splice(i, 1);
i--;
}
}
function removepowerUp1() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
i--;
}
}
function playersHealthBar() {
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
}
function BossHealthBar() {
i = bosses.length - 1;
while (i >= 0) {
bossHealthBar._xscale = bossHealth[i];
if (bossHealth[i] < 25) {
bossHealthBar.gotoAndStop("normal");
} else {
bossHealthBar.gotoAndStop("max");
}
i--;
}
}
function death() {
if (playerHealth < 1) {
playerHealth = 0;
if (un == 1) {
lives--;
un = 0;
}
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
gameOn = false;
alive = false;
player.gotoAndStop("dead");
stopAllSounds();
}
}
function collectPowerUp() {
i = powerUp1.length - 1;
while (i >= 0) {
powerUp1[i]._rotation = powerUp1[i]._rotation + 10;
if (powerUp1[i].hitTest(hit_)) {
collectPup_sound.start();
powerUpOnScreen = false;
randomNum++;
_root.attachMovie("explosion2", "explosion2" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun++;
if (gun > 4) {
gun = 4;
}
powerUp1[i].removeMovieClip();
powerUp1.splice(i, 1);
}
i--;
}
}
function collectBell() {
i = powerbell.length - 1;
while (i >= 0) {
if (powerbell[i].hitTest(hit_)) {
score = score + 300;
collectPup_sound.start();
randomNum++;
bellPop = _root.attachMovie("explosion_pup", "explosion_pup" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
bellPop._xscale = 170;
bellPop._yscale = 170;
randomNum++;
plusTen = _root.attachMovie("plusTen", "plusTen" + randomNum, _root.getNextHighestDepth(), {_x:powerbell[i]._x, _y:powerbell[i]._y});
powerbell[i].removeMovieClip();
powerbell.splice(i, 1);
}
i--;
}
}
function dropBell() {
randomNumber++;
bell = _root.attachMovie("bell", "bell" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerbell.push(bell);
bell._xscale = 170;
bell._yscale = 170;
bell.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 150);
this._y = this._y + ((endY - this._y) / 150);
};
}
function dropPowerUp() {
randomNumber++;
StarShot = _root.attachMovie("pup", "star" + randomNumber, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
powerUp1.push(StarShot);
StarShot.onEnterFrame = function () {
endX = _root.player._x;
endY = _root.player._y;
this._x = this._x + ((endX - this._x) / 30);
this._y = this._y + ((endY - this._y) / 30);
};
}
function playerHitByEnemyBullet() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function playerHitByBoss() {
i = bosses.length - 1;
while (i >= 0) {
if (bosses[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
player._x = player._x - 10;
}
i--;
}
}
function playerHit() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(hit_)) {
randomNum++;
_root.attachMovie("playerEffect", "playerEffect" + randomNum, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
gun--;
if (gun < 0) {
gun = 0;
}
taking_damage = true;
playerHealth = playerHealth - 10;
tango_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function EnemyBulletHitBomb() {
i = enemyBullet.length - 1;
while (i >= 0) {
if (enemyBullet[i].hitTest(deathBomb)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function enemyHitBomb() {
i = enemies.length - 1;
while (i >= 0) {
if (enemies[i].hitTest(deathBomb)) {
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 10;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
i--;
}
}
function bossBombed() {
i = bosses.length - 1;
while (i >= 0) {
if (bossUp) {
if (bosses[i].hitTest(deathBomb)) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 2000;
}
}
}
i--;
}
}
function bossSot() {
i = bosses.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (bossUp) {
if (bosses[i].hitTest(bullets[j])) {
bosses[i].gotoAndPlay("hit");
bossHealth[i] = bossHealth[i] - 0.1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (bossHealth[i] < 1) {
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
boom_sound.start();
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:bosses[i]._x, _y:bosses[i]._y});
explosion._xscale = 350;
explosion._yscale = 350;
bosses[i].removeMovieClip();
bosses.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bossHealth.splice(i, 1);
completed = true;
_root.attachMovie("stageClear", "stageClear", _root.getNextHighestDepth(), {_x:125, _y:150});
target = score + 2000;
}
}
}
j--;
}
i--;
}
}
function enemySot() {
i = enemies.length - 1;
while (i >= 0) {
j = bullets.length - 1;
while (j >= 0) {
if (enemies[i].hitTest(bullets[j]) or enemies[i].hitTest(deathBomb)) {
score = score + 5;
enemies[i].gotoAndPlay("hit");
enemyHealth[i] = enemyHealth[i] - 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
if (enemyHealth[i] < 1) {
score = score + 10;
tango_sound.start();
if (!powerUpOnScreen) {
dir = ["drop", "dropBell", "dropBell2", "dropBell3", "null4", "null5", "null6", "null7", "null8", "null9", "null10"];
randNum = random(10);
setDir = dir[randNum];
switch (setDir) {
case "drop" :
if (gun < 4) {
dropPowerUp();
powerUpOnScreen = true;
}
break;
case "dropBell" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell2" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "dropBell3" :
if (enemies[i]._x < 400) {
dropBell();
}
break;
case "null4" :
break;
case "null5" :
break;
case "null6" :
break;
case "null7" :
break;
case "null8" :
break;
case "null9" :
break;
case "null10" :
}
}
shake++;
randomNum++;
explosion = _root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
explosion._xscale = enemies[i]._xscale;
explosion._yscale = enemies[i]._yscale;
enemies[i].removeMovieClip();
enemies.splice(i, 1);
bullets[j].removeMovieClip();
bullets.splice(j, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyMovement() {
i = enemies.length - 1;
while (i >= 0) {
if (waveNum[i] == 1) {
endX = _root.player._x;
endY = _root.player._y;
enemies[i]._x = enemies[i]._x + ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y + ((endY - enemies[i]._y) / 60);
if (player._x > enemies[i]._x) {
enemies[i]._xscale = -100;
} else {
enemies[i]._xscale = 100;
}
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
}
};
}
}
if (waveNum[i] == 2) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 3) {
enemies[i]._x = enemies[i]._x - (enemySpeed / 2);
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
}
};
}
}
if (waveNum[i] == 4) {
enemies[i]._rotation = -90;
enemies[i]._y = enemies[i]._y + (enemySpeed / 0.5);
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("enemy_shot", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - (Math.round(Math.random() * 7) + 5);
}
};
}
}
if (waveNum[i] == 4.5) {
enemies[i]._rotation = 90;
enemies[i]._y = enemies[i]._y - (enemySpeed / 0.5);
special[i]--;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("enemy_shot", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - (Math.round(Math.random() * 7) + 5);
}
};
}
}
if (waveNum[i] == 5) {
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6) {
enemies[i]._y = enemies[i]._y + 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 6.5) {
enemies[i]._y = enemies[i]._y - 8;
enemies[i]._x = enemies[i]._x - enemySpeed;
}
if (waveNum[i] == 7) {
enemies[i]._xscale = 170;
enemies[i]._yscale = 170;
enemies[i]._x = enemies[i]._x - (enemySpeed / 1.5);
special[i]--;
if (special[i] == 0) {
shake++;
randomNum++;
_root.attachMovie("explosion", "explosion" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
randomNum++;
enemy1 = _root.attachMovie("smallBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x + 15, _y:enemies[i]._y});
enemies.push(enemy1);
special.push(Math.round(Math.random() * 17) + 15);
enemyHealth.push(1);
waveNum.push(1);
randomNum++;
enemy2 = _root.attachMovie("smallBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x - 15, _y:enemies[i]._y});
enemies.push(enemy2);
special.push(Math.round(Math.random() * 17) + 15);
waveNum.push(1);
enemyHealth.push(1);
randomNum++;
enemy3 = _root.attachMovie("smallBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y - 15});
enemies.push(enemy3);
special.push(Math.round(Math.random() * 17) + 15);
enemyHealth.push(1);
waveNum.push(1);
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
}
if (waveNum[i] == 9) {
special[i]--;
enemies[i]._x = enemies[i]._x - enemySpeed;
if (special[i] == 0) {
randomNum++;
eBullet = _root.attachMovie("bossBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:enemies[i]._x, _y:enemies[i]._y});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._x = this._x - 15;
}
};
}
}
i--;
}
}
function attackTimers() {
if (Start) {
attackOneTimer--;
attackOneTimer2--;
attackOneTimer3--;
attackOneTimer4--;
attackOneTimer5--;
attackOneTimer6--;
attackOneTimer7--;
attackOneTimer8--;
attackOneTimer9--;
if (attackOneTimer == 1) {
attackOneTimer = 0;
position = 1;
minus = 3;
attackOneTimer2 = 160;
}
if (attackOneTimer2 == 1) {
attackOneTimer2 = 0;
position = 1;
minus = 3;
attackOneTimer3 = 640;
}
if (attackOneTimer3 == 1) {
attackOneTimer3 = 0;
position = 1;
minus = 3;
attackOneTimer4 = 320;
}
if (attackOneTimer4 == 1) {
attackOneTimer4 = 0;
position = 1;
minus = 3;
attackOneTimer5 = 320;
}
if (attackOneTimer5 == 1) {
attackOneTimer5 = 0;
position = 1;
minus = 3;
attackOneTimer6 = 320;
}
if (attackOneTimer6 == 1) {
attackOneTimer6 = 0;
position = 1;
minus = 3;
attackOneTimer7 = 960;
}
if (attackOneTimer7 == 1) {
attackOneTimer7 = 0;
position = 1;
minus = 3;
attackOneTimer8 = 320;
}
if (attackOneTimer8 == 1) {
attackOneTimer8 = 0;
position = 1;
minus = 3;
attackOneTimer9 = 960;
}
if (attackOneTimer9 == 1) {
attackOneTimer9 = 0;
position = 1;
minus = 3;
points.removeMovieClip();
_root.attachMovie("healthBar2", "bossHealthBar", _root.getNextHighestDepth(), {_x:400, _y:20});
_root.attachMovie("barBoarder2", "barBoarder2", _root.getNextHighestDepth(), {_x:400, _y:20});
FinalBoss = _root.attachMovie("bossThree", "bossThree", _root.getNextHighestDepth(), {_x:900, _y:280});
bosses.push(FinalBoss);
bossHealth.push(100);
FinalBoss.onEnterFrame = function () {
if (!Pause) {
if (this._x > 400) {
this._x = this._x - 2;
}
if (this._x == 400) {
if (bossUp) {
FinalBoss.gotoAndStop("normal");
}
if (bossDown) {
FinalBoss.gotoAndStop("sink");
}
bupt++;
if (bupt > 90) {
bossUp = false;
bossDown = true;
bupt = 91;
bdt++;
specialAttackTimer++;
}
if (bdt == 158) {
bossUp = true;
bossDown = false;
bupt = 0;
bdt = 0;
}
}
if (specialAttackTimer > 91) {
if ((timeLastEnemyAttached + 100) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
eBullet = _root.attachMovie("mBullet", "enemy_shot" + randomNum, _root.getNextHighestDepth(), {_x:Math.round(Math.random() * 550) - 0, _y:0});
enemyBullet.push(eBullet);
eBullet.onEnterFrame = function () {
if (!Pause) {
this._y = this._y + 12;
}
};
}
}
if (specialAttackTimer == 158) {
specialAttackTimer = 0;
}
}
};
}
}
}
function attachEnemy() {
if (Start) {
if (attackOneTimer > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
}
if (position == 1) {
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
}
enemies.push(enemy);
waveNum.push(1);
enemyHealth.push(4);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer2 > 0) {
if ((timeLastEnemyAttached + 450) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 1) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:425, _y:-30});
waveNum.push(4);
}
if (position == 2) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:450, _y:570});
waveNum.push(4.5);
}
if (position == 3) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:350, _y:-30});
waveNum.push(4);
}
enemies.push(enemy);
special.push(Math.round(Math.random() * 17) + 15);
enemyHealth.push(3);
minus--;
if (minus == 0) {
position--;
minus = 5;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer3 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
waveNum.push(3);
}
if (position == 2) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:300});
waveNum.push(1);
}
if (position == 1) {
enemy = _root.attachMovie("brownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:150});
waveNum.push(3);
}
enemies.push(enemy);
enemyHealth.push(10);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer4 > 0) {
if ((timeLastEnemyAttached + 600) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
waveNum.push(2);
enemyHealth.push(5);
special.push(Math.round(Math.random() * 17) + 15);
}
}
if (attackOneTimer5 > 0) {
if ((timeLastEnemyAttached + 250) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("smallBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
special.push(Math.round(Math.random() * 17) + 15);
waveNum.push(1);
enemyHealth.push(3);
}
}
if (attackOneTimer6 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:330});
}
if (position == 1) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:100});
}
enemy._xscale = 170;
enemy._yscale = 170;
enemies.push(enemy);
waveNum.push(3);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer7 > 0) {
if ((timeLastEnemyAttached + 1000) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 3) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:225});
}
if (position == 2) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:330});
}
if (position == 1) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:100});
}
enemies.push(enemy);
waveNum.push(7);
enemyHealth.push(30);
special.push(Math.round(Math.random() * 17) + 15);
minus--;
if (minus == 0) {
position--;
minus = 3;
}
if (position == 0) {
position = 3;
}
}
}
}
if (attackOneTimer8 > 0) {
if ((timeLastEnemyAttached + 500) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
if (position == 1) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:425, _y:-30});
waveNum.push(4);
}
if (position == 2) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:450, _y:570});
waveNum.push(4.5);
}
if (position == 3) {
enemy = _root.attachMovie("strongBrownEnemy", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:350, _y:-30});
waveNum.push(4);
}
enemies.push(enemy);
special.push(Math.round(Math.random() * 17) + 15);
enemyHealth.push(6);
minus--;
if (minus == 0) {
position--;
minus = 5;
}
if (position == 0) {
position = 3;
}
}
}
if (attackOneTimer9 > 0) {
if ((timeLastEnemyAttached + 600) < getTimer()) {
timeLastEnemyAttached = getTimer();
randomNum++;
enemy = _root.attachMovie("brownEnemylong", "enemy_mc" + randomNum, _root.getNextHighestDepth(), {_x:570, _y:Math.round(Math.random() * 350) + 10});
enemies.push(enemy);
special.push(Math.round(Math.random() * 17) + 15);
waveNum.push(1);
enemyHealth.push(6);
}
}
}
function noOverLap() {
i = enemies.length - 1;
while (i >= 0) {
j = enemies.length - 1;
while (j >= 0) {
if (!(enemies[i] === enemies[j])) {
if (enemies[i].hitTest(enemies[j])) {
endX = _root.enemies[j]._x;
endY = _root.enemies[j]._y;
enemies[i]._x = enemies[i]._x - ((endX - enemies[i]._x) / 60);
enemies[i]._y = enemies[i]._y - ((endY - enemies[i]._y) / 60);
}
}
j--;
}
i--;
}
}
function ereaseEnemyBullets() {
i = enemyBullet.length - 1;
while (i >= 0) {
if ((((enemyBullet[i]._x > 550) or (enemyBullet[i]._x < 0)) or (enemyBullet[i]._y > 400)) or (enemyBullet[i]._y < 0)) {
enemyBullet[i].removeMovieClip();
enemyBullet.splice(i, 1);
}
i--;
}
}
function ereaseBullets() {
i = bullets.length - 1;
while (i >= 0) {
if ((((bullets[i]._x > 550) or (bullets[i]._x < 0)) or (bullets[i]._y > 400)) or (bullets[i]._y < 0)) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
}
i--;
}
}
function ereaseEnemies() {
i = enemies.length - 1;
while (i >= 0) {
if ((((enemies[i]._x > 750) or (enemies[i]._x < -100)) or (enemies[i]._y > 600)) or (enemies[i]._y < -100)) {
enemies[i].removeMovieClip();
enemies.splice(i, 1);
waveNum.splice(i, 1);
special.splice(i, 1);
enemyHealth.splice(i, 1);
}
i--;
}
}
function beingHit() {
if (alive) {
if (taking_damage) {
ouch = ouch - 1;
player.gotoAndStop("hit");
if (ouch == 0) {
taking_damage = false;
ouch = 5;
}
}
}
}
function bomb() {
if (alive) {
if (dropBomb) {
boom = boom - 1;
player.gotoAndStop("bomb");
if (boom == 0) {
dropBomb = false;
canDrop = true;
boom = 18;
bombNum--;
}
}
}
}
function playerBounds() {
if (player._x > 510) {
player._x = 510;
}
if (player._x < 40) {
player._x = 40;
}
if (player._y > 370) {
player._y = 370;
}
if (player._y < 30) {
player._y = 30;
}
}
function playerMovement() {
if (alive) {
if (!taking_damage) {
if (!dropBomb) {
if (!shooting) {
player.gotoAndStop("normal");
}
if (shooting) {
player.gotoAndStop("shooting");
}
if (Key.isDown(38)) {
player._y = player._y - speed;
}
if (Key.isDown(39)) {
player._x = player._x + speed;
}
if (Key.isDown(37)) {
player._x = player._x - speed;
}
if (Key.isDown(40)) {
player._y = player._y + speed;
}
}
}
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function fire() {
if (shooting) {
if (gun == 0) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "standard shot_mc" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
}
}
if (gun == 1) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 2) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("standard shot_mc", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
}
}
if (gun == 3) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU);
bulletU.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 5;
};
randomNum++;
bulletD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD);
bulletD.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 5;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
}
}
if (gun == 4) {
if ((timeOfLastShot + 100) < getTimer()) {
timeOfLastShot = getTimer();
randomNum++;
bulletGD2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD2);
bulletGD2._rotation = 90;
bulletGD2.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGU3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU3);
bulletGU3._rotation = -90;
bulletGU3.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
this._x = this._x + 5;
};
randomNum++;
bulletGD = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGD);
bulletGD._rotation = 90;
bulletGD.onEnterFrame = function () {
this._y = this._y + bulletSpeed;
};
randomNum++;
bulletGU = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletGU);
bulletGU._rotation = -90;
bulletGU.onEnterFrame = function () {
this._y = this._y - bulletSpeed;
};
randomNum++;
bullet = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bullet);
bullet.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
};
randomNum++;
bulletU2 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU2);
bulletU2.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 2.5;
};
randomNum++;
bulletD3 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD3);
bulletD3.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 2.5;
};
randomNum++;
bulletU4 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletU4);
bulletU4.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y + 13;
};
randomNum++;
bulletD5 = _root.attachMovie("playerPowerShot", "starMC" + randomNum, _root.getNextHighestDepth(), {_x:player._x + 30, _y:player._y - 5});
bullets.push(bulletD5);
bulletD5.onEnterFrame = function () {
this._x = this._x + bulletSpeed;
this._y = this._y - 13;
};
}
}
}
}
function firing() {
if (gameOn) {
if (canDrop) {
if (Key.isDown(88)) {
if (bombNum > 0) {
dropBomb = true;
_root.attachMovie("playerEffect", "playerEffect", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
_root.attachMovie("deathBomb", "deathBomb", 2);
dropDabomb_sound.start();
canDrop = false;
}
}
}
if (Key.isDown(90)) {
pullitfire_sound.start();
shooting = true;
} else {
shooting = false;
}
}
}
function showBombNumber() {
if (bombNum == 3) {
bombCounter.gotoAndStop("three");
}
if (bombNum == 2) {
bombCounter.gotoAndStop("two");
}
if (bombNum == 1) {
bombCounter.gotoAndStop("one");
}
if (bombNum == 0) {
bombCounter.gotoAndStop("zero");
}
}
function StaeCompleted() {
if (completed) {
stageClear.sc.text = score;
if (score < target) {
score = score + 8;
}
if (score == target) {
if (once == 0) {
_root.attachMovie("fade", "fade", _root.getNextHighestDepth());
once = 1;
}
completedTimer++;
}
if (completedTimer == 64) {
stopAllSounds();
won = true;
gameOn = false;
removeBullets();
removeenemies();
removeenemyHealth();
removewaveNum();
removespecial();
removepowerUp1();
removeEnemyBullets();
removeBoss();
removebossHealth();
removepowerbell();
background3.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
stageClear.removeMovieClip();
player.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
_root.gotoAndStop("game_done");
}
}
}
function pause_game() {
if (!Pause) {
if (Key.isDown(80)) {
Pause = true;
_root.attachMovie("pauseScreen", "pauseScreen", _root.getNextHighestDepth(), {_x:0, _y:0});
sound_contr._alpha = 100;
sound_contr._y = 380;
_root.attachMovie("qualityControl", "qualityControl", _root.getNextHighestDepth(), {_x:5, _y:382});
}
}
}
function unpause_game() {
if (Pause) {
if (Key.isDown(85)) {
Pause = false;
sound_contr._alpha = 0;
sound_contr._y = 3000;
qualityControl.removeMovieClip();
pauseScreen.removeMovieClip();
}
}
}
stop();
_root.attachMovie("sounds5", "soundstages", _root.getNextHighestDepth());
Pause = false;
mission = 5;
pullitfire_sound = new Sound();
pullitfire_sound.attachSound("pullitfire");
dropDabomb_sound = new Sound();
dropDabomb_sound.attachSound("dropDabomb");
collectPup_sound = new Sound();
collectPup_sound.attachSound("collectPup");
tango_sound = new Sound();
tango_sound.attachSound("soundfoe");
boom_sound = new Sound();
boom_sound.attachSound("boom");
_root.attachMovie("background3", "background3", 1);
_root.attachMovie("points", "points", _root.getNextHighestDepth(), {_x:300, _y:0});
_root.attachMovie("bombCounter", "bombCounter", _root.getNextHighestDepth(), {_x:160, _y:28});
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:20, _y:20});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:18, _y:20});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:80, _y:200});
_root.attachMovie("st5_mc", "st5_mc", _root.getNextHighestDepth(), {_x:275, _y:200});
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth());
hit_._alpha = 0;
onMouseDown = function () {
skipit();
};
ready = 40;
barBoarder.lvs.text = lives;
un = 1;
target = 0;
once = 0;
goingUp = true;
goingDown = false;
alive = true;
gOt = 29;
speed = 7;
bombNum = 3;
pinkCombo = 0;
blueCombo = 0;
randomNum = 0;
randomNumber = 0;
canDrop = true;
Start = false;
StartTimer = 121;
taking_damage = false;
shootingBeam = false;
bulletSpeed = 25;
completed = false;
completedTimer = 0;
ouch = 5;
shake = 0;
beamTimer = 22;
enemySpeed = 10;
playerHealth = 100;
timeOfLastShot = 0;
dropBomb = false;
boom = 18;
bossUp = true;
bossDown = false;
bupt = 0;
bdt = 0;
specialAttackTimer = 0;
timeLastEnemyAttached = 0;
powerUpOnScreen = false;
shooting = false;
var bullets = new Array();
var enemies = new Array();
var enemyBullet = new Array();
var enemyHealth = new Array();
var waveNum = new Array();
var special = new Array();
var powerUp1 = new Array();
var bosses = new Array();
var bossHealth = new Array();
var powerbell = new Array();
minus = 3;
position = 1;
attackOneTimer = 320;
attackOneTimer2 = 0;
attackOneTimer3 = 0;
attackOneTimer4 = 0;
attackOneTimer5 = 0;
attackOneTimer6 = 0;
attackOneTimer7 = 0;
attackOneTimer8 = 0;
attackOneTimer9 = 0;
crosshair.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
};
player.onEnterFrame = function () {
if (!Pause) {
ready--;
if (ready == 1) {
st5_mc.removeMovieClip();
_root.attachMovie("fadeIn", "fadeIn", _root.getNextHighestDepth());
_root.attachMovie("lvl4", "lvl4", _root.getNextHighestDepth(), {_x:125, _y:150});
gameOn = true;
}
if (ready < 0) {
ready = 0;
}
if (ready == 0) {
StartTimer--;
}
if (StartTimer == 0) {
Start = true;
StartTimer = 0;
}
if (!dropBomb) {
fire();
}
if (bombNum < 0) {
bombNum == 0;
}
points.pts.text = score;
playerMovement();
firing();
ereaseBullets();
playerBounds();
attachEnemy();
enemyMovement();
noOverLap();
enemySot();
shaker();
playerHit();
beingHit();
collectPowerUp();
attackTimers();
ereaseEnemies();
death();
playersHealthBar();
bomb();
enemyHitBomb();
showBombNumber();
playerHitByEnemyBullet();
ereaseEnemyBullets();
EnemyBulletHitBomb();
BossHealthBar();
bossSot();
bossBombed();
playerHitByBoss();
collectBell();
StaeCompleted();
attachHit_();
}
};
setin.onEnterFrame = function () {
if (gameOn) {
pause_game();
unpause_game();
}
if (!alive) {
gOt--;
}
if (gOt < 0) {
backdrop_c.removeMovieClip();
healthBar.removeMovieClip();
barBoarder.removeMovieClip();
bombCounter.removeMovieClip();
barBoarder2.removeMovieClip();
bossHealthBar.removeMovieClip();
points.removeMovieClip();
player.removeMovieClip();
soundstages.removeMovieClip();
hit_.removeMovieClip();
if (lives < 0) {
gotoAndStop ("submit");
} else {
_root.gotoAndStop("reset");
}
}
if (Key.isDown(81)) {
if (num == 0) {
qset++;
num = 1;
}
} else {
num = 0;
}
if (qset == 0) {
qualityControl.qual.text = "High";
_quality = "high";
}
if (qset == 1) {
qualityControl.qual.text = "Medium";
_quality = "medium";
}
if (qset == 2) {
qualityControl.qual.text = "Low";
_quality = "low";
}
if (qset > 2) {
qset = 0;
}
};
Frame 14
stop();
setin._alpha = 0;
timer = 0;
qset = 0;
num = 0;
qualityControl.qual.text = "High";
pissedAgain.onEnterFrame = function () {
timer++;
if (timer == 890) {
gotoAndStop ("submit");
}
};
Frame 15
stopAllSounds();
setin._alpha = 0;
onetime = 0;
clickedStart = false;
qset = 0;
num = 0;
qualityControl.qual.text = "High";
var hs = (new com.stoneage.hiscores.hiscore());
var userEventHandler = new Object();
userEventHandler.handleEvent = function (eventObj) {
status_txt.text = hs.state;
};
hs.addEventListener("scoreSubmitted", userEventHandler);
Stage.addListener(userEventHandler);
submit.onRelease = function () {
if (onetime == 0) {
hs.url = "http://www.stoneagegames.com/index.php";
hs.game = 9;
hs.salt = 123;
hs.sendScore(username.text, score);
getURL (" http://www.stoneagegames.com/hiscore/9", "_blank");
onetime = 1;
}
};
logoSmall.onPress = function () {
getURL ("http://www.stoneagegames.com", "_blank");
};
stop();
Instance of Symbol 584 MovieClip in Frame 15
on (release) {
getURL (" http://www.stoneagegames.com/hiscore/9", "_blank");
}
Instance of Symbol 585 MovieClip in Frame 15
on (release) {
getURL ("http://www.stoneagegames.com", "_blank");
}
Symbol 11 MovieClip Frame 1
quotes = Math.round(Math.random() * 18) + 1;
if (quotes == 1) {
randomText.txt.text = "Welcome to the Stone Age!";
}
if (quotes == 2) {
randomText.txt.text = "A caveman invented the wheel the same day he invented the table";
}
if (quotes == 3) {
randomText.txt.text = "Flint and Chert were shaped into tools and weapons in the Stone Age.";
}
if (quotes == 4) {
randomText.txt.text = "Let's pretend dinosaurs are still around.";
}
if (quotes == 5) {
randomText.txt.text = "Let's have a Stone Age Party after this, no dinosaurs allowed.";
}
if (quotes == 6) {
randomText.txt.text = "Palaeolithic is another way of saying Stone Age, its just Greek :P.";
}
if (quotes == 7) {
randomText.txt.text = "You'll enjoy the Stone Age trust me!";
}
if (quotes == 8) {
randomText.txt.text = "Not everyone made it out of the Stone Age.";
}
if (quotes == 9) {
randomText.txt.text = "Make sure you check out our other games!";
}
if (quotes == 10) {
randomText.txt.text = "There are plenty of other great Stone Age themed games on our website.";
}
if (quotes == 11) {
randomText.txt.text = "They lied about the Ice Age, it was very warm actually!";
}
if (quotes == 12) {
randomText.txt.text = "Some cavemen were vegetarians but were later eaten by dinosaurs.";
}
if (quotes == 13) {
randomText.txt.text = "The Rock Age was in the 60s this is the Stone Age.";
}
if (quotes == 14) {
randomText.txt.text = "Can't invent the wheel if you don't have the tools. Flint anyone?";
}
if (quotes == 15) {
randomText.txt.text = "What is this M-E-T-A-L you speak of?";
}
if (quotes == 16) {
randomText.txt.text = "Four birds with one Stone because I'm just that good!";
}
if (quotes == 17) {
randomText.txt.text = "Hope you've had a dinosaur free day!";
}
if (quotes == 18) {
randomText.txt.text = "I hope you like the drawings I have on my walls.";
}
if (quotes == 19) {
randomText.txt.text = "The caveman that invented fire also singed his hair.";
}
Symbol 620 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 621 MovieClip [__Packages.com.stoneage.hiscores.hiscore] Frame 0
class com.stoneage.hiscores.hiscore
{
var serverVars, fsalt, furl, dispatchEvent, fState, fgame;
function hiscore () {
serverVars = new LoadVars();
serverVars.owner = this;
fsalt = 123;
furl = "";
serverVars.onLoad = function (sucess) {
this.owner.succeed = sucess;
if (sucess) {
this.owner.state = "OK";
} else {
this.owner.state = "Failed";
}
this.owner.varsLoaded(this);
};
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_vm_test() {
return(hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72");
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(Array(_local5, _local4, _local3, _local2));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_hmac_md5(key, data) {
var _local3 = str2binl(key);
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = Array(16);
var _local5 = Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz));
return(core_md5(_local5.concat(_local6), 640));
}
function hex_sha1(s) {
return(binb2hex(core_sha1(str2binb(s), s.length * chrsz)));
}
function b64_sha1(s) {
return(binb2b64(core_sha1(str2binb(s), s.length * chrsz)));
}
function str_sha1(s) {
return(binb2str(core_sha1(str2binb(s), s.length * chrsz)));
}
function hex_hmac_sha1(key, data) {
return(binb2hex(core_hmac_sha1(key, data)));
}
function b64_hmac_sha1(key, data) {
return(binb2b64(core_hmac_sha1(key, data)));
}
function str_hmac_sha1(key, data) {
return(binb2str(core_hmac_sha1(key, data)));
}
function sha1_vm_test() {
return(hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d");
}
function core_sha1(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (24 - (len % 32)));
x[(((len + 64) >> 9) << 4) + 15] = len;
var _local3 = Array(80);
var _local7 = 1732584193 /* 0x67452301 */;
var _local6 = -271733879;
var _local5 = -1732584194;
var _local4 = 271733878 /* 0x10325476 */;
var _local8 = -1009589776;
var _local10 = 0;
while (_local10 < x.length) {
var _local16 = _local7;
var _local15 = _local6;
var _local14 = _local5;
var _local13 = _local4;
var _local12 = _local8;
var _local2 = 0;
while (_local2 < 80) {
if (_local2 < 16) {
_local3[_local2] = x[_local10 + _local2];
} else {
_local3[_local2] = rol(((_local3[_local2 - 3] ^ _local3[_local2 - 8]) ^ _local3[_local2 - 14]) ^ _local3[_local2 - 16], 1);
}
var _local9 = safe_add(safe_add(rol(_local7, 5), sha1_ft(_local2, _local6, _local5, _local4)), safe_add(safe_add(_local8, _local3[_local2]), sha1_kt(_local2)));
_local8 = _local4;
_local4 = _local5;
_local5 = rol(_local6, 30);
_local6 = _local7;
_local7 = _local9;
_local2++;
}
_local7 = safe_add(_local7, _local16);
_local6 = safe_add(_local6, _local15);
_local5 = safe_add(_local5, _local14);
_local4 = safe_add(_local4, _local13);
_local8 = safe_add(_local8, _local12);
_local10 = _local10 + 16;
}
return(Array(_local7, _local6, _local5, _local4, _local8));
}
function sha1_ft(t, b, c, d) {
if (t < 20) {
return((b & c) | ((~b) & d));
}
if (t < 40) {
return((b ^ c) ^ d);
}
if (t < 60) {
return(((b & c) | (b & d)) | (c & d));
}
return((b ^ c) ^ d);
}
function sha1_kt(t) {
return(((t < 20) ? 1518500249 : (((t < 40) ? 1859775393 : (((t < 60) ? -1894007588 : -899497514))))));
}
function core_hmac_sha1(key, data) {
var _local3 = str2binb(key);
if (_local3.length > 16) {
_local3 = core_sha1(_local3, key.length * chrsz);
}
var _local4 = Array(16);
var _local5 = Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = core_sha1(_local4.concat(str2binb(data)), 512 + (data.length * chrsz));
return(core_sha1(_local5.concat(_local6), 672));
}
function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = "";
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local4 = (hexcase ? "0123456789ABCDEF" : "0123456789abcdef");
var _local5 = "";
var _local2 = 0;
while (_local2 < (binarray.length * 4)) {
_local5 = _local5 + (_local4.charAt((binarray[_local2 >> 2] >> (((_local2 % 4) * 8) + 4)) & 15) + _local4.charAt((binarray[_local2 >> 2] >> ((_local2 % 4) * 8)) & 15));
_local2++;
}
return(_local5);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = "";
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binb(str) {
var _local4 = Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << ((32 - chrsz) - (_local2 % 32)));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binb2str(bin) {
var _local4 = "";
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> ((32 - chrsz) - (_local2 % 32))) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binb2hex(binarray) {
var _local4 = (hexcase ? "0123456789ABCDEF" : "0123456789abcdef");
var _local5 = "";
var _local2 = 0;
while (_local2 < (binarray.length * 4)) {
_local5 = _local5 + (_local4.charAt((binarray[_local2 >> 2] >> (((3 - (_local2 % 4)) * 8) + 4)) & 15) + _local4.charAt((binarray[_local2 >> 2] >> ((3 - (_local2 % 4)) * 8)) & 15));
_local2++;
}
return(_local5);
}
function binb2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = "";
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (3 - (_local3 % 4)))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * (3 - ((_local3 + 1) % 4)))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * (3 - ((_local3 + 2) % 4)))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
static function UserStaticConstructor() {
mx.events.EventDispatcher.initialize(com.stoneage.hiscores.hiscore.prototype);
return(true);
}
function varsLoaded(objEvent) {
dispatchEvent({target:this, type:"scoreSubmitted", data:objEvent});
}
function get state() {
return(fState);
}
function set state(aState) {
fState = aState;
//return(state);
}
function set url(aUrl) {
furl = aUrl;
//return(url);
}
function get salt() {
return(fsalt);
}
function set salt(aSalt) {
fsalt = aSalt;
//return(salt);
}
function get url() {
return(furl);
}
function get game() {
return(fgame);
}
function set game(aGame) {
fgame = aGame;
//return(game);
}
function sendScore(aName, aScore) {
serverVars.op = "hiscore";
serverVars.m2m = true;
serverVars.gameid = fgame;
serverVars.score = aScore;
serverVars.name = aName;
serverVars.hash = calcHash(aName, aScore);
if (isNaN(aScore)) {
state = ("invalid score(not a number)");
dispatchEvent({target:this, type:"scoreSubmitted", data:Void});
} else if (isNaN(fgame)) {
state = ("invalid game(not a number)");
dispatchEvent({target:this, type:"scoreSubmitted", data:Void});
} else if (((furl == "") || (aName == "")) || (aName == Void)) {
state = ("invalid name or url");
dispatchEvent({target:this, type:"scoreSubmitted", data:Void});
} else {
state = ("sending");
serverVars.sendAndLoad(furl, serverVars, "POST");
}
}
function calcHash(aName, aScore) {
var _local2 = hex_md5(hex_sha1(aName + ((fgame + aScore) + fsalt)));
return(_local2);
}
var hexcase = 0;
var b64pad = "";
var chrsz = 8;
static var staticConstructorDependencies = [mx.events.EventDispatcher];
static var UserStaticConstructed = UserStaticConstructor();
}
Symbol 45 MovieClip [fadeIn] Frame 6
this.removeMovieClip();
Symbol 46 MovieClip [fade] Frame 65
this.removeMovieClip();
Symbol 55 MovieClip [deathBomb] Frame 21
this.removeMovieClip();
Symbol 83 MovieClip [enemy_one] Frame 1
stop();
Symbol 83 MovieClip [enemy_one] Frame 2
play();
Symbol 104 MovieClip [explosion] Frame 11
this.removeMovieClip();
Symbol 115 MovieClip Frame 29
stop();
Symbol 138 MovieClip [explosion2] Frame 30
stop();
Symbol 141 MovieClip [healthBar] Frame 1
stop();
Symbol 141 MovieClip [healthBar] Frame 2
stop();
Symbol 153 MovieClip [lvl1] Frame 121
this.removeMovieClip();
Symbol 187 MovieClip [player] Frame 1
stop();
Symbol 187 MovieClip [player] Frame 2
stop();
Symbol 187 MovieClip [player] Frame 3
stop();
Symbol 187 MovieClip [player] Frame 4
stop();
Symbol 187 MovieClip [player] Frame 5
stop();
Symbol 191 MovieClip [smallEnemy] Frame 1
stop();
Symbol 191 MovieClip [smallEnemy] Frame 2
play();
Symbol 207 MovieClip [strangeEnemy_mc] Frame 1
stop();
Symbol 207 MovieClip [strangeEnemy_mc] Frame 2
play();
Symbol 211 MovieClip [tinyEnemy_mc] Frame 1
stop();
Symbol 211 MovieClip [tinyEnemy_mc] Frame 2
play();
Symbol 212 MovieClip [playerEffect] Frame 30
stop();
Symbol 228 MovieClip [bombCounter] Frame 1
stop();
Symbol 228 MovieClip [bombCounter] Frame 2
stop();
Symbol 228 MovieClip [bombCounter] Frame 3
stop();
Symbol 228 MovieClip [bombCounter] Frame 4
stop();
Symbol 236 MovieClip [bossOne] Frame 1
stop();
Symbol 236 MovieClip [bossOne] Frame 2
play();
Symbol 237 MovieClip [healthBar2] Frame 1
stop();
Symbol 237 MovieClip [healthBar2] Frame 2
stop();
Symbol 259 MovieClip Frame 12
stop();
Symbol 262 Button
on (release) {
gotoAndPlay (2);
_root.soundstatus = "off";
}
Symbol 263 MovieClip Frame 11
stop();
Symbol 265 Button
on (release) {
gotoAndPlay (1);
_root.soundstatus = "on";
}
Symbol 266 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 2
stop();
Instance of Symbol 270 MovieClip in Symbol 271 MovieClip [sound_contr] Frame 1
onClipEvent (load) {
_root.soundstatus = "on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume = 100;
minvolume = 0;
}
onClipEvent (enterFrame) {
if (_root.soundstatus == "on") {
step = 5;
}
if (_root.soundstatus == "off") {
step = -5;
}
maxvolume = maxvolume + step;
if (maxvolume > 100) {
maxvolume = 100;
}
if (maxvolume < 0) {
maxvolume = 0;
}
_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}
Symbol 283 MovieClip [explosion_pup] Frame 30
this.removeMovieClip();
Symbol 285 MovieClip [plusTen] Frame 41
this.removeMovieClip();
Symbol 292 MovieClip [stageClear] Frame 129
stop();
Symbol 299 MovieClip [smallEnemy2] Frame 1
stop();
Symbol 299 MovieClip [smallEnemy2] Frame 2
play();
Symbol 302 MovieClip [lvl2] Frame 121
this.removeMovieClip();
Symbol 303 MovieClip [midgetEnemy] Frame 1
stop();
Symbol 303 MovieClip [midgetEnemy] Frame 2
play();
Symbol 304 MovieClip [lineEnemy_mc] Frame 1
stop();
Symbol 304 MovieClip [lineEnemy_mc] Frame 2
play();
Symbol 308 MovieClip [redEnemy] Frame 1
stop();
Symbol 308 MovieClip [redEnemy] Frame 2
play();
Symbol 320 MovieClip [bossTwo] Frame 1
stop();
Symbol 320 MovieClip [bossTwo] Frame 2
play();
Symbol 334 MovieClip [lvl3] Frame 121
this.removeMovieClip();
Symbol 335 MovieClip [brownEnemy] Frame 1
stop();
Symbol 335 MovieClip [brownEnemy] Frame 2
play();
Symbol 339 MovieClip [brownEnemylong] Frame 1
stop();
Symbol 339 MovieClip [brownEnemylong] Frame 2
play();
Symbol 340 MovieClip [smallBrownEnemy] Frame 1
stop();
Symbol 340 MovieClip [smallBrownEnemy] Frame 2
play();
Symbol 341 MovieClip [strongBrownEnemy] Frame 1
stop();
Symbol 341 MovieClip [strongBrownEnemy] Frame 2
play();
Symbol 358 MovieClip Frame 7
stop();
Symbol 379 MovieClip [bossThree] Frame 1
stop();
Symbol 379 MovieClip [bossThree] Frame 2
stop();
Symbol 379 MovieClip [bossThree] Frame 3
play();
Symbol 439 MovieClip [lvl4] Frame 121
this.removeMovieClip();
Symbol 445 MovieClip [fourth] Frame 121
this.removeMovieClip();
Symbol 455 MovieClip [bosson4] Frame 1
stop();
Symbol 455 MovieClip [bosson4] Frame 2
play();
Symbol 472 MovieClip [bosson3] Frame 1
stop();
Symbol 472 MovieClip [bosson3] Frame 2
play();
Symbol 522 MovieClip [st1_mc] Frame 2300
this.removeMovieClip();
Symbol 527 MovieClip [st3_mc] Frame 615
this.removeMovieClip();
Symbol 559 MovieClip Frame 40
stop();
Symbol 570 MovieClip Frame 1
_root.stop();
Symbol 570 MovieClip Frame 89
_root.play();
Symbol 584 MovieClip Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 585 MovieClip Frame 1
on (release) {
getURL ("http://www.stoneagegames.com", "_blank");
}
Symbol 586 MovieClip Frame 60
stop();
Symbol 595 MovieClip Frame 890
_root.play();
Symbol 599 Button
on (release) {
gotoAndStop ("submit");
}
Symbol 619 Button
on (release) {
gotoAndStop ("title");
}