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 avgames.co.uk", 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(3);
}
Frame 2
gotoAndPlay (1);
Frame 3
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("587f0ef8", this, 10301, true);
mochi.MochiServices.connect("07450d77f3291572");
Frame 491
stopAllSounds();
Frame 512
stop();
score = 0;
skipOne.onEnterFrame = function () {
if (level > 1) {
this._x = 25;
this._y = 230;
}
};
skipTwo.onEnterFrame = function () {
if (level > 2) {
this._x = 25;
this._y = 250;
}
};
skipThree.onEnterFrame = function () {
if (level > 3) {
this._x = 25;
this._y = 270;
}
};
skipFour.onEnterFrame = function () {
if (level > 4) {
this._x = 25;
this._y = 290;
}
};
Instance of Symbol 650 MovieClip "skipOne" in Frame 512
on (press) {
_root.gotoAndPlay("c2");
}
Instance of Symbol 654 MovieClip "skipTwo" in Frame 512
on (press) {
_root.gotoAndPlay("c3");
}
Instance of Symbol 656 MovieClip "skipThree" in Frame 512
on (press) {
_root.gotoAndPlay("c4");
}
Instance of Symbol 658 MovieClip "skipFour" in Frame 512
on (press) {
_root.gotoAndPlay("c5");
}
Frame 689
function playerMovement() {
if (!locked) {
endX = _root._xmouse;
endY = _root._ymouse;
player._x = player._x + ((endX - player._x) / robotSpeed);
player._y = player._y + ((endY - player._y) / robotSpeed);
if (!shooting) {
if (_root._xmouse < (_root.player._x - 25)) {
_root.player.gotoAndStop("back");
} else if (_root._ymouse < (_root.player._y - 25)) {
_root.player.gotoAndStop("up");
} else if (_root._ymouse > (_root.player._y - 25)) {
_root.player.gotoAndStop("down");
} else {
_root.player.gotoAndStop("idle");
}
}
}
}
function weapon_switch() {
if (Key.getCode() == 90) {
_root.weapon_select.gotoAndStop("sword");
sword_selected = true;
} else if (Key.getCode() == 88) {
_root.weapon_select.gotoAndStop("gun");
sword_selected = false;
}
}
function swordSlash() {
if (shooting) {
is_attacking++;
if (sword_selected) {
if (is_attacking > 0) {
sslashhit = sslashhit - 1;
slashing_strike = _root.attachMovie("slash_hit", "slash_hit", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
slashing_strike._alpha = 0;
if (sslashhit < 0) {
slashing_strike.removeMovieClip();
}
}
}
}
}
function shoot() {
if (!locked) {
if (!sword_selected) {
if (shooting) {
is_shooting++;
}
if (is_shooting > 0) {
if (gunPower == 0) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot);
}
} else if (gunPower == 1) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot1 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot1);
shot2 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 10});
playerFire.push(shot2);
shot3 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y});
playerFire.push(shot3);
}
} else if (gunPower == 2) {
if ((timeOfLastFire + 200) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot4 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot4.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot4);
}
} else if (gunPower == 3) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot5 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot5.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot5);
shot6 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot6.onEnterFrame = function () {
this._rotation = this._rotation + 15;
};
playerFire.push(shot6);
}
}
}
}
}
}
function hyperdriveRunning() {
_root.player.gotoAndStop("boost");
if ((timeOfLastEnemyFire4 + 50000) < getTimer()) {
timeOfLastEnemyFire4 = getTimer();
hyper_drive = _root.attachMovie("streaks", "streaks", _root.getNextHighestDepth(), {_x:0, _y:0});
hyp_sound.start();
}
}
function playerBounds() {
if (player._x > 485) {
player._x = 485;
} else if (player._x < 60) {
player._x = 60;
} else if (player._y > 345) {
player._y = 345;
} else if (player._y < 50) {
player._y = 50;
}
}
function eraseFire() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i]._x > 550) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
function eraseEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i]._x < -125) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function eraseEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i]._x < -310) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
i--;
}
}
function eraseStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((((standardEnemy[i]._x < -100) or (standardEnemy[i]._x > 650)) or (standardEnemy[i]._y < -100)) or (standardEnemy[i]._y > 500)) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function eraseSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i]._y < -150) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function erase2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i]._y > 405) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function eraseBlueBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if ((((holdEnemyBullets[i]._x < -10) or (holdEnemyBullets[i]._x > 550)) or (holdEnemyBullets[i]._y < -10)) or (holdEnemyBullets[i]._y > 400)) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 20);
hit_._y = hit_._y + ((endY - hit_._y) - 30);
}
function fire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i]._x = playerFire[i]._x + shotSpeed;
i--;
}
}
function beamShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 50) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
beam = _root.attachMovie("beam_mc", "beam_mc" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x - 23, _y:standardEnemy[i]._y + 20});
holdEnemyBullets.push(beam);
beam.onEnterFrame = function () {
this._x = this._x - 15;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemy2DSpinnerShoot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 500) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 5;
this._y = this._y + 2;
};
}
i--;
}
}
function bossShoot() {
i = holdAim.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 85) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdAim[i]._x, _y:holdAim[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdAim[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function standardEnemyShoot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 50) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = standardEnemy[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function enemySpinnerShoot() {
i = holdSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire2 + 500) < getTimer()) {
timeOfLastEnemyFire2 = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 5;
this._y = this._y - 2;
};
}
i--;
}
}
function attachDamageFunctions() {
takingDamage();
takingDamage2();
takingDamage3();
}
function addSmoke() {
smoNum++;
sm = _root.attachMovie("smoke", "smoke" + smoNum, _root.getNextHighestDepth(), {_x:player._x + 25, _y:player._y - 15});
sm.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke2() {
smo2Num++;
sm2 = _root.attachMovie("smoke", "smoke" + smo2Num, _root.getNextHighestDepth(), {_x:player._x - 10, _y:player._y + 3});
sm2.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 30;
this._yscale = this._yscale + 30;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke3() {
smo3Num++;
sm3 = _root.attachMovie("smoke", "smoke" + smo3Num, _root.getNextHighestDepth(), {_x:player._x - 5, _y:player._y + 15});
sm3.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 60;
this._yscale = this._yscale + 60;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function takingDamage() {
if (damage == 1) {
_root.health_bar.gotoAndStop("hitOnce");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage2() {
if (damage == 2) {
_root.health_bar.gotoAndStop("hitTwice");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage3() {
if (damage == 3) {
_root.health_bar.gotoAndStop("lastHit");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke3();
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function runSections() {
section_one_timer = section_one_timer - 1;
if (section_one_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("new_ik_enemy", "new_ik_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:113.3});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 8;
};
}
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_ik_enemy", "new_ik_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:265.3});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 8;
};
releaseStandardEnemy = 15;
}
}
if (section_one_timer < 0) {
section_one_timer = 0;
section_two_timer = section_two_timer - 1;
if (section_two_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_ik_enemy", "new_ik_enemy" + seNum, _root.getNextHighestDepth(), {_x:Math.round(Math.random() * 225) + 280, _y:-45});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 0.5;
this._y = this._y + 7;
};
releaseStandardEnemy = 15;
}
}
if (section_two_timer < 0) {
section_two_timer = 0;
section_three_timer = section_three_timer - 1;
if (section_three_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_ik_enemy", "new_ik_enemy" + seNum, _root.getNextHighestDepth(), {_x:Math.round(Math.random() * 225) + 280, _y:400});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 0.5;
this._y = this._y - 7;
};
releaseStandardEnemy = 15;
}
}
if (section_three_timer < 0) {
section_three_timer = 0;
section_four_timer = section_four_timer - 1;
if (section_four_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_ik_enemy", "new_ik_enemy" + seNum, _root.getNextHighestDepth(), {_x:Math.round(Math.random() * 225) + 280, _y:-40});
standardEnemy.push(StaEn);
StaEn._rotation = 200;
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 4;
this._y = this._y + 7;
};
releaseStandardEnemy = 15;
}
}
if (section_four_timer < 0) {
section_four_timer = 0;
section_five_timer = section_five_timer - 1;
if (section_five_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_ik_enemy", "new_ik_enemy" + seNum, _root.getNextHighestDepth(), {_x:Math.round(Math.random() * 225) + 280, _y:400});
standardEnemy.push(StaEn);
StaEn._rotation = 200;
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 4;
this._y = this._y - 7;
};
releaseStandardEnemy = 15;
}
}
if (section_five_timer < 0) {
section_five_timer = 0;
section_six_timer = section_six_timer - 1;
if (section_six_timer > 0) {
attachEnemyPlanes();
}
}
if (section_six_timer < 0) {
section_six_timer = 0;
section_seven_timer = section_seven_timer - 1;
if (section_seven_timer > 0) {
enemy2DSpinnerShoot();
enemySpinnerShoot();
attach2DSpinner();
attachSpinner();
}
}
if (section_seven_timer < 0) {
section_seven_timer = 0;
section_eight_timer = section_eight_timer - 1;
if (section_eight_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_ik_enemy", "new_ik_enemy" + seNum, _root.getNextHighestDepth(), {_x:-40, _y:Math.round(Math.random() * 270) + 30});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x + 7;
};
releaseStandardEnemy = 25;
}
}
if (section_eight_timer < 0) {
section_eight_timer = 0;
section_nine_timer = section_nine_timer - 1;
if (section_nine_timer > 0) {
beamShot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("latest_enemy", "latest_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 3;
if (locked) {
this._x = this._x - 100;
}
};
releaseStandardEnemy = 75;
}
}
if (section_nine_timer < 0) {
section_nine_timer = 0;
section_ten_timer = section_ten_timer - 1;
if (section_ten_timer > 0) {
hyperdriveRunning();
locked = true;
}
}
if (section_ten_timer < 0) {
locked = false;
_root.hyper_drive.removeMovieClip();
section_ten_timer = 0;
section_eleven_timer = section_eleven_timer - 1;
if (section_eleven_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("missile_enemy", "missile_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_eleven_timer < 0) {
section_eleven_timer = 0;
section_twelve_timer = section_twelve_timer - 1;
if (section_twelve_timer > 0) {
if ((timeOfLastEnemyFire2 + 50000) < getTimer()) {
timeOfLastEnemyFire2 = getTimer();
_root.attachMovie("warning", "warning", _root.getNextHighestDepth(), {_x:90, _y:125});
}
if ((timeOfLastEnemyFire + 1000) < getTimer()) {
timeOfLastEnemyFire = getTimer();
voice_danger_sound.start();
}
}
if (section_twelve_timer < 0) {
section_twelve_timer = 0;
moveAim();
bst._x = 450.8;
bst._y = 1.2;
bst.sc.text = boss_health;
_root.warning.removeMovieClip();
if (enterBoss == 1) {
section_twelve_timer = 0;
boss = _root.attachMovie("big_guy", "big_guy", _root.getNextHighestDepth(), {_x:660, _y:210});
holdBoss.push(boss);
boss.onEnterFrame = function () {
if ((timeOfLastEnemyFire3 + 15) < getTimer()) {
timeOfLastEnemyFire3 = getTimer();
bossShoot();
}
this._x = this._x - 2;
if (this._x < 380) {
this._x = 380;
}
};
attachAim();
enterBoss = 0;
}
}
}
}
}
}
}
}
}
}
}
function show_final_report() {
if (boss_dead) {
removeAim();
bst._x = 450.8;
bst._y = -62.8;
if ((timeOfLastEnemyFire5 + 50000) < getTimer()) {
timeOfLastEnemyFire5 = getTimer();
mission_completed._x = 90;
mission_completed._y = 180;
mission_completed.ek.text = enemyKills;
mission_completed.ws.text = withSword;
setGrade();
}
nextLevelCountDown = nextLevelCountDown - 1;
if (nextLevelCountDown == 0) {
locked = true;
stopAllSounds();
mission_completed._x = -0.5;
mission_completed._y = -178.5;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
removePlayerFire();
removePowerUp();
gotoAndPlay ("level_two_intro");
}
}
}
function attachSpinner() {
releaseSpinner = releaseSpinner - 1;
if (releaseSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("spinner_mc", "spinner_mc" + spNum, _root.getNextHighestDepth(), {_x:450, _y:345});
holdSpinner.push(enemySpinner);
releaseSpinner = 50;
}
}
function attach2DSpinner() {
release2DSpinner = release2DSpinner - 1;
if (release2DSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("spinner_mc", "spinner_mc" + spNum, _root.getNextHighestDepth(), {_x:450, _y:2});
hold2DSpinner.push(enemySpinner);
release2DSpinner = 75;
}
}
function attachAim() {
bossAim = _root.attachMovie("aim", "aim", _root.getNextHighestDepth(), {_x:770, _y:165});
holdAim.push(bossAim);
bossAim.onEnterFrame = function () {
this._alpha = 0;
this._rotation = this._rotation - 25;
};
}
function attachEnemyPlanes() {
releaseEnemyPlane = releaseEnemyPlane - 1;
if (releaseEnemyPlane == 0) {
EnemyPlaneNum++;
enemyPlane = _root.attachMovie("plane_enemy", "plane_enemy" + EnemyPlaneNum, _root.getNextHighestDepth(), {_x:600, _y:Math.round(Math.random() * 270) + 30});
holdEnemyPlane.push(enemyPlane);
releaseEnemyPlane = 28;
}
}
function attachEnemyChopper() {
releaseEnemyChopper = releaseEnemyChopper - 1;
if (releaseEnemyChopper == 0) {
EnemyChopperNum++;
enemyChopper = _root.attachMovie("enemy_chopper", "enemy_chopper" + EnemyChopperNum, _root.getNextHighestDepth(), {_x:800, _y:Math.round(Math.random() * 293) + 40});
holdEnemyChopper.push(enemyChopper);
releaseEnemyChopper = 150;
}
}
function moveAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i]._x = holdAim[i]._x - 6;
if (holdAim[i]._x < 380) {
holdAim[i]._x = 380;
}
i--;
}
}
function moveEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i]._x = holdEnemyPlane[i]._x - enemyPlaneSpeed;
i--;
}
}
function moveEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i]._x = holdEnemyChopper[i]._x - enemyChopperSpeed;
i--;
}
}
function moveSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i]._y = holdSpinner[i]._y - 10;
holdSpinner[i]._x = holdSpinner[i]._x - 6;
i--;
}
}
function move2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i]._y = hold2DSpinner[i]._y + 10;
hold2DSpinner[i]._x = hold2DSpinner[i]._x - 6;
i--;
}
}
function removePlayerFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeRip() {
i = holdRip.length - 1;
while (i >= 0) {
holdRip[i].removeMovieClip();
holdRip.splice(i, 1);
i--;
}
}
function removeAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i].removeMovieClip();
holdAim.splice(i, 1);
i--;
}
}
function removeBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
holdBoss[i].removeMovieClip();
holdBoss.splice(i, 1);
i--;
}
}
function removeStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
i--;
}
}
function removeSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
i--;
}
}
function remove2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
i--;
}
}
function removeFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
i--;
}
}
function removeEnemyBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
i--;
}
}
function removeEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
i--;
}
}
function enemyPlaneCut() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function enemyPlaneShot() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function enemySpinnerCut() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function enemySpinnerShot() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function standardEnemyCut() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function standardEnemyShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerShot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerCut() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.slashing_strike)) {
score = score + 100;
enemyKills++;
withSword++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function bossCut() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.slashing_strike)) {
score = score + 25;
boss_health = boss_health - 10;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health < 0) {
withSword++;
enemyKills++;
boss_health = 0;
score = score + 25000;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
}
i--;
}
}
function bossShot() {
i = holdBoss.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdBoss[i].hitTest(playerFire[j])) {
score = score + 2;
boss_health = boss_health - 1;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health == 0) {
score = score + 10000;
enemyKills++;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
playerFire[j].removeMovieClip();
playerFire.splice(j, 1);
}
j--;
}
i--;
}
}
function enemyChopperShot() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyChopper[i].hitTest(playerFire[j])) {
score = score + 5;
chopper_health = chopper_health - 1;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
score = score + 100;
enemyKills++;
chopper_health = 10;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyChopperCut() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.slashing_strike)) {
score = score + 10;
chopper_health = chopper_health - 5;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
score = score + 200;
if (chopper_health == 0) {
withSword++;
enemyKills++;
chopper_health = 10;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHitEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
debNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function playerHitEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
chopper_health = chopper_health - 1;
damage++;
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
hit_sound.start();
bonus = 1;
chopper_health = 10;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHit2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function playerHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function playerHitSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function playerHitBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
holdBoss[i].gotoAndPlay("flash");
}
i--;
}
}
function playerHitBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if (holdEnemyBullets[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyBullets[i]._x + 20, _y:holdEnemyBullets[i]._y});
exp2._xscale = 40;
exp2._yscale = 40;
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function ripHitEnemy2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitEnemySpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function viewMouse() {
if (_root._ymouse < 350) {
Mouse.hide();
} else {
Mouse.show();
}
}
function gameOver() {
if (damage > 3) {
_root.health_bar.gotoAndStop("none");
fadeTimer = fadeTimer - 1;
if ((onlyDoItOnce + 3000) < getTimer()) {
onlyDoItOnce = getTimer();
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:_root.player._x, _y:_root.player._y});
exp2._xscale = 150;
exp2._yscale = 150;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
}
if (fadeTimer == 0) {
removePlayerFire();
removeRip();
removeAim();
removeBoss();
removeStandardEnemy();
removeSpinner();
remove2DSpinner();
removeFire();
removeEnemy();
removeEnemyBullet();
removeEnemyChopper();
removePowerUp();
locked = true;
gotoAndStop ("game_over");
}
}
}
function powerUpGun() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i].hitTest(_root.hit_)) {
if (gunPower < 3) {
gunPower++;
} else {
score = score + 250;
}
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function attachPowerUp() {
if ((powerUpTimer + 50000) < getTimer()) {
powerUpTimer = getTimer();
pUpNum++;
pUp = _root.attachMovie("powerUp_", "powerUp_" + pUpNum, _root.getNextHighestDepth(), {_x:1000, _y:Math.round(Math.random() * 230) + 70});
pUp.onEnterFrame = function () {
this._x = this._x - 3;
};
holdUp.push(pUp);
}
}
function removePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
i--;
}
}
function erasePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i]._x < -125) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function setGrade() {
if (withSword > 70) {
mission_completed.grade.text = "A";
} else if (withSword > 60) {
mission_completed.grade.text = "B";
} else if (withSword > 50) {
mission_completed.grade.text = "C";
} else {
mission_completed.grade.text = "D";
}
}
function playerHitStart() {
level_one_start.onEnterFrame = function () {
if (_root.player._x > 190) {
_root.player._x = 190;
}
};
}
function StartHitBullet() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i].hitTest(_root.level_one_start)) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth(), {_x:25, _y:300});
hit_._alpha = 0;
_root.attachMovie("level_one_start", "level_one_start", _root.getNextHighestDepth(), {_x:400, _y:138});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:25, _y:300});
shooting = false;
sword_selected = false;
locked = false;
boss_dead = false;
if (level > 1) {
level = level;
} else {
level = 1;
}
gunPower = 0;
enemyKills = 0;
withSword = 0;
robotSpeed = 7;
shotSpeed = 20;
enemyPlaneSpeed = 3;
enemyChopperSpeed = 6;
damage = 0;
smokeSpeed = 10;
smoke_interval = 3;
BulletSpeed = 2;
chopper_health = 10;
boss_health = 350;
score = 0;
bonus = 1;
powerUpTimer = 0;
onlyDoItOnce = 0;
fadeTimer = 50;
nextLevelCountDown = 150;
enterBoss = 1;
smokerelease = 10;
sslashhit = 3;
is_attacking = -3;
timeOfLastFire = 0;
timeOfLastEnemyFire = 0;
timeOfLastEnemyFire2 = 0;
timeOfLastEnemyFire3 = 0;
timeOfLastEnemyFire4 = 0;
timeOfLastEnemyFire5 = 0;
is_shooting = -5;
releaseStandardEnemy = 110;
releaseSpinner = 50;
release2DSpinner = 75;
releaseEnemyPlane = 50;
releaseEnemyChopper = 50;
section_one_timer = 250;
section_two_timer = 150;
section_three_timer = 150;
section_four_timer = 150;
section_five_timer = 150;
section_six_timer = 250;
section_seven_timer = 500;
section_eight_timer = 500;
section_nine_timer = 500;
section_ten_timer = 150;
section_eleven_timer = 300;
section_twelve_timer = 100;
section_thirteen_timer = 500;
section_fourteen_timer = 500;
section_fiftenn_timer = 500;
playerShotNum = 0;
EnemyChopperNum = 0;
EnemyPlaneNum = 0;
pUpNum = 0;
seNum = 0;
smoNum = 0;
smo2Num = 0;
smo3Num = 0;
exp2Num = 0;
BulletNum = 0;
debNum = 0;
chainNum = 0;
flashNum = 0;
spNum = 0;
ripNum = 0;
voice_danger_sound = new Sound();
voice_danger_sound.attachSound("voice_danger");
hyp_sound = new Sound();
hyp_sound.attachSound("hyp");
hit_sound = new Sound();
hit_sound.attachSound("boom");
shot_sound = new Sound();
shot_sound.attachSound("ak47");
explodeObject_sound = new Sound();
explodeObject_sound.attachSound("explodeObject");
loudBang_sound = new Sound();
loudBang_sound.attachSound("loudBang");
var holdUp = new Array();
var holdBoss = new Array();
var holdAim = new Array();
var holdRip = new Array();
var playerFire = new Array();
var standardEnemy = new Array();
var holdEnemyPlane = new Array();
var holdSpinner = new Array();
var hold2DSpinner = new Array();
var holdEnemyChopper = new Array();
var holdEnemyBullets = new Array();
_root.onMouseDown = function () {
if (!locked) {
if (sword_selected) {
_root.player.gotoAndStop("slash");
shooting = true;
} else {
_root.player.gotoAndStop("shoot");
shooting = true;
}
}
};
_root.onMouseUp = function () {
if (!locked) {
shooting = false;
sslashhit = 3;
is_shooting = -5;
is_attacking = -3;
}
};
player.onEnterFrame = function () {
StartHitBullet();
playerHitStart();
erasePowerUp();
attachPowerUp();
powerUpGun();
standardEnemyShot();
playerHitStandardEnemy();
eraseStandardEnemy();
eraseFire();
playerBounds();
fire();
playerMovement();
shoot();
viewMouse();
erase2DSpinner();
move2DSpinner();
enemy2DSpinnerShot();
playerHit2DSpinner();
attachHit_();
ripHitPlane();
eraseEnemyPlane();
ripHitStandardEnemy();
eraseBlueBullet();
enemyPlaneShot();
moveEnemyPlane();
attachDamageFunctions();
moveEnemyPlane();
weapon_switch();
eraseEnemyChopper();
moveEnemyChopper();
playerHitEnemyChopper();
playerHitBullet();
playerHitEnemyPlane();
moveSpinner();
playerHitSpinner();
enemyChopperShot();
runSections();
enemySpinnerShot();
enemyChopperCut();
eraseSpinner();
swordSlash();
enemy2DSpinnerCut();
standardEnemyCut();
enemySpinnerCut();
enemyPlaneCut();
ripHitEnemySpinner();
ripHitEnemy2DSpinner();
playerHitBoss();
bossShot();
bossCut();
show_final_report();
};
weapon_select.onEnterFrame = function () {
gameOver();
};
stop();
Frame 843
function playerMovement() {
if (!locked) {
endX = _root._xmouse;
endY = _root._ymouse;
player._x = player._x + ((endX - player._x) / robotSpeed);
player._y = player._y + ((endY - player._y) / robotSpeed);
if (!shooting) {
if (_root._xmouse < (_root.player._x - 25)) {
_root.player.gotoAndStop("back");
} else if (_root._ymouse < (_root.player._y - 25)) {
_root.player.gotoAndStop("up");
} else if (_root._ymouse > (_root.player._y - 25)) {
_root.player.gotoAndStop("down");
} else {
_root.player.gotoAndStop("idle");
}
}
}
}
function weapon_switch() {
if (Key.getCode() == 90) {
_root.weapon_select.gotoAndStop("sword");
sword_selected = true;
} else if (Key.getCode() == 88) {
_root.weapon_select.gotoAndStop("gun");
sword_selected = false;
}
}
function swordSlash() {
if (shooting) {
is_attacking++;
if (sword_selected) {
if (is_attacking > 0) {
sslashhit = sslashhit - 1;
slashing_strike = _root.attachMovie("slash_hit", "slash_hit", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
slashing_strike._alpha = 0;
if (sslashhit < 0) {
slashing_strike.removeMovieClip();
}
}
}
}
}
function shoot() {
if (!locked) {
if (!sword_selected) {
if (shooting) {
is_shooting++;
}
if (is_shooting > 0) {
if (gunPower == 0) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot);
}
} else if (gunPower == 1) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot1 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot1);
shot2 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 10});
playerFire.push(shot2);
shot3 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y});
playerFire.push(shot3);
}
} else if (gunPower == 2) {
if ((timeOfLastFire + 200) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot4 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot4.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot4);
}
} else if (gunPower == 3) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot5 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot5.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot5);
shot6 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot6.onEnterFrame = function () {
this._rotation = this._rotation + 15;
};
playerFire.push(shot6);
}
}
}
}
}
}
function hyperdriveRunning() {
_root.player.gotoAndStop("boost");
if ((timeOfLastEnemyFire4 + 50000) < getTimer()) {
timeOfLastEnemyFire4 = getTimer();
hyper_drive = _root.attachMovie("streaks", "streaks", _root.getNextHighestDepth(), {_x:0, _y:0});
hyp_sound.start();
}
}
function playerBounds() {
if (player._x > 485) {
player._x = 485;
} else if (player._x < 60) {
player._x = 60;
} else if (player._y > 345) {
player._y = 345;
} else if (player._y < 50) {
player._y = 50;
}
}
function eraseFire() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i]._x > 550) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
function eraseEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i]._x < -125) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function eraseEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i]._x < -310) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
i--;
}
}
function eraseStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((((standardEnemy[i]._x < -100) or (standardEnemy[i]._x > 650)) or (standardEnemy[i]._y < -100)) or (standardEnemy[i]._y > 500)) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function eraseSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i]._y < -150) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function erase2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i]._y > 405) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function eraseBlueBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if ((((holdEnemyBullets[i]._x < -10) or (holdEnemyBullets[i]._x > 550)) or (holdEnemyBullets[i]._y < -10)) or (holdEnemyBullets[i]._y > 400)) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 20);
hit_._y = hit_._y + ((endY - hit_._y) - 30);
}
function fire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i]._x = playerFire[i]._x + shotSpeed;
i--;
}
}
function beamShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 100) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
beam = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x - 23, _y:standardEnemy[i]._y + 20});
holdEnemyBullets.push(beam);
beam.onEnterFrame = function () {
this._x = this._x - 20;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemy2DSpinnerShoot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 50) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 5;
this._y = this._y + 2;
};
}
i--;
}
}
function bossShoot() {
i = holdAim.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 95) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdAim[i]._x, _y:holdAim[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdAim[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function standardEnemyShoot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 30) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = standardEnemy[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemySpinnerShoot() {
i = holdSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire2 + 50) < getTimer()) {
timeOfLastEnemyFire2 = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 5;
this._y = this._y - 2;
};
}
i--;
}
}
function attachDamageFunctions() {
takingDamage();
takingDamage2();
takingDamage3();
}
function addSmoke() {
smoNum++;
sm = _root.attachMovie("smoke", "smoke" + smoNum, _root.getNextHighestDepth(), {_x:player._x + 25, _y:player._y - 15});
sm.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke2() {
smo2Num++;
sm2 = _root.attachMovie("smoke", "smoke" + smo2Num, _root.getNextHighestDepth(), {_x:player._x - 10, _y:player._y + 3});
sm2.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 30;
this._yscale = this._yscale + 30;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke3() {
smo3Num++;
sm3 = _root.attachMovie("smoke", "smoke" + smo3Num, _root.getNextHighestDepth(), {_x:player._x - 5, _y:player._y + 15});
sm3.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 60;
this._yscale = this._yscale + 60;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function takingDamage() {
if (damage == 1) {
_root.health_bar.gotoAndStop("hitOnce");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage2() {
if (damage == 2) {
_root.health_bar.gotoAndStop("hitTwice");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage3() {
if (damage == 3) {
_root.health_bar.gotoAndStop("lastHit");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke3();
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function runSections() {
section_one_timer = section_one_timer - 1;
if (section_one_timer > 0) {
attachEnemyChopper();
}
if (section_one_timer < 0) {
section_one_timer = 0;
section_two_timer = section_two_timer - 1;
if (section_two_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("small_planes", "small_planes" + seNum, _root.getNextHighestDepth(), {_x:600, _y:Math.round(Math.random() * 364) + 6});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_two_timer < 0) {
section_two_timer = 0;
section_three_timer = section_three_timer - 1;
if (section_three_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("spinner_mc", "spinner_mc" + seNum, _root.getNextHighestDepth(), {_x:Math.round(Math.random() * 225) + 280, _y:400});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._y = this._y - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_three_timer < 0) {
section_three_timer = 0;
section_four_timer = section_four_timer - 1;
if (section_four_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("spinner_mc", "spinner_mc" + seNum, _root.getNextHighestDepth(), {_x:Math.round(Math.random() * 225) + 280, _y:-40});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._y = this._y + 20;
};
releaseStandardEnemy = 15;
}
}
if (section_four_timer < 0) {
section_four_timer = 0;
section_five_timer = section_five_timer - 1;
if (section_five_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("spinner_mc", "spinner_mc" + seNum, _root.getNextHighestDepth(), {_x:640, _y:Math.round(Math.random() * 356) + 4});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_five_timer < 0) {
section_five_timer = 0;
section_six_timer = section_six_timer - 1;
if (section_six_timer > 0) {
beamShot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("latest_enemy", "latest_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 7;
};
releaseStandardEnemy = 75;
}
}
if (section_six_timer < 0) {
section_six_timer = 0;
section_seven_timer = section_seven_timer - 1;
if (section_seven_timer > 0) {
enemy2DSpinnerShoot();
attach2DSpinner();
}
if (section_seven_timer < 0) {
section_seven_timer = 0;
section_eight_timer = section_eight_timer - 1;
if (section_eight_timer > 0) {
enemySpinnerShoot();
attachSpinner();
}
if (section_eight_timer < 0) {
section_eight_timer = 0;
section_nine_timer = section_nine_timer - 1;
if (section_nine_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("spinner_mc", "spinner_mc" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
if (this._x < player._x) {
standardEnemyShoot();
}
this._rotation = this._rotation - 50;
this._x = this._x - 27;
if (locked) {
this._x = this._x - 100;
}
};
releaseStandardEnemy = 75;
}
}
if (section_nine_timer < 0) {
section_nine_timer = 0;
section_ten_timer = section_ten_timer - 1;
if (section_ten_timer > 0) {
hyperdriveRunning();
locked = true;
}
}
if (section_ten_timer < 0) {
locked = false;
_root.hyper_drive.removeMovieClip();
section_ten_timer = 0;
section_eleven_timer = section_eleven_timer - 1;
if (section_eleven_timer > 0) {
attachEnemyPlanes();
}
if (section_eleven_timer < 0) {
section_eleven_timer = 0;
section_twelve_timer = section_twelve_timer - 1;
if (section_twelve_timer > 0) {
if ((timeOfLastEnemyFire6 + 50000) < getTimer()) {
timeOfLastEnemyFire6 = getTimer();
_root.attachMovie("warning", "warning", _root.getNextHighestDepth(), {_x:90, _y:125});
}
if ((timeOfLastEnemyFire + 1000) < getTimer()) {
timeOfLastEnemyFire = getTimer();
voice_danger_sound.start();
}
}
if (section_twelve_timer < 0) {
section_twelve_timer = 0;
moveAim();
bst._x = 450.8;
bst._y = 1.2;
bst.sc.text = boss_health;
_root.warning.removeMovieClip();
standardEnemyShoot();
if (enterBoss == 1) {
section_twelve_timer = 0;
boss = _root.attachMovie("nb", "nb", _root.getNextHighestDepth(), {_x:660, _y:210});
holdBoss.push(boss);
boss.onEnterFrame = function () {
bossShoot();
if ((timeOfLastEnemyFire3 + 600) < getTimer()) {
timeOfLastEnemyFire3 = getTimer();
BulletNum++;
bossFire = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:550, _y:Math.round(Math.random() * 183) + 92});
holdEnemyBullets.push(bossFire);
bossFire.onEnterFrame = function () {
this._x = this._x - 7;
};
}
this._x = this._x - 2;
if (this._x < 380) {
this._x = 380;
}
};
attachAim();
enterBoss = 0;
}
}
}
}
}
}
}
}
}
}
}
}
}
function show_final_report() {
if (boss_dead) {
removeAim();
bst._x = 450.8;
bst._y = -62.8;
if ((timeOfLastEnemyFire5 + 50000) < getTimer()) {
timeOfLastEnemyFire5 = getTimer();
mission_completed._x = 90;
mission_completed._y = 180;
mission_completed.ek.text = enemyKills;
mission_completed.ws.text = withSword;
setGrade();
}
nextLevelCountDown = nextLevelCountDown - 1;
if (nextLevelCountDown == 0) {
locked = true;
stopAllSounds();
mission_completed._x = -0.5;
mission_completed._y = -178.5;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
removePlayerFire();
removePowerUp();
gotoAndPlay ("level_three_intro");
}
}
}
function attachSpinner() {
releaseSpinner = releaseSpinner - 1;
if (releaseSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("spinner_mc", "spinner_mc" + spNum, _root.getNextHighestDepth(), {_x:450, _y:345});
holdSpinner.push(enemySpinner);
releaseSpinner = 30;
}
}
function attach2DSpinner() {
release2DSpinner = release2DSpinner - 1;
if (release2DSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("spinner_mc", "spinner_mc" + spNum, _root.getNextHighestDepth(), {_x:450, _y:2});
hold2DSpinner.push(enemySpinner);
release2DSpinner = 30;
}
}
function attachAim() {
bossAim = _root.attachMovie("aim", "aim", _root.getNextHighestDepth(), {_x:770, _y:200});
holdAim.push(bossAim);
bossAim.onEnterFrame = function () {
this._alpha = 0;
this._rotation = this._rotation - 50;
};
}
function attachEnemyPlanes() {
releaseEnemyPlane = releaseEnemyPlane - 1;
if (releaseEnemyPlane == 0) {
EnemyPlaneNum++;
enemyPlane = _root.attachMovie("small_planes", "small_planes" + EnemyPlaneNum, _root.getNextHighestDepth(), {_x:600, _y:Math.round(Math.random() * 364) + 6});
holdEnemyPlane.push(enemyPlane);
releaseEnemyPlane = 15;
}
}
function attachEnemyChopper() {
releaseEnemyChopper = releaseEnemyChopper - 1;
if (releaseEnemyChopper == 0) {
EnemyChopperNum++;
enemyChopper = _root.attachMovie("enemy_chopper", "enemy_chopper" + EnemyChopperNum, _root.getNextHighestDepth(), {_x:800, _y:Math.round(Math.random() * 293) + 40});
holdEnemyChopper.push(enemyChopper);
releaseEnemyChopper = 150;
}
}
function moveAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i]._x = holdAim[i]._x - 6;
if (holdAim[i]._x < 380) {
holdAim[i]._x = 380;
}
i--;
}
}
function moveEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i]._x = holdEnemyPlane[i]._x - enemyPlaneSpeed;
i--;
}
}
function moveEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i]._x = holdEnemyChopper[i]._x - enemyChopperSpeed;
i--;
}
}
function moveSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i]._y = holdSpinner[i]._y - 10;
holdSpinner[i]._x = holdSpinner[i]._x - 6;
i--;
}
}
function move2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i]._y = hold2DSpinner[i]._y + 10;
hold2DSpinner[i]._x = hold2DSpinner[i]._x - 6;
i--;
}
}
function removePlayerFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeRip() {
i = holdRip.length - 1;
while (i >= 0) {
holdRip[i].removeMovieClip();
holdRip.splice(i, 1);
i--;
}
}
function removeAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i].removeMovieClip();
holdAim.splice(i, 1);
i--;
}
}
function removeBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
holdBoss[i].removeMovieClip();
holdBoss.splice(i, 1);
i--;
}
}
function removeStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
i--;
}
}
function removeSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
i--;
}
}
function remove2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
i--;
}
}
function removeFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
i--;
}
}
function removeEnemyBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
i--;
}
}
function removeEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
i--;
}
}
function enemyPlaneCut() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.slashing_strike)) {
score = score + 100;
enemyKills++;
withSword++;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function enemyPlaneShot() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function enemySpinnerCut() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function enemySpinnerShot() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function standardEnemyCut() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function standardEnemyShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerShot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerCut() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.slashing_strike)) {
score = score + 100;
enemyKills++;
withSword++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function bossCut() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.slashing_strike)) {
score = score + 25;
boss_health = boss_health - 10;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health < 0) {
enemyKills++;
withSword++;
boss_health = 0;
score = score + 25000;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
}
i--;
}
}
function bossShot() {
i = holdBoss.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdBoss[i].hitTest(playerFire[j])) {
score = score + 2;
boss_health = boss_health - 1;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health == 0) {
score = score + 10000;
enemyKills++;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
playerFire[j].removeMovieClip();
playerFire.splice(j, 1);
}
j--;
}
i--;
}
}
function enemyChopperShot() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyChopper[i].hitTest(playerFire[j])) {
score = score + 5;
chopper_health = chopper_health - 1;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
enemyKills++;
score = score + 100;
chopper_health = 10;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyChopperCut() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.slashing_strike)) {
score = score + 10;
chopper_health = chopper_health - 5;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
score = score + 200;
if (chopper_health == 0) {
withSword++;
enemyKills++;
chopper_health = 10;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHitEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
debNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function playerHitEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
chopper_health = chopper_health - 1;
damage++;
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
hit_sound.start();
bonus = 1;
chopper_health = 10;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHit2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function playerHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function playerHitSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function playerHitBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
holdBoss[i].gotoAndPlay("flash");
}
i--;
}
}
function playerHitBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if (holdEnemyBullets[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyBullets[i]._x + 20, _y:holdEnemyBullets[i]._y});
exp2._xscale = 40;
exp2._yscale = 40;
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function ripHitEnemy2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitEnemySpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function viewMouse() {
if (_root._ymouse < 350) {
Mouse.hide();
} else {
Mouse.show();
}
}
function gameOver() {
if (damage > 3) {
_root.health_bar.gotoAndStop("none");
fadeTimer = fadeTimer - 1;
if ((onlyDoItOnce + 3000) < getTimer()) {
onlyDoItOnce = getTimer();
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:_root.player._x, _y:_root.player._y});
exp2._xscale = 150;
exp2._yscale = 150;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
}
if (fadeTimer == 0) {
removePlayerFire();
removeRip();
removeAim();
removeBoss();
removeStandardEnemy();
removeSpinner();
remove2DSpinner();
removeFire();
removeEnemy();
removeEnemyBullet();
removeEnemyChopper();
removePowerUp();
locked = true;
gotoAndStop ("game_over");
}
}
}
function powerUpGun() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i].hitTest(_root.hit_)) {
if (gunPower < 3) {
gunPower++;
} else {
score = score + 250;
}
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function attachPowerUp() {
if ((powerUpTimer + 50000) < getTimer()) {
powerUpTimer = getTimer();
pUpNum++;
pUp = _root.attachMovie("powerUp_", "powerUp_" + pUpNum, _root.getNextHighestDepth(), {_x:1000, _y:Math.round(Math.random() * 230) + 70});
pUp.onEnterFrame = function () {
this._x = this._x - 3;
};
holdUp.push(pUp);
}
}
function removePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
i--;
}
}
function erasePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i]._x < -125) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function setGrade() {
if (withSword > 70) {
mission_completed.grade.text = "A";
} else if (withSword > 60) {
mission_completed.grade.text = "B";
} else if (withSword > 50) {
mission_completed.grade.text = "C";
} else {
mission_completed.grade.text = "D";
}
}
function playerHitStart() {
level_two_start.onEnterFrame = function () {
if (_root.player._x > 190) {
_root.player._x = 190;
}
};
}
function StartHitBullet() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i].hitTest(_root.level_two_start)) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth(), {_x:25, _y:300});
hit_._alpha = 0;
_root.attachMovie("level_two_start", "level_two_start", _root.getNextHighestDepth(), {_x:400, _y:138});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:25, _y:300});
shooting = false;
sword_selected = false;
locked = false;
boss_dead = false;
if (level > 2) {
level = level;
} else {
level = 2;
}
gunPower = 0;
enemyKills = 0;
withSword = 0;
robotSpeed = 7;
shotSpeed = 20;
enemyPlaneSpeed = 20;
enemyChopperSpeed = 6;
damage = 0;
smokeSpeed = 10;
smoke_interval = 3;
BulletSpeed = 2;
chopper_health = 10;
boss_health = 650;
bonus = 1;
powerUpTimer = 0;
onlyDoItOnce = 0;
fadeTimer = 50;
nextLevelCountDown = 150;
enterBoss = 1;
smokerelease = 10;
sslashhit = 3;
is_attacking = -3;
timeOfLastFire = 0;
timeOfLastEnemyFire = 0;
timeOfLastEnemyFire2 = 0;
timeOfLastEnemyFire3 = 0;
timeOfLastEnemyFire4 = 0;
timeOfLastEnemyFire5 = 0;
timeOfLastEnemyFire6 = 0;
is_shooting = -5;
releaseStandardEnemy = 110;
releaseSpinner = 50;
release2DSpinner = 75;
releaseEnemyPlane = 50;
releaseEnemyChopper = 50;
section_one_timer = 500;
section_two_timer = 500;
section_three_timer = 175;
section_four_timer = 175;
section_five_timer = 300;
section_six_timer = 500;
section_seven_timer = 500;
section_eight_timer = 500;
section_nine_timer = 500;
section_ten_timer = 150;
section_eleven_timer = 300;
section_twelve_timer = 100;
section_thirteen_timer = 500;
section_fourteen_timer = 500;
section_fiftenn_timer = 500;
playerShotNum = 0;
EnemyChopperNum = 0;
EnemyPlaneNum = 0;
seNum = 0;
smoNum = 0;
smo2Num = 0;
smo3Num = 0;
exp2Num = 0;
BulletNum = 0;
debNum = 0;
chainNum = 0;
flashNum = 0;
spNum = 0;
ripNum = 0;
voice_danger_sound = new Sound();
voice_danger_sound.attachSound("voice_danger");
hyp_sound = new Sound();
hyp_sound.attachSound("hyp");
hit_sound = new Sound();
hit_sound.attachSound("boom");
shot_sound = new Sound();
shot_sound.attachSound("ak47");
explodeObject_sound = new Sound();
explodeObject_sound.attachSound("explodeObject");
loudBang_sound = new Sound();
loudBang_sound.attachSound("loudBang");
var holdUp = new Array();
var holdBoss = new Array();
var holdAim = new Array();
var holdRip = new Array();
var playerFire = new Array();
var standardEnemy = new Array();
var holdEnemyPlane = new Array();
var holdSpinner = new Array();
var hold2DSpinner = new Array();
var holdEnemyChopper = new Array();
var holdEnemyBullets = new Array();
_root.onMouseDown = function () {
if (!locked) {
if (sword_selected) {
_root.player.gotoAndStop("slash");
shooting = true;
} else {
_root.player.gotoAndStop("shoot");
shooting = true;
}
}
};
_root.onMouseUp = function () {
if (!locked) {
shooting = false;
sslashhit = 3;
is_shooting = -5;
is_attacking = -3;
}
};
player.onEnterFrame = function () {
StartHitBullet();
playerHitStart();
erasePowerUp();
attachPowerUp();
powerUpGun();
standardEnemyShot();
playerHitStandardEnemy();
eraseStandardEnemy();
eraseFire();
playerBounds();
fire();
playerMovement();
shoot();
viewMouse();
erase2DSpinner();
move2DSpinner();
enemy2DSpinnerShot();
playerHit2DSpinner();
attachHit_();
ripHitPlane();
eraseEnemyPlane();
ripHitStandardEnemy();
eraseBlueBullet();
enemyPlaneShot();
moveEnemyPlane();
attachDamageFunctions();
moveEnemyPlane();
weapon_switch();
eraseEnemyChopper();
moveEnemyChopper();
playerHitEnemyChopper();
playerHitBullet();
playerHitEnemyPlane();
moveSpinner();
playerHitSpinner();
enemyChopperShot();
runSections();
enemySpinnerShot();
enemyChopperCut();
eraseSpinner();
swordSlash();
enemy2DSpinnerCut();
standardEnemyCut();
enemySpinnerCut();
enemyPlaneCut();
ripHitEnemySpinner();
ripHitEnemy2DSpinner();
playerHitBoss();
bossShot();
bossCut();
show_final_report();
};
weapon_select.onEnterFrame = function () {
gameOver();
};
stop();
Frame 1020
function playerMovement() {
if (!locked) {
endX = _root._xmouse;
endY = _root._ymouse;
player._x = player._x + ((endX - player._x) / robotSpeed);
player._y = player._y + ((endY - player._y) / robotSpeed);
if (!shooting) {
if (_root._xmouse < (_root.player._x - 25)) {
_root.player.gotoAndStop("back");
} else if (_root._ymouse < (_root.player._y - 25)) {
_root.player.gotoAndStop("up");
} else if (_root._ymouse > (_root.player._y - 25)) {
_root.player.gotoAndStop("down");
} else {
_root.player.gotoAndStop("idle");
}
}
}
}
function weapon_switch() {
if (Key.getCode() == 90) {
_root.weapon_select.gotoAndStop("sword");
sword_selected = true;
} else if (Key.getCode() == 88) {
_root.weapon_select.gotoAndStop("gun");
sword_selected = false;
}
}
function swordSlash() {
if (shooting) {
is_attacking++;
if (sword_selected) {
if (is_attacking > 0) {
sslashhit = sslashhit - 1;
slashing_strike = _root.attachMovie("slash_hit", "slash_hit", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
slashing_strike._alpha = 0;
if (sslashhit < 0) {
slashing_strike.removeMovieClip();
}
}
}
}
}
function shoot() {
if (!locked) {
if (!sword_selected) {
if (shooting) {
is_shooting++;
}
if (is_shooting > 0) {
if (gunPower == 0) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot);
}
} else if (gunPower == 1) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot1 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot1);
shot2 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 10});
playerFire.push(shot2);
shot3 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y});
playerFire.push(shot3);
}
} else if (gunPower == 2) {
if ((timeOfLastFire + 200) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot4 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot4.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot4);
}
} else if (gunPower == 3) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot5 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot5.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot5);
shot6 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot6.onEnterFrame = function () {
this._rotation = this._rotation + 15;
};
playerFire.push(shot6);
}
}
}
}
}
}
function hyperdriveRunning() {
_root.player.gotoAndStop("boost");
if ((timeOfLastEnemyFire4 + 50000) < getTimer()) {
timeOfLastEnemyFire4 = getTimer();
hyper_drive = _root.attachMovie("streaks", "streaks", _root.getNextHighestDepth(), {_x:0, _y:0});
hyp_sound.start();
}
}
function playerBounds() {
if (player._x > 485) {
player._x = 485;
} else if (player._x < 60) {
player._x = 60;
} else if (player._y > 345) {
player._y = 345;
} else if (player._y < 50) {
player._y = 50;
}
}
function eraseFire() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i]._x > 550) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
function eraseEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i]._x < -125) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function eraseEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i]._x < -310) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
i--;
}
}
function eraseStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((((standardEnemy[i]._x < -100) or (standardEnemy[i]._x > 650)) or (standardEnemy[i]._y < -100)) or (standardEnemy[i]._y > 500)) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function eraseSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i]._y < -150) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function erase2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i]._y > 405) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function eraseBlueBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if ((((holdEnemyBullets[i]._x < -10) or (holdEnemyBullets[i]._x > 550)) or (holdEnemyBullets[i]._y < -10)) or (holdEnemyBullets[i]._y > 400)) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 20);
hit_._y = hit_._y + ((endY - hit_._y) - 30);
}
function fire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i]._x = playerFire[i]._x + shotSpeed;
i--;
}
}
function beamShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 100) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
beam = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x - 23, _y:standardEnemy[i]._y + 20});
holdEnemyBullets.push(beam);
beam.onEnterFrame = function () {
this._x = this._x - 20;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemy2DSpinnerShoot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 50) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 5;
this._y = this._y + 2;
};
}
i--;
}
}
function bossShoot() {
i = holdAim.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 1) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdAim[i]._x, _y:holdAim[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdAim[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function standardEnemyShoot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 30) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = standardEnemy[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemySpinnerShoot() {
i = holdSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire2 + 50) < getTimer()) {
timeOfLastEnemyFire2 = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 5;
this._y = this._y - 2;
};
}
i--;
}
}
function attachDamageFunctions() {
takingDamage();
takingDamage2();
takingDamage3();
}
function addSmoke() {
smoNum++;
sm = _root.attachMovie("smoke", "smoke" + smoNum, _root.getNextHighestDepth(), {_x:player._x + 25, _y:player._y - 15});
sm.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke2() {
smo2Num++;
sm2 = _root.attachMovie("smoke", "smoke" + smo2Num, _root.getNextHighestDepth(), {_x:player._x - 10, _y:player._y + 3});
sm2.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 30;
this._yscale = this._yscale + 30;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke3() {
smo3Num++;
sm3 = _root.attachMovie("smoke", "smoke" + smo3Num, _root.getNextHighestDepth(), {_x:player._x - 5, _y:player._y + 15});
sm3.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 60;
this._yscale = this._yscale + 60;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function takingDamage() {
if (damage == 1) {
_root.health_bar.gotoAndStop("hitOnce");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage2() {
if (damage == 2) {
_root.health_bar.gotoAndStop("hitTwice");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage3() {
if (damage == 3) {
_root.health_bar.gotoAndStop("lastHit");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke3();
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function runSections() {
section_one_timer = section_one_timer - 1;
if (section_one_timer > 0) {
beamShot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("blimp", "blimp" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 7;
};
releaseStandardEnemy = 75;
}
}
if (section_one_timer < 0) {
section_one_timer = 0;
section_two_timer = section_two_timer - 1;
if (section_two_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("missile_enemy", "missile_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:113.3});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 8;
};
}
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("missile_enemy", "missile_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:265.3});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 8;
};
releaseStandardEnemy = 15;
}
}
if (section_two_timer < 0) {
section_two_timer = 0;
section_three_timer = section_three_timer - 1;
if (section_three_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("missile_enemy", "missile_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_three_timer < 0) {
section_three_timer = 0;
section_four_timer = section_four_timer - 1;
if (section_four_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_spin", "new_spin" + seNum, _root.getNextHighestDepth(), {_x:640, _y:Math.round(Math.random() * 356) + 4});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 85;
this._x = this._x - 5;
};
releaseStandardEnemy = 75;
}
}
if (section_four_timer < 0) {
section_four_timer = 0;
section_five_timer = section_five_timer - 1;
if (section_five_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_spin", "new_spin" + seNum, _root.getNextHighestDepth(), {_x:640, _y:Math.round(Math.random() * 356) + 4});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_five_timer < 0) {
section_five_timer = 0;
section_six_timer = section_six_timer - 1;
if (section_six_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_spin", "new_spin" + seNum, _root.getNextHighestDepth(), {_x:640, _y:Math.round(Math.random() * 356) + 4});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 85;
this._x = this._x - 5;
};
releaseStandardEnemy = 75;
}
}
if (section_six_timer < 0) {
section_six_timer = 0;
section_seven_timer = section_seven_timer - 1;
if (section_seven_timer > 0) {
enemy2DSpinnerShoot();
attach2DSpinner();
enemySpinnerShoot();
attachSpinner();
}
if (section_seven_timer < 0) {
section_seven_timer = 0;
section_eight_timer = section_eight_timer - 1;
if (section_eight_timer > 0) {
attachEnemyPlanes();
}
if (section_eight_timer < 0) {
section_eight_timer = 0;
section_nine_timer = section_nine_timer - 1;
if (section_nine_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_spin", "new_spin" + seNum, _root.getNextHighestDepth(), {_x:-40, _y:330});
standardEnemy.push(StaEn);
StaEn._rotation = 340;
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 3;
this._x = this._x + 12;
if (locked) {
this._x = this._x - 100;
}
};
releaseStandardEnemy = 25;
}
}
if (section_nine_timer < 0) {
section_nine_timer = 0;
section_ten_timer = section_ten_timer - 1;
if (section_ten_timer > 0) {
hyperdriveRunning();
locked = true;
}
}
if (section_ten_timer < 0) {
locked = false;
_root.hyper_drive.removeMovieClip();
section_ten_timer = 0;
section_eleven_timer = section_eleven_timer - 1;
if (section_eleven_timer > 0) {
attachEnemyPlanes();
}
if (section_eleven_timer < 0) {
section_eleven_timer = 0;
section_twelve_timer = section_twelve_timer - 1;
if (section_twelve_timer > 0) {
if ((timeOfLastEnemyFire6 + 50000) < getTimer()) {
timeOfLastEnemyFire6 = getTimer();
_root.attachMovie("warning", "warning", _root.getNextHighestDepth(), {_x:90, _y:125});
}
if ((timeOfLastEnemyFire + 1000) < getTimer()) {
timeOfLastEnemyFire = getTimer();
voice_danger_sound.start();
}
}
if (section_twelve_timer < 0) {
section_twelve_timer = 0;
moveAim();
bst._x = 450.8;
bst._y = 1.2;
bst.sc.text = boss_health;
_root.warning.removeMovieClip();
standardEnemyShoot();
if (enterBoss == 1) {
section_twelve_timer = 0;
boss = _root.attachMovie("nunu", "nunu", _root.getNextHighestDepth(), {_x:660, _y:210});
holdBoss.push(boss);
boss.onEnterFrame = function () {
bossShoot();
if ((timeOfLastEnemyFire3 + 1000) < getTimer()) {
timeOfLastEnemyFire3 = getTimer();
BulletNum++;
bossFire = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:550, _y:Math.round(Math.random() * 400) + 0});
holdEnemyBullets.push(bossFire);
bossFire.onEnterFrame = function () {
this._x = this._x - 4;
};
}
this._x = this._x - 2;
if (this._x < 320) {
this._x = 320;
}
};
attachAim();
enterBoss = 0;
}
}
}
}
}
}
}
}
}
}
}
}
}
function show_final_report() {
if (boss_dead) {
removeAim();
bst._x = 450.8;
bst._y = -62.8;
if ((timeOfLastEnemyFire5 + 50000) < getTimer()) {
timeOfLastEnemyFire5 = getTimer();
mission_completed._x = 90;
mission_completed._y = 180;
mission_completed.ek.text = enemyKills;
mission_completed.ws.text = withSword;
setGrade();
}
nextLevelCountDown = nextLevelCountDown - 1;
if (nextLevelCountDown == 0) {
locked = true;
stopAllSounds();
mission_completed._x = -0.5;
mission_completed._y = -178.5;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
removePlayerFire();
removePowerUp();
gotoAndPlay ("level_four_intro");
}
}
}
function attachSpinner() {
releaseSpinner = releaseSpinner - 1;
if (releaseSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("nnn_ppp", "nnn_ppp" + spNum, _root.getNextHighestDepth(), {_x:450, _y:345});
holdSpinner.push(enemySpinner);
releaseSpinner = 25;
}
}
function attach2DSpinner() {
release2DSpinner = release2DSpinner - 1;
if (release2DSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("nnn_ppp", "nnn_ppp" + spNum, _root.getNextHighestDepth(), {_x:450, _y:2});
hold2DSpinner.push(enemySpinner);
release2DSpinner = 50;
}
}
function attachAim() {
bossAim = _root.attachMovie("aim", "aim", _root.getNextHighestDepth(), {_x:770, _y:200});
holdAim.push(bossAim);
bossAim._rotation = 220;
bossAim.onEnterFrame = function () {
this._alpha = 0;
this._rotation = this._rotation - 2;
};
}
function attachEnemyPlanes() {
releaseEnemyPlane = releaseEnemyPlane - 1;
if (releaseEnemyPlane == 0) {
EnemyPlaneNum++;
enemyPlane = _root.attachMovie("missile_enemy", "missile_enemy" + EnemyPlaneNum, _root.getNextHighestDepth(), {_x:600, _y:Math.round(Math.random() * 364) + 6});
holdEnemyPlane.push(enemyPlane);
releaseEnemyPlane = 15;
}
}
function attachEnemyChopper() {
releaseEnemyChopper = releaseEnemyChopper - 1;
if (releaseEnemyChopper == 0) {
EnemyChopperNum++;
enemyChopper = _root.attachMovie("enemy_chopper", "enemy_chopper" + EnemyChopperNum, _root.getNextHighestDepth(), {_x:800, _y:Math.round(Math.random() * 293) + 40});
holdEnemyChopper.push(enemyChopper);
releaseEnemyChopper = 150;
}
}
function moveAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i]._x = holdAim[i]._x - 3;
if (holdAim[i]._x < 280) {
holdAim[i]._x = 280;
}
i--;
}
}
function moveEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i]._x = holdEnemyPlane[i]._x - enemyPlaneSpeed;
holdEnemyPlane[i]._rotation = holdEnemyPlane[i]._rotation - 50;
i--;
}
}
function moveEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i]._x = holdEnemyChopper[i]._x - enemyChopperSpeed;
i--;
}
}
function moveSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i]._y = holdSpinner[i]._y - 10;
holdSpinner[i]._x = holdSpinner[i]._x - 6;
i--;
}
}
function move2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i]._y = hold2DSpinner[i]._y + 10;
hold2DSpinner[i]._x = hold2DSpinner[i]._x - 6;
i--;
}
}
function removePlayerFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeRip() {
i = holdRip.length - 1;
while (i >= 0) {
holdRip[i].removeMovieClip();
holdRip.splice(i, 1);
i--;
}
}
function removeAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i].removeMovieClip();
holdAim.splice(i, 1);
i--;
}
}
function removeBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
holdBoss[i].removeMovieClip();
holdBoss.splice(i, 1);
i--;
}
}
function removeStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
i--;
}
}
function removeSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
i--;
}
}
function remove2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
i--;
}
}
function removeFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
i--;
}
}
function removeEnemyBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
i--;
}
}
function removeEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
i--;
}
}
function enemyPlaneCut() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function enemyPlaneShot() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function enemySpinnerCut() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function enemySpinnerShot() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function standardEnemyCut() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function standardEnemyShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerShot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerCut() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function bossCut() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.slashing_strike)) {
score = score + 25;
boss_health = boss_health - 10;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health < 0) {
enemyKills++;
withSword++;
boss_health = 0;
score = score + 25000;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
}
i--;
}
}
function bossShot() {
i = holdBoss.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdBoss[i].hitTest(playerFire[j])) {
score = score + 2;
boss_health = boss_health - 1;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health == 0) {
enemyKills++;
score = score + 10000;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
playerFire[j].removeMovieClip();
playerFire.splice(j, 1);
}
j--;
}
i--;
}
}
function enemyChopperShot() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyChopper[i].hitTest(playerFire[j])) {
score = score + 5;
chopper_health = chopper_health - 1;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
score = score + 100;
enemyKills++;
chopper_health = 10;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyChopperCut() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.slashing_strike)) {
score = score + 10;
chopper_health = chopper_health - 5;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
score = score + 200;
if (chopper_health == 0) {
withSword++;
chopper_health = 10;
enemyKills++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHitEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
debNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function playerHitEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
chopper_health = chopper_health - 1;
damage++;
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
hit_sound.start();
bonus = 1;
chopper_health = 10;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHit2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function playerHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function playerHitSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function playerHitBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
holdBoss[i].gotoAndPlay("flash");
}
i--;
}
}
function playerHitBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if (holdEnemyBullets[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyBullets[i]._x + 20, _y:holdEnemyBullets[i]._y});
exp2._xscale = 40;
exp2._yscale = 40;
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function ripHitEnemy2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitEnemySpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function viewMouse() {
if (_root._ymouse < 350) {
Mouse.hide();
} else {
Mouse.show();
}
}
function gameOver() {
if (damage > 3) {
fadeTimer = fadeTimer - 1;
_root.health_bar.gotoAndStop("none");
if ((onlyDoItOnce + 3000) < getTimer()) {
onlyDoItOnce = getTimer();
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:_root.player._x, _y:_root.player._y});
exp2._xscale = 150;
exp2._yscale = 150;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
}
if (fadeTimer == 0) {
removePlayerFire();
removeRip();
removeAim();
removeBoss();
removeStandardEnemy();
removeSpinner();
remove2DSpinner();
removeFire();
removeEnemy();
removeEnemyBullet();
removeEnemyChopper();
removePowerUp();
locked = true;
gotoAndStop ("game_over");
}
}
}
function powerUpGun() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i].hitTest(_root.hit_)) {
if (gunPower < 3) {
gunPower++;
} else {
score = score + 250;
}
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function attachPowerUp() {
if ((powerUpTimer + 50000) < getTimer()) {
powerUpTimer = getTimer();
pUpNum++;
pUp = _root.attachMovie("powerUp_", "powerUp_" + pUpNum, _root.getNextHighestDepth(), {_x:1000, _y:Math.round(Math.random() * 230) + 70});
pUp.onEnterFrame = function () {
this._x = this._x - 3;
};
holdUp.push(pUp);
}
}
function removePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
i--;
}
}
function erasePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i]._x < -125) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function setGrade() {
if (withSword > 70) {
mission_completed.grade.text = "A";
} else if (withSword > 60) {
mission_completed.grade.text = "B";
} else if (withSword > 50) {
mission_completed.grade.text = "C";
} else {
mission_completed.grade.text = "D";
}
}
function playerHitStart() {
level_three_start.onEnterFrame = function () {
if (_root.player._x > 190) {
_root.player._x = 190;
}
};
}
function StartHitBullet() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i].hitTest(_root.level_three_start)) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth(), {_x:25, _y:300});
hit_._alpha = 0;
_root.attachMovie("level_three_start", "level_three_start", _root.getNextHighestDepth(), {_x:400, _y:138});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:25, _y:300});
shooting = false;
sword_selected = false;
locked = false;
boss_dead = false;
if (level > 3) {
level = level;
} else {
level = 3;
}
gunPower = 0;
enemyKills = 0;
withSword = 0;
robotSpeed = 7;
shotSpeed = 20;
enemyPlaneSpeed = 12;
enemyChopperSpeed = 6;
damage = 0;
smokeSpeed = 10;
smoke_interval = 3;
BulletSpeed = 2;
chopper_health = 10;
boss_health = 1000;
bonus = 1;
powerUpTimer = 0;
onlyDoItOnce = 0;
fadeTimer = 50;
nextLevelCountDown = 150;
enterBoss = 1;
smokerelease = 10;
sslashhit = 3;
is_attacking = -3;
timeOfLastFire = 0;
timeOfLastEnemyFire = 0;
timeOfLastEnemyFire2 = 0;
timeOfLastEnemyFire3 = 0;
timeOfLastEnemyFire4 = 0;
timeOfLastEnemyFire5 = 0;
timeOfLastEnemyFire6 = 0;
is_shooting = -5;
releaseStandardEnemy = 110;
releaseSpinner = 50;
release2DSpinner = 75;
releaseEnemyPlane = 50;
releaseEnemyChopper = 50;
section_one_timer = 500;
section_two_timer = 175;
section_three_timer = 175;
section_four_timer = 175;
section_five_timer = 300;
section_six_timer = 650;
section_seven_timer = 1000;
section_eight_timer = 500;
section_nine_timer = 500;
section_ten_timer = 150;
section_eleven_timer = 300;
section_twelve_timer = 100;
section_thirteen_timer = 500;
section_fourteen_timer = 500;
section_fiftenn_timer = 500;
playerShotNum = 0;
EnemyChopperNum = 0;
EnemyPlaneNum = 0;
seNum = 0;
smoNum = 0;
smo2Num = 0;
smo3Num = 0;
exp2Num = 0;
BulletNum = 0;
debNum = 0;
chainNum = 0;
flashNum = 0;
spNum = 0;
ripNum = 0;
voice_danger_sound = new Sound();
voice_danger_sound.attachSound("voice_danger");
hyp_sound = new Sound();
hyp_sound.attachSound("hyp");
hit_sound = new Sound();
hit_sound.attachSound("boom");
shot_sound = new Sound();
shot_sound.attachSound("ak47");
explodeObject_sound = new Sound();
explodeObject_sound.attachSound("explodeObject");
loudBang_sound = new Sound();
loudBang_sound.attachSound("loudBang");
var holdUp = new Array();
var holdBoss = new Array();
var holdAim = new Array();
var holdRip = new Array();
var playerFire = new Array();
var standardEnemy = new Array();
var holdEnemyPlane = new Array();
var holdSpinner = new Array();
var hold2DSpinner = new Array();
var holdEnemyChopper = new Array();
var holdEnemyBullets = new Array();
_root.onMouseDown = function () {
if (!locked) {
if (sword_selected) {
_root.player.gotoAndStop("slash");
shooting = true;
} else {
_root.player.gotoAndStop("shoot");
shooting = true;
}
}
};
_root.onMouseUp = function () {
if (!locked) {
shooting = false;
sslashhit = 3;
is_shooting = -5;
is_attacking = -3;
}
};
player.onEnterFrame = function () {
StartHitBullet();
playerHitStart();
erasePowerUp();
attachPowerUp();
powerUpGun();
standardEnemyShot();
playerHitStandardEnemy();
eraseStandardEnemy();
eraseFire();
playerBounds();
fire();
playerMovement();
shoot();
viewMouse();
erase2DSpinner();
move2DSpinner();
enemy2DSpinnerShot();
playerHit2DSpinner();
attachHit_();
ripHitPlane();
eraseEnemyPlane();
ripHitStandardEnemy();
eraseBlueBullet();
enemyPlaneShot();
moveEnemyPlane();
attachDamageFunctions();
moveEnemyPlane();
weapon_switch();
eraseEnemyChopper();
moveEnemyChopper();
playerHitEnemyChopper();
playerHitBullet();
playerHitEnemyPlane();
moveSpinner();
playerHitSpinner();
enemyChopperShot();
runSections();
enemySpinnerShot();
enemyChopperCut();
eraseSpinner();
swordSlash();
enemy2DSpinnerCut();
standardEnemyCut();
enemySpinnerCut();
enemyPlaneCut();
ripHitEnemySpinner();
ripHitEnemy2DSpinner();
playerHitBoss();
bossShot();
bossCut();
show_final_report();
};
weapon_select.onEnterFrame = function () {
gameOver();
};
stop();
Frame 1196
function playerMovement() {
if (!locked) {
endX = _root._xmouse;
endY = _root._ymouse;
player._x = player._x + ((endX - player._x) / robotSpeed);
player._y = player._y + ((endY - player._y) / robotSpeed);
if (!shooting) {
if (_root._xmouse < (_root.player._x - 25)) {
_root.player.gotoAndStop("back");
} else if (_root._ymouse < (_root.player._y - 25)) {
_root.player.gotoAndStop("up");
} else if (_root._ymouse > (_root.player._y - 25)) {
_root.player.gotoAndStop("down");
} else {
_root.player.gotoAndStop("idle");
}
}
}
}
function weapon_switch() {
if (Key.getCode() == 90) {
_root.weapon_select.gotoAndStop("sword");
sword_selected = true;
} else if (Key.getCode() == 88) {
_root.weapon_select.gotoAndStop("gun");
sword_selected = false;
}
}
function swordSlash() {
if (shooting) {
is_attacking++;
if (sword_selected) {
if (is_attacking > 0) {
sslashhit = sslashhit - 1;
slashing_strike = _root.attachMovie("slash_hit", "slash_hit", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
slashing_strike._alpha = 0;
if (sslashhit < 0) {
slashing_strike.removeMovieClip();
}
}
}
}
}
function shoot() {
if (!locked) {
if (!sword_selected) {
if (shooting) {
is_shooting++;
}
if (is_shooting > 0) {
if (gunPower == 0) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot);
}
} else if (gunPower == 1) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot1 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot1);
shot2 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 10});
playerFire.push(shot2);
shot3 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y});
playerFire.push(shot3);
}
} else if (gunPower == 2) {
if ((timeOfLastFire + 200) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot4 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot4.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot4);
}
} else if (gunPower == 3) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot5 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot5.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot5);
shot6 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot6.onEnterFrame = function () {
this._rotation = this._rotation + 15;
};
playerFire.push(shot6);
}
}
}
}
}
}
function hyperdriveRunning() {
_root.player.gotoAndStop("boost");
if ((timeOfLastEnemyFire4 + 50000) < getTimer()) {
timeOfLastEnemyFire4 = getTimer();
hyper_drive = _root.attachMovie("streaks", "streaks", _root.getNextHighestDepth(), {_x:0, _y:0});
hyp_sound.start();
}
}
function playerBounds() {
if (player._x > 485) {
player._x = 485;
} else if (player._x < 60) {
player._x = 60;
} else if (player._y > 345) {
player._y = 345;
} else if (player._y < 50) {
player._y = 50;
}
}
function eraseFire() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i]._x > 550) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
function eraseEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i]._x < -125) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function eraseEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i]._x < -310) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
i--;
}
}
function eraseStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((((standardEnemy[i]._x < -100) or (standardEnemy[i]._x > 650)) or (standardEnemy[i]._y < -100)) or (standardEnemy[i]._y > 500)) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function eraseSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i]._y < -150) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function erase2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i]._y > 405) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function eraseBlueBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if ((((holdEnemyBullets[i]._x < -10) or (holdEnemyBullets[i]._x > 550)) or (holdEnemyBullets[i]._y < -10)) or (holdEnemyBullets[i]._y > 400)) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 20);
hit_._y = hit_._y + ((endY - hit_._y) - 30);
}
function fire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i]._x = playerFire[i]._x + shotSpeed;
i--;
}
}
function beamShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 100) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
beam = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x - 23, _y:standardEnemy[i]._y + 20});
holdEnemyBullets.push(beam);
beam.onEnterFrame = function () {
this._x = this._x - 20;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemy2DSpinnerShoot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 50) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = hold2DSpinner[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function bossShoot() {
i = holdAim.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire7 + 1000) < getTimer()) {
timeOfLastEnemyFire7 = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdAim[i]._x, _y:holdAim[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdAim[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function chopperEnemyShoot() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 30) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdEnemyChopper[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function standardEnemyShoot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 30) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = standardEnemy[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemySpinnerShoot() {
i = holdSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire2 + 50) < getTimer()) {
timeOfLastEnemyFire2 = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdSpinner[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function attachDamageFunctions() {
takingDamage();
takingDamage2();
takingDamage3();
}
function addSmoke() {
smoNum++;
sm = _root.attachMovie("smoke", "smoke" + smoNum, _root.getNextHighestDepth(), {_x:player._x + 25, _y:player._y - 15});
sm.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke2() {
smo2Num++;
sm2 = _root.attachMovie("smoke", "smoke" + smo2Num, _root.getNextHighestDepth(), {_x:player._x - 10, _y:player._y + 3});
sm2.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 30;
this._yscale = this._yscale + 30;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke3() {
smo3Num++;
sm3 = _root.attachMovie("smoke", "smoke" + smo3Num, _root.getNextHighestDepth(), {_x:player._x - 5, _y:player._y + 15});
sm3.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 60;
this._yscale = this._yscale + 60;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function takingDamage() {
if (damage == 1) {
_root.health_bar.gotoAndStop("hitOnce");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage2() {
if (damage == 2) {
_root.health_bar.gotoAndStop("hitTwice");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage3() {
if (damage == 3) {
_root.health_bar.gotoAndStop("lastHit");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke3();
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function runSections() {
section_one_timer = section_one_timer - 1;
if (section_one_timer > 0) {
attachEnemyChopper();
chopperEnemyShoot();
}
if (section_one_timer < 0) {
section_one_timer = 0;
section_two_timer = section_two_timer - 1;
if (section_two_timer > 0) {
attachEnemyPlanes();
}
}
if (section_two_timer < 0) {
section_two_timer = 0;
section_three_timer = section_three_timer - 1;
if (section_three_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("bleeblau", "bleeblau" + seNum, _root.getNextHighestDepth(), {_x:460, _y:-65});
standardEnemy.push(StaEn);
StaEn._rotation = 260;
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 3;
this._y = this._y + 12;
};
releaseStandardEnemy = 25;
}
}
if (section_three_timer < 0) {
section_three_timer = 0;
section_four_timer = section_four_timer - 1;
if (section_four_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("bleeblau", "bleeblau" + seNum, _root.getNextHighestDepth(), {_x:460, _y:400});
standardEnemy.push(StaEn);
StaEn._rotation = 200;
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 3;
this._y = this._y - 20;
};
releaseStandardEnemy = 25;
}
}
if (section_four_timer < 0) {
section_four_timer = 0;
section_five_timer = section_five_timer - 1;
if (section_five_timer > 0) {
beamShot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("blimp", "blimp" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 7;
};
releaseStandardEnemy = 75;
}
}
if (section_five_timer < 0) {
section_five_timer = 0;
section_six_timer = section_six_timer - 1;
if (section_six_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("bleeblau", "bleeblau" + seNum, _root.getNextHighestDepth(), {_x:640, _y:Math.round(Math.random() * 356) + 4});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 75;
this._x = this._x - 8;
};
releaseStandardEnemy = 75;
}
}
if (section_six_timer < 0) {
section_six_timer = 0;
section_seven_timer = section_seven_timer - 1;
if (section_seven_timer > 0) {
enemy2DSpinnerShoot();
attach2DSpinner();
enemySpinnerShoot();
attachSpinner();
}
if (section_seven_timer < 0) {
section_seven_timer = 0;
section_eight_timer = section_eight_timer - 1;
if (section_eight_timer > 0) {
attachEnemyPlanes();
}
if (section_eight_timer < 0) {
section_eight_timer = 0;
section_nine_timer = section_nine_timer - 1;
if (section_nine_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("bleeblau", "bleeblau" + seNum, _root.getNextHighestDepth(), {_x:-40, _y:Math.round(Math.random() * 270) + 30});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x + 7;
if (locked) {
this._x = this._x - 100;
}
};
releaseStandardEnemy = 25;
}
}
if (section_nine_timer < 0) {
section_nine_timer = 0;
section_ten_timer = section_ten_timer - 1;
if (section_ten_timer > 0) {
hyperdriveRunning();
locked = true;
}
}
if (section_ten_timer < 0) {
locked = false;
_root.hyper_drive.removeMovieClip();
section_ten_timer = 0;
section_eleven_timer = section_eleven_timer - 1;
if (section_eleven_timer > 0) {
attachEnemyPlanes();
}
if (section_eleven_timer < 0) {
section_eleven_timer = 0;
section_twelve_timer = section_twelve_timer - 1;
if (section_twelve_timer > 0) {
if ((timeOfLastEnemyFire6 + 50000) < getTimer()) {
timeOfLastEnemyFire6 = getTimer();
_root.attachMovie("warning", "warning", _root.getNextHighestDepth(), {_x:90, _y:125});
}
if ((timeOfLastEnemyFire + 1000) < getTimer()) {
timeOfLastEnemyFire = getTimer();
voice_danger_sound.start();
}
}
if (section_twelve_timer < 0) {
section_twelve_timer = 0;
moveAim();
bst._x = 450.8;
bst._y = 1.2;
bst.sc.text = boss_health;
_root.warning.removeMovieClip();
if (enterBoss == 1) {
section_twelve_timer = 0;
boss = _root.attachMovie("nextBadGuy", "nextBadGuy", _root.getNextHighestDepth(), {_x:660, _y:210});
holdBoss.push(boss);
boss.onEnterFrame = function () {
if ((timeOfLastEnemyFire3 + 15) < getTimer()) {
timeOfLastEnemyFire3 = getTimer();
bossShoot();
enemy2DSpinnerShoot();
attach2DSpinner();
enemySpinnerShoot();
attachSpinner();
}
this._x = this._x - 2;
if (this._x < 380) {
this._x = 380;
}
};
attachAim();
enterBoss = 0;
}
}
}
}
}
}
}
}
}
}
}
}
function show_final_report() {
if (boss_dead) {
removeAim();
bst._x = 450.8;
bst._y = -62.8;
if ((timeOfLastEnemyFire5 + 50000) < getTimer()) {
timeOfLastEnemyFire5 = getTimer();
mission_completed._x = 90;
mission_completed._y = 180;
mission_completed.ek.text = enemyKills;
mission_completed.ws.text = withSword;
setGrade();
}
nextLevelCountDown = nextLevelCountDown - 1;
if (nextLevelCountDown == 0) {
locked = true;
stopAllSounds();
mission_completed._x = -0.5;
mission_completed._y = -178.5;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
removePlayerFire();
removePowerUp();
gotoAndPlay ("level_five_intro");
}
}
}
function attachSpinner() {
releaseSpinner = releaseSpinner - 1;
if (releaseSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("bleeblau", "bleeblau" + spNum, _root.getNextHighestDepth(), {_x:450, _y:345});
enemySpinner._rotation = 180;
holdSpinner.push(enemySpinner);
releaseSpinner = 25;
}
}
function attach2DSpinner() {
release2DSpinner = release2DSpinner - 1;
if (release2DSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("bleeblau", "bleeblau" + spNum, _root.getNextHighestDepth(), {_x:450, _y:2});
enemySpinner._rotation = 180;
hold2DSpinner.push(enemySpinner);
release2DSpinner = 50;
}
}
function attachAim() {
bossAim = _root.attachMovie("aim", "aim", _root.getNextHighestDepth(), {_x:770, _y:200});
holdAim.push(bossAim);
bossAim._rotation = 220;
bossAim.onEnterFrame = function () {
this._alpha = 0;
this._rotation = this._rotation - 2;
};
}
function attachEnemyPlanes() {
releaseEnemyPlane = releaseEnemyPlane - 1;
if (releaseEnemyPlane == 0) {
EnemyPlaneNum++;
enemyPlane = _root.attachMovie("bleeblau", "bleeblau" + EnemyPlaneNum, _root.getNextHighestDepth(), {_x:600, _y:Math.round(Math.random() * 364) + 6});
holdEnemyPlane.push(enemyPlane);
releaseEnemyPlane = 15;
}
}
function attachEnemyChopper() {
releaseEnemyChopper = releaseEnemyChopper - 1;
if (releaseEnemyChopper == 0) {
EnemyChopperNum++;
enemyChopper = _root.attachMovie("nextBadGuy", "nextBadGuy" + EnemyChopperNum, _root.getNextHighestDepth(), {_x:800, _y:Math.round(Math.random() * 293) + 40});
enemyChopper._rotation = 260;
holdEnemyChopper.push(enemyChopper);
enemyChopper.onEnterFrame = function () {
enemyChopper._rotation = enemyChopper._rotation - 2;
};
releaseEnemyChopper = 150;
}
}
function moveAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i]._x = holdAim[i]._x - 3;
if (holdAim[i]._x < 280) {
holdAim[i]._x = 280;
}
i--;
}
}
function moveEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i]._x = holdEnemyPlane[i]._x - enemyPlaneSpeed;
holdEnemyPlane[i]._rotation = holdEnemyPlane[i]._rotation - 50;
i--;
}
}
function moveEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i]._x = holdEnemyChopper[i]._x - enemyChopperSpeed;
i--;
}
}
function moveSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i]._y = holdSpinner[i]._y - 10;
holdSpinner[i]._x = holdSpinner[i]._x - 6;
holdSpinner[i]._rotation = holdSpinner[i]._rotation + 33;
i--;
}
}
function move2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i]._y = hold2DSpinner[i]._y + 10;
hold2DSpinner[i]._x = hold2DSpinner[i]._x - 6;
hold2DSpinner[i]._rotation = hold2DSpinner[i]._rotation - 33;
i--;
}
}
function removePlayerFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeRip() {
i = holdRip.length - 1;
while (i >= 0) {
holdRip[i].removeMovieClip();
holdRip.splice(i, 1);
i--;
}
}
function removeAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i].removeMovieClip();
holdAim.splice(i, 1);
i--;
}
}
function removeBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
holdBoss[i].removeMovieClip();
holdBoss.splice(i, 1);
i--;
}
}
function removeStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
i--;
}
}
function removeSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
i--;
}
}
function remove2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
i--;
}
}
function removeFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
i--;
}
}
function removeEnemyBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
i--;
}
}
function removeEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
i--;
}
}
function enemyPlaneCut() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.slashing_strike)) {
enemyKills++;
withSword++;
score = score + 100;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function enemyPlaneShot() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function enemySpinnerCut() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function enemySpinnerShot() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function standardEnemyCut() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function standardEnemyShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(playerFire[j])) {
score = score + 50;
enemyKills++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerShot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(playerFire[j])) {
score = score + 50;
ripNum++;
enemyKills++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerCut() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.slashing_strike)) {
score = score + 100;
withSword++;
enemyKills++;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function bossCut() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.slashing_strike)) {
score = score + 25;
boss_health = boss_health - 10;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health < 0) {
enemyKills++;
withSword++;
boss_health = 0;
score = score + 25000;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
}
i--;
}
}
function bossShot() {
i = holdBoss.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdBoss[i].hitTest(playerFire[j])) {
score = score + 2;
boss_health = boss_health - 1;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health == 0) {
enemyKills++;
score = score + 10000;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
playerFire[j].removeMovieClip();
playerFire.splice(j, 1);
}
j--;
}
i--;
}
}
function enemyChopperShot() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyChopper[i].hitTest(playerFire[j])) {
score = score + 5;
chopper_health = chopper_health - 1;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
enemyKills++;
score = score + 100;
chopper_health = 10;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyChopperCut() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.slashing_strike)) {
score = score + 10;
chopper_health = chopper_health - 5;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
score = score + 200;
if (chopper_health == 0) {
withSword++;
chopper_health = 10;
flashNum++;
enemyKills++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHitEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
debNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function playerHitEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
chopper_health = chopper_health - 1;
damage++;
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
hit_sound.start();
bonus = 1;
chopper_health = 10;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHit2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function playerHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function playerHitSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function playerHitBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
holdBoss[i].gotoAndPlay("flash");
}
i--;
}
}
function playerHitBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if (holdEnemyBullets[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyBullets[i]._x + 20, _y:holdEnemyBullets[i]._y});
exp2._xscale = 40;
exp2._yscale = 40;
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function ripHitEnemy2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitEnemySpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(holdRip[j])) {
bonus++;
enemyKills++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_shot", "enemy_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function viewMouse() {
if (_root._ymouse < 350) {
Mouse.hide();
} else {
Mouse.show();
}
}
function gameOver() {
if (damage > 3) {
fadeTimer = fadeTimer - 1;
_root.health_bar.gotoAndStop("none");
if ((onlyDoItOnce + 3000) < getTimer()) {
onlyDoItOnce = getTimer();
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:_root.player._x, _y:_root.player._y});
exp2._xscale = 150;
exp2._yscale = 150;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
}
if (fadeTimer == 0) {
removePlayerFire();
removeRip();
removeAim();
removeBoss();
removeStandardEnemy();
removeSpinner();
remove2DSpinner();
removeFire();
removeEnemy();
removeEnemyBullet();
removeEnemyChopper();
removePowerUp();
locked = true;
gotoAndStop ("game_over");
}
}
}
function powerUpGun() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i].hitTest(_root.hit_)) {
if (gunPower < 3) {
gunPower++;
} else {
score = score + 250;
}
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function attachPowerUp() {
if ((powerUpTimer + 50000) < getTimer()) {
powerUpTimer = getTimer();
pUpNum++;
pUp = _root.attachMovie("powerUp_", "powerUp_" + pUpNum, _root.getNextHighestDepth(), {_x:1000, _y:Math.round(Math.random() * 230) + 70});
pUp.onEnterFrame = function () {
this._x = this._x - 3;
};
holdUp.push(pUp);
}
}
function removePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
i--;
}
}
function erasePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i]._x < -125) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function setGrade() {
if (withSword > 70) {
mission_completed.grade.text = "A";
} else if (withSword > 60) {
mission_completed.grade.text = "B";
} else if (withSword > 50) {
mission_completed.grade.text = "C";
} else {
mission_completed.grade.text = "D";
}
}
function playerHitStart() {
level_four_start.onEnterFrame = function () {
if (_root.player._x > 190) {
_root.player._x = 190;
}
};
}
function StartHitBullet() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i].hitTest(_root.level_four_start)) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth(), {_x:25, _y:300});
hit_._alpha = 0;
_root.attachMovie("level_four_start", "level_four_start", _root.getNextHighestDepth(), {_x:400, _y:138});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:25, _y:300});
shooting = false;
sword_selected = false;
locked = false;
boss_dead = false;
if (level > 4) {
level = level;
} else {
level = 4;
}
gunPower = 0;
enemyKills = 0;
withSword = 0;
robotSpeed = 7;
shotSpeed = 20;
enemyPlaneSpeed = 12;
enemyChopperSpeed = 6;
damage = 0;
smokeSpeed = 10;
smoke_interval = 3;
BulletSpeed = 2;
chopper_health = 10;
boss_health = 650;
bonus = 1;
powerUpTimer = 0;
onlyDoItOnce = 0;
fadeTimer = 50;
nextLevelCountDown = 150;
enterBoss = 1;
smokerelease = 10;
sslashhit = 3;
is_attacking = -3;
timeOfLastFire = 0;
timeOfLastEnemyFire = 0;
timeOfLastEnemyFire2 = 0;
timeOfLastEnemyFire3 = 0;
timeOfLastEnemyFire4 = 0;
timeOfLastEnemyFire5 = 0;
timeOfLastEnemyFire6 = 0;
timeOfLastEnemyFire7 = 0;
is_shooting = -5;
releaseStandardEnemy = 110;
releaseSpinner = 50;
release2DSpinner = 75;
releaseEnemyPlane = 50;
releaseEnemyChopper = 50;
section_one_timer = 1000;
section_two_timer = 500;
section_three_timer = 175;
section_four_timer = 175;
section_five_timer = 300;
section_six_timer = 650;
section_seven_timer = 1000;
section_eight_timer = 500;
section_nine_timer = 250;
section_ten_timer = 150;
section_eleven_timer = 300;
section_twelve_timer = 100;
section_thirteen_timer = 500;
section_fourteen_timer = 500;
section_fiftenn_timer = 500;
playerShotNum = 0;
EnemyChopperNum = 0;
EnemyPlaneNum = 0;
seNum = 0;
smoNum = 0;
smo2Num = 0;
smo3Num = 0;
exp2Num = 0;
BulletNum = 0;
debNum = 0;
chainNum = 0;
flashNum = 0;
spNum = 0;
ripNum = 0;
voice_danger_sound = new Sound();
voice_danger_sound.attachSound("voice_danger");
hyp_sound = new Sound();
hyp_sound.attachSound("hyp");
hit_sound = new Sound();
hit_sound.attachSound("boom");
shot_sound = new Sound();
shot_sound.attachSound("ak47");
explodeObject_sound = new Sound();
explodeObject_sound.attachSound("explodeObject");
loudBang_sound = new Sound();
loudBang_sound.attachSound("loudBang");
var holdUp = new Array();
var holdBoss = new Array();
var holdAim = new Array();
var holdRip = new Array();
var playerFire = new Array();
var standardEnemy = new Array();
var holdEnemyPlane = new Array();
var holdSpinner = new Array();
var hold2DSpinner = new Array();
var holdEnemyChopper = new Array();
var holdEnemyBullets = new Array();
_root.onMouseDown = function () {
if (!locked) {
if (sword_selected) {
_root.player.gotoAndStop("slash");
shooting = true;
} else {
_root.player.gotoAndStop("shoot");
shooting = true;
}
}
};
_root.onMouseUp = function () {
if (!locked) {
shooting = false;
sslashhit = 3;
is_shooting = -5;
is_attacking = -3;
}
};
player.onEnterFrame = function () {
StartHitBullet();
playerHitStart();
erasePowerUp();
attachPowerUp();
powerUpGun();
standardEnemyShot();
playerHitStandardEnemy();
eraseStandardEnemy();
eraseFire();
playerBounds();
fire();
playerMovement();
shoot();
viewMouse();
erase2DSpinner();
move2DSpinner();
enemy2DSpinnerShot();
playerHit2DSpinner();
attachHit_();
ripHitPlane();
eraseEnemyPlane();
ripHitStandardEnemy();
eraseBlueBullet();
enemyPlaneShot();
moveEnemyPlane();
attachDamageFunctions();
moveEnemyPlane();
weapon_switch();
eraseEnemyChopper();
moveEnemyChopper();
playerHitEnemyChopper();
playerHitBullet();
playerHitEnemyPlane();
moveSpinner();
playerHitSpinner();
enemyChopperShot();
runSections();
enemySpinnerShot();
enemyChopperCut();
eraseSpinner();
swordSlash();
enemy2DSpinnerCut();
standardEnemyCut();
enemySpinnerCut();
enemyPlaneCut();
ripHitEnemySpinner();
ripHitEnemy2DSpinner();
playerHitBoss();
bossShot();
bossCut();
show_final_report();
};
weapon_select.onEnterFrame = function () {
gameOver();
};
stop();
Frame 1371
function playerMovement() {
if (!locked) {
endX = _root._xmouse;
endY = _root._ymouse;
player._x = player._x + ((endX - player._x) / robotSpeed);
player._y = player._y + ((endY - player._y) / robotSpeed);
if (!shooting) {
if (_root._xmouse < (_root.player._x - 25)) {
_root.player.gotoAndStop("back");
} else if (_root._ymouse < (_root.player._y - 25)) {
_root.player.gotoAndStop("up");
} else if (_root._ymouse > (_root.player._y - 25)) {
_root.player.gotoAndStop("down");
} else {
_root.player.gotoAndStop("idle");
}
}
}
}
function weapon_switch() {
if (Key.getCode() == 90) {
_root.weapon_select.gotoAndStop("sword");
sword_selected = true;
} else if (Key.getCode() == 88) {
_root.weapon_select.gotoAndStop("gun");
sword_selected = false;
}
}
function swordSlash() {
if (shooting) {
is_attacking++;
if (sword_selected) {
if (is_attacking > 0) {
sslashhit = sslashhit - 1;
slashing_strike = _root.attachMovie("slash_hit", "slash_hit", _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
slashing_strike._alpha = 0;
if (sslashhit < 0) {
slashing_strike.removeMovieClip();
}
}
}
}
}
function shoot() {
if (!locked) {
if (!sword_selected) {
if (shooting) {
is_shooting++;
}
if (is_shooting > 0) {
if (gunPower == 0) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot);
}
} else if (gunPower == 1) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot1 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
playerFire.push(shot1);
shot2 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 10});
playerFire.push(shot2);
shot3 = _root.attachMovie("player_shot", "player_shot" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y});
playerFire.push(shot3);
}
} else if (gunPower == 2) {
if ((timeOfLastFire + 200) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot4 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot4.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot4);
}
} else if (gunPower == 3) {
if ((timeOfLastFire + 150) < getTimer()) {
timeOfLastFire = getTimer();
playerShotNum++;
shot_sound.start();
_root.attachMovie("gun_flash", "gun_flash", _root.getNextHighestDepth(), {_x:player._x + 55, _y:player._y - 52.5});
shot5 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot5.onEnterFrame = function () {
this._rotation = this._rotation - 15;
};
playerFire.push(shot5);
shot6 = _root.attachMovie("streamer", "streamer" + playerShotNum, _root.getNextHighestDepth(), {_x:player._x + 75, _y:player._y - 5});
shot6.onEnterFrame = function () {
this._rotation = this._rotation + 15;
};
playerFire.push(shot6);
}
}
}
}
}
}
function hyperdriveRunning() {
_root.player.gotoAndStop("boost");
if ((timeOfLastEnemyFire4 + 50000) < getTimer()) {
timeOfLastEnemyFire4 = getTimer();
hyper_drive = _root.attachMovie("streaks", "streaks", _root.getNextHighestDepth(), {_x:0, _y:0});
hyp_sound.start();
}
}
function playerBounds() {
if (player._x > 485) {
player._x = 485;
} else if (player._x < 60) {
player._x = 60;
} else if (player._y > 345) {
player._y = 345;
} else if (player._y < 50) {
player._y = 50;
}
}
function eraseFire() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i]._x > 550) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
function eraseEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i]._x < -125) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function eraseEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i]._x < -310) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
i--;
}
}
function eraseStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((((standardEnemy[i]._x < -100) or (standardEnemy[i]._x > 650)) or (standardEnemy[i]._y < -100)) or (standardEnemy[i]._y > 500)) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function eraseSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i]._y < -150) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function erase2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i]._y > 405) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function eraseBlueBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if ((((holdEnemyBullets[i]._x < -10) or (holdEnemyBullets[i]._x > 550)) or (holdEnemyBullets[i]._y < -10)) or (holdEnemyBullets[i]._y > 400)) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function attachHit_() {
endX = _root.player._x;
endY = _root.player._y;
hit_._x = hit_._x + ((endX - hit_._x) - 20);
hit_._y = hit_._y + ((endY - hit_._y) - 30);
}
function fire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i]._x = playerFire[i]._x + shotSpeed;
i--;
}
}
function beamShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 100) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
beam = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x - 23, _y:standardEnemy[i]._y + 20});
holdEnemyBullets.push(beam);
beam.onEnterFrame = function () {
this._x = this._x - 20;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemy2DSpinnerShoot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 50) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = hold2DSpinner[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function bossShoot() {
i = holdAim.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire7 + 1000) < getTimer()) {
timeOfLastEnemyFire7 = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdAim[i]._x, _y:holdAim[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdAim[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function chopperEnemyShoot() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 30) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdEnemyChopper[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function standardEnemyShoot() {
i = standardEnemy.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire + 30) < getTimer()) {
timeOfLastEnemyFire = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = standardEnemy[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
if (locked) {
this._x = this._x - 100;
}
};
}
i--;
}
}
function enemySpinnerShoot() {
i = holdSpinner.length - 1;
while (i >= 0) {
if ((timeOfLastEnemyFire2 + 50) < getTimer()) {
timeOfLastEnemyFire2 = getTimer();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
holdEnemyBullets.push(blue_bullet);
angle = holdSpinner[i]._rotation;
blue_bullet.dirx = Math.cos((angle * Math.PI) / 180) * 6;
blue_bullet.diry = Math.sin((angle * Math.PI) / 180) * 6;
blue_bullet.onEnterFrame = function () {
this._x = this._x + this.dirx;
this._y = this._y + this.diry;
};
}
i--;
}
}
function attachDamageFunctions() {
takingDamage();
takingDamage2();
takingDamage3();
}
function addSmoke() {
smoNum++;
sm = _root.attachMovie("smoke", "smoke" + smoNum, _root.getNextHighestDepth(), {_x:player._x + 25, _y:player._y - 15});
sm.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke2() {
smo2Num++;
sm2 = _root.attachMovie("smoke", "smoke" + smo2Num, _root.getNextHighestDepth(), {_x:player._x - 10, _y:player._y + 3});
sm2.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 30;
this._yscale = this._yscale + 30;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function addSmoke3() {
smo3Num++;
sm3 = _root.attachMovie("smoke", "smoke" + smo3Num, _root.getNextHighestDepth(), {_x:player._x - 5, _y:player._y + 15});
sm3.onEnterFrame = function () {
this._x = this._x - smokeSpeed;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 60;
this._yscale = this._yscale + 60;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
function takingDamage() {
if (damage == 1) {
_root.health_bar.gotoAndStop("hitOnce");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage2() {
if (damage == 2) {
_root.health_bar.gotoAndStop("hitTwice");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function takingDamage3() {
if (damage == 3) {
_root.health_bar.gotoAndStop("lastHit");
smoke_interval = smoke_interval - 1;
if (smoke_interval == 0) {
addSmoke3();
addSmoke2();
addSmoke();
smoke_interval = 3;
}
}
}
function runSections() {
section_one_timer = section_one_timer - 1;
if (section_one_timer > 0) {
attachEnemyPlanes();
}
if (section_one_timer < 0) {
section_one_timer = 0;
section_two_timer = section_two_timer - 1;
if (section_two_timer > 0) {
enemy2DSpinnerShoot();
attach2DSpinner();
enemySpinnerShoot();
attachSpinner();
}
}
if (section_two_timer < 0) {
section_two_timer = 0;
section_three_timer = section_three_timer - 1;
if (section_three_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("missile_enemy", "missile_enemy" + seNum, _root.getNextHighestDepth(), {_x:640, _y:Math.round(Math.random() * 356) + 4});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_three_timer < 0) {
section_three_timer = 0;
section_four_timer = section_four_timer - 1;
if (section_four_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("missile_enemy", "missile_enemy" + seNum, _root.getNextHighestDepth(), {_x:460, _y:400});
standardEnemy.push(StaEn);
StaEn._rotation = 200;
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._y = this._y - 20;
};
releaseStandardEnemy = 25;
}
}
if (section_four_timer < 0) {
section_four_timer = 0;
section_five_timer = section_five_timer - 1;
if (section_five_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("missile_enemy", "missile_enemy" + seNum, _root.getNextHighestDepth(), {_x:Math.round(Math.random() * 225) + 280, _y:-40});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._y = this._y + 20;
};
releaseStandardEnemy = 15;
}
}
if (section_five_timer < 0) {
section_five_timer = 0;
section_six_timer = section_six_timer - 1;
if (section_six_timer > 0) {
beamShot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("blimp", "blimp" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 12;
};
releaseStandardEnemy = 25;
}
}
if (section_six_timer < 0) {
section_six_timer = 0;
section_seven_timer = section_seven_timer - 1;
if (section_seven_timer > 0) {
enemy2DSpinnerShoot();
attach2DSpinner();
enemySpinnerShoot();
attachSpinner();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 5) {
seNum++;
StaEn = _root.attachMovie("missile_enemy", "missile_enemy" + seNum, _root.getNextHighestDepth(), {_x:565, _y:Math.round(Math.random() * 250) + 60});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._x = this._x - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_seven_timer < 0) {
section_seven_timer = 0;
section_eight_timer = section_eight_timer - 1;
if (section_eight_timer > 0) {
standardEnemyShoot();
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_spin", "new_spin" + seNum, _root.getNextHighestDepth(), {_x:640, _y:Math.round(Math.random() * 356) + 4});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x - 20;
};
releaseStandardEnemy = 15;
}
}
if (section_eight_timer < 0) {
section_eight_timer = 0;
section_nine_timer = section_nine_timer - 1;
if (section_nine_timer > 0) {
releaseStandardEnemy = releaseStandardEnemy - 1;
if (releaseStandardEnemy == 0) {
seNum++;
StaEn = _root.attachMovie("new_spin", "new_spin" + seNum, _root.getNextHighestDepth(), {_x:-40, _y:Math.round(Math.random() * 270) + 30});
standardEnemy.push(StaEn);
StaEn.onEnterFrame = function () {
this._rotation = this._rotation - 50;
this._x = this._x + 7;
if (locked) {
this._x = this._x - 100;
}
};
releaseStandardEnemy = 25;
}
}
if (section_nine_timer < 0) {
section_nine_timer = 0;
section_ten_timer = section_ten_timer - 1;
if (section_ten_timer > 0) {
hyperdriveRunning();
locked = true;
}
}
if (section_ten_timer < 0) {
locked = false;
_root.hyper_drive.removeMovieClip();
section_ten_timer = 0;
section_eleven_timer = section_eleven_timer - 1;
if (section_eleven_timer > 0) {
attachEnemyPlanes();
}
if (section_eleven_timer < 0) {
section_eleven_timer = 0;
section_twelve_timer = section_twelve_timer - 1;
if (section_twelve_timer > 0) {
if ((timeOfLastEnemyFire6 + 50000) < getTimer()) {
timeOfLastEnemyFire6 = getTimer();
_root.attachMovie("warning", "warning", _root.getNextHighestDepth(), {_x:90, _y:125});
}
if ((timeOfLastEnemyFire + 1000) < getTimer()) {
timeOfLastEnemyFire = getTimer();
voice_danger_sound.start();
}
}
if (section_twelve_timer < 0) {
section_twelve_timer = 0;
moveAim();
bst._x = 450.8;
bst._y = 1.2;
bst.sc.text = boss_health;
_root.warning.removeMovieClip();
if (enterBoss == 1) {
section_twelve_timer = 0;
boss = _root.attachMovie("thebitch", "thebitch", _root.getNextHighestDepth(), {_x:660, _y:210});
holdBoss.push(boss);
boss.onEnterFrame = function () {
if ((timeOfLastEnemyFire3 + 15) < getTimer()) {
timeOfLastEnemyFire3 = getTimer();
bossShoot();
enemy2DSpinnerShoot();
attach2DSpinner();
enemySpinnerShoot();
attachSpinner();
}
this._x = this._x - 2;
if (this._x < 380) {
this._x = 380;
}
};
boss2 = _root.attachMovie("thebitch", "thebitch1", _root.getNextHighestDepth(), {_x:660, _y:90});
holdBoss.push(boss2);
boss2.onEnterFrame = function () {
this._x = this._x - 2;
if (boss_health < 300) {
this._x = this._x - 15;
} else if (boss_health > 300) {
if (this._x < 420) {
this._x = 420;
}
}
if (this._x < -190) {
this.removeMovieClip();
}
};
boss3 = _root.attachMovie("thebitch", "thebitch2", _root.getNextHighestDepth(), {_x:660, _y:340});
holdBoss.push(boss3);
boss3.onEnterFrame = function () {
this._x = this._x - 2;
if (boss_health < 500) {
this._x = this._x - 15;
} else if (boss_health > 500) {
if (this._x < 420) {
this._x = 420;
}
}
if (this._x < -190) {
this.removeMovieClip();
}
};
attachAim();
enterBoss = 0;
}
}
}
}
}
}
}
}
}
}
}
}
function show_final_report() {
if (boss_dead) {
removeAim();
bst._x = 450.8;
bst._y = -62.8;
if ((timeOfLastEnemyFire5 + 50000) < getTimer()) {
timeOfLastEnemyFire5 = getTimer();
mission_completed._x = 90;
mission_completed._y = 180;
mission_completed.ek.text = enemyKills;
mission_completed.ws.text = withSword;
setGrade();
}
nextLevelCountDown = nextLevelCountDown - 1;
if (nextLevelCountDown == 0) {
locked = true;
stopAllSounds();
mission_completed._x = -0.5;
mission_completed._y = -178.5;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
removePlayerFire();
removePowerUp();
gotoAndStop ("game_over");
}
}
}
function attachSpinner() {
releaseSpinner = releaseSpinner - 1;
if (releaseSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("missile_enemy", "missile_enemy" + spNum, _root.getNextHighestDepth(), {_x:450, _y:345});
enemySpinner._rotation = 180;
holdSpinner.push(enemySpinner);
releaseSpinner = 25;
}
}
function attach2DSpinner() {
release2DSpinner = release2DSpinner - 1;
if (release2DSpinner == 0) {
spNum++;
enemySpinner = _root.attachMovie("missile_enemy", "missile_enemy" + spNum, _root.getNextHighestDepth(), {_x:450, _y:2});
enemySpinner._rotation = 180;
hold2DSpinner.push(enemySpinner);
release2DSpinner = 50;
}
}
function attachAim() {
bossAim = _root.attachMovie("aim", "aim", _root.getNextHighestDepth(), {_x:770, _y:200});
holdAim.push(bossAim);
bossAim._rotation = 220;
bossAim.onEnterFrame = function () {
this._alpha = 0;
this._rotation = this._rotation - 2;
};
}
function attachEnemyPlanes() {
releaseEnemyPlane = releaseEnemyPlane - 1;
if (releaseEnemyPlane == 0) {
EnemyPlaneNum++;
enemyPlane = _root.attachMovie("new_spin", "new_spin" + EnemyPlaneNum, _root.getNextHighestDepth(), {_x:600, _y:Math.round(Math.random() * 364) + 6});
holdEnemyPlane.push(enemyPlane);
releaseEnemyPlane = 15;
}
}
function attachEnemyChopper() {
releaseEnemyChopper = releaseEnemyChopper - 1;
if (releaseEnemyChopper == 0) {
EnemyChopperNum++;
enemyChopper = _root.attachMovie("nextBadGuy", "nextBadGuy" + EnemyChopperNum, _root.getNextHighestDepth(), {_x:800, _y:Math.round(Math.random() * 293) + 40});
enemyChopper._rotation = 260;
holdEnemyChopper.push(enemyChopper);
enemyChopper.onEnterFrame = function () {
enemyChopper._rotation = enemyChopper._rotation - 2;
};
releaseEnemyChopper = 150;
}
}
function moveAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i]._x = holdAim[i]._x - 3;
if (holdAim[i]._x < 280) {
holdAim[i]._x = 280;
}
i--;
}
}
function moveEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i]._x = holdEnemyPlane[i]._x - enemyPlaneSpeed;
holdEnemyPlane[i]._rotation = holdEnemyPlane[i]._rotation - 5;
i--;
}
}
function moveEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i]._x = holdEnemyChopper[i]._x - enemyChopperSpeed;
i--;
}
}
function moveSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i]._y = holdSpinner[i]._y - 10;
holdSpinner[i]._x = holdSpinner[i]._x - 6;
holdSpinner[i]._rotation = holdSpinner[i]._rotation + 33;
i--;
}
}
function move2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i]._y = hold2DSpinner[i]._y + 10;
hold2DSpinner[i]._x = hold2DSpinner[i]._x - 6;
hold2DSpinner[i]._rotation = hold2DSpinner[i]._rotation - 33;
i--;
}
}
function removePlayerFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeRip() {
i = holdRip.length - 1;
while (i >= 0) {
holdRip[i].removeMovieClip();
holdRip.splice(i, 1);
i--;
}
}
function removeAim() {
i = holdAim.length - 1;
while (i >= 0) {
holdAim[i].removeMovieClip();
holdAim.splice(i, 1);
i--;
}
}
function removeBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
holdBoss[i].removeMovieClip();
holdBoss.splice(i, 1);
i--;
}
}
function removeStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
i--;
}
}
function removeSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
i--;
}
}
function remove2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
i--;
}
}
function removeFire() {
i = playerFire.length - 1;
while (i >= 0) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
i--;
}
}
function removeEnemyBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
i--;
}
}
function removeEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
i--;
}
}
function enemyPlaneCut() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.slashing_strike)) {
enemyKills++;
withSword++;
score = score + 100;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function enemyPlaneShot() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(playerFire[j])) {
enemyKills++;
score = score + 50;
debNum++;
explodeObject_sound.start();
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function enemySpinnerCut() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.slashing_strike)) {
enemyKills++;
withSword++;
score = score + 100;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function enemySpinnerShot() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(playerFire[j])) {
enemyKills++;
score = score + 50;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function standardEnemyCut() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.slashing_strike)) {
enemyKills++;
withSword++;
score = score + 100;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function standardEnemyShot() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(playerFire[j])) {
enemyKills++;
score = score + 50;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
explodeObject_sound.start();
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerShot() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(playerFire[j])) {
enemyKills++;
score = score + 50;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function enemy2DSpinnerCut() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.slashing_strike)) {
enemyKills++;
withSword++;
score = score + 100;
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
explodeObject_sound.start();
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function bossCut() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.slashing_strike)) {
score = score + 25;
boss_health = boss_health - 10;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health < 0) {
enemyKills++;
withSword++;
boss_health = 0;
score = score + 25000;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
}
i--;
}
}
function bossShot() {
i = holdBoss.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdBoss[i].hitTest(playerFire[j])) {
score = score + 2;
boss_health = boss_health - 1;
holdBoss[i].gotoAndPlay("flash");
explodeObject_sound.start();
if (boss_health == 0) {
enemyKills++;
score = score + 10000;
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdBoss[i]._x, _y:holdBoss[i]._y});
exp2._xscale = 250;
exp2._yscale = 250;
holdBoss[i].removeMovieClip();
boss_dead = true;
}
playerFire[j].removeMovieClip();
playerFire.splice(j, 1);
}
j--;
}
i--;
}
}
function enemyChopperShot() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
j = playerFire.length - 1;
while (j >= 0) {
if (holdEnemyChopper[i].hitTest(playerFire[j])) {
score = score + 5;
chopper_health = chopper_health - 1;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
enemyKills++;
score = score + 100;
chopper_health = 10;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
j--;
}
i--;
}
}
function enemyChopperCut() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.slashing_strike)) {
score = score + 10;
chopper_health = chopper_health - 5;
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
_root.enemyChopper.gotoAndPlay("flash");
score = score + 200;
if (chopper_health == 0) {
enemyKills++;
withSword++;
chopper_health = 10;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
explodeObject_sound.start();
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
BulletNum++;
blue_bullet5 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet5);
blue_bullet5.onEnterFrame = function () {
this._y = this._y - 2;
};
BulletNum++;
blue_bullet6 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet6);
blue_bullet6.onEnterFrame = function () {
this._x = this._x + 4;
this._y = this._y + 4;
};
BulletNum++;
blue_bullet7 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet7);
blue_bullet7.onEnterFrame = function () {
this._x = this._x + 1.5;
this._y = this._y - 1.5;
};
BulletNum++;
blue_bullet8 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x, _y:holdEnemyChopper[i]._y});
holdEnemyBullets.push(blue_bullet8);
blue_bullet8.onEnterFrame = function () {
this._x = this._x + 2;
};
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHitEnemyPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
if (holdEnemyPlane[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
debNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
i--;
}
}
function playerHitEnemyChopper() {
i = holdEnemyChopper.length - 1;
while (i >= 0) {
if (holdEnemyChopper[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
chopper_health = chopper_health - 1;
damage++;
_root.enemyChopper.gotoAndPlay("flash");
if (chopper_health == 0) {
hit_sound.start();
bonus = 1;
chopper_health = 10;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdEnemyChopper[i]._x - 100, _y:holdEnemyChopper[i]._y});
explo._xscale = 125;
explo._yscale = 125;
BulletNum++;
whiteFlash = _root.attachMovie("flash", "flash" + flashNum, _root.getNextHighestDepth(), {_x:0, _y:0});
holdEnemyChopper[i].removeMovieClip();
holdEnemyChopper.splice(i, 1);
}
}
i--;
}
}
function playerHit2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
if (hold2DSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x - 50, _y:hold2DSpinner[i]._y - 50});
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
i--;
}
}
function playerHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
if (standardEnemy[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
i--;
}
}
function playerHitSpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
if (holdSpinner[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
flashNum++;
explo = _root.attachMovie("explosion", "explosion" + debNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x - 50, _y:holdSpinner[i]._y - 50});
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
i--;
}
}
function playerHitBoss() {
i = holdBoss.length - 1;
while (i >= 0) {
if (holdBoss[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
holdBoss[i].gotoAndPlay("flash");
}
i--;
}
}
function playerHitBullet() {
i = holdEnemyBullets.length - 1;
while (i >= 0) {
if (holdEnemyBullets[i].hitTest(_root.hit_)) {
hit_sound.start();
bonus = 1;
damage++;
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyBullets[i]._x + 20, _y:holdEnemyBullets[i]._y});
exp2._xscale = 40;
exp2._yscale = 40;
holdEnemyBullets[i].removeMovieClip();
holdEnemyBullets.splice(i, 1);
}
i--;
}
}
function ripHitEnemy2DSpinner() {
i = hold2DSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (hold2DSpinner[i].hitTest(holdRip[j])) {
enemyKills++;
bonus++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:hold2DSpinner[i]._x, _y:hold2DSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = hold2DSpinner[i]._x - 25;
iripple._y = hold2DSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
hold2DSpinner[i].removeMovieClip();
hold2DSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitEnemySpinner() {
i = holdSpinner.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdSpinner[i].hitTest(holdRip[j])) {
enemyKills++;
bonus++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdSpinner[i]._x, _y:holdSpinner[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdSpinner[i]._x - 25;
iripple._y = holdSpinner[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
holdSpinner[i].removeMovieClip();
holdSpinner.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitStandardEnemy() {
i = standardEnemy.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (standardEnemy[i].hitTest(holdRip[j])) {
enemyKills++;
bonus++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:standardEnemy[i]._x, _y:standardEnemy[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = standardEnemy[i]._x - 25;
iripple._y = standardEnemy[i]._y - 25;
iripple._xscale = 30;
iripple._yscale = 30;
standardEnemy[i].removeMovieClip();
standardEnemy.splice(i, 1);
}
j--;
}
i--;
}
}
function ripHitPlane() {
i = holdEnemyPlane.length - 1;
while (i >= 0) {
j = holdRip.length - 1;
while (j >= 0) {
if (holdEnemyPlane[i].hitTest(holdRip[j])) {
enemyKills++;
bonus++;
score = score + (bonus * 100);
explodeObject_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
chainNum++;
chani_text = _root.attachMovie("chain_bonus", "chain_bonus" + chainNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
ripNum++;
iripple = _root.attachMovie("ripple", "ripple" + ripNum, _root.getNextHighestDepth());
holdRip.push(iripple);
iripple._x = holdEnemyPlane[i]._x + 10;
iripple._y = holdEnemyPlane[i]._y;
iripple._xscale = 30;
iripple._yscale = 30;
BulletNum++;
blue_bullet = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet);
blue_bullet.onEnterFrame = function () {
this._x = this._x - 1.5;
};
BulletNum++;
blue_bullet2 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet2);
blue_bullet2.onEnterFrame = function () {
this._x = this._x - 2;
this._y = this._y - 2;
};
BulletNum++;
blue_bullet3 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet3);
blue_bullet3.onEnterFrame = function () {
this._x = this._x - 1.5;
this._y = this._y + 3;
};
BulletNum++;
blue_bullet4 = _root.attachMovie("enemy_pink_shot", "enemy_pink_shot" + BulletNum, _root.getNextHighestDepth(), {_x:holdEnemyPlane[i]._x, _y:holdEnemyPlane[i]._y});
holdEnemyBullets.push(blue_bullet4);
blue_bullet4.onEnterFrame = function () {
this._y = this._y + 1.5;
};
holdEnemyPlane[i].removeMovieClip();
holdEnemyPlane.splice(i, 1);
}
j--;
}
i--;
}
}
function viewMouse() {
if (_root._ymouse < 350) {
Mouse.hide();
} else {
Mouse.show();
}
}
function gameOver() {
if (damage > 3) {
fadeTimer = fadeTimer - 1;
_root.health_bar.gotoAndStop("none");
if ((onlyDoItOnce + 3000) < getTimer()) {
onlyDoItOnce = getTimer();
loudBang_sound.start();
exp2Num++;
exp2 = _root.attachMovie("exp_two", "exp_two" + exp2Num, _root.getNextHighestDepth(), {_x:_root.player._x, _y:_root.player._y});
exp2._xscale = 150;
exp2._yscale = 150;
_root.player.removeMovieClip();
_root.hit_.removeMovieClip();
}
if (fadeTimer == 0) {
removePlayerFire();
removeRip();
removeAim();
removeBoss();
removeStandardEnemy();
removeSpinner();
remove2DSpinner();
removeFire();
removeEnemy();
removeEnemyBullet();
removeEnemyChopper();
removePowerUp();
locked = true;
gotoAndStop ("game_over");
}
}
}
function powerUpGun() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i].hitTest(_root.hit_)) {
if (gunPower < 3) {
gunPower++;
} else {
score = score + 250;
}
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function attachPowerUp() {
if ((powerUpTimer + 50000) < getTimer()) {
powerUpTimer = getTimer();
pUpNum++;
pUp = _root.attachMovie("powerUp_", "powerUp_" + pUpNum, _root.getNextHighestDepth(), {_x:1000, _y:Math.round(Math.random() * 230) + 70});
pUp.onEnterFrame = function () {
this._x = this._x - 3;
};
holdUp.push(pUp);
}
}
function removePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
i--;
}
}
function erasePowerUp() {
i = holdUp.length - 1;
while (i >= 0) {
if (holdUp[i]._x < -125) {
holdUp[i].removeMovieClip();
holdUp.splice(i, 1);
}
i--;
}
}
function setGrade() {
if (withSword > 70) {
mission_completed.grade.text = "A";
} else if (withSword > 60) {
mission_completed.grade.text = "B";
} else if (withSword > 50) {
mission_completed.grade.text = "C";
} else {
mission_completed.grade.text = "D";
}
}
function playerHitStart() {
level_five_start.onEnterFrame = function () {
if (_root.player._x > 190) {
_root.player._x = 190;
}
};
}
function StartHitBullet() {
i = playerFire.length - 1;
while (i >= 0) {
if (playerFire[i].hitTest(_root.level_five_start)) {
playerFire[i].removeMovieClip();
playerFire.splice(i, 1);
}
i--;
}
}
_root.attachMovie("hit_", "hit_", _root.getNextHighestDepth(), {_x:25, _y:300});
hit_._alpha = 0;
_root.attachMovie("level_five_start", "level_five_start", _root.getNextHighestDepth(), {_x:400, _y:138});
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:25, _y:300});
shooting = false;
sword_selected = false;
locked = false;
boss_dead = false;
level = 5;
gunPower = 0;
enemyKills = 0;
withSword = 0;
robotSpeed = 7;
shotSpeed = 20;
enemyPlaneSpeed = 12;
enemyChopperSpeed = 6;
damage = 0;
smokeSpeed = 10;
smoke_interval = 3;
BulletSpeed = 2;
chopper_health = 10;
boss_health = 650;
bonus = 1;
powerUpTimer = 0;
onlyDoItOnce = 0;
fadeTimer = 50;
nextLevelCountDown = 150;
enterBoss = 1;
smokerelease = 10;
sslashhit = 3;
is_attacking = -3;
timeOfLastFire = 0;
timeOfLastEnemyFire = 0;
timeOfLastEnemyFire2 = 0;
timeOfLastEnemyFire3 = 0;
timeOfLastEnemyFire4 = 0;
timeOfLastEnemyFire5 = 0;
timeOfLastEnemyFire6 = 0;
timeOfLastEnemyFire7 = 0;
is_shooting = -5;
releaseStandardEnemy = 25;
releaseSpinner = 50;
release2DSpinner = 75;
releaseEnemyPlane = 110;
releaseEnemyChopper = 50;
section_one_timer = 250;
section_two_timer = 175;
section_three_timer = 175;
section_four_timer = 175;
section_five_timer = 175;
section_six_timer = 250;
section_seven_timer = 500;
section_eight_timer = 500;
section_nine_timer = 250;
section_ten_timer = 150;
section_eleven_timer = 300;
section_twelve_timer = 100;
section_thirteen_timer = 500;
section_fourteen_timer = 500;
section_fiftenn_timer = 500;
playerShotNum = 0;
EnemyChopperNum = 0;
EnemyPlaneNum = 0;
seNum = 0;
smoNum = 0;
smo2Num = 0;
smo3Num = 0;
exp2Num = 0;
BulletNum = 0;
debNum = 0;
chainNum = 0;
flashNum = 0;
spNum = 0;
ripNum = 0;
voice_danger_sound = new Sound();
voice_danger_sound.attachSound("voice_danger");
hyp_sound = new Sound();
hyp_sound.attachSound("hyp");
hit_sound = new Sound();
hit_sound.attachSound("boom");
shot_sound = new Sound();
shot_sound.attachSound("ak47");
explodeObject_sound = new Sound();
explodeObject_sound.attachSound("explodeObject");
loudBang_sound = new Sound();
loudBang_sound.attachSound("loudBang");
var holdUp = new Array();
var holdBoss = new Array();
var holdAim = new Array();
var holdRip = new Array();
var playerFire = new Array();
var standardEnemy = new Array();
var holdEnemyPlane = new Array();
var holdSpinner = new Array();
var hold2DSpinner = new Array();
var holdEnemyChopper = new Array();
var holdEnemyBullets = new Array();
_root.onMouseDown = function () {
if (!locked) {
if (sword_selected) {
_root.player.gotoAndStop("slash");
shooting = true;
} else {
_root.player.gotoAndStop("shoot");
shooting = true;
}
}
};
_root.onMouseUp = function () {
if (!locked) {
shooting = false;
sslashhit = 3;
is_shooting = -5;
is_attacking = -3;
}
};
player.onEnterFrame = function () {
StartHitBullet();
playerHitStart();
erasePowerUp();
attachPowerUp();
powerUpGun();
standardEnemyShot();
playerHitStandardEnemy();
eraseStandardEnemy();
eraseFire();
playerBounds();
fire();
playerMovement();
shoot();
viewMouse();
erase2DSpinner();
move2DSpinner();
enemy2DSpinnerShot();
playerHit2DSpinner();
attachHit_();
ripHitPlane();
eraseEnemyPlane();
ripHitStandardEnemy();
eraseBlueBullet();
enemyPlaneShot();
moveEnemyPlane();
attachDamageFunctions();
moveEnemyPlane();
weapon_switch();
eraseEnemyChopper();
moveEnemyChopper();
playerHitEnemyChopper();
playerHitBullet();
playerHitEnemyPlane();
moveSpinner();
playerHitSpinner();
enemyChopperShot();
runSections();
enemySpinnerShot();
enemyChopperCut();
eraseSpinner();
swordSlash();
enemy2DSpinnerCut();
standardEnemyCut();
enemySpinnerCut();
enemyPlaneCut();
ripHitEnemySpinner();
ripHitEnemy2DSpinner();
playerHitBoss();
bossShot();
bossCut();
show_final_report();
};
weapon_select.onEnterFrame = function () {
gameOver();
};
stop();
Frame 1372
stop();
Mouse.show();
stopAllSounds();
mochi.MochiScores.showLeaderboard({boardID:"2afe8d2a7a2226f9", score:score});
Symbol 18 MovieClip Frame 12
stop();
Symbol 22 Button
on (release) {
gotoAndPlay (2);
_root.soundstatus = "off";
}
Symbol 23 MovieClip Frame 11
stop();
Symbol 25 Button
on (release) {
gotoAndPlay (1);
_root.soundstatus = "on";
}
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 2
stop();
Instance of Symbol 30 MovieClip in Symbol 31 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 747 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.32");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 748 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 50 MovieClip [big_guy] Frame 1
stop();
Symbol 59 MovieClip [chain_bonus] Frame 19
this.removeMovieClip();
Symbol 73 MovieClip [enemy_chopper] Frame 1
stop();
Symbol 151 MovieClip [explosion] Frame 35
this.removeMovieClip();
Symbol 211 MovieClip [exp_two] Frame 30
this.removeMovieClip();
Symbol 212 MovieClip [flash] Frame 1
loudBang_sound = new Sound();
loudBang_sound.attachSound("loudBang");
timeOfLastPlay = 0;
this.onEnterFrame = function () {
if ((timeOfLastPlay + 3000) < getTimer()) {
timeOfLastPlay = getTimer();
loudBang_sound.start();
}
};
Symbol 212 MovieClip [flash] Frame 30
this.removeMovieClip();
Symbol 215 MovieClip [gun_flash] Frame 2
this.removeMovieClip();
Symbol 227 MovieClip [level_five_start] Frame 85
this.removeMovieClip();
Symbol 230 MovieClip [level_four_start] Frame 85
this.removeMovieClip();
Symbol 233 MovieClip [level_one_start] Frame 85
this.removeMovieClip();
Symbol 236 MovieClip [level_three_start] Frame 85
this.removeMovieClip();
Symbol 239 MovieClip [level_two_start] Frame 85
this.removeMovieClip();
Symbol 246 MovieClip [nb] Frame 1
stop();
Symbol 257 MovieClip [nextBadGuy] Frame 1
stop();
Symbol 270 MovieClip Frame 12
stop();
Symbol 275 MovieClip [nunu] Frame 1
stop();
Symbol 365 MovieClip Frame 6
stop();
Symbol 380 MovieClip Frame 14
stop();
Symbol 395 MovieClip Frame 13
stop();
Symbol 410 MovieClip Frame 13
stop();
Symbol 432 MovieClip Frame 11
stop();
Symbol 476 MovieClip Frame 13
stop();
Symbol 477 MovieClip [player] Frame 1
stop();
Symbol 477 MovieClip [player] Frame 2
stop();
Symbol 477 MovieClip [player] Frame 3
stop();
Symbol 477 MovieClip [player] Frame 4
stop();
Symbol 477 MovieClip [player] Frame 5
stop();
Symbol 477 MovieClip [player] Frame 6
stop();
Symbol 477 MovieClip [player] Frame 7
stop();
Symbol 493 MovieClip [ripple] Frame 15
this.removeMovieClip();
Symbol 495 MovieClip [slash_hit] Frame 3
this.removeMovieClip();
Symbol 634 MovieClip [thebitch] Frame 1
stop();
Symbol 639 Button
on (press) {
getURL ("http://www.avgames.co.uk/", "_blank");
}
Symbol 644 Button
on (release) {
gotoAndPlay ("level_one_intro");
}
Symbol 651 Button
on (press) {
getURL ("http://www.dragongamez.com");
}
Symbol 662 MovieClip Frame 646
gotoAndPlay (1);
Symbol 674 MovieClip [weapon_select] Frame 1
stop();
Symbol 674 MovieClip [weapon_select] Frame 2
stop();
Symbol 688 MovieClip Frame 29
stop();
Symbol 694 MovieClip Frame 1
stop();
Symbol 694 MovieClip Frame 2
stop();
Symbol 694 MovieClip Frame 3
stop();
Symbol 694 MovieClip Frame 4
stop();
Symbol 694 MovieClip Frame 5
stop();
Symbol 705 MovieClip Frame 647
gotoAndPlay (1);
Symbol 741 Button
on (press) {
gotoAndPlay ("title");
}
Symbol 744 Button
on (press) {
getURL ("http://www.dragongamez.com");
}
Symbol 746 MovieClip Frame 25
stop();