Frame 1
i = 1;
while (i < 21) {
_root.loadBar_mc.duplicateMovieClip(i, _root.getNextHighestDepth());
_root[i]._rotation = 18 * i;
i++;
}
Stage.showMenu = false;
Stage.scaleMode = "noScale";
stop();
Instance of Symbol 6 MovieClip "loadBar_mc" in Frame 1
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.getBytesTotal() != undefined) {
percent = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (this._rotation > 0) {
num = (this._rotation / 360) * 20;
} else {
num = ((360 - Math.abs(this._rotation)) / 360) * 20;
}
if (percent >= (num * 5)) {
this._alpha = 100;
} else if ((percent + 5) > (num * 5)) {
this._alpha = ((percent - ((num - 1) * 5)) / 5) * 100;
}
if (percent >= 100) {
_root.gotoAndPlay(2);
removeMovieClip(this);
}
}
}
Frame 2
_root.inputName_tx.onSetFocus = function () {
_root.playerName = "";
};
i = 1;
while (i <= 5) {
_root[("music" + i) + "_sfx"].stop();
_root[("music" + i) + "_sfx"] = new Sound();
_root[("music" + i) + "_sfx"].attachSound(("music" + i) + "_sfx");
_root[("music" + i) + "_sfx"].onSoundComplete = function () {
this.start();
};
i++;
}
myMusic = ("music" + (Math.floor(Math.random() * 5) + 1).toString()) + "_sfx";
_root[myMusic].start();
var 81 = new Sound();
var 68 = true;
_root.createEmptyMovieClip("sound_mc", _root.getNextHighestDepth());
Key.addListener(_root.sound_mc);
_root.sound_mc.onKeyDown = function () {
myKey = Key.getCode();
if ((myKey >= 49) && (myKey <= 53)) {
i = 1;
while (i <= 5) {
_root[("music" + i) + "_sfx"].stop();
i++;
}
myMusic = ("music" + (myKey - 48)) + "_sfx";
_root[myMusic].start();
}
if (myKey == 83) {
if (_root["68"]) {
_root["68"] = false;
_root["81"].setVolume(0);
} else {
_root["68"] = true;
_root["81"].setVolume(100);
}
}
};
if (_global.System) {
System.security.allowDomain("mochibot.com");
}
_level0.__com_mochibot__swfid = "9eb0eef1";
loadMovieNum ("http://mochibot.com/my/core.swf", 10301);
stop();
Frame 3
function 18() {
_root.laserPierce = false;
_root.laserSplit = false;
_root.laserBounce = false;
_root.laserFreeze = false;
_root.laserDouble = false;
_root.laserDrain = false;
_root.laserCritical = false;
_root.laserPush = false;
_root.hero_mc["84"] = 0;
}
function 56(7) {
bInit = 7.slice(0, 1) + "b";
bLeft = eval (7 + "Left");
bMax = eval (7 + "Max");
i = 0;
while (i < bMax) {
removeMovieClip(_root[bInit + i]);
i++;
}
}
function 55(7) {
bInit = 7.slice(0, 1) + "b";
bLeft = eval (7 + "Left");
bMax = eval (7 + "Max");
bBar = 7.toString() + "Bar_mc";
i = 0;
while (i < bMax) {
_root[bBar].duplicateMovieClip(bInit + i, _root.getNextHighestDepth());
_root[bInit + i]._rotation = (360 / bMax) * i;
i++;
}
}
function 3(7) {
bInit = 7.slice(0, 1) + "b";
bLeft = eval (7 + "Left");
bMax = eval (7 + "Max");
i = 0;
while (i < bMax) {
_root[bInit + i]._visible = false;
i++;
}
i = 0;
while (i < bLeft) {
_root[bInit + i]._visible = true;
_root[bInit + i]._alpha = 0;
i++;
}
}
var 33 = false;
var 32 = false;
var 72 = 800;
var 71 = 500;
var 11 = 100;
var 4 = 0;
var 30 = true;
var score = 0;
var 42 = 0;
var 41 = 0;
var 19 = 0;
var 82 = 0;
18();
var 49 = 4;
var 48 = 75;
var healthMax = 5;
var healthLeft = healthMax;
var 36 = 10;
var 38 = 1;
var 40 = 65;
var 8 = 720;
var bombMax = 4;
var bombLeft = bombMax;
var 10 = 2;
var 61 = 1;
var shieldMax = 3;
var shieldLeft = shieldMax;
var 20 = 1;
var 43 = 20;
var 31 = 0;
var 76 = 0;
var 25 = false;
var 24 = 0;
var 15 = false;
var 6 = false;
var 45 = false;
var 67 = false;
var 57 = false;
var 58 = false;
var 2 = new Array();
2[0] = "Damage Add-on";
2[1] = "Armor Add-on";
2[2] = "Slow Add-on";
2[3] = "Salvage Add-on";
2[4] = "Repair Add-on";
2[5] = "Magnet Add-on";
var 39 = new Array();
39[0] = "Laser Power";
39[1] = "Laser Cooldown";
var 60 = new Array();
60[0] = "Shield Regen";
60[1] = "Shields";
var 63 = new Array();
63[0] = "Speed";
63[1] = "Health";
var 69 = new Array();
69[0] = "Invulnerability";
69[1] = "Reset Cooldowns";
69[2] = "Full Repair";
69[3] = "Time Stop";
var 83 = new Array();
83[0] = "Piercing";
83[1] = "Split Shot";
83[2] = "Bouncing";
83[3] = "Freezing";
83[4] = "Double Shot";
83[5] = "Draining";
83[6] = "Critical Shot";
83[7] = "Push Shot";
var 26 = new Array();
26[0] = "Helper";
var 35 = new Array();
laserSound = new Sound();
laserSound.attachSound("laser_sfx");
boomSound = new Sound();
boomSound.attachSound("boom_sfx");
bombSound = new Sound();
bombSound.attachSound("bomb_sfx");
levelSound = new Sound();
levelSound.attachSound("level_sfx");
blingSound = new Sound();
blingSound.attachSound("bling_sfx");
whooshSound = new Sound();
whooshSound.attachSound("whoosh_sfx");
powerSound = new Sound();
powerSound.attachSound("power_sfx");
power2Sound = new Sound();
power2Sound.attachSound("power2_sfx");
power3Sound = new Sound();
power3Sound.attachSound("power3_sfx");
reloadSound = new Sound();
reloadSound.attachSound("reload_sfx");
chargeSound = new Sound();
chargeSound.attachSound("charge_sfx");
boingSound = new Sound();
boingSound.attachSound("boing_sfx");
echoSound = new Sound();
echoSound.attachSound("echo_sfx");
_root.createEmptyMovieClip("listener_mc", _root.getNextHighestDepth());
Key.addListener(_root.listener_mc);
_root.listener_mc.onKeyDown = function () {
myKey = Key.getCode();
if (myKey == 32) {
_root["32"] = true;
}
if (myKey == 68) {
_root.18();
}
if (myKey == 90) {
_root["30"] = false;
}
};
_root.listener_mc.onKeyUp = function () {
_root["32"] = false;
if (myKey == 90) {
_root["30"] = true;
}
};
Mouse.addListener(_root.listener_mc);
_root.listener_mc.onMouseDown = function () {
_root["33"] = true;
};
_root.listener_mc.onMouseUp = function () {
_root["33"] = false;
};
55("health");
55("bomb");
55("shield");
i = 0;
while (i < 5) {
_root.enemy1_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
i++;
}
stop();
Instance of Symbol 50 MovieClip "enemy1_mc" in Frame 3
onClipEvent (load) {
if (this._name != "enemy1_mc") {
var 34 = false;
var 22 = 0;
var 77 = 1440;
this._visible = true;
var 16 = 0;
while (16 < 200) {
var 64 = Math.round(Math.random());
var 65 = Math.round(Math.random());
if ((64 == 0) && (65 == 0)) {
var 74 = ((((Math.random() * ((_root["72"] - this._width) - 50)) + _root["11"]) + (this._width / 2)) + 50);
var 75 = ((_root["11"] + (this._height / 2)) + 50);
}
if ((64 == 0) && (65 == 1)) {
var 74 = ((((Math.random() * ((_root["72"] - this._width) - 50)) + _root["11"]) + (this._width / 2)) + 50);
var 75 = (((_root["71"] + _root["11"]) - (this._height / 2)) - 50);
}
if ((64 == 1) && (65 == 0)) {
var 74 = (((_root["72"] + _root["11"]) - (this._width / 2)) - 50);
var 75 = ((((Math.random() * ((_root["71"] - this._height) - 50)) + _root["11"]) + (this._height / 2)) + 50);
}
if ((64 == 1) && (65 == 1)) {
var 74 = ((_root["11"] + (this._width / 2)) + 50);
var 75 = ((((Math.random() * ((_root["71"] - this._height) - 50)) + _root["11"]) + (this._height / 2)) + 50);
}
var 16 = Math.sqrt(Math.abs((74 - _root.hero_mc._x) * (74 - _root.hero_mc._x)) + Math.abs((75 - _root.hero_mc._y) * (75 - _root.hero_mc._y)));
}
if (!timedDeath) {
this._x = 74;
this._y = 75;
}
var 21 = _root["20"];
var health = (21 * 2);
var 87 = (((7 - (Math.random() * 14)) * 21) / 6);
var 90 = (((7 - (Math.random() * 14)) * 21) / 6);
if (90 < -25) {
Set("90", -25);
}
i = 1;
while (i <= 6) {
if (this.hitTest(_root.hero_mc["heroDet" + i])) {
_root.enemy1_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
removeMovieClip(this);
break;
}
i++;
}
spawnNum = 5;
if (_root["58"]) {
spawnNum = 2.5;
}
if ((_root["4"] <= 0) && (_root["38"] < (_root["20"] / 2))) {
spawnNum = 0;
}
if (Math.floor(Math.random() * spawnNum) == 0) {
pType = Math.floor(Math.random() * 101);
if (((pType >= 45) && (_root["4"] <= 0)) && (_root["38"] < (_root["20"] / 2))) {
pType = 0;
_root["4"] = 480;
var 5 = true;
} else {
var 5 = false;
}
if ((pType >= 0) && (pType < 30)) {
this.powerupDot_mc.gotoAndStop(8);
}
if ((pType >= 30) && (pType < 40)) {
this.powerupDot_mc.gotoAndStop(4);
}
if ((pType >= 40) && (pType < 60)) {
this.powerupDot_mc.gotoAndStop(3);
}
if ((pType >= 60) && (pType < 80)) {
this.powerupDot_mc.gotoAndStop(2);
}
if ((pType >= 80) && (pType < 85)) {
this.powerupDot_mc.gotoAndStop(7);
}
if ((pType >= 85) && (pType < 90)) {
this.powerupDot_mc.gotoAndStop(5);
}
if ((pType >= 90) && (pType < 100)) {
this.powerupDot_mc.gotoAndStop(6);
}
if (((_root["2"].length > 0) && (pType >= 100)) && (pType <= 101)) {
this.powerupDot_mc.gotoAndStop(1);
}
} else {
this.powerupDot_mc.gotoAndStop(1);
pType = undefined;
}
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "enemy1_mc") {
i = 1;
while (i <= 6) {
var 52 = {x:_root.hero_mc["heroDet" + i]._x, y:_root.hero_mc["heroDet" + i]._y};
_root.hero_mc.localToGlobal(52);
globalX = 52.x;
globalY = 52.y;
if (this.hitTest(globalX, globalY, true)) {
if (_root.hero_mc._currentframe == 1) {
if (_root["6"]) {
damage = 1 + Math.floor(21 / 20);
} else {
damage = 1 + Math.floor(21 / 10);
}
if (_root.shieldLeft > 0) {
_root.shieldLeft = _root.shieldLeft - damage;
if (_root.shieldLeft < 0) {
_root.healthLeft = _root.healthLeft - Math.abs(_root.shieldLeft);
_root.shieldLeft = 0;
}
} else {
_root.healthLeft = _root.healthLeft - damage;
}
health = 0;
_root.hero_mc.gotoAndPlay(2);
if (_root.healthLeft <= 0) {
_root.gotoAndStop("outro");
}
_root.3("health");
_root.3("shield");
blockNum = (Math.random() * 4) + 4;
xBlock = _root.hero_mc["87"] / Math.abs(_root.hero_mc["87"]);
yBlock = _root.hero_mc["90"] / Math.abs(_root.hero_mc["90"]);
}
break;
}
i++;
}
i = 0;
while (i < _root["35"].length) {
laserName = "laser" + i.toString();
if (this.hitTest(_root[laserName])) {
gotoAndPlay (2);
health = health - _root[laserName]["53"];
if (_root["15"]) {
health = health - Math.floor(_root[laserName]["53"]);
}
if (_root[laserName]["54"]) {
if ((_root[laserName]["85"] <= 0) && (_root[laserName]["88"] <= 0)) {
this._x = this._x - (_root[laserName]["86"] * 10);
this._y = this._y - (_root[laserName]["89"] * 10);
}
if ((_root[laserName]["85"] >= 0) && (_root[laserName]["88"] <= 0)) {
this._x = this._x + (_root[laserName]["86"] * 10);
this._y = this._y + (_root[laserName]["89"] * 10);
}
if ((_root[laserName]["85"] <= 0) && (_root[laserName]["88"] >= 0)) {
this._x = this._x - (_root[laserName]["86"] * 10);
this._y = this._y - (_root[laserName]["89"] * 10);
}
if ((_root[laserName]["85"] >= 0) && (_root[laserName]["88"] >= 0)) {
this._x = this._x + (_root[laserName]["86"] * 10);
this._y = this._y + (_root[laserName]["89"] * 10);
}
if ((this._x + (this._width / 2)) > (_root["72"] + _root["11"])) {
this._x = (_root["72"] + _root["11"]) - (this._width / 2);
}
if ((this._x - (this._width / 2)) < _root["11"]) {
this._x = _root["11"] + (this._width / 2);
}
if ((this._y + (this._height / 2)) > (_root["71"] + _root["11"])) {
this._y = (_root["71"] + _root["11"]) - (this._height / 2);
}
if ((this._y - (this._height / 2)) < _root["11"]) {
this._y = _root["11"] + (this._height / 2);
}
}
if (_root[laserName]["14"]) {
health = health - (_root[laserName]["53"] * 4);
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay2_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = "Critical Shot!";
}
if (_root[laserName]["23"]) {
Set("22", 3);
}
if (_root[laserName]._currentframe != 2) {
if (!_root[laserName].laserPierce) {
_root["42"]++;
}
if (_root[laserName].laserPierce && (_root[laserName]["51"] == 0)) {
_root["42"]++;
_root[laserName]["51"]++;
}
}
_root.score++;
if (health <= 0) {
if (_root[laserName]["17"] && (_root.shieldLeft < _root.shieldMax)) {
_root.shieldLeft++;
_root.3("shield");
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay2_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = "Drain!";
}
if (((_root[laserName]["85"] <= 0) && (_root[laserName]["88"] <= 0)) || ((_root[laserName]["85"] <= 0) && (_root[laserName]["88"] >= 0))) {
xBlock = (_root[laserName]["87"] / Math.abs(_root[laserName]["87"])) * -1;
yBlock = (_root[laserName]["90"] / Math.abs(_root[laserName]["90"])) * -1;
} else {
xBlock = _root[laserName]["87"] / Math.abs(_root[laserName]["87"]);
yBlock = _root[laserName]["90"] / Math.abs(_root[laserName]["90"]);
}
}
if (!_root[laserName]["50"]) {
_root["35"][_root[laserName].laserSlot] = undefined;
removeMovieClip(_root[laserName]);
}
}
i++;
}
if (this.hitTest(_root.bombDummy_mc)) {
health = 0;
xBlock = (this._x - _root.hero_mc._x) / Math.abs(this._x - _root.hero_mc._x);
yBlock = (this._y - _root.hero_mc._y) / Math.abs(this._y - _root.hero_mc._y);
}
if ((this._currentframe == 1) && (_root["76"] <= 0)) {
if (_root["67"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 200)) {
this._x = this._x + (87 / 3);
this._y = this._y + (90 / 3);
} else {
this._x = this._x + 87;
this._y = this._y + 90;
}
if ((this._x + (this._width / 2)) > (_root["72"] + _root["11"])) {
this._x = (_root["72"] + _root["11"]) - (this._width / 2);
Set("87", -87);
}
if ((this._x - (this._width / 2)) < _root["11"]) {
this._x = _root["11"] + (this._width / 2);
Set("87", -87);
}
if ((this._y + (this._height / 2)) > (_root["71"] + _root["11"])) {
this._y = (_root["71"] + _root["11"]) - (this._height / 2);
Set("90", -90);
}
if ((this._y - (this._height / 2)) < _root["11"]) {
this._y = _root["11"] + (this._height / 2);
Set("90", -90);
}
}
if (health <= 0) {
_root.score = _root.score + (21 * 5);
_root["19"]++;
_root["20"] = Math.ceil(_root["19"] / 5);
if (_root["20"] > _root["43"]) {
_root["43"]++;
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = ("Level " + _root["20"]) + "!";
if (((_root["20"] % 6) == 0) && (_root["20"] < 84)) {
_root.enemy1_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
}
_root.levelSound.start();
}
if (pType != undefined) {
pName = "pu" + _root.getNextHighestDepth();
if ((pType >= 0) && (pType < 30)) {
_root.laserUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
}
if ((pType >= 30) && (pType < 40)) {
_root.bombUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
}
if ((pType >= 40) && (pType < 60)) {
_root.shieldUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
}
if ((pType >= 60) && (pType < 80)) {
_root.shipUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
}
if ((pType >= 80) && (pType < 85)) {
_root.weaponUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
}
if ((pType >= 85) && (pType < 90)) {
_root.specialUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
}
if ((pType >= 90) && (pType < 100)) {
_root.helperUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
}
if (((_root["2"].length > 0) && (pType >= 100)) && (pType <= 101)) {
_root.addonUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
}
_root[pName]._x = this._x;
_root[pName]._y = this._y;
_root[pName]["5"] = 5;
}
if (Math.floor(Math.random() * 10) == 0) {
_root.enemy2_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
} else {
_root.enemy1_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
}
i = 0;
while (i < (3 + (Math.random() * 3))) {
rName = _root.getNextHighestDepth();
_root.block_mc.duplicateMovieClip(rName, _root.getNextHighestDepth());
_root[rName]._x = this._x;
_root[rName]._y = this._y;
_root[rName].xBlock = xBlock;
_root[rName].yBlock = yBlock;
i++;
}
_root.boomSound.start();
removeMovieClip(this);
}
if (77 > 0) {
77--;
} else {
eName = _root.getNextHighestDepth();
_root.enemy1_mc.duplicateMovieClip(eName, _root.getNextHighestDepth());
_root[eName].timedDeath = true;
_root[eName]._x = this._x;
_root[eName]._y = this._y;
removeMovieClip(this);
}
if ((((this._x < -500) || (this._x > ((_root["72"] + (2 * _root["11"])) + 500))) || (this._y < -500)) || (this._y > ((_root["71"] + (2 * _root.borderHeight)) + 500))) {
eName = _root.getNextHighestDepth();
_root.enemy1_mc.duplicateMovieClip(eName, _root.getNextHighestDepth());
_root[eName].timedDeath = true;
_root[eName]._x = this._x;
_root[eName]._y = this._y;
removeMovieClip(this);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 54 MovieClip "laser_mc" in Frame 3
onClipEvent (load) {
if (this._name != "laser_mc") {
this._visible = true;
if (helperShot) {
this.gotoAndStop(2);
var 85 = (_root.hero_mc._x - this._x);
var 88 = (_root.hero_mc._y - this._y);
this._x = _root.helper_mc._x;
this._y = _root.helper_mc._y;
} else {
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y;
var 85 = (_root._xmouse - this._x);
var 88 = (_root._ymouse - this._y);
}
var 70 = _root["40"];
if (this._name.slice(0, 2) == "ss") {
newAngle = newAngle + Math.atan(88 / 85);
var 53 = Math.ceil(_root["38"] / 3);
} else {
var 53 = _root["38"];
if (helperShot) {
if (85 >= 0) {
newAngle = (_root.helper_mc._rotation / 180) * Math.PI;
} else {
newAngle = ((_root.helper_mc._rotation + 180) / 180) * Math.PI;
}
} else {
newAngle = Math.atan(88 / 85);
}
}
if (85 == 0) {
if (88 >= 0) {
newAngle = (Math.PI/2);
} else {
newAngle = -1.5707963267949;
}
}
if (_root.laserBounce) {
var 12 = 2;
} else {
var 12 = 0;
}
if (_root.laserCritical) {
if (Math.floor(Math.random() * 3) == 0) {
var 14 = true;
}
}
var 50 = _root.laserPierce;
var 23 = _root.laserFreeze;
var 17 = _root.laserDrain;
var 54 = _root.laserPush;
var 51 = 0;
var 86 = Math.cos(newAngle);
var 89 = Math.sin(newAngle);
var 87 = (86 * 70);
var 90 = (89 * 70);
var 66 = false;
if (_root.laserDouble) {
var 52 = {x:_root.hero_mc["double" + doubleDir]._x, y:_root.hero_mc["double" + doubleDir]._y};
_root.hero_mc.localToGlobal(52);
globalX = 52.x;
globalY = 52.y;
this._x = globalX;
this._y = globalY;
}
if (85 < 0) {
this._rotation = 180 + ((newAngle * 180) / Math.PI);
} else {
this._rotation = (newAngle * 180) / Math.PI;
}
_root.laserSound.start();
i = 0;
while (i <= _root["35"].length) {
if ((_root["35"][i] == undefined) && (!66)) {
laserSlot = i;
this._name = "laser" + laserSlot.toString();
Set("66", true);
_root["35"][laserSlot] = this._x;
}
i++;
}
_root["41"]++;
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "laser_mc") {
_root["35"][laserSlot] = this._x;
if ((85 <= 0) && (88 <= 0)) {
this._x = this._x - 87;
this._y = this._y - 90;
} else if ((85 >= 0) && (88 <= 0)) {
this._x = this._x + 87;
this._y = this._y + 90;
} else if ((85 <= 0) && (88 >= 0)) {
this._x = this._x - 87;
this._y = this._y - 90;
} else if ((85 >= 0) && (88 >= 0)) {
this._x = this._x + 87;
this._y = this._y + 90;
}
if (12 > 0) {
if ((this._x + (this._width / 2)) > (_root["72"] + _root["11"])) {
this._x = (_root["72"] + _root["11"]) - (this._width / 2);
Set("87", -87);
12--;
newAngle = Math.PI - newAngle;
if (85 < 0) {
this._rotation = 180 + ((newAngle * 180) / Math.PI);
} else {
this._rotation = (newAngle * 180) / Math.PI;
}
}
if ((this._x - (this._width / 2)) < _root["11"]) {
this._x = _root["11"] + (this._width / 2);
Set("87", -87);
12--;
newAngle = Math.PI - newAngle;
if (85 < 0) {
this._rotation = 180 + ((newAngle * 180) / Math.PI);
} else {
this._rotation = (newAngle * 180) / Math.PI;
}
}
if ((this._y + (this._height / 2)) > (_root["71"] + _root["11"])) {
this._y = (_root["71"] + _root["11"]) - (this._height / 2);
Set("90", -90);
12--;
newAngle = Math.PI - newAngle;
if (85 < 0) {
this._rotation = 180 + ((newAngle * 180) / Math.PI);
} else {
this._rotation = (newAngle * 180) / Math.PI;
}
}
if ((this._y - (this._height / 2)) < _root["11"]) {
this._y = _root["11"] + (this._height / 2);
Set("90", -90);
12--;
newAngle = Math.PI - newAngle;
if (85 < 0) {
this._rotation = 180 + ((newAngle * 180) / Math.PI);
} else {
this._rotation = (newAngle * 180) / Math.PI;
}
}
}
if ((((this._x > ((_root["72"] + _root["11"]) + 200)) || (this._x < -200)) || (this._y > ((_root["71"] + _root["11"]) + 200))) || (this._y < -200)) {
_root["35"][laserSlot] = undefined;
if (_root["35"][_root["35"].length - 1] == undefined) {
_root["35"].pop();
}
removeMovieClip(this);
}
}
}
Instance of Symbol 62 MovieClip "bombUpg_mc" in Frame 3
onClipEvent (load) {
if (this._name != "bombUpg_mc") {
this._visible = true;
Set("13", 120);
pType = Math.floor(Math.random() * 91) + 10;
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "bombUpg_mc") {
if (13 > 0) {
13--;
} else {
play();
}
if (this.hitTest(_root.hero_mc)) {
_root.56("bomb");
if (_root.bombLeft < _root.bombMax) {
_root.bombLeft++;
}
_root.55("bomb");
_root.3("bomb");
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = "Bombs";
_root.power2Sound.start();
this.removeMovieClip();
}
if (_root["45"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 400)) {
this._x = this._x + ((_root.hero_mc._x - this._x) / 50);
this._y = this._y + ((_root.hero_mc._y - this._y) / 50);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 69 MovieClip "laserUpg_mc" in Frame 3
onClipEvent (load) {
if (this._name != "laserUpg_mc") {
this._visible = true;
Set("13", 120);
pType = _root["39"][Math.floor(Math.random() * _root["39"].length)];
if (5) {
pType = "Laser Power";
}
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "laserUpg_mc") {
if (13 > 0) {
13--;
} else {
play();
}
if (this.hitTest(_root.hero_mc)) {
if (pType == "Laser Cooldown") {
if (_root["36"] > 2) {
_root["36"]--;
} else {
pType = "Laser Power";
}
}
if (pType == "Laser Power") {
_root["38"]++;
}
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = pType;
_root.powerSound.start();
this.removeMovieClip();
}
if (_root["45"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 400)) {
this._x = this._x + ((_root.hero_mc._x - this._x) / 50);
this._y = this._y + ((_root.hero_mc._y - this._y) / 50);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 76 MovieClip "specialUpg_mc" in Frame 3
onClipEvent (load) {
if (this._name != "specialUpg_mc") {
this._visible = true;
Set("13", 120);
pType = _root["69"][Math.floor(Math.random() * _root["69"].length)];
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "specialUpg_mc") {
if (13 > 0) {
13--;
} else {
play();
}
if (this.hitTest(_root.hero_mc)) {
if (pType == "Invulnerability") {
if (_root["31"] <= 0) {
_root["31"] = 10;
_root.hero_mc.gotoAndPlay(2);
} else {
_root["31"] = _root["31"] + 10;
pType = "Invulnerability Extended";
}
}
if (pType == "Reset Cooldowns") {
_root.hero_mc["37"] = 0;
_root.hero_mc["62"] = 0;
_root.hero_mc["9"] = 0;
if (_root.helper_mc["13"] > 0) {
_root.helper_mc["13"] = _root["24"];
}
if (_root["84"] > 0) {
_root.hero_mc["84"] = _root["82"];
}
}
if (pType == "Full Repair") {
_root.healthLeft = _root.healthMax;
_root.shieldLeft = _root.shieldMax;
_root.3("health");
_root.3("shield");
}
if (pType == "Time Stop") {
if (_root["76"] <= 0) {
_root["76"] = 120;
} else {
_root["76"] = _root["76"] + 120;
pType = "Time Stop Extended";
}
}
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = pType;
_root.blingSound.start();
removeMovieClip(this);
}
if (_root["45"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 400)) {
this._x = this._x + ((_root.hero_mc._x - this._x) / 50);
this._y = this._y + ((_root.hero_mc._y - this._y) / 50);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 83 MovieClip "shipUpg_mc" in Frame 3
onClipEvent (load) {
if (this._name != "shipUpg_mc") {
this._visible = true;
Set("13", 120);
pType = _root["63"][Math.floor(Math.random() * _root["63"].length)];
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "shipUpg_mc") {
if (13 > 0) {
13--;
} else {
play();
}
if (this.hitTest(_root.hero_mc)) {
if (pType == "Speed") {
_root["49"] = _root["49"] + 0.5;
_root.whooshSound.start();
}
if (pType == "Health") {
_root.56("health");
_root.healthLeft++;
if (_root.healthMax < _root.healthLeft) {
_root.healthMax = _root.healthLeft;
}
_root.55("health");
_root.3("health");
_root.boingSound.start();
}
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = pType;
this.removeMovieClip();
}
if (_root["45"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 400)) {
this._x = this._x + ((_root.hero_mc._x - this._x) / 50);
this._y = this._y + ((_root.hero_mc._y - this._y) / 50);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 90 MovieClip "shieldUpg_mc" in Frame 3
onClipEvent (load) {
if (this._name != "shieldUpg_mc") {
this._visible = true;
Set("13", 120);
pType = _root["60"][Math.floor(Math.random() * _root["60"].length)];
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "shieldUpg_mc") {
if (13 > 0) {
13--;
} else {
play();
}
if (this.hitTest(_root.hero_mc)) {
if (pType == "Shield Regen") {
if (_root["61"] < 10) {
_root["61"]++;
} else {
pType = "Shields";
}
}
if (pType == "Shields") {
_root.56("shield");
_root.shieldLeft++;
if (_root.shieldMax < _root.shieldLeft) {
_root.shieldMax = _root.shieldLeft;
}
_root.55("shield");
_root.3("shield");
}
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = pType;
_root.chargeSound.start();
removeMovieClip(this);
}
if (_root["45"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 400)) {
this._x = this._x + ((_root.hero_mc._x - this._x) / 50);
this._y = this._y + ((_root.hero_mc._y - this._y) / 50);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 97 MovieClip "weaponUpg_mc" in Frame 3
onClipEvent (load) {
if (this._name != "weaponUpg_mc") {
this._visible = true;
Set("13", 120);
pType = _root["83"][Math.floor(Math.random() * _root["83"].length)];
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "weaponUpg_mc") {
if (13 > 0) {
13--;
} else {
play();
}
if (this.hitTest(_root.hero_mc)) {
if (_root.hero_mc["84"] == 0) {
if (pType == "Piercing") {
_root.laserPierce = true;
}
if (pType == "Split Shot") {
_root.laserSplit = true;
}
if (pType == "Bouncing") {
_root.laserBounce = true;
}
if (pType == "Freezing") {
_root.laserFreeze = true;
}
if (pType == "Double Shot") {
_root.laserDouble = true;
}
if (pType == "Draining") {
_root.laserDrain = true;
}
if (pType == "Critical Shot") {
_root.laserCritical = true;
}
if (pType == "Push Shot") {
_root.laserPush = true;
}
_root.hero_mc["84"] = 360;
} else {
_root.hero_mc["84"] = _root.hero_mc["84"] + 360;
pType = "Weapon Extended";
}
_root["82"] = _root.hero_mc["84"];
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = pType;
_root.reloadSound.start();
this.removeMovieClip();
}
if (_root["45"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 400)) {
this._x = this._x + ((_root.hero_mc._x - this._x) / 50);
this._y = this._y + ((_root.hero_mc._y - this._y) / 50);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 104 MovieClip "helperUpg_mc" in Frame 3
onClipEvent (load) {
if (this._name != "helperUpg_mc") {
this._visible = true;
Set("13", 120);
pType = _root["26"][Math.floor(Math.random() * _root["26"].length)];
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "helperUpg_mc") {
if (13 > 0) {
13--;
} else {
play();
}
if (this.hitTest(_root.hero_mc)) {
if (pType == "Helper") {
if (_root.helper_mc["13"] <= 0) {
_root["25"] = true;
_root.helper_mc["13"] = 480;
_root.helper_mc._x = _root.hero_mc._x;
_root.helper_mc._y = _root.hero_mc._y;
} else {
_root.helper_mc["13"] = _root.helper_mc["13"] + 480;
pType = "Helper Extended";
}
}
_root["24"] = _root.helper_mc["13"];
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = pType;
_root.power3Sound.start();
removeMovieClip(this);
}
if (_root["45"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 400)) {
this._x = this._x + ((_root.hero_mc._x - this._x) / 50);
this._y = this._y + ((_root.hero_mc._y - this._y) / 50);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 111 MovieClip "addonUpg_mc" in Frame 3
onClipEvent (load) {
if (this._name != "addonUpg_mc") {
this._visible = true;
Set("13", 120);
pType = _root["2"][Math.floor(Math.random() * _root["2"].length)];
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "addonUpg_mc") {
if (13 > 0) {
13--;
} else {
play();
}
if (this.hitTest(_root.hero_mc)) {
if (pType == "Damage Add-on") {
_root["15"] = true;
}
if (pType == "Armor Add-on") {
_root["6"] = true;
}
if (pType == "Repair Add-on") {
_root["57"] = true;
}
if (pType == "Salvage Add-on") {
_root["58"] = true;
}
if (pType == "Slow Add-on") {
_root["67"] = true;
}
if (pType == "Magnet Add-on") {
_root["45"] = true;
}
if (pType == "Booster Add-on") {
_root.boosterAdd = true;
}
i = 0;
while (i < _root["2"].length) {
if (_root["2"][i] == pType) {
_root["2"].splice(i, 1);
}
i++;
}
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = pType;
_root.echoSound.start();
this.removeMovieClip();
}
if (_root["45"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 400)) {
this._x = this._x + ((_root.hero_mc._x - this._x) / 50);
this._y = this._y + ((_root.hero_mc._y - this._y) / 50);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 3 MovieClip [textDisplay_mc] "textDisplay_mc" in Frame 3
onClipEvent (load) {
if (this._name != "textDisplay_mc") {
this._visible = true;
Set("13", 48);
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y - 30;
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "textDisplay_mc") {
this._y = this._y - 1;
if (13 > 0) {
13--;
} else {
removeMovieClip(this);
}
}
}
Instance of Symbol 113 MovieClip "textDisplay2_mc" in Frame 3
onClipEvent (load) {
if (this._name != "textDisplay2_mc") {
this._visible = true;
Set("13", 48);
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y - 30;
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "textDisplay2_mc") {
this._y = this._y - 1;
if (13 > 0) {
13--;
} else {
removeMovieClip(this);
}
}
}
Instance of Symbol 116 MovieClip "exhaust_mc" in Frame 3
onClipEvent (load) {
if (this._name != "exhaust_mc") {
this._visible = true;
var 52 = {x:_root.hero_mc.heroDet6._x, y:_root.hero_mc.heroDet6._y};
_root.hero_mc.localToGlobal(52);
globalX = 52.x;
globalY = 52.y;
this._x = globalX;
this._y = globalY;
Set("87", ((_root.hero_mc["85"] / Math.abs(_root.hero_mc["85"])) * Math.random()) * -2);
Set("90", ((_root.hero_mc["88"] / Math.abs(_root.hero_mc["88"])) * Math.random()) * -2);
this._x = this._x - ((_root.hero_mc["85"] / Math.abs(_root.hero_mc["85"])) * (15 - (Math.random() * 30)));
this._y = this._y - ((_root.hero_mc["88"] / Math.abs(_root.hero_mc["88"])) * (15 - (Math.random() * 30)));
} else {
stop();
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
this._x = this._x + 87;
this._y = this._y + 90;
}
Instance of Symbol 118 MovieClip "helper_mc" in Frame 3
onClipEvent (load) {
var 37 = 0;
var 13 = 0;
this._visible = false;
this._x = -100;
this._y = -100;
}
onClipEvent (enterFrame) {
if (_root["25"]) {
this._visible = true;
if (13 > 0) {
13--;
} else {
_root["25"] = false;
this._visible = false;
this._x = -100;
this._y = -100;
}
Set("85", _root.hero_mc._x - this._x);
Set("88", _root.hero_mc._y - this._y);
if ((Math.abs(85) + Math.abs(88)) < 10) {
Set("85", 0);
Set("88", 0);
}
this._rotation = _root.hero_mc._rotation;
Set("87", ((85 / _root["48"]) * _root["49"]) * 2);
Set("90", ((88 / _root["48"]) * _root["49"]) * 2);
if (Math.abs(87) > Math.abs(85)) {
Set("87", 85);
}
if (Math.abs(90) > Math.abs(88)) {
Set("90", 88);
}
this._x = this._x + 87;
this._y = this._y + 90;
if (37 > 0) {
37--;
} else {
hsName = "hs" + _root.getNextHighestDepth().toString();
_root.laser_mc.duplicateMovieClip(hsName, _root.getNextHighestDepth());
_root[hsName].helperShot = true;
Set("37", _root["36"]);
}
}
}
Instance of Symbol 119 MovieClip "block_mc" in Frame 3
onClipEvent (load) {
if (this._name != "block_mc") {
this._visible = true;
rate = Math.random();
xRate = Math.random() * 4;
yRate = Math.random() * 4;
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "block_mc") {
this._rotation = this._rotation + (xRate * yRate);
this._width = this._width - rate;
this._height = this._height - rate;
this._x = this._x + (xRate * xBlock);
this._y = this._y + (yRate * yBlock);
if (this._alpha > 0) {
this._alpha = this._alpha - ((rate * 3) + 2);
} else {
removeMovieClip(this);
}
}
}
Instance of Symbol 121 MovieClip "magnetAdd_mc" in Frame 3
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root["45"]) {
this._visible = true;
} else {
this._visible = false;
}
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y;
}
Instance of Symbol 121 MovieClip "salvageAdd_mc" in Frame 3
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root["58"]) {
this._visible = true;
} else {
this._visible = false;
}
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y;
}
Instance of Symbol 121 MovieClip "slowAdd_mc" in Frame 3
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root["67"]) {
this._visible = true;
} else {
this._visible = false;
}
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y;
}
Instance of Symbol 121 MovieClip "repairAdd_mc" in Frame 3
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root["57"]) {
this._visible = true;
} else {
this._visible = false;
}
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y;
}
Instance of Symbol 121 MovieClip "damageAdd_mc" in Frame 3
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root["15"]) {
this._visible = true;
} else {
this._visible = false;
}
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y;
}
Instance of Symbol 121 MovieClip "armorAdd_mc" in Frame 3
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root["6"]) {
this._visible = true;
} else {
this._visible = false;
}
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y;
}
Instance of Symbol 123 MovieClip "bomb_mc" in Frame 3
onClipEvent (load) {
if (this._name != "bomb_mc") {
this._visible = true;
var 70 = 75;
var 85 = (_root._xmouse - this._x);
var 88 = (_root._ymouse - this._y);
var 86 = Math.cos(newAngle);
var 89 = Math.sin(newAngle);
var 87 = (86 * 70);
var 90 = (89 * 70);
this._x = _root.hero_mc._x;
this._y = _root.hero_mc._y;
if (85 < 0) {
this._rotation = 180 + ((newAngle * 180) / Math.PI);
} else {
this._rotation = (newAngle * 180) / Math.PI;
}
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "bomb_mc") {
if ((85 <= 0) && (88 <= 0)) {
this._x = this._x - 87;
this._y = this._y - 90;
} else if ((85 >= 0) && (88 <= 0)) {
this._x = this._x + 87;
this._y = this._y + 90;
} else if ((85 <= 0) && (88 >= 0)) {
this._x = this._x - 87;
this._y = this._y - 90;
} else if ((85 >= 0) && (88 >= 0)) {
this._x = this._x + 87;
this._y = this._y + 90;
}
if ((((this._x > ((_root["72"] + _root["11"]) + 200)) || (this._x < -200)) || (this._y > ((_root["71"] + _root["11"]) + 200))) || (this._y < -200)) {
removeMovieClip(this);
}
}
}
Instance of Symbol 124 MovieClip "bombDummy_mc" in Frame 3
onClipEvent (load) {
this._x = -100;
this._y = -100;
this._visible = false;
}
onClipEvent (enterFrame) {
if (duration <= 0) {
this._x = -100;
this._y = -100;
this._width = 10;
this._height = 10;
this._visible = false;
} else {
duration--;
}
}
Instance of Symbol 126 MovieClip "bombBar_mc" in Frame 3
onClipEvent (load) {
if (this._name != "bombBar_mc") {
this._alpha = 0;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (this._name != "bombBar_mc") {
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 130 MovieClip "enemy2_mc" in Frame 3
onClipEvent (load) {
if (this._name != "enemy2_mc") {
var 34 = false;
var 22 = 0;
var 77 = 2880;
this._visible = true;
var 16 = 0;
while (16 < 200) {
var 64 = Math.round(Math.random());
var 65 = Math.round(Math.random());
if ((64 == 0) && (65 == 0)) {
var 74 = ((((Math.random() * ((_root["72"] - this._width) - 50)) + _root["11"]) + (this._width / 2)) + 50);
var 75 = ((_root["11"] + (this._height / 2)) + 50);
}
if ((64 == 0) && (65 == 1)) {
var 74 = ((((Math.random() * ((_root["72"] - this._width) - 50)) + _root["11"]) + (this._width / 2)) + 50);
var 75 = (((_root["71"] + _root["11"]) - (this._height / 2)) - 50);
}
if ((64 == 1) && (65 == 0)) {
var 74 = (((_root["72"] + _root["11"]) - (this._width / 2)) - 50);
var 75 = ((((Math.random() * ((_root["71"] - this._height) - 50)) + _root["11"]) + (this._height / 2)) + 50);
}
if ((64 == 1) && (65 == 1)) {
var 74 = ((_root["11"] + (this._width / 2)) + 50);
var 75 = ((((Math.random() * ((_root["71"] - this._height) - 50)) + _root["11"]) + (this._height / 2)) + 50);
}
var 16 = Math.sqrt(Math.abs((74 - _root.hero_mc._x) * (74 - _root.hero_mc._x)) + Math.abs((75 - _root.hero_mc._y) * (75 - _root.hero_mc._y)));
}
if (!timedDeath) {
this._x = 74;
this._y = 75;
}
var 21 = _root["20"];
var health = (21 * 6);
var 87 = (((7 - (Math.random() * 14)) * 21) / 12);
var 90 = (((7 - (Math.random() * 14)) * 21) / 12);
i = 1;
while (i <= 6) {
if (this.hitTest(_root.hero_mc["heroDet" + i])) {
_root.enemy2_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
removeMovieClip(this);
break;
}
i++;
}
} else {
this._visible = false;
this._x = -100;
this._y = -100;
}
}
onClipEvent (enterFrame) {
if (this._name != "enemy2_mc") {
i = 1;
while (i <= 6) {
var 52 = {x:_root.hero_mc["heroDet" + i]._x, y:_root.hero_mc["heroDet" + i]._y};
_root.hero_mc.localToGlobal(52);
globalX = 52.x;
globalY = 52.y;
if (this.hitTest(globalX, globalY, true)) {
if (_root.hero_mc._currentframe == 1) {
if (_root["6"]) {
damage = 1 + Math.floor(21 / 20);
} else {
damage = 1 + Math.floor(21 / 10);
}
if (_root.shieldLeft > 0) {
_root.shieldLeft = _root.shieldLeft - damage;
if (_root.shieldLeft < 0) {
_root.healthLeft = _root.healthLeft - Math.abs(_root.shieldLeft);
_root.shieldLeft = 0;
}
} else {
_root.healthLeft = _root.healthLeft - damage;
}
health = 0;
_root.hero_mc.gotoAndPlay(2);
if (_root.healthLeft <= 0) {
_root.gotoAndStop("outro");
}
_root.3("health");
_root.3("shield");
blockNum = (Math.random() * 4) + 4;
xBlock = _root.hero_mc["87"] / Math.abs(_root.hero_mc["87"]);
yBlock = _root.hero_mc["90"] / Math.abs(_root.hero_mc["90"]);
}
break;
}
i++;
}
i = 0;
while (i < _root["35"].length) {
laserName = "laser" + i.toString();
if (this.hitTest(_root[laserName])) {
gotoAndPlay (2);
health = health - _root[laserName]["53"];
if (_root["15"]) {
health = health - Math.floor(_root[laserName]["53"]);
}
if (_root[laserName]["54"]) {
if ((_root[laserName]["85"] <= 0) && (_root[laserName]["88"] <= 0)) {
this._x = this._x - (_root[laserName]["86"] * 10);
this._y = this._y - (_root[laserName]["89"] * 10);
}
if ((_root[laserName]["85"] >= 0) && (_root[laserName]["88"] <= 0)) {
this._x = this._x + (_root[laserName]["86"] * 10);
this._y = this._y + (_root[laserName]["89"] * 10);
}
if ((_root[laserName]["85"] <= 0) && (_root[laserName]["88"] >= 0)) {
this._x = this._x - (_root[laserName]["86"] * 10);
this._y = this._y - (_root[laserName]["89"] * 10);
}
if ((_root[laserName]["85"] >= 0) && (_root[laserName]["88"] >= 0)) {
this._x = this._x + (_root[laserName]["86"] * 10);
this._y = this._y + (_root[laserName]["89"] * 10);
}
if ((this._x + (this._width / 2)) > (_root["72"] + _root["11"])) {
this._x = (_root["72"] + _root["11"]) - (this._width / 2);
}
if ((this._x - (this._width / 2)) < _root["11"]) {
this._x = _root["11"] + (this._width / 2);
}
if ((this._y + (this._height / 2)) > (_root["71"] + _root["11"])) {
this._y = (_root["71"] + _root["11"]) - (this._height / 2);
}
if ((this._y - (this._height / 2)) < _root["11"]) {
this._y = _root["11"] + (this._height / 2);
}
}
if (_root[laserName]["14"]) {
health = health - (_root[laserName]["53"] * 4);
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay2_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = "Critical Shot!";
}
if (_root[laserName]["23"]) {
Set("22", 3);
}
if (_root[laserName]._currentframe != 2) {
if (!_root[laserName].laserPierce) {
_root["42"]++;
}
if (_root[laserName].laserPierce && (_root[laserName]["51"] == 0)) {
_root["42"]++;
_root[laserName]["51"]++;
}
}
_root.score++;
if (health <= 0) {
if (_root[laserName]["17"] && (_root.shieldLeft < _root.shieldMax)) {
_root.shieldLeft++;
_root.3("shield");
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay2_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = "Drain!";
}
if (((_root[laserName]["85"] <= 0) && (_root[laserName]["88"] <= 0)) || ((_root[laserName]["85"] <= 0) && (_root[laserName]["88"] >= 0))) {
xBlock = (_root[laserName]["87"] / Math.abs(_root[laserName]["87"])) * -1;
yBlock = (_root[laserName]["90"] / Math.abs(_root[laserName]["90"])) * -1;
} else {
xBlock = _root[laserName]["87"] / Math.abs(_root[laserName]["87"]);
yBlock = _root[laserName]["90"] / Math.abs(_root[laserName]["90"]);
}
}
if (!_root[laserName]["50"]) {
_root["35"][_root[laserName].laserSlot] = undefined;
removeMovieClip(_root[laserName]);
}
}
i++;
}
if ((this._currentframe == 1) && (_root["76"] <= 0)) {
if (_root["67"] && (Math.sqrt(Math.abs((_root.hero_mc._x - this._x) * (_root.hero_mc._x - this._x)) + Math.abs((_root.hero_mc._y - this._y) * (_root.hero_mc._y - this._y))) <= 200)) {
this._x = this._x + (87 / 3);
this._y = this._y + (90 / 3);
} else {
this._x = this._x + 87;
this._y = this._y + 90;
}
if ((this._x + (this._width / 2)) > (_root["72"] + _root["11"])) {
this._x = (_root["72"] + _root["11"]) - (this._width / 2);
Set("87", -87);
}
if ((this._x - (this._width / 2)) < _root["11"]) {
this._x = _root["11"] + (this._width / 2);
Set("87", -87);
}
if ((this._y + (this._height / 2)) > (_root["71"] + _root["11"])) {
this._y = (_root["71"] + _root["11"]) - (this._height / 2);
Set("90", -90);
}
if ((this._y - (this._height / 2)) < _root["11"]) {
this._y = _root["11"] + (this._height / 2);
Set("90", -90);
}
}
if (health <= 0) {
_root.score = _root.score + (21 * 5);
_root["19"]++;
_root["20"] = Math.ceil(_root["19"] / 5);
if (_root["20"] > _root["43"]) {
_root["43"]++;
tName = "td" + _root.getNextHighestDepth();
_root.textDisplay_mc.duplicateMovieClip(tName, _root.getNextHighestDepth());
_root[tName].message = ("Level " + _root["20"]) + "!";
if (((_root["20"] % 6) == 0) && (_root["20"] < 84)) {
_root.enemy1_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
}
_root.levelSound.start();
}
pName = "pu" + _root.getNextHighestDepth();
_root.laserUpg_mc.duplicateMovieClip(pName, _root.getNextHighestDepth());
_root[pName]._x = this._x;
_root[pName]._y = this._y;
_root.enemy1_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
i = 0;
while (i < 15) {
rName = _root.getNextHighestDepth();
_root.block_mc.duplicateMovieClip(rName, _root.getNextHighestDepth());
_root[rName]._x = this._x;
_root[rName]._y = this._y;
_root[rName].xBlock = xBlock;
_root[rName].yBlock = yBlock;
i++;
}
_root.boomSound.start();
removeMovieClip(this);
}
if (77 > 0) {
77--;
} else {
eName = _root.getNextHighestDepth();
_root.enemy2_mc.duplicateMovieClip(eName, _root.getNextHighestDepth());
_root[eName].timedDeath = true;
_root[eName]._x = this._x;
_root[eName]._y = this._y;
removeMovieClip(this);
}
if ((((this._x < -500) || (this._x > ((_root["72"] + (2 * _root["11"])) + 500))) || (this._y < -500)) || (this._y > ((_root["71"] + (2 * _root.borderHeight)) + 500))) {
eName = _root.getNextHighestDepth();
_root.enemy1_mc.duplicateMovieClip(eName, _root.getNextHighestDepth());
_root[eName].timedDeath = true;
_root[eName]._x = this._x;
_root[eName]._y = this._y;
removeMovieClip(this);
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 141 MovieClip "hero_mc" in Frame 3
onClipEvent (load) {
var 37 = 0;
var 9 = 0;
var 62 = (Math.floor(50 / _root["61"]) * 24);
var 84 = 0;
}
onClipEvent (enterFrame) {
Set("85", _root._xmouse - this._x);
Set("88", _root._ymouse - this._y);
newAngle = Math.atan(88 / 85);
distance = Math.sqrt((85 * 85) + (88 * 88));
if ((Math.abs(85) + Math.abs(88)) < 10) {
Set("85", 0);
Set("88", 0);
}
if (85 == 0) {
if (88 >= 0) {
newAngle = (Math.PI/2);
} else {
newAngle = -1.5707963267949;
}
}
if (85 < 0) {
this._rotation = 180 + ((newAngle * 180) / Math.PI);
}
if (85 > 0) {
this._rotation = (newAngle * 180) / Math.PI;
}
Set("87", (85 / 100) * _root["49"]);
Set("90", (88 / 100) * _root["49"]);
if (Math.abs(87) > Math.abs(85)) {
Set("87", 85);
}
if (Math.abs(90) > Math.abs(88)) {
Set("90", 88);
}
if (((!_root["33"]) && (_root["30"])) || (!_root["30"])) {
this._x = this._x + 87;
if ((this._x + (this._width / 2)) > (_root["72"] + _root["11"])) {
this._x = (_root["72"] + _root["11"]) - (this._width / 2);
Set("87", -87);
}
if ((this._x - (this._width / 2)) < _root["11"]) {
this._x = _root["11"] + (this._width / 2);
Set("87", -87);
}
this._y = this._y + 90;
if ((this._y + (this._height / 2)) > (_root["71"] + _root["11"])) {
this._y = (_root["71"] + _root["11"]) - (this._height / 2);
Set("90", -90);
}
if ((this._y - (this._height / 2)) < _root["11"]) {
this._y = _root["11"] + (this._height / 2);
Set("90", -90);
}
i = 0;
while (i < (Math.abs(90 + 87) / 10)) {
_root.exhaust_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
i++;
}
}
if (37 > 0) {
37--;
} else if (_root["33"]) {
if (_root.laserSplit) {
ssName = "ss" + _root.getNextHighestDepth().toString();
_root.laser_mc.duplicateMovieClip(ssName, _root.getNextHighestDepth());
_root[ssName].newAngle = 0;
ssName = "ss" + _root.getNextHighestDepth().toString();
_root.laser_mc.duplicateMovieClip(ssName, _root.getNextHighestDepth());
_root[ssName].newAngle = 0.349065850398866;
ssName = "ss" + _root.getNextHighestDepth().toString();
_root.laser_mc.duplicateMovieClip(ssName, _root.getNextHighestDepth());
_root[ssName].newAngle = -0.349065850398866;
} else if (_root.laserDouble) {
dsName = "ds" + _root.getNextHighestDepth().toString();
_root.laser_mc.duplicateMovieClip(dsName, _root.getNextHighestDepth());
_root[dsName].doubleDir = "Left";
dsName = "ds" + _root.getNextHighestDepth().toString();
_root.laser_mc.duplicateMovieClip(dsName, _root.getNextHighestDepth());
_root[dsName].doubleDir = "Right";
} else {
_root.laser_mc.duplicateMovieClip(_root.getNextHighestDepth(), _root.getNextHighestDepth());
}
Set("37", _root["36"]);
}
if (9 > 0) {
9--;
} else if (_root["32"] && (_root.bombLeft > 0)) {
i = 0;
while (i < 30) {
bName = "bb" + _root.getNextHighestDepth().toString();
_root.bomb_mc.duplicateMovieClip(bName, _root.getNextHighestDepth());
_root[bName].newAngle = 0.20943951023932 * i;
i++;
}
Set("9", _root["8"]);
_root.bombLeft--;
_root.3("bomb");
_root.bombDummy_mc._x = _root["11"];
_root.bombDummy_mc._y = _root["11"];
_root.bombDummy_mc._width = _root["72"];
_root.bombDummy_mc._height = _root["71"];
_root.bombDummy_mc.duration = _root["10"];
_root.bombSound.start();
}
if (62 > 0) {
62--;
} else {
if (_root.shieldLeft < _root.shieldMax) {
Set("62", Math.floor(50 / _root["61"]) * 24);
_root.shieldLeft++;
_root.3("shield");
}
if ((_root.healthLeft < _root.healthMax) && (_root["57"])) {
_root.healthLeft++;
_root.3("health");
}
}
if (84 > 0) {
84--;
} else {
_root.18();
}
if (_root["76"] > 0) {
_root["76"]--;
}
if (_root["4"] > 0) {
_root["4"]--;
}
if (_root["35"][_root["35"].length - 1] == undefined) {
_root["35"].pop();
}
}
Instance of Symbol 143 MovieClip "shieldBar_mc" in Frame 3
onClipEvent (load) {
if (this._name != "shieldBar_mc") {
this._alpha = 0;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (this._name != "shieldBar_mc") {
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 145 MovieClip "healthBar_mc" in Frame 3
onClipEvent (load) {
if (this._name != "healthBar_mc") {
this._alpha = 0;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (this._name != "healthBar_mc") {
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
}
if (_root._currentframe == 4) {
removeMovieClip(this);
}
}
}
Instance of Symbol 146 MovieClip "laserGauge_mc" in Frame 3
onClipEvent (load) {
var 46 = this._height;
}
onClipEvent (enterFrame) {
this._height = (46 * (_root["36"] - _root.hero_mc["37"])) / _root["36"];
}
Instance of Symbol 146 MovieClip "weaponGauge_mc" in Frame 3
onClipEvent (load) {
var 46 = this._height;
this._height = 0;
}
onClipEvent (enterFrame) {
if (_root["82"] > 0) {
this._height = 46 * (_root.hero_mc["84"] / _root["82"]);
} else {
this._height = 0;
}
}
Instance of Symbol 146 MovieClip "helperGauge_mc" in Frame 3
onClipEvent (load) {
var 46 = this._height;
this._height = 0;
}
onClipEvent (enterFrame) {
if (_root["24"] > 0) {
this._height = 46 * (_root.helper_mc["13"] / _root["24"]);
} else {
this._height = 0;
}
}
Instance of Symbol 146 MovieClip "bombGauge_mc" in Frame 3
onClipEvent (load) {
var 46 = this._height;
}
onClipEvent (enterFrame) {
this._height = (46 * (_root["8"] - _root.hero_mc["9"])) / _root["8"];
}
Frame 4
var 28 = new Array();
var 29 = new Array();
var 80 = new LoadVars();
var 79 = new LoadVars();
var pMessage = new String();
var sMessage = new String();
var lMessage = "Loading High Scores...";
79.onLoad = function (_arg4) {
if (_arg4) {
_root["28"] = _root["79"].players.split(newline);
_root["29"] = _root["79"].scores.split(newline);
j = 0;
while (j < (_root["29"].length - 1)) {
i = 0;
while (i < (_root["29"].length - 1)) {
if (_root["29"][i + 1].length > _root["29"][i].length) {
var _local2 = _root["29"][i];
_root["29"][i] = _root["29"][i + 1];
_root["29"][i + 1] = _local2;
var _local3 = _root["28"][i];
_root["28"][i] = _root["28"][i + 1];
_root["28"][i + 1] = _local3;
} else if (_root["29"][i + 1].length == _root["29"][i].length) {
if (_root["29"][i + 1].slice(0, 1) > _root["29"][i].slice(0, 1)) {
var _local2 = _root["29"][i];
_root["29"][i] = _root["29"][i + 1];
_root["29"][i + 1] = _local2;
var _local3 = _root["28"][i];
_root["28"][i] = _root["28"][i + 1];
_root["28"][i + 1] = _local3;
}
}
i++;
}
j++;
}
_root.lMessage = "";
i = 0;
while (i < (_root["28"].length - 1)) {
_root.pMessage = _root.pMessage + (_root["28"][i] + newline);
i++;
}
i = 0;
while (i < (_root["29"].length - 1)) {
_root.sMessage = _root.sMessage + (_root["29"][i] + newline);
i++;
}
} else {
_root.lMessage = "Error loading high scores.";
}
};
80.score = _root.score;
80.name = _root.playerName;
80.action = "save";
80.sendAndLoad("http://steve.slightsbytes.com/projscores.php", _root["79"], "POST");
var 44 = new Array();
44[0] = "I hope you only used one arm or something.";
44[1] = "You play like Ben Afflect acts. Shittily, with an aftertaste of shitfuckery.";
44[2] = "Holy shit you just broke the record for crappiest score. Just kidding, you suck too much to break a record.";
44[3] = "Even Bush can't misunderestimate you.";
44[4] = "You did better than 99% of the people that have never played this game. The other one percent was paralyzed.";
var 47 = new Array();
47[0] = "Congratulations, you're mediocre.";
47[1] = "Similar to getting a C. Maybe a C+.";
47[2] = "At least you're not terrible.";
47[3] = "Things could have been worse.";
var 27 = new Array();
27[0] = "Good job. Now think about how many tries that took you.";
27[1] = "Good job. Now try it again without auto-aim.";
27[2] = "Skilled...for a mere human.";
27[3] = "You got lucky, but good job anyway.";
var 78 = new Array();
78[0] = "Uber.";
78[1] = "Godlike.";
78[2] = "Fantastic.";
78[3] = "Outstanding.";
if (_root["20"] < 15) {
var 59 = 44[Math.floor(Math.random() * 44.length)];
}
if ((_root["20"] >= 15) && (_root["20"] < 25)) {
var 59 = 47[Math.floor(Math.random() * 47.length)];
}
if ((_root["20"] >= 25) && (_root["20"] < 30)) {
var 59 = 27[Math.floor(Math.random() * 27.length)];
}
if (_root["20"] >= 30) {
var 59 = 78[Math.floor(Math.random() * 78.length)];
}
var 1 = (("with an accuracy of " + Math.floor((_root["42"] / _root["41"]) * 100)) + "%");
if (_root["41"] == 0) {
Set("1", "maybe because you didn't fire any shots, dipshit");
}
var gMessage = ((((((((("Your score was " + _root.score) + " on level ") + _root["20"]) + ", killing ") + _root["19"]) + " enemies ") + 1) + ".\n") + 59);
stop();
Frame 5
stop();
Symbol 13 Button
on (press) {
_root.gotoAndStop("game");
}
Symbol 16 Button
on (press) {
_root.gotoAndStop("help");
}
Symbol 36 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 2
stop();
Symbol 48 MovieClip Frame 3
stop();
Symbol 48 MovieClip Frame 4
stop();
Symbol 48 MovieClip Frame 5
stop();
Symbol 48 MovieClip Frame 6
stop();
Symbol 48 MovieClip Frame 7
stop();
Symbol 48 MovieClip Frame 8
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 14
if (22 > 0) {
22--;
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 25
removeMovieClip(this);
Symbol 69 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 25
removeMovieClip(this);
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 25
removeMovieClip(this);
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 25
removeMovieClip(this);
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 25
removeMovieClip(this);
Symbol 97 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 25
removeMovieClip(this);
Symbol 104 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 25
removeMovieClip(this);
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 25
removeMovieClip(this);
Symbol 116 MovieClip Frame 20
removeMovieClip(this);
Symbol 118 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 14
if (22 > 0) {
22--;
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 23
if (_root["31"] > 0) {
_root["31"]--;
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 150 Button
on (press) {
_root.gotoAndStop("intro");
}
Symbol 157 Button
on (press) {
_root.gotoAndStop("intro");
}