Frame 1
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__("d1a81af9", this, 10301, true);
function OpenArmorGames() {
getURL ("http://www.armorgames.com", "_blank");
}
function OpenHeroInteractive() {
getURL ("http://www.herointeractive.com", "_blank");
}
function BuyExtraContent() {
getURL ("http://www.herointeractive.com/stormwinds1-5.html", "_blank");
}
function ClickPlay() {
_root.actions_mc.Counter = 30;
}
stop();
Array.prototype.test = function (key) {
var _local2 = 0;
while (_local2 < this.length) {
this.getRow2Test(key, _local2);
var _local3 = 0;
_local2++;
}
};
Array.prototype.bSearch = function (key, options) {
this.sortDESCENDING = ((options & Array.DESCENDING) ? true : false);
this.sortNUMERIC = ((options & Array.NUMERIC) ? true : false);
this.sortCASEINSENSITIVE = ((options & Array.CASEINSENSITIVE) ? true : false);
this.padRole = "0";
var _local4 = 0;
var _local3 = this.length - 1;
var _local2 = 0;
var _local5 = 0;
while ((_local3 - _local4) > 1) {
_local2 = (_local3 + _local4) >> 1;
_local5++;
this.getRow2Test(key, _local2);
if ((this.sKey >= this.tKey) != this.sortDESCENDING) {
_local4 = _local2;
} else {
_local3 = _local2;
}
}
if (_local5 > Math.ceil(Math.LOG2E * Math.log(this.length))) {
}
this.getRow2Test(key, (this.sortDESCENDING ? (_local3) : (_local4)));
if (this.sKey == this.tKey) {
return((this.sortDESCENDING ? (_local3) : (_local4)));
}
this.getRow2Test(key, 0);
if (this.sKey == this.tKey) {
return(0);
}
this.getRow2Test(key, this.length - 1);
if (this.sKey == this.tKey) {
return(this.length - 1);
}
return(-1);
};
Array.prototype.getRow2Test = function (key, row) {
this.sKey = "";
this.tKey = "";
for (var _local6 in key) {
var _local2 = Math.max(String(key[_local6]).length, String(this[row][_local6]).length) + 1;
if ((typeof(key[_local6]) == "number") && (this.sortNUMERIC)) {
var _local4 = String(key[_local6]).length;
while (_local4 < _local2) {
this.sKey = this.sKey + this.padRole;
_local4++;
}
_local4 = String(this[row][_local6]).length;
while (_local4 < _local2) {
this.tKey = this.tKey + this.padRole;
_local4++;
}
this.sKey = this.sKey + String(key[_local6]);
this.tKey = this.tKey + String(this[row][_local6]);
} else {
this.sKey = this.sKey + String(key[_local6]);
this.tKey = this.tKey + String(this[row][_local6]);
var _local4 = String(key[_local6]).length;
while (_local4 < _local2) {
this.sKey = this.sKey + this.padRole;
_local4++;
}
_local4 = String(this[row][_local6]).length;
while (_local4 < _local2) {
this.tKey = this.tKey + this.padRole;
_local4++;
}
}
}
if (this.sortCASEINSENSITIVE) {
this.sKey = this.sKey.toUpperCase();
this.tKey = this.tKey.toUpperCase();
}
};
var additionalMenu = new ContextMenu();
additionalMenu.hideBuiltInItems();
var NewItem = new ContextMenuItem("Play More Games!", OpenArmorGames);
additionalMenu.customItems.push(NewItem);
NewItem = new ContextMenuItem("This Game Developed by Hero Interactive", OpenHeroInteractive);
additionalMenu.customItems.push(NewItem);
_root.menu = additionalMenu;
_global.versionNumber = "1.10";
_global.pageTest = "";
_global.pagePath = "main";
_global.myMusicPlayer = new Music();
_global.SoundManager = new SoundPlayer();
_global.graphics = "HIGH";
_global.musicOn = true;
_global.soundOn = true;
_global.avatarUp = 87;
_global.avatarRight = 68;
_global.avatarDown = 83;
_global.avatarLeft = 65;
_global.pauseHotkey = 80;
_global.fireHotkey = 32;
_global.otherScreen = false;
_global.controlsModified = false;
_global.gameMode = 1;
_global.gamePaused = false;
_global.encountered = new Array();
_global.encounteredStates = new Array();
_global.set1 = 0;
_global.set2 = 0;
_global.set3 = 0;
_global.dataPath = new DataObject();
_global.dataPath.mSet(2382752);
_global.doExcludePreloader = new DataObject();
_global.doExcludePreloader.mSet(59712137);
_global.doUnlockEC = new DataObject();
_global.doUnlockEC.mSet(19373843);
_global.prevMenu = false;
_global.menuFlag = false;
_global.instShown = false;
_global.gameScreen = "";
_global.invincible = false;
_global.arenaCurrentName = "";
_global.arenaCurrentImage = "";
_global.arenaPrevName = "";
_global.arenaPrevImage = "";
_global.arena = new Bubblefield();
_global.arenaAvatar = 1;
var ecArray = new Array();
ecArray.push("http://www.armorgames.com");
ecArray.push("http://armorgames.com");
ecArray.push("http://games.armorgames.com");
var i = 0;
while (i < ecArray.length) {
if (_url.substr(0, ecArray[i].length) == ecArray[i]) {
_global.doUnlockEC.Set(9843769);
break;
}
i++;
}
var adArray = new Array();
adArray.push("http://www.addictinggames.com");
adArray.push("http://addictinggames.com");
adArray.push("http://agstage.shockwave.com");
var i = 0;
while (i < adArray.length) {
if (_url.substr(0, adArray[i].length) == adArray[i]) {
_global.doExcludePreloader.Set(381594);
break;
}
i++;
}
if (_global.doExcludePreloader.Get() != -1) {
_root.adBorder_mc._visible = false;
_root.adBox.gotoAndStop(2);
} else {
var CPMStarPoolID = 1052;
var CPMStarSubPoolID = 13;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
}
var mySharedObject = SharedObject.getLocal("settings");
if (mySharedObject.data.firstTime == undefined) {
mySharedObject.data.firstTime = false;
mySharedObject.data.musicOn = _global.musicOn;
mySharedObject.data.soundOn = _global.soundOn;
mySharedObject.data.graphics = _global.graphics;
mySharedObject.data.avatarUp = _global.avatarUp;
mySharedObject.data.avatarRight = _global.avatarRight;
mySharedObject.data.avatarDown = _global.avatarDown;
mySharedObject.data.avatarLeft = _global.avatarLeft;
mySharedObject.data.pauseHotkey = _global.pauseHotkey;
mySharedObject.data.fireHotkey = _global.fireHotkey;
mySharedObject.data.versionNumber = _global.versionNumber;
mySharedObject.data.set1 = 0;
mySharedObject.data.set2 = 0;
mySharedObject.data.set3 = 0;
_global.encountered.push("Enemy_4");
_global.encountered.push("Enemy_1");
_global.encountered.push("Enemy_17");
mySharedObject.data.enemyList = _global.encountered;
_global.encounteredStates.push(1);
mySharedObject.data.statesList = _global.encounteredStates;
mySharedObject.flush();
} else {
_global.musicOn = mySharedObject.data.musicOn;
_global.soundOn = mySharedObject.data.soundOn;
_global.graphics = mySharedObject.data.graphics;
_global.avatarUp = mySharedObject.data.avatarUp;
_global.avatarRight = mySharedObject.data.avatarRight;
_global.avatarDown = mySharedObject.data.avatarDown;
_global.avatarLeft = mySharedObject.data.avatarLeft;
_global.pauseHotkey = mySharedObject.data.pauseHotkey;
_global.fireHotkey = mySharedObject.data.fireHotkey;
_global.set1 = mySharedObject.data.set1;
_global.set2 = mySharedObject.data.set2;
_global.set3 = mySharedObject.data.set3;
_global.encountered = mySharedObject.data.enemyList;
if (_global.encountered.length == undefined) {
_global.encountered = new Array();
_global.encountered.push("Enemy_4");
_global.encountered.push("Enemy_1");
_global.encountered.push("Enemy_17");
}
_global.encounteredStates = mySharedObject.data.statesList;
if (_global.encounteredStates.length == undefined) {
_global.encounteredStates = new Array();
_global.encounteredStates.push(1);
}
_quality = _global.graphics;
}
Instance of Symbol 319 MovieClip "actions_mc" in Frame 1
onClipEvent (load) {
myFlag = 0;
Counter = -1;
totalFileSize = _root.getBytesTotal();
startBytes = _root.getBytesLoaded();
_root.continueButton._visible = false;
var minCounter = 250;
}
onClipEvent (enterFrame) {
if (minCounter > 0) {
minCounter--;
}
if (Counter == 30) {
_root.fade_mc.play();
}
if (Counter == -1) {
bytesLoaded = _root.getBytesLoaded();
amountLoaded = bytesLoaded / totalFileSize;
myPercentLoaded = int(100 * amountLoaded);
_root.loadBubble.loadClip.load_txt.text = myPercentLoaded + "%";
_root.preloader.inside._xscale = myPercentLoaded;
myMessageOne = ((int(bytesLoaded / 1024) + "kb / ") + int(totalFileSize / 1024)) + "kb";
myMessageOne = ((myMessageOne + newline) + myPercentLoaded) + "%";
_root.loadingVars = myMessageOne;
if ((amountLoaded >= 1) && (myFlag == 0)) {
myFlag = 1;
_root.playButton_mc.gotoAndStop(2);
}
} else if (Counter == 0) {
okToPlay = true;
var testArray = new Array();
testArray.push("http://www.herointeractive.com");
testArray.push("http://herointeractive.com");
testArray.push("http://www.flashgamelicense.com");
testArray.push("http://flashgamelicense.com");
testArray.push("http://www.armorgames.com");
testArray.push("http://armorgames.com");
testArray.push("http://games.armorgames.com");
var i = 0;
while (i < testArray.length) {
if (_url.substr(0, testArray[i].length) == testArray[i]) {
okToPlay = true;
break;
}
i++;
}
if (okToPlay) {
_root.gotoAndPlay("buffer_sound");
} else {
_root.gotoAndStop(50);
}
} else {
Counter--;
}
}
Frame 2
function StartMusic() {
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("title");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
}
function UpdateEnemyList() {
var _local3 = 0;
while (_local3 < enemies.length) {
var _local4 = false;
var _local2 = 0;
while (_local2 < _global.encountered.length) {
if (enemies[_local3].id == _global.encountered[_local2]) {
_local4 = true;
break;
}
_local2++;
}
if (_local4 == true) {
enemies[_local3].locked = false;
} else {
enemies[_local3].locked = true;
}
_local3++;
}
}
stop();
var enemies = new Array();
enemies.push({name:"Tiny Guy", id:"Enemy_4", locked:false, image:1});
enemies.push({name:"Little Guy", id:"Enemy_1", locked:false, image:1});
enemies.push({name:"Dead Head 3", id:"Enemy_17", locked:false, image:1});
enemies.push({name:"Dead Head 4", id:"Enemy_18", locked:false, image:1});
enemies.push({name:"Bubble Ball", id:"Enemy_10", locked:false, image:1});
enemies.push({name:"Life Carrier", id:"Enemy_92", locked:false, image:1});
enemies.push({name:"B Fighter", id:"Enemy_2", locked:false, image:1});
enemies.push({name:"L Fighter", id:"Enemy_93", locked:false, image:1});
enemies.push({name:"S Fighter", id:"Enemy_94", locked:false, image:1});
enemies.push({name:"Swarm Fighter", id:"Enemy_95", locked:false, image:1});
enemies.push({name:"Wing Fighter", id:"Enemy_5", locked:false, image:1});
enemies.push({name:"Twin", id:"Enemy_7", locked:false, image:1});
enemies.push({name:"Heavy Fighter", id:"Enemy_91", locked:false, image:1});
enemies.push({name:"Orbital Seeker Fighter", id:"Enemy_75", locked:true, image:1});
enemies.push({name:"Bubble Bomber", id:"Enemy_96", locked:false, image:1});
enemies.push({name:"Big Gun", id:"Enemy_3", locked:false, image:1});
enemies.push({name:"Beatle Tank", id:"Enemy_6", locked:false, image:1});
enemies.push({name:"Tank Killer", id:"Enemy_88", locked:false, image:1});
enemies.push({name:"Horned Tanker", id:"Enemy_89", locked:false, image:1});
enemies.push({name:"Big Beatle", id:"Enemy_11", locked:false, image:1});
enemies.push({name:"Basic Sticky Gun Tank", id:"Enemy_76", locked:false, image:1});
enemies.push({name:"Sticky/Machine Gun", id:"Enemy_65", locked:false, image:1});
enemies.push({name:"Mine Layer 1", id:"Enemy_41", locked:false, image:1});
enemies.push({name:"Mine Layer 2", id:"Enemy_42", locked:false, image:1});
enemies.push({name:"Mine Layer 3", id:"Enemy_43", locked:false, image:1});
enemies.push({name:"Mine Wall Maker", id:"Enemy_74", locked:false, image:1});
enemies.push({name:"Heavy Heavy Heavy 1", id:"Enemy_44", locked:false, image:1});
enemies.push({name:"Heavy Heavy Heavy 2", id:"Enemy_45", locked:false, image:1});
enemies.push({name:"Heavy Heavy Heavy 3", id:"Enemy_46", locked:false, image:1});
enemies.push({name:"Heavy Heavy Heavy 4", id:"Enemy_47", locked:false, image:1});
enemies.push({name:"Heavy Killer", id:"Enemy_99", locked:false, image:1});
enemies.push({name:"Seeker Tank", id:"Enemy_9", locked:false, image:1});
enemies.push({name:"Leecher Drone Carrier 1", id:"Enemy_48", locked:false, image:1});
enemies.push({name:"Sapper Fighter", id:"Enemy_85", locked:false, image:1});
enemies.push({name:"Sapper w/ Machine Gun", id:"Enemy_79", locked:false, image:1});
enemies.push({name:"Seeker Carrier", id:"Enemy_80", locked:false, image:1});
enemies.push({name:"Leech Guardian", id:"Enemy_98", locked:false, image:1});
enemies.push({name:"Spawn Tank", id:"Enemy_12", locked:false, image:1});
enemies.push({name:"Death Field Tank", id:"Enemy_13", locked:false, image:1});
enemies.push({name:"Mini Death Field", id:"Enemy_87", locked:false, image:1});
enemies.push({name:"360 Pulse", id:"Enemy_63", locked:false, image:1});
enemies.push({name:"360 Spiral Gun", id:"Enemy_83", locked:false, image:1});
enemies.push({name:"Rotating Machine Gun", id:"Enemy_82", locked:false, image:1});
enemies.push({name:"Chromatic Confusion", id:"Enemy_R1", locked:false, image:1});
enemies.push({name:"Tri-Guardian", id:"Enemy_90", locked:false, image:1});
enemies.push({name:"BFT", id:"Enemy_14", locked:false, image:1});
enemies.push({name:"Spawn Carrier", id:"Enemy_86", locked:false, image:1});
enemies.push({name:"Destroyer", id:"Enemy_97", locked:false, image:1});
UpdateEnemyList();
Instance of Symbol 319 MovieClip in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
_global.myMusicPlayer.RunPlayer();
_root.risingbubbles_mc.GenerateBubbles();
}
Instance of Symbol 340 MovieClip in Frame 2
onClipEvent (enterFrame) {
_root.risingbubbles_mc.GenerateBubbles();
}
Frame 3
function StartGame() {
gotoAndStop (15);
}
function StartBlur() {
}
stop();
_global.arena = new Bubblefield();
_global.tempEnemyDepth = 600;
Instance of Symbol 319 MovieClip in Frame 3
onClipEvent (load) {
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("title");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
}
onClipEvent (enterFrame) {
_global.myMusicPlayer.RunPlayer();
}
Frame 4
function SaveSettings() {
var _local2 = SharedObject.getLocal("settings");
_local2.data.musicOn = _global.musicOn;
_local2.data.soundOn = _global.soundOn;
_local2.data.graphics = _quality;
_local2.data.avatarUp = _global.avatarUp;
_local2.data.avatarRight = _global.avatarRight;
_local2.data.avatarDown = _global.avatarDown;
_local2.data.avatarLeft = _global.avatarLeft;
_local2.data.pauseHotkey = _global.pauseHotkey;
_local2.data.fireHotkey = _global.fireHotkey;
_local2.data.versionNumber = _global.versionNumber;
_local2.flush();
}
_global.pageTest = "settings";
stop();
Instance of Symbol 319 MovieClip in Frame 4
onClipEvent (load) {
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("title");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
}
Frame 5
_global.pageTest = "credits";
stop();
Frame 6
_global.pageTest = "high scores";
stop();
Frame 7
function switchForward() {
var _local3 = selectedEnemyIndex;
selectedEnemyIndex++;
if (selectedEnemyIndex >= enemies.length) {
selectedEnemyIndex = 0;
}
_global.arenaPrevName = enemies[_local3].name;
_global.arenaPrevImage = enemies[_local3].image;
_global.arenaCurrentName = enemies[selectedEnemyIndex].name;
_global.arenaCurrentImage = enemies[selectedEnemyIndex].image;
_root.ico.selectObject.gotoAndPlay("forward");
displayEnemyRecord(selectedEnemyIndex, "prev");
}
function switchBackward() {
var _local3 = selectedEnemyIndex;
selectedEnemyIndex--;
if (selectedEnemyIndex < 0) {
selectedEnemyIndex = enemies.length - 1;
}
_global.arenaPrevName = enemies[_local3].name;
_global.arenaPrevImage = enemies[_local3].image;
_global.arenaCurrentName = enemies[selectedEnemyIndex].name;
_global.arenaCurrentImage = enemies[selectedEnemyIndex].image;
_root.ico.selectObject.gotoAndPlay("backward");
displayEnemyRecord(selectedEnemyIndex, "next");
}
function displayEnemyRecord(showID, strLocation) {
showID = enemies[selectedEnemyIndex].id;
showText = enemies[selectedEnemyIndex].name;
showLocked = enemies[selectedEnemyIndex].locked;
var adjuster;
var mcSelectedClip;
if (strLocation == "current") {
if (showLocked == true) {
_root.ico.selectObject.selectedObject.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico.selectObject.selectedObject.enemyImage.attachMovie(enemies[selectedEnemyIndex].id, "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico.selectObject.selectedObject.enemyImage.currentShownEnemy;
} else if (strLocation == "next") {
if (showLocked == true) {
_root.ico.selectObject.nextObject.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico.selectObject.nextObject.enemyImage.attachMovie(enemies[selectedEnemyIndex].id, "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico.selectObject.nextObject.enemyImage.currentShownEnemy;
} else if (strLocation == "prev") {
if (showLocked == true) {
_root.ico.selectObject.prevObject.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico.selectObject.prevObject.enemyImage.attachMovie(enemies[selectedEnemyIndex].id, "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico.selectObject.prevObject.enemyImage.currentShownEnemy;
}
if (showLocked == false) {
mcSelectedClip.TurnOff();
} else {
mcSelectedClip._xscale = (mcSelectedClip._yscale = 150);
}
mcSelectedClip._x = 37;
mcSelectedClip._y = 33;
mcSelectedClip._parent._parent.name_txt.text = showText;
}
_global.pageTest = "bubbleopedia";
stop();
var selectedEnemyIndex = 0;
_root.ico.selectObject.selectedObject.name_txt.text = _global.arenaCurrentName;
displayEnemyRecord(selectedEnemyIndex, "current");
Instance of Symbol 319 MovieClip in Frame 7
onClipEvent (load) {
_global.arena = new Bubblefield();
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("title");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
}
onClipEvent (enterFrame) {
}
Frame 8
_global.pageTest = "arenaLocked";
stop();
Instance of Symbol 319 MovieClip in Frame 8
onClipEvent (load) {
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("title");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
}
Frame 10
_global.pageTest = "arena";
function switchForward() {
var _local3 = selectedEnemyIndex;
selectedEnemyIndex++;
if (selectedEnemyIndex >= enemies.length) {
selectedEnemyIndex = 0;
}
_global.arenaPrevName = enemies[_local3].name;
_global.arenaPrevImage = enemies[_local3].image;
_global.arenaCurrentName = enemies[selectedEnemyIndex].name;
_global.arenaCurrentImage = enemies[selectedEnemyIndex].image;
_root.ico.selectObject.gotoAndPlay("forward");
displayEnemyOnScreen(selectedEnemyIndex, "prev", enemies[selectedEnemyIndex].name);
}
function EnemiesSelected() {
if (enemyList.length > 0) {
return(true);
}
return(false);
}
function switchBackward() {
var _local3 = selectedEnemyIndex;
selectedEnemyIndex--;
if (selectedEnemyIndex < 0) {
selectedEnemyIndex = enemies.length - 1;
}
_global.arenaPrevName = enemies[_local3].name;
_global.arenaPrevImage = enemies[_local3].image;
_global.arenaCurrentName = enemies[selectedEnemyIndex].name;
_global.arenaCurrentImage = enemies[selectedEnemyIndex].image;
_root.ico.selectObject.gotoAndPlay("backward");
displayEnemyOnScreen(selectedEnemyIndex, "next", enemies[selectedEnemyIndex].name);
}
function EnemySelected() {
if (enemies[selectedEnemyIndex].locked == false) {
AddArenaUnit(enemies[selectedEnemyIndex].id, enemies[selectedEnemyIndex].name);
} else {
_global.SoundManager.PlayBubbleSound("nocando");
}
}
function AddArenaUnit(myType, myName) {
if (AddToList(myType, myName) == false) {
var _local2 = new Vector();
_local2._x = Math.round(Math.random() * 500) - 250;
_local2._y = Math.round(Math.random() * 400) - 200;
_global.arena.AddUnitAndList("enemy_" + _global.tempEnemyDepth, myType, _local2, _global.tempEnemyDepth, myName);
_global.tempEnemyDepth++;
}
}
function AddToList(myType, myName) {
var _local2 = false;
var _local4 = false;
var _local1 = 0;
while (_local1 < enemyList.length) {
if (enemyList[_local1].type == myType) {
enemyList[_local1].num++;
_local2 = true;
break;
}
_local1++;
}
if (_local2 == false) {
if (enemyList.length < 4) {
enemyList.push({name:myName, type:myType, num:1});
} else {
_local4 = true;
}
}
UpdateList();
return(_local4);
}
function UpdateList() {
this.arenaSelection0._visible = false;
this.arenaSelection1._visible = false;
this.arenaSelection2._visible = false;
this.arenaSelection3._visible = false;
var i = 0;
while (i < enemyList.length) {
var objectRef = eval ("this.arenaSelection" + i);
objectRef._visible = true;
objectRef.selIndex_txt.text = "" + enemyList[i].num;
objectRef.sname_txt.text = enemyList[i].name;
i++;
}
}
function EnemyPlus(getName) {
var _local1 = Number(substring(getName, getName.length, 1));
AddArenaUnit(enemyList[_local1].type, enemyList[_local1].name);
}
function EnemyMinus(getName) {
var _local2 = Number(substring(getName, getName.length, 1));
enemyList[_local2].num--;
_global.arena.RemoveUnitByType(enemyList[_local2].type, false);
if (enemyList[_local2].num <= 0) {
enemyList.splice(_local2, 1);
}
UpdateList();
}
function EnemyRemove(getName) {
var _local2 = Number(substring(getName, getName.length, 1));
_global.arena.RemoveUnitByType(enemyList[_local2].type, true);
enemyList.splice(_local2, 1);
UpdateList();
}
function BuildListFromArena() {
enemyList = _global.arena.BuildUnitList();
}
function displayEnemyOnScreen(showID, strLocation) {
showText = enemies[showID].name;
showID = enemies[showID].id;
showLocked = enemies[selectedEnemyIndex].locked;
var adjuster;
var mcSelectedClip;
if (strLocation == "current") {
if (showLocked == true) {
_root.ico.selectObject.selectedObject.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico.selectObject.selectedObject.enemyImage.attachMovie(enemies[selectedEnemyIndex].id, "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico.selectObject.selectedObject.enemyImage.currentShownEnemy;
} else if (strLocation == "next") {
if (showLocked == true) {
_root.ico.selectObject.nextObject.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico.selectObject.nextObject.enemyImage.attachMovie(enemies[selectedEnemyIndex].id, "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico.selectObject.nextObject.enemyImage.currentShownEnemy;
} else if (strLocation == "prev") {
if (showLocked == true) {
_root.ico.selectObject.prevObject.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico.selectObject.prevObject.enemyImage.attachMovie(enemies[selectedEnemyIndex].id, "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico.selectObject.prevObject.enemyImage.currentShownEnemy;
}
if (showLocked == false) {
if ((mcSelectedClip._width > 105) || (mcSelectedClip._height > 105)) {
if (mcSelectedClip._width > mcSelectedClip._height) {
adjuster = 105 / mcSelectedClip._width;
} else if (mcSelectedClip._width == mcSelectedClip._height) {
adjuster = 105 / mcSelectedClip._width;
} else {
adjuster = 105 / mcSelectedClip._height;
}
mcSelectedClip._width = mcSelectedClip._width * adjuster;
mcSelectedClip._height = mcSelectedClip._height * adjuster;
}
mcSelectedClip.TurnOff();
}
mcSelectedClip._x = 37;
mcSelectedClip._y = 33;
mcSelectedClip._parent._parent.name_txt.text = showText;
}
stop();
_global.gameScreen = "arena";
var selectedEnemyIndex = 0;
_global.arenaCurrentName = enemies[0].name;
_global.arenaCurrentImage = enemies[0].image;
var enemyList = new Array();
BuildListFromArena();
UpdateList();
displayEnemyOnScreen(selectedEnemyIndex, "current");
Instance of Symbol 523 MovieClip "instruct1" in Frame 10
onClipEvent (load) {
if (!_global.instShown) {
this.gotoAndStop(2);
}
}
Instance of Symbol 319 MovieClip in Frame 10
onClipEvent (load) {
_global.arena = new Bubblefield();
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("title");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
}
onClipEvent (enterFrame) {
_global.myMusicPlayer.RunPlayer();
}
Frame 11
_global.pageTest = "stage";
function switchStageForward() {
var _local3 = selectedAvatarIndex;
selectedAvatarIndex++;
if (selectedAvatarIndex >= stateList.arrNodes.length) {
selectedAvatarIndex = 0;
}
_global.arenaPrevName = stateList.arrNodes[_local3].nodeData._name;
_global.arenaPrevImage = enemies[_local3].image;
_global.arenaCurrentName = stateList.arrNodes[selectedAvatarIndex].nodeData._name;
_global.arenaCurrentImage = enemies[selectedAvatarIndex].image;
_root.ico2.selectStage.gotoAndPlay("forward");
displayStageOnScreen(selectedAvatarIndex, "prev");
}
function switchStageBackward() {
var _local3 = selectedAvatarIndex;
selectedAvatarIndex--;
if (selectedAvatarIndex < 0) {
selectedAvatarIndex = stateList.arrNodes.length - 1;
}
_global.arenaPrevName = stateList.arrNodes[_local3].nodeData._name;
_global.arenaPrevImage = enemies[_local3].image;
_global.arenaCurrentName = stateList.arrNodes[selectedAvatarIndex].nodeData._name;
_global.arenaCurrentImage = enemies[selectedAvatarIndex].image;
_root.ico2.selectStage.gotoAndPlay("backward");
displayStageOnScreen(selectedAvatarIndex, "next");
}
function StageSelected() {
if (IsAvatarLocked(selectedAvatarIndex + 1) == true) {
_global.SoundManager.PlayBubbleSound("nocando");
} else {
_global.arenaAvatar = selectedAvatarIndex + 1;
StartArenaGame();
}
}
function StartArenaGame() {
_root.leftA2.gotoAndPlay(16);
_root.rightA2.gotoAndPlay(16);
_global.gameMode = 2;
_global.invincible = false;
_root.gotoAndStop(15);
}
function displayStageOnScreen(showID, strLocation) {
showText = stateList.arrNodes[showID].nodeData._name;
showID = stateList.arrNodes[showID].nodeData._id;
showLocked = IsAvatarLocked(showID);
var adjuster;
var mcSelectedClip;
if (strLocation == "current") {
if (showLocked == true) {
_root.ico2.selectStage.selectedStage.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico2.selectStage.selectedStage.enemyImage.attachMovie("avatar", "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico2.selectStage.selectedStage.enemyImage.currentShownEnemy;
} else if (strLocation == "next") {
if (showLocked == true) {
_root.ico2.selectStage.nextStage.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico2.selectStage.nextStage.enemyImage.attachMovie("avatar", "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico2.selectStage.nextStage.enemyImage.currentShownEnemy;
} else if (strLocation == "prev") {
if (showLocked == true) {
_root.ico2.selectStage.prevStage.enemyImage.attachMovie("enemyLocked", "currentShownEnemy", 200);
} else {
_root.ico2.selectStage.prevStage.enemyImage.attachMovie("avatar", "currentShownEnemy", 200);
}
mcSelectedClip = _root.ico2.selectStage.prevStage.enemyImage.currentShownEnemy;
}
if (showLocked == false) {
mcSelectedClip.gotoAndStop(showID);
if ((showID != 1) && (showID != 21)) {
mcSelectedClip.gun.gotoAndStop(50);
}
if ((mcSelectedClip._width > 105) || (mcSelectedClip._height > 105)) {
if (mcSelectedClip._width > mcSelectedClip._height) {
adjuster = 105 / mcSelectedClip._width;
} else if (mcSelectedClip._width == mcSelectedClip._height) {
adjuster = 105 / mcSelectedClip._width;
} else {
adjuster = 105 / mcSelectedClip._height;
}
mcSelectedClip._width = mcSelectedClip._width * adjuster;
mcSelectedClip._height = mcSelectedClip._height * adjuster;
}
mcSelectedClip.TurnOff();
}
mcSelectedClip._x = 38;
mcSelectedClip._y = 34;
mcSelectedClip._parent._parent.name_txt.text = showText;
}
function IsAvatarLocked(myId) {
var _local2 = 0;
while (_local2 < _global.encounteredStates.length) {
if (_global.encounteredStates[_local2] == myId) {
return(false);
}
_local2++;
}
return(true);
}
stop();
_global.gameScreen = "stage";
var selectedAvatarIndex = 0;
var stateList = new UpgradeTree();
stateList.RemoveFirstNode();
displayAvatarOnScreen(selectedAvatarIndex, "current");
Frame 15
function GameSetup() {
game = new BubbleTanksGame();
gameCreated = false;
framesToCatchUp = 1;
framesNum = 0;
game.StartGame();
}
function Mediator() {
game.RunGame();
}
function ExitGame() {
delete game;
UpdateEnemyList();
_root.gotoAndStop("main");
}
function DropBubbles(numBubbles, origin, givenPower) {
game.DropPickupBubbles(numBubbles, origin, givenPower);
}
function EnemyShoot(startPos, startAngle, mySpeed, mySize, myDamage) {
game.EnemyFire(startPos, startAngle, mySpeed, mySize, myDamage);
}
function EnemyShootSpecial(myType, startPos, startAngle, mySpeed, mySize, myDamage) {
game.EnemyFireSpecial(myType, startPos, startAngle, mySpeed, mySize, myDamage);
}
function ReportDeath(name) {
game.EnemyDead(name);
}
function SpawnUnit(enemyType, startPosition, OriginUnit) {
return(game.CreateNewUnit(enemyType, startPosition, OriginUnit));
}
function ReportAvatarDamage(numDamage) {
game.AvatarHit(numDamage);
}
function DeleteOpenMask() {
_root.removeMovieClip("openMask");
}
function CleanEffect(effectName) {
game.RemoveEffect(effectName);
}
function AddEffect(myName, myLocation, myLock, myTarget) {
game.CreateEffect(myName, myLocation, myLock, myTarget);
}
stop();
var game;
var gameCreated;
var framesToCatchUp;
var framesNum;
Instance of Symbol 319 MovieClip in Frame 15
onClipEvent (load) {
if ((((_global.avatarUp != 87) || (_global.avatarRight != 68)) || (_global.avatarDown != 83)) || (_global.avatarLeft != 65)) {
_root.bg.tutShell_mc.tutorial.gotoAndStop(8);
}
_root.GameSetup();
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("game");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
}
onClipEvent (enterFrame) {
_root.Mediator();
_global.myMusicPlayer.RunPlayer();
}
Frame 16
gotoAndPlay (41);
Frame 41
gotoAndPlay ("intro");
Frame 50
stop();
Symbol 3 MovieClip [bullet] Frame 1
#initclip 228
Object.registerClass("bullet", Bullet);
#endinitclip
Symbol 5 MovieClip Frame 1
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 6 MovieClip [Enemy_1] Frame 1
#initclip 117
Object.registerClass("Enemy_1", Enemy_1);
#endinitclip
stop();
Symbol 6 MovieClip [Enemy_1] Frame 2
stop();
Symbol 8 MovieClip [massive_bullet] Frame 1
#initclip 118
Object.registerClass("massive_bullet", Bullet);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 12 MovieClip [component_bubble_orange_flashing] Frame 1
#initclip 119
Object.registerClass("component_bubble_orange_flashing", Bullet);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 12 MovieClip [component_bubble_orange_flashing] Frame 40
gotoAndPlay (1);
Symbol 12 MovieClip [component_bubble_orange_flashing] Frame 41
this._rotation = Math.round(Math.random() * 360) - 180;
Symbol 12 MovieClip [component_bubble_orange_flashing] Frame 46
stop();
Symbol 14 MovieClip [component_bubble_orange_opt] Frame 1
#initclip 120
Object.registerClass("component_bubble_orange_opt", Bullet);
#endinitclip
stop();
Symbol 14 MovieClip [component_bubble_orange_opt] Frame 2
this._rotation = Math.round(Math.random() * 360) - 180;
Symbol 14 MovieClip [component_bubble_orange_opt] Frame 7
stop();
Symbol 17 MovieClip [sniper_bullet] Frame 1
#initclip 121
Object.registerClass("sniper_bullet", Bullet);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 17 MovieClip [sniper_bullet] Frame 40
gotoAndPlay (1);
Symbol 17 MovieClip [sniper_bullet] Frame 41
this._rotation = Math.round(Math.random() * 360) - 180;
Symbol 17 MovieClip [sniper_bullet] Frame 46
stop();
Symbol 19 MovieClip [component_bubble_red_opt] Frame 1
#initclip 122
Object.registerClass("component_bubble_red_opt", Bullet);
#endinitclip
stop();
Symbol 19 MovieClip [component_bubble_red_opt] Frame 2
this._rotation = Math.round(Math.random() * 360) - 180;
Symbol 19 MovieClip [component_bubble_red_opt] Frame 7
stop();
Symbol 21 MovieClip [bullet_buster] Frame 1
#initclip 123
Object.registerClass("bullet_buster", Bullet);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 24 MovieClip [pickup_bubble_ultra] Frame 1
#initclip 124
Object.registerClass("pickup_bubble_ultra", PickupBubble_Ultra);
#endinitclip
Symbol 25 MovieClip [pickup_bubble_large] Frame 1
#initclip 125
Object.registerClass("pickup_bubble_large", PickupBubble_Medium);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 26 MovieClip [pickup_bubble] Frame 1
#initclip 126
Object.registerClass("pickup_bubble", PickupBubble);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 28 MovieClip [component_bubble_yellow_disassembled] Frame 1
#initclip 127
Object.registerClass("component_bubble_yellow_disassembled", DisassembledBubble);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 29 MovieClip [component_bubble_disassembled] Frame 1
#initclip 128
Object.registerClass("component_bubble_disassembled", DisassembledBubble);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 31 MovieClip [menuBubbles] Frame 1
#initclip 129
Object.registerClass("menuBubbles", MenuBubbles);
#endinitclip
Symbol 36 MovieClip Frame 1
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 40 MovieClip [Enemy_2] Frame 1
#initclip 130
Object.registerClass("Enemy_2", Enemy_2);
#endinitclip
stop();
Symbol 41 MovieClip [Enemy_4] Frame 1
#initclip 131
Object.registerClass("Enemy_4", Enemy_4);
#endinitclip
Symbol 43 MovieClip [Enemy_76] Frame 1
#initclip 132
Object.registerClass("Enemy_76", Enemy_76);
#endinitclip
stop();
Symbol 45 MovieClip [Enemy_3] Frame 1
#initclip 133
Object.registerClass("Enemy_3", Enemy_3);
#endinitclip
stop();
Symbol 46 MovieClip [Enemy_5] Frame 1
#initclip 134
Object.registerClass("Enemy_5", Enemy_5);
#endinitclip
stop();
Symbol 46 MovieClip [Enemy_5] Frame 10
stop();
Symbol 48 MovieClip Frame 1
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 49 MovieClip [Enemy_6] Frame 1
#initclip 135
Object.registerClass("Enemy_6", Enemy_6);
#endinitclip
stop();
Symbol 50 MovieClip [Enemy_7] Frame 1
#initclip 136
Object.registerClass("Enemy_7", Enemy_7);
#endinitclip
stop();
Symbol 50 MovieClip [Enemy_7] Frame 15
stop();
Symbol 50 MovieClip [Enemy_7] Frame 20
stop();
Symbol 51 MovieClip [Enemy_8] Frame 1
#initclip 137
Object.registerClass("Enemy_8", Enemy_8);
#endinitclip
stop();
Symbol 52 MovieClip [Ally_Orbital_Seeker] Frame 1
#initclip 138
Object.registerClass("Ally_Orbital_Seeker", Ally_Orbital_Seeker);
#endinitclip
stop();
Symbol 52 MovieClip [Ally_Orbital_Seeker] Frame 10
this.KillMe();
Symbol 53 MovieClip [Ally_Mitosis] Frame 1
#initclip 139
Object.registerClass("Ally_Mitosis", Ally_Mitosis);
#endinitclip
stop();
Symbol 53 MovieClip [Ally_Mitosis] Frame 10
this.KillMe();
Symbol 54 MovieClip [component_bubble_orange] Frame 1
#initclip 140
Object.registerClass("component_bubble_orange", Bullet);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 54 MovieClip [component_bubble_orange] Frame 40
gotoAndPlay (1);
Symbol 54 MovieClip [component_bubble_orange] Frame 41
this._rotation = Math.round(Math.random() * 360) - 180;
Symbol 54 MovieClip [component_bubble_orange] Frame 46
stop();
Symbol 55 MovieClip [Ally_Seeker] Frame 1
#initclip 141
Object.registerClass("Ally_Seeker", Ally_Seeker);
#endinitclip
stop();
Symbol 55 MovieClip [Ally_Seeker] Frame 10
this.KillMe();
Symbol 56 MovieClip [component_bubble_red] Frame 1
#initclip 142
Object.registerClass("component_bubble_red", Bullet);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 56 MovieClip [component_bubble_red] Frame 40
gotoAndPlay (1);
Symbol 56 MovieClip [component_bubble_red] Frame 41
this._rotation = Math.round(Math.random() * 360) - 180;
Symbol 56 MovieClip [component_bubble_red] Frame 46
stop();
Symbol 57 MovieClip [Enemy_Seeker] Frame 1
#initclip 143
Object.registerClass("Enemy_Seeker", Enemy_Seeker);
#endinitclip
stop();
Symbol 57 MovieClip [Enemy_Seeker] Frame 10
this.KillMe();
Symbol 59 MovieClip [Enemy_9] Frame 1
#initclip 144
Object.registerClass("Enemy_9", Enemy_9);
#endinitclip
stop();
Symbol 59 MovieClip [Enemy_9] Frame 40
stop();
Symbol 60 MovieClip [Enemy_59] Frame 1
#initclip 145
Object.registerClass("Enemy_59", Enemy_59);
#endinitclip
Symbol 61 MovieClip [Enemy_10] Frame 1
#initclip 146
Object.registerClass("Enemy_10", Enemy_10);
#endinitclip
Symbol 62 MovieClip [Enemy_11] Frame 1
#initclip 147
Object.registerClass("Enemy_11", Enemy_11);
#endinitclip
stop();
Symbol 62 MovieClip [Enemy_11] Frame 125
stop();
Symbol 66 MovieClip Frame 1
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 66 MovieClip Frame 40
gotoAndPlay (1);
Symbol 66 MovieClip Frame 47
stop();
Symbol 69 MovieClip [Enemy_86] Frame 1
#initclip 148
Object.registerClass("Enemy_86", Enemy_86);
#endinitclip
stop();
Symbol 69 MovieClip [Enemy_86] Frame 120
stop();
Symbol 70 MovieClip [Enemy_12] Frame 1
#initclip 149
Object.registerClass("Enemy_12", Enemy_12);
#endinitclip
stop();
Symbol 70 MovieClip [Enemy_12] Frame 120
stop();
Symbol 71 MovieClip Frame 1
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 72 MovieClip [Enemy_87] Frame 1
#initclip 150
Object.registerClass("Enemy_87", Enemy_87);
#endinitclip
stop();
Symbol 73 MovieClip [Enemy_13] Frame 1
#initclip 151
Object.registerClass("Enemy_13", Enemy_13);
#endinitclip
stop();
Symbol 73 MovieClip [Enemy_13] Frame 40
stop();
Symbol 74 MovieClip [Enemy_14] Frame 1
#initclip 152
Object.registerClass("Enemy_14", Enemy_14);
#endinitclip
stop();
Symbol 74 MovieClip [Enemy_14] Frame 400
stop();
Symbol 75 MovieClip [Enemy_21] Frame 1
#initclip 153
Object.registerClass("Enemy_21", Enemy_21);
#endinitclip
stop();
Symbol 76 MovieClip [Enemy_26] Frame 1
#initclip 154
Object.registerClass("Enemy_26", Enemy_26);
#endinitclip
stop();
Symbol 77 MovieClip [Enemy_25] Frame 1
#initclip 155
Object.registerClass("Enemy_25", Enemy_25);
#endinitclip
stop();
Symbol 78 MovieClip [Enemy_24] Frame 1
#initclip 156
Object.registerClass("Enemy_24", Enemy_24);
#endinitclip
stop();
Symbol 79 MovieClip [Enemy_23] Frame 1
#initclip 157
Object.registerClass("Enemy_23", Enemy_23);
#endinitclip
stop();
Symbol 80 MovieClip [Enemy_22] Frame 1
#initclip 158
Object.registerClass("Enemy_22", Enemy_22);
#endinitclip
stop();
Symbol 82 MovieClip [Enemy_44] Frame 1
#initclip 159
Object.registerClass("Enemy_44", Enemy_44);
#endinitclip
stop();
Symbol 83 MovieClip [Enemy_R1] Frame 1
#initclip 160
Object.registerClass("Enemy_R1", Enemy_R1);
#endinitclip
stop();
Symbol 85 MovieClip [Enemy_63] Frame 1
#initclip 161
Object.registerClass("Enemy_63", Enemy_63);
#endinitclip
stop();
Symbol 87 MovieClip [Enemy_50] Frame 1
#initclip 162
Object.registerClass("Enemy_50", Enemy_50);
#endinitclip
stop();
Symbol 88 MovieClip [Enemy_49] Frame 1
#initclip 163
Object.registerClass("Enemy_49", Enemy_49);
#endinitclip
stop();
Symbol 89 MovieClip [Enemy_48] Frame 1
#initclip 164
Object.registerClass("Enemy_48", Enemy_48);
#endinitclip
stop();
Symbol 94 MovieClip [Enemy_47] Frame 1
#initclip 165
Object.registerClass("Enemy_47", Enemy_47);
#endinitclip
stop();
Symbol 95 MovieClip [Enemy_46] Frame 1
#initclip 166
Object.registerClass("Enemy_46", Enemy_46);
#endinitclip
stop();
Symbol 97 MovieClip [Enemy_45] Frame 1
#initclip 167
Object.registerClass("Enemy_45", Enemy_45);
#endinitclip
stop();
Symbol 97 MovieClip [Enemy_45] Frame 20
Symbol 98 MovieClip [Enemy_30] Frame 1
#initclip 168
Object.registerClass("Enemy_30", Enemy_30);
#endinitclip
stop();
Symbol 99 MovieClip [Enemy_27] Frame 1
#initclip 169
Object.registerClass("Enemy_27", Enemy_27);
#endinitclip
stop();
Symbol 100 MovieClip [Enemy_28] Frame 1
#initclip 170
Object.registerClass("Enemy_28", Enemy_28);
#endinitclip
stop();
Symbol 101 MovieClip [Enemy_29] Frame 1
#initclip 171
Object.registerClass("Enemy_29", Enemy_29);
#endinitclip
stop();
Symbol 102 MovieClip [Enemy_33] Frame 1
#initclip 172
Object.registerClass("Enemy_33", Enemy_33);
#endinitclip
stop();
Symbol 103 MovieClip [Enemy_32] Frame 1
#initclip 173
Object.registerClass("Enemy_32", Enemy_32);
#endinitclip
stop();
Symbol 104 MovieClip [Enemy_31] Frame 1
#initclip 174
Object.registerClass("Enemy_31", Enemy_31);
#endinitclip
stop();
Symbol 105 MovieClip [Enemy_20] Frame 1
#initclip 175
Object.registerClass("Enemy_20", Enemy_20);
#endinitclip
stop();
Symbol 106 MovieClip [Enemy_19] Frame 1
#initclip 176
Object.registerClass("Enemy_19", Enemy_19);
#endinitclip
stop();
Symbol 107 MovieClip [Enemy_18] Frame 1
#initclip 177
Object.registerClass("Enemy_18", Enemy_18);
#endinitclip
stop();
Symbol 108 MovieClip [Enemy_17] Frame 1
#initclip 178
Object.registerClass("Enemy_17", Enemy_17);
#endinitclip
stop();
Symbol 109 MovieClip [Enemy_16] Frame 1
#initclip 179
Object.registerClass("Enemy_16", Enemy_16);
#endinitclip
stop();
Symbol 110 MovieClip [Enemy_15] Frame 1
#initclip 180
Object.registerClass("Enemy_15", Enemy_15);
#endinitclip
stop();
Symbol 111 MovieClip [mine_2] Frame 1
#initclip 181
Object.registerClass("mine_2", Bullet);
#endinitclip
this._rotation = Math.round(Math.random() * 360);
Symbol 111 MovieClip [mine_2] Frame 16
gotoAndPlay (2);
Symbol 111 MovieClip [mine_2] Frame 22
stop();
Symbol 112 MovieClip [mine_1] Frame 1
#initclip 182
Object.registerClass("mine_1", Bullet);
#endinitclip
this._rotation = Math.round(Math.random() * 360);
Symbol 112 MovieClip [mine_1] Frame 16
gotoAndPlay (2);
Symbol 112 MovieClip [mine_1] Frame 22
stop();
Symbol 114 MovieClip [Enemy_41] Frame 1
#initclip 183
Object.registerClass("Enemy_41", Enemy_41);
#endinitclip
stop();
Symbol 115 MovieClip [Enemy_43] Frame 1
#initclip 184
Object.registerClass("Enemy_43", Enemy_43);
#endinitclip
stop();
Symbol 116 MovieClip [Enemy_42] Frame 1
#initclip 185
Object.registerClass("Enemy_42", Enemy_42);
#endinitclip
stop();
Symbol 117 MovieClip [Enemy_40] Frame 1
#initclip 186
Object.registerClass("Enemy_40", Enemy_40);
#endinitclip
stop();
Symbol 119 MovieClip [Enemy_39] Frame 1
#initclip 187
Object.registerClass("Enemy_39", Enemy_39);
#endinitclip
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 2
stop();
Symbol 124 MovieClip [Enemy_38] Frame 1
#initclip 188
Object.registerClass("Enemy_38", Enemy_38);
#endinitclip
stop();
Symbol 126 MovieClip [Enemy_37] Frame 1
#initclip 189
Object.registerClass("Enemy_37", Enemy_37);
#endinitclip
stop();
Symbol 128 MovieClip [Enemy_36] Frame 1
#initclip 190
Object.registerClass("Enemy_36", Enemy_36);
#endinitclip
stop();
Symbol 129 MovieClip [Enemy_35] Frame 1
#initclip 191
Object.registerClass("Enemy_35", Enemy_35);
#endinitclip
stop();
Symbol 130 MovieClip [Enemy_34] Frame 1
#initclip 192
Object.registerClass("Enemy_34", Enemy_34);
#endinitclip
stop();
Symbol 131 MovieClip [Enemy_74] Frame 1
#initclip 193
Object.registerClass("Enemy_74", Enemy_74);
#endinitclip
stop();
Symbol 132 MovieClip [Enemy_78] Frame 1
#initclip 194
Object.registerClass("Enemy_78", Enemy_78);
#endinitclip
stop();
Symbol 133 MovieClip [Enemy_77] Frame 1
#initclip 195
Object.registerClass("Enemy_77", Enemy_77);
#endinitclip
stop();
Symbol 134 MovieClip [Enemy_65] Frame 1
#initclip 196
Object.registerClass("Enemy_65", Enemy_65);
#endinitclip
stop();
Symbol 136 MovieClip [Enemy_75] Frame 1
#initclip 197
Object.registerClass("Enemy_75", Enemy_75);
#endinitclip
stop();
Symbol 147 MovieClip [Enemy_Health_Leecher] Frame 1
#initclip 198
Object.registerClass("Enemy_Health_Leecher", Enemy_Health_Leecher);
#endinitclip
stop();
Symbol 147 MovieClip [Enemy_Health_Leecher] Frame 10
this.KillMe();
Symbol 147 MovieClip [Enemy_Health_Leecher] Frame 11
stop();
Symbol 152 MovieClip [Enemy_Leecher] Frame 1
#initclip 199
Object.registerClass("Enemy_Leecher", Enemy_Leecher);
#endinitclip
stop();
Symbol 152 MovieClip [Enemy_Leecher] Frame 10
this.KillMe();
Symbol 152 MovieClip [Enemy_Leecher] Frame 11
stop();
Symbol 154 MovieClip Frame 1
play();
Symbol 156 MovieClip Frame 1
play();
Symbol 159 MovieClip [Ally_Infector] Frame 1
#initclip 200
Object.registerClass("Ally_Infector", Ally_Infector);
#endinitclip
stop();
Symbol 159 MovieClip [Ally_Infector] Frame 10
this.KillMe();
Symbol 159 MovieClip [Ally_Infector] Frame 11
stop();
Symbol 160 MovieClip [Enemy_Sapper] Frame 1
#initclip 201
Object.registerClass("Enemy_Sapper", Enemy_Sapper);
#endinitclip
stop();
Symbol 160 MovieClip [Enemy_Sapper] Frame 10
this.KillMe();
Symbol 160 MovieClip [Enemy_Sapper] Frame 11
stop();
Symbol 161 MovieClip [Enemy_Orbital_Seeker] Frame 1
#initclip 202
Object.registerClass("Enemy_Orbital_Seeker", Enemy_Orbital_Seeker);
#endinitclip
stop();
Symbol 161 MovieClip [Enemy_Orbital_Seeker] Frame 10
this.KillMe();
Symbol 162 MovieClip [Enemy_79] Frame 1
#initclip 203
Object.registerClass("Enemy_79", Enemy_79);
#endinitclip
stop();
Symbol 165 MovieClip Frame 10
stop();
_root.CleanEffect(this._parent._name);
Symbol 166 MovieClip [effect] Frame 1
stop();
Symbol 167 MovieClip [Enemy_84] Frame 1
#initclip 204
Object.registerClass("Enemy_84", Enemy_84);
#endinitclip
stop();
Symbol 168 MovieClip [Enemy_83] Frame 1
#initclip 205
Object.registerClass("Enemy_83", Enemy_83);
#endinitclip
stop();
Symbol 169 MovieClip [Enemy_82] Frame 1
#initclip 206
Object.registerClass("Enemy_82", Enemy_82);
#endinitclip
stop();
Symbol 170 MovieClip [Enemy_81] Frame 1
#initclip 207
Object.registerClass("Enemy_81", Enemy_81);
#endinitclip
stop();
Symbol 171 MovieClip [Enemy_80] Frame 1
#initclip 208
Object.registerClass("Enemy_80", Enemy_80);
#endinitclip
stop();
Symbol 180 MovieClip [token] Frame 1
stop();
Symbol 180 MovieClip [token] Frame 2
stop();
Symbol 180 MovieClip [token] Frame 3
stop();
Symbol 180 MovieClip [token] Frame 4
stop();
Symbol 181 MovieClip [shield_avatar] Frame 26
_root.game.RemoveEffect(this._name);
stop();
Symbol 183 MovieClip [shieldHit] Frame 16
_root.game.RemoveEffect(this._name);
stop();
Symbol 184 MovieClip [Enemy_85] Frame 1
#initclip 209
Object.registerClass("Enemy_85", Enemy_85);
#endinitclip
stop();
Symbol 185 MovieClip [Enemy_88] Frame 1
#initclip 210
Object.registerClass("Enemy_88", Enemy_88);
#endinitclip
stop();
Symbol 186 MovieClip [Enemy_89] Frame 1
#initclip 211
Object.registerClass("Enemy_89", Enemy_89);
#endinitclip
stop();
Symbol 187 MovieClip [pierce_shot_hit] Frame 1
this._rotation = Math.round(Math.random() * 360) - 180;
Symbol 187 MovieClip [pierce_shot_hit] Frame 7
_root.game.RemoveEffect(this._name);
stop();
Symbol 189 MovieClip [teleport_anim] Frame 12
_root.game.RemoveEffect(this._name);
stop();
Symbol 190 MovieClip [seeker_explosion] Frame 10
_root.game.RemoveEffect(this._name);
stop();
Symbol 206 MovieClip [stunned] Frame 121
_root.game.RemoveEffect(this._name);
stop();
Symbol 209 MovieClip [leecher_bullet] Frame 1
#initclip 212
Object.registerClass("leecher_bullet", Bullet);
#endinitclip
Symbol 211 MovieClip [leech_effect] Frame 18
_root.game.RemoveEffect(this._name);
stop();
Symbol 212 MovieClip Frame 1
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 212 MovieClip Frame 18
gotoAndPlay (1);
Symbol 220 MovieClip [effect_convert] Frame 21
_root.game.RemoveUnderEffect(this._name);
stop();
Symbol 222 MovieClip [Ally_Fighter] Frame 1
#initclip 213
Object.registerClass("Ally_Fighter", Ally_Fighter);
#endinitclip
Symbol 223 MovieClip [Enemy_90] Frame 1
#initclip 214
Object.registerClass("Enemy_90", Enemy_90);
#endinitclip
stop();
Symbol 224 MovieClip [Enemy_91] Frame 1
#initclip 215
Object.registerClass("Enemy_91", Enemy_91);
#endinitclip
stop();
Symbol 225 MovieClip [Enemy_92] Frame 1
#initclip 216
Object.registerClass("Enemy_92", Enemy_92);
#endinitclip
stop();
Symbol 226 MovieClip [Enemy_93] Frame 1
#initclip 217
Object.registerClass("Enemy_93", Enemy_93);
#endinitclip
stop();
Symbol 227 MovieClip [Enemy_94] Frame 1
#initclip 218
Object.registerClass("Enemy_94", Enemy_94);
#endinitclip
stop();
Symbol 228 MovieClip [Enemy_95] Frame 1
#initclip 219
Object.registerClass("Enemy_95", Enemy_95);
#endinitclip
stop();
Symbol 229 MovieClip [Enemy_96] Frame 1
#initclip 220
Object.registerClass("Enemy_96", Enemy_96);
#endinitclip
stop();
Symbol 230 MovieClip [Enemy_97] Frame 1
#initclip 221
Object.registerClass("Enemy_97", Enemy_97);
#endinitclip
stop();
Symbol 232 MovieClip [Enemy_98] Frame 1
#initclip 222
Object.registerClass("Enemy_98", Enemy_98);
#endinitclip
stop();
Symbol 233 MovieClip [Enemy_99] Frame 1
#initclip 223
Object.registerClass("Enemy_99", Enemy_99);
#endinitclip
stop();
Symbol 236 MovieClip [Enemy_B2] Frame 1
#initclip 224
Object.registerClass("Enemy_B2", Enemy_B2);
#endinitclip
stop();
Symbol 237 MovieClip [Enemy_B1] Frame 1
#initclip 225
Object.registerClass("Enemy_B1", Enemy_B1);
#endinitclip
Symbol 238 MovieClip [Enemy_B3] Frame 1
#initclip 226
Object.registerClass("Enemy_B3", Enemy_B3);
#endinitclip
stop();
Symbol 240 MovieClip [sticky] Frame 1
#initclip 227
Object.registerClass("sticky", Bullet);
#endinitclip
var r = Math.round(Math.random() * 10);
gotoAndPlay(r);
Symbol 240 MovieClip [sticky] Frame 40
gotoAndPlay (1);
Symbol 240 MovieClip [sticky] Frame 41
this._rotation = Math.round(Math.random() * 360) - 180;
Symbol 240 MovieClip [sticky] Frame 46
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 2
stop();
Symbol 242 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 1
stop();
Symbol 255 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 1
stop();
Symbol 260 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 1
stop();
Symbol 263 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 272 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 15
stop();
Symbol 277 MovieClip Frame 16
stop();
Symbol 278 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 2
Symbol 283 MovieClip Frame 27
_root.game.Fire_MassiveCannon(this._parent._name);
this._visible = false;
gotoAndStop (1);
Symbol 284 MovieClip Frame 1
this.bullet_mc._visible = false;
Symbol 286 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 1
stop();
Symbol 289 MovieClip [avatar] Frame 1
stop();
Symbol 289 MovieClip [avatar] Frame 2
stop();
Symbol 289 MovieClip [avatar] Frame 3
stop();
Symbol 289 MovieClip [avatar] Frame 4
stop();
Symbol 289 MovieClip [avatar] Frame 5
stop();
Symbol 289 MovieClip [avatar] Frame 6
stop();
Symbol 289 MovieClip [avatar] Frame 7
stop();
Symbol 289 MovieClip [avatar] Frame 8
stop();
Symbol 289 MovieClip [avatar] Frame 9
stop();
Symbol 289 MovieClip [avatar] Frame 10
stop();
Symbol 289 MovieClip [avatar] Frame 11
stop();
Symbol 289 MovieClip [avatar] Frame 12
stop();
Symbol 289 MovieClip [avatar] Frame 13
stop();
Symbol 289 MovieClip [avatar] Frame 14
stop();
Symbol 289 MovieClip [avatar] Frame 15
stop();
Symbol 289 MovieClip [avatar] Frame 16
stop();
Symbol 289 MovieClip [avatar] Frame 17
stop();
Symbol 289 MovieClip [avatar] Frame 18
stop();
Symbol 289 MovieClip [avatar] Frame 19
stop();
Symbol 289 MovieClip [avatar] Frame 20
stop();
Symbol 289 MovieClip [avatar] Frame 21
stop();
Symbol 289 MovieClip [avatar] Frame 22
stop();
Symbol 289 MovieClip [avatar] Frame 23
stop();
Symbol 289 MovieClip [avatar] Frame 24
stop();
Symbol 289 MovieClip [avatar] Frame 25
stop();
Symbol 289 MovieClip [avatar] Frame 26
stop();
Symbol 299 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 2
stop();
Symbol 314 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 2
stop();
Symbol 316 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 2
stop();
Instance of Symbol 314 MovieClip in Symbol 316 MovieClip Frame 2
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
this.gotoAndStop("off");
}
on (release) {
_root.ClickPlay();
}
Symbol 317 MovieClip Frame 1
stop();
Symbol 317 MovieClip Frame 30
stop();
Symbol 317 MovieClip Frame 45
stop();
this._visible = false;
Symbol 769 MovieClip [__Packages.Bubblefield] Frame 0
class Bubblefield
{
var arrUnits, x, y, blnBoss;
function Bubblefield () {
arrUnits = new Array();
x = 0;
y = 0;
blnBoss = false;
}
function GetNumUnits() {
return(arrUnits.length);
}
function AddUnit(myName, myLinkage, myPosition, myDepth) {
var _local2 = new BubblefieldUnit(myName, myLinkage, myPosition, myDepth);
arrUnits.push(_local2);
}
function AddSpawnedUnit(myName, myLinkage, myPosition, myDepth) {
var _local4 = new BubblefieldUnit(myName, myLinkage, myPosition, myDepth);
_local4._position._x = (myPosition._x - (_root.bg._x - _root.avatar._x)) - 250;
_local4._position._y = (myPosition._y - (_root.bg._y - _root.avatar._y)) - 200;
arrUnits.push(_local4);
}
function AddUnitAndList(myName, myLinkage, myPosition, myDepth, formalName) {
var _local2 = new BubblefieldUnit(myName, myLinkage, myPosition, myDepth);
_local2._formalName = formalName;
arrUnits.push(_local2);
}
function MoveAllBubblefieldUnits(moveVector) {
var _local3 = 0;
while (_local3 < arrUnits.length) {
_root[arrUnits[_local3]._name]._x = _root[arrUnits[_local3]._name]._x + moveVector._x;
_root[arrUnits[_local3]._name]._y = _root[arrUnits[_local3]._name]._y + moveVector._y;
_local3++;
}
}
function GetClosestUnit(testX, testY) {
var _local7 = 99999999 /* 0x5F5E0FF */;
var _local6 = 0;
var _local8 = "";
var _local3 = 0;
while (_local3 < arrUnits.length) {
var _local5 = _root[arrUnits[_local3]._name]._x - testX;
var _local4 = _root[arrUnits[_local3]._name]._y - testY;
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 < _local7) {
_local7 = _local6;
_local8 = arrUnits[_local3]._name;
}
_local3++;
}
return(_local8);
}
function GetUnitsWithinDistance(testX, testY, testDistance) {
var _local6 = 0;
var _local7 = new Array();
var _local3 = 0;
while (_local3 < arrUnits.length) {
var _local5 = _root[arrUnits[_local3]._name]._x - testX;
var _local4 = _root[arrUnits[_local3]._name]._y - testY;
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 <= testDistance) {
_local7.push(arrUnits[_local3]._name);
}
_local3++;
}
return(_local7);
}
function RemoveUnit(unitName) {
var _local2 = 0;
while (_local2 < arrUnits.length) {
if (unitName == arrUnits[_local2]._name) {
arrUnits.splice(_local2, 1);
break;
}
_local2++;
}
}
function GetUnitType(unitName) {
var _local2 = 0;
while (_local2 < arrUnits.length) {
if (unitName == arrUnits[_local2]._name) {
return(arrUnits[_local2]._linkage);
}
_local2++;
}
}
function RemoveUnitByType(unitType, blnRemoveAll) {
if (blnRemoveAll == true) {
var _local3 = true;
while (_local3 == true) {
_local3 = false;
var _local2 = 0;
while (_local2 < arrUnits.length) {
if (unitType == arrUnits[_local2]._linkage) {
arrUnits.splice(_local2, 1);
_local3 = true;
break;
}
_local2++;
}
}
} else {
var _local2 = 0;
while (_local2 < arrUnits.length) {
if (unitType == arrUnits[_local2]._linkage) {
arrUnits.splice(_local2, 1);
break;
}
_local2++;
}
}
}
function BuildUnitList() {
var _local3 = new Array();
var _local4 = 0;
while (_local4 < arrUnits.length) {
var _local5 = false;
var _local6 = false;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].type == arrUnits[_local4]._linkage) {
_local3[_local2].num++;
_local5 = true;
break;
}
_local2++;
}
if (_local5 == false) {
if (_local3.length < 4) {
_local3.push({name:arrUnits[_local4]._formalName, type:arrUnits[_local4]._linkage, num:1});
} else {
_local6 = true;
}
}
_local4++;
}
return(_local3);
}
function HaltUnits() {
var _local3 = 0;
while (_local3 < arrUnits.length) {
_root[arrUnits[_local3]._name].TurnOff();
_local3++;
}
}
function ResumeUnits() {
var _local3 = 0;
while (_local3 < arrUnits.length) {
_root[arrUnits[_local3]._name].TurnOn();
_local3++;
}
}
function HideAllUnits() {
var _local4 = new Array();
var _local3 = 0;
while (_local3 < arrUnits.length) {
if (_root[arrUnits[_local3]._name]._type != 1) {
_local4.push(arrUnits[_local3]._name);
} else {
arrUnits[_local3]._rotation = _root[arrUnits[_local3]._name]._rotation;
}
_root[arrUnits[_local3]._name].removeMovieClip();
_local3++;
}
_local3 = 0;
while (_local3 < _local4.length) {
RemoveUnit(_local4[_local3]);
_local3++;
}
}
function ShowAllUnits(offsetVector) {
var _local3 = 0;
while (_local3 < arrUnits.length) {
_root.attachMovie(arrUnits[_local3]._linkage, arrUnits[_local3]._name, arrUnits[_local3]._depth);
_root[arrUnits[_local3]._name]._x = (_root.bg._x + arrUnits[_local3]._position._x) + offsetVector._x;
_root[arrUnits[_local3]._name]._y = (_root.bg._y + arrUnits[_local3]._position._y) + offsetVector._y;
_root[arrUnits[_local3]._name]._rotation = arrUnits[_local3]._rotation;
_local3++;
}
}
function CheckForHits(bulletName) {
var _local7 = false;
var _local6;
var _local4 = arrUnits.slice();
if (_root[bulletName]._type != 7) {
var _local5 = 0;
while (_local5 < _local4.length) {
_local6 = false;
if (_local4[_local5]._linkage == "Enemy_Leecher") {
if (_root[_local4[_local5]._name].guy.hitTest(_root[bulletName]._x, _root[bulletName]._y, true)) {
_local7 = true;
_local6 = true;
}
} else if (_root[_local4[_local5]._name].hitTest(_root[bulletName]._x, _root[bulletName]._y, true)) {
if (_root[bulletName].GetImmune(_local4[_local5]._name) == false) {
_local7 = true;
_local6 = true;
_root[bulletName].EventHitEnemy(_local4[_local5]._name);
_root[bulletName].AddImmunity(_local4[_local5]._name);
}
}
if (_local6 == false) {
var _local11 = _root[bulletName]._x - (_root[bulletName].moveX * 0.5);
var _local10 = _root[bulletName]._y - (_root[bulletName].moveY * 0.5);
if (_local4[_local5]._linkage == "Enemy_Leecher") {
if (_root[_local4[_local5]._name].guy.hitTest(_local11, _local10, true)) {
_local7 = true;
_local6 = true;
}
} else if (_root[_local4[_local5]._name].hitTest(_local11, _local10, true)) {
if (_root[bulletName].GetImmune(_local4[_local5]._name) == false) {
_local7 = true;
_local6 = true;
_root[bulletName].EventHitEnemy(_local4[_local5]._name);
_root[bulletName].AddImmunity(_local4[_local5]._name);
}
}
}
if (_local6 == true) {
_root[_local4[_local5]._name].ReceiveDamage(_root[bulletName]._damage, bulletName);
}
_local5++;
}
} else {
var _local13 = (_root[bulletName]._width / 2) + 10;
var _local5 = 0;
while (_local5 < _local4.length) {
if (_root[bulletName].GetImmune(_local4[_local5]._name) == false) {
var _local9 = _root[_local4[_local5]._name]._x - _root[bulletName]._x;
var _local8 = _root[_local4[_local5]._name]._y - _root[bulletName]._y;
var _local12 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
if (_local12 <= _local13) {
if (_root[bulletName].GetImmune(_local4[_local5]._name) == false) {
_local7 = true;
_local6 = true;
_root[bulletName].EventHitEnemy(_local4[_local5]._name);
_root[bulletName].AddImmunity(_local4[_local5]._name);
}
}
}
_local5++;
}
}
return(_local7);
}
function ConvertDrones() {
var _local4 = new Array();
var _local3 = 0;
while (_local3 < arrUnits.length) {
if (_root[arrUnits[_local3]._name]._type != 1) {
_root.game.SpawnSeeker(_root[arrUnits[_local3]._name]._x, _root[arrUnits[_local3]._name]._y, 7, _root[arrUnits[_local3]._name]._type);
_local4.push(arrUnits[_local3]._name);
}
_local3++;
}
_local3 = 0;
while (_local3 < _local4.length) {
_root[_local4[_local3]].ReceiveDamage(999999, "");
_local3++;
}
}
function EstimateDifficulty() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < arrUnits.length) {
if (arrUnits[_local2]._linkage == "Enemy_1") {
_local3 = _local3 + -0.2;
} else if (arrUnits[_local2]._linkage == "Enemy_4") {
_local3 = _local3 + -0.02;
} else if (arrUnits[_local2]._linkage == "Enemy_17") {
_local3 = _local3 + -0.2;
} else if (arrUnits[_local2]._linkage == "Enemy_18") {
_local3 = _local3 + -0.2;
} else if (arrUnits[_local2]._linkage == "Enemy_10") {
_local3 = _local3 + -2;
} else if (arrUnits[_local2]._linkage == "Enemy_92") {
_local3 = _local3 + -4;
} else {
_local3 = _local3 + 1;
}
_local2++;
}
return(_local3);
}
}
Symbol 770 MovieClip [__Packages.Vector] Frame 0
class Vector
{
var _x, _y;
function Vector () {
_x = 0;
_y = 0;
}
function Add(rightSide) {
_x = _x + rightSide._x;
_y = _y + rightSide._y;
}
function Scale(magnitude) {
_x = _x * magnitude;
_y = _y * magnitude;
}
function GetLength() {
var _local2 = (_x * _x) + (_y * _y);
return(Math.sqrt(_local2));
}
function ConvertToUnitVector() {
var _local2 = GetLength();
if (_local2 != 0) {
_x = _x / _local2;
_y = _y / _local2;
}
}
function GetAngle() {
var _local2 = Math.atan2(_y, _x);
var _local3 = (360 * _local2) / (Math.PI*2);
return(_local3);
}
function AngleToAlign(dblGivenAngle, dblVelocity, dblTurnSpeed) {
var _local5 = 0;
var _local2 = GetAngle();
var _local3 = 0;
if (dblGivenAngle >= 0) {
_local5 = dblGivenAngle - 180;
if ((_local2 < dblGivenAngle) && (_local2 > _local5)) {
_local3 = (-dblTurnSpeed) * dblVelocity;
if ((_local2 - dblGivenAngle) > _local3) {
_local3 = _local2 - dblGivenAngle;
}
} else {
_local3 = dblTurnSpeed * dblVelocity;
if (_local2 >= 0) {
if (_local2 != _local5) {
if ((_local2 - dblGivenAngle) < _local3) {
_local3 = _local2 - dblGivenAngle;
}
}
}
}
} else {
_local5 = dblGivenAngle + 180;
if ((_local2 < _local5) && (_local2 > dblGivenAngle)) {
_local3 = dblTurnSpeed * dblVelocity;
if ((_local2 - dblGivenAngle) < _local3) {
_local3 = _local2 - dblGivenAngle;
}
} else {
_local3 = (-dblTurnSpeed) * dblVelocity;
if (_local2 < 0) {
if ((_local2 - dblGivenAngle) > _local3) {
_local3 = _local2 - dblGivenAngle;
}
}
}
}
return(_local3);
}
function Print() {
}
}
Symbol 771 MovieClip [__Packages.BubblefieldUnit] Frame 0
class BubblefieldUnit
{
var _position, _name, _linkage, _difficulty, _depth, _rotation, _formalName;
function BubblefieldUnit (givenName, givenLinkage, givenPos, givenDepth) {
_position = new Vector();
_name = givenName;
_linkage = givenLinkage;
_position._x = givenPos._x;
_position._y = givenPos._y;
_difficulty = 0;
_depth = givenDepth;
_rotation = 0;
_formalName = "";
}
}
Symbol 772 MovieClip [__Packages.DataObject] Frame 0
class DataObject
{
var arrElements, indexOne, indexTwo;
function DataObject () {
var _local3 = RandNum(55, 66);
arrElements = new Array(_local3);
var _local2 = 0;
while (_local2 < _local3) {
arrElements[_local2] = 0;
_local2++;
}
indexOne = -1;
indexTwo = -1;
}
function Set(dataValue) {
var _local6 = Math.round(Math.random() * dataValue);
var _local7 = dataValue - _local6;
indexOne = RandNum(0, arrElements.length - 4);
indexTwo = RandNum(0, arrElements.length - 4);
if (indexOne == indexTwo) {
if (indexOne == (arrElements.length - 1)) {
indexTwo = indexOne - 1;
} else {
indexTwo = indexOne + 1;
}
}
var _local5 = dataValue / (arrElements.length - 2);
var _local4 = dataValue;
var _local9 = arrElements.length;
var _local2 = 0;
while (_local2 < arrElements.length) {
if (_local2 == indexOne) {
arrElements[_local2] = _local6;
} else if (_local2 == indexTwo) {
arrElements[_local2] = _local7;
} else {
var _local3 = 0;
if (_local4 > 0) {
_local3 = Math.round((Math.random() * _local5) + (_local5 * 0.5));
if (_local3 > _local4) {
_local3 = _local4;
}
if (_local2 == (arrElements.length - 1)) {
_local3 = _local4;
}
_local4 = _local4 - _local3;
}
arrElements[_local2] = _local3;
}
_local2++;
}
}
function mSet(dataValue) {
var _local7 = 0;
while (_local7 < 10) {
var _local5 = Math.round(Math.random() * dataValue);
var _local8 = dataValue - _local5;
indexOne = RandNum(0, arrElements.length - 4);
indexTwo = RandNum(0, arrElements.length - 4);
if (indexOne == indexTwo) {
if (indexOne == (arrElements.length - 1)) {
indexTwo = indexOne - 1;
} else {
indexTwo = indexOne + 1;
}
}
var _local4 = dataValue / (arrElements.length - 2);
var _local10 = dataValue;
var _local9 = arrElements.length;
var _local2 = 0;
while (_local2 < arrElements.length) {
if (_local2 == indexOne) {
arrElements[_local2] = _local5;
} else if (_local2 == indexTwo) {
arrElements[_local2] = _local8;
} else {
var _local3 = 0;
_local3 = Math.round((Math.random() * (_local4 * 1.23)) + (_local4 * 0.75));
arrElements[_local2] = _local3;
}
_local2++;
}
if (Get() == -1) {
break;
}
_local7++;
}
}
function Get() {
var _local3 = 0;
var _local4 = 0;
var _local2 = 0;
while (_local2 < arrElements.length) {
if (_local2 == indexOne) {
_local3 = _local3 + arrElements[_local2];
} else if (_local2 == indexTwo) {
_local3 = _local3 + arrElements[_local2];
} else {
_local4 = _local4 + arrElements[_local2];
}
_local2++;
}
if (_local3 == _local4) {
return(_local3);
}
return(-1);
}
function Store() {
var _local2 = arrElements.slice();
_local2.splice(2, 0, indexOne);
_local2.splice(7, 0, indexTwo);
return(_local2);
}
function Load(originalArray) {
indexOne = originalArray[2];
indexTwo = originalArray[7];
delete arrElements;
arrElements = originalArray.slice();
arrElements.splice(7, 1);
arrElements.splice(2, 1);
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
}
Symbol 773 MovieClip [__Packages.SoundPlayer] Frame 0
class SoundPlayer
{
var channelsAvailable, channel1, channel2, channel3, channel4, channel5, channel6, channel7, externalSoundVolume;
function SoundPlayer () {
channelsAvailable = new Array(true, true, true, true, true, true, true);
channel1 = new Sound(_root.soundOneClip);
channel2 = new Sound(_root.soundTwoClip);
channel3 = new Sound(_root.soundThreeClip);
channel4 = new Sound(_root.soundFourClip);
channel5 = new Sound(_root.soundFiveClip);
channel6 = new Sound(_root.soundSixClip);
channel7 = new Sound(_root.soundSevenClip);
externalSoundVolume = 100;
}
function CleanSounds(intIndex) {
channelsAvailable[intIndex] = true;
}
function PlaySound(linkIdentifier) {
if (_global.soundOn == true) {
var thisRef = this;
if (channelsAvailable[0] == true) {
channelsAvailable[0] = false;
delete channel1;
channel1 = new Sound(_root.soundOneClip);
channel1.attachSound(linkIdentifier);
channel1.setVolume(100);
channel1.start(0, 0);
channel1.onSoundComplete = function () {
thisRef.CleanSounds(0);
};
} else if (channelsAvailable[1] == true) {
channelsAvailable[1] = false;
delete channel2;
channel2 = new Sound(_root.soundTwoClip);
channel2.attachSound(linkIdentifier);
channel2.setVolume(100);
channel2.start(0, 0);
channel2.onSoundComplete = function () {
thisRef.CleanSounds(1);
};
} else if (channelsAvailable[4] == true) {
channelsAvailable[4] = false;
delete channel5;
channel5 = new Sound(_root.soundFiveClip);
channel5.attachSound(linkIdentifier);
channel5.setVolume(100);
channel5.start(0, 0);
channel5.onSoundComplete = function () {
thisRef.CleanSounds(4);
};
} else if (channelsAvailable[5] == true) {
channelsAvailable[5] = false;
delete channel6;
channel6 = new Sound(_root.soundSixClip);
channel6.attachSound(linkIdentifier);
channel6.setVolume(100);
channel6.start(0, 0);
channel6.onSoundComplete = function () {
thisRef.CleanSounds(5);
};
} else {
channelsAvailable[0] = false;
delete channel1;
channel1 = new Sound(_root.soundOneClip);
channel1.attachSound(linkIdentifier);
channel1.setVolume(100);
channel1.start(0, 0);
channel1.onSoundComplete = function () {
thisRef.CleanSounds(0);
};
}
}
}
function PlayBubbleSound(linkIdentifier) {
if (_global.soundOn == true) {
var thisRef = this;
if (channelsAvailable[2] == true) {
channelsAvailable[2] = false;
delete channel3;
channel3 = new Sound(_root.soundThreeClip);
channel3.attachSound(linkIdentifier);
channel3.setVolume(100);
channel3.start(0, 0);
channel3.onSoundComplete = function () {
thisRef.CleanSounds(2);
};
} else if (channelsAvailable[3] == true) {
channelsAvailable[3] = false;
delete channel4;
channel4 = new Sound(_root.soundFourClip);
channel4.attachSound(linkIdentifier);
channel4.setVolume(80);
channel4.start(0, 0);
channel4.onSoundComplete = function () {
thisRef.CleanSounds(3);
};
} else if (channelsAvailable[6] == true) {
channelsAvailable[6] = false;
delete channel7;
channel7 = new Sound(_root.soundSevenClip);
channel7.attachSound(linkIdentifier);
channel7.setVolume(60);
channel7.start(0, 0);
channel7.onSoundComplete = function () {
thisRef.CleanSounds(6);
};
}
}
}
function PlayExternalSound(urlPath) {
var thisRef = this;
if (channelsAvailable[0] == true) {
channelsAvailable[0] = false;
delete channel1;
channel1 = new Sound();
channel1.loadSound(urlPath, false);
channel1.setVolume(externalSoundVolume);
channel1.onLoad = function (loadedOK) {
if (loadedOK) {
this.start();
}
};
channel1.onSoundComplete = function () {
thisRef.CleanSounds(0);
};
} else if (channelsAvailable[1] == true) {
channelsAvailable[1] = false;
delete channel2;
channel2 = new Sound();
channel2.loadSound(urlPath, false);
channel2.setVolume(externalSoundVolume);
channel2.onLoad = function (loadedOK) {
if (loadedOK) {
this.start();
}
};
channel2.onSoundComplete = function () {
thisRef.CleanSounds(1);
};
} else {
channelsAvailable[0] = false;
delete channel1;
channel1 = new Sound();
channel1.loadSound(urlPath, false);
channel1.setVolume(externalSoundVolume);
channel1.onLoad = function (loadedOK) {
if (loadedOK) {
this.start();
}
};
channel1.onSoundComplete = function () {
thisRef.CleanSounds(0);
};
}
}
}
Symbol 774 MovieClip [__Packages.Music] Frame 0
class Music
{
var mySound, volume, currentTrack, inCrossfade, state, changeSongs, maxVolume, targetVolume, volumeSpeed;
function Music () {
mySound = new Sound(_root.dynamicMusicClip);
volume = 100;
currentTrack = "";
inCrossfade = false;
state = false;
changeSongs = true;
maxVolume = 60;
}
function StartFastSound() {
currentTrack = "bossMain";
mySound.stop();
mySound.attachSound(currentTrack);
volume = maxVolume;
mySound.setVolume(volume);
mySound.start(0, 2000);
state = true;
}
function SetMaxVolume(vol) {
maxVolume = vol;
}
function SetTrack(setMusic) {
if (setMusic == currentTrack) {
changeSongs = false;
} else {
changeSongs = true;
currentTrack = setMusic;
}
}
function Play() {
mySound.stop();
mySound.attachSound(currentTrack);
volume = maxVolume;
mySound.setVolume(volume);
mySound.start(0, 2000);
state = true;
}
function Stop() {
mySound.stop();
state = false;
}
function PlayWithCrossFade(secondDuration) {
if (changeSongs == true) {
if (state == true) {
inCrossfade = true;
targetVolume = 0;
var _local2 = secondDuration * 30;
volumeSpeed = (targetVolume - volume) / (_local2 / 2);
} else {
mySound.stop();
mySound.attachSound(currentTrack);
if (currentTrack != "bossIntro") {
mySound.start(0, 2000);
} else {
mySound.start(0, 0);
var thisRef = this;
mySound.onSoundComplete = function () {
thisRef.StartFastSound();
};
}
state = true;
inCrossfade = false;
targetVolume = maxVolume;
volume = 0;
mySound.setVolume(0);
var _local2 = secondDuration * 30;
volumeSpeed = (targetVolume - volume) / _local2;
}
}
}
function RunPlayer() {
if (targetVolume != volume) {
var _local2;
_local2 = volume + volumeSpeed;
if ((volumeSpeed < 0) && (_local2 < 0)) {
_local2 = 0;
} else if ((volumeSpeed > 0) && (_local2 > targetVolume)) {
_local2 = targetVolume;
}
volume = _local2;
mySound.setVolume(_local2);
}
if (inCrossfade == true) {
var thisMusic = this;
if (volume <= 0) {
volumeSpeed = volumeSpeed * -1;
inCrossfade = false;
targetVolume = maxVolume;
mySound.stop();
mySound.attachSound(currentTrack);
mySound.setVolume(0);
if (currentTrack != "bossIntro") {
mySound.start(0, 2000);
} else {
mySound.start(0, 0);
mySound.onSoundComplete = function () {
thisMusic.StartFastSound();
};
}
state = true;
}
}
}
}
Symbol 775 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends MovieClip
{
var _type, blnBossHead, gunFlagOne, gunFlagTwo, guns, arrEvents, arrSeekers, haltMovie, safetyTurn, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, setToFrame2, enemyOff, countMachineGun, mGunCount, stunCounter, stickyCounter, strStickyRef, intInfectedCounter, strInfectedRef, blnInfected, intInfectMax, blnInfectImmune, maxLife, numLife, gotoAndStop, numLastAngle, _rotation, _x, _y, _name, okStop, isItTime, customFunction1, removeMovieClip, _width;
function Enemy () {
super();
_type = 1;
blnBossHead = false;
gunFlagOne = true;
gunFlagTwo = true;
guns = new Array();
arrEvents = new Array();
arrSeekers = new Array();
haltMovie = false;
safetyTurn = false;
numSpeed = 0.25;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
setToFrame2 = false;
enemyOff = false;
countMachineGun = 0;
mGunCount = 0;
stunCounter = 0;
stickyCounter = 0;
strStickyRef = "";
intInfectedCounter = 0;
strInfectedRef = "";
blnInfected = false;
intInfectMax = 13;
blnInfectImmune = false;
ConfigureEnemy();
maxLife = numLife;
gotoAndStop(numLife);
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 10)});
}
function onEnterFrame() {
if (!enemyOff) {
if (stunCounter <= 0) {
if (stickyCounter <= 0) {
mGunDelay();
if (haltMovie == false) {
numLastAngle = GetAnglePos();
if (blnBossHead == true) {
TurnHead();
} else {
MoveMe();
}
var _local5 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local5 == true) && (safetyTurn == false))) {
if (_local5 == true) {
var _local4 = GetAnglePos();
if (_local4 < 0) {
if (_local4 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local4 > numLastAngle) {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
} else {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
}
numFramesToTurn = Math.round(Math.abs(numAmountToTurn) / numSpeed);
numAmountToTurn = numSpeed * (numAmountToTurn / Math.abs(numAmountToTurn));
minFramesToHoldTurning = 90;
safetyTurn = true;
}
} else {
numFramesToTurn--;
_rotation = _rotation + numAmountToTurn;
}
}
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else if (numFramesToTurn == 0) {
var _local3 = Math.round(Math.random() * 1000);
if (_local3 < 20) {
_local3 = Math.round(Math.random() * 200) - 100;
numFramesToTurn = Math.round(Math.abs(_local3) / numSpeed);
numAmountToTurn = numSpeed * (_local3 / Math.abs(_local3));
safetyTurn = false;
}
}
} else {
stickyCounter--;
}
if (_root.game.SafeToFire() == true) {
OperateWeapons();
}
} else if (stunCounter > 0) {
stunCounter--;
}
if (blnInfected == true) {
if (intInfectedCounter == 0) {
ReceiveDamage(1, "");
intInfectedCounter = intInfectMax;
}
intInfectedCounter--;
}
}
}
function TurnHead() {
var _local3 = new Vector();
_local3._x = _root.avatar._x - _x;
_local3._y = _root.avatar._y - _y;
var _local4 = _local3.AngleToAlign(_rotation, 1, 1);
_rotation = _rotation + _local4;
if (_rotation < 60) {
_rotation = 60;
}
if (_rotation > 120) {
_rotation = 120;
}
}
function Stun(amountTime) {
stunCounter = amountTime;
}
function Sticky(amountTime) {
stickyCounter = amountTime;
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 2) {
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.SpawnUnit("Enemy_Seeker", posVector, _name);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 3) {
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.SpawnUnit("Enemy_2", posVector, _name);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 4) {
if (guns[i].counter < 1) {
if (GetDistance2Avatar() <= guns[i].size) {
_root.ReportAvatarDamage(guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
}
} else {
guns[i].counter--;
}
} else if (guns[i].type == 5) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 6) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 30, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 7) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter4");
var pointFive = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFive);
posVector._x = pointFive.x;
posVector._y = pointFive.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter5");
var pointSix = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointSix);
posVector._x = pointSix.x;
posVector._y = pointSix.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 8) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 60, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter4");
var pointFive = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFive);
posVector._x = pointFive.x;
posVector._y = pointFive.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter5");
var pointSix = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointSix);
posVector._x = pointSix.x;
posVector._y = pointSix.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 60, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 9) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 60, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter4");
var pointFive = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFive);
posVector._x = pointFive.x;
posVector._y = pointFive.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter5");
var pointSix = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointSix);
posVector._x = pointSix.x;
posVector._y = pointSix.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 60, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter6");
var pointSeven = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointSeven);
posVector._x = pointSeven.x;
posVector._y = pointSeven.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 90, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter7");
var pointEight = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointEight);
posVector._x = pointEight.x;
posVector._y = pointEight.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 120, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter8");
var pointNine = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointNine);
posVector._x = pointNine.x;
posVector._y = pointNine.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 150, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter9");
var pointTen = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTen);
posVector._x = pointTen.x;
posVector._y = pointTen.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 180, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter10");
var pointEleven = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointEleven);
posVector._x = pointEleven.x;
posVector._y = pointEleven.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 210, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 10) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShootSpecial("mine", posVector, 0, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 11) {
if (DoesSeekerExist(guns[i].name) == false) {
if (guns[i].counter < 1) {
var spawnedName = "";
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
spawnedName = _root.SpawnUnit("Enemy_Orbital_Seeker", posVector, _name);
arrSeekers.push({name:spawnedName, from:guns[i].name});
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 12) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShootSpecial("sticky", posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 13) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
okStop = false;
if (isItTime) {
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 14) {
if (DoesSeekerExist(guns[i].name) == false) {
if (guns[i].counter < 1) {
var spawnedName = "";
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
spawnedName = _root.SpawnUnit("Enemy_Sapper", posVector, _name);
arrSeekers.push({name:spawnedName, from:guns[i].name});
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 15) {
} else if (guns[i].type == 16) {
if (DoesSeekerExist(guns[i].name) == false) {
if (guns[i].counter < 1) {
var spawnedName = "";
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
spawnedName = _root.SpawnUnit("Enemy_Leecher", posVector, _name);
arrSeekers.push({name:spawnedName, from:guns[i].name});
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 17) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
okStop = false;
if (isItTime) {
} else {
ObjRef.gotoAndPlay(1);
}
if (isItTime) {
if (guns[i].counter < 1) {
ObjRef._rotation = ObjRef._rotation + 5;
if (isItTime) {
if (setToFrame2) {
} else {
ObjRef.gotoAndPlay(2);
setToFrame2 = true;
}
} else {
ObjRef.gotoAndPlay(1);
}
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 18) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
okStop = false;
if (isItTime) {
} else {
ObjRef.gotoAndPlay(1);
}
if (isItTime) {
if (guns[i].counter < 1) {
ObjRef._rotation = ObjRef._rotation + 20;
if (isItTime) {
if (setToFrame2) {
} else {
ObjRef.gotoAndPlay(2);
setToFrame2 = true;
}
} else {
ObjRef.gotoAndPlay(1);
}
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 19) {
if (DoesSeekerExist(guns[i].name) == false) {
if (guns[i].counter < 1) {
var spawnedName = "";
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
spawnedName = _root.SpawnUnit("Enemy_Health_Leecher", posVector, _name);
arrSeekers.push({name:spawnedName, from:guns[i].name});
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 20) {
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.SpawnUnit("Enemy_96", posVector, _name);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
i++;
}
}
function mGunDelay() {
mGunCount++;
if (mGunCount > 150) {
isItTime = true;
if (mGunCount > 250) {
isItTime = false;
mGunCount = 0;
}
} else {
setToFrame2 = false;
isItTime = false;
}
}
function ReportLifeIncrease(amountLife) {
numLife = numLife + amountLife;
if (numLife > maxLife) {
numLife = maxLife;
}
gotoAndStop(numLife);
}
function ReceiveDamage(amountDamage, bulletName) {
var returnValue = false;
numLife = numLife - amountDamage;
var i = 0;
while (i < arrEvents.length) {
if (((numLife <= arrEvents[i].triggerValue) && (arrEvents[i].hit == false)) || (arrEvents[i].triggerValue == -1)) {
arrEvents[i].hit = true;
if (arrEvents[i].custom == true) {
customFunction1 = arrEvents[i].action;
customFunction1();
} else {
if (arrEvents[i].action == "EVENT_Bubbles") {
var bubbleVector = new Vector();
bubbleVector._x = _x;
bubbleVector._y = _y;
_root.game.DropPickupBubbles(arrEvents[i].values[0], bubbleVector, arrEvents[i].values[1], 1);
}
if (arrEvents[i].action == "EVENT_Bubbles_Large") {
var bubbleVector = new Vector();
bubbleVector._x = _x;
bubbleVector._y = _y;
_root.game.DropPickupBubbles(arrEvents[i].values[0], bubbleVector, arrEvents[i].values[1], 2);
}
if (arrEvents[i].action == "EVENT_Bubbles_Ultra") {
var bubbleVector = new Vector();
bubbleVector._x = _x;
bubbleVector._y = _y;
_root.game.DropPickupBubbles(arrEvents[i].values[0], bubbleVector, arrEvents[i].values[1], 3);
} else if (arrEvents[i].action == "EVENT_DropGun") {
RemoveGun(arrEvents[i].values);
} else if (arrEvents[i].action == "EVENT_SpeedChange") {
numSpeed = arrEvents[i].values;
} else if (arrEvents[i].action == "EVENT_Spawn") {
var myPos = new Vector();
myPos._x = _x;
myPos._y = _y;
var t = 0;
while (t < arrEvents[i].values[1]) {
_root.SpawnUnit(arrEvents[i].values[0], myPos, _name);
t++;
}
} else if (arrEvents[i].action == "EVENT_SeekersDie") {
var t = 0;
while (t < arrSeekers.length) {
_root[arrSeekers[t].name].Terminate();
t++;
}
}
}
}
i++;
}
if (bulletName != "") {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 15) {
if (guns[i].damage == 0) {
var ObjRef = eval ("this." + guns[i].name);
if (ObjRef.hitTest(_root[bulletName]._x, _root[bulletName]._y, true)) {
ObjRef.inside.gotoAndPlay("hit");
var posVector = new Vector();
var ObjRefTwo = eval ("this." + guns[i].name);
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo._parent.localToGlobal(pointTwo);
var s = 0;
while (s < 8) {
var theta = Math.round(Math.random() * 360);
var R = Math.round(Math.random() * (ObjRefTwo._width - 15));
posVector._x = (R * Math.cos(theta)) + pointTwo.x;
posVector._y = (R * Math.sin(theta)) + pointTwo.y;
_root.SpawnUnit("Enemy_Seeker", posVector, _name);
s++;
}
guns[i].damage = 1;
}
}
}
i++;
}
if (_root[bulletName]._type == 3) {
Sticky(120);
strStickyRef = _root.game.Effect_Sticky(_x, _y);
}
}
if (numLife < 1) {
if (blnInfected == true) {
_root.game.Gun_SpawnInfectors(_x, _y, RandNum(1, 3));
}
if (strStickyRef != "") {
_root.game.RemoveEffect(strStickyRef);
}
if (strInfectedRef != "") {
_root.game.RemoveEffect(strInfectedRef);
}
returnValue = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(returnValue);
}
function ReportSeekerDeath(strName) {
var _local2 = 0;
while (_local2 < arrSeekers.length) {
if (strName == arrSeekers[_local2].name) {
arrSeekers.splice(_local2, 1);
break;
}
_local2++;
}
}
function DoesSeekerExist(gunName) {
var _local3 = false;
var _local2 = 0;
while (_local2 < arrSeekers.length) {
if (gunName == arrSeekers[_local2].from) {
_local3 = true;
break;
}
_local2++;
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Avatar() {
var _local4 = _x - _root.avatar._x;
var _local3 = _y - _root.avatar._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
function PredictTargetLocation(intDistance, intSpeed) {
var _local2 = {x:0, y:0};
if ((stunCounter <= 0) && (stickyCounter <= 0)) {
var _local3 = intDistance / intSpeed;
_local2.x = Math.cos((Math.PI * _rotation) / 180) * numSpeed;
_local2.y = Math.sin((Math.PI * _rotation) / 180) * numSpeed;
_local2.x = _local2.x * _local3;
_local2.y = _local2.y * _local3;
}
_local2.x = _local2.x + _x;
_local2.y = _local2.y + _y;
return(_local2);
}
function Infect() {
if (blnInfectImmune == false) {
if (blnInfected == false) {
var _local4 = new flash.geom.Transform(this);
var _local3 = new flash.geom.ColorTransform(1, 1, 1, 1, 150, -40, -60, 0);
_local4.colorTransform = _local3;
strInfectedRef = _root.game.Effect_Infect(_x, _y, _name);
blnInfected = true;
intInfectedCounter = intInfectMax;
}
}
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
}
Symbol 776 MovieClip [__Packages.Enemy_1] Frame 0
class Enemy_1 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_1 () {
super();
}
function ConfigureEnemy() {
numLife = 2;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 10)});
arrEvents.push({name:"Enemy Hit", triggerValue:-1, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(1, 0)});
}
}
Symbol 777 MovieClip [__Packages.Bullet] Frame 0
class Bullet extends MovieClip
{
var moveX, moveY, _damage, _holdMovement, _type, halfX, _x, halfY, _y, arrEnemiesImmune, starBurstTimer, removeCallback, _name, removeMovieClip, arrBusted;
function Bullet () {
super();
moveX = 0;
moveY = 0;
_damage = 1;
_holdMovement = false;
_type = 1;
halfX = _x;
halfY = _y;
arrEnemiesImmune = new Array();
starBurstTimer = 45;
}
function SetMovement(myX, myY) {
moveX = myX;
moveY = myY;
}
function onEnterFrame() {
if (_holdMovement == false) {
halfX = _x + (moveX / 2);
halfY = _y + (moveY / 2);
_x = _x + moveX;
_y = _y + moveY;
if (GetDistance() > (_root.bg.inside._width / 2)) {
if (_type == 7) {
_root.game.SmallDamageBurst(_x, _y);
} else if (_type == 8) {
CleanupBusted();
}
removeCallback(_name);
removeMovieClip();
}
if (_type == 4) {
if (starBurstTimer > 0) {
starBurstTimer--;
} else {
PerformStarBurst();
}
}
}
}
function EventHitEnemy(enemyName) {
if (_type == 5) {
_root.game.DamageBurst(_x, _y, 10);
} else if (_type == 6) {
_root.game.SmallDamageBurst(_x, _y);
} else if (_type == 7) {
_root.game.SmallDamageBurst(_x, _y);
} else if (_type == 9) {
var _local3 = new Vector();
_local3._x = _x;
_local3._y = _y;
_root.game.LeachPickupBubbles(_local3);
_root.game.Effect_Leech(_x, _y);
}
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AddImmunity(strName) {
arrEnemiesImmune.push(strName);
}
function GetImmune(strEnemyName) {
var _local2 = 0;
while (_local2 < arrEnemiesImmune.length) {
if (arrEnemiesImmune[_local2] == strEnemyName) {
return(true);
}
_local2++;
}
return(false);
}
function PerformStarBurst() {
var _local3 = 0;
while (_local3 < 360) {
_root.game.SpawnStartBurstShard(_x, _y, _local3);
_local3 = _local3 + 10;
}
removeCallback(_name);
removeMovieClip();
}
function AddBusted(strBulletName) {
arrBusted.push(strBulletName);
_root[strBulletName].SetMovement(moveX, moveY);
_root[strBulletName].removeCallback = undefined;
}
function PauseUnPauseBusted(blnPause) {
var _local3 = 0;
while (_local3 < arrBusted.length) {
_root[arrBusted[_local3]]._holdMovement = blnPause;
_local3++;
}
}
function CleanupBusted() {
var _local3 = 0;
while (_local3 < arrBusted.length) {
_root[arrBusted[_local3]].removeMovieClip();
_local3++;
}
}
function MoveBusted(vecMoveThis) {
var _local3 = 0;
while (_local3 < arrBusted.length) {
_root[arrBusted[_local3]]._x = _root[arrBusted[_local3]]._x + vecMoveThis._x;
_root[arrBusted[_local3]]._y = _root[arrBusted[_local3]]._y + vecMoveThis._y;
_local3++;
}
}
}
Symbol 778 MovieClip [__Packages.PickupBubble] Frame 0
class PickupBubble extends MovieClip
{
var moveX, moveY, _type, _amount, _x, _y, removeMovieClip;
function PickupBubble () {
super();
moveX = 0;
moveY = 0;
_type = 1;
_amount = 1;
ConfigureBubble();
}
function ConfigureBubble() {
_amount = 1;
}
function SetMovement(myX, myY) {
moveX = myX;
moveY = myY;
}
function onEnterFrame() {
if ((moveX != 0) || (moveY != 0)) {
_x = _x + moveX;
_y = _y + moveY;
moveX = 0.9 * moveX;
moveY = 0.9 * moveY;
if (Math.abs(moveX) < 0.3) {
moveX = 0;
}
if (Math.abs(moveY) < 0.3) {
moveY = 0;
}
if (GetDistance() > (_root.bg.inside._width / 2)) {
removeMovieClip();
}
}
}
function DetermineRandomMovement(myPower) {
var _local4 = Math.round((Math.random() * myPower) * 2) - myPower;
var _local3 = Math.round((Math.random() * myPower) * 2) - myPower;
moveX = _local4;
moveY = _local3;
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
}
Symbol 779 MovieClip [__Packages.PickupBubble_Ultra] Frame 0
class PickupBubble_Ultra extends PickupBubble
{
var _amount;
function PickupBubble_Ultra () {
super();
}
function ConfigureBubble() {
_amount = 50;
}
}
Symbol 780 MovieClip [__Packages.PickupBubble_Medium] Frame 0
class PickupBubble_Medium extends PickupBubble
{
var _amount;
function PickupBubble_Medium () {
super();
}
function ConfigureBubble() {
_amount = 5;
}
}
Symbol 781 MovieClip [__Packages.DisassembledBubble] Frame 0
class DisassembledBubble extends MovieClip
{
var _id, _name, _holdMovement, _followDelay, intMaxSpeed, _isReady, intFollowCounter, _x, intTargetX, _y, intTargetY;
function DisassembledBubble () {
super();
_id = Number(substring(_name, 0, _name.length - 3));
_holdMovement = false;
_followDelay = 0;
intMaxSpeed = RandNum(6, 10);
_isReady = true;
}
function onEnterFrame() {
UpdateTarget();
if (_holdMovement == false) {
if (intFollowCounter < 1) {
var _local3 = new Vector();
_local3._x = intTargetX - _x;
_local3._y = intTargetY - _y;
var _local2 = _local3.GetLength();
if (_local2 <= 4) {
_isReady = true;
} else {
_isReady = false;
}
if (_local2 <= 1) {
_x = intTargetX;
_y = intTargetY;
intFollowCounter = _followDelay;
} else {
_local2 = _local2 / 6;
if (_local2 > intMaxSpeed) {
_local2 = intMaxSpeed;
}
_local3.ConvertToUnitVector();
_local3.Scale(_local2);
_x = _x + _local3._x;
_y = _y + _local3._y;
}
} else {
intFollowCounter--;
}
}
}
function SetCounter(argAmount) {
intFollowCounter = (_followDelay = argAmount);
}
function ForceStop() {
intFollowCounter = 0;
}
function UpdateTarget() {
var targetClip = eval (("_root.avatar.gun." + _id) + "_reg");
var point = {x:targetClip._x, y:targetClip._y};
_root.avatar.gun.localToGlobal(point);
var vecStart = new Vector();
intTargetX = point.x;
intTargetY = point.y;
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
}
Symbol 782 MovieClip [__Packages.MenuBubbles] Frame 0
class MenuBubbles extends MovieClip
{
var _deltaX, _deltaY, _xscale, _yscale, _x, _y, _height, removeMovieClip;
function MenuBubbles () {
super();
_deltaX = 0;
_deltaY = -1 * ((Math.random() * 3) + 2);
_xscale = (Math.random() * 50) + 75;
_yscale = _xscale;
var _local3 = Math.random() * 500;
_x = _local3;
_y = 420;
}
function onEnterFrame() {
_y = _y + _deltaY;
if ((_y + (_height / 2)) < 0) {
removeMovieClip();
}
}
}
Symbol 783 MovieClip [__Packages.Enemy_2] Frame 0
class Enemy_2 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_2 () {
super();
}
function ConfigureEnemy() {
numLife = 5;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 10)});
arrEvents.push({name:"Enemy Hit", triggerValue:-1, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(1, 0)});
guns.push({name:"gun_1", type:1, fireTimerMax:80, fireTimerMin:40, counter:60, speed:6, size:100, damage:1});
}
}
Symbol 784 MovieClip [__Packages.Enemy_4] Frame 0
class Enemy_4 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_4 () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 0.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(1, 3)});
}
}
Symbol 785 MovieClip [__Packages.Enemy_76] Frame 0
class Enemy_76 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_76 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(6, 8)});
guns.push({name:"gun_1", type:12, fireTimerMax:120, fireTimerMin:80, counter:100, speed:6, size:100, damage:0});
}
}
Symbol 786 MovieClip [__Packages.Enemy_3] Frame 0
class Enemy_3 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_3 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(3, 8)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(1, 5)});
guns.push({name:"gun_1", type:1, fireTimerMax:120, fireTimerMin:80, counter:100, speed:3, size:300, damage:4});
}
}
Symbol 787 MovieClip [__Packages.Enemy_5] Frame 0
class Enemy_5 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_5 () {
super();
}
function ConfigureEnemy() {
numLife = 10;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 10)});
arrEvents.push({name:"Drops Gun", triggerValue:3, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_1"});
arrEvents.push({name:"Increase Speed", triggerValue:3, hit:false, custom:false, action:"EVENT_SpeedChange", values:5});
guns.push({name:"gun_1", type:1, fireTimerMax:60, fireTimerMin:40, counter:60, speed:7, size:100, damage:1});
}
}
Symbol 788 MovieClip [__Packages.Enemy_6] Frame 0
class Enemy_6 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_6 () {
super();
}
function ConfigureEnemy() {
numLife = 25;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(3, 16)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(1, 5)});
arrEvents.push({name:"Drops Gun", triggerValue:6, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_1"});
guns.push({name:"gun_1", type:1, fireTimerMax:60, fireTimerMin:40, counter:60, speed:5, size:120, damage:1});
guns.push({name:"gun_2", type:1, fireTimerMax:60, fireTimerMin:40, counter:60, speed:5, size:120, damage:1});
}
}
Symbol 789 MovieClip [__Packages.Enemy_7] Frame 0
class Enemy_7 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_7 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(3, 6)});
arrEvents.push({name:"Drops Gun", triggerValue:19, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_2"});
arrEvents.push({name:"Enemy Split", triggerValue:19, hit:false, custom:false, action:"EVENT_Spawn", values:Array("Enemy_8", 1)});
guns.push({name:"gun_1", type:1, fireTimerMax:60, fireTimerMin:40, counter:60, speed:5, size:100, damage:2});
guns.push({name:"gun_2", type:1, fireTimerMax:60, fireTimerMin:40, counter:80, speed:5, size:100, damage:2});
}
}
Symbol 790 MovieClip [__Packages.Enemy_8] Frame 0
class Enemy_8 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_8 () {
super();
}
function ConfigureEnemy() {
numLife = 19;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(3, 6)});
guns.push({name:"gun_1", type:1, fireTimerMax:60, fireTimerMin:40, counter:60, speed:5, size:100, damage:2});
}
}
Symbol 791 MovieClip [__Packages.Ally_Orbital_Seeker] Frame 0
class Ally_Orbital_Seeker extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, enemyOff, _damage, _currentTarget, intLastCheckTarget, intState, _type, rotateAngle, rotateSpeed, intStoreWidth, numLastAngle, _rotation, _x, _y, _name, removeMovieClip, gotoAndStop, _width;
function Ally_Orbital_Seeker () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 5;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
enemyOff = false;
_damage = 0;
_currentTarget = "";
intLastCheckTarget = 0;
intState = 2;
_type = 2;
rotateAngle = 0;
rotateSpeed = 0.1;
intStoreWidth = _root.avatar._width / 1.75;
}
function onEnterFrame() {
if (!enemyOff) {
if (flagExplode == false) {
if (intState == 3) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local5 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local5 == true) && (safetyTurn == false))) {
if (_local5 == true) {
var _local4 = GetAnglePos();
if (_local4 < 0) {
if (_local4 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local4 > numLastAngle) {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
} else {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
}
numFramesToTurn = Math.round(Math.abs(numAmountToTurn) / 2);
numAmountToTurn = 2 * (numAmountToTurn / Math.abs(numAmountToTurn));
minFramesToHoldTurning = 90;
safetyTurn = true;
}
} else {
numFramesToTurn--;
_rotation = _rotation + numAmountToTurn;
}
}
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else {
if (intLastCheckTarget == 0) {
_currentTarget = _root.game.GetNearestEnemy(_x, _y);
intLastCheckTarget = 20;
} else {
intLastCheckTarget--;
}
if (_currentTarget == "") {
SelfDestruct();
}
if (_root[_currentTarget]._name == undefined) {
SelfDestruct();
}
var _local3 = new Vector();
_local3._x = _root[_currentTarget]._x - _x;
_local3._y = _root[_currentTarget]._y - _y;
_rotation = _local3.GetAngle();
}
if (_root[_currentTarget].hitTest(_x, _y, true) == true) {
_root[_currentTarget].ReceiveDamage(_damage, _name);
_root.game.Effect_SeekerExplosion(_x, _y);
_root.game.ReportSeekerDead(_name);
removeMovieClip();
}
} else if (intState == 2) {
var _local6 = intStoreWidth + 2;
var _local8 = (_local6 * Math.cos(rotateAngle)) + _root.avatar._x;
var _local7 = (_local6 * Math.sin(rotateAngle)) + _root.avatar._y;
rotateAngle = rotateAngle + rotateSpeed;
if (rotateAngle > 360) {
rotateAngle = 0;
}
_x = _local8;
_y = _local7;
_rotation = _root.avatar._rotation;
if (intLastCheckTarget == 0) {
_currentTarget = _root.game.GetNearestEnemy(_x, _y);
intLastCheckTarget = 15;
} else {
intLastCheckTarget--;
}
if (_currentTarget != "") {
if (_root[_currentTarget]._name != undefined) {
if (GetDistance2Target() <= 85) {
intState = 3;
}
}
}
}
}
}
}
function SelfDestruct() {
_root.game.Effect_SeekerExplosion(_x, _y);
_root.game.ReportSeekerDead(_name);
removeMovieClip();
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
ObjRef.localToGlobal(point);
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
i++;
}
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Target() {
var _local4 = _x - _root[_currentTarget]._x;
var _local3 = _y - _root[_currentTarget]._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 792 MovieClip [__Packages.Ally_Mitosis] Frame 0
class Ally_Mitosis extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, enemyOff, _damage, _currentTarget, intLastCheckTarget, intWanderCounter, intState, _type, intRound, rotateAngle, rotateSpeed, intStoreWidth, _rotation, numLastAngle, _x, _y, _xscale, _yscale, _name, removeMovieClip, gotoAndStop, _width;
function Ally_Mitosis () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 4;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
enemyOff = false;
_damage = 0;
_currentTarget = "";
intLastCheckTarget = 0;
intWanderCounter = 20;
intState = 2;
_type = 4;
intRound = 4;
rotateAngle = 0;
rotateSpeed = 0.1;
intStoreWidth = _root.avatar._width / 1.75;
_rotation = RandNum(0, 360);
}
function onEnterFrame() {
if (!enemyOff) {
if (flagExplode == false) {
if ((intState == 3) || (intState == 2)) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local6 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local6 == true) && (safetyTurn == false))) {
if (_local6 == true) {
var _local5 = GetAnglePos();
if (_local5 < 0) {
if (_local5 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local5 > numLastAngle) {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
} else {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
}
numFramesToTurn = Math.round(Math.abs(numAmountToTurn) / numSpeed);
numAmountToTurn = numSpeed * (numAmountToTurn / Math.abs(numAmountToTurn));
minFramesToHoldTurning = 90;
safetyTurn = true;
}
} else {
numFramesToTurn--;
_rotation = _rotation + numAmountToTurn;
}
}
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else if (intState == 3) {
if (intLastCheckTarget == 0) {
_currentTarget = _root.game.GetNearestEnemy(_x, _y);
intLastCheckTarget = 20;
} else {
intLastCheckTarget--;
}
if (_currentTarget == "") {
SelfDestruct();
}
if (_root[_currentTarget]._name == undefined) {
SelfDestruct();
}
var _local3 = new Vector();
_local3._x = _root[_currentTarget]._x - _x;
_local3._y = _root[_currentTarget]._y - _y;
_rotation = _local3.GetAngle();
} else if (intState == 2) {
intWanderCounter--;
if (intWanderCounter == 0) {
intState = 3;
if (intRound > 0) {
intState = 2;
intWanderCounter = 20;
intRound--;
var _local4 = _root.game.SpawnMitosis(_x, _y, intRound);
_root[_local4]._rotation = RandNum(0, 360);
_rotation = _root[_local4]._rotation + 180;
_xscale = (_yscale = _root[_local4]._xscale);
}
}
}
if (_root[_currentTarget].hitTest(_x, _y, true) == true) {
_root[_currentTarget].ReceiveDamage(_damage, _name);
_root.game.Effect_SeekerExplosion(_x, _y);
_root.game.ReportSeekerDead(_name);
removeMovieClip();
}
}
}
}
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function SelfDestruct() {
_root.game.Effect_SeekerExplosion(_x, _y);
_root.game.ReportSeekerDead(_name);
removeMovieClip();
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
ObjRef.localToGlobal(point);
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
i++;
}
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Target() {
var _local4 = _x - _root[_currentTarget]._x;
var _local3 = _y - _root[_currentTarget]._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 793 MovieClip [__Packages.Ally_Seeker] Frame 0
class Ally_Seeker extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, enemyOff, _damage, _currentTarget, intLastCheckTarget, _type, numLastAngle, _rotation, _x, _y, _name, removeMovieClip, gotoAndStop, _width;
function Ally_Seeker () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 5;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
enemyOff = false;
_damage = 0;
_currentTarget = "";
intLastCheckTarget = 0;
_type = 1;
}
function onEnterFrame() {
if (!enemyOff) {
if (flagExplode == false) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local5 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local5 == true) && (safetyTurn == false))) {
if (_local5 == true) {
var _local4 = GetAnglePos();
if (_local4 < 0) {
if (_local4 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local4 > numLastAngle) {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
} else {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
}
numFramesToTurn = Math.round(Math.abs(numAmountToTurn) / numSpeed);
numAmountToTurn = numSpeed * (numAmountToTurn / Math.abs(numAmountToTurn));
minFramesToHoldTurning = 90;
safetyTurn = true;
}
} else {
numFramesToTurn--;
_rotation = _rotation + numAmountToTurn;
}
}
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else {
if (intLastCheckTarget == 0) {
_currentTarget = _root.game.GetNearestEnemy(_x, _y);
intLastCheckTarget = 15;
} else {
intLastCheckTarget--;
}
if (_currentTarget == "") {
SelfDestruct();
}
var _local3 = new Vector();
_local3._x = _root[_currentTarget]._x - _x;
_local3._y = _root[_currentTarget]._y - _y;
var _local6 = Math.atan2(_local3._y, _local3._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_rotation = _local7;
}
if (_root[_currentTarget].hitTest(_x, _y, true) == true) {
_root[_currentTarget].ReceiveDamage(_damage, _name);
_root.game.Effect_SeekerExplosion(_x, _y);
_root.game.ReportSeekerDead(_name);
removeMovieClip();
}
}
}
}
function SelfDestruct() {
_root.game.Effect_SeekerExplosion(_x, _y);
_root.game.ReportSeekerDead(_name);
removeMovieClip();
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
ObjRef.localToGlobal(point);
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
i++;
}
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Avatar() {
var _local4 = _x - _root.avatar._x;
var _local3 = _y - _root.avatar._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 794 MovieClip [__Packages.Enemy_Seeker] Frame 0
class Enemy_Seeker extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, enemyOff, _type, blnVoid, numLastAngle, _rotation, _x, _y, _name, removeMovieClip, gotoAndStop, _width;
function Enemy_Seeker () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 2.5;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
enemyOff = false;
_type = 2;
blnVoid = false;
}
function onEnterFrame() {
if (!enemyOff) {
if (flagExplode == false) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local5 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local5 == true) && (safetyTurn == false))) {
if (_local5 == true) {
var _local4 = GetAnglePos();
if (_local4 < 0) {
if (_local4 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local4 > numLastAngle) {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
} else {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
}
numFramesToTurn = Math.round(Math.abs(numAmountToTurn) / 2);
numAmountToTurn = 2 * (numAmountToTurn / Math.abs(numAmountToTurn));
minFramesToHoldTurning = 90;
safetyTurn = true;
}
} else {
numFramesToTurn--;
_rotation = _rotation + numAmountToTurn;
}
}
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else {
var _local3 = new Vector();
_local3._x = _root.avatar._x - _x;
_local3._y = _root.avatar._y - _y;
var _local6 = Math.atan2(_local3._y, _local3._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_rotation = _local7;
}
if (_root.game.intAssembledState == 0) {
if (GetDistance2Avatar() <= 35) {
gotoAndPlay(2);
flagExplode = true;
}
}
}
}
}
function Explode() {
gotoAndPlay(2);
flagExplode = true;
}
function Terminate() {
blnVoid = true;
Explode();
}
function KillMe() {
if (blnVoid == false) {
_root.ReportAvatarDamage(8);
}
_root.ReportDeath(_name);
removeMovieClip();
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
ObjRef.localToGlobal(point);
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
i++;
}
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Avatar() {
var _local4 = _x - _root.avatar._x;
var _local3 = _y - _root.avatar._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 795 MovieClip [__Packages.Enemy_9] Frame 0
class Enemy_9 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_9 () {
super();
}
function ConfigureEnemy() {
numLife = 40;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(6, 6)});
guns.push({name:"gun_1", type:2, fireTimerMax:140, fireTimerMin:100, counter:100, speed:5, size:100, damage:1});
}
}
Symbol 796 MovieClip [__Packages.Enemy_59] Frame 0
class Enemy_59 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_59 () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(50, 2)});
}
}
Symbol 797 MovieClip [__Packages.Enemy_10] Frame 0
class Enemy_10 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_10 () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 0.5;
arrEvents.push({name:"Enemy Split", triggerValue:19, hit:false, custom:false, action:"EVENT_Spawn", values:Array("Enemy_1", 10)});
}
}
Symbol 798 MovieClip [__Packages.Enemy_11] Frame 0
class Enemy_11 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_11 () {
super();
}
function ConfigureEnemy() {
numLife = 125;
numSpeed = 1.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(4, 16)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(3, 5)});
arrEvents.push({name:"Drops Gun", triggerValue:69, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_1"});
arrEvents.push({name:"Decrease Speed", triggerValue:69, hit:false, custom:false, action:"EVENT_SpeedChange", values:0.5});
guns.push({name:"gun_1", type:1, fireTimerMax:60, fireTimerMin:40, counter:50, speed:6, size:100, damage:3});
guns.push({name:"gun_2", type:1, fireTimerMax:140, fireTimerMin:100, counter:120, speed:3, size:300, damage:7});
}
}
Symbol 799 MovieClip [__Packages.Enemy_86] Frame 0
class Enemy_86 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_86 () {
super();
}
function ConfigureEnemy() {
numLife = 120;
numSpeed = 0.25;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(6, 12)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Ultra", values:Array(1, 5)});
arrEvents.push({name:"Drops Gun", triggerValue:30, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_2"});
arrEvents.push({name:"Drops Gun", triggerValue:30, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_3"});
guns.push({name:"gun_1", type:3, fireTimerMax:400, fireTimerMin:600, counter:60, speed:6, size:100, damage:1});
guns.push({name:"gun_2", type:6, fireTimerMax:70, fireTimerMin:50, counter:60, speed:6, size:100, damage:1});
guns.push({name:"gun_3", type:6, fireTimerMax:70, fireTimerMin:50, counter:60, speed:6, size:100, damage:1});
guns.push({name:"gun_4", type:15, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:100, damage:0});
guns.push({name:"gun_5", type:15, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:100, damage:0});
guns.push({name:"gun_6", type:15, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:100, damage:0});
guns.push({name:"gun_7", type:15, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:100, damage:0});
guns.push({name:"gun_8", type:15, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:100, damage:0});
}
}
Symbol 800 MovieClip [__Packages.Enemy_12] Frame 0
class Enemy_12 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_12 () {
super();
}
function ConfigureEnemy() {
numLife = 120;
numSpeed = 0.25;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(4, 8)});
guns.push({name:"gun_1", type:3, fireTimerMax:500, fireTimerMin:400, counter:60, speed:6, size:100, damage:1});
}
}
Symbol 801 MovieClip [__Packages.Enemy_87] Frame 0
class Enemy_87 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_87 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 15)});
guns.push({name:"gun_2", type:4, fireTimerMax:20, fireTimerMin:20, counter:0, speed:3, size:45, damage:1});
}
}
Symbol 802 MovieClip [__Packages.Enemy_13] Frame 0
class Enemy_13 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_13 () {
super();
}
function ConfigureEnemy() {
numLife = 40;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(4, 8)});
guns.push({name:"gun_1", type:1, fireTimerMax:80, fireTimerMin:40, counter:60, speed:6, size:100, damage:4});
guns.push({name:"gun_2", type:4, fireTimerMax:20, fireTimerMin:20, counter:0, speed:3, size:45, damage:1});
}
}
Symbol 803 MovieClip [__Packages.Enemy_14] Frame 0
class Enemy_14 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_14 () {
super();
}
function ConfigureEnemy() {
numLife = 400;
numSpeed = 0.25;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 20)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(3, 5)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Ultra", values:Array(1, 5)});
arrEvents.push({name:"Drops Gun", triggerValue:239, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_1"});
arrEvents.push({name:"Drops Gun", triggerValue:85, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_2"});
guns.push({name:"gun_1", type:1, fireTimerMax:80, fireTimerMin:40, counter:60, speed:6, size:100, damage:4});
guns.push({name:"gun_2", type:1, fireTimerMax:80, fireTimerMin:40, counter:60, speed:6, size:100, damage:4});
guns.push({name:"gun_3", type:2, fireTimerMax:140, fireTimerMin:80, counter:120, speed:3, size:45, damage:4});
guns.push({name:"gun_4", type:2, fireTimerMax:140, fireTimerMin:80, counter:100, speed:3, size:45, damage:4});
guns.push({name:"gun_5", type:1, fireTimerMax:120, fireTimerMin:80, counter:50, speed:5, size:400, damage:8});
guns.push({name:"gun_6", type:3, fireTimerMax:300, fireTimerMin:200, counter:20, speed:3, size:45, damage:4});
}
}
Symbol 804 MovieClip [__Packages.Enemy_21] Frame 0
class Enemy_21 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_21 () {
super();
}
function ConfigureEnemy() {
numLife = 7;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(6, 9)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:2, size:100, damage:1});
}
}
Symbol 805 MovieClip [__Packages.Enemy_26] Frame 0
class Enemy_26 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_26 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(10, 10)});
arrEvents.push({name:"Drop Gun 3", triggerValue:4, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_3"});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:2, size:100, damage:2});
guns.push({name:"gun_2", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:2, size:100, damage:2});
guns.push({name:"gun_3", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:2, size:100, damage:2});
}
}
Symbol 806 MovieClip [__Packages.Enemy_25] Frame 0
class Enemy_25 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_25 () {
super();
}
function ConfigureEnemy() {
numLife = 10;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(10, 10)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4, size:100, damage:2});
guns.push({name:"gun_2", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4, size:100, damage:2});
}
}
Symbol 807 MovieClip [__Packages.Enemy_24] Frame 0
class Enemy_24 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_24 () {
super();
}
function ConfigureEnemy() {
numLife = 7;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(8, 10)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4, size:100, damage:2});
guns.push({name:"gun_2", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4, size:100, damage:2});
}
}
Symbol 808 MovieClip [__Packages.Enemy_23] Frame 0
class Enemy_23 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_23 () {
super();
}
function ConfigureEnemy() {
numLife = 7;
numSpeed = 1.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(8, 10)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4, size:100, damage:2});
}
}
Symbol 809 MovieClip [__Packages.Enemy_22] Frame 0
class Enemy_22 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_22 () {
super();
}
function ConfigureEnemy() {
numLife = 7;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(8, 10)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:6, size:100, damage:1});
}
}
Symbol 810 MovieClip [__Packages.Enemy_44] Frame 0
class Enemy_44 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_44 () {
super();
}
function ConfigureEnemy() {
numLife = 50;
numSpeed = 0.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(20, 12)});
guns.push({name:"gun_1", type:8, fireTimerMax:150, fireTimerMin:100, counter:60, speed:4, size:100, damage:4});
arrEvents.push({name:"Drop Gun 1", triggerValue:1, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_1"});
}
}
Symbol 811 MovieClip [__Packages.Enemy_R1] Frame 0
class Enemy_R1 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_R1 () {
super();
}
function ConfigureEnemy() {
numLife = 50;
numSpeed = 0.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 12)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(3, 5)});
}
}
Symbol 812 MovieClip [__Packages.Enemy_63] Frame 0
class Enemy_63 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_63 () {
super();
}
function ConfigureEnemy() {
numLife = 25;
numSpeed = 0.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(22, 12)});
guns.push({name:"gun_1", type:9, fireTimerMax:90, fireTimerMin:80, counter:60, speed:3, size:100, damage:4});
}
}
Symbol 813 MovieClip [__Packages.Enemy_50] Frame 0
class Enemy_50 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_50 () {
super();
}
function ConfigureEnemy() {
numLife = 40;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(20, 10)});
guns.push({name:"gun_1", type:16, fireTimerMax:90, fireTimerMin:90, counter:30, speed:5, size:150, damage:5});
}
}
Symbol 814 MovieClip [__Packages.Enemy_49] Frame 0
class Enemy_49 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_49 () {
super();
}
function ConfigureEnemy() {
numLife = 25;
numSpeed = 0.3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(20, 12)});
guns.push({name:"gun_1", type:16, fireTimerMax:150, fireTimerMin:100, counter:60, speed:4.5, size:100, damage:4});
}
}
Symbol 815 MovieClip [__Packages.Enemy_48] Frame 0
class Enemy_48 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_48 () {
super();
}
function ConfigureEnemy() {
numLife = 25;
numSpeed = 0.3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(10, 12)});
guns.push({name:"gun_1", type:16, fireTimerMax:150, fireTimerMin:100, counter:60, speed:4.5, size:100, damage:4});
}
}
Symbol 816 MovieClip [__Packages.Enemy_47] Frame 0
class Enemy_47 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_47 () {
super();
}
function ConfigureEnemy() {
numLife = 100;
numSpeed = 0.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(8, 15)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(4, 6)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Ultra", values:Array(1, 5)});
guns.push({name:"gun_1", type:7, fireTimerMax:80, fireTimerMin:60, counter:100, speed:6, size:150, damage:2});
guns.push({name:"gun_2", type:7, fireTimerMax:80, fireTimerMin:60, counter:100, speed:6, size:150, damage:2});
guns.push({name:"gun_3", type:12, fireTimerMax:120, fireTimerMin:80, counter:100, speed:6, size:100, damage:0});
guns.push({name:"gun_4", type:14, fireTimerMax:60, fireTimerMin:60, counter:60, speed:0, size:100, damage:3});
guns.push({name:"gun_5", type:14, fireTimerMax:60, fireTimerMin:60, counter:80, speed:0, size:100, damage:3});
guns.push({name:"gun_6", type:14, fireTimerMax:60, fireTimerMin:60, counter:80, speed:0, size:100, damage:3});
}
}
Symbol 817 MovieClip [__Packages.Enemy_46] Frame 0
class Enemy_46 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_46 () {
super();
}
function ConfigureEnemy() {
numLife = 75;
numSpeed = 0.25;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 10)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(2, 5)});
guns.push({name:"gun_1", type:8, fireTimerMax:90, fireTimerMin:60, counter:40, speed:6, size:150, damage:2});
}
}
Symbol 818 MovieClip [__Packages.Enemy_45] Frame 0
class Enemy_45 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_45 () {
super();
}
function ConfigureEnemy() {
numLife = 75;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(3, 12)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(4, 5)});
arrEvents.push({name:"Drops Gun", triggerValue:19, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_2"});
arrEvents.push({name:"Decrease Speed", triggerValue:19, hit:false, custom:false, action:"EVENT_SpeedChange", values:0.5});
guns.push({name:"gun_1", type:5, fireTimerMax:70, fireTimerMin:50, counter:60, speed:7, size:100, damage:2});
guns.push({name:"gun_2", type:3, fireTimerMax:600, fireTimerMin:400, counter:120, speed:6, size:100, damage:1});
guns.push({name:"gun_3", type:9, fireTimerMax:120, fireTimerMin:80, counter:70, speed:3, size:100, damage:2});
}
}
Symbol 819 MovieClip [__Packages.Enemy_30] Frame 0
class Enemy_30 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_30 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(9, 5)});
guns.push({name:"gun_1", type:5, fireTimerMax:70, fireTimerMin:50, counter:60, speed:3, size:100, damage:1});
}
}
Symbol 820 MovieClip [__Packages.Enemy_27] Frame 0
class Enemy_27 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_27 () {
super();
}
function ConfigureEnemy() {
numLife = 5;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(3, 6)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4, size:100, damage:1});
}
}
Symbol 821 MovieClip [__Packages.Enemy_28] Frame 0
class Enemy_28 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_28 () {
super();
}
function ConfigureEnemy() {
numLife = 10;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(4, 6)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4, size:100, damage:1});
guns.push({name:"gun_2", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4, size:100, damage:1});
arrEvents.push({name:"Drop Gun 2", triggerValue:7, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_2"});
}
}
Symbol 822 MovieClip [__Packages.Enemy_29] Frame 0
class Enemy_29 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_29 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(7, 5)});
guns.push({name:"gun_1", type:6, fireTimerMax:70, fireTimerMin:50, counter:60, speed:6, size:100, damage:1});
}
}
Symbol 823 MovieClip [__Packages.Enemy_33] Frame 0
class Enemy_33 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_33 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(15, 5)});
guns.push({name:"gun_1", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:1.5, size:100, damage:2});
guns.push({name:"gun_2", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:1.5, size:100, damage:2});
guns.push({name:"gun_3", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:1.5, size:100, damage:2});
arrEvents.push({name:"Drop Gun 3", triggerValue:12, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_3"});
}
}
Symbol 824 MovieClip [__Packages.Enemy_32] Frame 0
class Enemy_32 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_32 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(10, 5)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:1.5, size:100, damage:2});
guns.push({name:"gun_2", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:1.5, size:100, damage:2});
}
}
Symbol 825 MovieClip [__Packages.Enemy_31] Frame 0
class Enemy_31 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_31 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(8, 5)});
guns.push({name:"gun_1", type:1, fireTimerMax:70, fireTimerMin:50, counter:60, speed:2, size:100, damage:2});
}
}
Symbol 826 MovieClip [__Packages.Enemy_20] Frame 0
class Enemy_20 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_20 () {
super();
}
function ConfigureEnemy() {
numLife = 4;
numSpeed = 2.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(7, 10)});
}
}
Symbol 827 MovieClip [__Packages.Enemy_19] Frame 0
class Enemy_19 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_19 () {
super();
}
function ConfigureEnemy() {
numLife = 4;
numSpeed = 0.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 10)});
}
}
Symbol 828 MovieClip [__Packages.Enemy_18] Frame 0
class Enemy_18 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_18 () {
super();
}
function ConfigureEnemy() {
numLife = 4;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 8)});
}
}
Symbol 829 MovieClip [__Packages.Enemy_17] Frame 0
class Enemy_17 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_17 () {
super();
}
function ConfigureEnemy() {
numLife = 4;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(3, 8)});
}
}
Symbol 830 MovieClip [__Packages.Enemy_16] Frame 0
class Enemy_16 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_16 () {
super();
}
function ConfigureEnemy() {
numLife = 4;
numSpeed = 4;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 8)});
}
}
Symbol 831 MovieClip [__Packages.Enemy_15] Frame 0
class Enemy_15 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_15 () {
super();
}
function ConfigureEnemy() {
numLife = 4;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 8)});
}
}
Symbol 832 MovieClip [__Packages.Enemy_41] Frame 0
class Enemy_41 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_41 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 0.8;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(10, 10)});
guns.push({name:"gun_1", type:10, fireTimerMax:100, fireTimerMin:100, counter:100, speed:0, size:100, damage:5});
arrEvents.push({name:"Drop Gun 1", triggerValue:5, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_1"});
}
}
Symbol 833 MovieClip [__Packages.Enemy_43] Frame 0
class Enemy_43 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_43 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(20, 10)});
guns.push({name:"gun_1", type:10, fireTimerMax:80, fireTimerMin:60, counter:100, speed:0, size:100, damage:2});
guns.push({name:"gun_2", type:10, fireTimerMax:80, fireTimerMin:60, counter:100, speed:0, size:100, damage:2});
guns.push({name:"gun_3", type:10, fireTimerMax:80, fireTimerMin:60, counter:100, speed:0, size:100, damage:2});
guns.push({name:"gun_4", type:10, fireTimerMax:80, fireTimerMin:60, counter:100, speed:0, size:100, damage:2});
guns.push({name:"gun_5", type:10, fireTimerMax:80, fireTimerMin:60, counter:100, speed:0, size:100, damage:2});
guns.push({name:"gun_6", type:10, fireTimerMax:80, fireTimerMin:60, counter:100, speed:0, size:100, damage:2});
}
}
Symbol 834 MovieClip [__Packages.Enemy_42] Frame 0
class Enemy_42 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_42 () {
super();
}
function ConfigureEnemy() {
numLife = 20;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(12, 10)});
guns.push({name:"gun_2", type:10, fireTimerMax:100, fireTimerMin:100, counter:100, speed:0, size:100, damage:5});
guns.push({name:"gun_1", type:1, fireTimerMax:80, fireTimerMin:60, counter:100, speed:6, size:100, damage:2});
}
}
Symbol 835 MovieClip [__Packages.Enemy_40] Frame 0
class Enemy_40 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_40 () {
super();
}
function ConfigureEnemy() {
numLife = 70;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(40, 15)});
guns.push({name:"gun_1", type:1, fireTimerMax:60, fireTimerMin:50, counter:0, speed:5, size:300, damage:4});
guns.push({name:"gun_2", type:1, fireTimerMax:60, fireTimerMin:50, counter:40, speed:5, size:300, damage:4});
guns.push({name:"gun_3", type:1, fireTimerMax:60, fireTimerMin:50, counter:80, speed:5, size:300, damage:4});
guns.push({name:"gun_4", type:1, fireTimerMax:60, fireTimerMin:50, counter:120, speed:5, size:300, damage:4});
}
}
Symbol 836 MovieClip [__Packages.Enemy_39] Frame 0
class Enemy_39 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_39 () {
super();
}
function ConfigureEnemy() {
numLife = 70;
numSpeed = 0.3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(40, 15)});
guns.push({name:"gun_1", type:7, fireTimerMax:60, fireTimerMin:50, counter:80, speed:5, size:100, damage:4});
guns.push({name:"gun_2", type:12, fireTimerMax:60, fireTimerMin:50, counter:120, speed:3, size:100, damage:2});
}
}
Symbol 837 MovieClip [__Packages.Enemy_38] Frame 0
class Enemy_38 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_38 () {
super();
}
function ConfigureEnemy() {
numLife = 70;
numSpeed = 0.3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(40, 15)});
guns.push({name:"gun_1", type:17, fireTimerMax:5, fireTimerMin:5, counter:5, speed:4, size:200, damage:2});
guns.push({name:"gun_2", type:17, fireTimerMax:5, fireTimerMin:5, counter:60, speed:4, size:200, damage:2});
guns.push({name:"gun_3", type:17, fireTimerMax:5, fireTimerMin:5, counter:90, speed:4, size:200, damage:2});
guns.push({name:"gun_4", type:14, fireTimerMax:150, fireTimerMin:100, counter:60, speed:4.5, size:100, damage:1});
}
}
Symbol 838 MovieClip [__Packages.Enemy_37] Frame 0
class Enemy_37 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_37 () {
super();
}
function ConfigureEnemy() {
numLife = 70;
numSpeed = 0.3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(50, 15)});
guns.push({name:"gun_1", type:13, fireTimerMax:3, fireTimerMin:3, counter:30, speed:5, size:300, damage:3});
guns.push({name:"gun_2", type:14, fireTimerMax:150, fireTimerMin:100, counter:60, speed:4.5, size:100, damage:4});
}
}
Symbol 839 MovieClip [__Packages.Enemy_36] Frame 0
class Enemy_36 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_36 () {
super();
}
function ConfigureEnemy() {
numLife = 70;
numSpeed = 1.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(30, 2)});
guns.push({name:"gun_1", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:4.5, size:300, damage:4});
guns.push({name:"gun_2", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:4.5, size:300, damage:4});
guns.push({name:"gun_3", type:13, fireTimerMax:5, fireTimerMin:5, counter:15, speed:6, size:200, damage:2});
}
}
Symbol 840 MovieClip [__Packages.Enemy_35] Frame 0
class Enemy_35 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_35 () {
super();
}
function ConfigureEnemy() {
numLife = 70;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(30, 2)});
guns.push({name:"gun_1", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:1.5, size:300, damage:4});
guns.push({name:"gun_2", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:1.5, size:300, damage:4});
guns.push({name:"gun_3", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:1.5, size:300, damage:4});
guns.push({name:"gun_4", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:1.5, size:300, damage:4});
guns.push({name:"gun_5", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:1.5, size:300, damage:4});
arrEvents.push({name:"Drop Gun 1", triggerValue:56, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_1"});
arrEvents.push({name:"Drop Gun 5", triggerValue:44, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_5"});
arrEvents.push({name:"Drop Gun 2", triggerValue:33, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_2"});
arrEvents.push({name:"Drop Gun 4", triggerValue:23, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_4"});
}
}
Symbol 841 MovieClip [__Packages.Enemy_34] Frame 0
class Enemy_34 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_34 () {
super();
}
function ConfigureEnemy() {
numLife = 70;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(15, 16)});
arrEvents.push({name:"Drop Gun 2", triggerValue:24, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_2"});
arrEvents.push({name:"Drop Gun 3", triggerValue:24, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_3"});
guns.push({name:"gun_1", type:5, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4.5, size:100, damage:1});
guns.push({name:"gun_2", type:1, fireTimerMax:120, fireTimerMin:80, counter:100, speed:3, size:300, damage:4});
guns.push({name:"gun_3", type:1, fireTimerMax:120, fireTimerMin:80, counter:100, speed:3, size:300, damage:4});
}
}
Symbol 842 MovieClip [__Packages.Enemy_74] Frame 0
class Enemy_74 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_74 () {
super();
}
function ConfigureEnemy() {
numLife = 25;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(15, 10)});
guns.push({name:"gun_1", type:10, fireTimerMax:57, fireTimerMin:57, counter:57, speed:0, size:100, damage:5});
guns.push({name:"gun_2", type:10, fireTimerMax:57, fireTimerMin:57, counter:57, speed:0, size:100, damage:5});
guns.push({name:"gun_3", type:10, fireTimerMax:57, fireTimerMin:57, counter:57, speed:0, size:100, damage:5});
guns.push({name:"gun_4", type:10, fireTimerMax:57, fireTimerMin:57, counter:57, speed:0, size:100, damage:5});
}
}
Symbol 843 MovieClip [__Packages.Enemy_78] Frame 0
class Enemy_78 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_78 () {
super();
}
function ConfigureEnemy() {
numLife = 45;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(35, 8)});
guns.push({name:"gun_1", type:13, fireTimerMax:0.5, fireTimerMin:0.5, counter:1, speed:8, size:250, damage:1});
}
}
Symbol 844 MovieClip [__Packages.Enemy_77] Frame 0
class Enemy_77 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_77 () {
super();
}
function ConfigureEnemy() {
numLife = 75;
numSpeed = 1.5;
arrEvents.push({name:"Enemy Hit", triggerValue:-1, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 1)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(30, 8)});
guns.push({name:"gun_1", type:12, fireTimerMax:120, fireTimerMin:80, counter:100, speed:2, size:100, damage:0});
guns.push({name:"gun_2", type:7, fireTimerMax:120, fireTimerMin:80, counter:100, speed:6, size:100, damage:2});
guns.push({name:"gun_3", type:7, fireTimerMax:120, fireTimerMin:80, counter:100, speed:6, size:100, damage:2});
arrEvents.push({name:"Drop Gun 1", triggerValue:44, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_1"});
}
}
Symbol 845 MovieClip [__Packages.Enemy_65] Frame 0
class Enemy_65 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_65 () {
super();
}
function ConfigureEnemy() {
numLife = 75;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 8)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(2, 8)});
arrEvents.push({name:"Drop Gun 2", triggerValue:34, hit:false, custom:false, action:"EVENT_DropGun", values:"gun_2"});
guns.push({name:"gun_1", type:12, fireTimerMax:120, fireTimerMin:80, counter:100, speed:7, size:100, damage:0});
guns.push({name:"gun_2", type:13, fireTimerMax:5, fireTimerMin:5, counter:1, speed:7.5, size:100, damage:2});
}
}
Symbol 846 MovieClip [__Packages.Enemy_75] Frame 0
class Enemy_75 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_75 () {
super();
}
function ConfigureEnemy() {
numLife = 75;
numSpeed = 2.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(4, 20)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(1, 5)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Ultra", values:Array(1, 3)});
arrEvents.push({name:"Explode Seekers", triggerValue:0, hit:false, custom:false, action:"EVENT_SeekersDie", values:0});
guns.push({name:"gun_2", type:11, fireTimerMax:60, fireTimerMin:60, counter:0, speed:0, size:100, damage:4});
guns.push({name:"gun_3", type:11, fireTimerMax:90, fireTimerMin:90, counter:30, speed:0, size:100, damage:4});
guns.push({name:"gun_1", type:6, fireTimerMax:80, fireTimerMin:50, counter:70, speed:6, size:100, damage:2});
}
}
Symbol 847 MovieClip [__Packages.Enemy_Health_Leecher] Frame 0
class Enemy_Health_Leecher extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, strCreatedBy, intState, rotateAngle, rotateSpeed, _type, numLastAngle, _x, _y, _rotation, gotoAndStop, _name, removeMovieClip, _width;
function Enemy_Health_Leecher () {
super();
}
function Enemy_Leecher() {
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 6;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
strCreatedBy = "";
intState = 3;
rotateAngle = 0;
rotateSpeed = 0.1;
_type = 2;
}
function onEnterFrame() {
if ((intState == 3) || (intState == 5)) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local10 = AboutToExit();
}
if (intState == 3) {
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else {
var _local3 = new Vector();
_local3._x = _root.avatar._x - _x;
_local3._y = _root.avatar._y - _y;
var _local6 = Math.atan2(_local3._y, _local3._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_rotation = _local7;
}
if (GetDistance2Avatar() <= 60) {
gotoAndStop(11);
var _local4 = new Vector();
_local4._x = _root.avatar._x;
_local4._y = _root.avatar._y;
_root.AddEffect("loseEnergy", _local4, true, "avatar");
haltMovie = true;
intState = 6;
gotoAndPlay(11);
}
}
} else if (intState == 6) {
var _local3 = new Vector();
_local3._x = _root.avatar._x - _x;
_local3._y = _root.avatar._y - _y;
var _local6 = Math.atan2(_local3._y, _local3._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_rotation = _local7;
startLeeching();
} else if (intState == 2) {
var _local5 = _root[strCreatedBy]._width + 2;
var _local9 = (_local5 * Math.cos(rotateAngle)) + _root[strCreatedBy]._x;
var _local8 = (_local5 * Math.sin(rotateAngle)) + _root[strCreatedBy]._y;
rotateAngle = rotateAngle + rotateSpeed;
if (rotateAngle > 360) {
rotateAngle = 0;
}
_x = _local9;
_y = _local8;
_rotation = _root[strCreatedBy]._rotation;
if (GetDistance2Avatar() <= 85) {
intState = 3;
}
}
}
function Explode() {
gotoAndPlay(2);
intState = 4;
}
function KillMe() {
_root[_name].leechBeam.circMask._width = 0;
_root.ReportAvatarDamage(8);
_root.ReportDeath(_name);
_root[strCreatedBy].ReportSeekerDeath(_name);
removeMovieClip();
}
function SetCreatedFrom(strFrom) {
strCreatedBy = strFrom;
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
_root[strCreatedBy].ReportSeekerDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function startLeeching() {
_root[_name].leechBeam.circMask._width = GetDistance2Avatar();
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Avatar() {
var _local4 = _x - _root.avatar._x;
var _local3 = _y - _root.avatar._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Source() {
var _local4 = _x - _root[strCreatedBy]._x;
var _local3 = _y - _root[strCreatedBy]._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
}
Symbol 848 MovieClip [__Packages.Enemy_Leecher] Frame 0
class Enemy_Leecher extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, strCreatedBy, intState, rotateAngle, rotateSpeed, _type, intDamageCounter, blnVoid, enemyOff, numLastAngle, _x, _y, _rotation, gotoAndStop, _name, removeMovieClip, _width;
function Enemy_Leecher () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 6;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
strCreatedBy = "";
intState = 3;
rotateAngle = 0;
rotateSpeed = 0.1;
_type = 2;
intDamageCounter = 1;
blnVoid = false;
}
function onEnterFrame() {
if (!enemyOff) {
if ((intState == 3) || (intState == 5)) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local10 = AboutToExit();
}
if (intState == 3) {
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else {
var _local3 = new Vector();
_local3._x = _root.avatar._x - _x;
_local3._y = _root.avatar._y - _y;
var _local6 = Math.atan2(_local3._y, _local3._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_rotation = _local7;
}
if (_root.game.intAssembledState == 0) {
if (GetDistance2Avatar() <= 60) {
gotoAndStop(11);
var _local4 = new Vector();
_local4._x = _root.avatar._x;
_local4._y = _root.avatar._y;
_root.game.CreateEffect("effect", _local4, true, "avatar");
intState = 6;
}
}
}
} else if (intState == 6) {
var _local3 = new Vector();
_local3._x = _root.avatar._x - _x;
_local3._y = _root.avatar._y - _y;
var _local6 = Math.atan2(_local3._y, _local3._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_rotation = _local7;
startLeeching();
intDamageCounter--;
if (intDamageCounter == 0) {
_root.ReportAvatarDamage(0.66666);
intDamageCounter = 15;
}
} else if (intState == 2) {
var _local5 = _root[strCreatedBy]._width + 2;
var _local9 = (_local5 * Math.cos(rotateAngle)) + _root[strCreatedBy]._x;
var _local8 = (_local5 * Math.sin(rotateAngle)) + _root[strCreatedBy]._y;
rotateAngle = rotateAngle + rotateSpeed;
if (rotateAngle > 360) {
rotateAngle = 0;
}
_x = _local9;
_y = _local8;
_rotation = _root[strCreatedBy]._rotation;
if (GetDistance2Avatar() <= 85) {
intState = 3;
}
}
}
}
function Explode() {
gotoAndPlay(2);
intState = 4;
}
function Terminate() {
blnVoid = true;
Explode();
}
function KillMe() {
_root[_name].leechBeam.circMask._width = 0;
if (blnVoid == false) {
_root.ReportAvatarDamage(8);
}
_root.ReportDeath(_name);
_root[strCreatedBy].ReportSeekerDeath(_name);
removeMovieClip();
}
function SetCreatedFrom(strFrom) {
strCreatedBy = strFrom;
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
_root[strCreatedBy].ReportSeekerDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function startLeeching() {
_root[_name].leechBeam.circMask._width = GetDistance2Avatar();
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Avatar() {
var _local4 = _x - _root.avatar._x;
var _local3 = _y - _root.avatar._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Source() {
var _local4 = _x - _root[strCreatedBy]._x;
var _local3 = _y - _root[strCreatedBy]._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 849 MovieClip [__Packages.Ally_Infector] Frame 0
class Ally_Infector extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, enemyOff, _damage, _currentTarget, intLastCheckTarget, intWanderCounter, intState, _type, rotateAngle, rotateSpeed, intStoreWidth, _rotation, numLastAngle, _x, _y, _name, removeMovieClip, gotoAndStop, _width;
function Ally_Infector () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 5;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
enemyOff = false;
_damage = 0;
_currentTarget = "";
intLastCheckTarget = 0;
intWanderCounter = 60;
intState = 3;
_type = 3;
rotateAngle = 0;
rotateSpeed = 0.1;
intStoreWidth = _root.avatar._width / 1.75;
_rotation = RandNum(0, 360);
}
function onEnterFrame() {
if (!enemyOff) {
if (flagExplode == false) {
if ((intState == 3) || (intState == 2)) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local5 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local5 == true) && (safetyTurn == false))) {
if (_local5 == true) {
var _local4 = GetAnglePos();
if (_local4 < 0) {
if (_local4 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local4 > numLastAngle) {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
} else {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
}
numFramesToTurn = Math.round(Math.abs(numAmountToTurn) / numSpeed);
numAmountToTurn = numSpeed * (numAmountToTurn / Math.abs(numAmountToTurn));
minFramesToHoldTurning = 90;
safetyTurn = true;
}
} else {
numFramesToTurn--;
_rotation = _rotation + numAmountToTurn;
}
}
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else if (intState == 3) {
if (intLastCheckTarget == 0) {
_currentTarget = _root.game.GetNearestEnemy(_x, _y);
intLastCheckTarget = 20;
} else {
intLastCheckTarget--;
}
if (_currentTarget == "") {
SelfDestruct();
}
if (_root[_currentTarget]._name == undefined) {
SelfDestruct();
}
var _local3 = new Vector();
_local3._x = _root[_currentTarget]._x - _x;
_local3._y = _root[_currentTarget]._y - _y;
_rotation = _local3.GetAngle();
} else if (intState == 2) {
intWanderCounter--;
if (intWanderCounter == 0) {
intState = 3;
}
}
if (_root[_currentTarget].hitTest(_x, _y, true) == true) {
_root[_currentTarget].Infect();
_root.game.Effect_SeekerExplosion(_x, _y);
_root.game.ReportSeekerDead(_name);
removeMovieClip();
}
}
}
}
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function SelfDestruct() {
_root.game.Effect_SeekerExplosion(_x, _y);
_root.game.ReportSeekerDead(_name);
removeMovieClip();
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
ObjRef.localToGlobal(point);
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
i++;
}
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Target() {
var _local4 = _x - _root[_currentTarget]._x;
var _local3 = _y - _root[_currentTarget]._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 850 MovieClip [__Packages.Enemy_Sapper] Frame 0
class Enemy_Sapper extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, strCreatedBy, intState, rotateAngle, rotateSpeed, _type, blnVoid, enemyOff, numLastAngle, _x, _y, _rotation, gotoAndStop, _name, removeMovieClip, _width;
function Enemy_Sapper () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 6;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
strCreatedBy = "";
intState = 3;
rotateAngle = 0;
rotateSpeed = 0.1;
_type = 2;
blnVoid = false;
}
function onEnterFrame() {
if (!enemyOff) {
if ((intState == 3) || (intState == 5)) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local10 = AboutToExit();
}
if (intState == 3) {
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else {
var _local3 = new Vector();
_local3._x = _root.avatar._x - _x;
_local3._y = _root.avatar._y - _y;
var _local6 = Math.atan2(_local3._y, _local3._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_rotation = _local7;
}
if (_root.game.intAssembledState == 0) {
if (GetDistance2Avatar() <= 20) {
gotoAndStop(11);
var _local4 = new Vector();
_local4._x = _root.avatar._x;
_local4._y = _root.avatar._y;
_root.game.CreateEffect("effect", _local4, true, "avatar");
_root.ReportAvatarDamage(1);
intState = 5;
}
}
} else if (intState == 5) {
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else {
var _local3 = new Vector();
_local3._x = _root[strCreatedBy]._x - _x;
_local3._y = _root[strCreatedBy]._y - _y;
var _local6 = Math.atan2(_local3._y, _local3._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_rotation = _local7;
}
if (GetDistance2Source() <= 20) {
intState = 3;
_root[strCreatedBy].ReportLifeIncrease(3);
gotoAndStop(1);
}
}
} else if (intState == 2) {
var _local5 = _root[strCreatedBy]._width + 2;
var _local9 = (_local5 * Math.cos(rotateAngle)) + _root[strCreatedBy]._x;
var _local8 = (_local5 * Math.sin(rotateAngle)) + _root[strCreatedBy]._y;
rotateAngle = rotateAngle + rotateSpeed;
if (rotateAngle > 360) {
rotateAngle = 0;
}
_x = _local9;
_y = _local8;
_rotation = _root[strCreatedBy]._rotation;
if (GetDistance2Avatar() <= 85) {
intState = 3;
}
}
}
}
function Explode() {
gotoAndPlay(2);
intState = 4;
}
function Terminate() {
blnVoid = true;
Explode();
}
function KillMe() {
if (blnVoid == false) {
_root.ReportAvatarDamage(8);
}
_root.ReportDeath(_name);
_root[strCreatedBy].ReportSeekerDeath(_name);
removeMovieClip();
}
function SetCreatedFrom(strFrom) {
strCreatedBy = strFrom;
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
_root[strCreatedBy].ReportSeekerDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Avatar() {
var _local4 = _x - _root.avatar._x;
var _local3 = _y - _root.avatar._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Source() {
var _local4 = _x - _root[strCreatedBy]._x;
var _local3 = _y - _root[strCreatedBy]._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 851 MovieClip [__Packages.Enemy_Orbital_Seeker] Frame 0
class Enemy_Orbital_Seeker extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, strCreatedBy, intState, rotateAngle, rotateSpeed, _type, blnVoid, enemyOff, numLastAngle, _rotation, _x, _y, _name, removeMovieClip, gotoAndStop, _width;
function Enemy_Orbital_Seeker () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
numSpeed = 3.5;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
strCreatedBy = "";
intState = 2;
rotateAngle = 0;
rotateSpeed = 0.1;
_type = 3;
blnVoid = false;
}
function onEnterFrame() {
if (!enemyOff) {
if (intState == 3) {
if (haltMovie == false) {
numLastAngle = GetAnglePos();
MoveMe();
var _local5 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local5 == true) && (safetyTurn == false))) {
if (_local5 == true) {
var _local4 = GetAnglePos();
if (_local4 < 0) {
if (_local4 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local4 > numLastAngle) {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
} else {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
}
numFramesToTurn = Math.round(Math.abs(numAmountToTurn) / 2);
numAmountToTurn = 2 * (numAmountToTurn / Math.abs(numAmountToTurn));
minFramesToHoldTurning = 90;
safetyTurn = true;
}
} else {
numFramesToTurn--;
_rotation = _rotation + numAmountToTurn;
}
}
if (minFramesToHoldTurning > 0) {
minFramesToHoldTurning--;
} else {
var _local3 = new Vector();
_local3._x = _root.avatar._x - _x;
_local3._y = _root.avatar._y - _y;
var _local7 = Math.atan2(_local3._y, _local3._x);
var _local8 = (360 * _local7) / (Math.PI*2);
_rotation = _local8;
}
if (_root.game.intAssembledState == 0) {
if (GetDistance2Avatar() <= 35) {
gotoAndPlay(2);
intState = 4;
}
}
} else if (intState == 2) {
var _local6 = _root[strCreatedBy]._width + 2;
var _local10 = (_local6 * Math.cos(rotateAngle)) + _root[strCreatedBy]._x;
var _local9 = (_local6 * Math.sin(rotateAngle)) + _root[strCreatedBy]._y;
rotateAngle = rotateAngle + rotateSpeed;
if (rotateAngle > 360) {
rotateAngle = 0;
}
_x = _local10;
_y = _local9;
_rotation = _root[strCreatedBy]._rotation;
if (GetDistance2Avatar() <= 85) {
intState = 3;
}
}
}
}
function Explode() {
gotoAndPlay(2);
intState = 4;
}
function Terminate() {
blnVoid = true;
Explode();
}
function KillMe() {
if (blnVoid == false) {
_root.ReportAvatarDamage(8);
}
_root.ReportDeath(_name);
_root[strCreatedBy].ReportSeekerDeath(_name);
removeMovieClip();
}
function SetCreatedFrom(strFrom) {
strCreatedBy = strFrom;
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
ObjRef.localToGlobal(point);
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
i++;
}
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
_root[strCreatedBy].ReportSeekerDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Avatar() {
var _local4 = _x - _root.avatar._x;
var _local3 = _y - _root.avatar._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local7 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local4 = _local6 - _root.bg._x;
var _local3 = _local7 - _root.bg._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > (_root.bg.inside._width / 2)) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 852 MovieClip [__Packages.Enemy_79] Frame 0
class Enemy_79 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_79 () {
super();
}
function ConfigureEnemy() {
numLife = 60;
numSpeed = 1.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 20)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(7, 5)});
arrEvents.push({name:"Explode Seekers", triggerValue:0, hit:false, custom:false, action:"EVENT_SeekersDie", values:0});
guns.push({name:"gun_1", type:14, fireTimerMax:60, fireTimerMin:60, counter:60, speed:0, size:100, damage:5});
guns.push({name:"gun_2", type:14, fireTimerMax:60, fireTimerMin:60, counter:80, speed:0, size:100, damage:5});
guns.push({name:"gun_3", type:13, fireTimerMax:5, fireTimerMin:5, counter:1, speed:7.5, size:100, damage:2});
}
}
Symbol 853 MovieClip [__Packages.Enemy_84] Frame 0
class Enemy_84 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_84 () {
super();
}
function ConfigureEnemy() {
numLife = 55;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(20, 5)});
guns.push({name:"gun_1", type:19, fireTimerMax:80, fireTimerMin:40, counter:40, speed:7, size:100, damage:1});
}
}
Symbol 854 MovieClip [__Packages.Enemy_83] Frame 0
class Enemy_83 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_83 () {
super();
}
function ConfigureEnemy() {
numLife = 55;
numSpeed = 0;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(30, 5)});
guns.push({name:"gun_1", type:18, fireTimerMax:2, fireTimerMin:2, counter:40, speed:9, size:100, damage:2});
}
}
Symbol 855 MovieClip [__Packages.Enemy_82] Frame 0
class Enemy_82 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_82 () {
super();
}
function ConfigureEnemy() {
numLife = 55;
numSpeed = 0;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(30, 5)});
guns.push({name:"gun_1", type:17, fireTimerMax:3, fireTimerMin:3, counter:Math.round(Math.random() * 60), speed:8, size:100, damage:2});
}
}
Symbol 856 MovieClip [__Packages.Enemy_81] Frame 0
class Enemy_81 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_81 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(15, 5)});
arrEvents.push({name:"Explode Seekers", triggerValue:0, hit:false, custom:false, action:"EVENT_SeekersDie", values:0});
guns.push({name:"gun_1", type:16, fireTimerMax:80, fireTimerMin:60, counter:60, speed:0, size:100, damage:0});
guns.push({name:"gun_2", type:16, fireTimerMax:80, fireTimerMin:60, counter:40, speed:0, size:100, damage:0});
}
}
Symbol 857 MovieClip [__Packages.Enemy_80] Frame 0
class Enemy_80 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_80 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 12)});
guns.push({name:"gun_1", type:15, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:100, damage:0});
}
}
Symbol 858 MovieClip [__Packages.Enemy_85] Frame 0
class Enemy_85 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_85 () {
super();
}
function ConfigureEnemy() {
numLife = 75;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 20)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(2, 5)});
arrEvents.push({name:"Explode Seekers", triggerValue:0, hit:false, custom:false, action:"EVENT_SeekersDie", values:0});
guns.push({name:"gun_2", type:14, fireTimerMax:60, fireTimerMin:60, counter:60, speed:0, size:100, damage:5});
guns.push({name:"gun_1", type:13, fireTimerMax:5, fireTimerMin:5, counter:1, speed:7.5, size:100, damage:2});
}
}
Symbol 859 MovieClip [__Packages.Enemy_88] Frame 0
class Enemy_88 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_88 () {
super();
}
function ConfigureEnemy() {
numLife = 100;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(15, 18)});
guns.push({name:"gun_1", type:1, fireTimerMax:50, fireTimerMin:30, counter:60, speed:7, size:100, damage:1});
guns.push({name:"gun_2", type:5, fireTimerMax:70, fireTimerMin:50, counter:60, speed:4.5, size:100, damage:2});
}
}
Symbol 860 MovieClip [__Packages.Enemy_89] Frame 0
class Enemy_89 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_89 () {
super();
}
function ConfigureEnemy() {
numLife = 100;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(15, 20)});
guns.push({name:"gun_1", type:1, fireTimerMax:60, fireTimerMin:40, counter:60, speed:6, size:100, damage:1});
guns.push({name:"gun_2", type:13, fireTimerMax:5, fireTimerMin:5, counter:1, speed:7.5, size:100, damage:2});
}
}
Symbol 861 MovieClip [__Packages.Ally_Fighter] Frame 0
class Ally_Fighter extends MovieClip
{
var gunFlagOne, flagExplode, guns, haltMovie, safetyTurn, numLife, gotoAndPlay, strMiniBubbleName, numSpeed, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, enemyOff, _damage, _strCreatedBy, _currentTarget, intLastCheckTarget, intFocus, vecFocusOffset, intShootingRange, intResetOffsetCounter, intState, _type, _rotation, _x, _y, _name, removeMovieClip, getDepth, gotoAndStop, _width;
function Ally_Fighter () {
super();
gunFlagOne = true;
flagExplode = false;
guns = new Array();
haltMovie = false;
safetyTurn = false;
numLife = 1;
gotoAndPlay(numLife);
strMiniBubbleName = "";
numSpeed = 8;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
enemyOff = false;
_damage = 0;
_strCreatedBy = "";
_currentTarget = "";
intLastCheckTarget = 0;
intFocus = 2;
vecFocusOffset = new Vector();
intShootingRange = 100;
intResetOffsetCounter = 45;
intState = 3;
_type = 10;
guns.push({name:"gun_1", type:1, fireTimerMax:8, fireTimerMin:8, counter:8, speed:10, size:75, damage:1});
}
function onEnterFrame() {
if (!enemyOff) {
if (intState == 2) {
} else if (intState == 3) {
var _local3 = GetVector2Focus();
if (_local3.GetLength() > intShootingRange) {
_rotation = _rotation + _local3.AngleToAlign(_rotation, numSpeed, 2);
} else {
if (intLastCheckTarget == 0) {
_currentTarget = _root.game.GetNearestEnemy(_x, _y);
intLastCheckTarget = 20;
} else {
intLastCheckTarget--;
}
if (_currentTarget == "") {
intState = 4;
}
if (_root[_currentTarget]._name == undefined) {
_currentTarget = _root.game.GetNearestEnemy(_x, _y);
intLastCheckTarget = 20;
if (_root[_currentTarget]._name == undefined) {
intState = 4;
}
}
if (intState == 3) {
OperateWeapons();
}
}
} else if (intState == 4) {
var _local3 = GetVector2Focus();
_rotation = _rotation + _local3.AngleToAlign(_rotation, numSpeed, 2);
if (_local3.GetLength() < numSpeed) {
Dock();
}
}
MoveMe();
if (intResetOffsetCounter == 0) {
ResetOffset();
intResetOffsetCounter = 45;
} else {
intResetOffsetCounter--;
}
}
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function SelfDestruct() {
}
function Dock() {
RemoveMiniBubble();
_root.game.RemoveAlly(_name);
removeMovieClip();
}
function CreateMiniBubble() {
if (strMiniBubbleName == "") {
strMiniBubbleName = _name + "_miniBubble";
_root.miniBubblesLayer_mc.attachMovie("fighter_bubble", strMiniBubbleName, getDepth());
var refBubble = eval ("_root.miniBubblesLayer_mc." + strMiniBubbleName);
var point = {x:_x, y:_y};
refBubble._parent.globalToLocal(point);
refBubble._x = point.x;
refBubble._y = point.y;
}
}
function RemoveMiniBubble() {
if (strMiniBubbleName != "") {
var refBubble = eval ("_root.miniBubblesLayer_mc." + strMiniBubbleName);
refBubble.removeMovieClip();
strMiniBubbleName = "";
}
}
function MoveMiniBubble() {
if (InRange() == true) {
if (strMiniBubbleName == "") {
CreateMiniBubble();
}
} else if (strMiniBubbleName != "") {
RemoveMiniBubble();
}
if (strMiniBubbleName != "") {
var refBubble = eval ("_root.miniBubblesLayer_mc." + strMiniBubbleName);
var point = {x:_x, y:_y};
refBubble._parent.globalToLocal(point);
refBubble._x = point.x;
refBubble._y = point.y;
}
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
ObjRef.localToGlobal(point);
var refTarget = _root[_currentTarget];
var vecDirection = new Vector();
vecDirection._x = refTarget._x - point.x;
vecDirection._y = refTarget._y - point.y;
if (vecDirection.GetLength() < intShootingRange) {
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.AvatarFireBullet(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
}
i++;
}
}
function ReceiveDamage(amountDamage) {
var _local3 = false;
numLife = numLife - amountDamage;
if (numLife < 1) {
_local3 = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(_local3);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function MoveMe() {
var _local2 = new Vector();
_local2._x = (Math.cos((Math.PI * _rotation) / 180) * numSpeed) + _x;
_local2._y = (Math.sin((Math.PI * _rotation) / 180) * numSpeed) + _y;
_x = _local2._x;
_y = _local2._y;
MoveMiniBubble();
}
function GetAnglePos() {
var _local3 = new Vector();
_local3._x = _x - _root.bg._x;
_local3._y = _y - _root.bg._y;
var _local4 = Math.atan2(_local3._y, _local3._x);
var _local5 = (360 * _local4) / (Math.PI*2);
return(_local5);
}
function InRange() {
return(GetDistance() > ((_root.bg.inside._width / 2) - 30));
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetDistance2Target() {
var _local4 = _x - _root[_currentTarget]._x;
var _local3 = _y - _root[_currentTarget]._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function GetVector2Focus() {
var vecReturn = new Vector();
if (intState == 4) {
var gunRef = eval ("_root.avatar.gun." + _strCreatedBy);
if (gunRef._name == undefined) {
_root.game.Effect_PierceExplosion(_x, _y);
Dock();
} else {
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
vecReturn._x = point.x - _x;
vecReturn._y = point.y - _y;
}
} else if (intFocus == 1) {
} else {
vecReturn._x = (_root._xmouse + vecFocusOffset._x) - _x;
vecReturn._y = (_root._ymouse + vecFocusOffset._y) - _y;
}
return(vecReturn);
}
function ResetOffset() {
vecFocusOffset._x = RandNum(-25, 25);
vecFocusOffset._y = RandNum(-25, 25);
}
function AboutToExit() {
var _local5 = false;
var _local6 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local8 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local7 = 200;
var _local4 = _local6 - _root._xmouse;
var _local3 = _local8 - _root._ymouse;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) > _local7) {
_local5 = true;
}
return(_local5);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 862 MovieClip [__Packages.Enemy_90] Frame 0
class Enemy_90 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_90 () {
super();
}
function ConfigureEnemy() {
numLife = 125;
numSpeed = 0.25;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(15, 20)});
arrEvents.push({name:"Explode Seekers", triggerValue:0, hit:false, custom:false, action:"EVENT_SeekersDie", values:0});
guns.push({name:"gun_1", type:15, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:100, damage:0});
guns.push({name:"gun_2", type:11, fireTimerMax:60, fireTimerMin:60, counter:30, speed:0, size:100, damage:5});
guns.push({name:"gun_3", type:11, fireTimerMax:80, fireTimerMin:80, counter:40, speed:0, size:100, damage:5});
guns.push({name:"gun_4", type:11, fireTimerMax:90, fireTimerMin:90, counter:50, speed:0, size:100, damage:5});
guns.push({name:"gun_5", type:11, fireTimerMax:100, fireTimerMin:100, counter:60, speed:0, size:100, damage:5});
guns.push({name:"gun_6", type:11, fireTimerMax:110, fireTimerMin:110, counter:70, speed:0, size:100, damage:5});
guns.push({name:"gun_7", type:11, fireTimerMax:120, fireTimerMin:120, counter:80, speed:0, size:100, damage:5});
}
}
Symbol 863 MovieClip [__Packages.Enemy_91] Frame 0
class Enemy_91 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_91 () {
super();
}
function ConfigureEnemy() {
numLife = 50;
numSpeed = 4;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(7, 20)});
guns.push({name:"gun_1", type:13, fireTimerMax:5, fireTimerMin:5, counter:1, speed:7.5, size:100, damage:2});
}
}
Symbol 864 MovieClip [__Packages.Enemy_92] Frame 0
class Enemy_92 extends Enemy
{
var numLife, numSpeed, arrEvents;
function Enemy_92 () {
super();
}
function ConfigureEnemy() {
numLife = 5;
numSpeed = 1;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Ultra", values:Array(1, 3)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 7)});
arrEvents.push({name:"Enemy Hit", triggerValue:-1, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(1, 0)});
}
}
Symbol 865 MovieClip [__Packages.Enemy_93] Frame 0
class Enemy_93 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_93 () {
super();
}
function ConfigureEnemy() {
numLife = 6;
numSpeed = 2.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 10)});
arrEvents.push({name:"Enemy Hit", triggerValue:-1, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(1, 0)});
guns.push({name:"gun_1", type:1, fireTimerMax:80, fireTimerMin:40, counter:60, speed:6, size:100, damage:1});
}
}
Symbol 866 MovieClip [__Packages.Enemy_94] Frame 0
class Enemy_94 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_94 () {
super();
}
function ConfigureEnemy() {
numLife = 4;
numSpeed = 3.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(3, 10)});
guns.push({name:"gun_1", type:1, fireTimerMax:75, fireTimerMin:35, counter:55, speed:7, size:100, damage:1});
}
}
Symbol 867 MovieClip [__Packages.Enemy_95] Frame 0
class Enemy_95 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_95 () {
super();
}
function ConfigureEnemy() {
numLife = 3;
numSpeed = 4;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 8)});
guns.push({name:"gun_1", type:1, fireTimerMax:60, fireTimerMin:40, counter:40, speed:5, size:100, damage:1});
}
}
Symbol 868 MovieClip [__Packages.Enemy_96] Frame 0
class Enemy_96 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_96 () {
super();
}
function ConfigureEnemy() {
numLife = 40;
numSpeed = 3;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(4, 15)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(3, 8)});
guns.push({name:"gun_1", type:1, fireTimerMax:120, fireTimerMin:80, counter:100, speed:5, size:200, damage:3});
guns.push({name:"gun_2", type:1, fireTimerMax:90, fireTimerMin:60, counter:60, speed:7, size:100, damage:2});
guns.push({name:"gun_3", type:1, fireTimerMax:90, fireTimerMin:60, counter:60, speed:7, size:100, damage:2});
}
}
Symbol 869 MovieClip [__Packages.Enemy_97] Frame 0
class Enemy_97 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_97 () {
super();
}
function ConfigureEnemy() {
numLife = 600;
numSpeed = 0.25;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(10, 20)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(4, 10)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Ultra", values:Array(4, 5)});
guns.push({name:"gun_1", type:18, fireTimerMax:2, fireTimerMin:2, counter:40, speed:8, size:200, damage:3});
guns.push({name:"gun_2", type:7, fireTimerMax:120, fireTimerMin:80, counter:100, speed:6, size:100, damage:2});
guns.push({name:"gun_3", type:7, fireTimerMax:120, fireTimerMin:80, counter:100, speed:6, size:100, damage:2});
guns.push({name:"gun_4", type:14, fireTimerMax:60, fireTimerMin:60, counter:60, speed:0, size:100, damage:5});
guns.push({name:"gun_5", type:14, fireTimerMax:60, fireTimerMin:60, counter:80, speed:0, size:100, damage:5});
guns.push({name:"gun_6", type:20, fireTimerMax:400, fireTimerMin:600, counter:80, speed:6, size:100, damage:1});
}
}
Symbol 870 MovieClip [__Packages.Enemy_98] Frame 0
class Enemy_98 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_98 () {
super();
}
function ConfigureEnemy() {
numLife = 60;
numSpeed = 1.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 20)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(7, 10)});
arrEvents.push({name:"Explode Seekers", triggerValue:0, hit:false, custom:false, action:"EVENT_SeekersDie", values:0});
guns.push({name:"gun_3", type:11, fireTimerMax:60, fireTimerMin:60, counter:0, speed:0, size:100, damage:5});
guns.push({name:"gun_4", type:11, fireTimerMax:90, fireTimerMin:90, counter:30, speed:0, size:100, damage:5});
guns.push({name:"gun_1", type:16, fireTimerMax:150, fireTimerMin:100, counter:60, speed:4.5, size:100, damage:4});
guns.push({name:"gun_2", type:13, fireTimerMax:5, fireTimerMin:5, counter:1, speed:7.5, size:100, damage:2});
}
}
Symbol 871 MovieClip [__Packages.Enemy_99] Frame 0
class Enemy_99 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_99 () {
super();
}
function ConfigureEnemy() {
numLife = 200;
numSpeed = 1.5;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(10, 20)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(6, 10)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Ultra", values:Array(2, 4)});
guns.push({name:"gun_1", type:13, fireTimerMax:5, fireTimerMin:5, counter:1, speed:7.5, size:100, damage:2});
guns.push({name:"gun_2", type:18, fireTimerMax:2, fireTimerMin:2, counter:40, speed:9, size:100, damage:2});
guns.push({name:"gun_3", type:6, fireTimerMax:80, fireTimerMin:50, counter:70, speed:8, size:100, damage:2});
guns.push({name:"gun_4", type:6, fireTimerMax:80, fireTimerMin:50, counter:70, speed:8, size:100, damage:2});
}
}
Symbol 872 MovieClip [__Packages.Enemy_B2] Frame 0
class Enemy_B2 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_B2 () {
super();
}
function ConfigureEnemy() {
numLife = 200;
numSpeed = 0;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 10)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(5, 6)});
guns.push({name:"gun_1", type:5, fireTimerMax:80, fireTimerMin:50, counter:60, speed:5.5, size:100, damage:2});
}
}
Symbol 873 MovieClip [__Packages.Enemy_B1] Frame 0
class Enemy_B1 extends Enemy
{
var numLife, numSpeed, blnBossHead, arrEvents, guns;
function Enemy_B1 () {
super();
}
function ConfigureEnemy() {
numLife = 400;
numSpeed = 0;
blnBossHead = true;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Ultra", values:Array(5, 3)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(3, 6)});
guns.push({name:"gun_1", type:12, fireTimerMax:100, fireTimerMin:70, counter:100, speed:6, size:100, damage:0});
guns.push({name:"gun_2", type:18, fireTimerMax:2, fireTimerMin:2, counter:40, speed:8, size:250, damage:3});
}
}
Symbol 874 MovieClip [__Packages.Enemy_B3] Frame 0
class Enemy_B3 extends Enemy
{
var numLife, numSpeed, arrEvents, guns;
function Enemy_B3 () {
super();
}
function ConfigureEnemy() {
numLife = 200;
numSpeed = 0;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(2, 10)});
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles_Large", values:Array(7, 6)});
guns.push({name:"gun_1", type:14, fireTimerMax:60, fireTimerMin:60, counter:60, speed:0, size:100, damage:5});
guns.push({name:"gun_2", type:14, fireTimerMax:60, fireTimerMin:60, counter:80, speed:0, size:100, damage:5});
}
}
Symbol 875 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 876 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 877 MovieClip [__Packages.UpgradeTree] Frame 0
class UpgradeTree
{
var arrNodes, startNode, currentNode, arrPointReqs;
function UpgradeTree () {
arrNodes = new Array(27);
var _local2 = 0;
while (_local2 < arrNodes.length) {
arrNodes[_local2] = new MapNode();
arrNodes[_local2].SetLabel("State " + _local2);
_local2++;
}
startNode = arrNodes[1];
currentNode = arrNodes[1];
AttachNodes();
arrPointReqs = new Array();
arrPointReqs.push({min:0, max:75});
arrPointReqs.push({min:75, max:200});
arrPointReqs.push({min:200, max:400});
arrPointReqs.push({min:400, max:800});
arrPointReqs.push({min:800, max:1300});
arrPointReqs.push({min:1300, max:999999});
SetNodeStates();
}
function RemoveFirstNode() {
arrNodes.shift();
}
function GetNodeWithID(intID) {
var _local3;
var _local2 = 0;
while (_local2 < arrNodes.length) {
if (intID == arrNodes[_local2].nodeData._id) {
_local3 = arrNodes[_local2];
break;
}
_local2++;
}
return(_local3);
}
function SetNodeWithID(intID) {
var _local3;
var _local2 = 0;
while (_local2 < arrNodes.length) {
if (intID == arrNodes[_local2].nodeData._id) {
_local3 = arrNodes[_local2];
break;
}
_local2++;
}
currentNode = _local3;
}
function Upgrade(moveTo) {
var _local2;
currentNode.Reset();
if (moveTo == "second_mc") {
currentNode.NextChild();
} else if (moveTo == "third_mc") {
currentNode.NextChild();
currentNode.NextChild();
}
_local2 = currentNode.GetChild();
_local2.SetParent(currentNode);
currentNode = _local2;
}
function UpgradeAlreadySelected() {
var _local2;
currentNode.Reset();
_local2 = currentNode.GetChild();
if (_local2.nodeData._selected == true) {
currentNode = _local2;
return(true);
}
while (currentNode.NextChild()) {
_local2 = currentNode.GetChild();
if (_local2.nodeData._selected == true) {
currentNode = _local2;
return(true);
}
}
return(false);
}
function DownGrade(moveTo) {
currentNode = currentNode.GetParent();
}
function AttachNodes() {
arrNodes[1].PointToNode(arrNodes[2]);
arrNodes[1].PointToNode(arrNodes[3]);
arrNodes[1].PointToNode(arrNodes[4]);
arrNodes[2].PointToNode(arrNodes[5]);
arrNodes[2].PointToNode(arrNodes[6]);
arrNodes[3].PointToNode(arrNodes[6]);
arrNodes[3].PointToNode(arrNodes[7]);
arrNodes[4].PointToNode(arrNodes[7]);
arrNodes[4].PointToNode(arrNodes[8]);
arrNodes[5].PointToNode(arrNodes[9]);
arrNodes[5].PointToNode(arrNodes[10]);
arrNodes[5].PointToNode(arrNodes[11]);
arrNodes[6].PointToNode(arrNodes[10]);
arrNodes[6].PointToNode(arrNodes[11]);
arrNodes[6].PointToNode(arrNodes[12]);
arrNodes[7].PointToNode(arrNodes[11]);
arrNodes[7].PointToNode(arrNodes[12]);
arrNodes[7].PointToNode(arrNodes[13]);
arrNodes[8].PointToNode(arrNodes[12]);
arrNodes[8].PointToNode(arrNodes[13]);
arrNodes[8].PointToNode(arrNodes[14]);
arrNodes[9].PointToNode(arrNodes[15]);
arrNodes[9].PointToNode(arrNodes[16]);
arrNodes[10].PointToNode(arrNodes[15]);
arrNodes[10].PointToNode(arrNodes[16]);
arrNodes[10].PointToNode(arrNodes[17]);
arrNodes[11].PointToNode(arrNodes[16]);
arrNodes[11].PointToNode(arrNodes[17]);
arrNodes[11].PointToNode(arrNodes[18]);
arrNodes[12].PointToNode(arrNodes[17]);
arrNodes[12].PointToNode(arrNodes[18]);
arrNodes[12].PointToNode(arrNodes[19]);
arrNodes[13].PointToNode(arrNodes[18]);
arrNodes[13].PointToNode(arrNodes[19]);
arrNodes[13].PointToNode(arrNodes[20]);
arrNodes[14].PointToNode(arrNodes[19]);
arrNodes[14].PointToNode(arrNodes[20]);
arrNodes[15].PointToNode(arrNodes[21]);
arrNodes[15].PointToNode(arrNodes[22]);
arrNodes[16].PointToNode(arrNodes[21]);
arrNodes[16].PointToNode(arrNodes[22]);
arrNodes[16].PointToNode(arrNodes[23]);
arrNodes[17].PointToNode(arrNodes[22]);
arrNodes[17].PointToNode(arrNodes[23]);
arrNodes[17].PointToNode(arrNodes[24]);
arrNodes[18].PointToNode(arrNodes[23]);
arrNodes[18].PointToNode(arrNodes[24]);
arrNodes[18].PointToNode(arrNodes[25]);
arrNodes[19].PointToNode(arrNodes[24]);
arrNodes[19].PointToNode(arrNodes[25]);
arrNodes[19].PointToNode(arrNodes[26]);
arrNodes[20].PointToNode(arrNodes[25]);
arrNodes[20].PointToNode(arrNodes[26]);
}
function SetNodeStates() {
arrNodes[1].nodeData._name = "Basic Tank";
arrNodes[1].nodeData._id = 1;
arrNodes[1].nodeData._arrPrimaryWeapons.push({type:1, name:"gun_1", delay:15});
arrNodes[1].nodeData._minPoints = arrPointReqs[0].min;
arrNodes[1].nodeData._maxPoints = arrPointReqs[0].max;
arrNodes[1].nodeData._description = "This is your starting tank.";
arrNodes[1].nodeData._primary = "Basic Cannon";
arrNodes[1].nodeData._secondary = "None";
arrNodes[1].nodeData._primaryDescription = "Fires single bubble rounds.";
arrNodes[1].nodeData._secondaryDescription = "-";
arrNodes[2].nodeData._name = "Fighter #1";
arrNodes[2].nodeData._id = 2;
arrNodes[2].nodeData._speed = 1.1;
arrNodes[2].nodeData._arrPrimaryWeapons.push({type:1, name:"gun_1", delay:4});
arrNodes[2].nodeData._minPoints = arrPointReqs[1].min;
arrNodes[2].nodeData._maxPoints = arrPointReqs[1].max;
arrNodes[2].nodeData._description = "A small, fast, and agile tank with fast fire rate.";
arrNodes[2].nodeData._primary = "Machine Gun";
arrNodes[2].nodeData._secondary = "None";
arrNodes[2].nodeData._primaryDescription = "Fires single bubble rounds in rapid succession.";
arrNodes[2].nodeData._secondaryDescription = "-";
arrNodes[3].nodeData._name = "Balanced #1";
arrNodes[3].nodeData._id = 3;
arrNodes[3].nodeData._arrPrimaryWeapons.push({type:2, name:"gun_1", delay:8});
arrNodes[3].nodeData._minPoints = arrPointReqs[1].min;
arrNodes[3].nodeData._maxPoints = arrPointReqs[1].max;
arrNodes[3].nodeData._description = "A balance between speed and strength.";
arrNodes[3].nodeData._primary = "2 Shot Parallel";
arrNodes[3].nodeData._secondary = "None";
arrNodes[3].nodeData._primaryDescription = "Fires 2 rounds in side by side fashion.";
arrNodes[3].nodeData._secondaryDescription = "-";
arrNodes[4].nodeData._name = "Heavy #1";
arrNodes[4].nodeData._id = 4;
arrNodes[4].nodeData._speed = 0.85;
arrNodes[4].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_1", delay:16});
arrNodes[4].nodeData._minPoints = arrPointReqs[1].min;
arrNodes[4].nodeData._maxPoints = arrPointReqs[1].max;
arrNodes[4].nodeData._description = "Slightly slower and less agile, but packs a bigger punch.";
arrNodes[4].nodeData._primary = "Heavy Cannon";
arrNodes[4].nodeData._secondary = "None";
arrNodes[4].nodeData._primaryDescription = "Fires a single, heavy bubble round that does substantial damage.";
arrNodes[4].nodeData._secondaryDescription = "-";
arrNodes[5].nodeData._name = "Fighter #2";
arrNodes[5].nodeData._id = 5;
arrNodes[5].nodeData._speed = 1.2;
arrNodes[5].nodeData._arrPrimaryWeapons.push({type:4, name:"gun_1", delay:6});
arrNodes[5].nodeData._arrSecondaryWeapons.push({type:8, name:"---", delay:60});
arrNodes[5].nodeData._minPoints = arrPointReqs[2].min;
arrNodes[5].nodeData._maxPoints = arrPointReqs[2].max;
arrNodes[5].nodeData._description = "An even better version of the fighter, speed and agility are its trademarks.";
arrNodes[5].nodeData._primary = "3 Bullet Spread";
arrNodes[5].nodeData._secondary = "Shield";
arrNodes[5].nodeData._primaryDescription = "Fires 3 bullets spread out.";
arrNodes[5].nodeData._secondaryDescription = "The shield can be summoned in rapid bursts to protect you from all incoming damage.";
arrNodes[6].nodeData._name = "Balanced Fighter #1";
arrNodes[6].nodeData._id = 6;
arrNodes[6].nodeData._arrPrimaryWeapons.push({type:5, name:"gun_1", delay:8});
arrNodes[6].nodeData._arrSecondaryWeapons.push({type:8, name:"---", delay:60});
arrNodes[6].nodeData._minPoints = arrPointReqs[2].min;
arrNodes[6].nodeData._maxPoints = arrPointReqs[2].max;
arrNodes[6].nodeData._description = "A balanced tank slightly in favor of speed and agility.";
arrNodes[6].nodeData._primary = "3 Shot Parallel";
arrNodes[6].nodeData._secondary = "Shield";
arrNodes[6].nodeData._primaryDescription = "Fires 3 bullets in side by side fashion.";
arrNodes[6].nodeData._secondaryDescription = "The shield can be summoned in rapid bursts to protect you from all incoming damage.";
arrNodes[7].nodeData._name = "Balanced Heavy #1";
arrNodes[7].nodeData._id = 7;
arrNodes[7].nodeData._speed = 0.9;
arrNodes[7].nodeData._arrPrimaryWeapons.push({type:5, name:"gun_1", delay:8});
arrNodes[7].nodeData._arrSecondaryWeapons.push({type:6, name:"gun_2", delay:40});
arrNodes[7].nodeData._minPoints = arrPointReqs[2].min;
arrNodes[7].nodeData._maxPoints = arrPointReqs[2].max;
arrNodes[7].nodeData._description = "A balanced tank slightly in favor of heavy weaponry, but lighter than the Heavy Tank.";
arrNodes[7].nodeData._primary = "3 Shot Parallel";
arrNodes[7].nodeData._secondary = "Mines";
arrNodes[7].nodeData._primaryDescription = "Fires 3 bullets in side by side fashion.";
arrNodes[7].nodeData._secondaryDescription = "Mines can be laid and will dish out heavy damage when an enemy wanders over them.";
arrNodes[8].nodeData._name = "Heavy #2";
arrNodes[8].nodeData._id = 8;
arrNodes[8].nodeData._speed = 0.7;
arrNodes[8].nodeData._arrPrimaryWeapons.push({type:7, name:"gun_1", delay:8});
arrNodes[8].nodeData._arrSecondaryWeapons.push({type:6, name:"gun_2", delay:40});
arrNodes[8].nodeData._minPoints = arrPointReqs[2].min;
arrNodes[8].nodeData._maxPoints = arrPointReqs[2].max;
arrNodes[8].nodeData._description = "A large and slow tank, but heavily armed.";
arrNodes[8].nodeData._primary = "5 Shot Parallel";
arrNodes[8].nodeData._secondary = "Mines";
arrNodes[8].nodeData._primaryDescription = "Fires 5 bullets in side by side fashion.";
arrNodes[8].nodeData._secondaryDescription = "Mines can be laid and will dish out heavy damage when an enemy wanders over them.";
arrNodes[9].nodeData._name = "Sniper #1";
arrNodes[9].nodeData._id = 9;
arrNodes[9].nodeData._speed = 1.2;
arrNodes[9].nodeData._arrPrimaryWeapons.push({type:9, name:"gun_1", delay:20});
arrNodes[9].nodeData._arrSecondaryWeapons.push({type:10, name:"---", delay:80});
arrNodes[9].nodeData._minPoints = arrPointReqs[3].min;
arrNodes[9].nodeData._maxPoints = arrPointReqs[3].max;
arrNodes[9].nodeData._description = "A nimble fighter that fires single, powerful rounds.";
arrNodes[9].nodeData._primary = "Pierce Shot";
arrNodes[9].nodeData._secondary = "Teleport";
arrNodes[9].nodeData._primaryDescription = "The pierce shot has a long recharge rate, but deals a lot of damage and can pass through multiple enemies.";
arrNodes[9].nodeData._secondaryDescription = "Pressing the secondary fire button will instantly transport you to wherever your mouse cursor is located.";
arrNodes[9].nodeData._locked = true;
arrNodes[10].nodeData._name = "Fighter #3";
arrNodes[10].nodeData._id = 10;
arrNodes[10].nodeData._speed = 1.2;
arrNodes[10].nodeData._arrPrimaryWeapons.push({type:11, name:"gun_1", delay:4});
arrNodes[10].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_2", delay:100});
arrNodes[10].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_3", delay:100});
arrNodes[10].nodeData._minPoints = arrPointReqs[3].min;
arrNodes[10].nodeData._maxPoints = arrPointReqs[3].max;
arrNodes[10].nodeData._description = "3rd generation fighter. Focus is on speed and agility.";
arrNodes[10].nodeData._primary = "Upgraded Machine Gun";
arrNodes[10].nodeData._secondary = "Seekers";
arrNodes[10].nodeData._primaryDescription = "The upgraded machine gun has a very fast fire rate with increased damage over the standard machine gun.";
arrNodes[10].nodeData._secondaryDescription = "Launch 2 bubble missiles that will seek out and follow your enemies.";
arrNodes[11].nodeData._name = "Bal. Fighter #2";
arrNodes[11].nodeData._id = 11;
arrNodes[11].nodeData._speed = 1;
arrNodes[11].nodeData._arrPrimaryWeapons.push({type:13, name:"gun_1", delay:9});
arrNodes[11].nodeData._arrSecondaryWeapons.push({type:14, name:"gun_2", delay:120});
arrNodes[11].nodeData._minPoints = arrPointReqs[3].min;
arrNodes[11].nodeData._maxPoints = arrPointReqs[3].max;
arrNodes[11].nodeData._description = "Balanced tank slightly in favor of speed and agility.";
arrNodes[11].nodeData._primary = "5 Bullet Spread";
arrNodes[11].nodeData._secondary = "Short Stun Burst";
arrNodes[11].nodeData._primaryDescription = "Fires 5 bullets spread out.";
arrNodes[11].nodeData._secondaryDescription = "A pulse is issued out from the tank that stuns surrounding enemies for a short period of time.";
arrNodes[12].nodeData._name = "Bal. Heavy #2";
arrNodes[12].nodeData._id = 12;
arrNodes[12].nodeData._speed = 0.95;
arrNodes[12].nodeData._arrPrimaryWeapons.push({type:13, name:"gun_1", delay:9});
arrNodes[12].nodeData._arrSecondaryWeapons.push({type:15, name:"gun_2", delay:100});
arrNodes[12].nodeData._minPoints = arrPointReqs[3].min;
arrNodes[12].nodeData._maxPoints = arrPointReqs[3].max;
arrNodes[12].nodeData._description = "A balanced tank slightly in favor of heavy weaponry, but lighter than the Heavy Tank.";
arrNodes[12].nodeData._primary = "5 Bullet Spread";
arrNodes[12].nodeData._secondary = "Area Burst";
arrNodes[12].nodeData._primaryDescription = "Fires 5 bullets spread out.";
arrNodes[12].nodeData._secondaryDescription = "A burst is emitted from the tank that damages all nearby enemies.";
arrNodes[13].nodeData._name = "Heavy #3";
arrNodes[13].nodeData._id = 13;
arrNodes[13].nodeData._speed = 0.4;
arrNodes[13].nodeData._turnMode = 2;
arrNodes[13].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_1", delay:16});
arrNodes[13].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_2", delay:16});
arrNodes[13].nodeData._arrSecondaryWeapons.push({type:16, name:"gun_3", delay:20});
arrNodes[13].nodeData._minPoints = arrPointReqs[3].min;
arrNodes[13].nodeData._maxPoints = arrPointReqs[3].max;
arrNodes[13].nodeData._description = "Large and slow tank that boasts heavy weaponry and brute force.";
arrNodes[13].nodeData._primary = "2 Large Cannons";
arrNodes[13].nodeData._secondary = "Sticky Cannon";
arrNodes[13].nodeData._primaryDescription = "Fires 2 large bullets simultaneously.";
arrNodes[13].nodeData._secondaryDescription = "Secondary fire button launches sticky bullets that render the target immobile.";
arrNodes[14].nodeData._name = "BFT #1";
arrNodes[14].nodeData._id = 14;
arrNodes[14].nodeData._speed = 0.35;
arrNodes[14].nodeData._turnMode = 2;
arrNodes[14].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_1", delay:13});
arrNodes[14].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_2", delay:13, target:""});
arrNodes[14].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_3", delay:13, target:""});
arrNodes[14].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_4", delay:100});
arrNodes[14].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_5", delay:100});
arrNodes[14].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_6", delay:100});
arrNodes[14].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_7", delay:100});
arrNodes[14].nodeData._hasAutoGuns = true;
arrNodes[14].nodeData._minPoints = arrPointReqs[3].min;
arrNodes[14].nodeData._maxPoints = arrPointReqs[3].max;
arrNodes[14].nodeData._description = "Very large and slow tank that seeks enemies to destroy.";
arrNodes[14].nodeData._primary = "1 B. Shot, 2 Sm. Auto";
arrNodes[14].nodeData._secondary = "Seekers";
arrNodes[14].nodeData._primaryDescription = "You have control of a large cannon while 2 smaller cannons will seek out enemy targets and fire automatically.";
arrNodes[14].nodeData._secondaryDescription = "Pressing the secondary fire button will launch 4 seeking bubble missiles at the nearest enemy.";
arrNodes[14].nodeData._locked = true;
arrNodes[15].nodeData._name = "Sniper #2";
arrNodes[15].nodeData._id = 15;
arrNodes[15].nodeData._speed = 1.35;
arrNodes[15].nodeData._arrPrimaryWeapons.push({type:18, name:"gun_1", delay:25});
arrNodes[15].nodeData._arrSecondaryWeapons.push({type:10, name:"---", delay:15});
arrNodes[15].nodeData._minPoints = arrPointReqs[4].min;
arrNodes[15].nodeData._maxPoints = arrPointReqs[4].max;
arrNodes[15].nodeData._description = "A nimble fighter that fires single, powerful rounds.";
arrNodes[15].nodeData._primary = "Strong Pierce";
arrNodes[15].nodeData._secondary = "Upgraded Teleport";
arrNodes[15].nodeData._primaryDescription = "The pierce shot has a long recharge rate, but deals a lot of damage and can pass through multiple enemies.";
arrNodes[15].nodeData._secondaryDescription = "Pressing the secondary fire button will instantly transport you to wherever your mouse cursor is located.";
arrNodes[15].nodeData._locked = true;
arrNodes[16].nodeData._name = "Fighter #4";
arrNodes[16].nodeData._id = 16;
arrNodes[16].nodeData._speed = 1.3;
arrNodes[16].nodeData._arrPrimaryWeapons.push({type:2, name:"gun_1", delay:3});
arrNodes[16].nodeData._arrSecondaryWeapons.push({type:19, name:"gun_2", delay:150});
arrNodes[16].nodeData._minPoints = arrPointReqs[4].min;
arrNodes[16].nodeData._maxPoints = arrPointReqs[4].max;
arrNodes[16].nodeData._description = "A small and agile tank that can dish out rapid fire.";
arrNodes[16].nodeData._primary = "2 Shot MG";
arrNodes[16].nodeData._secondary = "Star Burst Cannon";
arrNodes[16].nodeData._primaryDescription = "2 small bullets are fired side by side in rapid succession.";
arrNodes[16].nodeData._secondaryDescription = "The Star Burst Cannon fires a bullet that explodes after a short timer, emitting 360 degrees of pierce shots.";
arrNodes[17].nodeData._name = "Bal. Fighter #3";
arrNodes[17].nodeData._id = 17;
arrNodes[17].nodeData._speed = 1;
arrNodes[17].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_1", delay:11});
arrNodes[17].nodeData._arrPrimaryWeapons.push({type:1, name:"gun_2", delay:11});
arrNodes[17].nodeData._arrPrimaryWeapons.push({type:1, name:"gun_3", delay:11});
arrNodes[17].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_4", delay:100});
arrNodes[17].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_5", delay:100});
arrNodes[17].nodeData._arrSecondaryWeapons.push({type:12, name:"gun_6", delay:100});
arrNodes[17].nodeData._minPoints = arrPointReqs[4].min;
arrNodes[17].nodeData._maxPoints = arrPointReqs[4].max;
arrNodes[17].nodeData._description = "A medium sized tank that's fast yet powerful.";
arrNodes[17].nodeData._primary = "2 Sm., 1 B. Gun";
arrNodes[17].nodeData._secondary = "Seekers";
arrNodes[17].nodeData._primaryDescription = "Fire 2 small guns and 1 large cannon simultaneously.";
arrNodes[17].nodeData._secondaryDescription = "Launch 3 bubble missiles that will seek out and follow your enemies.";
arrNodes[18].nodeData._name = "Bal. Heavy #3";
arrNodes[18].nodeData._id = 18;
arrNodes[18].nodeData._speed = 0.85;
arrNodes[18].nodeData._arrPrimaryWeapons.push({type:20, name:"gun_1", delay:6});
arrNodes[18].nodeData._arrSecondaryWeapons.push({type:21, name:"gun_2", delay:100});
arrNodes[18].nodeData._minPoints = arrPointReqs[4].min;
arrNodes[18].nodeData._maxPoints = arrPointReqs[4].max;
arrNodes[18].nodeData._description = "A balanced tank slightly in favor of heavy weaponry, but faster than the Heavy Tank.";
arrNodes[18].nodeData._primary = "2 Large Shell MG";
arrNodes[18].nodeData._secondary = "Area Burst Cannon";
arrNodes[18].nodeData._primaryDescription = "Fires 2 large cannons in side by side fashion at a rapid speed.";
arrNodes[18].nodeData._secondaryDescription = "A large shell is fired that eplodes upon contact with the enemy, damaging others nearby.";
arrNodes[19].nodeData._name = "Heavy #4";
arrNodes[19].nodeData._id = 19;
arrNodes[19].nodeData._speed = 0.4;
arrNodes[19].nodeData._turnMode = 2;
arrNodes[19].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_1", delay:16});
arrNodes[19].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_2", delay:16});
arrNodes[19].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_3", delay:10, target:""});
arrNodes[19].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_4", delay:10, target:""});
arrNodes[19].nodeData._arrSecondaryWeapons.push({type:22, name:"gun_5", delay:100});
arrNodes[19].nodeData._hasAutoGuns = true;
arrNodes[19].nodeData._minPoints = arrPointReqs[4].min;
arrNodes[19].nodeData._maxPoints = arrPointReqs[4].max;
arrNodes[19].nodeData._description = "Large and slow tank that boasts heavy weaponry and brute force.";
arrNodes[19].nodeData._primary = "2 B. Shot, 2 Sm. Auto";
arrNodes[19].nodeData._secondary = "Sticky Burst";
arrNodes[19].nodeData._primaryDescription = "You have control of 2 large cannons while 2 smaller cannons will seek out enemy targets and fire automatically.";
arrNodes[19].nodeData._secondaryDescription = "Many sticky bullets are launched from the tank in all directions making enemies immobile.";
arrNodes[20].nodeData._name = "BFT #2";
arrNodes[20].nodeData._id = 20;
arrNodes[20].nodeData._speed = 0.35;
arrNodes[20].nodeData._turnMode = 2;
arrNodes[20].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_1", delay:16});
arrNodes[20].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_2", delay:16});
arrNodes[20].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_3", delay:15, target:""});
arrNodes[20].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_4", delay:15, target:""});
arrNodes[20].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_5", delay:15, target:""});
arrNodes[20].nodeData._arrSecondaryWeapons.push({type:23, name:"gun_6", delay:125});
arrNodes[20].nodeData._hasAutoGuns = true;
arrNodes[20].nodeData._minPoints = arrPointReqs[4].min;
arrNodes[20].nodeData._maxPoints = arrPointReqs[4].max;
arrNodes[20].nodeData._description = "Very large and slow tank that stuns and kills.";
arrNodes[20].nodeData._primary = "2 B. Shot, 3 Sm. Auto";
arrNodes[20].nodeData._secondary = "Large Stun Burst";
arrNodes[20].nodeData._primaryDescription = "You have control 2 large cannons while 3 smaller cannons will seek out enemy targets and fire automatically.";
arrNodes[20].nodeData._secondaryDescription = "A large pulse is issued out from the tank that stuns surrounding enemies for a short period of time.";
arrNodes[20].nodeData._locked = true;
arrNodes[21].nodeData._name = "Ghost Sniper";
arrNodes[21].nodeData._id = 21;
arrNodes[21].nodeData._speed = 1.4;
arrNodes[21].nodeData._arrPrimaryWeapons.push({type:25, name:"gun_1", delay:35});
arrNodes[21].nodeData._arrSecondaryWeapons.push({type:24, name:"---", delay:1});
arrNodes[21].nodeData._minPoints = arrPointReqs[5].min;
arrNodes[21].nodeData._maxPoints = arrPointReqs[5].max;
arrNodes[21].nodeData._description = "Very fast and agile tank that can come apart and reform at will.";
arrNodes[21].nodeData._primary = "Explosive Pierce Shot";
arrNodes[21].nodeData._secondary = "Disassemble";
arrNodes[21].nodeData._primaryDescription = "Long recharge rate, but deals a lot of damage, explodes on impact, and can pass through multiple enemies.";
arrNodes[21].nodeData._secondaryDescription = "Hold secondary fire to cause the tank to break apart, making it invincible but incapable of firing. Release to reform.";
arrNodes[21].nodeData._locked = true;
arrNodes[22].nodeData._name = "Super Fighter";
arrNodes[22].nodeData._id = 22;
arrNodes[22].nodeData._speed = 1.35;
arrNodes[22].nodeData._arrPrimaryWeapons.push({type:5, name:"gun_1", delay:4});
arrNodes[22].nodeData._arrSecondaryWeapons.push({type:26, name:"gun_2", delay:12});
arrNodes[22].nodeData._minPoints = arrPointReqs[5].min;
arrNodes[22].nodeData._maxPoints = arrPointReqs[5].max;
arrNodes[22].nodeData._description = "A small and agile tank that can dish out rapid fire and seekers.";
arrNodes[22].nodeData._primary = "3 Shot MG";
arrNodes[22].nodeData._secondary = "Orbital Seekers";
arrNodes[22].nodeData._primaryDescription = "Fires 3 shots side by side in rapid succession.";
arrNodes[22].nodeData._secondaryDescription = "Drones will automatically spawn and surround you. They will leave you and damage enemies that get too close.";
arrNodes[23].nodeData._name = "Leecher Tank";
arrNodes[23].nodeData._id = 23;
arrNodes[23].nodeData._speed = 1.1;
arrNodes[23].nodeData._arrPrimaryWeapons.push({type:29, name:"gun_1", delay:10});
arrNodes[23].nodeData._arrSecondaryWeapons.push({type:30, name:"gun_2", delay:200});
arrNodes[23].nodeData._minPoints = arrPointReqs[5].min;
arrNodes[23].nodeData._maxPoints = arrPointReqs[5].max;
arrNodes[23].nodeData._description = "This tank sucks life from enemies and can infect them with virus bubbles.";
arrNodes[23].nodeData._primary = "Leeching Bullets";
arrNodes[23].nodeData._secondary = "Doomsday Infect";
arrNodes[23].nodeData._primaryDescription = "Whenever these bullets hit, they send the life taken from the enemy back to you.";
arrNodes[23].nodeData._secondaryDescription = "Pressing the secondary fire button will launch a virus drone. It will attack, infect, then explode the enemy to spawn.";
arrNodes[24].nodeData._name = "Drone Tank";
arrNodes[24].nodeData._id = 24;
arrNodes[24].nodeData._speed = 0.9;
arrNodes[24].nodeData._arrPrimaryWeapons.push({type:31, name:"gun_1", delay:80});
arrNodes[24].nodeData._arrSecondaryWeapons.push({type:32, name:"gun_2", delay:100});
arrNodes[24].nodeData._minPoints = arrPointReqs[5].min;
arrNodes[24].nodeData._maxPoints = arrPointReqs[5].max;
arrNodes[24].nodeData._description = "This tanks is the master of seeker drones.";
arrNodes[24].nodeData._primary = "Mitosis Seekers";
arrNodes[24].nodeData._secondary = "Drone Conversion";
arrNodes[24].nodeData._primaryDescription = "Mitosis seekers split to form many more seeker drones.";
arrNodes[24].nodeData._secondaryDescription = "A pulse is emitted from your tank that converts all enemy drones into seekers that turn on your enemies";
arrNodes[25].nodeData._name = "Super Heavy";
arrNodes[25].nodeData._id = 25;
arrNodes[25].nodeData._speed = 0.3;
arrNodes[25].nodeData._turnMode = 2;
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_7", delay:16});
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_8", delay:16});
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:28, name:"gun_9", delay:16});
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_1", delay:10, target:""});
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_2", delay:10, target:""});
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_3", delay:10, target:""});
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_4", delay:10, target:""});
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_5", delay:10, target:""});
arrNodes[25].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_6", delay:10, target:""});
arrNodes[25].nodeData._arrSecondaryWeapons.push({type:27, name:"gun_10", delay:100});
arrNodes[25].nodeData._hasAutoGuns = true;
arrNodes[25].nodeData._minPoints = arrPointReqs[5].min;
arrNodes[25].nodeData._maxPoints = arrPointReqs[5].max;
arrNodes[25].nodeData._description = "A massive behemoth of a bubble tank.";
arrNodes[25].nodeData._primary = "2 B. S, 6 Sm. A, 1 BB";
arrNodes[25].nodeData._secondary = "Massive Cannon";
arrNodes[25].nodeData._primaryDescription = "6 small cannons fire automatically while you control the 2 large cannons and 'bullet buster' which blocks bullets.";
arrNodes[25].nodeData._secondaryDescription = "Pressing the secondary fire button will fire the biggest bubble cannon in the game!";
arrNodes[26].nodeData._name = "BFT Carrier";
arrNodes[26].nodeData._id = 26;
arrNodes[26].nodeData._speed = 0.3;
arrNodes[26].nodeData._turnMode = 2;
arrNodes[26].nodeData._arrPrimaryWeapons.push({type:3, name:"gun_5", delay:12});
arrNodes[26].nodeData._arrPrimaryWeapons.push({type:28, name:"gun_6", delay:12});
arrNodes[26].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_1", delay:10, target:""});
arrNodes[26].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_2", delay:10, target:""});
arrNodes[26].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_3", delay:10, target:""});
arrNodes[26].nodeData._arrPrimaryWeapons.push({type:17, name:"gun_4", delay:10, target:""});
arrNodes[26].nodeData._arrSecondaryWeapons.push({type:33, name:"gun_7", delay:200});
arrNodes[26].nodeData._arrSecondaryWeapons.push({type:33, name:"gun_8", delay:200});
arrNodes[26].nodeData._arrSecondaryWeapons.push({type:33, name:"gun_9", delay:200});
arrNodes[26].nodeData._arrSecondaryWeapons.push({type:33, name:"gun_10", delay:200});
arrNodes[26].nodeData._arrSecondaryWeapons.push({type:33, name:"gun_11", delay:200});
arrNodes[26].nodeData._arrSecondaryWeapons.push({type:33, name:"gun_12", delay:200});
arrNodes[26].nodeData._hasAutoGuns = true;
arrNodes[26].nodeData._minPoints = arrPointReqs[5].min;
arrNodes[26].nodeData._maxPoints = arrPointReqs[5].max;
arrNodes[26].nodeData._description = "Giant tank that sends out swarms of fighters.";
arrNodes[26].nodeData._primary = "1 B. S, 4 Sm. A, 1 BB";
arrNodes[26].nodeData._secondary = "Ally Swarm";
arrNodes[26].nodeData._primaryDescription = "4 small cannons fire automatically while you control the one large cannon and 'bullet buster' which blocks bullets.";
arrNodes[26].nodeData._secondaryDescription = "Launch ally fighter tanks which will swarm around your mouse pointer and destroy nearby enemies.";
arrNodes[26].nodeData._locked = true;
}
}
Symbol 878 MovieClip [__Packages.MapNode] Frame 0
class MapNode
{
var arrChildren, strLabel, intIterator, nodeData, parentNode;
function MapNode () {
arrChildren = new Array();
strLabel = "";
intIterator = -1;
nodeData = new StateData();
}
function GetParent() {
return(parentNode);
}
function SetParent(newParent) {
parentNode = newParent;
}
function AddChild() {
var _local2 = new MapNode();
_local2.SetParent(this);
arrChildren.push(_local2);
if (arrChildren.length > 0) {
intIterator = arrChildren.length - 1;
}
}
function PointToNode(node) {
node.SetParent(this);
arrChildren.push(node);
if (arrChildren.length > 0) {
intIterator = arrChildren.length - 1;
}
}
function Print() {
var _local2 = 0;
while (_local2 < arrChildren.length) {
arrChildren[_local2].Print();
_local2++;
}
}
function Reset() {
if (arrChildren.length > 0) {
intIterator = 0;
} else {
intIterator = -1;
}
var _local2 = 0;
while (_local2 < arrChildren.length) {
arrChildren[_local2].Reset();
_local2++;
}
}
function GetChild() {
if (intIterator != -1) {
return(arrChildren[intIterator]);
}
return(undefined);
}
function NextChild() {
intIterator++;
if (intIterator >= arrChildren.length) {
if (arrChildren.length == 0) {
intIterator = -1;
} else {
intIterator = 0;
}
return(false);
}
return(true);
}
function PrevChild() {
intIterator--;
if (intIterator < 0) {
if (arrChildren.length == 0) {
intIterator = -1;
} else {
intIterator = arrChildren.length - 1;
}
return(false);
}
return(true);
}
function FirstChild() {
if (arrChildren.length == 0) {
intIterator = -1;
return(false);
}
intIterator = 0;
return(true);
}
function GetNumChildren() {
return(arrChildren.length);
}
function PrintPathTest() {
var _local2 = strLabel + ", ";
if (arrChildren.length > 0) {
var _local3 = Math.round(Math.random() * (arrChildren.length - 1));
_local2 = _local2 + arrChildren[_local3].PrintPathTest();
}
return(_local2);
}
function GetLabel() {
return(strLabel);
}
function SetLabel(newLabel) {
strLabel = newLabel;
}
}
Symbol 879 MovieClip [__Packages.StateData] Frame 0
class StateData
{
var _name, _id, _selected, _speed, _arrPrimaryWeapons, _arrSecondaryWeapons, _minPoints, _maxPoints, _description, _primary, _secondary, _primaryDescription, _secondaryDescription, _turnMode, _hasAutoGuns, _locked;
function StateData () {
_name = "";
_id = 0;
_selected = false;
_speed = 1;
_arrPrimaryWeapons = new Array();
_arrSecondaryWeapons = new Array();
_minPoints = 0;
_maxPoints = 0;
_description = "";
_primary = "";
_secondary = "";
_primaryDescription = "";
_secondaryDescription = "";
_turnMode = 1;
_hasAutoGuns = false;
_locked = false;
}
}
Symbol 880 MovieClip [__Packages.BubbleTanksGame] Frame 0
#initclip
if (!_global.BubbleTanksGame) {
var _local1 = function () {
this.mySharedObject = SharedObject.getLocal("settings");
this.upgradePath = new UpgradeTree();
this.blnWorldCreated = false;
this.worldCreateRow = 0;
this.worldCreateColumn = 0;
this.prevOutside = false;
this.secondBulletCounter = 0;
this.numJumps = 0;
this.intTutorialState = 1;
this.avatarLife = new DataObject();
this.avatarLife.Set(1);
this.maxAvatarLife = 1;
this.intStoreDepth_openMask = _root.openMask.getDepth();
this.intStoreDepth_overlay = _root.overlay.getDepth();
this.intStoreDepth_avatar = _root.avatar.getDepth();
this.intStoreDepth_bg = _root.bg.getDepth();
this.intStoreDepth_bubbleSplit = _root.bubbleSplit.getDepth();
this.intStoreDepth_effects_mc = _root.effects_mc.getDepth();
this.intStoreDepth_miniBubblesLayer_mc = _root.miniBubblesLayer_mc.getDepth();
this.intStoreDepth_bubbleMask = _root.bubbleMask.getDepth();
this.intStoreDepth_effectMask_mc = _root.effectMask_mc.getDepth();
this.intStoreDepth_pause_mc = _root.pause_mc.getDepth();
this.intStoreDepth_life = _root.life.getDepth();
this.intStoreDepth_fireRate_mc = _root.fireRate_mc.getDepth();
this.intStoreDepth_flash_mc = _root.flash_mc.getDepth();
_root.openMask.stop();
_root.openMask.swapDepths(1000001);
_root.overlay.swapDepths(1000000);
_root.avatar.swapDepths(510);
_root.bg.swapDepths(500);
_root.bubbleSplit.swapDepths(505);
_root.effects_mc.swapDepths(507);
_root.miniBubblesLayer_mc.swapDepths(508);
_root.bubbleMask.swapDepths(509);
_root.effectMask_mc.swapDepths(511);
_root.effects_mc.setMask("effectMask_mc");
_root.miniBubblesLayer_mc.setMask("bubbleMask");
this.runOnce = false;
this.transitionState = 0;
var thisRef = this;
this.mouseListener = new Object();
this.mouseListener.onMouseDown = function () {
thisRef.MouseDown();
};
this.mouseListener.onMouseUp = function () {
thisRef.MouseUp();
};
Mouse.addListener(this.mouseListener);
this.intPrimaryCounter = 0;
this.intSecondaryCounter = 0;
this.intAutoCounter = 0;
this.blnPrimaryActive = false;
this.vecMomentum = new Vector();
this.numAvatarMaxVelocity = 7;
this.numSensitivity = 0.4;
this.numResistence = 0.08;
this.stickyCounter = 0;
this.arrBullets = new Array();
this.arrBulletBusters = new Array();
this.arrFloatingBubbles = new Array();
this.arrDebris = new Array();
this.arrCleanup = new Array();
this.arrEffects = new Array();
this.arrUnderEffects = new Array();
this.arrMap = new Array();
this.arrAllySeekers = new Array();
this.arrAllies = new Array();
this.deltaList = new Array();
this.numBulletDepth = 100000 /* 0x0186A0 */;
this.numMineDepth = 100;
this.numAllyDepth = 560;
this.spawnedEnemyDepth = 20001;
this.arrFloatingBubblesDepth = 700;
this.effectDepth = 50000;
this.underEffectDepth = 10;
this.blnEnemiesCleared = false;
this.blnFlushList = false;
this.intWinFlag = -1;
this.intLifeState = 3;
this.intMaxHigh = 352;
this.intMaxLow = 412;
this.blnLifeFlag = false;
this.intLifeCounter = 0;
this.intFireRateState = 3;
this.intFireRateMaxHigh = -50;
this.intFireRateMaxLow = 5;
this.blnFireRateFlag = false;
this.intFireRateCounter = 0;
this.intKeyLock = 0;
this.intAssembledState = 0;
this.intAssembledFrame = 1;
this.blnSpaceDown = false;
this.world = new BubbleTanksWorld();
if (_global.gameMode == 1) {
}
this.arrMap.push({xloc:this.world.x, yloc:this.world.y, blnCreate:true, blnBoss:false});
_root.pause_mc._visible = false;
this.blnUpgradeFlag = false;
this.backgroundDepth = 100;
this.arrBackgrounds = new Array();
this.arrBackgrounds.push("bg_bubbles_301");
this.numEnemiesCreated = 0;
this.strCurrentScreen = "stats_mc";
this.blnWaitingToUpgrade = false;
this.arrUpgradePath = Array();
this.arrUpgradePath.push({min:1, max:76, name:"Starting Tank"});
this.arrUpgradePath.push({min:76, max:201, name:"Machine Gun Tank"});
this.arrUpgradePath.push({min:201, max:371, name:"3-Shot Tank"});
this.arrUpgradePath.push({min:371, max:999999, name:"Super Tank"});
this.mapLocX = undefined;
this.mapLocY = undefined;
this.intJumpsAsMax = 0;
this.blnBoss = false;
this.intBossState = 0;
this.intBossX = 0;
this.intBossY = 0;
this.intShieldCounter = 0;
this.intShieldWidth = 65;
this.intBubblesCollected = 0;
this.intEnemiesKilled = 0;
this.intShakeDuration = 0;
this.intShakeCounter = 0;
this.intShakeStart = 0;
this.vecScreenCoords = new Vector();
this.vecScreenCoords._x = _root.avatar._x;
this.vecScreenCoords._y = _root.avatar._y;
};
_global.BubbleTanksGame = _local1;
var _local2 = _local1.prototype;
_local2.QuitGame = function () {
Mouse.removeListener(this.mouseListener);
this.world.current.HideAllUnits();
this.CleanPickupBubbles();
this.CleanupBullets();
this.RemoveAllAllySeekers();
this.CleanEffects();
this.CleanAllies();
_root.openMask.swapDepths(this.intStoreDepth_openMask);
_root.overlay.swapDepths(this.intStoreDepth_overlay);
_root.avatar.swapDepths(this.intStoreDepth_avatar);
_root.bg.swapDepths(this.intStoreDepth_bg);
_root.bubbleSplit.swapDepths(this.intStoreDepth_bubbleSplit);
_root.effects_mc.swapDepths(this.intStoreDepth_effects_mc);
_root.miniBubblesLayer_mc.swapDepths(this.intStoreDepth_miniBubblesLayer_mc);
_root.bubbleMask.swapDepths(this.intStoreDepth_bubbleMask);
_root.effectMask_mc.swapDepths(this.intStoreDepth_effectMask_mc);
_root.pause_mc.swapDepths(this.intStoreDepth_pause_mc);
_root.life.swapDepths(this.intStoreDepth_life);
_root.fireRate_mc.swapDepths(this.intStoreDepth_fireRate_mc);
_root.flash_mc.swapDepths(this.intStoreDepth_flash_mc);
_root.effects_mc.setMask("");
_root.miniBubblesLayer_mc.setMask("");
_global.gamePaused = false;
_global.arena = new Bubblefield();
_global.arenaAvatar = 1;
_root.ExitGame();
};
_local2.CreateNewUnit = function (enemyType, startPos, CreatedFrom) {
if (enemyType == "Enemy_2") {
if (this._enemySet == 1) {
enemyType = "Enemy_2";
} else if (this._enemySet == 2) {
enemyType = "Enemy_93";
} else if (this._enemySet == 3) {
enemyType = "Enemy_94";
}
}
var _local4 = "enemy_" + this.spawnedEnemyDepth;
var _local6 = Math.round(Math.random() * 360) - 180;
this.world.current.AddSpawnedUnit(_local4, enemyType, startPos, this.spawnedEnemyDepth);
_root.attachMovie(enemyType, _local4, this.spawnedEnemyDepth);
this.spawnedEnemyDepth++;
if (this.spawnedEnemyDepth > 40000) {
this.spawnedEnemyDepth = 20001;
}
_root[_local4]._x = startPos._x;
_root[_local4]._y = startPos._y;
_root[_local4]._rotation = _local6;
if (((enemyType == "Enemy_Orbital_Seeker") || (enemyType == "Enemy_Sapper")) || (enemyType == "Enemy_Leecher")) {
_root[_local4].SetCreatedFrom(CreatedFrom);
}
return(_local4);
};
_local2.SafeToFire = function () {
if (this.transitionState == 0) {
return(true);
}
return(false);
};
_local2.StartGame = function () {
_root.pause_mc.swapDepths(1000010);
_root.life.swapDepths(1000005);
_root.fireRate_mc.swapDepths(1000006);
_root.flash_mc.swapDepths(1000008);
_root.flash_mc._visible = false;
_root.bg.boss_mc._visible = false;
_root.bg.bossUp_mc._visible = false;
_root.bg.bossRight_mc._visible = false;
_root.bg.bossDown_mc._visible = false;
_root.bg.bossLeft_mc._visible = false;
if (_global.gameMode == 2) {
var _local7 = new Vector();
this.world.current.ShowAllUnits(_local7);
_root.bg.tutShell_mc.tutorial.gotoAndStop(7);
this.avatarLife.Set(this.upgradePath.GetNodeWithID(_global.arenaAvatar).nodeData._minPoints + 50);
this.upgradePath.SetNodeWithID(_global.arenaAvatar);
_root.avatar.gotoAndStop(_global.arenaAvatar);
if (this.upgradePath.currentNode.nodeData._id < 21) {
_root.avatar.gun.gotoAndStop(50);
}
this.arenaTimer = new Timer();
this.arenaTimer.Start();
} else {
this._enemySet = 0;
this._enemySet2 = 0;
var _local6 = 1;
var _local4 = new Array(1, 2, 3);
var _local5 = 0;
while (_local5 < _local4.length) {
if (_local4[_local5] == _global.set1) {
_local4.splice(_local5, 1);
_local5--;
} else if (_local4[_local5] == _global.set2) {
_local4.splice(_local5, 1);
_local5--;
}
_local5++;
}
_local6 = _local4[this.RandNum(0, _local4.length - 1)];
_global.set2 = _global.set1;
_global.set1 = (this._enemySet = _local6);
_local6 = 1;
_local4 = new Array(1, 2);
_local5 = 0;
while (_local5 < _local4.length) {
if (_local4[_local5] == _global.set3) {
_local4.splice(_local5, 1);
_local5--;
}
_local5++;
}
_local6 = _local4[this.RandNum(0, _local4.length - 1)];
_global.set3 = (this._enemySet2 = _local6);
if (this.mySharedObject.data.firstTime != undefined) {
this.mySharedObject.data.set1 = _global.set1;
this.mySharedObject.data.set2 = _global.set2;
this.mySharedObject.data.set3 = _global.set3;
this.mySharedObject.flush();
}
}
};
_local2.RunGame = function () {
_root.stop();
var _local4;
var _local5;
if (_global.gamePaused == false) {
if (this.transitionState == 0) {
_local5 = this.MoveAvatar();
} else if (this.deltaList.length != 0) {
_local5 = new Vector();
var _local7 = this.deltaList[0];
this.deltaList.shift();
_local5._x = _local7._x * -1;
_local5._y = _local7._y * -1;
if (this.transitionState == 1) {
_local4 = this.world.GetLeft(false);
_local4.MoveAllBubblefieldUnits(_local5);
} else if (this.transitionState == 2) {
_local4 = this.world.GetUp(false);
_local4.MoveAllBubblefieldUnits(_local5);
} else if (this.transitionState == 3) {
_local4 = this.world.GetRight(false);
_local4.MoveAllBubblefieldUnits(_local5);
} else if (this.transitionState == 4) {
_local4 = this.world.GetDown(false);
_local4.MoveAllBubblefieldUnits(_local5);
}
} else {
var _local6 = new Vector();
if (this.transitionState == 1) {
_local4 = this.world.GetLeft(false);
if (_local4 == undefined) {
this.world.PrintBubblefieldCoordsList();
}
_local4.HideAllUnits();
if (_local4.blnBoss == true) {
this.HideBoss();
}
_local6._x = 1147.6;
} else if (this.transitionState == 2) {
_local4 = this.world.GetUp(false);
if (_local4 == undefined) {
this.world.PrintBubblefieldCoordsList();
}
_local4.HideAllUnits();
if (_local4.blnBoss == true) {
this.HideBoss();
}
_local6._y = 1147.6;
} else if (this.transitionState == 3) {
_local4 = this.world.GetRight(false);
if (_local4 == undefined) {
this.world.PrintBubblefieldCoordsList();
}
_local4.HideAllUnits();
if (_local4.blnBoss == true) {
this.HideBoss();
}
_local6._x = -1147.6;
} else if (this.transitionState == 4) {
_local4 = this.world.GetDown(false);
if (_local4 == undefined) {
this.world.PrintBubblefieldCoordsList();
}
_local4.HideAllUnits();
if (_local4.blnBoss == true) {
this.HideBoss();
}
_local6._y = -1147.6;
}
this.blnEnemiesCleared = false;
this.FlushEncounteredList();
this.BackgroundShift(_local6);
if (this.world.current.blnBoss == true) {
this.ShiftBoss();
}
this.CleanPickupBubbles();
this.CleanupBullets();
this.RemoveAllySeekers();
this.CleanEffects();
this.ManageTutorial();
this.transitionState = 0;
if (this.GetDistance() <= (_root.bg.inside._width / 2)) {
this.runOnce = false;
}
_local5 = this.MoveAvatar();
if (this.intBossState == 1) {
this.intBossState = 2;
this.blnWaitingToUpgrade = true;
this.PauseGame();
_root.pause_mc.gotoAndStop(1);
_root.pause_mc._visible = false;
this.blnUpgradeFlag = true;
_root.bg.boss_mc._visible = true;
_root.bg.boss_mc.gotoAndPlay(2);
}
}
this.MoveWorld(_local5);
this.RotateGun();
this.ManageDisassembly();
this.OperateAvatarWeapons();
this.CheckPickupBubbleCollection();
if (this.transitionState == 0) {
this.CheckBulletCollision();
this.CheckTankExit();
}
this.ControlInterface();
this.ControlFireRateInterface();
this.ManageShaking();
this.ManageWinGame();
}
if ((_global.gamePaused == true) && (this.intBossState == 2)) {
this.ManageShaking();
}
if (_global.gameMode == 2) {
this.arenaTimer.Run();
}
this.CheckKeyPress();
this.DoCleanup();
};
_local2.ManageWinGame = function () {
if (this.intWinFlag == 0) {
this.blnUpgradeFlag = true;
this.PauseGame();
if (_global.doUnlockEC.Get() != -1) {
_root.pause_mc.gotoAndPlay("winScreen");
} else {
_root.pause_mc.gotoAndPlay("winScreenLocked");
}
_root.bg.boss_mc.gotoAndStop(1);
_root.bg.boss_mc._visible = false;
this.intWinFlag = -1;
} else if (this.intWinFlag > 0) {
this.intWinFlag--;
}
};
_local2.ResumeBossFight = function () {
this.BossSpawnBody();
this.intBossState = 3;
this.blnWaitingToUpgrade = false;
this.blnUpgradeFlag = false;
this.UnPauseGame();
};
_local2.HideBoss = function () {
_root.bg.boss_mc.gotoAndStop(1);
_root.bg.boss_mc._visible = false;
};
_local2.ShowBoss = function (vecShift) {
if (this.intBossState == 3) {
if ((vecShift._x == 0) && (vecShift._y < 0)) {
_root.bg.bossUp_mc._visible = true;
_root.bg.bossUp_mc.gotoAndStop("resumeBoss");
} else if ((vecShift._x > 0) && (vecShift._y == 0)) {
_root.bg.bossRight_mc._visible = true;
_root.bg.bossRight_mc.gotoAndStop("resumeBoss");
} else if ((vecShift._x == 0) && (vecShift._y > 0)) {
_root.bg.bossDown_mc._visible = true;
_root.bg.bossDown_mc.gotoAndStop("resumeBoss");
} else if ((vecShift._x < 0) && (vecShift._y == 0)) {
_root.bg.bossLeft_mc._visible = true;
_root.bg.bossLeft_mc.gotoAndStop("resumeBoss");
}
}
};
_local2.ShiftBoss = function () {
if (this.intBossState == 3) {
_root.bg.boss_mc._visible = true;
_root.bg.boss_mc.gotoAndStop("resumeBoss");
_root.bg.bossUp_mc.gotoAndStop(1);
_root.bg.bossUp_mc._visible = false;
_root.bg.bossRight_mc.gotoAndStop(1);
_root.bg.bossRight_mc._visible = false;
_root.bg.bossDown_mc.gotoAndStop(1);
_root.bg.bossDown_mc._visible = false;
_root.bg.bossLeft_mc.gotoAndStop(1);
_root.bg.bossLeft_mc._visible = false;
}
};
_local2.BossSpawnBody = function () {
var _local4 = new Vector();
var _local3 = {x:_root.bg.boss_mc.handLeft_mc._x, y:_root.bg.boss_mc.handLeft_mc._y};
_root.bg.boss_mc.localToGlobal(_local3);
_local4._x = _local3.x;
_local4._y = _local3.y;
var _local7 = this.CreateNewUnit("Enemy_B2", _local4, "");
_root[_local7]._rotation = _root.bg.boss_mc.handLeft_mc._rotation;
_root.bg.boss_mc.handLeft_mc._visible = false;
_local4 = new Vector();
_local3 = {x:_root.bg.boss_mc.handRight_mc._x, y:_root.bg.boss_mc.handRight_mc._y};
_root.bg.boss_mc.localToGlobal(_local3);
_local4._x = _local3.x;
_local4._y = _local3.y;
var _local10 = this.CreateNewUnit("Enemy_B2", _local4, "");
_root[_local10]._rotation = _root.bg.boss_mc.handRight_mc._rotation;
_root.bg.boss_mc.handRight_mc._visible = false;
var _local6 = new Vector();
_local3 = {x:_root.bg.boss_mc.head_mc._x, y:_root.bg.boss_mc.head_mc._y};
_root.bg.boss_mc.localToGlobal(_local3);
_local6._x = _local3.x;
_local6._y = _local3.y;
var _local8 = this.CreateNewUnit("Enemy_B1", _local6, "");
_root[_local8]._rotation = _root.bg.boss_mc.head_mc._rotation;
_root.bg.boss_mc.head_mc._visible = false;
var _local5 = new Vector();
_local3 = {x:_root.bg.boss_mc.tail_mc._x, y:_root.bg.boss_mc.tail_mc._y};
_root.bg.boss_mc.localToGlobal(_local3);
_local5._x = _local3.x;
_local5._y = _local3.y;
var _local9 = this.CreateNewUnit("Enemy_B3", _local5, "");
_root[_local9]._rotation = _root.bg.boss_mc.tail_mc._rotation;
_root.bg.boss_mc.tail_mc._visible = false;
};
_local2.ManageTutorial = function () {
if (this.upgradePath.currentNode.nodeData._id >= 21) {
this.intJumpsAsMax++;
}
this.numJumps++;
if (_global.gameMode != 2) {
if (this.intTutorialState == 2) {
this.intTutorialState = 3;
_root.bg.tutShell_mc.gotoAndStop(1);
_root.bg.tutShell_mc.tutorial.gotoAndStop(6);
} else if (this.world.current.blnBoss == true) {
_root.bg.tutShell_mc.gotoAndStop(1);
_root.bg.tutShell_mc.tutorial.gotoAndStop(7);
} else if (this.numJumps == 1) {
_root.bg.tutShell_mc.gotoAndStop(1);
_root.bg.tutShell_mc.tutorial.gotoAndStop(2);
} else if (this.numJumps == 2) {
_root.bg.tutShell_mc.gotoAndStop(1);
_root.bg.tutShell_mc.tutorial.gotoAndStop(3);
} else if (this.numJumps == 3) {
_root.bg.tutShell_mc.gotoAndStop(1);
_root.bg.tutShell_mc.tutorial.gotoAndStop(4);
} else if (this.numJumps == 4) {
_root.bg.tutShell_mc.gotoAndStop(1);
_root.bg.tutShell_mc.tutorial.gotoAndStop(5);
} else if (this.numJumps > 4) {
_root.bg.tutShell_mc.gotoAndStop(2);
}
} else {
_root.bg.tutShell_mc.gotoAndStop(2);
}
};
_local2.CheckKeyPress = function () {
if (this.intKeyLock == 0) {
var _local3 = -1;
if (Key.isDown(_global.pauseHotkey)) {
if (this.blnUpgradeFlag == false) {
if (_global.gamePaused == true) {
this.ClosePauseScreen();
this.intKeyLock = 20;
} else {
this.PauseGame();
this.intKeyLock = 20;
}
}
}
if (Key.isDown(17) && (Key.isDown(107))) {
if (_global.doUnlockEC.Get() != -1) {
this.avatarLife.Set(this.avatarLife.Get() + 100);
this.intKeyLock = 20;
this.CheckUpgradeState();
}
}
} else {
this.intKeyLock--;
}
if (_global.gamePaused == false) {
if (Key.isDown(_global.fireHotkey)) {
if (this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[0].type == 24) {
if (this.blnSpaceDown == false) {
this.intAssembledState = 1;
this.blnSpaceDown = true;
}
} else {
this.OperateAvatarSecondaryWeapons();
}
} else if (this.blnSpaceDown == true) {
this.intAssembledState = 3;
this.blnSpaceDown = false;
}
}
};
_local2.SetupPauseScreen = function () {
_root.pause_mc.inside_mc.buttonText_txt.text = "";
this.SelectPauseScreen(this.strCurrentScreen);
};
_local2.SelectPauseScreen = function (openScreen) {
var _local3 = _root.pause_mc.inside_mc;
_local3.content_mc.gotoAndStop(openScreen);
if (openScreen == "stats_mc") {
_local3.stats_mc.gotoAndStop(2);
} else {
_local3.stats_mc.gotoAndStop(1);
}
if (openScreen == "map_mc") {
_local3.map_mc.gotoAndStop(2);
this.DrawMap();
} else {
_local3.map_mc.gotoAndStop(1);
}
if (openScreen == "options_mc") {
_local3.options_mc.gotoAndStop(2);
} else {
_local3.options_mc.gotoAndStop(1);
}
if (openScreen == "stats_mc") {
this.SetupStats();
}
if ((openScreen != "quit_mc") && (openScreen != "controls_mc")) {
this.strCurrentScreen = openScreen;
}
};
_local2.SetupArenaScreen = function () {
_root.pause_mc.inside_mc.enemiesKilled_txt.text = this.intEnemiesKilled;
_root.pause_mc.inside_mc.bubblesCollected_txt.text = this.intBubblesCollected;
_root.pause_mc.inside_mc.timeCompleted_txt.text = this.arenaTimer.GetTimeString();
};
_local2.CompleteArena = function () {
this.arenaTimer.Pause();
this.blnUpgradeFlag = true;
this.PauseGame();
_root.pause_mc.gotoAndPlay("arenaComplete");
};
_local2.PauseGame = function () {
_global.gamePaused = true;
if (_global.gameMode == 2) {
this.arenaTimer.Pause();
}
if (this.transitionState != 0) {
this.world.previous.HaltUnits();
}
this.world.current.HaltUnits();
this.PauseAllies();
var _local4 = 0;
while (_local4 < this.arrBullets.length) {
_root[this.arrBullets[_local4]]._holdMovement = true;
if (_root[this.arrBullets[_local4]]._type == 8) {
_root[this.arrBullets[_local4]].PauseUnPauseBusted(true);
}
_local4++;
}
_local4 = 0;
while (_local4 < this.arrAllySeekers.length) {
_root[this.arrAllySeekers[_local4].name].TurnOff();
_local4++;
}
_root.pause_mc._visible = true;
_root.pause_mc.gotoAndPlay(2);
};
_local2.UpgradePause = function () {
this.PauseGame();
this.blnUpgradeFlag = true;
if (this.upgradePath.currentNode.GetNumChildren() == 3) {
_root.pause_mc.gotoAndPlay("upgradeThree");
} else if (this.upgradePath.currentNode.GetNumChildren() == 2) {
_root.pause_mc.gotoAndPlay("upgradeTwo");
}
};
_local2.UpgradePauseComplete = function () {
this.UnPauseGame();
this.blnUpgradeFlag = false;
};
_local2.ClosePauseScreen = function () {
_root.pause_mc.gotoAndPlay(16);
this.blnUpgradeFlag = false;
};
_local2.CloseWinScreen = function () {
_global.invincible = true;
if (_global.doUnlockEC.Get() != -1) {
_root.pause_mc.gotoAndPlay(77);
} else {
_root.pause_mc.gotoAndPlay(107);
}
this.blnUpgradeFlag = false;
};
_local2.UnPauseGame = function () {
_root.pause_mc._visible = false;
if (_global.gameMode == 2) {
this.arenaTimer.UnPause();
}
_global.gamePaused = false;
if (this.transitionState != 0) {
this.world.previous.ResumeUnits();
}
this.world.current.ResumeUnits();
this.UnPauseAllies();
var _local4 = 0;
while (_local4 < this.arrBullets.length) {
_root[this.arrBullets[_local4]]._holdMovement = false;
if (_root[this.arrBullets[_local4]]._type == 8) {
_root[this.arrBullets[_local4]].PauseUnPauseBusted(false);
}
_local4++;
}
_local4 = 0;
while (_local4 < this.arrAllySeekers.length) {
_root[this.arrAllySeekers[_local4].name].TurnOn();
_local4++;
}
};
_local2.DrawMap = function () {
this.ClearMap();
var _local23 = _root.pause_mc.inside_mc;
var _local4 = _root.pause_mc.inside_mc.content_mc.contentInside_mc.mapInside_mc;
if (this.mapLocX == undefined) {
this.mapLocX = _local4._x;
this.mapLocY = _local4._y;
}
_local4.map_mc._visible = false;
var _local15 = 999999 /* 0x0F423F */;
var _local13 = -999999;
var _local14 = 999999 /* 0x0F423F */;
var _local12 = -999999;
var _local3 = 0;
while (_local3 < this.arrMap.length) {
if (this.arrMap[_local3].xloc < _local15) {
_local15 = this.arrMap[_local3].xloc;
}
if (this.arrMap[_local3].xloc > _local13) {
_local13 = this.arrMap[_local3].xloc;
}
if (this.arrMap[_local3].yloc < _local14) {
_local14 = this.arrMap[_local3].yloc;
}
if (this.arrMap[_local3].yloc > _local12) {
_local12 = this.arrMap[_local3].yloc;
}
_local3++;
}
var _local10 = 1;
var _local11 = 15;
var _local9 = _local4.map_mc._x + (_local4.map_mc._width / 2);
var _local8 = _local4.map_mc._y + (_local4.map_mc._height / 2);
var _local7 = 0;
var _local6 = 0;
var _local21 = this.world.startX;
var _local20 = this.world.startY;
var _local18 = this.world.current.x;
var _local19 = this.world.current.y;
var _local25 = 5;
var _local5 = (this.arrMap[0].xloc + "_") + this.arrMap[0].yloc;
var _local27;
var _local26;
var _local17;
_local17 = _local18 - _local21;
_local9 = _local9 - (_local17 * _local11);
_local17 = _local19 - _local20;
_local8 = _local8 + (_local17 * _local11);
_local4.attachMovie("token", _local5, _local10);
_local10++;
_local4[_local5]._x = _local9;
_local4[_local5]._y = _local8;
_local4.lineStyle(0, 16777215, 100);
var _local22 = new Object();
var _local24 = new Object();
_local4.moveTo(_local9, _local8);
_local3 = 1;
while (_local3 < this.arrMap.length) {
_local7 = _local9 + ((this.arrMap[_local3].xloc - this.arrMap[_local3 - 1].xloc) * _local11);
_local6 = _local8 + ((this.arrMap[_local3].yloc - this.arrMap[_local3 - 1].yloc) * (-_local11));
_local5 = (this.arrMap[_local3].xloc + "_") + this.arrMap[_local3].yloc;
if (this.arrMap[_local3].blnCreate == true) {
_local4.attachMovie("token", _local5, _local10);
_local10++;
_local4[_local5]._x = _local7;
_local4[_local5]._y = _local6;
}
_local4.lineTo(_local7, _local6);
_local9 = _local7;
_local8 = _local6;
_local3++;
}
var _local16;
_local16 = (this.arrMap[0].xloc + "_") + this.arrMap[0].yloc;
_local4[_local16].gotoAndStop(2);
if (this.blnBoss == true) {
_local16 = (this.intBossX + "_") + this.intBossY;
_local4[_local16].gotoAndStop(4);
}
_local16 = (_local18 + "_") + _local19;
_local4[_local16].gotoAndStop(3);
};
_local2.ClearMap = function () {
var _local2 = _root.pause_mc.inside_mc.content_mc.contentInside_mc.mapInside_mc;
_local2.clear();
for (var _local3 in _local2) {
if (_local2[_local3]._name != "map_mc") {
_local2[_local3].removeMovieClip();
}
}
};
_local2.SetupStats = function () {
var _local4 = _root.pause_mc.inside_mc.content_mc.contentInside_mc;
_local4.stateName_txt.text = this.upgradePath.currentNode.nodeData._name;
_local4.stateDescription_txt.text = this.upgradePath.currentNode.nodeData._description;
_local4.primary_txt.text = this.upgradePath.currentNode.nodeData._primary;
_local4.primaryDescription_txt.text = this.upgradePath.currentNode.nodeData._primaryDescription;
_local4.secondary_txt.text = this.upgradePath.currentNode.nodeData._secondary;
_local4.secondaryDescription_txt.text = this.upgradePath.currentNode.nodeData._secondaryDescription;
_local4.enemiesKilled_txt.text = this.intEnemiesKilled;
_local4.bubblesCollected_txt.text = this.intBubblesCollected;
_local4.icon_mc.enemyImage.attachMovie("avatar", "currentShownEnemy", 200);
var _local3 = _local4.icon_mc.enemyImage.currentShownEnemy;
_local3.gotoAndStop(this.upgradePath.currentNode.nodeData._id);
if ((this.upgradePath.currentNode.nodeData._id != 1) && (this.upgradePath.currentNode.nodeData._id != 21)) {
_local3.gun.gotoAndStop(50);
}
var _local5;
if ((_local3._width > 105) || (_local3._height > 105)) {
if (_local3._width > _local3._height) {
_local5 = 105 / _local3._width;
} else if (_local3._width == _local3._height) {
_local5 = 105 / _local3._width;
} else {
_local5 = 105 / _local3._height;
}
_local3._width = _local3._width * _local5;
_local3._height = _local3._height * _local5;
}
_local3.TurnOff();
_local3._x = 38;
_local3._y = 34;
};
_local2.ControlInterface = function () {
if (this.upgradePath.currentNode.nodeData._maxPoints == 999999) {
_root.life.inside._xscale = 100;
_root.life.left_txt.text = "Max Tank Size";
_root.life.state_txt.text = this.upgradePath.currentNode.nodeData._name;
} else {
var _local4;
var _local3;
if ((this.upgradePath.currentNode.nodeData._maxPoints - this.upgradePath.currentNode.nodeData._minPoints) != 0) {
_local4 = (this.avatarLife.Get() - this.upgradePath.currentNode.nodeData._minPoints) / (this.upgradePath.currentNode.nodeData._maxPoints - this.upgradePath.currentNode.nodeData._minPoints);
_local3 = this.upgradePath.currentNode.nodeData._maxPoints - this.avatarLife.Get();
} else {
_local4 = 1;
_local3 = 0;
}
_local3++;
_root.life.inside._xscale = Math.round(_local4 * 100);
_root.life.left_txt.text = _local3 + " Bubbles Left";
_root.life.state_txt.text = this.upgradePath.currentNode.nodeData._name;
}
if (((this.intLifeState == 3) || (this.intLifeState == 1)) && (this.blnLifeFlag == true)) {
this.intLifeState = 2;
} else if (this.intLifeState == 4) {
if (this.intLifeCounter == 1) {
this.intLifeState = 1;
}
if (this.intLifeCounter > 0) {
this.intLifeCounter--;
}
if (this.blnLifeFlag == true) {
this.intLifeCounter = 75;
if (this.intFireRateCounter > 1) {
this.intFireRateCounter = 75;
}
}
}
switch (this.intLifeState) {
case 1 :
var _local5 = this.intMaxLow - _root.life._y;
if (_local5 < 2) {
_root.life._y = this.intMaxLow;
this.intLifeState = 3;
} else {
_root.life._y = _root.life._y + (0.2 * _local5);
}
break;
case 2 :
_local5 = _root.life._y - this.intMaxHigh;
if (_local5 < 2) {
_root.life._y = this.intMaxHigh;
this.intLifeState = 4;
this.intLifeCounter = 75;
if (this.intFireRateCounter > 1) {
this.intFireRateCounter = 75;
}
} else {
_root.life._y = _root.life._y - (0.2 * _local5);
}
}
this.blnLifeFlag = false;
};
_local2.ControlFireRateInterface = function () {
var _local3 = 1;
_local3 = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[0].delay;
var _local5 = Math.round((1 - (this.intPrimaryCounter / _local3)) * 100);
_root.fireRate_mc.insidePrimary_mc._xscale = _local5;
if (this.upgradePath.currentNode.nodeData._arrSecondaryWeapons.length == 0) {
_root.fireRate_mc.insideSecondary_mc._xscale = 0.1;
} else {
_local3 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[0].delay;
var _local6 = Math.round((1 - (this.intSecondaryCounter / _local3)) * 100);
_root.fireRate_mc.insideSecondary_mc._xscale = _local6;
}
if (((this.intFireRateState == 3) || (this.intFireRateState == 1)) && (this.blnFireRateFlag == true)) {
this.intFireRateState = 2;
} else if (this.intFireRateState == 4) {
if (this.intFireRateCounter == 1) {
this.intFireRateState = 1;
}
if (this.intFireRateCounter > 0) {
this.intFireRateCounter--;
}
if (this.blnFireRateFlag == true) {
this.intFireRateCounter = 75;
if (this.intLifeCounter > 1) {
this.intLifeCounter = 75;
}
}
}
switch (this.intFireRateState) {
case 1 :
var _local4 = _root.fireRate_mc._y - this.intFireRateMaxHigh;
if (_local4 < 2) {
_root.fireRate_mc._y = this.intFireRateMaxHigh;
this.intFireRateState = 3;
} else {
_root.fireRate_mc._y = _root.fireRate_mc._y - (0.2 * _local4);
}
break;
case 2 :
_local4 = this.intFireRateMaxLow - _root.fireRate_mc._y;
if (_local4 < 2) {
_root.fireRate_mc._y = this.intFireRateMaxLow;
this.intFireRateState = 4;
this.intFireRateCounter = 75;
if (this.intLifeCounter > 1) {
this.intLifeCounter = 75;
}
} else {
_root.fireRate_mc._y = _root.fireRate_mc._y + (0.2 * _local4);
}
}
this.blnFireRateFlag = false;
};
_local2.CheckUpgradeState = function () {
if (this.avatarLife.Get() > this.upgradePath.currentNode.nodeData._maxPoints) {
if (this.upgradePath.UpgradeAlreadySelected() == false) {
this.blnWaitingToUpgrade = true;
this.UpgradePause();
} else {
this.intPrimaryCounter = 0;
this.intSecondaryCounter = 0;
this.intAutoCounter = 0;
_root.avatar.gotoAndStop(this.upgradePath.currentNode.nodeData._id);
}
} else if (this.avatarLife.Get() < this.upgradePath.currentNode.nodeData._minPoints) {
if (this.upgradePath.currentNode.nodeData._id != 1) {
if (this.upgradePath.currentNode.nodeData._id == 26) {
this.DowngradeRemoveFighters();
}
this.intPrimaryCounter = 0;
this.intSecondaryCounter = 0;
this.upgradePath.DownGrade();
_root.avatar.gotoAndStop(this.upgradePath.currentNode.nodeData._id);
this.intJumpsAsMax = 0;
}
}
var _local3 = this.avatarLife.Get() - this.upgradePath.currentNode.nodeData._minPoints;
if (this.upgradePath.currentNode.nodeData._id < 21) {
_root.avatar.gun.gotoAndStop(_local3);
}
this.ScaleMiniBubble();
};
_local2.DowngradeRemoveFighters = function () {
var _local4 = this.arrAllies.slice();
var _local3 = 0;
while (_local3 < _local4.length) {
this.Effect_PierceExplosion(_root[_local4[_local3]]._x, _root[_local4[_local3]]._y);
_root[_local4[_local3]].Dock();
_local3++;
}
};
_local2.UpgradeChosen = function (buttonName) {
if (this.blnWaitingToUpgrade == true) {
if ((getTimer() - this.intUpgradeDelay) > 1200) {
var _local4 = this.upgradePath.currentNode.GetNumChildren();
this.upgradePath.Upgrade(buttonName);
this.blnWaitingToUpgrade = false;
this.intPrimaryCounter = 0;
this.intSecondaryCounter = 0;
if (this.intTutorialState == 1) {
if (this.upgradePath.currentNode.nodeData._id >= 5) {
this.intTutorialState = 2;
}
}
if (_global.gameMode == 1) {
if (this.IsAvatarLocked(this.upgradePath.currentNode.nodeData._id) == true) {
_global.encounteredStates.push(this.upgradePath.currentNode.nodeData._id);
this.mySharedObject.data.statesList = _global.encounteredStates;
this.mySharedObject.flush();
}
}
if (_local4 == 3) {
_root.pause_mc.gotoAndPlay("upgradeThreeComplete");
} else if (_local4 == 2) {
_root.pause_mc.gotoAndPlay("upgradeTwoComplete");
}
this.upgradePath.currentNode.nodeData._selected = true;
_root.avatar.gotoAndStop(this.upgradePath.currentNode.nodeData._id);
this.CheckUpgradeState();
}
}
};
_local2.SetupUpgradeButtons = function (screenRef, numButtons) {
var _local4;
var _local5;
var _local7;
var _local9;
var _local8;
this.upgradePath.currentNode.Reset();
_local5 = this.upgradePath.currentNode.GetChild();
_local4 = screenRef.first_mc;
_local4.title_txt.text = _local5.nodeData._name;
_local4.primary_txt.text = _local5.nodeData._primary;
_local4.secondary_txt.text = _local5.nodeData._secondary;
_local7 = _local5.nodeData._locked;
if ((_global.doUnlockEC.Get() != -1) || (_local5.nodeData._locked == false)) {
_local4.description_txt.text = _local5.nodeData._description;
_local4.locked_mc.gotoAndStop(1);
_local4.lockedText_mc.gotoAndStop(1);
} else {
_local4.description_txt.text = "Only available on ArmorGames.com. Click to play the Extra Content version!";
_local4.locked_mc.gotoAndStop(2);
_local4.lockedText_mc.gotoAndStop(2);
}
this.upgradePath.currentNode.NextChild();
_local5 = this.upgradePath.currentNode.GetChild();
_local4 = screenRef.second_mc;
_local4.title_txt.text = _local5.nodeData._name;
_local4.primary_txt.text = _local5.nodeData._primary;
_local4.secondary_txt.text = _local5.nodeData._secondary;
_local9 = _local5.nodeData._locked;
if ((_global.doUnlockEC.Get() != -1) || (_local5.nodeData._locked == false)) {
_local4.description_txt.text = _local5.nodeData._description;
_local4.locked_mc.gotoAndStop(1);
_local4.lockedText_mc.gotoAndStop(1);
} else {
_local4.description_txt.text = "Only available on ArmorGames.com. Click to play the Extra Content version!";
_local4.locked_mc.gotoAndStop(2);
_local4.lockedText_mc.gotoAndStop(2);
}
if (numButtons == 3) {
this.upgradePath.currentNode.NextChild();
_local5 = this.upgradePath.currentNode.GetChild();
_local4 = screenRef.third_mc;
_local4.title_txt.text = _local5.nodeData._name;
_local4.primary_txt.text = _local5.nodeData._primary;
_local4.secondary_txt.text = _local5.nodeData._secondary;
_local8 = _local5.nodeData._locked;
if ((_global.doUnlockEC.Get() != -1) || (_local5.nodeData._locked == false)) {
_local4.description_txt.text = _local5.nodeData._description;
_local4.locked_mc.gotoAndStop(1);
_local4.lockedText_mc.gotoAndStop(1);
} else {
_local4.description_txt.text = "Only available on ArmorGames.com. Click to play the Extra Content version!";
_local4.locked_mc.gotoAndStop(2);
_local4.lockedText_mc.gotoAndStop(2);
}
}
_local4 = screenRef.first_mc;
_local4.onRollOver = function () {
this.gotoAndStop(2);
};
_local4.onRollOut = function () {
this.gotoAndStop(1);
};
if ((_global.doUnlockEC.Get() != -1) || (_local7 == false)) {
_local4.onRelease = function () {
_root.game.UpgradeChosen("first_mc");
};
} else {
_local4.onRelease = function () {
getURL ("http://www.herointeractive.com/BT2_Transfer.php?intID=3", "_blank");
};
}
_local4 = screenRef.second_mc;
_local4.onRollOver = function () {
this.gotoAndStop(2);
};
_local4.onRollOut = function () {
this.gotoAndStop(1);
};
if ((_global.doUnlockEC.Get() != -1) || (_local9 == false)) {
_local4.onRelease = function () {
_root.game.UpgradeChosen("second_mc");
};
} else {
_local4.onRelease = function () {
getURL ("http://www.herointeractive.com/BT2_Transfer.php?intID=3", "_blank");
};
}
if (numButtons == 3) {
_local4 = screenRef.third_mc;
_local4.onRollOver = function () {
this.gotoAndStop(2);
};
_local4.onRollOut = function () {
this.gotoAndStop(1);
};
if ((_global.doUnlockEC.Get() != -1) || (_local8 == false)) {
_local4.onRelease = function () {
_root.game.UpgradeChosen("third_mc");
};
} else {
_local4.onRelease = function () {
getURL ("http://www.herointeractive.com/BT2_Transfer.php?intID=3", "_blank");
};
}
}
this.intUpgradeDelay = getTimer();
};
_local2.RemoveBullet = function (strName) {
var _local4 = 0;
while (_local4 < this.arrBullets.length) {
if (strName == this.arrBullets[_local4]) {
if (_root[this.arrBullets[_local4]]._type == 8) {
var _local3 = 0;
while (_local3 < this.arrBulletBusters.length) {
if (this.arrBulletBusters[_local3] == strName) {
this.arrBulletBusters.splice(_local3, 1);
break;
}
_local3++;
}
}
this.arrBullets.splice(_local4, 1);
break;
}
_local4++;
}
};
_local2.CleanupBullets = function () {
var _local3 = 0;
while (_local3 < this.arrBullets.length) {
if (_root[this.arrBullets[_local3]]._type == 8) {
_root[this.arrBullets[_local3]].CleanupBusted();
}
_root[this.arrBullets[_local3]].removeMovieClip();
_local3++;
}
delete this.arrBullets;
this.arrBullets = new Array();
};
_local2.DropPickupBubbles = function (num2Drop, origin, myPower, myType) {
var _local4 = 0;
while (_local4 < num2Drop) {
var _local3 = "pickup_bubbles_" + this.arrFloatingBubblesDepth;
this.arrFloatingBubbles.push(_local3);
if (myType == 3) {
_root.attachMovie("pickup_bubble_ultra", _local3, this.arrFloatingBubblesDepth);
} else if (myType == 2) {
_root.attachMovie("pickup_bubble_large", _local3, this.arrFloatingBubblesDepth);
} else {
_root.attachMovie("pickup_bubble", _local3, this.arrFloatingBubblesDepth);
}
_root[_local3]._x = origin._x;
_root[_local3]._y = origin._y;
_root[_local3].DetermineRandomMovement(myPower);
this.arrFloatingBubblesDepth++;
if (this.arrFloatingBubblesDepth == 899) {
this.arrFloatingBubblesDepth = 700;
}
_local4++;
}
};
_local2.LeachPickupBubbles = function (origin) {
var _local3 = "pickup_bubbles_" + this.arrFloatingBubblesDepth;
this.arrFloatingBubbles.push(_local3);
_root.attachMovie("pickup_bubble", _local3, this.arrFloatingBubblesDepth);
_root[_local3]._x = origin._x;
_root[_local3]._y = origin._y;
_root[_local3]._type = 2;
this.arrFloatingBubblesDepth++;
if (this.arrFloatingBubblesDepth == 899) {
this.arrFloatingBubblesDepth = 700;
}
};
_local2.MovePickupBubbles = function (dirVector) {
var _local3 = 0;
while (_local3 < this.arrFloatingBubbles.length) {
_root[this.arrFloatingBubbles[_local3]]._x = _root[this.arrFloatingBubbles[_local3]]._x + dirVector._x;
_root[this.arrFloatingBubbles[_local3]]._y = _root[this.arrFloatingBubbles[_local3]]._y + dirVector._y;
_local3++;
}
};
_local2.CleanPickupBubbles = function () {
var _local3 = 0;
while (_local3 < this.arrFloatingBubbles.length) {
_root[this.arrFloatingBubbles[_local3]].removeMovieClip();
_local3++;
}
delete this.arrFloatingBubbles;
this.arrFloatingBubbles = new Array();
};
_local2.GetBubbleDistance = function (myName) {
var _local3 = _root[myName]._x - _root.avatar._x;
var _local2 = _root[myName]._y - _root.avatar._y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
};
_local2.CheckPickupBubbleCollection = function () {
var _local10 = 6;
var _local6 = 0;
while (_local6 < this.arrFloatingBubbles.length) {
var _local5 = this.GetBubbleDistance(this.arrFloatingBubbles[_local6]);
var _local4 = _root.avatar._width + 30;
if (this.blnEnemiesCleared == true) {
_local4 = _root.bg.inside._width + 25;
_local10 = 10;
}
if (_root[this.arrFloatingBubbles[_local6]]._type == 2) {
_local4 = _root.bg.inside._width;
}
if (_local5 <= _local4) {
var _local9 = ((_local4 - _local5) / _local4) * _local10;
var _local7 = new Vector();
_local7._x = ((_root[this.arrFloatingBubbles[_local6]]._x - _root.avatar._x) / _local5) * _local9;
_local7._y = ((_root[this.arrFloatingBubbles[_local6]]._y - _root.avatar._y) / _local5) * _local9;
_root[this.arrFloatingBubbles[_local6]]._x = _root[this.arrFloatingBubbles[_local6]]._x - _local7._x;
_root[this.arrFloatingBubbles[_local6]]._y = _root[this.arrFloatingBubbles[_local6]]._y - _local7._y;
}
_local6++;
}
var _local8 = new Array();
var _local11 = false;
_local6 = 0;
while (_local6 < this.arrFloatingBubbles.length) {
if (_root.avatar.hitTest(_root[this.arrFloatingBubbles[_local6]]._x, _root[this.arrFloatingBubbles[_local6]]._y, true)) {
this.avatarLife.Set(this.avatarLife.Get() + _root[this.arrFloatingBubbles[_local6]]._amount);
if (this.avatarLife.Get() > this.maxAvatarLife) {
this.maxAvatarLife = this.avatarLife.Get();
}
_local8.push(this.arrFloatingBubbles[_local6]);
_local11 = true;
this.blnLifeFlag = true;
this.intBubblesCollected++;
_global.SoundManager.PlayBubbleSound("collect_2");
}
_local6++;
}
if (_local11 == true) {
this.CheckUpgradeState();
}
_local6 = 0;
while (_local6 < _local8.length) {
this.RemovePickupBubble(_local8[_local6]);
_root[_local8[_local6]].removeMovieClip();
_local6++;
}
};
_local2.RemovePickupBubble = function (strName) {
var _local2 = 0;
while (_local2 < this.arrFloatingBubbles.length) {
if (strName == this.arrFloatingBubbles[_local2]) {
this.arrFloatingBubbles.splice(_local2, 1);
break;
}
_local2++;
}
};
_local2.AvatarHit = function (numDamage) {
if (this.transitionState == 0) {
if (_global.invincible == false) {
this.avatarLife.Set(this.avatarLife.Get() - Math.round(numDamage * 3));
if (this.avatarLife.Get() > 0) {
this.CheckUpgradeState();
}
if (this.avatarLife.Get() <= 0) {
this.avatarLife.Set(1);
this.CheckUpgradeState();
_global.SoundManager.PlaySound("dead");
this.EjectFromBubblefield();
}
}
}
};
_local2.CheckBulletCollision = function () {
var _local4 = new Array();
var _local7 = new Array();
var _local6 = 0;
while (_local6 < this.arrBullets.length) {
if (_root[this.arrBullets[_local6]]._enemy == false) {
if (_root[this.arrBullets[_local6]]._type != 8) {
if (this.world.current.CheckForHits(this.arrBullets[_local6])) {
_global.SoundManager.PlaySound("hit");
_local4.push(this.arrBullets[_local6]);
}
}
} else {
if (this.transitionState == 0) {
if (this.intAssembledState == 0) {
var _local9 = true;
if (this.intShieldCounter > 0) {
var _local8 = new Vector();
_local8._x = _root[this.arrBullets[_local6]]._x - _root.avatar._x;
_local8._y = _root[this.arrBullets[_local6]]._y - _root.avatar._y;
var _local12 = _local8.GetLength();
if (_local12 <= this.intShieldWidth) {
var _local13 = _local8.GetAngle();
var _local10 = new Vector();
_local10._x = 250;
_local10._y = 200;
_root[this.CreateEffect("shieldHit", _local10, true, "avatar")]._rotation = _local13;
_local4.push(this.arrBullets[_local6]);
_local9 = false;
}
}
if (_local9 == true) {
if (_root.avatar.hitTest(_root[this.arrBullets[_local6]]._x, _root[this.arrBullets[_local6]]._y, true)) {
if ((substring(this.arrBullets[_local6], 1, 11)) == "enemySticky") {
this.stickyCounter = 160;
_root.avatar.gun.effects.gotoAndStop("sticky");
}
if (_global.invincible == false) {
var _local11 = _root[this.arrBullets[_local6]]._damage;
if (this.upgradePath.currentNode.nodeData._turnMode == 2) {
_local11 = Math.round(_local11 * 0.3);
}
this.avatarLife.Set(this.avatarLife.Get() - _local11);
}
if (this.avatarLife.Get() > 0) {
this.CheckUpgradeState();
}
if (this.avatarLife.Get() <= 0) {
this.avatarLife.Set(1);
this.CheckUpgradeState();
_global.SoundManager.PlaySound("dead");
this.EjectFromBubblefield();
_local4.push(this.arrBullets[_local6]);
break;
}
_global.SoundManager.PlaySound("avatar_hit");
_local4.push(this.arrBullets[_local6]);
}
}
}
}
if (_local9 == true) {
var _local5 = 0;
while (_local5 < this.arrAllySeekers.length) {
if (_root[this.arrAllySeekers[_local5].name].hitTest(_root[this.arrBullets[_local6]]._x, _root[this.arrBullets[_local6]]._y, true)) {
_root[this.arrAllySeekers[_local5].name].removeMovieClip();
this.arrAllySeekers.splice(_local5, 1);
_local5--;
_local4.push(this.arrBullets[_local6]);
}
_local5++;
}
if (_root[this.arrBullets[_local6]]._type != 8) {
_local5 = 0;
while (_local5 < this.arrBulletBusters.length) {
if (_root[this.arrBulletBusters[_local5]].hitTest(_root[this.arrBullets[_local6]]._x, _root[this.arrBullets[_local6]]._y, true)) {
_root[this.arrBulletBusters[_local5]].AddBusted(this.arrBullets[_local6]);
_local7.push(this.arrBullets[_local6]);
} else if (_root[this.arrBulletBusters[_local5]].hitTest(_root[this.arrBullets[_local6]].halfX, _root[this.arrBullets[_local6]].halfY, true)) {
_root[this.arrBulletBusters[_local5]].AddBusted(this.arrBullets[_local6]);
_local7.push(this.arrBullets[_local6]);
}
_local5++;
}
}
}
}
_local6++;
}
_local6 = 0;
while (_local6 < _local7.length) {
this.RemoveBullet(_local7[_local6]);
_local6++;
}
_local6 = 0;
while (_local6 < _local4.length) {
if (((_root[_local4[_local6]]._type != 2) && (_root[_local4[_local6]]._type != 6)) && (_root[_local4[_local6]]._type != 7)) {
_root[_local4[_local6]]._holdMovement = true;
_root[_local4[_local6]].gotoAndPlay("hit");
this.AddToCleanup(_local4[_local6]);
this.RemoveBullet(_local4[_local6]);
} else {
this.Effect_PierceExplosion(_root[_local4[_local6]]._x, _root[_local4[_local6]]._y);
_root[_local4[_local6]]._damage = _root[_local4[_local6]]._damage - 1;
if (_root[_local4[_local6]]._damage < 1) {
_root[_local4[_local6]]._damage = 1;
}
}
_local6++;
}
};
_local2.EjectFromBubblefield = function () {
var _local5 = 4;
var _local6;
var _local3;
var _local10 = this.world.GetUp(false);
var _local9 = this.world.GetLeft(false);
var _local7 = this.world.GetDown(false);
var _local8 = this.world.GetRight(false);
_local3 = this.world.GetUp(true);
_local6 = _local3.EstimateDifficulty();
_local3 = this.world.GetLeft(true);
if (_local3.EstimateDifficulty() < _local6) {
_local6 = _local3.EstimateDifficulty();
_local5 = 3;
}
_local3 = this.world.GetDown(true);
if (_local3.EstimateDifficulty() < _local6) {
_local6 = _local3.EstimateDifficulty();
_local5 = 2;
}
_local3 = this.world.GetRight(true);
if (_local3.EstimateDifficulty() < _local6) {
_local6 = _local3.EstimateDifficulty();
_local5 = 1;
}
var _local2 = new Vector();
var _local4;
if (_local5 == 4) {
if (_local10 == undefined) {
_local4 = true;
} else {
_local4 = false;
}
this.world.MoveUp();
_local2._y = -1147.6;
this.world.current.ShowAllUnits(_local2);
if (this.world.current.blnBoss == true) {
this.ShowBoss(_local2);
}
this.MoveAvatarToBubble("destTop");
this.transitionState = 4;
} else if (_local5 == 3) {
if (_local9 == undefined) {
_local4 = true;
} else {
_local4 = false;
}
this.world.MoveLeft();
_local2._x = -1147.6;
this.world.current.ShowAllUnits(_local2);
if (this.world.current.blnBoss == true) {
this.ShowBoss(_local2);
}
this.MoveAvatarToBubble("destLeft");
this.transitionState = 3;
} else if (_local5 == 2) {
if (_local7 == undefined) {
_local4 = true;
} else {
_local4 = false;
}
this.world.MoveDown();
_local2._y = 1147.6;
this.world.current.ShowAllUnits(_local2);
if (this.world.current.blnBoss == true) {
this.ShowBoss(_local2);
}
this.MoveAvatarToBubble("destBottom");
this.transitionState = 2;
} else if (_local5 == 1) {
if (_local8 == undefined) {
_local4 = true;
} else {
_local4 = false;
}
this.world.MoveRight();
_local2._x = 1147.6;
this.world.current.ShowAllUnits(_local2);
if (this.world.current.blnBoss == true) {
this.ShowBoss(_local2);
}
this.MoveAvatarToBubble("destRight");
this.transitionState = 1;
}
this.arrMap.push({xloc:this.world.x, yloc:this.world.y, blnCreate:_local4, blnBoss:false});
};
_local2.AddToCleanup = function (myName) {
this.arrCleanup.push({name:myName, counter:6});
};
_local2.DoCleanup = function () {
var _local4 = new Array();
var _local3 = 0;
while (_local3 < this.arrCleanup.length) {
this.arrCleanup[_local3].counter--;
if (this.arrCleanup[_local3].counter == 0) {
_local4.push(this.arrCleanup[_local3].name);
}
_local3++;
}
_local3 = 0;
while (_local3 < _local4.length) {
_root[_local4[_local3]].removeMovieClip();
this.RemoveCleanupItem(_local4[_local3]);
_local3++;
}
};
_local2.RemoveCleanupItem = function (strName) {
var _local2 = 0;
while (_local2 < this.arrCleanup.length) {
if (strName == this.arrCleanup[_local2].name) {
this.arrCleanup.splice(_local2, 1);
break;
}
_local2++;
}
};
_local2.MoveWorld = function (vecMove) {
vecMove._x = Math.round(vecMove._x);
vecMove._y = Math.round(vecMove._y);
_root.bg._x = _root.bg._x + vecMove._x;
_root.bg._y = _root.bg._y + vecMove._y;
_root.bubbleSplit._x = _root.bubbleSplit._x + vecMove._x;
_root.bubbleSplit._y = _root.bubbleSplit._y + vecMove._y;
_root.bubbleMask._x = _root.bubbleMask._x + vecMove._x;
_root.bubbleMask._y = _root.bubbleMask._y + vecMove._y;
_root.effectMask_mc._x = _root.effectMask_mc._x + vecMove._x;
_root.effectMask_mc._y = _root.effectMask_mc._y + vecMove._y;
_root.overlay._x = _root.overlay._x + vecMove._x;
_root.overlay._y = _root.overlay._y + vecMove._y;
this.world.current.MoveAllBubblefieldUnits(vecMove);
var _local4 = 0;
while (_local4 < this.arrBullets.length) {
_root[this.arrBullets[_local4]]._x = _root[this.arrBullets[_local4]]._x + vecMove._x;
_root[this.arrBullets[_local4]]._y = _root[this.arrBullets[_local4]]._y + vecMove._y;
if (_root[this.arrBullets[_local4]]._type == 8) {
_root[this.arrBullets[_local4]].MoveBusted(vecMove);
}
_local4++;
}
_local4 = 0;
while (_local4 < this.arrAllySeekers.length) {
if (_root[this.arrAllySeekers[_local4].name]._type != 2) {
_root[this.arrAllySeekers[_local4].name]._x = _root[this.arrAllySeekers[_local4].name]._x + vecMove._x;
_root[this.arrAllySeekers[_local4].name]._y = _root[this.arrAllySeekers[_local4].name]._y + vecMove._y;
} else if (_root[this.arrAllySeekers[_local4].name].intState != 2) {
_root[this.arrAllySeekers[_local4].name]._x = _root[this.arrAllySeekers[_local4].name]._x + vecMove._x;
_root[this.arrAllySeekers[_local4].name]._y = _root[this.arrAllySeekers[_local4].name]._y + vecMove._y;
}
_local4++;
}
if (this.intAssembledState == 2) {
_local4 = 1;
while (_local4 < 20) {
if (_local4 != 6) {
var _local5 = _local4 + "_mc";
_root[_local5]._x = _root[_local5]._x + vecMove._x;
_root[_local5]._y = _root[_local5]._y + vecMove._y;
}
_local4++;
}
}
this.MovePickupBubbles(vecMove);
this.MoveEffects(vecMove);
};
_local2.BackgroundShift = function (vecMove) {
vecMove._x = Math.round(vecMove._x);
vecMove._y = Math.round(vecMove._y);
_root.bg._x = _root.bg._x + vecMove._x;
_root.bg._y = _root.bg._y + vecMove._y;
_root.bubbleSplit._x = _root.bubbleSplit._x + vecMove._x;
_root.bubbleSplit._y = _root.bubbleSplit._y + vecMove._y;
_root.bubbleMask._x = _root.bubbleMask._x + vecMove._x;
_root.bubbleMask._y = _root.bubbleMask._y + vecMove._y;
_root.effectMask_mc._x = _root.effectMask_mc._x + vecMove._x;
_root.effectMask_mc._y = _root.effectMask_mc._y + vecMove._y;
_root.overlay._x = _root.overlay._x + vecMove._x;
_root.overlay._y = _root.overlay._y + vecMove._y;
};
_local2.PrintVector = function (myName, vecMe) {
};
_local2.EnemyDead = function (myName) {
if (_root[myName]._type == 1) {
this.intEnemiesKilled++;
}
_global.SoundManager.PlaySound("small_death");
this.CheckListAndAdd(this.world.current.GetUnitType(myName));
this.world.current.RemoveUnit(myName);
if (_global.gameMode == 2) {
if (this.world.current.GetNumUnits() == 0) {
this.CompleteArena();
}
} else if (this.world.current.GetNumUnits() == 0) {
this.blnEnemiesCleared = true;
if (this.world.current.blnBoss == true) {
this.intWinFlag = 74;
this.intBossState = 4;
_root.bg.boss_mc.gotoAndPlay("deathAnim");
}
}
};
_local2.CheckTankExit = function () {
var _local4 = 0;
if (this.GetDistance() > (_root.bg.inside._width / 2)) {
_local4 = this.GetAngle();
_root.bubbleSplit.gotoAndPlay("show");
_root.bubbleSplit._rotation = _local4;
var _local3 = new Vector();
var _local6;
var _local5;
if ((_local4 < -45) && (_local4 > -135)) {
_local6 = this.world.GetUp(false);
if (_local6 == undefined) {
_local5 = true;
} else {
_local5 = false;
}
this.world.MoveUp();
_local3._y = -1147.6;
this.world.current.ShowAllUnits(_local3);
if (this.world.current.blnBoss == true) {
this.ShowBoss(_local3);
}
this.MoveAvatarToBubble("destTop");
this.transitionState = 4;
} else if (((_local4 <= -135) && (_local4 >= -180)) || ((_local4 >= 135) && (_local4 <= 180))) {
_local6 = this.world.GetLeft(false);
if (_local6 == undefined) {
_local5 = true;
} else {
_local5 = false;
}
this.world.MoveLeft();
_local3._x = -1147.6;
this.world.current.ShowAllUnits(_local3);
if (this.world.current.blnBoss == true) {
this.ShowBoss(_local3);
}
this.MoveAvatarToBubble("destLeft");
this.transitionState = 3;
} else if ((_local4 < 135) && (_local4 > 45)) {
_local6 = this.world.GetDown(false);
if (_local6 == undefined) {
_local5 = true;
} else {
_local5 = false;
}
this.world.MoveDown();
_local3._y = 1147.6;
this.world.current.ShowAllUnits(_local3);
if (this.world.current.blnBoss == true) {
this.ShowBoss(_local3);
}
this.MoveAvatarToBubble("destBottom");
this.transitionState = 2;
} else {
_local6 = this.world.GetRight(false);
if (_local6 == undefined) {
_local5 = true;
} else {
_local5 = false;
}
this.world.MoveRight();
_local3._x = 1147.6;
this.world.current.ShowAllUnits(_local3);
if (this.world.current.blnBoss == true) {
this.ShowBoss(_local3);
}
this.MoveAvatarToBubble("destRight");
this.transitionState = 1;
}
this.arrMap.push({xloc:this.world.x, yloc:this.world.y, blnCreate:_local5, blnBoss:false});
}
};
_local2.GetDistance = function () {
var _local3 = _root.avatar._x - _root.bg._x;
var _local2 = _root.avatar._y - _root.bg._y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
};
_local2.GetAngle = function () {
var _local2 = new Vector();
_local2._x = _root.avatar._x - _root.bg._x;
_local2._y = _root.avatar._y - _root.bg._y;
var _local3 = Math.atan2(_local2._y, _local2._x);
var _local4 = (360 * _local3) / (Math.PI*2);
return(_local4);
};
_local2.MoveAvatarToBubble = function (bubbleDest) {
if (this.runOnce == false) {
this.intTotalFrames = 35;
this.easeFrames = 35;
var ref = eval ("_root.bg." + bubbleDest);
var myPoint = {x:ref._x, y:ref._y};
_root.bg.localToGlobal(myPoint);
this.dblDestX = myPoint.x;
this.dblDestY = myPoint.y;
this.BuildPointList();
this.vecMomentum._x = 0;
this.vecMomentum._y = 0;
this.runOnce = true;
}
};
} else {
// unexpected jump
}
_local2.MoveAvatar = function () {
var _local6 = new Vector();
var _local4 = this.upgradePath.currentNode.nodeData._speed;
if (this.stickyCounter > 0) {
_local4 = 1;
}
var _local5 = _local4;
if (_local5 < 1) {
_local5 == 1;
}
if (Key.isDown(_global.avatarRight) && (!Key.isDown(_global.avatarLeft))) {
this.vecMomentum._x = this.vecMomentum._x + (this.numSensitivity * _local5);
if (this.vecMomentum._x > (this.numAvatarMaxVelocity * _local4)) {
this.vecMomentum._x = this.numAvatarMaxVelocity * _local4;
}
}
if (Key.isDown(_global.avatarLeft) && (!Key.isDown(_global.avatarRight))) {
this.vecMomentum._x = this.vecMomentum._x - (this.numSensitivity * _local5);
if (this.vecMomentum._x < ((this.numAvatarMaxVelocity * _local4) * -1)) {
this.vecMomentum._x = (this.numAvatarMaxVelocity * _local4) * -1;
}
}
if (Key.isDown(_global.avatarDown) && (!Key.isDown(_global.avatarUp))) {
this.vecMomentum._y = this.vecMomentum._y + (this.numSensitivity * _local5);
if (this.vecMomentum._y > (this.numAvatarMaxVelocity * _local4)) {
this.vecMomentum._y = this.numAvatarMaxVelocity * _local4;
}
}
if (Key.isDown(_global.avatarUp) && (!Key.isDown(_global.avatarDown))) {
this.vecMomentum._y = this.vecMomentum._y - (this.numSensitivity * _local5);
if (this.vecMomentum._y < ((this.numAvatarMaxVelocity * _local4) * -1)) {
this.vecMomentum._y = (this.numAvatarMaxVelocity * _local4) * -1;
}
}
if ((!Key.isDown(_global.avatarLeft)) && (!Key.isDown(_global.avatarRight))) {
if (this.vecMomentum._x > 0) {
this.vecMomentum._x = this.vecMomentum._x - (this.numResistence * _local5);
}
if (this.vecMomentum._x < 0) {
this.vecMomentum._x = this.vecMomentum._x + (this.numResistence * _local5);
}
if ((this.vecMomentum._x >= -0.3) && (this.vecMomentum._x <= 0.3)) {
this.vecMomentum._x = 0;
}
}
if ((!Key.isDown(_global.avatarUp)) && (!Key.isDown(_global.avatarDown))) {
if (this.vecMomentum._y > 0) {
this.vecMomentum._y = this.vecMomentum._y - (this.numResistence * _local5);
}
if (this.vecMomentum._y < 0) {
this.vecMomentum._y = this.vecMomentum._y + (this.numResistence * _local5);
}
if ((this.vecMomentum._y >= -0.3) && (this.vecMomentum._y <= 0.3)) {
this.vecMomentum._y = 0;
}
}
this.RotateTank();
_local6._x = this.vecMomentum._x * -1;
_local6._y = this.vecMomentum._y * -1;
if (this.stickyCounter > 0) {
this.stickyCounter--;
if (this.stickyCounter == 0) {
_root.avatar.gun.effects.gotoAndStop(1);
this.vecMomentum._x = (_local6._x * 0.1) * -1;
this.vecMomentum._y = (_local6._y * 0.1) * -1;
} else {
_local6._x = _local6._x * 0.1;
_local6._y = _local6._y * 0.1;
}
}
return(_local6);
};
_local2.RotateTank = function () {
if ((this.vecMomentum._x != 0) || (this.vecMomentum._y != 0)) {
var _local3 = Math.atan2(this.vecMomentum._y, this.vecMomentum._x);
var _local4 = (360 * _local3) / (Math.PI*2);
_root.avatar.bottom._rotation = _local4;
}
};
_local2.RotateGun = function () {
if (this.upgradePath.currentNode.nodeData._turnMode == 2) {
var _local13 = this.vecMomentum.AngleToAlign(_root.avatar.gun._rotation, this.vecMomentum.GetLength() / 2, 0.5);
if (this.stickyCounter > 0) {
_local13 = _local13 * 0.1;
}
_root.avatar.gun._rotation = _root.avatar.gun._rotation + _local13;
} else {
var _local3 = new Vector();
_local3._x = _xmouse - _root.avatar._x;
_local3._y = _ymouse - _root.avatar._y;
var _local8 = Math.atan2(_local3._y, _local3._x);
var _local9 = (360 * _local8) / (Math.PI*2);
_root.avatar.gun._rotation = _local9;
}
if (this.upgradePath.currentNode.nodeData._turnMode == 2) {
var _local4 = 0;
while (_local4 < this.upgradePath.currentNode.nodeData._arrPrimaryWeapons.length) {
var _local10 = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[_local4].type;
var _local6 = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[_local4].name;
var _local7 = false;
switch (_local10) {
case 3 :
case 16 :
case 28 :
_local7 = true;
break;
default :
_local7 = false;
}
if (_local7 == true) {
var _local5 = {x:_root.avatar.gun[_local6]._x, y:_root.avatar.gun[_local6]._y};
_root.avatar.gun.localToGlobal(_local5);
var _local3 = new Vector();
_local3._x = _root._xmouse - _local5.x;
_local3._y = _root._ymouse - _local5.y;
var _local8 = Math.atan2(_local3._y, _local3._x);
var _local9 = (360 * _local8) / (Math.PI*2);
_root.avatar.gun[_local6]._rotation = _local9 - _root.avatar.gun._rotation;
}
_local4++;
}
_local4 = 0;
while (_local4 < this.upgradePath.currentNode.nodeData._arrSecondaryWeapons.length) {
var _local10 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[_local4].type;
var _local6 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[_local4].name;
var _local7 = false;
switch (_local10) {
case 3 :
case 16 :
_local7 = true;
break;
default :
_local7 = false;
}
if (_local7 == true) {
var _local5 = {x:_root.avatar.gun[_local6]._x, y:_root.avatar.gun[_local6]._y};
_root.avatar.gun.localToGlobal(_local5);
var _local3 = new Vector();
_local3._x = _root._xmouse - _local5.x;
_local3._y = _root._ymouse - _local5.y;
var _local8 = Math.atan2(_local3._y, _local3._x);
var _local9 = (360 * _local8) / (Math.PI*2);
_root.avatar.gun[_local6]._rotation = _local9 - _root.avatar.gun._rotation;
}
_local4++;
}
}
};
_local2.ShootGun = function () {
if (_global.gamePaused == false) {
if (((this.avatarLife.Get() >= 76) && (this.avatarLife.Get() <= 200)) && (this.secondBulletCounter != 1)) {
this.secondBulletCounter = 3;
}
var thisRef = this;
var _local4 = "avatarBullet_" + this.numBulletDepth;
var _local6 = new Vector();
_local6._x = Math.cos((Math.PI * _root.avatar.gun._rotation) / 180) * 10;
_local6._y = Math.sin((Math.PI * _root.avatar.gun._rotation) / 180) * 10;
var _local5 = {x:_root.avatar.gun.emitter._x, y:_root.avatar.gun.emitter._y};
if (((this.avatarLife.Get() >= 201) && (this.avatarLife.Get() <= 370)) || (this.avatarLife.Get() >= 371)) {
_local5.x = _root.avatar.gun.emitter1._x;
_local5.y = _root.avatar.gun.emitter1._y;
}
_root.avatar.gun.localToGlobal(_local5);
_root.attachMovie("component_bubble_red", _local4, this.numBulletDepth);
_root[_local4]._x = _local5.x;
_root[_local4]._y = _local5.y;
_root[_local4].SetMovement(_local6._x, _local6._y);
_root[_local4]._enemy = false;
this.numBulletDepth++;
this.arrBullets.push(_local4);
_global.SoundManager.PlaySound("shoot");
_root[_local4].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
if ((this.avatarLife.Get() >= 201) && (this.avatarLife.Get() <= 370)) {
_local4 = "avatarBullet_" + this.numBulletDepth;
_local5.x = _root.avatar.gun.emitter2._x;
_local5.y = _root.avatar.gun.emitter2._y;
_root.avatar.gun.localToGlobal(_local5);
_root.attachMovie("component_bubble_red", _local4, this.numBulletDepth);
_root[_local4]._x = _local5.x;
_root[_local4]._y = _local5.y;
_root[_local4].SetMovement(_local6._x, _local6._y);
_root[_local4]._enemy = false;
this.numBulletDepth++;
this.arrBullets.push(_local4);
_root[_local4].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
_local4 = "avatarBullet_" + this.numBulletDepth;
_local5.x = _root.avatar.gun.emitter3._x;
_local5.y = _root.avatar.gun.emitter3._y;
_root.avatar.gun.localToGlobal(_local5);
_root.attachMovie("component_bubble_red", _local4, this.numBulletDepth);
_root[_local4]._x = _local5.x;
_root[_local4]._y = _local5.y;
_root[_local4].SetMovement(_local6._x, _local6._y);
_root[_local4]._enemy = false;
this.numBulletDepth++;
this.arrBullets.push(_local4);
_root[_local4].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
} else if (this.avatarLife.Get() >= 371) {
_local4 = "avatarBullet_" + this.numBulletDepth;
_local5.x = _root.avatar.gun.emitter2._x;
_local5.y = _root.avatar.gun.emitter2._y;
_root.avatar.gun.localToGlobal(_local5);
_root.attachMovie("component_bubble_red", _local4, this.numBulletDepth);
_root[_local4]._x = _local5.x;
_root[_local4]._y = _local5.y;
_root[_local4]._xscale = 300;
_root[_local4]._yscale = 300;
_root[_local4]._damage = 8;
_local6._x = _local6._x * 0.5;
_local6._y = _local6._y * 0.5;
_root[_local4].SetMovement(_local6._x, _local6._y);
_root[_local4]._enemy = false;
this.numBulletDepth++;
this.arrBullets.push(_local4);
_root[_local4].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
}
}
};
_local2.MouseDown = function () {
this.blnPrimaryActive = true;
};
_local2.MouseUp = function () {
this.blnPrimaryActive = false;
};
_local2.OperateAvatarSecondaryWeapons = function () {
if (this.intSecondaryCounter == 0) {
var _local3 = 0;
while (_local3 < this.upgradePath.currentNode.nodeData._arrSecondaryWeapons.length) {
var _local4 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[_local3].type;
var _local2 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[_local3].name;
var _local5 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[_local3].delay;
switch (_local4) {
case 6 :
this.Gun_Mines(_local2);
break;
case 8 :
this.Gun_Shield();
break;
case 10 :
this.Gun_Teleport();
break;
case 12 :
this.Gun_Seekers(_local2);
break;
case 14 :
this.Gun_ShortStun(_local2);
break;
case 15 :
this.Gun_DamageBurst(_local2);
break;
case 16 :
this.Gun_Sticky(_local2);
break;
case 19 :
this.Gun_StarBurst(_local2);
break;
case 21 :
this.Gun_AreaBurstCannon(_local2);
break;
case 22 :
this.Gun_StickyBurst(_local2);
break;
case 23 :
this.Gun_LargeStun(_local2);
break;
case 27 :
this.Gun_MassiveCannon(_local2);
break;
case 30 :
this.Gun_Infector(_local2);
break;
case 32 :
this.Gun_Convert(_local2);
break;
case 33 :
this.Gun_FighterBay(_local2);
}
this.intSecondaryCounter = _local5;
_local3++;
}
this.blnFireRateFlag = true;
}
};
_local2.OperateAvatarWeapons = function () {
if (this.intPrimaryCounter == 0) {
if (this.intAssembledState == 0) {
if (this.blnPrimaryActive == true) {
var _local2 = 0;
while (_local2 < this.upgradePath.currentNode.nodeData._arrPrimaryWeapons.length) {
var _local3 = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[_local2].type;
var _local4 = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[_local2].name;
var _local5 = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[_local2].delay;
switch (_local3) {
case 1 :
this.Gun_BasicCannon(_local4);
break;
case 2 :
this.Gun_2Parallel(_local4);
break;
case 3 :
this.Gun_HeavyCannon(_local4);
break;
case 4 :
this.Gun_3Spread(_local4);
break;
case 5 :
this.Gun_3Parallel(_local4);
break;
case 7 :
this.Gun_5Parallel(_local4);
break;
case 9 :
this.Gun_PierceShot(_local4, 1);
break;
case 11 :
this.Gun_UpgradedMachineGun(_local4);
break;
case 13 :
this.Gun_5Spread(_local4);
break;
case 18 :
this.Gun_PierceShot(_local4, 2);
break;
case 20 :
this.Gun_2ParallelLargeMG(_local4);
break;
case 25 :
this.Gun_ExplosivePierceShot(_local4);
break;
case 28 :
this.Gun_BulletBuster(_local4);
break;
case 29 :
this.Gun_Leecher(_local4);
break;
case 31 :
this.Gun_Mitosis(_local4);
}
this.intPrimaryCounter = _local5;
_local2++;
}
this.blnFireRateFlag = true;
}
}
} else if (this.intPrimaryCounter > 0) {
this.intPrimaryCounter--;
}
if (this.intSecondaryCounter > 0) {
this.intSecondaryCounter--;
}
if (this.upgradePath.currentNode.nodeData._hasAutoGuns == true) {
this.AimAvatarAutoWeapons();
if (this.intAutoCounter > 0) {
this.intAutoCounter--;
} else if (this.intAutoCounter == 0) {
this.FireAvatarAutoWeapons();
}
}
var _local2 = 0;
while (_local2 < this.upgradePath.currentNode.nodeData._arrSecondaryWeapons.length) {
var _local3 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[_local2].type;
var _local4 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[_local2].name;
var _local5 = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[_local2].delay;
if (!(_local3 === 26)) {
} else {
this.Manage_OrbitalSeekers(_local2);
}
_local2++;
}
if (this.intShieldCounter > 0) {
this.intShieldCounter--;
}
};
_local2.AimAvatarAutoWeapons = function () {
if (this.transitionState == 0) {
var i = 0;
while (i < this.upgradePath.currentNode.nodeData._arrPrimaryWeapons.length) {
var gunType = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].type;
var gunName = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].name;
var gunDelay = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].delay;
var blnIsAutoFire = false;
if (!(gunType === 17)) {
} else {
blnIsAutoFire = true;
}
if (blnIsAutoFire == true) {
var gunTarget = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].target;
if (gunTarget != "") {
var gunRef = eval ("_root.avatar.gun." + gunName);
var point = {x:gunRef._x, y:gunRef._y};
_root.avatar.gun.localToGlobal(point);
var bulletSpeed = 0;
switch (gunType) {
case 17 :
bulletSpeed = 10;
break;
default :
bulletSpeed = 10;
}
var aimVector = new Vector();
aimVector._x = _root[gunTarget]._x - point.x;
aimVector._y = _root[gunTarget]._y - point.y;
var aimPoint = _root[gunTarget].PredictTargetLocation(aimVector.GetLength(), bulletSpeed);
aimVector._x = aimPoint.x - point.x;
aimVector._y = aimPoint.y - point.y;
_root.avatar.gun[gunName]._rotation = aimVector.GetAngle() - _root.avatar.gun._rotation;
}
}
i++;
}
}
};
_local2.FireAvatarAutoWeapons = function () {
if (this.transitionState == 0) {
var i = 0;
while (i < this.upgradePath.currentNode.nodeData._arrPrimaryWeapons.length) {
var gunType = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].type;
var gunName = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].name;
var gunDelay = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].delay;
var blnIsAutoFire = false;
if (!(gunType === 17)) {
} else {
blnIsAutoFire = true;
}
if (blnIsAutoFire == true) {
var gunTarget = this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].target;
if (gunTarget != "") {
if (!(gunType === 17)) {
} else {
this.Gun_SmallAutoCannon(gunName);
}
}
var gunRef = eval ("_root.avatar.gun." + gunName);
var point = {x:gunRef._x, y:gunRef._y};
gunRef._parent.localToGlobal(point);
this.upgradePath.currentNode.nodeData._arrPrimaryWeapons[i].target = this.world.current.GetClosestUnit(point.x, point.y);
this.intAutoCounter = gunDelay;
}
i++;
}
}
};
_local2.Manage_OrbitalSeekers = function (gunIndex) {
var gunType = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[gunIndex].type;
var gunName = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[gunIndex].name;
var gunDelay = this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[gunIndex].delay;
if (this.arrAllySeekers.length < 5) {
if (this.intSecondaryCounter == 0) {
var gunRef = eval ("_root.avatar.gun." + gunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var spawnedName = ("avatarSeeker_" + this.numBulletDepth);
_root.attachMovie("Ally_Orbital_Seeker", spawnedName, this.numBulletDepth);
_root[spawnedName]._x = point.x;
_root[spawnedName]._y = point.y;
_root[spawnedName]._damage = 5;
this.arrAllySeekers.push({name:spawnedName, from:gunName});
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
this.intSecondaryCounter = gunDelay;
}
}
};
_local2.Gun_Shield = function () {
var _local2 = new Vector();
_local2._x = 250;
_local2._y = 200;
this.CreateEffect("shield_avatar", _local2, true, "avatar");
this.intShieldCounter = 25;
};
_local2.Gun_BasicCannon = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_SmallAutoCannon = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var useRotation = _root.avatar.gun._rotation;
useRotation = useRotation + gunRef._rotation;
this.AvatarFireBullet(vecStart, useRotation, 10, 100, 1);
};
_local2.Gun_UpgradedMachineGun = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 11, 100, 2);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_HeavyCannon = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var useRotation = _root.avatar.gun._rotation;
if (this.upgradePath.currentNode.nodeData._turnMode == 2) {
useRotation = useRotation + gunRef._rotation;
}
this.AvatarFireBullet(vecStart, useRotation, 7.5, 300, 5);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_MassiveCannon = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
gunRef.bullet_mc._visible = true;
gunRef.bullet_mc.gotoAndPlay(2);
};
_local2.Fire_MassiveCannon = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
this.FlashScreen();
this.ShakeScreen(80);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var bulletName = this.AvatarFireSpecialBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 90, "massive_bullet");
_root[bulletName]._type = 7;
_root[bulletName]._rotation = _root.avatar.gun._rotation;
};
_local2.Gun_Sticky = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var useRotation = _root.avatar.gun._rotation;
if (this.upgradePath.currentNode.nodeData._turnMode == 2) {
useRotation = useRotation + gunRef._rotation;
}
var bulletName = this.AvatarFireSpecialBullet(vecStart, useRotation, 7.5, 100, 0, "sticky");
_root[bulletName]._type = 3;
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_StickyBurst = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var useRotation = 0;
while (useRotation < 360) {
var bulletName = this.AvatarFireSpecialBullet(vecStart, useRotation, 7.5, 100, 0, "sticky");
_root[bulletName]._type = 3;
useRotation = useRotation + 10;
}
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_AreaBurstCannon = function (myGunName, subType) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var bulletName = this.AvatarFireSpecialBullet(vecStart, _root.avatar.gun._rotation, 7, 300, 20, "component_bubble_orange_flashing");
_root[bulletName]._type = 5;
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_StarBurst = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var bulletName = this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 7.5, 200, 15);
_root[bulletName]._type = 4;
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_BulletBuster = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var useRotation = _root.avatar.gun._rotation;
if (this.upgradePath.currentNode.nodeData._turnMode == 2) {
useRotation = useRotation + gunRef._rotation;
}
var bulletName = this.AvatarFireSpecialBullet(vecStart, useRotation, 10, 100, 0, "bullet_buster");
_root[bulletName]._type = 8;
this.arrBulletBusters.push(bulletName);
_global.SoundManager.PlaySound("shoot");
};
_local2.SpawnStartBurstShard = function (xLoc, yLoc, intRotation) {
var _local3 = new Vector();
_local3._x = xLoc;
_local3._y = yLoc;
var _local4 = this.AvatarFireSpecialBullet(_local3, intRotation, 14, 100, 5, "sniper_bullet");
_root[_local4]._rotation = intRotation;
_root[_local4]._type = 2;
};
_local2.Gun_Leecher = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var bulletName = this.AvatarFireSpecialBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 8, "leecher_bullet");
_root[bulletName]._rotation = _root.avatar.gun._rotation;
_root[bulletName]._type = 9;
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_PierceShot = function (myGunName, subType) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var intDamage = 0;
if (subType == 1) {
intDamage = 8;
} else if (subType == 2) {
intDamage = 14;
}
var bulletName = this.AvatarFireSpecialBullet(vecStart, _root.avatar.gun._rotation, 14, 100, intDamage, "sniper_bullet");
_root[bulletName]._rotation = _root.avatar.gun._rotation;
_root[bulletName]._type = 2;
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_ExplosivePierceShot = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
var bulletName = this.AvatarFireSpecialBullet(vecStart, _root.avatar.gun._rotation, 14, 100, 25, "sniper_bullet");
_root[bulletName]._rotation = _root.avatar.gun._rotation;
_root[bulletName]._type = 6;
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_2Parallel = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter1._x, y:gunRef.emitter1._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
point = {x:gunRef.emitter2._x, y:gunRef.emitter2._y};
gunRef.localToGlobal(point);
vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_2ParallelLargeMG = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter1._x, y:gunRef.emitter1._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 9, 200, 2);
point = {x:gunRef.emitter2._x, y:gunRef.emitter2._y};
gunRef.localToGlobal(point);
vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 9, 200, 2);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_3Spread = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter1._x, y:gunRef.emitter1._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
var point = {x:gunRef.emitter2._x, y:gunRef.emitter2._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation - 30, 10, 100, 1);
var point = {x:gunRef.emitter3._x, y:gunRef.emitter3._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation + 30, 10, 100, 1);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_5Spread = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter1._x, y:gunRef.emitter1._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation - 20, 10, 100, 1);
var point = {x:gunRef.emitter2._x, y:gunRef.emitter2._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation - 10, 10, 100, 1);
var point = {x:gunRef.emitter3._x, y:gunRef.emitter3._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
var point = {x:gunRef.emitter4._x, y:gunRef.emitter4._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation + 10, 10, 100, 1);
var point = {x:gunRef.emitter5._x, y:gunRef.emitter5._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation + 20, 10, 100, 1);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_3Parallel = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter1._x, y:gunRef.emitter1._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
point = {x:gunRef.emitter2._x, y:gunRef.emitter2._y};
gunRef.localToGlobal(point);
vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
point = {x:gunRef.emitter3._x, y:gunRef.emitter3._y};
gunRef.localToGlobal(point);
vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_5Parallel = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter1._x, y:gunRef.emitter1._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
point = {x:gunRef.emitter2._x, y:gunRef.emitter2._y};
gunRef.localToGlobal(point);
vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
point = {x:gunRef.emitter3._x, y:gunRef.emitter3._y};
gunRef.localToGlobal(point);
vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
point = {x:gunRef.emitter4._x, y:gunRef.emitter4._y};
gunRef.localToGlobal(point);
vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
point = {x:gunRef.emitter5._x, y:gunRef.emitter5._y};
gunRef.localToGlobal(point);
vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireBullet(vecStart, _root.avatar.gun._rotation, 10, 100, 1);
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_Mines = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var vecStart = new Vector();
vecStart._x = point.x;
vecStart._y = point.y;
this.AvatarFireSpecialBullet(vecStart, _root.avatar.gun._rotation, 0, 100, 8, "mine_2");
_global.SoundManager.PlaySound("shoot");
};
_local2.Gun_Teleport = function () {
if (this.transitionState == 0) {
var _local3 = new Vector();
_local3._x = -1 * (_root._xmouse - _root.avatar._x);
_local3._y = -1 * (_root._ymouse - _root.avatar._y);
this.Effect_Teleport(_root.avatar._x, _root.avatar._y);
this.FlashScreen();
this.MoveWorld(_local3);
}
};
_local2.Gun_ShortStun = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
this.Effect_ShortStun(point.x, point.y);
this.FlashScreen();
this.ShakeScreen(20);
var arrStunned = this.world.current.GetUnitsWithinDistance(point.x, point.y, 125);
var i = 0;
while (i < arrStunned.length) {
this.Effect_Stunned(_root[arrStunned[i]]._x, _root[arrStunned[i]]._y);
_root[arrStunned[i]].Stun(120);
i++;
}
};
_local2.Gun_LargeStun = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
this.Effect_LargeStun(point.x, point.y);
this.FlashScreen();
this.ShakeScreen(35);
var arrStunned = this.world.current.GetUnitsWithinDistance(point.x, point.y, 200);
var i = 0;
while (i < arrStunned.length) {
this.Effect_Stunned(_root[arrStunned[i]]._x, _root[arrStunned[i]]._y);
_root[arrStunned[i]].Stun(180);
i++;
}
};
_local2.Gun_DamageBurst = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
this.DamageBurst(point.x, point.y, 8);
};
_local2.Gun_Convert = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
this.Effect_Convert(point.x, point.y);
this.FlashScreen();
this.ShakeScreen(60);
this.world.current.ConvertDrones();
};
_local2.SpawnSeeker = function (xloc, yloc, intDamage, intType) {
var _local3 = "avatarSeeker_" + this.numBulletDepth;
if (intType == 3) {
_root.attachMovie("Ally_Orbital_Seeker", _local3, this.numBulletDepth);
} else {
_root.attachMovie("Ally_Seeker", _local3, this.numBulletDepth);
}
_root[_local3]._x = xloc;
_root[_local3]._y = yloc;
_root[_local3]._damage = intDamage;
this.arrAllySeekers.push({name:_local3, from:""});
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
};
_local2.Gun_Seekers = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var spawnedName = ("avatarSeeker_" + this.numBulletDepth);
_root.attachMovie("Ally_Seeker", spawnedName, this.numBulletDepth);
_root[spawnedName]._x = point.x;
_root[spawnedName]._y = point.y;
_root[spawnedName]._damage = 10;
this.arrAllySeekers.push({name:spawnedName, from:myGunName});
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
};
_local2.Gun_FighterBay = function (myGunName) {
var blnFound = false;
var i = 0;
while (i < this.arrAllies.length) {
if (_root[this.arrAllies[i]]._strCreatedBy == myGunName) {
blnFound = true;
break;
}
i++;
}
if (blnFound == false) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
this.SpawnFighter(point.x, point.y, gunRef._rotation, myGunName);
}
};
_local2.SpawnFighter = function (xloc, yloc, intRotation, myGunName) {
var _local3 = "ally_" + this.numAllyDepth;
_root.attachMovie("Ally_Fighter", _local3, this.numAllyDepth);
_root[_local3]._x = xloc;
_root[_local3]._y = yloc;
_root[_local3]._rotation = intRotation;
_root[_local3]._strCreatedBy = myGunName;
this.arrAllies.push(_local3);
this.numAllyDepth++;
if (this.numAllyDepth > 600) {
this.numAllyDepth = 560;
}
};
_local2.CleanAllies = function () {
var _local4 = this.arrAllies.slice();
var _local3 = 0;
while (_local3 < _local4.length) {
_root[_local4[_local3]].Dock();
_local3++;
}
};
_local2.PauseAllies = function () {
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
_root[this.arrAllies[_local3]].TurnOff();
_local3++;
}
};
_local2.UnPauseAllies = function () {
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
_root[this.arrAllies[_local3]].TurnOn();
_local3++;
}
};
_local2.Gun_Mitosis = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
this.SpawnMitosis(point.x, point.y, 3);
_global.SoundManager.PlaySound("shoot");
};
_local2.SpawnMitosis = function (xloc, yloc, round) {
var _local3 = "avatarSeeker_" + this.numBulletDepth;
_root.attachMovie("Ally_Mitosis", _local3, this.numBulletDepth);
_root[_local3]._x = xloc;
_root[_local3]._y = yloc;
_root[_local3]._damage = 12;
_root[_local3].intRound = round;
var _local4 = 100;
switch (round) {
case 3 :
_local4 = 125;
break;
case 2 :
_local4 = 100;
break;
case 1 :
_local4 = 80;
break;
case 0 :
_local4 = 60;
}
_root[_local3]._xscale = (_root[_local3]._yscale = _local4);
this.arrAllySeekers.push({name:_local3, from:""});
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
return(_local3);
};
_local2.Gun_Infector = function (myGunName) {
var gunRef = eval ("_root.avatar.gun." + myGunName);
var point = {x:gunRef.emitter._x, y:gunRef.emitter._y};
gunRef.localToGlobal(point);
var spawnedName = ("avatarSeeker_" + this.numBulletDepth);
_root.attachMovie("Ally_Infector", spawnedName, this.numBulletDepth);
_root[spawnedName]._x = point.x;
_root[spawnedName]._y = point.y;
_root[spawnedName]._damage = 0;
_root[spawnedName]._type = 3;
_root[spawnedName].intState = 3;
this.arrAllySeekers.push({name:spawnedName, from:myGunName});
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
};
_local2.Gun_SpawnInfectors = function (xloc, yloc, num2Spawn) {
var _local4 = 0;
while (_local4 < num2Spawn) {
var _local3 = "avatarSeeker_" + this.numBulletDepth;
_root.attachMovie("Ally_Infector", _local3, this.numBulletDepth);
_root[_local3]._x = xloc;
_root[_local3]._y = yloc;
_root[_local3]._damage = 0;
_root[_local3]._type = 3;
_root[_local3].intState = 2;
this.arrAllySeekers.push({name:_local3, from:""});
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
_local4++;
}
};
_local2.AvatarFireBullet = function (emitterPos, direction, speed, size, damage) {
var thisRef = this;
var _local3 = "avatarBullet_" + this.numBulletDepth;
var _local4 = new Vector();
_local4._x = Math.cos((Math.PI * direction) / 180) * speed;
_local4._y = Math.sin((Math.PI * direction) / 180) * speed;
if (size == 100) {
_root.attachMovie("component_bubble_orange_opt", _local3, this.numBulletDepth);
} else {
_root.attachMovie("component_bubble_orange", _local3, this.numBulletDepth);
}
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3]._xscale = size;
_root[_local3]._yscale = size;
_root[_local3]._damage = damage;
_root[_local3].SetMovement(_local4._x, _local4._y);
_root[_local3]._enemy = false;
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
return(_local3);
};
_local2.AvatarFireSpecialBullet = function (emitterPos, direction, speed, size, damage, type) {
var thisRef = this;
if (type == "mine_2") {
var _local3 = "avatarBullet_" + this.numMineDepth;
} else {
var _local3 = "avatarBullet_" + this.numBulletDepth;
}
var _local4 = new Vector();
_local4._x = Math.cos((Math.PI * direction) / 180) * speed;
_local4._y = Math.sin((Math.PI * direction) / 180) * speed;
if (type == "mine_2") {
_root.attachMovie(type, _local3, this.numMineDepth);
} else {
_root.attachMovie(type, _local3, this.numBulletDepth);
}
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3]._xscale = size;
_root[_local3]._yscale = size;
_root[_local3]._damage = damage;
_root[_local3].SetMovement(_local4._x, _local4._y);
_root[_local3]._enemy = false;
if (type == "mine_2") {
this.numMineDepth++;
if (this.numMineDepth > 199) {
this.numMineDepth = 100;
}
} else {
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
return(_local3);
};
_local2.DamageBurst = function (xLoc, yLoc, numDamage) {
this.Effect_DamageBurst(xLoc, yLoc);
this.FlashScreen();
this.ShakeScreen(20);
var _local4 = this.world.current.GetUnitsWithinDistance(xLoc, yLoc, 150);
var _local3 = 0;
while (_local3 < _local4.length) {
this.Effect_PierceExplosion(_root[_local4[_local3]]._x, _root[_local4[_local3]]._y);
_root[_local4[_local3]].ReceiveDamage(numDamage, "");
_local3++;
}
};
_local2.SmallDamageBurst = function (xLoc, yLoc) {
this.Effect_SmallDamageBurst(xLoc, yLoc);
this.FlashScreen();
this.ShakeScreen(10);
var _local4 = this.world.current.GetUnitsWithinDistance(xLoc, yLoc, 75);
var _local3 = 0;
while (_local3 < _local4.length) {
this.Effect_PierceExplosion(_root[_local4[_local3]]._x, _root[_local4[_local3]]._y);
_root[_local4[_local3]].ReceiveDamage(10, "");
_local3++;
}
};
_local2.EnemyFire = function (emitterPos, direction, speed, size, damage) {
damage = damage * 3;
var thisRef = this;
var _local3 = "enemyBullet_" + this.numBulletDepth;
var _local4 = new Vector();
_local4._x = Math.cos((Math.PI * direction) / 180) * speed;
_local4._y = Math.sin((Math.PI * direction) / 180) * speed;
if (size == 100) {
_root.attachMovie("component_bubble_red_opt", _local3, this.numBulletDepth);
} else {
_root.attachMovie("component_bubble_red", _local3, this.numBulletDepth);
}
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3]._xscale = size;
_root[_local3]._yscale = size;
_root[_local3]._damage = damage;
_root[_local3].SetMovement(_local4._x, _local4._y);
_root[_local3]._enemy = true;
this.numBulletDepth++;
if (this.numBulletDepth > 105000) {
this.numBulletDepth = 100000 /* 0x0186A0 */;
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.EnemyFireSpecial = function (myType, emitterPos, direction, speed, size, damage) {
if (myType == "mine") {
damage = damage * 3;
var thisRef = this;
var _local3 = "enemyBullet_" + this.numBulletDepth;
var _local5 = new Vector();
_local5._x = 0;
_local5._y = 0;
_root.attachMovie("mine_1", _local3, this.numBulletDepth);
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3]._xscale = size;
_root[_local3]._yscale = size;
_root[_local3]._damage = damage;
_root[_local3].SetMovement(_local5._x, _local5._y);
_root[_local3]._enemy = true;
this.numBulletDepth++;
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
} else if (myType == "sticky") {
damage = damage * 3;
var thisRef = this;
var _local3 = "enemySticky_" + this.numBulletDepth;
var _local5 = new Vector();
_local5._x = Math.cos((Math.PI * direction) / 180) * speed;
_local5._y = Math.sin((Math.PI * direction) / 180) * speed;
_root.attachMovie("sticky", _local3, this.numBulletDepth);
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3]._xscale = size;
_root[_local3]._yscale = size;
_root[_local3]._damage = damage;
_root[_local3].SetMovement(_local5._x, _local5._y);
_root[_local3]._enemy = true;
this.numBulletDepth++;
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
}
};
_local2.outputPoints = function () {
var _local4 = this.deltaList.length;
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = this.deltaList[_local2];
_local2++;
}
};
_local2.BuildPointList = function () {
this.deltaX = this.dblDestX - _root.avatar._x;
this.deltaY = this.dblDestY - _root.avatar._y;
var _local12 = this.easeFrames * this.checkFactor(this.easeFrames);
var _local10 = this.deltaX / _local12;
var _local9 = this.deltaY / _local12;
if (this.easeFrames > 0) {
var _local8;
_local8 = this.EaseIn();
var _local11 = _local8.length;
var _local3 = 0;
while (_local3 < _local11) {
var _local4 = _local8[_local3];
var _local5 = _local10 * _local4;
var _local7 = _local9 * _local4;
var _local6 = new Point(_local5, _local7);
this.deltaList.push(_local6);
_local3++;
}
}
};
_local2.EaseIn = function () {
var _local4 = new Array();
var _local5 = (Math.PI/2) / this.easeFrames;
var _local2 = 1;
while (_local2 <= this.easeFrames) {
var _local3 = _local2 * _local5;
_local4.push(Math.sin(_local3));
_local2++;
}
return(_local4);
};
_local2.EaseOut = function () {
var _local4 = new Array();
var _local5 = (Math.PI/2) / this.easeFrames;
var _local2 = 1;
while (_local2 <= this.easeFrames) {
var _local3 = _local2 * _local5;
_local4.push(Math.sin(_local3 + (Math.PI/2)));
_local2++;
}
return(_local4);
};
_local2.checkFactor = function (howMany) {
var _local4;
if (howMany == this.easeFrames) {
_local4 = this.EaseOut();
}
var _local5 = _local4.length;
var _local3 = 0;
var _local2 = 0;
while (_local2 < _local5) {
_local3 = _local3 + _local4[_local2];
_local2++;
}
return(_local3 / howMany);
};
_local2.CreateEffect = function (effectName, effectLocation, lockLocation, lockTarget) {
var _local3 = "effect_" + this.effectDepth;
_root.attachMovie(effectName, _local3, this.effectDepth);
_root[_local3].gotoAndStop(effectName);
_root[_local3]._x = effectLocation._x;
_root[_local3]._y = effectLocation._y;
this.arrEffects.push({name:_local3, locked:lockLocation, target:lockTarget});
this.effectDepth++;
if (this.effectDepth > 60000) {
this.effectDepth = 50000;
}
return(_local3);
};
_local2.CreateUnderEffect = function (effectName, effectLocation, lockLocation, lockTarget) {
var tempName = ("effect_" + this.underEffectDepth);
_root.effects_mc.attachMovie(effectName, tempName, this.underEffectDepth);
var point = {x:effectLocation._x, y:effectLocation._y};
_root.effects_mc.globalToLocal(point);
var myEffect = eval ("_root.effects_mc." + tempName);
myEffect._x = point.x;
myEffect._y = point.y;
this.arrUnderEffects.push({name:tempName, locked:lockLocation, target:lockTarget});
this.underEffectDepth++;
if (this.underEffectDepth > 60000) {
this.underEffectDepth = 10;
}
return(tempName);
};
_local2.CleanEffects = function () {
var _local3 = 0;
while (_local3 < this.arrEffects.length) {
_root[this.arrEffects[_local3].name].removeMovieClip();
_local3++;
}
delete this.arrEffects;
this.arrEffects = new Array();
_local3 = 0;
while (_local3 < this.arrUnderEffects.length) {
_root.effects_mc[this.arrUnderEffects[_local3].name].removeMovieClip();
_local3++;
}
delete this.arrUnderEffects;
this.arrUnderEffects = new Array();
};
_local2.RemoveEffect = function (strName) {
var _local3 = 0;
while (_local3 < this.arrEffects.length) {
if (strName == this.arrEffects[_local3].name) {
_root[this.arrEffects[_local3].name].removeMovieClip();
this.arrEffects.splice(_local3, 1);
break;
}
_local3++;
}
};
_local2.RemoveUnderEffect = function (strName) {
var _local3 = 0;
while (_local3 < this.arrUnderEffects.length) {
if (strName == this.arrUnderEffects[_local3].name) {
_root.effects_mc[this.arrUnderEffects[_local3].name].removeMovieClip();
this.arrUnderEffects.splice(_local3, 1);
break;
}
_local3++;
}
};
_local2.MoveEffects = function (moveVector) {
var _local3 = 0;
while (_local3 < this.arrEffects.length) {
if (this.arrEffects[_local3].locked == false) {
_root[this.arrEffects[_local3].name]._x = _root[this.arrEffects[_local3].name]._x + moveVector._x;
_root[this.arrEffects[_local3].name]._y = _root[this.arrEffects[_local3].name]._y + moveVector._y;
} else {
_root[this.arrEffects[_local3].name]._x = _root[this.arrEffects[_local3].target]._x;
_root[this.arrEffects[_local3].name]._y = _root[this.arrEffects[_local3].target]._y;
}
_local3++;
}
_local3 = 0;
while (_local3 < this.arrUnderEffects.length) {
if (this.arrUnderEffects[_local3].locked == false) {
_root.effects_mc[this.arrUnderEffects[_local3].name]._x = _root.effects_mc[this.arrUnderEffects[_local3].name]._x + moveVector._x;
_root.effects_mc[this.arrUnderEffects[_local3].name]._y = _root.effects_mc[this.arrUnderEffects[_local3].name]._y + moveVector._y;
} else {
var _local4 = {x:_root[this.arrUnderEffects[_local3].target]._x, y:_root[this.arrUnderEffects[_local3].target]._y};
_root.effects_mc.globalToLocal(_local4);
_root.effects_mc[this.arrUnderEffects[_local3].name]._x = _local4.x;
_root.effects_mc[this.arrUnderEffects[_local3].name]._y = _local4.y;
}
_local3++;
}
};
_local2.ScaleMiniBubble = function () {
var _local3 = _root.avatar._width;
var _local4 = _root.avatar._height;
var _local2 = Math.round(Math.sqrt((_local3 * _local3) + (_local4 * _local4))) - 5;
_local2 = _local2 / 2;
if (_local2 < 59.5) {
_local2 = 59.5;
}
_root.miniBubblesLayer_mc.miniBubble._width = (_root.miniBubblesLayer_mc.miniBubble._height = _local2 * 2);
_root.miniBubblesLayer_mc.miniBubble._x = -_local2;
_root.miniBubblesLayer_mc.miniBubble._y = -_local2;
};
_local2.FlashScreen = function () {
_root.flash_mc._visible = true;
_root.flash_mc.gotoAndStop(2);
_root.flash_mc.inside.gotoAndPlay(1);
};
_local2.ShakeScreen = function (newDuration) {
if (this.intShakeDuration == 0) {
this.intShakeDuration = newDuration;
this.intShakeStart = newDuration;
this.intShakeCounter = 3;
this.vecScreenCoords._x = _root.avatar._x;
this.vecScreenCoords._y = _root.avatar._y;
}
};
_local2.HaltShaking = function () {
if ((this.vecScreenCoords._x != _root.avatar._x) || (this.vecScreenCoords._y != _root.avatar._y)) {
this.intShakeDuration = 0;
var _local5 = this.vecScreenCoords._x - _root.avatar._x;
var _local4 = this.vecScreenCoords._y - _root.avatar._y;
_root.avatar._x = this.vecScreenCoords._x;
_root.avatar._y = this.vecScreenCoords._y;
var _local3 = new Vector();
_local3._x = _local5;
_local3._y = _local4;
this.MoveWorld(_local3);
}
};
_local2.ManageShaking = function () {
if ((_global.gamePaused == false) || ((_global.gamePaused == true) && (this.intBossState == 2))) {
if (this.intShakeDuration > 0) {
this.intShakeDuration--;
if (this.intShakeDuration == 0) {
this.HaltShaking();
} else {
this.intShakeCounter--;
if (this.intShakeCounter == 0) {
this.intShakeCounter = 3;
var _local6 = this.intShakeDuration / this.intShakeStart;
var _local4 = 4;
if (this.intShakeStart > 45) {
_local4 = 6;
}
var _local8 = this.vecScreenCoords._x + (this.RandNum(-1 * _local4, _local4) * _local6);
var _local7 = this.vecScreenCoords._y + (this.RandNum(-1 * _local4, _local4) * _local6);
var _local10 = _local8 - _root.avatar._x;
var _local9 = _local7 - _root.avatar._y;
_root.avatar._x = _local8;
_root.avatar._y = _local7;
var _local5 = new Vector();
_local5._x = _local10;
_local5._y = _local9;
this.MoveWorld(_local5);
}
}
}
}
};
// unexpected jump
// unexpected jump
_local2.RemoveAllySeekers = function () {
var _local3 = 0;
while (_local3 < this.arrAllySeekers.length) {
if (_root[this.arrAllySeekers[_local3].name]._type != 2) {
_root[this.arrAllySeekers[_local3].name].removeMovieClip();
this.arrAllySeekers.splice(_local3, 1);
_local3--;
} else if (_root[this.arrAllySeekers[_local3].name].intState != 2) {
_root[this.arrAllySeekers[_local3].name].removeMovieClip();
this.arrAllySeekers.splice(_local3, 1);
_local3--;
}
_local3++;
}
};
_local2.RemoveAllAllySeekers = function () {
var _local3 = 0;
while (_local3 < this.arrAllySeekers.length) {
_root[this.arrAllySeekers[_local3].name].removeMovieClip();
_local3++;
}
delete this.arrAllySeekers;
this.arrAllySeekers = new Array();
};
_local2.RemoveAlly = function (strName) {
var _local2 = 0;
while (_local2 < this.arrAllies.length) {
if (strName == this.arrAllies[_local2]) {
this.arrAllies.splice(_local2, 1);
break;
}
_local2++;
}
};
_local2.ReportSeekerDead = function (strName) {
var _local2 = 0;
while (_local2 < this.arrAllySeekers.length) {
if (this.arrAllySeekers[_local2].name == strName) {
this.arrAllySeekers.splice(_local2, 1);
break;
}
_local2++;
}
};
_local2.GetNearestEnemy = function (testX, testY) {
return(this.world.current.GetClosestUnit(testX, testY));
};
_local2.RandNum = function (minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
};
_local2.ManageDisassembly = function () {
if (this.upgradePath.currentNode.nodeData._arrSecondaryWeapons[0].type == 24) {
if (this.intAssembledState == 1) {
this.intAssembledFrame++;
_root.avatar.gun.gotoAndStop(this.intAssembledFrame);
if (this.intAssembledFrame == 16) {
this.intAssembledState = 2;
this.AvatarBreakApart();
}
} else if (this.intAssembledState == 2) {
} else if (this.intAssembledState == 3) {
if (this.intAssembledFrame == 16) {
if (this.AvatarCheckIfAssembled() == true) {
this.AvatarComeTogether();
this.intAssembledFrame = 15;
_root.avatar.gun.gotoAndStop(this.intAssembledFrame);
}
} else {
this.intAssembledFrame--;
_root.avatar.gun.gotoAndStop(this.intAssembledFrame);
if (this.intAssembledFrame == 1) {
this.intAssembledState = 0;
}
}
}
}
};
_local2.AvatarBreakApart = function () {
var i = 1;
while (i < 20) {
if (i != 6) {
var bubbleName = (i + "_mc");
var spawnName = (i + "_reg");
if (i < 5) {
_root.attachMovie("component_bubble_yellow_disassembled", bubbleName, 530 + i);
} else {
_root.attachMovie("component_bubble_disassembled", bubbleName, 530 + i);
}
var scaleThis = 100;
switch (i) {
case 1 :
scaleThis = 60;
break;
case 2 :
scaleThis = 130;
break;
case 3 :
scaleThis = 61.5;
break;
case 4 :
scaleThis = 61.5;
break;
case 5 :
scaleThis = 100;
break;
case 7 :
scaleThis = 100;
break;
case 8 :
scaleThis = 68.5;
break;
case 9 :
scaleThis = 68.5;
break;
case 10 :
scaleThis = 60;
break;
case 11 :
scaleThis = 60;
break;
case 12 :
scaleThis = 100;
break;
case 13 :
scaleThis = 56.6;
break;
case 14 :
scaleThis = 56.6;
break;
case 15 :
scaleThis = 60;
break;
case 16 :
scaleThis = 100;
break;
case 17 :
scaleThis = 60;
break;
case 18 :
scaleThis = 56.6;
break;
case 19 :
scaleThis = 56.6;
}
_root[bubbleName]._xscale = (_root[bubbleName]._yscale = scaleThis);
var targetClip = eval ("_root.avatar.gun." + spawnName);
var point = {x:targetClip._x, y:targetClip._y};
_root.avatar.gun.localToGlobal(point);
_root[bubbleName]._x = point.x;
_root[bubbleName]._y = point.y;
_root[bubbleName].SetCounter(this.RandNum(2, 18));
}
i++;
}
};
_local2.AvatarComeTogether = function () {
var _local2 = 1;
while (_local2 <= 19) {
var _local3 = _local2 + "_mc";
_root[_local3].removeMovieClip();
_local2++;
}
};
_local2.AvatarCheckIfAssembled = function () {
var _local2 = 1;
while (_local2 <= 19) {
var _local3 = _local2 + "_mc";
if (_root[_local3]._isReady == false) {
return(false);
}
_local2++;
}
return(true);
};
_local2.Effect_PierceExplosion = function (xLoc, yLoc) {
var _local3 = new Vector();
_local3._x = xLoc;
_local3._y = yLoc;
_root[this.CreateEffect("pierce_shot_hit", _local3, false, "")]._rotation = this.RandNum(0, 360);
};
_local2.Effect_SeekerExplosion = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateEffect("seeker_explosion", _local2, false, "");
};
_local2.Effect_Stunned = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateEffect("stunned", _local2, false, "");
};
_local2.Effect_Teleport = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateEffect("teleport_anim", _local2, false, "");
};
_local2.Effect_ShortStun = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateUnderEffect("stun_burst", _local2, false, "");
};
_local2.Effect_LargeStun = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateUnderEffect("stun_burst_large", _local2, false, "");
};
_local2.Effect_DamageBurst = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateUnderEffect("damage_burst", _local2, false, "");
};
_local2.Effect_SmallDamageBurst = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateUnderEffect("damage_burst_small", _local2, false, "");
};
_local2.Effect_Sticky = function (xLoc, yLoc) {
var _local3 = new Vector();
_local3._x = xLoc;
_local3._y = yLoc;
var _local4 = this.CreateEffect("sticky_effect", _local3, false, "");
_root[_local4]._rotation = this.RandNum(0, 360);
return(_local4);
};
_local2.Effect_Leech = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateEffect("leech_effect", _local2, false, "");
};
_local2.Effect_Infect = function (xLoc, yLoc, targetName) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
return(this.CreateEffect("effect_infected", _local2, true, targetName));
};
_local2.Effect_Convert = function (xLoc, yLoc) {
var _local2 = new Vector();
_local2._x = xLoc;
_local2._y = yLoc;
this.CreateUnderEffect("effect_convert", _local2, false, "");
};
_local2.IsHelpNeeded = function () {
if (this.avatarLife.Get() < (this.maxAvatarLife * 0.8)) {
return(true);
}
return(false);
};
_local2.IsBossNeeded = function (xloc, yloc) {
if ((this.blnBoss == false) && (this.intJumpsAsMax > 2)) {
this.blnBoss = true;
this.intBossState = 1;
this.intBossX = xloc;
this.intBossY = yloc;
return(true);
}
return(false);
};
_local2.GetMaxLife = function () {
return(this.maxAvatarLife);
};
_local2.CheckListAndAdd = function (myType) {
var _local4 = false;
var _local3 = 0;
while (_local3 < _global.encountered.length) {
if (_global.encountered[_local3] == myType) {
_local4 = true;
break;
}
_local3++;
}
if (_local4 == false) {
_global.encountered.push(myType);
this.blnFlushList = true;
}
};
_local2.FlushEncounteredList = function () {
if (this.blnFlushList == true) {
this.blnFlushList = false;
if (this.mySharedObject.data.firstTime != undefined) {
this.mySharedObject.data.enemyList = _global.encountered;
this.mySharedObject.flush();
}
}
};
_local2.IsAvatarLocked = function (myId) {
var _local2 = 0;
while (_local2 < _global.encounteredStates.length) {
if (_global.encounteredStates[_local2] == myId) {
return(false);
}
_local2++;
}
return(true);
};
ASSetPropFlags(_global.BubbleTanksGame.prototype, null, 1);
#endinitclip
Symbol 881 MovieClip [__Packages.BubbleTanksWorld] Frame 0
class BubbleTanksWorld
{
var startX, startY, bossX, bossY, arrBubblefields, current, x, y, enemyDepth, previous;
function BubbleTanksWorld () {
startX = 10000;
startY = 10000;
bossX = 0;
bossY = 0;
arrBubblefields = new Array();
var _local3 = new Bubblefield();
if (_global.gameMode == 2) {
_local3 = _global.arena;
}
_local3.x = startX;
_local3.y = startY;
arrBubblefields.push(_local3);
current = _local3;
x = startX;
y = startY;
enemyDepth = 5000;
}
function RequestEnemyDepth() {
var _local2 = enemyDepth;
enemyDepth++;
if (enemyDepth >= 20000) {
enemyDepth = 5000;
}
return(_local2);
}
function CreateBubblefield(xloc, yloc, blnForceEasy) {
var _local3 = new Bubblefield();
arrBubblefields.push(_local3);
_local3.x = xloc;
_local3.y = yloc;
if (_global.gameMode == 2) {
if ((xloc == startX) && (yloc == startY)) {
CreateEnemies(_local3, xloc, yloc);
}
} else {
CreateEnemies(_local3, xloc, yloc, blnForceEasy);
}
Sort();
return(_local3);
}
function MoveUp() {
previous = current;
var _local2 = Find(x, y + 1);
if (_local2 == undefined) {
_local2 = CreateBubblefield(x, y + 1, false);
}
current = _local2;
y = y + 1;
}
function MoveDown() {
previous = current;
var _local2 = Find(x, y - 1);
if (_local2 == undefined) {
_local2 = CreateBubblefield(x, y - 1, false);
}
current = _local2;
y = y + -1;
}
function MoveLeft() {
previous = current;
var _local2 = Find(x - 1, y);
if (_local2 == undefined) {
_local2 = CreateBubblefield(x - 1, y, false);
}
current = _local2;
x = x + -1;
}
function MoveRight() {
previous = current;
var _local2 = Find(x + 1, y);
if (_local2 == undefined) {
_local2 = CreateBubblefield(x + 1, y, false);
}
current = _local2;
x = x + 1;
}
function MoveTo(xLoc, yLoc) {
previous = current;
var _local2 = Find(xLoc, yLoc);
if (_local2 == undefined) {
_local2 = CreateBubblefield(xLoc, yLoc, false);
}
current = _local2;
x = xLoc;
y = yLoc;
}
function GetRight(blnCreateIfDNE) {
var _local2 = Find(x + 1, y);
if (_local2 == undefined) {
if (blnCreateIfDNE == true) {
_local2 = CreateBubblefield(x + 1, y, blnCreateIfDNE);
}
}
return(_local2);
}
function GetLeft(blnCreateIfDNE) {
var _local2 = Find(x - 1, y);
if (_local2 == undefined) {
if (blnCreateIfDNE == true) {
_local2 = CreateBubblefield(x - 1, y, blnCreateIfDNE);
}
}
return(_local2);
}
function GetDown(blnCreateIfDNE) {
var _local2 = Find(x, y - 1);
if (_local2 == undefined) {
if (blnCreateIfDNE == true) {
_local2 = CreateBubblefield(x, y - 1, blnCreateIfDNE);
}
}
return(_local2);
}
function GetUp(blnCreateIfDNE) {
var _local2 = Find(x, y + 1);
if (_local2 == undefined) {
if (blnCreateIfDNE == true) {
_local2 = CreateBubblefield(x, y + 1, blnCreateIfDNE);
}
}
return(_local2);
}
function Sort() {
arrBubblefields.sortOn(["x", "y"], Array.NUMERIC);
}
function Find(xLoc, yLoc) {
var _local3;
var _local2 = arrBubblefields.bSearch({x:xLoc, y:yLoc}, Array.NUMERIC);
if (_local2 != -1) {
_local3 = arrBubblefields[_local2];
}
return(_local3);
}
function PrintBubblefieldCoordsList() {
var _local3 = "";
var _local2 = 0;
while (_local2 < arrBubblefields.length) {
_local3 = _local3 + (((("(" + arrBubblefields[_local2].x) + ", ") + arrBubblefields[_local2].y) + ") ");
_local2++;
}
}
function CreateEnemies(tempBubblefield, xloc, yloc, blnEasyMode) {
var _local21 = false;
var _local3;
var _local19 = xloc - startX;
var _local18 = yloc - startY;
var _local14 = Math.round(Math.sqrt((_local19 * _local19) + (_local18 * _local18)));
if (blnEasyMode == true) {
_local3 = GetEnemyOptionsEasy(_root.game.GetMaxLife());
} else if (_root.game.IsBossNeeded(xloc, yloc) == true) {
bossX = xloc;
bossY = yloc;
_local21 = true;
tempBubblefield.blnBoss = true;
} else {
var _local20 = 0;
if (_root.game.IsHelpNeeded() == true) {
_local20 = RandNum(0, 100);
}
if (_local20 > 50) {
_local3 = GetEnemyOptionsHelp(_local14);
} else if (_local14 < 10) {
_local3 = GetEnemyOptionsClose(_local14);
} else if ((_local14 >= 10) && (_local14 < 20)) {
_local3 = GetEnemyOptionsMiddle(_local14);
} else if ((_local14 >= 20) && (_local14 < 30)) {
_local3 = GetEnemyOptionsFar(_local14);
} else if (_local14 >= 30) {
_local3 = GetEnemyOptionsVeryFar(_local14);
}
}
if (_local21 == false) {
var _local9 = 0;
var _local11 = 0;
var _local16 = 0;
var _local13 = 0;
var _local6 = 0;
while (_local6 < _local3.length) {
_local16 = _local16 + _local3[_local6].chance;
_local6++;
}
_local13 = Math.round(Math.random() * _local16);
_local6 = 0;
while (_local6 < _local3.length) {
_local11 = _local9 + _local3[_local6].chance;
_local3[_local6].minChance = _local9;
_local3[_local6].maxChance = _local11;
_local9 = _local11;
_local6++;
}
var _local7 = -1;
_local6 = 0;
while (_local6 < _local3.length) {
if ((_local13 >= _local3[_local6].minChance) && (_local13 < _local3[_local6].maxChance)) {
_local7 = _local6;
break;
}
_local6++;
}
if (_local7 == -1) {
_local7 = _local3.length - 1;
}
_local3[_local7].Begin();
var _local10 = 0;
var _local12 = "";
var _local17 = _local3[_local7].GetNumInstructions();
var _local8 = 0;
while (_local8 < _local17) {
_local10 = _local3[_local7].enemyNum;
_local12 = _local3[_local7].enemyType;
var _local5 = 0;
while (_local5 < _local10) {
var _local4 = new Vector();
_local4._x = Math.round(Math.random() * 500) - 250;
_local4._y = Math.round(Math.random() * 400) - 200;
tempBubblefield.AddUnit("enemy_" + enemyDepth, _local12, _local4, enemyDepth);
enemyDepth++;
if (enemyDepth >= 20000) {
enemyDepth = 5000;
}
_local5++;
}
_local3[_local7].Next();
_local8++;
}
}
}
function GetEnemyOptionsHelp(worldDistance) {
var _local3 = new Array();
if (worldDistance < 7) {
var _local2;
_local2 = new WorldInstruction(50);
_local2.AddInstruction("Enemy_17", 1, 2);
_local2.AddInstruction("Enemy_1", 2, 3);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
} else if ((worldDistance >= 7) && (worldDistance < 20)) {
var _local2 = new WorldInstruction(50);
_local2.AddInstruction("Enemy_17", 1, 2);
_local2.AddInstruction("Enemy_1", 3, 5);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 3);
}
_local3.push(_local2);
} else if (worldDistance >= 20) {
var _local2 = new WorldInstruction(50);
_local2.AddInstruction("Enemy_92", 1, 2);
_local2.AddInstruction("Enemy_1", 2, 4);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 3);
}
_local3.push(_local2);
_local2 = new WorldInstruction(50);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 3);
}
_local2.AddInstruction("Enemy_10", 1, 1);
_local3.push(_local2);
}
return(_local3);
}
function GetEnemyOptionsEasy(maxLife) {
var _local3 = new Array();
if (maxLife < 75) {
var _local2;
_local2 = new WorldInstruction(50);
_local2.AddInstruction("Enemy_17", 2, 3);
_local2.AddInstruction("Enemy_1", 3, 4);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 3);
}
_local3.push(_local2);
} else if ((maxLife >= 75) && (maxLife < 200)) {
var _local2 = new WorldInstruction(50);
_local2.AddInstruction("Enemy_17", 2, 3);
_local2.AddInstruction("Enemy_1", 5, 6);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 3);
}
_local3.push(_local2);
} else if ((maxLife >= 200) && (maxLife < 400)) {
var _local2 = new WorldInstruction(50);
_local2.AddInstruction("Enemy_17", 2, 3);
_local2.AddInstruction("Enemy_92", 2, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 3);
}
_local3.push(_local2);
} else if ((maxLife >= 400) && (maxLife < 800)) {
var _local2 = new WorldInstruction(50);
_local2.AddInstruction("Enemy_17", 2, 3);
_local2.AddInstruction("Enemy_92", 4, 5);
_local2.AddInstruction("Enemy_1", 2, 3);
_local3.push(_local2);
} else {
var _local2 = new WorldInstruction(50);
_local2.AddInstruction("Enemy_17", 2, 3);
_local2.AddInstruction("Enemy_92", 6, 8);
_local2.AddInstruction("Enemy_1", 2, 3);
_local3.push(_local2);
_local2 = new WorldInstruction(50);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 3);
}
_local2.AddInstruction("Enemy_92", 5, 7);
_local2.AddInstruction("Enemy_10", 1, 1);
_local3.push(_local2);
}
return(_local3);
}
function GetEnemyOptionsClose(worldDistance) {
var _local3 = new Array();
if (worldDistance < 2) {
var _local2;
_local2 = new WorldInstruction(100);
_local2.AddInstruction("Enemy_17", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
} else if ((worldDistance >= 2) && (worldDistance < 4)) {
var _local2 = new WorldInstruction(30);
_local2.AddInstruction("Enemy_17", 1, 2);
_local2.AddInstruction("Enemy_1", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(60);
_local2.AddInstruction("Enemy_1", 1, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(30);
_local2.AddInstruction("Enemy_1", 0, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local2.AddInstruction("Enemy_76", 1, 3);
_local3.push(_local2);
} else if ((worldDistance >= 4) && (worldDistance < 6)) {
var _local2 = new WorldInstruction(30);
_local2.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 1, 4);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 1, 4);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 1, 4);
}
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(30);
_local2.AddInstruction("Enemy_3", 1, 2);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 1, 2);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 1, 2);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 2, 3);
}
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(30);
_local2.AddInstruction("Enemy_3", 1, 2);
_local2.AddInstruction("Enemy_41", 1, 1);
_local2.AddInstruction("Enemy_1", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_1", 0, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local2.AddInstruction("Enemy_76", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(5);
_local2.AddInstruction("Enemy_86", 1, 1);
_local2.AddInstruction("Enemy_1", 0, 3);
_local3.push(_local2);
} else if ((worldDistance >= 6) && (worldDistance < 8)) {
var _local2 = new WorldInstruction(30);
_local2.AddInstruction("Enemy_1", 1, 2);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 2, 3);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 2, 3);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 3, 4);
}
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(30);
_local2.AddInstruction("Enemy_3", 1, 1);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 2, 3);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 2, 3);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 2, 3);
}
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_3", 2, 2);
_local2.AddInstruction("Enemy_9", 1, 1);
_local2.AddInstruction("Enemy_1", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_1", 0, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local2.AddInstruction("Enemy_76", 1, 3);
_local3.push(_local2);
_local2 = new WorldInstruction(5);
_local2.AddInstruction("Enemy_R1", 1, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 3);
}
_local3.push(_local2);
_local2 = new WorldInstruction(5);
_local2.AddInstruction("Enemy_86", 1, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 3);
}
_local3.push(_local2);
} else if (worldDistance >= 8) {
var _local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_17", 1, 2);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 3, 4);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 3, 4);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 3, 4);
}
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(40);
_local2.AddInstruction("Enemy_76", 0, 2);
_local2.AddInstruction("Enemy_3", 0, 2);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 2, 3);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 2, 3);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 2, 3);
}
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_95", 12, 16);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_80", 1, 3);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 1, 2);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 1, 2);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 1, 2);
}
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(5);
_local2.AddInstruction("Enemy_1", 0, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local2.AddInstruction("Enemy_76", 1, 3);
_local3.push(_local2);
}
return(_local3);
}
function GetEnemyOptionsMiddle(worldDistance) {
var _local3 = new Array();
if (worldDistance < 12) {
var _local2;
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_5", 2, 3);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 1, 2);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 1, 2);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 1, 2);
}
_local2.AddInstruction("Enemy_1", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(25);
_local2.AddInstruction("Enemy_5", 2, 3);
_local2.AddInstruction("Enemy_3", 1, 1);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 0, 1);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 0, 1);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 0, 1);
}
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_95", 9, 12);
_local2.AddInstruction("Enemy_76", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_76", 2, 2);
_local2.AddInstruction("Enemy_80", 3, 4);
_local2.AddInstruction("Enemy_1", 1, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_12", 1, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 3);
}
_local3.push(_local2);
_local2 = new WorldInstruction(15);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_42", 1, 1);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_43", 1, 1);
}
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 2, 4);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 2, 4);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 3, 4);
}
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 2);
}
_local2.AddInstruction("Enemy_1", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(5);
_local2.AddInstruction("Enemy_90", 1, 1);
_local2.AddInstruction("Enemy_76", 0, 2);
_local2.AddInstruction("Enemy_1", 1, 5);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(3);
_local2.AddInstruction("Enemy_97", 1, 1);
_local2.AddInstruction("Enemy_1", 1, 5);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
} else if ((worldDistance >= 12) && (worldDistance < 14)) {
var _local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_5", 3, 4);
_local2.AddInstruction("Enemy_76", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_5", 2, 3);
_local2.AddInstruction("Enemy_6", 2, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_5", 1, 3);
_local2.AddInstruction("Enemy_6", 1, 2);
_local2.AddInstruction("Enemy_76", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_5", 2, 3);
_local2.AddInstruction("Enemy_6", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_5", 2, 3);
_local2.AddInstruction("Enemy_48", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_12", 1, 1);
_local2.AddInstruction("Enemy_6", 0, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(15);
_local2.AddInstruction("Enemy_13", 2, 4);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_42", 0, 1);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_43", 0, 1);
}
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(5);
_local2.AddInstruction("Enemy_90", 1, 1);
_local2.AddInstruction("Enemy_76", 0, 1);
_local2.AddInstruction("Enemy_1", 1, 5);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(5);
_local2.AddInstruction("Enemy_97", 1, 1);
_local2.AddInstruction("Enemy_1", 1, 5);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
} else if ((worldDistance >= 14) && (worldDistance < 16)) {
var _local2 = new WorldInstruction(30);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 2, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 2, 2);
}
_local2.AddInstruction("Enemy_6", 1, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(20);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 1, 2);
}
_local2.AddInstruction("Enemy_6", 1, 2);
_local2.AddInstruction("Enemy_76", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_11", 1, 2);
_local2.AddInstruction("Enemy_48", 1, 1);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 1, 1);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 1, 1);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 1, 1);
}
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_5", 3, 4);
_local2.AddInstruction("Enemy_48", 2, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_5", 2, 4);
_local2.AddInstruction("Enemy_9", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 1, 2);
}
_local2.AddInstruction("Enemy_9", 2, 3);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_12", 1, 1);
_local2.AddInstruction("Enemy_6", 1, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(5);
_local2.AddInstruction("Enemy_13", 3, 4);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_42", 0, 1);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_43", 0, 1);
}
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
} else if ((worldDistance >= 16) && (worldDistance < 18)) {
var _local2 = new WorldInstruction(20);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 2, 4);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 2, 4);
}
_local2.AddInstruction("Enemy_6", 1, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(30);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 1, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 1, 3);
}
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_88", 1, 2);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_89", 1, 2);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_65", 1, 2);
}
_local2.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_11", 2, 3);
_local2.AddInstruction("Enemy_48", 1, 1);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 1, 1);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 1, 1);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 1, 1);
}
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_11", 1, 1);
_local2.AddInstruction("Enemy_48", 2, 3);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 1, 1);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 1, 1);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 1, 1);
}
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_5", 3, 4);
_local2.AddInstruction("Enemy_48", 2, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_6", 2, 3);
_local2.AddInstruction("Enemy_9", 1, 3);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 1, 2);
}
_local2.AddInstruction("Enemy_9", 2, 3);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_87", 12, 16);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_90", 1, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 1, 2);
}
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_86", 1, 1);
_local2.AddInstruction("Enemy_76", 1, 3);
_local2.AddInstruction("Enemy_1", 1, 2);
_local2.AddInstruction("Enemy_17", 0, 1);
_local3.push(_local2);
} else if (worldDistance >= 18) {
var _local2 = new WorldInstruction(30);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_63", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_83", 1, 2);
}
_local2.AddInstruction("Enemy_11", 1, 1);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
if (_root.game._enemySet2 == 2) {
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_82", 1, 2);
_local2.AddInstruction("Enemy_93", 3, 4);
_local2.AddInstruction("Enemy_1", 1, 2);
_local2.AddInstruction("Enemy_17", 0, 1);
_local3.push(_local2);
}
if (_root.game._enemySet3 == 3) {
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_85", 1, 2);
_local2.AddInstruction("Enemy_94", 3, 4);
_local2.AddInstruction("Enemy_1", 1, 2);
_local2.AddInstruction("Enemy_17", 0, 1);
_local3.push(_local2);
}
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_9", 0, 2);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_88", 2, 2);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_89", 2, 2);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_65", 2, 2);
}
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_12", 1, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 2, 3);
}
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_87", 12, 16);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_90", 1, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 1, 2);
}
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_86", 1, 1);
_local2.AddInstruction("Enemy_76", 1, 3);
_local2.AddInstruction("Enemy_1", 1, 2);
_local2.AddInstruction("Enemy_17", 0, 1);
_local3.push(_local2);
}
return(_local3);
}
function GetEnemyOptionsFar(worldDistance) {
var _local3 = new Array();
if (worldDistance < 25) {
var _local2;
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_96", 2, 4);
_local2.AddInstruction("Enemy_76", 1, 2);
_local2.AddInstruction("Enemy_1", 1, 2);
_local2.AddInstruction("Enemy_17", 0, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_96", 1, 3);
_local2.AddInstruction("Enemy_44", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_79", 1, 2);
_local2.AddInstruction("Enemy_96", 2, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 3);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 2, 3);
}
_local2.AddInstruction("Enemy_74", 1, 1);
_local2.AddInstruction("Enemy_11", 0, 1);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_7", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_91", 1, 2);
}
_local2.AddInstruction("Enemy_74", 1, 1);
_local2.AddInstruction("Enemy_11", 1, 1);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_46", 2, 2);
_local2.AddInstruction("Enemy_79", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
if (_root.game._enemySet2 == 3) {
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_85", 2, 3);
_local2.AddInstruction("Enemy_80", 1, 2);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
}
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_10", 1, 1);
_local2.AddInstruction("Enemy_1", 1, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 3);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_90", 1, 1);
_local2.AddInstruction("Enemy_96", 2, 3);
_local2.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 3);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_14", 1, 1);
_local2.AddInstruction("Enemy_96", 0, 1);
_local2.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 3);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 5, 6);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 5, 6);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 5, 6);
}
_local2.AddInstruction("Enemy_12", 1, 1);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_88", 2, 3);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_89", 2, 3);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_65", 2, 3);
}
_local2.AddInstruction("Enemy_9", 0, 1);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
} else if (worldDistance >= 25) {
var _local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_96", 2, 3);
_local2.AddInstruction("Enemy_11", 2, 2);
_local2.AddInstruction("Enemy_9", 0, 2);
_local2.AddInstruction("Enemy_1", 1, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 0, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_96", 2, 3);
_local2.AddInstruction("Enemy_45", 1, 1);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_79", 2, 3);
_local2.AddInstruction("Enemy_6", 1, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_47", 1, 1);
if (_root.game._enemySet == 1) {
_local2.AddInstruction("Enemy_2", 2, 4);
} else if (_root.game._enemySet == 2) {
_local2.AddInstruction("Enemy_93", 2, 4);
} else if (_root.game._enemySet == 3) {
_local2.AddInstruction("Enemy_94", 2, 4);
}
_local2.AddInstruction("Enemy_11", 0, 1);
_local2.AddInstruction("Enemy_17", 0, 2);
_local3.push(_local2);
_local2 = new WorldInstruction(20);
_local2.AddInstruction("Enemy_47", 1, 1);
_local2.AddInstruction("Enemy_79", 2, 2);
_local2.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_10", 1, 1);
_local2.AddInstruction("Enemy_1", 1, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_90", 1, 1);
_local2.AddInstruction("Enemy_96", 3, 4);
_local2.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 1, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_14", 1, 1);
_local2.AddInstruction("Enemy_96", 2, 3);
_local2.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local2.AddInstruction("Enemy_4", 2, 2);
} else if (_root.game._enemySet2 == 2) {
_local2.AddInstruction("Enemy_18", 2, 2);
}
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_86", 1, 1);
_local2.AddInstruction("Enemy_76", 2, 3);
_local2.AddInstruction("Enemy_1", 0, 2);
_local3.push(_local2);
}
return(_local3);
}
function GetEnemyOptionsVeryFar(worldDistance) {
var _local5 = new Array();
if (worldDistance < 35) {
var _local3;
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_75", 1, 2);
_local3.AddInstruction("Enemy_95", 2, 3);
_local3.AddInstruction("Enemy_9", 0, 1);
_local5.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_75", 1, 2);
_local3.AddInstruction("Enemy_45", 1, 1);
_local3.AddInstruction("Enemy_1", 0, 2);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_98", 2, 3);
_local3.AddInstruction("Enemy_96", 1, 2);
_local3.AddInstruction("Enemy_1", 0, 2);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_98", 1, 3);
if (_root.game._enemySet == 1) {
_local3.AddInstruction("Enemy_2", 3, 5);
} else if (_root.game._enemySet == 2) {
_local3.AddInstruction("Enemy_93", 3, 5);
} else if (_root.game._enemySet == 3) {
_local3.AddInstruction("Enemy_94", 3, 5);
}
_local3.AddInstruction("Enemy_11", 0, 1);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_47", 0, 1);
_local3.AddInstruction("Enemy_99", 1, 1);
_local3.AddInstruction("Enemy_96", 1, 3);
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 0, 2);
}
_local5.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_92", 1, 1);
_local3.AddInstruction("Enemy_1", 1, 2);
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 2, 3);
}
_local5.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_97", 1, 1);
_local3.AddInstruction("Enemy_96", 1, 2);
_local3.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 2, 3);
}
_local5.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_90", 1, 1);
_local3.AddInstruction("Enemy_75", 2, 2);
_local3.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 0, 3);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 0, 3);
}
_local5.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_86", 1, 1);
_local3.AddInstruction("Enemy_99", 1, 1);
_local3.AddInstruction("Enemy_1", 0, 2);
_local5.push(_local3);
} else if (worldDistance >= 35) {
var _local3 = new WorldInstruction(15);
var _local4 = 0;
while (_local4 < 3) {
var _local6 = RandNum(1, 15);
switch (_local6) {
case 1 :
_local3.AddInstruction("Enemy_99", 1, 1);
break;
case 2 :
_local3.AddInstruction("Enemy_75", 1, 2);
break;
case 3 :
_local3.AddInstruction("Enemy_98", 1, 2);
break;
case 4 :
_local3.AddInstruction("Enemy_97", 1, 1);
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 1, 4);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 1, 4);
}
_local4++;
break;
case 5 :
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 1, 4);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 1, 4);
}
break;
case 6 :
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_7", 1, 2);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_91", 1, 2);
}
break;
case 7 :
_local3.AddInstruction("Enemy_9", 1, 2);
break;
case 8 :
_local3.AddInstruction("Enemy_1", 1, 2);
break;
case 9 :
_local3.AddInstruction("Enemy_99", 1, 1);
break;
case 10 :
_local3.AddInstruction("Enemy_96", 1, 2);
break;
case 11 :
_local3.AddInstruction("Enemy_76", 1, 2);
break;
case 12 :
if (_root.game._enemySet == 1) {
_local3.AddInstruction("Enemy_88", 1, 2);
} else if (_root.game._enemySet == 2) {
_local3.AddInstruction("Enemy_89", 1, 2);
} else if (_root.game._enemySet == 3) {
_local3.AddInstruction("Enemy_65", 1, 2);
}
break;
case 13 :
_local3.AddInstruction("Enemy_80", 1, 2);
break;
case 14 :
_local3.AddInstruction("Enemy_95", 2, 4);
break;
case 15 :
_local4++;
}
_local4++;
}
_local3.AddInstruction("Enemy_1", 0, 3);
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_75", 2, 2);
_local3.AddInstruction("Enemy_95", 3, 6);
_local3.AddInstruction("Enemy_1", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_75", 1, 2);
_local3.AddInstruction("Enemy_98", 2, 2);
_local3.AddInstruction("Enemy_1", 0, 2);
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 0, 2);
}
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_98", 1, 3);
_local3.AddInstruction("Enemy_76", 1, 3);
_local3.AddInstruction("Enemy_1", 0, 2);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_99", 1, 2);
_local3.AddInstruction("Enemy_96", 2, 3);
_local3.AddInstruction("Enemy_1", 1, 3);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_99", 2, 2);
_local3.AddInstruction("Enemy_5", 1, 2);
_local3.AddInstruction("Enemy_76", 0, 1);
_local3.AddInstruction("Enemy_1", 1, 2);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_79", 0, 2);
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_7", 2, 3);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_91", 2, 3);
}
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 0, 2);
}
_local3.AddInstruction("Enemy_1", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_12", 1, 2);
_local3.AddInstruction("Enemy_96", 2, 4);
_local3.AddInstruction("Enemy_1", 1, 2);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(3);
_local3.AddInstruction("Enemy_45", 1, 2);
_local3.AddInstruction("Enemy_96", 1, 3);
_local3.AddInstruction("Enemy_17", 1, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(3);
_local3.AddInstruction("Enemy_45", 1, 2);
_local3.AddInstruction("Enemy_75", 1, 1);
_local3.AddInstruction("Enemy_17", 1, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_44", 1, 2);
_local3.AddInstruction("Enemy_98", 1, 2);
_local3.AddInstruction("Enemy_96", 0, 2);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(5);
_local3.AddInstruction("Enemy_92", 1, 2);
_local3.AddInstruction("Enemy_3", 1, 2);
_local3.AddInstruction("Enemy_96", 0, 2);
_local3.AddInstruction("Enemy_17", 0, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(3);
_local3.AddInstruction("Enemy_97", 1, 1);
_local3.AddInstruction("Enemy_3", 0, 2);
_local3.AddInstruction("Enemy_1", 1, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(3);
_local3.AddInstruction("Enemy_97", 1, 1);
_local3.AddInstruction("Enemy_76", 0, 2);
_local3.AddInstruction("Enemy_1", 1, 2);
_local5.push(_local3);
if (_root.game._enemySet2 == 2) {
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_82", 1, 2);
_local3.AddInstruction("Enemy_93", 3, 4);
_local3.AddInstruction("Enemy_1", 1, 2);
_local3.AddInstruction("Enemy_17", 0, 1);
_local5.push(_local3);
}
if (_root.game._enemySet3 == 3) {
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_85", 1, 2);
_local3.AddInstruction("Enemy_94", 3, 4);
_local3.AddInstruction("Enemy_1", 1, 2);
_local3.AddInstruction("Enemy_17", 0, 1);
_local5.push(_local3);
}
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_9", 0, 2);
if (_root.game._enemySet == 1) {
_local3.AddInstruction("Enemy_88", 2, 2);
} else if (_root.game._enemySet == 2) {
_local3.AddInstruction("Enemy_89", 2, 2);
} else if (_root.game._enemySet == 3) {
_local3.AddInstruction("Enemy_65", 2, 2);
}
_local3.AddInstruction("Enemy_1", 0, 2);
_local3.AddInstruction("Enemy_17", 1, 2);
_local5.push(_local3);
_local3 = new WorldInstruction(2);
_local3.AddInstruction("Enemy_R1", 1, 1);
_local3.AddInstruction("Enemy_1", 1, 2);
if (_root.game._enemySet2 == 1) {
_local3.AddInstruction("Enemy_4", 0, 2);
} else if (_root.game._enemySet2 == 2) {
_local3.AddInstruction("Enemy_18", 0, 2);
}
_local5.push(_local3);
}
return(_local5);
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
}
Symbol 882 MovieClip [__Packages.WorldInstruction] Frame 0
class WorldInstruction
{
var minChance, maxChance, chance, iterator, subInstructions, enemyType, enemyNum, eof;
function WorldInstruction (myChance) {
minChance = 0;
maxChance = 0;
chance = myChance;
iterator = -1;
subInstructions = new Array();
enemyType = "";
enemyNum = 0;
eof = true;
}
function SetRange(loChance, hiChance) {
minChance = loChance;
maxChance = hiChance;
}
function GetNumInstructions() {
return(subInstructions.length);
}
function AddInstruction(enemyType, minNum, maxNum) {
var _local2 = Math.round(Math.random() * (maxNum - minNum)) + minNum;
subInstructions.push({linkage:enemyType, numAmount:_local2});
if (iterator == subInstructions.length) {
eof = true;
} else {
eof = false;
}
}
function Begin() {
iterator = 0;
if (iterator == subInstructions.length) {
eof = true;
}
enemyType = subInstructions[iterator].linkage;
enemyNum = subInstructions[iterator].numAmount;
}
function Next() {
iterator++;
if (iterator == subInstructions.length) {
iterator--;
eof = true;
}
enemyType = subInstructions[iterator].linkage;
enemyNum = subInstructions[iterator].numAmount;
}
}
Symbol 883 MovieClip [__Packages.Timer] Frame 0
class Timer
{
var intTimer, blnCountUp, intStartTime, intEndTime, blnPaused, intPauseStart, intPauseTime;
function Timer () {
intTimer = 0;
blnCountUp = true;
intStartTime = 0;
intEndTime = 0;
blnPaused = false;
intPauseStart = 0;
intPauseTime = 0;
}
function Run() {
if (blnPaused == false) {
if (blnCountUp == true) {
intTimer = (getTimer() - intStartTime) - intPauseTime;
} else {
intTimer = (intEndTime - intStartTime) - ((getTimer() - intStartTime) + intPauseTime);
}
} else {
intPauseTime = intPauseTime + (getTimer() - intPauseStart);
intPauseStart = getTimer();
}
}
function Pause() {
if (blnPaused == false) {
blnPaused = true;
intPauseStart = getTimer();
}
}
function UnPause() {
if (blnPaused == true) {
intPauseTime = intPauseTime + (getTimer() - intPauseStart);
blnPaused = false;
}
}
function GetTime() {
return(intTimer);
}
function GetTimeString() {
return(MillisecondsToTimeString(intTimer));
}
function Start() {
SetCountUp();
}
function SetCountUp() {
blnCountUp = true;
Reset();
}
function SetCountDown(durationInMilliseconds) {
blnCountUp = false;
intEndTime = getTimer() + durationInMilliseconds;
Reset();
}
function Reset() {
intStartTime = getTimer();
blnPaused = false;
intPauseStart = 0;
intPauseTime = 0;
if (blnCountUp == true) {
intTimer = 0;
} else {
intTimer = intEndTime - intStartTime;
}
}
function MillisecondsToTimeString(intMilliSecs) {
var _local5 = intMilliSecs;
var _local4 = Math.floor(_local5 / 1000);
if (_local4 >= 60) {
var _local1 = _local5 / 1000;
var _local3 = _local1 / 60;
if (_local1 > 59) {
_local1 = _local1 - (Math.floor(_local3) * 60);
}
var _local6;
var _local2;
if (_local3 < 10) {
_local2 = "0" + Math.floor(_local3);
} else {
_local2 = "" + Math.floor(_local3);
}
if (_local1 < 10) {
_local6 = (_local2 + ":0") + Math.floor(_local1);
} else if (_local1 == 0) {
_local6 = _local2 + ":00";
} else {
_local6 = (_local2 + ":") + Math.floor(_local1);
}
return(_local6);
}
if (_local4 < 10) {
var _local6 = "00:0" + Math.floor(_local4);
} else {
var _local6 = "00:" + Math.floor(_local4);
}
return(_local6);
}
}
Symbol 884 MovieClip [__Packages.Point] Frame 0
class Point
{
var _x, _y;
function Point (xPos, yPos) {
_x = xPos;
_y = yPos;
}
}
Symbol 323 MovieClip Frame 1
function GenerateBubbles() {
if (counter == 0) {
var _local3 = Math.random() * 500;
var _local2 = "risingBubble_" + bubbleDepth;
_root.risingbubbles_mc.attachMovie("menuBubbles", _local2, bubbleDepth);
counter = Math.round(Math.random() * (maxCounter - minCounter)) + minCounter;
bubbleDepth++;
} else {
counter--;
}
}
var minCounter = 5;
var maxCounter = 20;
var counter = 0;
var bubbleDepth = 1000;
stop();
Symbol 331 MovieClip Frame 220
stop();
Symbol 338 MovieClip Frame 2
this.fade_mc.gotoAndPlay(31);
Instance of Symbol 331 MovieClip in Symbol 338 MovieClip Frame 41
onClipEvent (enterFrame) {
this.onPress = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Symbol 338 MovieClip Frame 190
_root.StartMusic();
Instance of Symbol 334 MovieClip in Symbol 338 MovieClip Frame 190
on (release) {
getURL ("http://www.herointeractive.com", "_blank");
}
Symbol 338 MovieClip Frame 369
if (_global.doUnlockEC.Get() != -1) {
_root.gotoAndPlay("main");
}
Instance of Symbol 337 MovieClip in Symbol 338 MovieClip Frame 370
on (release) {
getURL ("http://www.herointeractive.com/BT2_Transfer.php?intID=1", "_self");
}
Symbol 338 MovieClip Frame 575
_root.gotoAndPlay("main");
Symbol 350 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 30
stop();
Symbol 350 MovieClip Frame 45
stop();
Symbol 350 MovieClip Frame 60
stop();
Symbol 350 MovieClip Frame 75
stop();
Symbol 350 MovieClip Frame 90
stop();
Symbol 350 MovieClip Frame 106
stop();
Symbol 350 MovieClip Frame 121
stop();
Symbol 350 MovieClip Frame 136
stop();
Symbol 350 MovieClip Frame 151
stop();
Symbol 350 MovieClip Frame 166
stop();
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 14
stop();
Symbol 355 MovieClip Frame 30
stop();
Symbol 355 MovieClip Frame 45
stop();
Symbol 355 MovieClip Frame 60
stop();
Symbol 355 MovieClip Frame 75
stop();
Symbol 355 MovieClip Frame 90
stop();
Symbol 355 MovieClip Frame 105
stop();
Symbol 355 MovieClip Frame 120
stop();
Symbol 355 MovieClip Frame 135
stop();
Symbol 355 MovieClip Frame 150
stop();
Symbol 355 MovieClip Frame 165
stop();
Symbol 358 Button
on (rollOver) {
if (!_global.menuFlag) {
if (over6) {
} else {
gotoAndPlay (2);
_parent.bottomTexty.gotoAndPlay(15);
over6 = true;
}
}
}
on (rollOut) {
if (!_global.menuFlag) {
gotoAndPlay (15);
_parent.bottomTexty.gotoAndStop(1);
over6 = false;
}
}
on (press) {
_parent.bottomTexty.gotoAndPlay(76);
gotoAndPlay (28);
_global.menuFlag = true;
_global.gameMode = 1;
_global.invincible = false;
_global.page = "normal mode";
_parent.gotoAndPlay("navi out");
}
Symbol 361 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 14
stop();
Symbol 361 MovieClip Frame 27
gotoAndStop (1);
Symbol 361 MovieClip Frame 48
stop();
Symbol 366 Button
on (rollOver) {
if (!_global.menuFlag) {
if (over8) {
} else {
gotoAndPlay (2);
if (_global.doUnlockEC.Get() != -1) {
_parent.bottomTexty.gotoAndPlay(46);
} else {
_parent.bottomTexty.gotoAndPlay(61);
}
over8 = true;
}
}
}
on (rollOut) {
if (!_global.menuFlag) {
gotoAndPlay (15);
_parent.bottomTexty.gotoAndStop(1);
over8 = false;
}
}
on (press) {
if (_global.doUnlockEC.Get() != -1) {
_global.instShown = false;
_parent.bottomTexty.gotoAndPlay(106);
_global.menuFlag = true;
gotoAndPlay (28);
_global.page = "arena mode";
_parent.gotoAndPlay("navi out");
_global.prevMenu = false;
} else {
_parent.bottomTexty.gotoAndPlay(121);
_global.menuFlag = true;
gotoAndPlay (28);
_global.page = "arenaLocked";
_parent.gotoAndPlay("navi out");
_global.prevMenu = false;
}
}
Symbol 367 MovieClip Frame 1
stop();
Symbol 367 MovieClip Frame 14
stop();
Symbol 367 MovieClip Frame 27
gotoAndStop (1);
Symbol 367 MovieClip Frame 48
stop();
Symbol 369 Button
on (rollOver) {
if (!_global.menuFlag) {
if (over4) {
} else {
gotoAndPlay (2);
_root.navi.bottomTexty.gotoAndPlay(136);
over4 = true;
}
}
}
on (rollOut) {
if (!_global.menuFlag) {
gotoAndPlay (15);
_root.navi.bottomTexty.gotoAndStop(1);
over4 = false;
}
}
on (press) {
_root.navi.bottomTexty.gotoAndPlay(151);
gotoAndPlay (28);
_global.page = "bubbleopedia";
_parent.gotoAndPlay("navi out");
}
Symbol 371 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 14
stop();
Symbol 371 MovieClip Frame 27
gotoAndStop (1);
Symbol 371 MovieClip Frame 48
stop();
Symbol 373 Button
on (rollOver) {
if (!_global.menuFlag) {
if (over) {
} else {
_root.navi.settings.butt_1.gotoAndPlay(2);
_root.navi.topTexty.gotoAndPlay(15);
over = true;
}
}
}
on (rollOut) {
if (!_global.menuFlag) {
_root.navi.settings.butt_1.gotoAndPlay(15);
_root.navi.topTexty.gotoAndStop(1);
over = false;
}
}
on (press) {
_root.navi.topTexty.gotoAndPlay(91);
_global.menuFlag = true;
gotoAndPlay (28);
_global.page = "settings";
_parent._parent.gotoAndPlay("navi out");
_global.prevMenu = false;
}
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 14
stop();
Symbol 375 MovieClip Frame 27
gotoAndStop (1);
Symbol 375 MovieClip Frame 48
stop();
Symbol 378 Button
on (rollOver) {
if (!_global.menuFlag) {
if (over2) {
} else {
gotoAndPlay (2);
_root.navi.topTexty.gotoAndPlay(31);
over2 = true;
}
}
}
on (rollOut) {
if (!_global.menuFlag) {
gotoAndPlay (15);
_root.navi.topTexty.gotoAndStop(1);
over2 = false;
}
}
on (press) {
_root.navi.topTexty.gotoAndPlay(107);
_global.menuFlag = true;
gotoAndPlay (28);
_global.page = "credits";
_parent.gotoAndPlay("navi out");
_global.prevMenu = false;
}
Symbol 380 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 14
stop();
Symbol 380 MovieClip Frame 27
gotoAndStop (1);
Symbol 380 MovieClip Frame 48
stop();
Symbol 382 Button
on (rollOver) {
if (!_global.menuFlag) {
if (over5) {
} else {
gotoAndPlay (2);
_root.navi.topTexty.gotoAndPlay(76);
over5 = true;
}
}
}
on (rollOut) {
if (!_global.menuFlag) {
gotoAndPlay (15);
_root.navi.topTexty.gotoAndStop(1);
over5 = false;
}
}
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 14
stop();
Symbol 384 MovieClip Frame 27
gotoAndStop (1);
Symbol 384 MovieClip Frame 48
stop();
Symbol 387 MovieClip Frame 1
_global.page = "";
Symbol 387 MovieClip Frame 75
stop();
Symbol 387 MovieClip Frame 76
_root.StartBlur();
Symbol 387 MovieClip Frame 154
var thePage = _global.page;
_global.menuFlag = false;
if (thePage == "normal mode") {
_root.gotoAndPlay("game");
} else if (thePage == "arena mode") {
_root.gotoAndPlay("arena");
} else if (thePage == "settings") {
_root.gotoAndPlay("settings");
} else if (thePage == "credits") {
_root.gotoAndPlay("credits");
} else if (thePage == "high scores") {
_root.gotoAndPlay("high scores");
} else if (thePage == "bubbleopedia") {
_root.gotoAndPlay("bubbleopedia");
} else if (thePage == "arenaLocked") {
_root.gotoAndPlay("arenaLocked");
}
stop();
Symbol 390 MovieClip Frame 15
stop();
Symbol 390 MovieClip Frame 30
stop();
Symbol 399 Button
on (release) {
if (_global.pageTest == "arena") {
_root.blueish.gotoAndPlay(61);
_root.leftA.gotoAndPlay(16);
_root.rightA.gotoAndPlay(16);
_root.ico.gotoAndPlay(21);
_root.nexter.gotoAndPlay(16);
_root.titleA.gotoAndPlay(16);
_global.pagePath = "main";
_global.prevMenu = true;
gotoAndPlay (16);
} else if (_global.pageTest == "settings") {
_root.Stitle.gotoAndPlay(16);
_root.settingsMenu.gotoAndPlay(16);
_root.hotkeysButton_mc.gotoAndPlay(16);
gotoAndPlay (16);
_root.SaveSettings();
_global.pagePath = "main";
} else if (_global.pageTest == "credits") {
_root.Ctitle.gotoAndPlay(16);
gotoAndPlay (16);
_global.pagePath = "main";
_root.cnames.gotoAndPlay(46);
_root.music.gotoAndPlay(46);
} else if (_global.pageTest == "high scores") {
_root.Htitle.gotoAndPlay(16);
_root.hs_chart.gotoAndPlay(16);
gotoAndPlay (16);
_global.pagePath = "main";
} else if (_global.pageTest == "bubbleopedia") {
gotoAndPlay (16);
_global.pagePath = "main";
_root.ico.gotoAndPlay(21);
_root.leftA.gotoAndPlay(16);
_root.rightA.gotoAndPlay(16);
} else if (_global.pageTest == "hotkeys") {
_global.pageTest = "settings";
_root.hotkeysButton_mc.gotoAndPlay(1);
_root.settingsMenu.play();
} else if (_global.pageTest == "arenaLocked") {
_root.Ctitle.gotoAndPlay(16);
gotoAndPlay (16);
_global.pagePath = "main";
_root.cnames.gotoAndPlay(46);
_root.music.gotoAndPlay(46);
}
}
Symbol 400 Button
on (release) {
_root.blueish.gotoAndPlay(61);
_root.leftA2.gotoAndPlay(16);
_root.rightA2.gotoAndPlay(16);
_root.ico2.gotoAndPlay(21);
_root.n2.gotoAndPlay(16);
_root.titleB.gotoAndPlay(16);
gotoAndPlay (16);
}
Symbol 402 MovieClip Frame 15
stop();
Symbol 402 MovieClip Frame 31
_root.gotoAndPlay(_global.pagePath);
_global.prevMenu = false;
stop();
Symbol 405 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 2
stop();
Instance of Symbol 405 MovieClip "low" in Symbol 406 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "LOW") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "LOW") {
this.gotoAndStop("off");
}
}
on (release) {
_quality = "LOW";
this._parent.high.gotoAndStop("off");
this._parent.med.gotoAndStop("off");
}
Instance of Symbol 405 MovieClip "med" in Symbol 406 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "MEDIUM") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "MEDIUM") {
this.gotoAndStop("off");
}
}
on (release) {
_quality = "MEDIUM";
this._parent.high.gotoAndStop("off");
this._parent.low.gotoAndStop("off");
}
Instance of Symbol 405 MovieClip "high" in Symbol 406 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "HIGH") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "HIGH") {
this.gotoAndStop("off");
}
}
on (release) {
_quality = "HIGH";
this._parent.low.gotoAndStop("off");
this._parent.med.gotoAndStop("off");
}
Instance of Symbol 405 MovieClip "musicOn" in Symbol 406 MovieClip Frame 1
onClipEvent (load) {
if (_global.musicOn == true) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.musicOn != true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.musicOn = true;
this._parent.musicOff.gotoAndStop("off");
_global.myMusicPlayer.SetTrack("titleMusic");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.Play();
}
Instance of Symbol 405 MovieClip "musicOff" in Symbol 406 MovieClip Frame 1
onClipEvent (load) {
if (_global.musicOn == false) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.musicOn == true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.musicOn = false;
this._parent.musicOn.gotoAndStop("off");
_global.myMusicPlayer.Stop();
}
Instance of Symbol 405 MovieClip "soundsOn" in Symbol 406 MovieClip Frame 1
onClipEvent (load) {
if (_global.soundOn == true) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.soundOn != true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.soundOn = true;
this._parent.soundsOff.gotoAndStop("off");
}
Instance of Symbol 405 MovieClip "soundsOff" in Symbol 406 MovieClip Frame 1
onClipEvent (load) {
if (_global.soundOn == false) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.soundOn == true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.soundOn = false;
this._parent.soundsOn.gotoAndStop("off");
}
Symbol 419 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 2
stop();
Symbol 424 MovieClip Frame 1
function OutputValue(fieldName, keyCode) {
var textRef = eval ("this." + fieldName);
var returnValue = "";
switch (keyCode) {
case 8 :
returnValue = "BACKSPACE";
break;
case 20 :
returnValue = "CAPSLOCK";
break;
case 17 :
returnValue = "CONTROL";
break;
case 46 :
returnValue = "DELETE";
break;
case 40 :
returnValue = "DOWN";
break;
case 35 :
returnValue = "END";
break;
case 13 :
returnValue = "ENTER";
break;
case 27 :
returnValue = "ESCAPE";
break;
case 36 :
returnValue = "HOME";
break;
case 45 :
returnValue = "INSERT";
break;
case 37 :
returnValue = "LEFT";
break;
case 34 :
returnValue = "PGDN";
break;
case 33 :
returnValue = "PGUP";
break;
case 39 :
returnValue = "RIGHT";
break;
case 16 :
returnValue = "SHIFT";
break;
case 32 :
returnValue = "SPACE";
break;
case 9 :
returnValue = "TAB";
break;
case 38 :
returnValue = "UP";
break;
case 186 :
returnValue = ";";
break;
case 187 :
returnValue = "=";
break;
case 189 :
returnValue = "-";
break;
case 191 :
returnValue = "/";
break;
case 192 :
returnValue = "`";
break;
case 219 :
returnValue = "[";
break;
case 220 :
returnValue = "\\";
break;
case 221 :
returnValue = "]";
break;
case 222 :
returnValue = "'";
break;
case 188 :
returnValue = ",";
break;
case 190 :
returnValue = ".";
break;
case 96 :
returnValue = "NUMPAD 0";
break;
case 97 :
returnValue = "NUMPAD 1";
break;
case 98 :
returnValue = "NUMPAD 2";
break;
case 99 :
returnValue = "NUMPAD 3";
break;
case 100 :
returnValue = "NUMPAD 4";
break;
case 101 :
returnValue = "NUMPAD 5";
break;
case 102 :
returnValue = "NUMPAD 6";
break;
case 103 :
returnValue = "NUMPAD 7";
break;
case 104 :
returnValue = "NUMPAD 8";
break;
case 105 :
returnValue = "NUMPAD 9";
break;
case 106 :
returnValue = "MULTIPLY";
break;
case 107 :
returnValue = "ADD";
break;
case 109 :
returnValue = "SUBTRACT";
break;
case 110 :
returnValue = "DECIMAL";
break;
case 111 :
returnValue = "DIVIDE";
break;
default :
returnValue = chr(keyCode);
returnValue.toUpperCase();
}
textRef.text = returnValue;
}
function UnselectOthers(myName) {
if (myName != "upClip") {
this.upClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "downClip") {
this.downClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "leftClip") {
this.leftClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "rightClip") {
this.rightClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "fireClip") {
this.fireClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "pauseClip") {
this.pauseClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
_global.controlsModified = true;
}
stop();
var hasFocus = "";
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (hasFocus == "upClip") {
_global.avatarUp = Key.getCode();
OutputValue("up_txt", _global.avatarUp);
}
if (hasFocus == "downClip") {
_global.avatarDown = Key.getCode();
OutputValue("down_txt", _global.avatarDown);
}
if (hasFocus == "leftClip") {
_global.avatarLeft = Key.getCode();
OutputValue("left_txt", _global.avatarLeft);
}
if (hasFocus == "rightClip") {
_global.avatarRight = Key.getCode();
OutputValue("right_txt", _global.avatarRight);
}
if (hasFocus == "fireClip") {
_global.fireHotkey = Key.getCode();
OutputValue("fire_txt", _global.fireHotkey);
}
if (hasFocus == "pauseClip") {
_global.pauseHotkey = Key.getCode();
OutputValue("pause_txt", _global.pauseHotkey);
}
};
Key.addListener(keyListener);
OutputValue("up_txt", _global.avatarUp);
OutputValue("down_txt", _global.avatarDown);
OutputValue("left_txt", _global.avatarLeft);
OutputValue("right_txt", _global.avatarRight);
OutputValue("fire_txt", _global.fireHotkey);
OutputValue("pause_txt", _global.pauseHotkey);
Instance of Symbol 419 MovieClip "upClip" in Symbol 424 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "downClip" in Symbol 424 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "leftClip" in Symbol 424 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "rightClip" in Symbol 424 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "fireClip" in Symbol 424 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "pauseClip" in Symbol 424 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 425 MovieClip Frame 15
stop();
Symbol 425 MovieClip Frame 30
stop();
Symbol 425 MovieClip Frame 45
Symbol 425 MovieClip Frame 60
stop();
Symbol 425 MovieClip Frame 75
gotoAndPlay (1);
Symbol 430 Button
on (release) {
_global.pageTest = "hotkeys";
_root.settingsMenu.gotoAndPlay("hotkeysStart");
this.gotoAndPlay(16);
}
Symbol 431 Button
on (release) {
_root.blueish.gotoAndPlay(61);
_root.leftA2.gotoAndPlay(16);
_root.rightA2.gotoAndPlay(16);
_root.ico2.gotoAndPlay(21);
_root.n2.gotoAndPlay(16);
_root.titleB.gotoAndPlay(16);
gotoAndPlay (16);
}
Symbol 433 MovieClip Frame 15
stop();
Symbol 433 MovieClip Frame 31
stop();
Symbol 435 MovieClip Frame 15
stop();
Symbol 435 MovieClip Frame 30
stop();
Symbol 442 MovieClip Frame 45
stop();
Symbol 442 MovieClip Frame 60
stop();
Symbol 446 MovieClip Frame 45
stop();
Symbol 446 MovieClip Frame 60
stop();
Symbol 449 MovieClip Frame 15
stop();
Symbol 449 MovieClip Frame 30
stop();
Symbol 452 MovieClip Frame 15
stop();
Symbol 452 MovieClip Frame 30
stop();
Symbol 457 Button
on (release) {
_root.switchBackward();
}
Symbol 458 MovieClip Frame 15
stop();
Symbol 458 MovieClip Frame 31
stop();
Symbol 459 Button
on (release) {
_root.switchForward();
}
Symbol 460 MovieClip Frame 15
stop();
Symbol 460 MovieClip Frame 31
_root.gotoAndPlay("stage");
stop();
Symbol 462 MovieClip Frame 1
stop();
Symbol 462 MovieClip Frame 2
stop();
Symbol 465 MovieClip Frame 1
stop();
_root.displayEnemyRecord(_root.selectedEnemyIndex, "current");
Symbol 465 MovieClip Frame 10
gotoAndStop (1);
Symbol 465 MovieClip Frame 11
Symbol 465 MovieClip Frame 21
gotoAndStop (1);
Symbol 466 MovieClip Frame 20
stop();
Symbol 466 MovieClip Frame 30
stop();
Symbol 468 MovieClip Frame 15
stop();
Symbol 468 MovieClip Frame 30
stop();
Symbol 473 MovieClip Frame 45
stop();
Symbol 473 MovieClip Frame 60
stop();
Symbol 482 Button
on (release) {
_root.EnemyRemove(this._name);
}
Symbol 487 Button
on (release) {
_root.EnemyMinus(this._name);
}
Symbol 492 Button
on (release) {
_root.EnemyPlus(this._name);
}
Symbol 498 MovieClip Frame 15
stop();
Symbol 498 MovieClip Frame 26
stop();
Symbol 504 Button
on (release) {
if (_root.EnemiesSelected() == true) {
_root.leftA.gotoAndPlay(16);
_root.rightA.gotoAndPlay(16);
_root.ico.gotoAndPlay(21);
_root.titleA.gotoAndPlay(16);
_root.blueish.gotoAndPlay(61);
} else {
_global.SoundManager.PlayBubbleSound("nocando");
_root.instruct1.gotoAndStop(4);
}
}
Symbol 505 Button
on (release) {
if (_root.EnemiesSelected() == true) {
_global.instShown = true;
_root.leftA.gotoAndPlay(16);
_root.rightA.gotoAndPlay(16);
_root.ico.gotoAndPlay(21);
_root.titleA.gotoAndPlay(16);
this.gotoAndPlay(16);
_parent.fid.gotoAndPlay(2);
_parent.blueish.gotoAndPlay(61);
_root.p1.gotoAndPlay(16);
_global.prevMenu = false;
} else {
_global.SoundManager.PlayBubbleSound("nocando");
_root.instruct1.gotoAndStop(4);
}
}
Symbol 506 Button
on (release) {
_root.leftA.gotoAndPlay(16);
_root.rightA.gotoAndPlay(16);
_root.ico.gotoAndPlay(21);
_root.titleA.gotoAndPlay(16);
}
Symbol 507 MovieClip Frame 15
stop();
Symbol 507 MovieClip Frame 29
stop();
if (!_global.prevMenu) {
gotoAndPlay (30);
}
Symbol 507 MovieClip Frame 30
_global.prevMenu = false;
_root.gotoAndPlay("stage");
stop();
Symbol 509 MovieClip Frame 60
stop();
Symbol 509 MovieClip Frame 74
stop();
Symbol 512 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 2
stop();
Instance of Symbol 512 MovieClip "enemyImage" in Symbol 514 MovieClip Frame 1
on (release) {
if (_global.gameScreen == "arena") {
_root.instruct1.gotoAndStop(3);
_root.EnemySelected();
} else if (_global.gameScreen == "stage") {
_root.StageSelected();
}
}
Symbol 515 MovieClip Frame 1
stop();
_root.displayEnemyOnScreen(_root.selectedEnemyIndex, "current");
Symbol 515 MovieClip Frame 2
Symbol 515 MovieClip Frame 10
gotoAndStop (1);
Symbol 515 MovieClip Frame 11
Symbol 515 MovieClip Frame 21
gotoAndStop (1);
Symbol 516 MovieClip Frame 20
stop();
Symbol 516 MovieClip Frame 30
stop();
Symbol 523 MovieClip Frame 1
stop();
Symbol 523 MovieClip Frame 2
stop();
Symbol 523 MovieClip Frame 3
stop();
Symbol 523 MovieClip Frame 4
stop();
Symbol 524 Button
on (release) {
_root.switchStageForward();
}
Symbol 525 MovieClip Frame 15
stop();
Symbol 525 MovieClip Frame 31
stop();
Symbol 526 Button
on (release) {
_root.switchStageBackward();
}
Symbol 527 MovieClip Frame 15
stop();
Symbol 527 MovieClip Frame 31
stop();
Symbol 529 MovieClip Frame 1
stop();
_root.displayStageOnScreen(_root.selectedAvatarIndex, "current");
Symbol 529 MovieClip Frame 2
Symbol 529 MovieClip Frame 10
gotoAndStop (1);
Symbol 529 MovieClip Frame 11
Symbol 529 MovieClip Frame 21
gotoAndStop (1);
Symbol 530 MovieClip Frame 20
stop();
Symbol 530 MovieClip Frame 31
stop();
Symbol 531 Button
on (release) {
_root.blueish.gotoAndPlay(1);
_root.gotoAndStop(10);
}
Symbol 532 Button
on (release) {
gotoAndPlay (16);
_root.blueish.gotoAndPlay(61);
_root.leftA2.gotoAndPlay(16);
_root.rightA2.gotoAndPlay(16);
_root.ico2.gotoAndPlay(21);
_root.n2.gotoAndPlay(16);
_root.titleB.gotoAndPlay(16);
}
Symbol 533 Button
on (release) {
_root.blueish.gotoAndPlay(61);
_root.leftA2.gotoAndPlay(16);
_root.rightA2.gotoAndPlay(16);
_root.ico2.gotoAndPlay(21);
_root.n2.gotoAndPlay(16);
_root.titleB.gotoAndPlay(16);
gotoAndPlay (16);
}
Symbol 534 MovieClip Frame 15
stop();
Symbol 534 MovieClip Frame 31
_root.blueish.gotoAndPlay(1);
_root.gotoAndPlay("arena");
stop();
Symbol 537 MovieClip Frame 15
stop();
Symbol 537 MovieClip Frame 26
stop();
Symbol 559 MovieClip Frame 1
function OutputValue(keyCode) {
var _local1 = "";
switch (keyCode) {
case 8 :
_local1 = "BACKSPACE";
break;
case 20 :
_local1 = "CAPSLOCK";
break;
case 17 :
_local1 = "CONTROL";
break;
case 46 :
_local1 = "DELETE";
break;
case 40 :
_local1 = "DOWN";
break;
case 35 :
_local1 = "END";
break;
case 13 :
_local1 = "ENTER";
break;
case 27 :
_local1 = "ESCAPE";
break;
case 36 :
_local1 = "HOME";
break;
case 45 :
_local1 = "INSERT";
break;
case 37 :
_local1 = "LEFT";
break;
case 34 :
_local1 = "PGDN";
break;
case 33 :
_local1 = "PGUP";
break;
case 39 :
_local1 = "RIGHT";
break;
case 16 :
_local1 = "SHIFT";
break;
case 32 :
_local1 = "SPACE";
break;
case 9 :
_local1 = "TAB";
break;
case 38 :
_local1 = "UP";
break;
case 186 :
_local1 = ";";
break;
case 187 :
_local1 = "=";
break;
case 189 :
_local1 = "-";
break;
case 191 :
_local1 = "/";
break;
case 192 :
_local1 = "`";
break;
case 219 :
_local1 = "[";
break;
case 220 :
_local1 = "\\";
break;
case 221 :
_local1 = "]";
break;
case 222 :
_local1 = "'";
break;
case 188 :
_local1 = ",";
break;
case 190 :
_local1 = ".";
break;
case 96 :
_local1 = "NUMPAD 0";
break;
case 97 :
_local1 = "NUMPAD 1";
break;
case 98 :
_local1 = "NUMPAD 2";
break;
case 99 :
_local1 = "NUMPAD 3";
break;
case 100 :
_local1 = "NUMPAD 4";
break;
case 101 :
_local1 = "NUMPAD 5";
break;
case 102 :
_local1 = "NUMPAD 6";
break;
case 103 :
_local1 = "NUMPAD 7";
break;
case 104 :
_local1 = "NUMPAD 8";
break;
case 105 :
_local1 = "NUMPAD 9";
break;
case 106 :
_local1 = "MULTIPLY";
break;
case 107 :
_local1 = "ADD";
break;
case 109 :
_local1 = "SUBTRACT";
break;
case 110 :
_local1 = "DECIMAL";
break;
case 111 :
_local1 = "DIVIDE";
break;
default :
_local1 = chr(keyCode);
_local1.toUpperCase();
}
return(_local1);
}
stop();
Symbol 559 MovieClip Frame 4
this.p_txt.text = ("Press \"" + OutputValue(_global.pauseHotkey)) + "\" to pause.";
Symbol 559 MovieClip Frame 6
this.second_txt.text = ("press \"" + OutputValue(_global.fireHotkey)) + "\".";
Symbol 559 MovieClip Frame 8
stop();
this.up_txt.text = "Up = " + OutputValue(_global.avatarUp);
this.down_txt.text = "Down = " + OutputValue(_global.avatarDown);
this.left_txt.text = "Left = " + OutputValue(_global.avatarLeft);
this.right_txt.text = "Right = " + OutputValue(_global.avatarRight);
Symbol 562 MovieClip Frame 1
stop();
Symbol 562 MovieClip Frame 2
stop();
Symbol 565 MovieClip Frame 1
stop();
stop();
Symbol 572 MovieClip Frame 1
stop();
Symbol 574 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 20
_root.game.ShakeScreen(60);
Symbol 582 MovieClip Frame 345
_root.game.ResumeBossFight();
Symbol 582 MovieClip Frame 346
stop();
Symbol 582 MovieClip Frame 374
_global.SoundManager.PlaySound("small_death");
Symbol 582 MovieClip Frame 421
stop();
Symbol 585 MovieClip Frame 1
stop();
Symbol 585 MovieClip Frame 56
gotoAndPlay ("hide");
Symbol 591 MovieClip Frame 1
stop();
this.inside_mc._visible = false;
Symbol 593 MovieClip Frame 1
stop();
this.inside_mc._visible = false;
Symbol 611 Button
on (rollOver) {
this.buttonText_txt.text = "Play More Games!";
}
on (rollOut) {
this.buttonText_txt.text = "";
}
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 613 Button
on (rollOver) {
this.buttonText_txt.text = "Return to Game";
}
on (rollOut) {
this.buttonText_txt.text = "";
}
on (release) {
_root.game.ClosePauseScreen();
}
Symbol 615 Button
on (rollOver) {
this.buttonText_txt.text = "Return to Main Menu (Completely QUITS Game!)";
}
on (rollOut) {
this.buttonText_txt.text = "";
}
on (release) {
_root.game.SelectPauseScreen("quit_mc");
}
Symbol 626 MovieClip Frame 1
stop();
Symbol 626 MovieClip Frame 2
stop();
Symbol 633 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 2
stop();
Symbol 638 MovieClip Frame 1
stop();
Symbol 638 MovieClip Frame 2
stop();
Instance of Symbol 405 MovieClip "low" in Symbol 663 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "LOW") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "LOW") {
this.gotoAndStop("off");
}
}
on (release) {
_quality = "LOW";
this._parent.high.gotoAndStop("off");
this._parent.med.gotoAndStop("off");
}
Instance of Symbol 405 MovieClip "med" in Symbol 663 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "MEDIUM") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "MEDIUM") {
this.gotoAndStop("off");
}
}
on (release) {
_quality = "MEDIUM";
this._parent.high.gotoAndStop("off");
this._parent.low.gotoAndStop("off");
}
Instance of Symbol 405 MovieClip "high" in Symbol 663 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "HIGH") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "HIGH") {
this.gotoAndStop("off");
}
}
on (release) {
_quality = "HIGH";
this._parent.low.gotoAndStop("off");
this._parent.med.gotoAndStop("off");
}
Instance of Symbol 405 MovieClip "musicOn" in Symbol 663 MovieClip Frame 1
onClipEvent (load) {
if (_global.musicOn == true) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.musicOn != true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.musicOn = true;
this._parent.musicOff.gotoAndStop("off");
_global.myMusicPlayer.SetTrack("titleMusic");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.Play();
}
Instance of Symbol 405 MovieClip "musicOff" in Symbol 663 MovieClip Frame 1
onClipEvent (load) {
if (_global.musicOn == false) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.musicOn == true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.musicOn = false;
this._parent.musicOn.gotoAndStop("off");
_global.myMusicPlayer.Stop();
}
Instance of Symbol 405 MovieClip "soundsOn" in Symbol 663 MovieClip Frame 1
onClipEvent (load) {
if (_global.soundOn == true) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.soundOn != true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.soundOn = true;
this._parent.soundsOff.gotoAndStop("off");
}
Instance of Symbol 405 MovieClip "soundsOff" in Symbol 663 MovieClip Frame 1
onClipEvent (load) {
if (_global.soundOn == false) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.soundOn == true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.soundOn = false;
this._parent.soundsOn.gotoAndStop("off");
}
Instance of Symbol 314 MovieClip "soundsOn" in Symbol 663 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
this.gotoAndStop("off");
}
on (release) {
_root.game.SelectPauseScreen("controls_mc");
}
Instance of Symbol 405 MovieClip "soundsOn" in Symbol 668 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
this.gotoAndStop("off");
}
on (release) {
_root.game.QuitGame();
}
Instance of Symbol 405 MovieClip "soundsOff" in Symbol 668 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
this.gotoAndStop("off");
}
on (release) {
_root.game.SetupPauseScreen();
}
Symbol 679 MovieClip Frame 1
function OutputValue(fieldName, keyCode) {
var textRef = eval ("this." + fieldName);
var returnValue = "";
switch (keyCode) {
case 8 :
returnValue = "BACKSPACE";
break;
case 20 :
returnValue = "CAPSLOCK";
break;
case 17 :
returnValue = "CONTROL";
break;
case 46 :
returnValue = "DELETE";
break;
case 40 :
returnValue = "DOWN";
break;
case 35 :
returnValue = "END";
break;
case 13 :
returnValue = "ENTER";
break;
case 27 :
returnValue = "ESCAPE";
break;
case 36 :
returnValue = "HOME";
break;
case 45 :
returnValue = "INSERT";
break;
case 37 :
returnValue = "LEFT";
break;
case 34 :
returnValue = "PGDN";
break;
case 33 :
returnValue = "PGUP";
break;
case 39 :
returnValue = "RIGHT";
break;
case 16 :
returnValue = "SHIFT";
break;
case 32 :
returnValue = "SPACE";
break;
case 9 :
returnValue = "TAB";
break;
case 38 :
returnValue = "UP";
break;
case 186 :
returnValue = ";";
break;
case 187 :
returnValue = "=";
break;
case 189 :
returnValue = "-";
break;
case 191 :
returnValue = "/";
break;
case 192 :
returnValue = "`";
break;
case 219 :
returnValue = "[";
break;
case 220 :
returnValue = "\\";
break;
case 221 :
returnValue = "]";
break;
case 222 :
returnValue = "'";
break;
case 188 :
returnValue = ",";
break;
case 190 :
returnValue = ".";
break;
case 96 :
returnValue = "NUMPAD 0";
break;
case 97 :
returnValue = "NUMPAD 1";
break;
case 98 :
returnValue = "NUMPAD 2";
break;
case 99 :
returnValue = "NUMPAD 3";
break;
case 100 :
returnValue = "NUMPAD 4";
break;
case 101 :
returnValue = "NUMPAD 5";
break;
case 102 :
returnValue = "NUMPAD 6";
break;
case 103 :
returnValue = "NUMPAD 7";
break;
case 104 :
returnValue = "NUMPAD 8";
break;
case 105 :
returnValue = "NUMPAD 9";
break;
case 106 :
returnValue = "MULTIPLY";
break;
case 107 :
returnValue = "ADD";
break;
case 109 :
returnValue = "SUBTRACT";
break;
case 110 :
returnValue = "DECIMAL";
break;
case 111 :
returnValue = "DIVIDE";
break;
default :
returnValue = chr(keyCode);
returnValue.toUpperCase();
}
textRef.text = returnValue;
}
function UnselectOthers(myName) {
if (myName != "upClip") {
this.upClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "downClip") {
this.downClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "leftClip") {
this.leftClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "rightClip") {
this.rightClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "fireClip") {
this.fireClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "pauseClip") {
this.pauseClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
_global.controlsModified = true;
}
stop();
var hasFocus = "";
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (hasFocus == "upClip") {
_global.avatarUp = Key.getCode();
OutputValue("up_txt", _global.avatarUp);
}
if (hasFocus == "downClip") {
_global.avatarDown = Key.getCode();
OutputValue("down_txt", _global.avatarDown);
}
if (hasFocus == "leftClip") {
_global.avatarLeft = Key.getCode();
OutputValue("left_txt", _global.avatarLeft);
}
if (hasFocus == "rightClip") {
_global.avatarRight = Key.getCode();
OutputValue("right_txt", _global.avatarRight);
}
if (hasFocus == "fireClip") {
_global.fireHotkey = Key.getCode();
OutputValue("fire_txt", _global.fireHotkey);
}
if (hasFocus == "pauseClip") {
_global.pauseHotkey = Key.getCode();
OutputValue("pause_txt", _global.pauseHotkey);
}
};
Key.addListener(keyListener);
OutputValue("up_txt", _global.avatarUp);
OutputValue("down_txt", _global.avatarDown);
OutputValue("left_txt", _global.avatarLeft);
OutputValue("right_txt", _global.avatarRight);
OutputValue("fire_txt", _global.fireHotkey);
OutputValue("pause_txt", _global.pauseHotkey);
Instance of Symbol 419 MovieClip "upClip" in Symbol 679 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "downClip" in Symbol 679 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "leftClip" in Symbol 679 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "rightClip" in Symbol 679 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "fireClip" in Symbol 679 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 419 MovieClip "pauseClip" in Symbol 679 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 680 MovieClip Frame 1
stop();
Symbol 680 MovieClip Frame 2
stop();
Symbol 680 MovieClip Frame 3
stop();
Symbol 680 MovieClip Frame 4
stop();
Symbol 680 MovieClip Frame 5
stop();
Instance of Symbol 626 MovieClip "stats_mc" in Symbol 681 MovieClip Frame 1
on (release) {
_root.game.SelectPauseScreen("stats_mc");
}
Instance of Symbol 633 MovieClip "map_mc" in Symbol 681 MovieClip Frame 1
on (release) {
_root.game.SelectPauseScreen("map_mc");
}
Instance of Symbol 638 MovieClip "options_mc" in Symbol 681 MovieClip Frame 1
on (release) {
_root.game.SelectPauseScreen("options_mc");
}
Symbol 687 Button
on (rollOver) {
this.buttonText_txt.text = "Return to Main Menu (Completely QUITS Game!)";
}
on (rollOut) {
this.buttonText_txt.text = "";
}
on (release) {
_root.game.QuitGame();
}
Symbol 694 Button
on (release) {
_root.game.QuitGame();
}
Symbol 698 Button
on (release) {
_root.game.CloseWinScreen();
}
Symbol 708 Button
on (release) {
getURL ("http://www.herointeractive.com/BT2_Transfer.php?intID=4", "_self");
}
Symbol 717 MovieClip Frame 1
stop();
Symbol 717 MovieClip Frame 2
stop();
Symbol 726 MovieClip Frame 1
stop();
Symbol 726 MovieClip Frame 2
stop();
Symbol 728 MovieClip Frame 1
stop();
Symbol 728 MovieClip Frame 2
stop();
Symbol 740 MovieClip Frame 1
stop();
Symbol 740 MovieClip Frame 2
stop();
Symbol 741 MovieClip Frame 1
stop();
Symbol 741 MovieClip Frame 2
_root.game.SetupPauseScreen();
Symbol 741 MovieClip Frame 16
stop();
Symbol 741 MovieClip Frame 31
_root.SaveSettings();
_root.game.SetupPauseScreen();
_root.game.UnPauseGame();
stop();
Symbol 741 MovieClip Frame 32
_root.game.SetupArenaScreen();
Symbol 741 MovieClip Frame 46
stop();
Symbol 741 MovieClip Frame 61
_root.game.UnPauseGame();
stop();
Symbol 741 MovieClip Frame 76
stop();
Symbol 741 MovieClip Frame 91
_root.game.UnPauseGame();
stop();
Symbol 741 MovieClip Frame 106
stop();
Symbol 741 MovieClip Frame 121
_root.game.UnPauseGame();
stop();
Symbol 741 MovieClip Frame 122
_root.game.SetupUpgradeButtons(this, 3);
Symbol 741 MovieClip Frame 136
stop();
Symbol 741 MovieClip Frame 150
_root.game.UpgradePauseComplete();
stop();
Symbol 741 MovieClip Frame 151
_root.game.SetupUpgradeButtons(this, 2);
Symbol 741 MovieClip Frame 165
stop();
Symbol 741 MovieClip Frame 180
_root.game.UpgradePauseComplete();
stop();
Symbol 743 MovieClip Frame 6
_root.flash_mc._visible = false;
stop();
Symbol 744 MovieClip Frame 1
stop();
Symbol 744 MovieClip Frame 2
stop();
Symbol 758 MovieClip [stun_burst] Frame 26
_root.game.RemoveUnderEffect(this._name);
stop();
Symbol 761 MovieClip [damage_burst] Frame 16
_root.game.RemoveUnderEffect(this._name);
stop();
Symbol 762 MovieClip [sticky_effect] Frame 121
_root.game.RemoveEffect(this._name);
stop();
Symbol 763 MovieClip [stun_burst_large] Frame 26
_root.game.RemoveUnderEffect(this._name);
stop();
Symbol 764 MovieClip [damage_burst_small] Frame 16
_root.game.RemoveUnderEffect(this._name);
stop();