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__("6fb4e88c", this, 10301, true);
function OpenArmorGames() {
getURL ("http://www.armorgames.com", "_blank");
}
function OpenHeroInteractive() {
getURL ("http://www.herointeractive.com", "_blank");
}
function Setup() {
var _local3 = 0;
while (_local3 < 100) {
_root.tabIndexKiller.tabIndex = _local3;
_local3++;
}
myFlag = 0;
Counter = -1;
totalFileSize = _root.getBytesTotal();
startBytes = _root.getBytesLoaded();
_global.up = 87;
_global.down = 83;
_global.rightward = 68;
_global.leftward = 65;
_global.icon1 = 49;
_global.icon2 = 50;
_global.icon3 = 51;
_global.icon4 = 52;
_global.icon5 = 53;
_global.icon6 = 54;
_global.poopFlag = false;
_global.tutorialMove = false;
_global.hotKey_up = _global.up;
_global.hotKey_down = _global.down;
_global.hotKey_left = _global.leftward;
_global.hotKey_right = _global.rightward;
_global.hotKey_1 = _global.icon1;
_global.hotKey_2 = _global.icon2;
_global.hotKey_3 = _global.icon3;
_global.hotKey_4 = _global.icon4;
_global.hotKey_5 = _global.icon5;
_global.hotKey_6 = _global.icon6;
_global.icon1Text = "";
_global.icon2Text = "";
_global.icon3Text = "";
_global.icon4Text = "";
_global.icon5Text = "";
_global.icon6Text = "";
_global.pauseHotkey = 80;
_global.soundOn = true;
_global.musicOn = true;
_global.graphics = "HIGH";
_global.myMusicPlayer = new Music();
_global.SoundManager = new SoundPlayer();
_global.whichLevel = 1;
_global.movementMode = 2;
_global.gamePaused = false;
_root.pre.preload_txt.text = "";
}
function Run() {
PreloaderStuff();
}
function PreloaderStuff() {
if (Counter == -1) {
bytesLoaded = _root.getBytesLoaded();
amountLoaded = bytesLoaded / totalFileSize;
myPercentLoaded = int(100 * amountLoaded);
_root.pre.preload_txt.text = myPercentLoaded + "%";
if (myPercentLoaded == 100) {
_root.pre.preload_txt.text = myPercentLoaded + "%";
okToPlay = true;
var _local3 = new Array();
_local3.push("http://www.herointeractive.com");
_local3.push("http://herointeractive.com");
_local3.push("http://www.flashgamelicense.com");
_local3.push("http://flashgamelicense.com");
_local3.push("http://www.armorgames.com");
_local3.push("http://armorgames.com");
_local3.push("http://games.armorgames.com");
var _local2 = 0;
while (_local2 < _local3.length) {
if (_url.substr(0, _local3[_local2].length) == _local3[_local2]) {
okToPlay = true;
break;
}
_local2++;
}
if (okToPlay) {
_root.playButtonMC.gotoAndStop("on");
} else {
_root.gotoAndStop(60);
}
}
} else {
Counter--;
}
}
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;
stop();
_global.dataValue1 = new DataObject();
_global.dataValue2 = new DataObject();
_global.dataValue3 = new DataObject();
_global.dataValue4 = new DataObject();
_global.dataValue5 = new DataObject();
_global.dataValue6 = new DataObject();
_global.dataValue7 = new DataObject();
_global.dataValue8 = new DataObject();
_global.dataValue9 = new DataObject();
_global.dataValue10 = new DataObject();
_global.dataValue11 = new DataObject();
_global.dataValue12 = new DataObject();
_global.dataValue13 = new DataObject();
_global.dataValue14 = new DataObject();
_global.dataValue1.mSet(62167911);
_global.dataValue2.mSet(44262684);
_global.dataValue3.mSet(81357668);
_global.dataValue4.mSet(10068213);
_global.dataValue5.mSet(18992847);
_global.dataValue6.mSet(99713599);
_global.dataValue7.mSet(40059764);
_global.dataValue8.mSet(31590000);
_global.dataValue9.mSet(58944460);
_global.dataValue10.mSet(58134089);
_global.dataValue11.mSet(28224560);
_global.dataValue12.mSet(40905006);
_global.dataValue13.mSet(38079544);
_global.dataValue14.mSet(33984365);
var mySharedObject = SharedObject.getLocal("settings");
if (mySharedObject.data.firstTime == undefined) {
mySharedObject.data.firstTime = false;
_global.dataValue3.Set(10004689);
mySharedObject.data.dataValue1 = _global.dataValue1.Store();
mySharedObject.data.dataValue2 = _global.dataValue2.Store();
mySharedObject.data.dataValue3 = _global.dataValue3.Store();
mySharedObject.data.dataValue4 = _global.dataValue4.Store();
mySharedObject.data.dataValue5 = _global.dataValue5.Store();
mySharedObject.data.dataValue6 = _global.dataValue6.Store();
mySharedObject.data.dataValue7 = _global.dataValue7.Store();
mySharedObject.data.dataValue8 = _global.dataValue8.Store();
mySharedObject.data.dataValue9 = _global.dataValue9.Store();
mySharedObject.data.dataValue10 = _global.dataValue10.Store();
mySharedObject.data.dataValue11 = _global.dataValue11.Store();
mySharedObject.data.dataValue12 = _global.dataValue12.Store();
mySharedObject.data.dataValue13 = _global.dataValue13.Store();
mySharedObject.data.dataValue14 = _global.dataValue14.Store();
mySharedObject.flush();
} else {
_global.dataValue1.Load(mySharedObject.data.dataValue1);
_global.dataValue2.Load(mySharedObject.data.dataValue2);
_global.dataValue3.Load(mySharedObject.data.dataValue3);
_global.dataValue4.Load(mySharedObject.data.dataValue4);
_global.dataValue5.Load(mySharedObject.data.dataValue5);
_global.dataValue6.Load(mySharedObject.data.dataValue6);
_global.dataValue7.Load(mySharedObject.data.dataValue7);
_global.dataValue8.Load(mySharedObject.data.dataValue8);
_global.dataValue9.Load(mySharedObject.data.dataValue9);
_global.dataValue10.Load(mySharedObject.data.dataValue10);
_global.dataValue11.Load(mySharedObject.data.dataValue11);
_global.dataValue12.Load(mySharedObject.data.dataValue12);
_global.dataValue13.Load(mySharedObject.data.dataValue13);
_global.dataValue14.Load(mySharedObject.data.dataValue14);
}
var myFlag;
var Counter;
var totalFileSize;
var startBytes;
_global.dataPath = new DataObject();
_global.dataPath.mSet(2382752);
_global.doExcludePreloader = new DataObject();
_global.doExcludePreloader.mSet(59712137);
var adArray = new Array();
adArray.push("http://www.addictinggames.com");
adArray.push("http://addictinggames.com");
adArray.push("http://agstage.shockwave.com");
adArray.push("http://andkon.com");
adArray.push("http://www.andkon.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.pre.gotoAndStop("noAd");
_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);
}
Instance of Symbol 589 MovieClip "gameActions_mc" in Frame 1
onClipEvent (load) {
_root.Setup();
}
onClipEvent (enterFrame) {
_root.Run();
}
Frame 3
function Setup() {
_root.tabEnabled = false;
}
function Run() {
_global.myMusicPlayer.RunPlayer();
}
stop();
Instance of Symbol 589 MovieClip "gameActions_mc" in Frame 3
onClipEvent (load) {
_root.Setup();
}
onClipEvent (enterFrame) {
_root.Run();
}
Frame 5
function Setup() {
_root.back_btn.tabEnabled = false;
_root.play_btn.tabEnabled = false;
_root.settings_btn.tabEnabled = false;
_root.credits_btn.tabEnabled = false;
_root.pmg_btn.tabEnabled = false;
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("intro");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
nextTween = 0;
canTween = true;
levelColor = 1;
motionTweenSpeed = 0.3;
motionTweenSpeed2 = 0.5;
menuTitleX = _root.menuTitle._x;
menuTitleY = _root.menuTitle._y;
play_btnStartX = _root.play_btn._x;
play_btnStartY = _root.play_btn._y;
play_btnRotation = _root.play_btn._rotation;
settings_btnStartX = _root.settings_btn._x;
settings_btnStartY = _root.settings_btn._y;
settings_btnRotation = _root.settings_btn._rotation;
credits_btnStartX = _root.credits_btn._x;
credits_btnStartY = _root.credits_btn._y;
credits_btnRotation = _root.credits_btn._rotation;
pmg_btnStartX = _root.pmg_btn._x;
pmg_btnStartY = _root.pmg_btn._y;
pmg_btnRotation = _root.pmg_btn._rotation;
back_btnStartX = 250.95;
back_btnStartY = 366.55;
pmg_linkStartX = 298.1;
pmg_linkStartY = 270.3;
FPSforTweenClass = 60;
}
function Run() {
_global.myMusicPlayer.RunPlayer();
}
function LockAndUnlockLevels() {
if (_global.dataValue3.Get() != -1) {
_root.playMC.1_mc.gotoAndStop(1);
} else {
_root.playMC.1_mc.gotoAndStop(2);
}
if (_global.dataValue4.Get() != -1) {
_root.playMC.2_mc.gotoAndStop(1);
} else {
_root.playMC.2_mc.gotoAndStop(2);
}
if (_global.dataValue5.Get() != -1) {
_root.playMC.3_mc.gotoAndStop(1);
} else {
_root.playMC.3_mc.gotoAndStop(2);
}
if (_global.dataValue6.Get() != -1) {
_root.playMC.4_mc.gotoAndStop(1);
} else {
_root.playMC.4_mc.gotoAndStop(2);
}
if (_global.dataValue7.Get() != -1) {
_root.playMC.5_mc.gotoAndStop(1);
} else {
_root.playMC.5_mc.gotoAndStop(2);
}
if (_global.dataValue8.Get() != -1) {
_root.playMC.6_mc.gotoAndStop(1);
} else {
_root.playMC.6_mc.gotoAndStop(2);
}
if (_global.dataValue9.Get() != -1) {
_root.playMC.7_mc.gotoAndStop(1);
} else {
_root.playMC.7_mc.gotoAndStop(2);
}
if (_global.dataValue10.Get() != -1) {
_root.playMC.8_mc.gotoAndStop(1);
} else {
_root.playMC.8_mc.gotoAndStop(2);
}
if (_global.dataValue11.Get() != -1) {
_root.playMC.9_mc.gotoAndStop(1);
} else {
_root.playMC.9_mc.gotoAndStop(2);
}
if (_global.dataValue12.Get() != -1) {
_root.playMC.10_mc.gotoAndStop(1);
} else {
_root.playMC.10_mc.gotoAndStop(2);
}
if (_global.dataValue13.Get() != -1) {
_root.playMC.11_mc.gotoAndStop(1);
} else {
_root.playMC.11_mc.gotoAndStop(2);
}
if (_global.dataValue14.Get() != -1) {
_root.playMC.12_mc.gotoAndStop(1);
} else {
_root.playMC.12_mc.gotoAndStop(2);
}
}
function PutAllButtonsBack() {
ScaleButtonsAllBack();
MoveIt(_root.play_btn, play_btnStartX, play_btnStartY, motionTweenSpeed2);
_root.play_btn._rotation = play_btnRotation;
MoveIt(_root.settings_btn, settings_btnStartX, settings_btnStartY, motionTweenSpeed2);
_root.settings_btn._rotation = settings_btnRotation;
MoveIt(_root.credits_btn, credits_btnStartX, credits_btnStartY, motionTweenSpeed2);
_root.credits_btn._rotation = credits_btnRotation;
MoveIt(_root.pmg_btn, pmg_btnStartX, pmg_btnStartY, motionTweenSpeed2);
_root.pmg_btn._rotation = pmg_btnRotation;
}
function ScaleButtonsAllBack() {
if (overPlay) {
ScaleIt(_root.play_btn, 100);
} else if (overSettings) {
ScaleIt(_root.settings_btn, 100);
} else if (overCredits) {
ScaleIt(_root.credits_btn, 100);
} else if (overPmg) {
ScaleIt(_root.pmg_btn, 100);
}
}
function UpdateButtonInformation() {
play_btnStartX = _root.play_btn._x;
play_btnStartY = _root.play_btn._y;
play_btnRotation = _root.play_btn._rotation;
settings_btnStartX = _root.settings_btn._x;
settings_btnStartY = _root.settings_btn._y;
settings_btnRotation = _root.settings_btn._rotation;
credits_btnStartX = _root.credits_btn._x;
credits_btnStartY = _root.credits_btn._y;
credits_btnRotation = _root.credits_btn._rotation;
pmg_btnStartX = _root.pmg_btn._x;
pmg_btnStartY = _root.pmg_btn._y;
pmg_btnRotation = _root.pmg_btn._rotation;
}
function TakeCareOfOtherButtons(mc) {
if (mc._x < 273) {
if (mc._y < 273) {
MoveIt(mc, mc._x - 350, mc._y - 350, motionTweenSpeed2);
} else {
MoveIt(mc, mc._x - 350, mc._y + 350, motionTweenSpeed2);
}
} else if (mc._y < 273) {
MoveIt(mc, mc._x + 350, mc._y - 350, motionTweenSpeed2);
} else {
MoveIt(mc, mc._x + 350, mc._y + 350, motionTweenSpeed2);
}
}
function ColorLevelBoxFunc(box) {
_global.SoundManager.PlaySound("click");
_root.playMC.gotoAndStop("off");
if (box == 1) {
levelColor = 1;
_global.whichLevel = 1;
} else if (box == 2) {
levelColor = 1;
_global.whichLevel = 2;
} else if (box == 3) {
levelColor = 1;
_global.whichLevel = 3;
} else if (box == 4) {
levelColor = 2;
_global.whichLevel = 4;
} else if (box == 5) {
levelColor = 2;
_global.whichLevel = 5;
} else if (box == 6) {
levelColor = 2;
_global.whichLevel = 6;
} else if (box == 7) {
levelColor = 3;
_global.whichLevel = 7;
} else if (box == 8) {
levelColor = 3;
_global.whichLevel = 8;
} else if (box == 9) {
levelColor = 3;
_global.whichLevel = 9;
} else if (box == 10) {
levelColor = 4;
_global.whichLevel = 10;
} else if (box == 11) {
levelColor = 4;
_global.whichLevel = 11;
} else if (box == 12) {
levelColor = 4;
_global.whichLevel = 12;
}
ControlsSelected(1);
}
function ControlsSelected(controlType) {
if (controlType == 1) {
_global.movementMode = 2;
_root.border1.outsideBorder.gotoAndPlay("toGame");
} else if (controlType == 2) {
_global.movementMode = 1;
_root.border1.outsideBorder.gotoAndPlay("toGame");
}
}
function HotkeysActions() {
_root.settingsMC.gotoAndPlay("start2");
}
function ScaleIt(mc, scale) {
this.onEnterFrame = function () {
if (scale < mc._xscale) {
mc._xscale = mc._xscale - 400;
mc._yscale = mc._yscale - 400;
if (mc._xscale <= scale) {
mc._xscale = scale;
mc._yscale = scale;
delete this.onEnterFrame;
}
} else {
mc._xscale = mc._xscale + 400;
mc._yscale = mc._yscale + 400;
if (mc._xscale >= scale) {
mc._xscale = scale;
mc._yscale = scale;
delete this.onEnterFrame;
}
}
};
}
function MoveIt(mClip, valX, valY, dur) {
nextTween++;
canTween = false;
if (nextTween == 1) {
moveMe1(mClip, valX, valY, dur);
} else if (nextTween == 2) {
moveMe2(mClip, valX, valY, dur);
} else if (nextTween == 3) {
moveMe3(mClip, valX, valY, dur);
} else if (nextTween == 4) {
moveMe4(mClip, valX, valY, dur);
} else if (nextTween == 5) {
moveMe5(mClip, valX, valY, dur);
} else if (nextTween == 6) {
moveMe6(mClip, valX, valY, dur);
} else if (nextTween == 7) {
moveMe7(mClip, valX, valY, dur);
} else if (nextTween == 8) {
moveMe8(mClip, valX, valY, dur);
} else if (nextTween == 9) {
moveMe9(mClip, valX, valY, dur);
} else if (nextTween == 10) {
moveMe10(mClip, valX, valY, dur);
} else if (nextTween == 11) {
moveMe11(mClip, valX, valY, dur);
} else if (nextTween == 12) {
moveMe12(mClip, valX, valY, dur);
} else if (nextTween == 13) {
moveMe13(mClip, valX, valY, dur);
} else if (nextTween == 14) {
moveMe14(mClip, valX, valY, dur);
} else if (nextTween == 15) {
moveMe15(mClip, valX, valY, dur);
} else if (nextTween == 16) {
moveMe16(mClip, valX, valY, dur);
} else if (nextTween == 17) {
moveMe17(mClip, valX, valY, dur);
} else if (nextTween == 18) {
moveMe18(mClip, valX, valY, dur);
} else if (nextTween == 19) {
moveMe19(mClip, valX, valY, dur);
} else if (nextTween == 20) {
moveMe20(mClip, valX, valY, dur);
} else if (nextTween == 21) {
moveMe21(mClip, valX, valY, dur);
} else if (nextTween == 22) {
moveMe22(mClip, valX, valY, dur);
} else if (nextTween == 23) {
moveMe23(mClip, valX, valY, dur);
} else if (nextTween == 24) {
moveMe24(mClip, valX, valY, dur);
} else if (nextTween == 25) {
moveMe25(mClip, valX, valY, dur);
} else if (nextTween == 26) {
moveMe26(mClip, valX, valY, dur);
} else if (nextTween == 27) {
moveMe27(mClip, valX, valY, dur);
} else if (nextTween == 28) {
moveMe28(mClip, valX, valY, dur);
} else if (nextTween == 29) {
moveMe29(mClip, valX, valY, dur);
} else if (nextTween == 30) {
moveMe30(mClip, valX, valY, dur);
} else if (nextTween == 31) {
moveMe1(mClip, valX, valY, dur);
nextTween = 1;
}
}
function moveMe1(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe2(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe3(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe4(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe5(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe6(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe7(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe8(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe9(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe10(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe11(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe12(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe13(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe14(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe15(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe16(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe17(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe18(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe19(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe20(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe21(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe22(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe23(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe24(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe25(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe26(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe27(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe28(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe29(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
function moveMe30(mc, xVal, yVal, duration) {
var _local2 = mc._x;
var _local3 = mc._y;
myTweening = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, _local2, xVal, duration, true);
myTweening = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, _local3, yVal, duration, true);
myTweening.FPS = FPSforTweenClass;
myTweening.onMotionFinished = function () {
canTween = true;
if (backPress) {
overPlay = false;
overSettings = false;
overCredits = false;
overPmg = false;
backPress = false;
}
};
}
stop();
var overPlay;
var overSettings;
var overCredits;
var overPmg;
var levelColor;
var motionTweenSpeed;
var motionTweenSpeed2;
var canTween;
var nextTween;
var FPSforTweenClass;
var menuTitleX;
var menuTitleY;
var play_btnStartX;
var play_btnStartY;
var play_btnRotation;
var settings_btnStartX;
var settings_btnStartY;
var settings_btnRotation;
var credits_btnStartX;
var credits_btnStartY;
var credits_btnRotation;
var pmg_btnStartX;
var pmg_btnStartY;
var backPress;
_root.back_btn.onPress = function () {
_global.SoundManager.PlaySound("click");
_root.playMC.gotoAndStop("off");
_root.settingsMC.gotoAndStop("off");
_root.creditsMC.gotoAndStop("off");
MoveIt(_root.menuTitle, menuTitleX, menuTitleY, motionTweenSpeed2);
backPress = true;
PutAllButtonsBack();
_root.play_btn.TurnOn();
_root.settings_btn.TurnOn();
_root.credits_btn.TurnOn();
_root.pmg_btn.TurnOn();
this._y = 999;
};
_root.play_btn.onPress = function () {
_global.SoundManager.PlaySound("click");
_root.rollOverNotification.gotoAndStop("off");
if (!overPlay) {
overPlay = true;
UpdateButtonInformation();
this.TurnOff();
_root.settings_btn.TurnOff();
_root.credits_btn.TurnOff();
_root.pmg_btn.TurnOff();
MoveIt(_root.menuTitle, menuTitleX, menuTitleY - 200, motionTweenSpeed2);
TakeCareOfOtherButtons(_root.settings_btn);
TakeCareOfOtherButtons(_root.credits_btn);
TakeCareOfOtherButtons(_root.pmg_btn);
ScaleIt(_root.play_btn, 7500);
MoveIt(_root.play_btn, 275, 278, motionTweenSpeed2);
_root.settingsMC.gotoAndStop("off");
_root.creditsMC.gotoAndStop("off");
_root.playMC.gotoAndPlay("start");
_root.back_btn._x = back_btnStartX;
_root.back_btn._y = back_btnStartY;
}
};
_root.play_btn.onRollOver = function () {
if (!overPlay) {
_root.rollOverNotification.gotoAndStop("play");
ScaleButtonsAllBack();
} else {
_root.rollOverNotification.gotoAndStop("off");
}
};
_root.play_btn.onRollOut = function () {
_root.rollOverNotification.gotoAndStop("off");
};
_root.settings_btn.onPress = function () {
_global.SoundManager.PlaySound("click");
_root.rollOverNotification.gotoAndStop("off");
if (!overSettings) {
overSettings = true;
UpdateButtonInformation();
_root.play_btn.TurnOff();
this.TurnOff();
_root.credits_btn.TurnOff();
_root.pmg_btn.TurnOff();
MoveIt(_root.menuTitle, menuTitleX, menuTitleY - 200, motionTweenSpeed2);
TakeCareOfOtherButtons(_root.play_btn);
TakeCareOfOtherButtons(_root.credits_btn);
TakeCareOfOtherButtons(_root.pmg_btn);
ScaleIt(_root.settings_btn, 7500);
MoveIt(_root.settings_btn, 275, 278, motionTweenSpeed2);
_root.settingsMC.gotoAndPlay("start");
_root.creditsMC.gotoAndStop("off");
_root.playMC.gotoAndStart("off");
_root.back_btn._x = back_btnStartX;
_root.back_btn._y = back_btnStartY;
}
};
_root.settings_btn.onRollOver = function () {
if (!overSettings) {
_root.rollOverNotification.gotoAndStop("settings");
ScaleButtonsAllBack();
} else {
_root.rollOverNotification.gotoAndStop("off");
}
};
_root.settings_btn.onRollOut = function () {
_root.rollOverNotification.gotoAndStop("off");
};
_root.credits_btn.onPress = function () {
_global.SoundManager.PlaySound("click");
_root.rollOverNotification.gotoAndStop("off");
if (!overCredits) {
overCredits = true;
UpdateButtonInformation();
_root.play_btn.TurnOff();
_root.credits_btn.TurnOff();
this.TurnOff();
_root.pmg_btn.TurnOff();
MoveIt(_root.menuTitle, menuTitleX, menuTitleY - 200, motionTweenSpeed2);
TakeCareOfOtherButtons(_root.play_btn);
TakeCareOfOtherButtons(_root.settings_btn);
TakeCareOfOtherButtons(_root.pmg_btn);
ScaleIt(_root.credits_btn, 7500);
MoveIt(_root.credits_btn, 275, 278, motionTweenSpeed2);
_root.settingsMC.gotoAndStop("off");
_root.creditsMC.gotoAndPlay("start");
_root.playMC.gotoAndStop("off");
_root.back_btn._x = back_btnStartX;
_root.back_btn._y = back_btnStartY + 70;
}
};
_root.credits_btn.onRollOver = function () {
if (!overCredits) {
_root.rollOverNotification.gotoAndStop("credits");
ScaleButtonsAllBack();
} else {
_root.rollOverNotification.gotoAndStop("off");
}
};
_root.credits_btn.onRollOut = function () {
_root.rollOverNotification.gotoAndStop("off");
};
_root.pmg_btn.onRelease = function () {
_global.SoundManager.PlaySound("click");
getURL ("http://www.armorgames.com/", "_blank");
};
_root.pmg_btn.onRollOver = function () {
if (!overPmg) {
_root.rollOverNotification.gotoAndStop("pmg");
ScaleButtonsAllBack();
} else {
_root.rollOverNotification.gotoAndStop("off");
}
};
_root.pmg_btn.onRollOut = function () {
_root.rollOverNotification.gotoAndStop("off");
};
_root.pmg_btn.onDragOut = function () {
_root.rollOverNotification.gotoAndStop("off");
};
Instance of Symbol 589 MovieClip "gameActions_mc" in Frame 5
onClipEvent (load) {
_root.Setup();
}
onClipEvent (enterFrame) {
_root.Run();
}
Frame 11
function Setup() {
_root.tabEnabled = false;
BGColorSwitch();
_root.border2.gotoAndStop("blank");
whichIcon = 0;
tempIcon = "";
GetAllIconStrings();
}
function Run() {
}
function ExitLevel() {
_root.bg.gotoAndStop(1);
delete game;
_root.gotoAndStop("menu");
}
function BGColorSwitch() {
if (levelColor == 1) {
_root.bg.gotoAndPlay("toGreen");
} else if (levelColor == 2) {
_root.bg.gotoAndPlay("toRed");
} else if (levelColor == 3) {
_root.bg.gotoAndPlay("toBlue");
} else if (levelColor == 4) {
_root.bg.gotoAndPlay("toYellow");
}
}
function QuickKeyUse() {
if (Key.isDown(_global.hotKey_1)) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
if (Key.isDown(_global.hotKey_2)) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
if (Key.isDown(_global.hotKey_3)) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
if (Key.isDown(_global.hotKey_4)) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
if (Key.isDown(_global.hotKey_5)) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
if (Key.isDown(_global.hotKey_6)) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
}
function GetAllIconStrings() {
_root.icon1Text = OutputValue2(_global.hotKey_1);
_root.icon2Text = OutputValue2(_global.hotKey_2);
_root.icon3Text = OutputValue2(_global.hotKey_3);
_root.icon4Text = OutputValue2(_global.hotKey_4);
_root.icon5Text = OutputValue2(_global.hotKey_5);
_root.icon6Text = OutputValue2(_global.hotKey_6);
}
function OutputValue2(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);
}
function GameStartAfterTut() {
var _local3 = _root.game.GetAvatarName();
_global.tutorialMove = false;
_root[_local3]._xscale = 100;
_root[_local3]._yscale = 100;
_root[_local3]._x = 150;
_root[_local3]._y = 250;
_root.game.UnHideEnemies();
_root.blnTutorialFlag = false;
_root.intKeyLock = 0;
_root.game.UnPauseGame();
_root.pause_mc.gotoAndStop("blank");
_root.game.blnTutorialFlag = false;
}
_global.gamePaused = false;
_global.gravityConst = 0;
_global.up = 38;
_global.down = 40;
_global.leftward = 37;
_global.rightward = 39;
var game = new MicrobeKombatGame();
var whichIcon;
var tempIcon;
stop();
gameActions_mc.onLoad = function () {
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("game");
_global.myMusicPlayer.SetMaxVolume(80);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
_global.myMusicPlayer.RunPlayer();
};
Instance of Symbol 589 MovieClip "gameActions_mc" in Frame 11
onClipEvent (load) {
_root.Setup();
}
onClipEvent (enterFrame) {
_root.Run();
}
Frame 15
gotoAndPlay ("bufferComplete");
Frame 30
gotoAndPlay ("intro");
Frame 60
stop();
Symbol 19 MovieClip Frame 1
gotoAndPlay(Math.round(Math.random() * 20));
Symbol 29 MovieClip Frame 24
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "Enemy_4", myPoint.x, myPoint.y);
Symbol 35 MovieClip Frame 21
_root.game.EatAction(this._parent._name, "enemy");
Symbol 35 MovieClip Frame 25
this._parent.gotoAndStop("normal");
Symbol 36 MovieClip [Enemy_4] Frame 1
#initclip 33
Object.registerClass("Enemy_4", Enemy_4);
#endinitclip
stop();
Symbol 36 MovieClip [Enemy_4] Frame 2
stop();
Symbol 36 MovieClip [Enemy_4] Frame 3
stop();
Symbol 58 MovieClip Frame 1
gotoAndPlay(Math.round(Math.random() * 20));
Symbol 83 MovieClip Frame 47
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "Enemy_3", myPoint.x, myPoint.y);
Symbol 95 MovieClip Frame 15
_root.game.EatAction(this._parent._name, "enemy");
Symbol 95 MovieClip Frame 22
this._parent.gotoAndStop("normal");
Symbol 104 MovieClip Frame 31
stop();
Symbol 151 MovieClip Frame 47
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "Enemy_3", myPoint.x, myPoint.y);
Symbol 172 MovieClip Frame 15
_root.game.EatAction(this._parent._name, "enemy");
Symbol 172 MovieClip Frame 22
this._parent.gotoAndStop("infected_still");
Symbol 174 MovieClip [Enemy_3] Frame 1
#initclip 21
Object.registerClass("Enemy_3", Enemy_3);
#endinitclip
stop();
Symbol 174 MovieClip [Enemy_3] Frame 2
stop();
Symbol 174 MovieClip [Enemy_3] Frame 3
stop();
Symbol 174 MovieClip [Enemy_3] Frame 4
stop();
Symbol 174 MovieClip [Enemy_3] Frame 5
stop();
Symbol 174 MovieClip [Enemy_3] Frame 6
stop();
Symbol 174 MovieClip [Enemy_3] Frame 7
stop();
Symbol 184 MovieClip Frame 16
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "Enemy_2", myPoint.x, myPoint.y);
Symbol 193 MovieClip Frame 15
_root.game.EatAction(this._parent._name, "enemy");
Symbol 193 MovieClip Frame 19
this._parent.gotoAndStop("normal");
Symbol 201 MovieClip Frame 31
stop();
Symbol 216 MovieClip Frame 24
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "Enemy_2", myPoint.x, myPoint.y);
Symbol 235 MovieClip Frame 22
_root.game.EatAction(this._parent._name, "enemy");
Symbol 235 MovieClip Frame 28
this._parent.gotoAndStop("infected_still");
Symbol 237 MovieClip [Enemy_2] Frame 1
#initclip 22
Object.registerClass("Enemy_2", Enemy_2);
#endinitclip
stop();
Symbol 237 MovieClip [Enemy_2] Frame 2
stop();
Symbol 237 MovieClip [Enemy_2] Frame 3
stop();
Symbol 237 MovieClip [Enemy_2] Frame 4
stop();
Symbol 237 MovieClip [Enemy_2] Frame 5
stop();
Symbol 237 MovieClip [Enemy_2] Frame 6
stop();
Symbol 237 MovieClip [Enemy_2] Frame 7
stop();
Symbol 246 MovieClip Frame 28
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "Enemy_1", myPoint.x, myPoint.y);
Symbol 255 MovieClip Frame 22
_root.game.EatAction(this._parent._name, "enemy");
Symbol 255 MovieClip Frame 28
this._parent.gotoAndStop("normal");
Symbol 264 MovieClip Frame 31
stop();
Symbol 281 MovieClip Frame 28
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "Enemy_1", myPoint.x, myPoint.y);
Symbol 300 MovieClip Frame 22
_root.game.EatAction(this._parent._name, "enemy");
Symbol 300 MovieClip Frame 28
this._parent.gotoAndStop("infected_still");
Symbol 302 MovieClip [Enemy_1] Frame 1
#initclip 23
Object.registerClass("Enemy_1", Enemy_1);
#endinitclip
stop();
Symbol 302 MovieClip [Enemy_1] Frame 2
stop();
Symbol 302 MovieClip [Enemy_1] Frame 3
stop();
Symbol 302 MovieClip [Enemy_1] Frame 4
stop();
Symbol 302 MovieClip [Enemy_1] Frame 5
stop();
Symbol 302 MovieClip [Enemy_1] Frame 6
stop();
Symbol 302 MovieClip [Enemy_1] Frame 7
stop();
Symbol 316 MovieClip [effect_allyExplode] Frame 21
_root.game.RemoveEffect(this._name);
stop();
Symbol 346 MovieClip Frame 27
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "ally", myPoint.x, myPoint.y);
Symbol 362 MovieClip Frame 27
_root.game.EatAction(this._parent._name, "ally");
Symbol 362 MovieClip Frame 30
this._parent.gotoAndStop("normal");
Symbol 379 MovieClip Frame 27
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "ally", myPoint.x, myPoint.y);
Symbol 392 MovieClip Frame 36
this._parent.gotoAndStop("infected_still");
Symbol 421 MovieClip Frame 27
stop();
var myPoint = new Object({x:this.emitter._x, y:this.emitter._y});
this.localToGlobal(myPoint);
_root.game.DoneSplitting(this._parent._name, "ally", myPoint.x, myPoint.y);
Symbol 452 MovieClip Frame 27
_root.game.EatAction(this._parent._name, "ally");
Symbol 452 MovieClip Frame 30
this._parent.gotoAndStop("infected_still");
Symbol 454 MovieClip [ally] Frame 1
#initclip 24
Object.registerClass("ally", Ally);
#endinitclip
stop();
Symbol 454 MovieClip [ally] Frame 2
stop();
Symbol 454 MovieClip [ally] Frame 3
stop();
Symbol 454 MovieClip [ally] Frame 4
stop();
Symbol 454 MovieClip [ally] Frame 5
stop();
Symbol 454 MovieClip [ally] Frame 6
stop();
Symbol 454 MovieClip [ally] Frame 7
stop();
Symbol 454 MovieClip [ally] Frame 8
stop();
Symbol 454 MovieClip [ally] Frame 9
stop();
Symbol 456 MovieClip [stun_burst] Frame 17
_root.game.RemoveEffect(this._name);
stop();
Symbol 462 MovieClip [Virus] Frame 1
#initclip 25
Object.registerClass("Virus", Virus);
#endinitclip
Symbol 472 MovieClip [effect_explode_infected] Frame 21
_root.game.RemoveEffect(this._name);
stop();
Symbol 482 MovieClip [effect_explode] Frame 21
_root.game.RemoveEffect(this._name);
stop();
Symbol 485 Button
on (rollOver) {
_root.game.IconOver(this._name);
}
on (rollOut) {
_root.game.IconOut(this._name);
}
on (release) {
_root.game.IconPressed(this._name);
}
Symbol 488 MovieClip [p7] Frame 1
stop();
Symbol 488 MovieClip [p7] Frame 2
stop();
Symbol 497 MovieClip [power] Frame 1
#initclip 26
Object.registerClass("power", Powerup);
#endinitclip
Symbol 497 MovieClip [power] Frame 145
gotoAndPlay ("play1");
Symbol 497 MovieClip [power] Frame 290
gotoAndPlay ("play2");
Symbol 497 MovieClip [power] Frame 435
gotoAndPlay ("play3");
Symbol 500 MovieClip [avatarBTN] Frame 1
#initclip 27
Object.registerClass("avatarBTN", avatarBTNCharacter);
#endinitclip
stop();
Symbol 503 MovieClip Frame 20
stop();
Symbol 504 MovieClip [rotatingArrows] Frame 159
_root.game.RemoveEffect(this._name);
Symbol 506 MovieClip [water_trail_infected] Frame 37
_root.game.RemoveEffect(this._name);
stop();
Symbol 508 MovieClip [water_trail] Frame 37
_root.game.RemoveEffect(this._name);
stop();
Symbol 525 MovieClip [p6] Frame 1
stop();
Symbol 525 MovieClip [p6] Frame 2
stop();
Symbol 528 MovieClip [p5] Frame 1
stop();
Symbol 528 MovieClip [p5] Frame 2
stop();
Symbol 530 MovieClip [p4] Frame 1
stop();
Symbol 530 MovieClip [p4] Frame 2
stop();
Symbol 533 MovieClip [p3] Frame 1
stop();
Symbol 533 MovieClip [p3] Frame 2
stop();
Symbol 536 MovieClip [p2] Frame 1
stop();
Symbol 536 MovieClip [p2] Frame 2
stop();
Symbol 539 MovieClip [p1] Frame 1
stop();
Symbol 539 MovieClip [p1] Frame 2
stop();
Symbol 542 MovieClip [avatarBTNmore] Frame 1
#initclip 28
Object.registerClass("avatarBTNmore", avatarBTNCharacter);
#endinitclip
stop();
Symbol 545 MovieClip [avatarBTNcredits] Frame 1
#initclip 29
Object.registerClass("avatarBTNcredits", avatarBTNCharacter);
#endinitclip
stop();
Symbol 548 MovieClip [avatarBTNsettings] Frame 1
#initclip 30
Object.registerClass("avatarBTNsettings", avatarBTNCharacter);
#endinitclip
stop();
Symbol 551 MovieClip [avatarBTNplay] Frame 1
#initclip 31
Object.registerClass("avatarBTNplay", avatarBTNCharacter);
#endinitclip
stop();
Symbol 553 MovieClip [background guy] Frame 1
#initclip 32
Object.registerClass("background guy", BackgroundCharacter);
#endinitclip
Symbol 568 MovieClip Frame 1
stop();
Symbol 568 MovieClip Frame 17
stop();
Symbol 568 MovieClip Frame 33
stop();
Symbol 568 MovieClip Frame 49
stop();
Symbol 568 MovieClip Frame 65
stop();
Symbol 568 MovieClip Frame 81
stop();
Symbol 568 MovieClip Frame 98
stop();
Symbol 568 MovieClip Frame 115
stop();
Symbol 573 MovieClip Frame 41
stop();
_root.MoveBtnsOnScreen();
Symbol 575 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 2
stop();
Symbol 579 Button
on (release) {
_root.gotoAndPlay("soundBuffer");
}
Symbol 580 MovieClip Frame 1
stop();
Symbol 580 MovieClip Frame 2
stop();
Symbol 582 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 2
stop();
Symbol 585 MovieClip Frame 20
stop();
Symbol 585 MovieClip Frame 30
if (_global.poopFlag == false) {
_global.poopFlag = true;
_root.gotoAndPlay("game");
}
_root.border2.gotoAndStop("blank");
Symbol 586 MovieClip Frame 1
stop();
Symbol 586 MovieClip Frame 2
stop();
Symbol 849 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 850 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 851 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 852 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends MovieClip
{
var blnDead, gunFlagOne, gunFlagTwo, guns, arrEvents, arrSeekers, arrActionEffects, haltMovie, safetyTurn, blnDoNothing, blnSplitLock, _blnAlly, blnIsStunned, numSpeed, scanRadius, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, setToFrame2, enemyOff, countMachineGun, mGunCount, intBrainCounter, strCurrentAction, blnTarget, intVirusCounter2, infected, intChanceToSplit, intMinSizeToSplit, maxLife, numLife, gotoAndPlay, strStunnedEffect, strHighlightEffect, blnIsHighlight, _linkID, curTarget, vecCurEscape, _xscale, _name, numLastAngle, _rotation, _x, _y, _yscale, removeMovieClip, gotoAndStop, customFunction1, _width;
function Enemy () {
super();
blnDead = false;
gunFlagOne = true;
gunFlagTwo = true;
guns = new Array();
arrEvents = new Array();
arrSeekers = new Array();
arrActionEffects = new Array();
haltMovie = false;
safetyTurn = false;
blnDoNothing = false;
blnSplitLock = false;
_blnAlly = false;
blnIsStunned = false;
numSpeed = 0.25;
scanRadius = 200;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
setToFrame2 = false;
enemyOff = false;
countMachineGun = 0;
mGunCount = 0;
intBrainCounter = 10;
strCurrentAction = "wander";
blnTarget = false;
intVirusCounter2 = 40;
infected = false;
intChanceToSplit = 5;
intMinSizeToSplit = 180;
ConfigureEnemy();
maxLife = numLife;
gotoAndPlay(numLife);
strStunnedEffect = "";
strHighlightEffect = "";
blnIsHighlight = false;
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 2;
_linkID = "";
}
function onEnterFrame() {
if ((!enemyOff) && (blnIsStunned == false)) {
VirusDamage();
if ((blnDoNothing == false) && (blnSplitLock == false)) {
if (intBrainCounter > 0) {
intBrainCounter--;
} else {
var _local20 = false;
var _local11 = false;
var _local10 = false;
var _local9 = false;
var _local21 = true;
var _local5;
var _local22;
var _local3 = _root.game.ScanDistanceUnits(this, scanRadius);
var _local4 = _root.game.ScanPowerups(this, scanRadius);
var _local7 = 0;
while (_local7 < _local3.length) {
if (_local3[_local7].suggResponse == "flee") {
_local11 = true;
break;
}
_local7++;
}
if (_local11 == true) {
_local5 = ConstructEscapeVector(_local3);
var _local13;
var _local8 = 999999 /* 0x0F423F */;
var _local6 = new Vector();
_local7 = 0;
while (_local7 < _local4.length) {
_local6._x = (_local4[_local7].distX / Math.abs(_local4[_local7].distX)) * (_local5._x / Math.abs(_local5._x));
_local6._y = (_local4[_local7].distY / Math.abs(_local4[_local7].distY)) * (_local5._y / Math.abs(_local5._y));
if ((_local6._x > 0) && (_local6._y > 0)) {
if (_local4[_local7].distance < _local8) {
_local13 = _local4[_local7].name;
_local8 = _local4[_local7].distance;
_local9 = true;
}
}
_local7++;
}
if (_local9 == true) {
blnTarget = true;
strCurrentAction = "particle";
curTarget = _root[_local13];
} else {
var _local12;
_local8 = 999999 /* 0x0F423F */;
_local6 = new Vector();
_local7 = 0;
while (_local7 < _local3.length) {
if (_local3[_local7].suggResponse == "fight") {
_local6._x = (_local3[_local7].distX / Math.abs(_local3[_local7].distX)) * (_local5._x / Math.abs(_local5._x));
_local6._y = (_local3[_local7].distY / Math.abs(_local3[_local7].distY)) * (_local5._y / Math.abs(_local5._y));
if ((_local6._x > 0) && (_local6._y > 0)) {
if (_local3[_local7].distance < _local8) {
_local12 = _local3[_local7].name;
_local8 = _local3[_local7].distance;
_local10 = true;
}
}
}
_local7++;
}
if (_local10 == true) {
blnTarget = true;
strCurrentAction = "fight";
curTarget = _root[_local12];
} else {
blnTarget = false;
strCurrentAction = "flee";
vecCurEscape = _local5;
}
}
} else {
var _local8 = 999999 /* 0x0F423F */;
_local7 = 0;
while (_local7 < _local3.length) {
if (_local3[_local7].suggResponse == "fight") {
if (_local3[_local7].distance < _local8) {
var _local12 = _local3[_local7].name;
_local8 = _local3[_local7].distance;
_local10 = true;
}
}
_local7++;
}
if (_local10 == true) {
blnTarget = true;
strCurrentAction = "fight";
curTarget = _root[_local12];
} else {
_local8 = 999999 /* 0x0F423F */;
_local7 = 0;
while (_local7 < _local4.length) {
if (_local4[_local7].distance < _local8) {
var _local13 = _local4[_local7].name;
_local8 = _local4[_local7].distance;
_local9 = true;
}
_local7++;
}
if (_local9 == true) {
blnTarget = true;
strCurrentAction = "particle";
curTarget = _root[_local13];
} else {
blnTarget = false;
strCurrentAction = "wander";
var _local18 = intChanceToSplit;
if (infected) {
_local18 = 2;
}
if (_xscale > intMinSizeToSplit) {
if (RandNum(0, 100) < _local18) {
blnSplitLock = true;
_root.game.UnitSplit(_name);
}
}
}
}
}
intBrainCounter = 10;
}
}
if (strCurrentAction == "wander") {
numLastAngle = GetAnglePos();
MoveMe();
var _local17 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local17 == true) && (safetyTurn == false))) {
if (_local17 == true) {
var _local16 = GetAnglePos();
if (_local16 < 0) {
if (_local16 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local16 > 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 _local14 = Math.round(Math.random() * 1000);
if (_local14 < 20) {
_local14 = Math.round(Math.random() * 200) - 100;
numFramesToTurn = Math.round(Math.abs(_local14) / numSpeed);
numAmountToTurn = numSpeed * (_local14 / Math.abs(_local14));
safetyTurn = false;
}
}
} else if (strCurrentAction == "flee") {
var _local19 = 0;
_local19 = vecCurEscape.AngleToAlign(_rotation, numSpeed, 2);
_rotation = _rotation + _local19;
MoveMe();
} else if (strCurrentAction == "fight") {
var _local15 = new Vector();
_local15._x = curTarget._x - _x;
_local15._y = curTarget._y - _y;
var _local19 = 0;
_local19 = _local15.AngleToAlign(_rotation, numSpeed, 2);
_rotation = _rotation + _local19;
MoveMe();
} else if (strCurrentAction == "particle") {
var _local15 = new Vector();
_local15._x = curTarget._x - _x;
_local15._y = curTarget._y - _y;
var _local19 = 0;
_local19 = _local15.AngleToAlign(_rotation, numSpeed, 2);
_rotation = _rotation + _local19;
MoveMe();
}
}
}
function VirusDamage() {
if (infected == true) {
if (intVirusCounter2 <= 0) {
_xscale = _xscale - _root.game.intVirusDamage;
_yscale = _yscale - _root.game.intVirusDamage;
if (_xscale < _root.game.minSizeToSplit) {
_root.game.Effect_UnitDead(_x, _y, true);
blnDead = true;
}
intVirusCounter2 = RandNum(_root.game.intVirusMinWait2, _root.game.intVirusMaxWait2);
} else {
intVirusCounter2--;
}
}
if (blnDead == false) {
} else {
RemoveAllEffects();
if (_blnAlly == false) {
_root.game.RemoveEnemy(this);
} else {
_root.game.RemoveAlly(this);
}
_root.game.CheckLoseConditions();
_root.game.CheckWinConditions();
}
if (blnDead) {
_root.game.VirusCluster(_x, _y);
removeMovieClip();
}
}
function FinishedSplitting() {
blnSplitLock = false;
}
function GetSplitting() {
return(blnSplitLock);
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function ConstructEscapeVector(arrEnemies) {
var _local5 = new Vector();
var _local3 = 0;
while (_local3 < arrEnemies.length) {
if (arrEnemies[_local3].suggResponse == "flee") {
var _local2 = new Vector();
_local2._x = -1 * arrEnemies[_local3].distX;
_local2._y = -1 * arrEnemies[_local3].distY;
var _local7 = scanRadius - _local2.GetLength();
_local2.ConvertToUnitVector();
_local2.Scale(_local7);
_local5.Add(_local2);
}
_local3++;
}
if (_y < scanRadius) {
var _local6 = new Vector();
_local6._x = 0;
_local6._y = _y;
var _local7 = scanRadius - _local6.GetLength();
_local6.ConvertToUnitVector();
_local6.Scale(_local7);
_local5.Add(_local6);
} else if ((550 - _y) < scanRadius) {
var _local6 = new Vector();
_local6._x = 0;
_local6._y = -1 * (550 - _y);
var _local7 = scanRadius - _local6.GetLength();
_local6.ConvertToUnitVector();
_local6.Scale(_local7);
_local5.Add(_local6);
}
if (_x < scanRadius) {
var _local6 = new Vector();
_local6._x = _x;
_local6._y = 0;
var _local7 = scanRadius - _local6.GetLength();
_local6.ConvertToUnitVector();
_local6.Scale(_local7);
_local5.Add(_local6);
} else if ((550 - _x) < scanRadius) {
var _local6 = new Vector();
_local6._x = -1 * (550 - _x);
_local6._y = 0;
var _local7 = scanRadius - _local6.GetLength();
_local6.ConvertToUnitVector();
_local6.Scale(_local7);
_local5.Add(_local6);
}
_local5.ConvertToUnitVector();
_local5.Scale(10);
return(_local5);
}
function getHealth() {
var _local2 = 0;
_local2 = numLife;
return(_local2);
}
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") {
}
}
i++;
}
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 (numLife < 1) {
returnValue = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(returnValue);
}
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 _local4 = false;
var _local5 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local6 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local3 = _local5 - (Stage.width / 2);
var _local2 = _local6 - (Stage.width / 2);
if (Math.sqrt((_local3 * _local3) + (_local2 * _local2)) > (Stage.width / 2)) {
_local4 = true;
}
return(_local4);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
function DoesEffectExist(myID) {
var _local2 = 0;
while (_local2 < arrActionEffects.length) {
if (arrActionEffects[_local2] == myID) {
return(true);
}
_local2++;
}
return(false);
}
function RemoveEffectIfExists(myID) {
var _local2 = 0;
while (_local2 < arrActionEffects.length) {
if (arrActionEffects[_local2] == myID) {
arrActionEffects.splice(_local2, 1);
return(true);
}
_local2++;
}
return(false);
}
function RegisterEffect(myID) {
arrActionEffects.push(myID);
}
function RemoveEffect(myID) {
var _local2 = 0;
while (_local2 < arrActionEffects.length) {
if (arrActionEffects[_local2] == myID) {
arrActionEffects.splice(_local2, 1);
break;
}
_local2++;
}
}
function AdjustSpeed(myDelta) {
numSpeed = numSpeed + myDelta;
}
function AdjustSpeedIfEffect(myDelta, myEffectID) {
if (RemoveEffectIfExists(myEffectID) == true) {
numSpeed = numSpeed + myDelta;
}
}
function AdjustSize(myDelta) {
_xscale = _xscale + myDelta;
_yscale = _xscale;
}
function AdjustSizeIfEffect(myDelta, myEffectID) {
if (RemoveEffectIfExists(myEffectID) == true) {
_xscale = _xscale + myDelta;
_yscale = _xscale;
}
}
function Stun() {
if (blnIsStunned == false) {
strStunnedEffect = _root.game.Effect_Stunned(_x, _y);
_root[strStunnedEffect]._width = _width + 8;
_root[strStunnedEffect]._yscale = _root[strStunnedEffect]._xscale;
}
blnIsStunned = true;
}
function RemoveStunIfEffect(myEffectID) {
if (RemoveEffectIfExists(myEffectID) == true) {
blnIsStunned = false;
}
var _local3 = 0;
while (_local3 < arrActionEffects.length) {
if (_root.game.IsIdStun(arrActionEffects[_local3]) == true) {
blnIsStunned = true;
break;
}
_local3++;
}
if (blnIsStunned == false) {
_root.game.RemoveEffect(strStunnedEffect);
strStunnedEffect = "";
}
}
function HighLight() {
if (_global.gamePaused == false) {
if (blnIsHighlight == false) {
strHighlightEffect = _root.game.Effect_Highlight(_x, _y, _name);
blnIsHighlight = true;
_root[strHighlightEffect]._width = _width + 10;
_root[strHighlightEffect]._yscale = _root[strHighlightEffect]._xscale;
}
}
}
function RemoveHighLight() {
if (blnIsHighlight == true) {
_root.game.RemoveEffect(strHighlightEffect);
strHighlightEffect = "";
blnIsHighlight = false;
}
}
function RemoveAllEffects() {
if (blnIsStunned == true) {
_root.game.RemoveEffect(strStunnedEffect);
strStunnedEffect = "";
}
if (blnIsHighlight == true) {
_root.game.RemoveEffect(strHighlightEffect);
strHighlightEffect = "";
}
}
}
Symbol 853 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;
var _local6 = "";
if (dblGivenAngle >= 0) {
_local5 = dblGivenAngle - 180;
if ((_local2 < dblGivenAngle) && (_local2 > _local5)) {
_local3 = (-dblTurnSpeed) * dblVelocity;
_local6 = _local6 + (((((" AAA " + dblGivenAngle) + " ") + _local2) + " ") + _local3);
if ((_local2 - dblGivenAngle) > _local3) {
_local3 = _local2 - dblGivenAngle;
}
} else {
_local3 = dblTurnSpeed * dblVelocity;
_local6 = _local6 + (((((" BBB " + dblGivenAngle) + " ") + _local2) + " ") + _local3);
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;
_local6 = _local6 + (((((" CCC " + dblGivenAngle) + " ") + _local2) + " ") + _local3);
if ((_local2 - dblGivenAngle) < _local3) {
_local3 = _local2 - dblGivenAngle;
}
} else {
_local3 = (-dblTurnSpeed) * dblVelocity;
_local6 = _local6 + (((((" DDD " + dblGivenAngle) + " ") + _local2) + " ") + _local3);
if (_local2 < 0) {
if ((_local2 - dblGivenAngle) > _local3) {
_local3 = _local2 - dblGivenAngle;
}
}
}
}
if (Math.abs(_local3) > 30) {
} else if (_local2 == 0) {
}
return(_local3);
}
function Print() {
}
}
Symbol 854 MovieClip [__Packages.Enemy_3] Frame 0
class Enemy_3 extends Enemy
{
var numLife, numSpeed, scanRadius, intMinSizeToSplit, _linkID;
function Enemy_3 () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 2.5;
scanRadius = 300;
intMinSizeToSplit = 200;
_linkID = "Enemy_3";
}
}
Symbol 855 MovieClip [__Packages.Enemy_2] Frame 0
class Enemy_2 extends Enemy
{
var numLife, numSpeed, _linkID;
function Enemy_2 () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 2.5;
_linkID = "Enemy_2";
}
}
Symbol 856 MovieClip [__Packages.Enemy_1] Frame 0
class Enemy_1 extends Enemy
{
var numLife, numSpeed, intMinSizeToSplit, _linkID;
function Enemy_1 () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 3.1;
intMinSizeToSplit = 140;
_linkID = "Enemy_1";
}
}
Symbol 857 MovieClip [__Packages.Ally] Frame 0
class Ally extends Enemy
{
var numLife, numSpeed, _blnAlly, infected;
function Ally () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 2.5;
_blnAlly = true;
infected = false;
}
}
Symbol 858 MovieClip [__Packages.Virus] Frame 0
class Virus extends Enemy
{
var numLife, numSpeed, _linkID, blnDoNothing;
function Virus () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 0.625;
_linkID = "Virus";
blnDoNothing = true;
}
}
Symbol 859 MovieClip [__Packages.Powerup] Frame 0
class Powerup extends MovieClip
{
var intCounter;
function Powerup () {
super();
intCounter = 60;
}
function onEnterFrame() {
if (intCounter > 0) {
intCounter--;
}
}
function CheckScanable() {
if (intCounter == 0) {
return(true);
}
return(false);
}
}
Symbol 860 MovieClip [__Packages.avatarBTNCharacter] Frame 0
class avatarBTNCharacter extends MovieClip
{
var gunFlagOne, gunFlagTwo, guns, arrEvents, arrSeekers, haltMovie, safetyTurn, blnDoNothing, _blnAlly, numSpeed, scanRadius, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, setToFrame2, enemyOff, countMachineGun, mGunCount, intBrainCounter, strCurrentAction, blnTarget, maxLife, numLife, gotoAndPlay, curTarget, vecCurEscape, numLastAngle, _rotation, _x, _y, gotoAndStop, customFunction1, _name, removeMovieClip, _width;
function avatarBTNCharacter () {
super();
gunFlagOne = true;
gunFlagTwo = true;
guns = new Array();
arrEvents = new Array();
arrSeekers = new Array();
haltMovie = false;
safetyTurn = false;
blnDoNothing = false;
_blnAlly = false;
numSpeed = 0.25;
scanRadius = 200;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
setToFrame2 = false;
enemyOff = false;
countMachineGun = 0;
mGunCount = 0;
intBrainCounter = 10;
strCurrentAction = "wander";
blnTarget = false;
ConfigureEnemy();
maxLife = numLife;
gotoAndPlay(numLife);
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 0.25;
}
function onEnterFrame() {
if (!enemyOff) {
if (blnDoNothing == false) {
if (intBrainCounter > 0) {
intBrainCounter--;
} else {
var _local11 = false;
var _local10 = false;
var _local9 = false;
var _local19 = true;
var _local5;
var _local20;
var _local3 = _root.game.ScanDistanceUnits(this, scanRadius);
var _local4 = _root.game.ScanPowerups(this, scanRadius);
var _local7 = 0;
while (_local7 < _local3.length) {
if (_local3[_local7].suggResponse == "flee") {
_local11 = true;
break;
}
_local7++;
}
if (_local11 == true) {
_local5 = ConstructEscapeVector(_local3);
var _local13;
var _local8 = 999999 /* 0x0F423F */;
var _local6 = new Vector();
_local7 = 0;
while (_local7 < _local4.length) {
_local6._x = (_local4[_local7].distX / Math.abs(_local4[_local7].distX)) * (_local5._x / Math.abs(_local5._x));
_local6._y = (_local4[_local7].distY / Math.abs(_local4[_local7].distY)) * (_local5._y / Math.abs(_local5._y));
if ((_local6._x > 0) && (_local6._y > 0)) {
if (_local4[_local7].distance < _local8) {
_local13 = _local4[_local7].name;
_local8 = _local4[_local7].distance;
_local9 = true;
}
}
_local7++;
}
if (_local9 == true) {
blnTarget = true;
strCurrentAction = "particle";
curTarget = _root[_local13];
} else {
var _local12;
_local8 = 999999 /* 0x0F423F */;
_local6 = new Vector();
_local7 = 0;
while (_local7 < _local3.length) {
if (_local3[_local7].suggResponse == "fight") {
_local6._x = (_local3[_local7].distX / Math.abs(_local3[_local7].distX)) * (_local5._x / Math.abs(_local5._x));
_local6._y = (_local3[_local7].distY / Math.abs(_local3[_local7].distY)) * (_local5._y / Math.abs(_local5._y));
if ((_local6._x > 0) && (_local6._y > 0)) {
if (_local3[_local7].distance < _local8) {
_local12 = _local3[_local7].name;
_local8 = _local3[_local7].distance;
_local10 = true;
}
}
}
_local7++;
}
if (_local10 == true) {
blnTarget = true;
strCurrentAction = "fight";
curTarget = _root[_local12];
} else {
blnTarget = false;
strCurrentAction = "flee";
vecCurEscape = _local5;
}
}
} else {
var _local8 = 999999 /* 0x0F423F */;
_local7 = 0;
while (_local7 < _local3.length) {
if (_local3[_local7].suggResponse == "fight") {
if (_local3[_local7].distance < _local8) {
var _local12 = _local3[_local7].name;
_local8 = _local3[_local7].distance;
_local10 = true;
}
}
_local7++;
}
if (_local10 == true) {
blnTarget = true;
strCurrentAction = "fight";
curTarget = _root[_local12];
} else {
_local8 = 999999 /* 0x0F423F */;
_local7 = 0;
while (_local7 < _local4.length) {
if (_local4[_local7].distance < _local8) {
var _local13 = _local4[_local7].name;
_local8 = _local4[_local7].distance;
_local9 = true;
}
_local7++;
}
if (_local9 == true) {
blnTarget = true;
strCurrentAction = "particle";
curTarget = _root[_local13];
} else {
blnTarget = false;
strCurrentAction = "wander";
}
}
}
intBrainCounter = 10;
}
}
if (strCurrentAction == "wander") {
numLastAngle = GetAnglePos();
MoveMe();
var _local17 = AboutToExit();
if ((numFramesToTurn == 0) || ((_local17 == true) && (safetyTurn == false))) {
if (_local17 == true) {
var _local16 = GetAnglePos();
if (_local16 < 0) {
if (_local16 < numLastAngle) {
numAmountToTurn = Math.round(Math.random() * -90) - 90;
} else {
numAmountToTurn = Math.round(Math.random() * 90) + 90;
}
} else if (_local16 > 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 _local14 = Math.round(Math.random() * 1000);
if (_local14 < 20) {
_local14 = Math.round(Math.random() * 200) - 100;
numFramesToTurn = Math.round(Math.abs(_local14) / numSpeed);
numAmountToTurn = numSpeed * (_local14 / Math.abs(_local14));
safetyTurn = false;
}
}
} else if (strCurrentAction == "flee") {
var _local18 = 0;
_local18 = vecCurEscape.AngleToAlign(_rotation, numSpeed, 2);
_rotation = _rotation + _local18;
MoveMe();
} else if (strCurrentAction == "fight") {
var _local15 = new Vector();
_local15._x = curTarget._x - _x;
_local15._y = curTarget._y - _y;
var _local18 = 0;
_local18 = _local15.AngleToAlign(_rotation, numSpeed, 2);
_rotation = _rotation + _local18;
MoveMe();
} else if (strCurrentAction == "particle") {
var _local15 = new Vector();
_local15._x = curTarget._x - _x;
_local15._y = curTarget._y - _y;
var _local18 = 0;
_local18 = _local15.AngleToAlign(_rotation, numSpeed, 2);
_rotation = _rotation + _local18;
MoveMe();
}
}
}
function ConstructEscapeVector(arrEnemies) {
var _local5 = new Vector();
var _local3 = 0;
while (_local3 < arrEnemies.length) {
if (arrEnemies[_local3].suggResponse == "flee") {
var _local2 = new Vector();
_local2._x = -1 * arrEnemies[_local3].distX;
_local2._y = -1 * arrEnemies[_local3].distY;
var _local7 = scanRadius - _local2.GetLength();
_local2.ConvertToUnitVector();
_local2.Scale(_local7);
_local5.Add(_local2);
}
_local3++;
}
if (_y < scanRadius) {
var _local6 = new Vector();
_local6._x = 0;
_local6._y = _y;
var _local7 = scanRadius - _local6.GetLength();
_local6.ConvertToUnitVector();
_local6.Scale(_local7);
_local5.Add(_local6);
} else if ((550 - _y) < scanRadius) {
var _local6 = new Vector();
_local6._x = 0;
_local6._y = -1 * (550 - _y);
var _local7 = scanRadius - _local6.GetLength();
_local6.ConvertToUnitVector();
_local6.Scale(_local7);
_local5.Add(_local6);
}
if (_x < scanRadius) {
var _local6 = new Vector();
_local6._x = _x;
_local6._y = 0;
var _local7 = scanRadius - _local6.GetLength();
_local6.ConvertToUnitVector();
_local6.Scale(_local7);
_local5.Add(_local6);
} else if ((550 - _x) < scanRadius) {
var _local6 = new Vector();
_local6._x = -1 * (550 - _x);
_local6._y = 0;
var _local7 = scanRadius - _local6.GetLength();
_local6.ConvertToUnitVector();
_local6.Scale(_local7);
_local5.Add(_local6);
}
_local5.ConvertToUnitVector();
_local5.Scale(10);
return(_local5);
}
function getHealth() {
var _local2 = 0;
_local2 = numLife;
return(_local2);
}
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") {
}
}
i++;
}
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 (numLife < 1) {
returnValue = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(returnValue);
}
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 _local4 = false;
var _local5 = (Math.cos((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _x;
var _local6 = (Math.sin((Math.PI * _rotation) / 180) * (_width + (30 * numSpeed))) + _y;
var _local3 = _local5 - (Stage.width / 2);
var _local2 = _local6 - (Stage.width / 2);
if (Math.sqrt((_local3 * _local3) + (_local2 * _local2)) > (Stage.width / 2)) {
_local4 = true;
}
return(_local4);
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
}
Symbol 861 MovieClip [__Packages.BackgroundCharacter] Frame 0
class BackgroundCharacter extends Enemy
{
var numLife, numSpeed, blnDoNothing;
function BackgroundCharacter () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 0.25;
blnDoNothing = true;
}
}
Symbol 862 MovieClip [__Packages.Enemy_4] Frame 0
class Enemy_4 extends Enemy
{
var numLife, numSpeed, scanRadius, intMinSizeToSplit, _linkID;
function Enemy_4 () {
super();
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 2.75;
scanRadius = 300;
intMinSizeToSplit = 190;
_linkID = "Enemy_4";
}
}
Symbol 863 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 864 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 865 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 866 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 867 MovieClip [__Packages.MicrobeKombatGame] Frame 0
class MicrobeKombatGame
{
var arrBullets, arrEnemies, arrAllies, arrEffects, arrPowerUps, arrIcons, arrTimebars, arrActions, arrViruses, intBulletDepth, intUnitDepth, effectDepth, effectUnderDepth, powerUpDepth, iconDepth, downFlag, actionID, intAllySelectMode, powerUpSpawnMin, powerUpSpawnMax, powerUpSpawnCounter, powerUpLimit, iconLimit, sizeToEat, minSizeToSplit, intWaterTrail, avatarSpeed, maxAvatarSpeed, intVirusMinTillStart, intVirusMinWait, intVirusMinWait2, intVirusMaxWait, intVirusMaxOnScreen, intVirusMaxOnLevel, intVirusDamage, intVirusCounter, intVirusSoFar, intKeyLock, blnTutorialFlag, BoolVirusesPresent, avatarInfected, avatarSplitting, blnAlphaChange, gameLevelManager, saveDepthID, intSavePauseDepth, intVirusMaxWait2, avatarAngleChange, dblGravity, strSelectModeIcon;
function MicrobeKombatGame () {
SetupClass();
}
function SetupClass() {
arrBullets = new Array();
arrEnemies = new Array();
arrAllies = new Array();
arrEffects = new Array();
arrPowerUps = new Array();
arrIcons = new Array();
arrTimebars = new Array();
arrActions = new Array();
arrViruses = new Array();
intBulletDepth = 10000;
intUnitDepth = 5001;
effectDepth = 30000;
effectUnderDepth = 3000;
powerUpDepth = 2000;
iconDepth = 70000 /* 0x011170 */;
downFlag = false;
actionID = 0;
intAllySelectMode = 0;
powerUpSpawnMin = 100;
powerUpSpawnMax = 200;
powerUpSpawnCounter = 0;
powerUpLimit = 5;
iconLimit = 6;
sizeToEat = 1.8;
minSizeToSplit = 120;
intWaterTrail = 0;
avatarSpeed = 0;
maxAvatarSpeed = 3.75;
intVirusMinTillStart = 0;
intVirusMinWait = 0;
intVirusMinWait2 = 0;
intVirusMaxWait = 0;
intVirusMaxWait = 0;
intVirusMaxOnScreen = 0;
intVirusMaxOnLevel = 0;
intVirusDamage = 0;
intVirusCounter = -1;
intVirusSoFar = 0;
intKeyLock = 0;
blnTutorialFlag = false;
BoolVirusesPresent = false;
avatarInfected = false;
avatarSplitting = false;
blnAlphaChange = false;
gameLevelManager = new LevelManager();
saveDepthID = _root.bg_2.getDepth();
}
function Load() {
_root.pause_mc._visible = false;
intSavePauseDepth = _root.pause_mc.getDepth();
_root.pause_mc.swapDepths(90010);
gameLevelManager.SetupLevel(_global.whichLevel);
}
function ExitGame() {
ClearScreen();
_root.pause_mc.swapDepths(intSavePauseDepth);
_global.gamePaused = false;
_global.poopFlag = false;
_root.ExitLevel();
}
function InvestigateBG() {
if (((_root.bg_2._name != "bg_2") || (_root.bg_2._alpha < 30)) || (_root.bg_2._visible == false)) {
var _local4 = 1;
while (_local4 < 12) {
var _local3 = "bg_" + _local4;
_local4++;
}
PauseGame();
}
}
function Run() {
if (_global.gamePaused == false) {
ChangeBackgroundAlphas();
MoveAvatar();
RunAvatarFunctions();
DetectPowerUpCollision();
SpawnPowerUps();
SpawnViruses();
CheckBulletCollision();
AnimateIcons();
AnimateTimebars();
CheckEatingCollision();
DetectVirusCollision();
}
if (_global.tutorialMove == true) {
MoveAvatar();
TutorialPowerUpDetect();
}
AnimateEffects();
CheckKeyPress();
}
function RunAvatarFunctions() {
_root[GetAvatarName()].VirusDamage();
}
function LoseGame() {
RemoveHoverText();
var _local4 = 0;
while (_local4 < arrTimebars.length) {
_root[arrTimebars[_local4].name].removeMovieClip();
_local4++;
}
delete arrTimebars;
_local4 = 0;
while (_local4 < arrIcons.length) {
_root[arrIcons[_local4].name].removeMovieClip();
_local4++;
}
delete arrIcons;
_local4 = 0;
while (_local4 < arrPowerUps.length) {
_root[arrPowerUps[_local4]].removeMovieClip();
_local4++;
}
delete arrPowerUps;
PauseGame();
_root.border2.gotoAndStop("in");
_root.pause_mc._visible = true;
_root.pause_mc.gotoAndPlay("lose");
_global.gamePaused = true;
blnTutorialFlag = true;
}
function WinLevel() {
RemoveHoverText();
SaveGame(_global.whichLevel);
var _local4 = 0;
while (_local4 < arrTimebars.length) {
_root[arrTimebars[_local4].name].removeMovieClip();
_local4++;
}
delete arrTimebars;
_local4 = 0;
while (_local4 < arrIcons.length) {
_root[arrIcons[_local4].name].removeMovieClip();
_local4++;
}
delete arrIcons;
_local4 = 0;
while (_local4 < arrPowerUps.length) {
_root[arrPowerUps[_local4]].removeMovieClip();
_local4++;
}
delete arrPowerUps;
PauseGame();
_root.border2.gotoAndStop("in");
_root.pause_mc._visible = true;
if (_global.whichLevel == 12) {
_root.pause_mc.gotoAndPlay("winwin");
} else {
_root.pause_mc.gotoAndPlay("win");
}
_global.gamePaused = true;
blnTutorialFlag = true;
}
function SaveGame(intLevelCompleted) {
var _local2 = SharedObject.getLocal("settings");
switch (intLevelCompleted) {
case 1 :
_global.dataValue3.Set(6798794);
_global.dataValue4.Set(1387067);
_local2.data.dataValue3 = _global.dataValue3.Store();
_local2.data.dataValue4 = _global.dataValue4.Store();
break;
case 2 :
_global.dataValue4.Set(5498133);
_global.dataValue5.Set(7568134);
_local2.data.dataValue4 = _global.dataValue4.Store();
_local2.data.dataValue5 = _global.dataValue5.Store();
break;
case 3 :
_global.dataValue5.Set(9994354);
_global.dataValue6.Set(2822679);
_local2.data.dataValue5 = _global.dataValue5.Store();
_local2.data.dataValue6 = _global.dataValue6.Store();
break;
case 4 :
_global.dataValue6.Set(1000548);
_global.dataValue7.Set(9423511);
_local2.data.dataValue6 = _global.dataValue6.Store();
_local2.data.dataValue7 = _global.dataValue7.Store();
break;
case 5 :
_global.dataValue7.Set(9435575);
_global.dataValue8.Set(1351927);
_local2.data.dataValue7 = _global.dataValue7.Store();
_local2.data.dataValue8 = _global.dataValue8.Store();
break;
case 6 :
_global.dataValue8.Set(4544823);
_global.dataValue9.Set(4855755);
_local2.data.dataValue8 = _global.dataValue8.Store();
_local2.data.dataValue9 = _global.dataValue9.Store();
break;
case 7 :
_global.dataValue9.Set(9743425);
_global.dataValue10.Set(1155477);
_local2.data.dataValue9 = _global.dataValue9.Store();
_local2.data.dataValue10 = _global.dataValue10.Store();
break;
case 8 :
_global.dataValue10.Set(5171701);
_global.dataValue11.Set(4291701);
_local2.data.dataValue10 = _global.dataValue10.Store();
_local2.data.dataValue11 = _global.dataValue11.Store();
break;
case 9 :
_global.dataValue11.Set(8006554);
_global.dataValue12.Set(8115642);
_local2.data.dataValue11 = _global.dataValue11.Store();
_local2.data.dataValue12 = _global.dataValue12.Store();
break;
case 10 :
_global.dataValue12.Set(2243486);
_global.dataValue13.Set(2684167);
_local2.data.dataValue12 = _global.dataValue12.Store();
_local2.data.dataValue13 = _global.dataValue13.Store();
break;
case 11 :
_global.dataValue13.Set(2298746);
_global.dataValue14.Set(9952657);
_local2.data.dataValue13 = _global.dataValue13.Store();
_local2.data.dataValue14 = _global.dataValue14.Store();
break;
case 12 :
_global.dataValue14.Set(2344987);
_local2.data.dataValue14 = _global.dataValue14.Store();
}
_local2.flush();
}
function ResetGame() {
ClearScreen();
SetupClass();
gameLevelManager.SetupLevel(_global.whichLevel);
SelectNewAvatar();
_global.gamePaused = false;
if (_global.whichLevel == 1) {
_root.GameStartAfterTut();
}
}
function NextLevel() {
ClearScreen();
if (_global.whichLevel != 12) {
_global.whichLevel++;
}
SetupClass();
gameLevelManager.SetupLevel(_global.whichLevel);
SelectNewAvatar();
_global.gamePaused = false;
if (_global.whichLevel == 4) {
_root.bg.gotoAndPlay("nextRed");
_root.levelColor = 2;
} else if (_global.whichLevel == 7) {
_root.bg.gotoAndPlay("nextBlue");
_root.levelColor = 3;
} else if (_global.whichLevel == 10) {
_root.bg.gotoAndPlay("nextYellow");
_root.levelColor = 4;
}
}
function ClearScreen() {
ResetBackgroundAlphas();
RemoveHoverText();
var _local3 = 0;
while (_local3 < arrAllies.length) {
_root[arrAllies[_local3].name].RemoveAllEffects();
_root[arrAllies[_local3].name].removeMovieClip();
_local3++;
}
_local3 = 0;
while (_local3 < arrEnemies.length) {
_root[arrEnemies[_local3]].RemoveAllEffects();
_root[arrEnemies[_local3]].removeMovieClip();
_local3++;
}
var _local4 = 0;
while (_local4 < arrViruses.length) {
_root[arrViruses[_local4]].removeMovieClip();
_local4++;
}
_local4 = 0;
while (_local4 < arrIcons.length) {
_root[arrIcons[_local4].name].removeMovieClip();
_local4++;
}
_local4 = 0;
while (_local4 < arrTimebars.length) {
_root[arrTimebars[_local4].name].removeMovieClip();
_local4++;
}
_local4 = 0;
while (_local4 < arrPowerUps.length) {
_root[arrPowerUps[_local4]].removeMovieClip();
_local4++;
}
_local4 = 0;
while (_local4 < arrEffects.length) {
_root[arrEffects[_local4].name].removeMovieClip();
_local4++;
}
delete arrBullets;
delete arrEnemies;
delete arrAllies;
delete arrEffects;
delete arrPowerUps;
delete arrIcons;
delete arrTimebars;
delete arrActions;
delete arrViruses;
delete gameLevelManager;
_root.pause_mc._visible = false;
}
function CheckKeyPress() {
if (intKeyLock == 0) {
var _local3 = -1;
if (Key.isDown(_global.pauseHotkey)) {
if (blnTutorialFlag == false) {
if (_global.gamePaused == true) {
ClosePauseScreen();
intKeyLock = 20;
} else {
PauseGame();
intKeyLock = 20;
}
}
}
KeyBoardIconUse();
} else {
intKeyLock--;
}
}
function CheckWinConditions() {
if (arrEnemies.length == 0) {
WinLevel();
}
}
function CheckLoseConditions() {
if (arrAllies.length == 0) {
_root.border2.gotoAndStop("in");
_root.pause_mc.gotoAndPlay("lose");
}
}
function ChangeBackgroundAlphas() {
if (blnAlphaChange == false) {
var _local4 = 1;
while (_local4 < 12) {
var _local3 = "bg_" + _local4;
_root[_local3]._alpha = _root[_local3]._alpha + 1;
if (_root[_local3]._alpha >= 55) {
blnAlphaChange = true;
}
_local4++;
}
}
}
function ResetBackgroundAlphas() {
var _local2 = 1;
while (_local2 < 12) {
var _local3 = "bg_" + _local2;
_root[_local3]._alpha = 30;
_local2++;
}
}
function SetVirusDetails(myMin, myMax, myMinTillStart, myMaxOnScreen, myMaxOnLevel) {
intVirusMinTillStart = myMinTillStart;
intVirusMinWait = myMin;
intVirusMaxWait = myMax;
intVirusMaxOnScreen = myMaxOnScreen;
intVirusMaxOnLevel = myMaxOnLevel;
if (myMaxOnLevel > 0) {
intVirusCounter = myMinTillStart;
} else {
intVirusCounter = -1;
}
}
function SetVirusDeduction(myMin, myMax, virusesPresent, myDamage) {
intVirusMinWait2 = myMin;
intVirusMaxWait2 = myMax;
intVirusDamage = myDamage;
BoolVirusesPresent = virusesPresent;
}
function SpawnViruses() {
if (intVirusCounter > -1) {
if (intVirusCounter == 0) {
CreateVirus();
intVirusSoFar++;
if (intVirusSoFar >= intVirusMaxOnLevel) {
intVirusCounter = -1;
}
if (arrViruses.length >= intVirusMaxOnScreen) {
intVirusCounter = -1;
} else {
intVirusCounter = RandNum(intVirusMinWait, intVirusMaxWait);
}
} else {
intVirusCounter--;
}
}
}
function CreateVirus() {
var _local3 = "virus_" + powerUpDepth;
var _local4 = RandNum(1, 4);
var _local5 = RandNum(1, 2);
_root.attachMovie("Virus", _local3, powerUpDepth);
if (_local5 == 1) {
if (_local4 == 1) {
_root[_local3]._x = -10;
_root[_local3]._y = RandNum(0, 550);
} else if (_local4 == 2) {
_root[_local3]._x = 560;
_root[_local3]._y = RandNum(0, 550);
} else if (_local4 == 3) {
_root[_local3]._x = RandNum(0, 550);
_root[_local3]._y = -10;
} else if (_local4 == 4) {
_root[_local3]._x = RandNum(0, 550);
_root[_local3]._y = -10;
}
} else if (_local4 == 4) {
_root[_local3]._x = -10;
_root[_local3]._y = RandNum(0, 550);
} else if (_local4 == 2) {
_root[_local3]._x = 560;
_root[_local3]._y = RandNum(0, 550);
} else if (_local4 == 1) {
_root[_local3]._x = RandNum(0, 550);
_root[_local3]._y = -10;
} else if (_local4 == 3) {
_root[_local3]._x = RandNum(0, 550);
_root[_local3]._y = -10;
}
powerUpDepth++;
if (powerUpDepth > 2500) {
powerUpDepth = 2000;
}
arrViruses.push(_local3);
}
function VirusCluster(xVal, yVal) {
_global.SoundManager.PlaySound("infected_burst");
var _local5 = 0;
while (_local5 < 2) {
var _local4 = "virus_" + powerUpDepth;
_root.attachMovie("Virus", _local4, powerUpDepth);
if (_local5 == 0) {
_root[_local4]._x = xVal;
_root[_local4]._y = yVal - 10;
} else if (_local5 == 1) {
_root[_local4]._x = xVal;
_root[_local4]._y = yVal + 10;
} else if (_local5 == 2) {
_root[_local4]._x = xVal - 10;
_root[_local4]._y = yVal;
} else if (_local5 == 3) {
_root[_local4]._x = xVal + 10;
_root[_local4]._y = yVal;
}
powerUpDepth++;
if (powerUpDepth > 2500) {
powerUpDepth = 2000;
}
arrViruses.push(_local4);
if (_global.gamePaused == true) {
_root[_local4].TurnOff();
}
_local5++;
}
}
function DetectVirusCollision() {
var _local3 = 0;
while (_local3 < arrViruses.length) {
var _local4 = 0;
while (_local4 < arrEnemies.length) {
if ((_root[arrEnemies[_local4]].infected == false) && (_root[arrEnemies[_local4]]._linkID != "Enemy_4")) {
if (_root[arrEnemies[_local4]].hitTest(_root[arrViruses[_local3]]._x, _root[arrViruses[_local3]]._y, true)) {
_root[arrEnemies[_local4]].infected = true;
_root[arrEnemies[_local4]].gotoAndStop("infected");
_root[arrViruses[_local3]].removeMovieClip();
arrViruses.splice(_local3, 1);
_local3--;
}
}
_local4++;
}
_local4 = 0;
while (_local4 < arrAllies.length) {
if (_root[arrAllies[_local4].name].infected == false) {
if (_root[arrAllies[_local4].name].hitTest(_root[arrViruses[_local3]]._x, _root[arrViruses[_local3]]._y, true)) {
_root[arrViruses[_local3]].removeMovieClip();
arrViruses.splice(_local3, 1);
_local3--;
if (arrAllies[_local4].name == GetAvatarName()) {
avatarInfected = true;
InfectIcons();
}
_root[arrAllies[_local4].name].infected = true;
_root[arrAllies[_local4].name].gotoAndStop("infected");
}
}
_local4++;
}
_local3++;
}
}
function CheckEnemyAllyCollision() {
var _local4 = 0;
while (_local4 < arrEnemies.length) {
var _local3 = 0;
while (_local3 < arrAllies.length) {
if (_root[arrEnemies[_local4]].hitTest(_root[arrAllies[_local3].name]._x, _root[arrAllies[_local3].name]._y, true) == true) {
if (_root[arrEnemies[_local4]].infected && (_root[arrAllies[_local3].name].infected == false)) {
if (arrAllies[_local3].name == GetAvatarName()) {
avatarInfected = true;
InfectIcons();
}
_root[arrAllies[_local3].name].infected = true;
_root[arrAllies[_local3].name].gotoAndStop("infected");
break;
}
if (_root[arrAllies[_local4].name].infected && (_root[arrEnemies[_local3]].infected == false)) {
_root[arrEnemies[_local3]].infected = true;
_root[arrEnemies[_local3]].gotoAndStop("infected");
}
}
_local3++;
}
_local4++;
}
}
function MoveAvatar() {
var _local5;
var _local4 = 0;
while (_local4 < arrAllies.length) {
if (arrAllies[_local4].unitSelected == true) {
_local5 = _root[arrAllies[_local4].name];
break;
}
_local4++;
}
if (_global.movementMode == 1) {
avatarAngleChange = 0;
if (Key.isDown(_global.rightward)) {
if (avatarSpeed < 2) {
avatarAngleChange = 2;
} else {
avatarAngleChange = 2 * avatarSpeed;
}
}
if (Key.isDown(_global.leftward)) {
if (avatarSpeed < 2) {
avatarAngleChange = -2;
} else {
avatarAngleChange = -2 * avatarSpeed;
}
}
if (Key.isDown(_global.up)) {
avatarSpeed = avatarSpeed + 0.25;
if (avatarSpeed > maxAvatarSpeed) {
avatarSpeed = maxAvatarSpeed;
}
} else if (Key.isDown(_global.down)) {
avatarSpeed = avatarSpeed - 0.25;
if (avatarSpeed < 0) {
avatarSpeed = 0;
}
} else if ((avatarSpeed <= 0.25) && (avatarSpeed >= -0.25)) {
avatarSpeed = 0;
} else if (avatarSpeed < 0) {
avatarSpeed = avatarSpeed + 0.1;
} else if (avatarSpeed > 0) {
avatarSpeed = avatarSpeed - 0.1;
}
} else {
var _local7 = _xmouse;
var _local8 = _ymouse;
if (_local7 < 0) {
_local7 = 0;
}
if (_local7 > 550) {
_local7 = 550;
}
if (_local8 < 0) {
_local8 = 0;
}
if (_local8 > 550) {
_local8 = 550;
}
var _local6 = new Vector();
_local6._x = _local7 - _local5._x;
_local6._y = _local8 - _local5._y;
avatarAngleChange = _local6.AngleToAlign(_local5._rotation, avatarSpeed, 2);
var _local10 = Math.sqrt((_local6._x * _local6._x) + (_local6._y * _local6._y));
if (_local10 < 15) {
avatarSpeed = avatarSpeed - 0.25;
if (avatarSpeed < 0) {
avatarSpeed = 0;
}
} else {
avatarSpeed = avatarSpeed + 0.25;
if (avatarSpeed > maxAvatarSpeed) {
avatarSpeed = maxAvatarSpeed;
}
}
}
_local5._rotation = _local5._rotation + avatarAngleChange;
var _local9 = new Vector();
_local9._x = (Math.cos((Math.PI * _local5._rotation) / 180) * avatarSpeed) + _local5._x;
_local9._y = (Math.sin((Math.PI * _local5._rotation) / 180) * avatarSpeed) + _local5._y;
_local5._x = _local9._x;
_local5._y = _local9._y;
if (avatarSpeed >= 1) {
if (intWaterTrail == 0) {
WaterTrail(_local5._x, _local5._y, _local5._xscale);
if (_local5._xscale < 140) {
intWaterTrail = 1;
} else {
intWaterTrail = 2;
}
} else {
intWaterTrail--;
}
}
}
function CheckEatingCollision() {
var _local9 = new Array();
var _local3 = 0;
while (_local3 < arrAllies.length) {
var _local4 = 0;
while (_local4 < arrEnemies.length) {
var _local7 = false;
if (arrAllies[_local3].unitSelected == true) {
if (DoesSpikeExist() == true) {
var _local6 = _root[arrAllies[_local3].name];
var _local5 = new Object({x:_local6.inside.emitter._x, y:_local6.inside.emitter._y});
_local6.inside.localToGlobal(_local5);
if (_root[arrEnemies[_local4]].hitTest(_local5.x, _local5.y, true) == true) {
Effect_UnitDead(_root[arrEnemies[_local4]]._x, _root[arrEnemies[_local4]]._y, false);
_local9.push(arrEnemies[_local4]);
}
_local7 = true;
}
}
if (_local7 == false) {
if (_root[arrAllies[_local3].name]._xscale >= (_root[arrEnemies[_local4]]._xscale * sizeToEat)) {
if (_root[arrAllies[_local3].name].hitTest(_root[arrEnemies[_local4]]._x, _root[arrEnemies[_local4]]._y, true) == true) {
if ((avatarSplitting == false) || (GetAvatarName() != arrAllies[_local3].name)) {
if (_root[arrAllies[_local3].name].infected) {
_root[arrAllies[_local3].name].gotoAndStop("infected_eat");
} else {
_root[arrAllies[_local3].name].gotoAndStop("eat");
}
}
break;
}
}
}
_local4++;
}
_local3++;
}
_local3 = 0;
while (_local3 < arrEnemies.length) {
var _local4 = 0;
while (_local4 < arrAllies.length) {
if (_root[arrEnemies[_local3]]._xscale >= (_root[arrAllies[_local4].name]._xscale * sizeToEat)) {
if (_root[arrEnemies[_local3]].GetSplitting() == false) {
if (_root[arrEnemies[_local3]].hitTest(_root[arrAllies[_local4].name]._x, _root[arrAllies[_local4].name]._y, true) == true) {
if (_root[arrEnemies[_local3]].infected) {
_root[arrEnemies[_local3]].gotoAndStop("infected_eat");
} else {
_root[arrEnemies[_local3]].gotoAndStop("eat");
}
break;
}
}
}
_local4++;
}
_local3++;
}
var _local8 = 0;
while (_local8 < _local9.length) {
_root[_local9[_local8]].RemoveAllEffects();
_root[_local9[_local8]].removeMovieClip();
RemoveEnemy(_local9[_local8]);
_local8++;
}
if (_local9.length > 0) {
CheckWinConditions();
}
}
function EatAction(myUnitName, myAllyOrEnemy) {
var _local9 = new Array();
var _local7 = new Array();
var _local8 = -1;
if (myAllyOrEnemy == "ally") {
var _local5 = 0;
while (_local5 < arrEnemies.length) {
if (_root[myUnitName]._xscale >= (_root[arrEnemies[_local5]]._xscale * sizeToEat)) {
if (_root[myUnitName].hitTest(_root[arrEnemies[_local5]]._x, _root[arrEnemies[_local5]]._y, true) == true) {
_global.SoundManager.PlaySound("chomp2");
_root[myUnitName]._xscale = _root[myUnitName]._xscale + 25;
_root[myUnitName]._yscale = _root[myUnitName]._yscale + 25;
if (_local8 == -1) {
_local8 = GetMaxScaleSize();
}
if (_root[myUnitName]._xscale > _local8) {
_root[myUnitName]._xscale = _local8;
_root[myUnitName]._yscale = _local8;
}
if (_root[arrEnemies[_local5]].infected) {
Effect_UnitDead(_root[arrEnemies[_local5]]._x, _root[arrEnemies[_local5]]._y, true);
if (_root[myUnitName].infected == false) {
_root[myUnitName].infected = true;
if (myUnitName == GetAvatarName()) {
avatarInfected = true;
InfectIcons();
}
_root[myUnitName].gotoAndStop("infected");
}
} else {
Effect_UnitDead(_root[arrEnemies[_local5]]._x, _root[arrEnemies[_local5]]._y, false);
}
_local7.push(arrEnemies[_local5]);
}
}
_local5++;
}
}
if (myAllyOrEnemy == "enemy") {
var _local5 = 0;
while (_local5 < arrAllies.length) {
if (_root[myUnitName]._xscale >= (_root[arrAllies[_local5].name]._xscale * sizeToEat)) {
if (_root[myUnitName].hitTest(_root[arrAllies[_local5].name]._x, _root[arrAllies[_local5].name]._y, true) == true) {
_global.SoundManager.PlaySound("chomp");
_root[myUnitName]._xscale = _root[myUnitName]._xscale + 25;
_root[myUnitName]._yscale = _root[myUnitName]._yscale + 25;
if (_root[myUnitName]._xscale > 225) {
_root[myUnitName]._xscale = 225;
_root[myUnitName]._yscale = 225;
}
if (_root[arrAllies[_local5].name].infected) {
Effect_UnitDead(_root[arrAllies[_local5].name]._x, _root[arrAllies[_local5].name]._y, true);
if (_root[myUnitName].infected == false) {
_root[myUnitName].infected = true;
_root[myUnitName].gotoAndStop("infected");
}
} else {
Effect_UnitDead(_root[arrAllies[_local5].name]._x, _root[arrAllies[_local5].name]._y, false);
}
_local9.push(arrAllies[_local5].name);
}
}
_local5++;
}
}
var _local6 = 0;
while (_local6 < _local9.length) {
_root[_local9[_local6]].RemoveAllEffects();
_root[_local9[_local6]].removeMovieClip();
RemoveAlly(_local9[_local6]);
_local6++;
}
_local6 = 0;
while (_local6 < _local7.length) {
_root[_local7[_local6]].RemoveAllEffects();
_root[_local7[_local6]].removeMovieClip();
RemoveEnemy(_local7[_local6]);
_local6++;
}
if (_local7.length > 0) {
CheckWinConditions();
}
}
function EnemyFire(emitterPos, direction, speed, size, damage) {
var thisRef = this;
var _local3 = "enemyBullet_" + intBulletDepth;
var _local4 = new Vector();
_local4._x = Math.cos((Math.PI * direction) / 180) * speed;
_local4._y = Math.sin((Math.PI * direction) / 180) * speed;
_root.attachMovie("bullet1", _local3, intBulletDepth);
_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].SetGravity(dblGravity);
_root[_local3]._enemy = true;
intBulletDepth++;
arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
}
function RemoveBullet(strName) {
var _local2 = 0;
while (_local2 < arrBullets.length) {
if (strName == arrBullets[_local2]) {
arrBullets.splice(_local2, 1);
break;
}
_local2++;
}
}
function CheckBulletCollision() {
var _local4 = 0;
while (_local4 < arrBullets.length) {
var _local5 = false;
var _local3 = 0;
while (_local3 < arrEnemies.length) {
_local5 = _root[arrEnemies[_local3]].DetectHit(arrBullets[_local4]);
if (_local5 == true) {
_local4--;
break;
}
_local3++;
}
_local4++;
}
}
function Explosion(xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
CreateEffect("explosion_1", _local2, false, "", "top");
}
function CreateEffect(effectName, effectLocation, lockLocation, lockTarget, strLayer) {
var _local4;
if (strLayer == "top") {
_local4 = effectDepth;
effectDepth++;
if (effectDepth > 35000) {
effectDepth = 30000;
}
} else if (strLayer == "bottom") {
_local4 = effectUnderDepth;
effectUnderDepth++;
if (effectUnderDepth > 4000) {
effectUnderDepth = 3000;
}
}
var _local3 = "effect_" + _local4;
_root.attachMovie(effectName, _local3, _local4);
_root[_local3]._x = effectLocation._x;
_root[_local3]._y = effectLocation._y;
arrEffects.push({name:_local3, locked:lockLocation, target:lockTarget});
return(_local3);
}
function CleanEffects() {
var _local3 = 0;
while (_local3 < arrEffects.length) {
_root[arrEffects[_local3].name].removeMovieClip();
_local3++;
}
delete arrEffects;
arrEffects = new Array();
}
function RemoveEffect(strName) {
var _local3 = 0;
while (_local3 < arrEffects.length) {
if (strName == arrEffects[_local3].name) {
_root[arrEffects[_local3].name].removeMovieClip();
arrEffects.splice(_local3, 1);
break;
}
_local3++;
}
}
function AnimateEffects() {
var _local3 = 0;
while (_local3 < arrEffects.length) {
if (arrEffects[_local3].locked == true) {
_root[arrEffects[_local3].name]._x = _root[arrEffects[_local3].target]._x;
_root[arrEffects[_local3].name]._y = _root[arrEffects[_local3].target]._y;
}
_local3++;
}
}
function GetClosestAlly(selectedUnit) {
var _local5 = 0;
var _local4 = 0;
var _local6 = 0;
var _local7 = 9999999999999;
var _local9 = -1;
var _local3 = 0;
while (_local3 < arrAllies.length) {
_local5 = selectedUnit._x - _root[arrAllies[_local3].name]._x;
_local4 = selectedUnit._y - _root[arrAllies[_local3].name]._y;
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 < _local7) {
_local7 = _local6;
_local9 = _local3;
}
_local3++;
}
return(_root[arrAllies[_local9].name]);
}
function SpawnPowerUps() {
if ((powerUpSpawnCounter == 0) && (powerUpLimit > arrPowerUps.length)) {
var _local3 = "power_" + powerUpDepth;
_root.attachMovie("power", _local3, powerUpDepth);
if (_root.levelColor == 1) {
_root[_local3].gotoAndPlay("fade_in_green");
} else if (_root.levelColor == 2) {
_root[_local3].gotoAndPlay("fade_in_red");
} else if (_root.levelColor == 3) {
_root[_local3].gotoAndPlay("fade_in_blue");
}
_root[_local3]._x = Math.round(Math.random() * (Stage.width - 50)) + 25;
_root[_local3]._y = Math.round(Math.random() * (Stage.width - 50)) + 25;
powerUpDepth++;
if (powerUpDepth > 2500) {
powerUpDepth = 2000;
}
arrPowerUps.push(_local3);
powerUpSpawnCounter = Math.round(Math.random() * (powerUpSpawnMax - powerUpSpawnMin)) + powerUpSpawnMin;
} else if (powerUpSpawnCounter > 0) {
powerUpSpawnCounter--;
}
}
function HideEnemies() {
var _local3 = 0;
while (_local3 < arrEnemies.length) {
_root[arrEnemies[_local3]]._alpha = 0;
_local3++;
}
}
function UnHideEnemies() {
var _local3 = 0;
while (_local3 < arrEnemies.length) {
_root[arrEnemies[_local3]]._alpha = 100;
_local3++;
}
}
function TutorialPowerUpDetect() {
var _local3 = GetAvatarName();
if (_root[_local3].hitTest(_root.power_mc._x, _root.power_mc._y, true)) {
_root.power_mc.swapDepths(1);
_root.power_mc.removeMovieClip();
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
}
function DetectPowerUpCollision() {
var _local6 = -1;
var _local4 = 0;
while (_local4 < arrPowerUps.length) {
var _local5 = 0;
while (_local5 < arrEnemies.length) {
if (_root[arrEnemies[_local5]].hitTest(_root[arrPowerUps[_local4]]._x, _root[arrPowerUps[_local4]]._y, true)) {
_root[arrEnemies[_local5]]._xscale = _root[arrEnemies[_local5]]._xscale + 25;
_root[arrEnemies[_local5]]._yscale = _root[arrEnemies[_local5]]._yscale + 25;
if (_root[arrEnemies[_local5]]._xscale > 225) {
_root[arrEnemies[_local5]]._xscale = 225;
_root[arrEnemies[_local5]]._yscale = 225;
}
_global.SoundManager.PlaySound("protein");
_root[arrPowerUps[_local4]].removeMovieClip();
arrPowerUps.splice(_local4, 1);
_local4--;
}
_local5++;
}
_local5 = 0;
while (_local5 < arrAllies.length) {
if (_root[arrAllies[_local5].name].hitTest(_root[arrPowerUps[_local4]]._x, _root[arrPowerUps[_local4]]._y, true)) {
_root[arrAllies[_local5].name]._xscale = _root[arrAllies[_local5].name]._xscale + 25;
_root[arrAllies[_local5].name]._yscale = _root[arrAllies[_local5].name]._yscale + 25;
if (_local6 == -1) {
_local6 = GetMaxScaleSize();
}
if (_root[arrAllies[_local5].name]._xscale > _local6) {
_root[arrAllies[_local5].name]._xscale = _local6;
_root[arrAllies[_local5].name]._yscale = _local6;
}
AddIcon();
if (avatarInfected == true) {
InfectIcons();
}
_global.SoundManager.PlaySound("protein");
_root[arrPowerUps[_local4]].removeMovieClip();
arrPowerUps.splice(_local4, 1);
_local4--;
}
_local5++;
}
_local4++;
}
}
function GetMaxScaleSize() {
var _local3 = 225;
var _local2 = 0;
while (_local2 < arrActions.length) {
if (arrActions[_local2].type == 5) {
_local3 = _local3 + 40;
}
_local2++;
}
return(_local3);
}
function AddIcon() {
if (arrIcons.length < iconLimit) {
var _local3 = "icon_" + iconDepth;
_root.whichIcon = gameLevelManager.GetAction(_root.whichIcon);
_root.tempIcon = "p" + _root.whichIcon;
_root.attachMovie(_root.tempIcon, _local3, iconDepth);
_root[_local3]._x = 500;
_root[_local3]._y = 550;
arrIcons.unshift({name:_local3, destX:0, destY:0, type:_root.whichIcon});
iconDepth++;
if (iconDepth > 70500) {
iconDepth = 70000 /* 0x011170 */;
}
SetIconLocations();
} else {
RemoveIcon(arrIcons[5].name);
AddIcon();
}
}
function SetIconLocations() {
var _local3 = 500;
var _local2 = 0;
while (_local2 < arrIcons.length) {
arrIcons[_local2].destX = 500;
arrIcons[_local2].destY = _local3;
_local3 = _local3 - 50;
_local2++;
}
}
function AnimateIcons() {
var _local3 = 0;
while (_local3 < arrIcons.length) {
if (arrIcons[_local3].destY != _root[arrIcons[_local3].name]._y) {
_root[arrIcons[_local3].name]._y = _root[arrIcons[_local3].name]._y + (0.2 * (arrIcons[_local3].destY - _root[arrIcons[_local3].name]._y));
if (Math.abs(arrIcons[_local3].destY - _root[arrIcons[_local3].name]._y) < 1) {
_root[arrIcons[_local3].name]._y = arrIcons[_local3].destY;
}
}
_local3++;
}
}
function RemoveIcon(strName) {
var _local3 = 0;
while (_local3 < arrIcons.length) {
if (strName == arrIcons[_local3].name) {
_root[arrIcons[_local3].name].removeMovieClip();
arrIcons.splice(_local3, 1);
break;
}
_local3++;
}
}
function InfectIcons() {
var _local3 = 0;
while (_local3 < arrIcons.length) {
if ((arrIcons[_local3].type != 1) && (arrIcons[_local3].type != 7)) {
_root[arrIcons[_local3].name].gotoAndStop(2);
}
_local3++;
}
_local3 = 0;
while (_local3 < arrTimebars.length) {
arrTimebars[_local3].timeLeft = 0;
arrTimebars[_local3].destAlpha = 0;
RemoveActionEffect(arrTimebars[_local3].id);
_local3++;
}
if (intAllySelectMode == 3) {
ExitAllySelectMode();
}
}
function UnInfectIcons() {
var _local3 = 0;
while (_local3 < arrIcons.length) {
_root[arrIcons[_local3].name].gotoAndStop(1);
_local3++;
}
}
function KeyBoardIconUse() {
if (_global.gamePaused == false) {
if (downFlag == false) {
if (arrIcons.length > 0) {
if (Key.isDown(_global.hotKey_1)) {
intKeyLock = 20;
if (((avatarInfected == false) || (arrIcons[0].type == 1)) || (arrIcons[5].type == 7)) {
IconPressed(arrIcons[0].name);
}
}
}
if (arrIcons.length > 1) {
if (Key.isDown(_global.hotKey_2)) {
intKeyLock = 20;
if (((avatarInfected == false) || (arrIcons[1].type == 1)) || (arrIcons[5].type == 7)) {
IconPressed(arrIcons[1].name);
}
}
}
if (arrIcons.length > 2) {
if (Key.isDown(_global.hotKey_3)) {
intKeyLock = 20;
if (((avatarInfected == false) || (arrIcons[2].type == 1)) || (arrIcons[5].type == 7)) {
IconPressed(arrIcons[2].name);
}
}
}
if (arrIcons.length > 3) {
if (Key.isDown(_global.hotKey_4)) {
intKeyLock = 20;
if (((avatarInfected == false) || (arrIcons[3].type == 1)) || (arrIcons[5].type == 7)) {
IconPressed(arrIcons[3].name);
}
}
}
if (arrIcons.length > 4) {
if (Key.isDown(_global.hotKey_5)) {
intKeyLock = 20;
if (((avatarInfected == false) || (arrIcons[4].type == 1)) || (arrIcons[5].type == 7)) {
IconPressed(arrIcons[4].name);
}
}
}
if (arrIcons.length > 5) {
if (Key.isDown(_global.hotKey_6)) {
intKeyLock = 20;
if (((avatarInfected == false) || (arrIcons[5].type == 1)) || (arrIcons[5].type == 7)) {
IconPressed(arrIcons[5].name);
}
}
}
}
}
}
function IconPressed(iconName) {
if (_global.gamePaused == false) {
var _local5 = 0;
while (_local5 < arrIcons.length) {
if (arrIcons[_local5].name == iconName) {
var _local4 = false;
switch (arrIcons[_local5].type) {
case 1 :
_local4 = ActionSplit();
break;
case 2 :
_local4 = ActionSpike();
break;
case 3 :
_local4 = ActionAllyExplode(iconName);
break;
case 4 :
_local4 = ActionSpeedBoost();
break;
case 5 :
_local4 = ActionSuperProtein();
break;
case 6 :
_local4 = ActionStunBurst();
break;
case 7 :
_local4 = ActionSelect(iconName);
}
if (_local4 == false) {
if ((arrIcons[_local5].type != 3) && (arrIcons[_local5].type != 7)) {
ExitAllySelectMode();
}
RemoveHoverText();
_root[iconName].removeMovieClip();
arrIcons.splice(_local5, 1);
}
break;
}
_local5++;
}
SetIconLocations();
}
}
function IconOver(iconName) {
if (_global.gamePaused == false) {
var _local3 = "---";
var _local4 = 0;
while (_local4 < arrIcons.length) {
if (arrIcons[_local4].name == iconName) {
switch (arrIcons[_local4].type) {
case 1 :
_local3 = "Split - Divide into 2 microbes!";
break;
case 2 :
_local3 = "Spike - Pop enemy microbes for a short time!";
break;
case 3 :
_local3 = "Ally Explode - Sacrifice an ally to deal damage to nearby enemies!";
break;
case 4 :
_local3 = "Speed Boost - Allies go faster for a short time!";
break;
case 5 :
_local3 = "Super Growth - Allies are larger for a short time!";
break;
case 6 :
_local3 = "Stun Burst - Stun ALL nearby microbes!";
break;
case 7 :
_local3 = "Select Avatar - Click an ally to change control to them!";
}
}
_local4++;
}
CreateHoverText(_local3);
}
}
function IconOut() {
RemoveHoverText();
}
function CreateHoverText(myMessage) {
var _local3 = _root.createTextField("hoverText_txt", 80001, 0, 520, 550, 25);
_local3.text = myMessage;
_local3.selectable = false;
_local3.antiAliasType = "normal";
var _local2 = new TextFormat();
_local2.color = 16777215 /* 0xFFFFFF */;
_local2.bold = true;
_local2.align = "center";
_local2.size = 16;
_local2.font = "_sans";
_local3.setTextFormat(_local2);
}
function RemoveHoverText() {
_root.hoverText_txt.removeTextField();
}
function PutUnitIntoSelectMode(strName, type) {
var _local3 = _root[strName];
_local3.onRollOver = function () {
this.HighLight();
};
_local3.onRollOut = function () {
this.RemoveHighLight();
};
if (type == 3) {
_local3.onRelease = function () {
_root.game.AllyExplode(this._name);
};
} else if (type == 7) {
_local3.onRelease = function () {
_root.game.AllySelect(this._name);
};
}
}
function EnterAllySelectMode(myModeType) {
var _local2 = 0;
while (_local2 < arrAllies.length) {
PutUnitIntoSelectMode(arrAllies[_local2].name, myModeType);
_local2++;
}
intAllySelectMode = myModeType;
}
function ExitAllySelectMode() {
if (intAllySelectMode != 0) {
var _local4 = 0;
while (_local4 < arrAllies.length) {
var _local3 = _root[arrAllies[_local4].name];
delete _local3.onRollOver;
delete _local3.onRollOut;
delete _local3.onRelease;
_local3.RemoveHighLight();
_local4++;
}
intAllySelectMode = 0;
}
}
function AllySelect(strName) {
if (_global.gamePaused == false) {
ExitAllySelectMode();
if (strName != GetAvatarName()) {
_global.SoundManager.PlaySound("click");
var _local7 = new Vector();
_local7._x = _root[strName]._x;
_local7._y = _root[strName]._y;
CreateEffect("rotatingArrows", _local7, true, strName, "top");
var _local5 = 0;
var _local4 = 0;
while (_local4 < arrAllies.length) {
if (arrAllies[_local4].unitSelected == true) {
_root[arrAllies[_local4].name].TurnOn();
arrAllies[_local4].unitSelected = false;
}
if (arrAllies[_local4].name == strName) {
_local5 = _local4;
}
_local4++;
}
arrAllies[_local5].unitSelected = true;
_root[arrAllies[_local5].name].TurnOff();
if (_root[arrAllies[_local5].name].infected == false) {
avatarInfected = false;
UnInfectIcons();
} else {
avatarInfected = true;
InfectIcons();
}
RemoveIcon(strSelectModeIcon);
strSelectModeIcon = "";
SetIconLocations();
}
}
}
function AllyExplode(strName) {
if (_global.gamePaused == false) {
ExitAllySelectMode();
_global.SoundManager.PlaySound("bursting");
Effect_AllyExplode(_root[strName]._x, _root[strName]._y, _root[strName]._rotation);
ExplodeDamageToNearbyEnemies(strName);
_root[strName].RemoveAllEffects();
_root[strName].removeMovieClip();
RemoveAlly(strName);
RemoveIcon(strSelectModeIcon);
strSelectModeIcon = "";
SetIconLocations();
}
}
function ExplodeDamageToNearbyEnemies(myName) {
var _local5 = new Array();
var _local6 = new Vector();
var _local7 = 150;
var _local13 = _root[myName]._x;
var _local12 = _root[myName]._y;
var _local3 = 0;
while (_local3 < arrEnemies.length) {
_local6._x = _root[arrEnemies[_local3]]._x - _local13;
_local6._y = _root[arrEnemies[_local3]]._y - _local12;
if (_local6.GetLength() <= _local7) {
var _local8 = (_local7 - _local6.GetLength()) / _local7;
var _local10 = 100;
var _local9 = Math.round(_local10 * _local8);
var _local11 = minSizeToSplit / 2;
_root[arrEnemies[_local3]]._xscale = _root[arrEnemies[_local3]]._xscale - _local9;
_root[arrEnemies[_local3]]._yscale = _root[arrEnemies[_local3]]._xscale;
if (_root[arrEnemies[_local3]]._xscale < _local11) {
if (_root[arrEnemies[_local3]].infected) {
Effect_UnitDead(_root[arrEnemies[_local3]]._x, _root[arrEnemies[_local3]]._y, true);
} else {
Effect_UnitDead(_root[arrEnemies[_local3]]._x, _root[arrEnemies[_local3]]._y, false);
}
_local5.push(arrEnemies[_local3]);
}
}
_local3++;
}
var _local4 = 0;
while (_local4 < _local5.length) {
_root[_local5[_local4]].RemoveAllEffects();
_root[_local5[_local4]].removeMovieClip();
RemoveEnemy(_local5[_local4]);
_local4++;
}
if (_local5.length > 0) {
CheckWinConditions();
}
}
function ActionSplit() {
if (_root[GetAvatarName()]._xscale >= minSizeToSplit) {
UnitSplit(GetAvatarName());
return(false);
}
return(true);
}
function ActionSpike() {
var _local3 = AddActionEffect(2);
AddTimebar(2, 90, "Spike", _local3);
_root[GetAvatarName()].gotoAndStop("spike");
return(false);
}
function StopActionSpike(myID) {
if (DoesSpikeExist() == false) {
_root[GetAvatarName()].gotoAndStop("normal");
}
}
function ActionAllyExplode(strIconName) {
EnterAllySelectMode(3);
strSelectModeIcon = strIconName;
return(true);
}
function ActionSelect(strIconName) {
EnterAllySelectMode(7);
strSelectModeIcon = strIconName;
return(true);
}
function ActionSpeedBoost() {
_global.SoundManager.PlaySound("speed");
var _local5 = AddActionEffect(4);
AddTimebar(4, 240, "Speed Boost", _local5);
var _local4 = 0;
while (_local4 < arrAllies.length) {
_root[arrAllies[_local4].name].RegisterEffect(_local5);
_root[arrAllies[_local4].name].AdjustSpeed(2);
_local4++;
}
maxAvatarSpeed = maxAvatarSpeed + 2.5;
return(false);
}
function StopActionSpeedBoost(myID) {
var _local3 = 0;
while (_local3 < arrAllies.length) {
_root[arrAllies[_local3].name].AdjustSpeedIfEffect(-2, myID);
_local3++;
}
maxAvatarSpeed = maxAvatarSpeed - 2.5;
}
function ActionSuperProtein() {
_global.SoundManager.PlaySound("speed");
var _local5 = AddActionEffect(5);
AddTimebar(5, 240, "Team Growth", _local5);
var _local4 = 0;
while (_local4 < arrAllies.length) {
_root[arrAllies[_local4].name].RegisterEffect(_local5);
_root[arrAllies[_local4].name].AdjustSize(40);
_local4++;
}
return(false);
}
function StopActionSuperProtein(myID) {
var _local3 = 0;
while (_local3 < arrAllies.length) {
_root[arrAllies[_local3].name].AdjustSizeIfEffect(-40, myID);
_local3++;
}
}
function ActionStunBurst() {
var _local4 = AddActionEffect(6);
AddTimebar(6, 180, "Stun Burst", _local4);
var _local3 = GetAvatarName();
var _local5 = Effect_StunBurst(_root[_local3]._x, _root[_local3]._y);
StunUnitsInRadius(_local5, _local4);
return(false);
}
function StunUnitsInRadius(myEffect, myActionID) {
var _local4 = new Vector();
var _local5 = _root[myEffect]._width / 2;
var _local7 = _root[myEffect]._x;
var _local6 = _root[myEffect]._y;
var _local3 = 0;
while (_local3 < arrAllies.length) {
if (arrAllies[_local3].unitSelected == false) {
_local4._x = _root[arrAllies[_local3].name]._x - _local7;
_local4._y = _root[arrAllies[_local3].name]._y - _local6;
if (_local4.GetLength() <= _local5) {
_root[arrAllies[_local3].name].RegisterEffect(myActionID);
_root[arrAllies[_local3].name].Stun();
}
}
_local3++;
}
_local3 = 0;
while (_local3 < arrEnemies.length) {
_local4._x = _root[arrEnemies[_local3]]._x - _local7;
_local4._y = _root[arrEnemies[_local3]]._y - _local6;
if (_local4.GetLength() <= _local5) {
_root[arrEnemies[_local3]].RegisterEffect(myActionID);
_root[arrEnemies[_local3]].Stun();
}
_local3++;
}
}
function StopActionStunBurst(myID) {
var _local3 = 0;
while (_local3 < arrAllies.length) {
_root[arrAllies[_local3].name].RemoveStunIfEffect(myID);
_local3++;
}
_local3 = 0;
while (_local3 < arrEnemies.length) {
_root[arrEnemies[_local3]].RemoveStunIfEffect(myID);
_local3++;
}
}
function IsIdStun(myID) {
var _local2 = 0;
while (_local2 < arrActions.length) {
if (arrActions[_local2].id == myID) {
if (arrActions[_local2].type == 6) {
return(true);
}
return(false);
}
_local2++;
}
return(false);
}
function DoesSpikeExist() {
var _local2 = 0;
while (_local2 < arrActions.length) {
if (arrActions[_local2].type == 2) {
return(true);
}
_local2++;
}
return(false);
}
function GetNumSpikes() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < arrActions.length) {
if (arrActions[_local2].type == 2) {
_local3++;
}
_local2++;
}
return(_local3);
}
function AddActionEffect(myType) {
actionID++;
arrActions.push({id:actionID, type:myType});
return(actionID);
}
function RemoveActionEffect(myID) {
var _local2 = 0;
while (_local2 < arrActions.length) {
if (arrActions[_local2].id == myID) {
var _local3 = arrActions[_local2].id;
var _local4 = arrActions[_local2].type;
arrActions.splice(_local2, 1);
switch (_local4) {
case 2 :
StopActionSpike(_local3);
break;
case 4 :
StopActionSpeedBoost(_local3);
break;
case 5 :
StopActionSuperProtein(_local3);
break;
case 6 :
StopActionStunBurst(_local3);
}
break;
}
_local2++;
}
}
function AddTimebar(myAbilityType, myRunTime, myTitle, myID) {
if (arrTimebars.length < 6) {
var _local3 = "timebar_" + iconDepth;
_root.attachMovie("timebar", _local3, iconDepth);
_root[_local3]._x = 94.5;
_root[_local3]._y = -40;
_root[_local3].title_txt.text = myTitle;
_root[_local3].inside_mc._xscale = 100;
arrTimebars.unshift({name:_local3, destX:0, destY:0, destAlpha:100, type:myAbilityType, timeLeft:myRunTime, startTime:myRunTime, id:myID});
iconDepth++;
if (iconDepth > 70500) {
iconDepth = 70000 /* 0x011170 */;
}
SetTimebarLocations();
}
}
function SetTimebarLocations() {
var _local3 = 10;
var _local2 = 0;
while (_local2 < arrTimebars.length) {
arrTimebars[_local2].destX = 94.5;
arrTimebars[_local2].destY = _local3;
_local3 = _local3 + 50;
_local2++;
}
}
function AnimateTimebars() {
var _local5 = new Array();
var _local3 = 0;
while (_local3 < arrTimebars.length) {
if (arrTimebars[_local3].destY != _root[arrTimebars[_local3].name]._y) {
_root[arrTimebars[_local3].name]._y = _root[arrTimebars[_local3].name]._y + (0.2 * (arrTimebars[_local3].destY - _root[arrTimebars[_local3].name]._y));
if (Math.abs(arrTimebars[_local3].destY - _root[arrTimebars[_local3].name]._y) < 1) {
_root[arrTimebars[_local3].name]._y = arrTimebars[_local3].destY;
}
}
if (arrTimebars[_local3].timeLeft > 0) {
arrTimebars[_local3].timeLeft = arrTimebars[_local3].timeLeft - 1;
if (arrTimebars[_local3].timeLeft == 0) {
arrTimebars[_local3].destAlpha = 0;
RemoveActionEffect(arrTimebars[_local3].id);
}
}
_root[arrTimebars[_local3].name].inside_mc._xscale = Math.round((arrTimebars[_local3].timeLeft / arrTimebars[_local3].startTime) * 100);
if (arrTimebars[_local3].destAlpha == 0) {
_root[arrTimebars[_local3].name]._alpha = _root[arrTimebars[_local3].name]._alpha - 10;
if (_root[arrTimebars[_local3].name]._alpha <= 0) {
_local5.push(arrTimebars[_local3].name);
}
}
_local3++;
}
var _local4 = 0;
while (_local4 < _local5.length) {
_root[_local5[_local4]].removeMovieClip();
RemoveTimebar(_local5[_local4]);
_local4++;
}
}
function RemoveTimebar(myName) {
var _local2 = 0;
while (_local2 < arrTimebars.length) {
if (arrTimebars[_local2].name == myName) {
arrTimebars.splice(_local2, 1);
break;
}
_local2++;
}
}
function GetAvatarName() {
var _local2 = 0;
while (_local2 < arrAllies.length) {
if (arrAllies[_local2].unitSelected == true) {
return(arrAllies[_local2].name);
}
_local2++;
}
return("");
}
function UnitSplit(unitName) {
var _local4 = false;
if (GetAvatarName() == unitName) {
if (DoesSpikeExist() == true) {
_local4 = true;
}
avatarSplitting = true;
}
if (_local4 == false) {
if (_root[unitName].infected) {
_root[unitName].gotoAndStop("infected_split");
} else {
_root[unitName].gotoAndStop("split");
}
} else {
_root[unitName].gotoAndStop("spike_split");
}
}
function DoneSplitting(unitName, unitType, xStart, yStart) {
var _local6 = false;
_global.SoundManager.PlaySound("split");
if (GetAvatarName() == unitName) {
if (DoesSpikeExist() == true) {
_local6 = true;
}
avatarSplitting = false;
}
if (_local6 == false) {
if (_root[unitName].infected) {
_root[unitName].gotoAndStop("infected_still");
} else {
_root[unitName].gotoAndStop("normal");
}
} else if (_root[unitName].infected) {
_root[unitName].gotoAndStop("infected_still");
} else {
_root[unitName].gotoAndStop("spike");
}
_root[unitName]._xscale = 0.5 * _root[unitName]._xscale;
_root[unitName]._yscale = _root[unitName]._xscale;
if (unitType == "ally") {
var _local5 = new Vector();
_local5._x = _root[unitName]._x;
_local5._y = _root[unitName]._y;
if (GetAvatarName() == unitName) {
CreateEffect("rotatingArrows", _local5, true, unitName, "top");
}
var _local7 = SpawnUnit("ally", xStart, yStart, _root[unitName]._rotation, _root[unitName]._xscale, "ally", _root[unitName].infected);
if (intAllySelectMode != 0) {
PutUnitIntoSelectMode(_local7, intAllySelectMode);
}
} else {
var _local5 = new Vector();
_local5._x = _root[unitName]._x;
_local5._y = _root[unitName]._y;
SpawnUnit(unitType, xStart, yStart, _root[unitName]._rotation, _root[unitName]._xscale, "enemy", _root[unitName].infected);
_root[unitName].FinishedSplitting();
}
}
function SpawnUnit(unitType, xStart, yStart, rotStart, scaleStart, strTeam, isInfected) {
var _local3 = "unit_" + intUnitDepth;
_root.attachMovie(unitType, _local3, intUnitDepth);
if (isInfected) {
_root[_local3].infected = true;
_root[_local3].gotoAndStop("infected_still");
}
_root[_local3]._x = xStart;
_root[_local3]._y = yStart;
_root[_local3]._rotation = rotStart;
_root[_local3]._xscale = scaleStart;
_root[_local3]._yscale = scaleStart;
if (strTeam == "ally") {
arrAllies.push({name:_local3, unitSelected:false});
} else {
arrEnemies.push(_local3);
}
intUnitDepth++;
if (intUnitDepth > 7000) {
intUnitDepth = 5000;
}
return(_local3);
}
function RemoveEnemy(strName) {
var _local3 = 0;
while (_local3 < arrEnemies.length) {
if ((strName == arrEnemies[_local3]) || (strName == _root[arrEnemies[_local3]])) {
arrEnemies.splice(_local3, 1);
break;
}
_local3++;
}
}
function RemoveAlly(strName) {
var _local5 = false;
if (GetAvatarName() == strName) {
avatarSplitting = false;
}
var _local3 = 0;
while (_local3 < arrAllies.length) {
if ((strName == arrAllies[_local3].name) || (strName == _root[arrAllies[_local3].name])) {
if (arrAllies[_local3].unitSelected == true) {
_local5 = true;
}
arrAllies.splice(_local3, 1);
break;
}
_local3++;
}
if (_local5 == true) {
SelectNewAvatar();
}
}
function SelectNewAvatar() {
var _local6 = -99999;
var _local5 = -1;
var _local4 = 0;
while (_local4 < arrAllies.length) {
arrAllies[_local4].unitSelected = false;
if (_root[arrAllies[_local4].name]._xscale > _local6) {
_local6 = _root[arrAllies[_local4].name]._xscale;
_local5 = _local4;
}
_local4++;
}
if (_local5 == -1) {
LoseGame();
} else {
arrAllies[_local5].unitSelected = true;
_root[arrAllies[_local5].name].TurnOff();
var _local7 = new Vector();
_local7._x = _root[arrAllies[_local5].name]._x;
_local7._y = _root[arrAllies[_local5].name]._y;
if (_root[arrAllies[_local5].name].infected == false) {
avatarInfected = false;
UnInfectIcons();
} else {
avatarInfected = true;
InfectIcons();
}
if (_root[arrAllies[_local5].name].GetSplitting() == true) {
avatarSplitting = true;
} else {
avatarSplitting = false;
}
if (_global.whichLevel != 1) {
CreateEffect("rotatingArrows", _local7, true, arrAllies[_local5].name, "top");
}
}
}
function ScanDistanceUnits(unit_mc, scanDistance) {
var _local7 = new Array();
if (unit_mc._blnAlly == true) {
} else {
var _local5 = 0;
var _local4 = 0;
var _local12 = 0;
var _local3 = 0;
while (_local3 < arrAllies.length) {
_local5 = _root[arrAllies[_local3].name]._x - unit_mc._x;
_local4 = _root[arrAllies[_local3].name]._y - unit_mc._y;
_local12 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local12 <= scanDistance) {
if (_root[arrAllies[_local3].name]._xscale >= (unit_mc._xscale * sizeToEat)) {
_local7.push({name:arrAllies[_local3].name, type:"enemy", suggResponse:"flee", distance:_local12, distX:_local5, distY:_local4});
} else if (unit_mc._xscale >= (_root[arrAllies[_local3].name]._xscale * sizeToEat)) {
_local7.push({name:arrAllies[_local3].name, type:"enemy", suggResponse:"fight", distance:_local12, distX:_local5, distY:_local4});
} else {
_local7.push({name:arrAllies[_local3].name, type:"enemy", suggResponse:"ignore", distance:_local12, distX:_local5, distY:_local4});
}
}
_local3++;
}
}
return(_local7);
}
function ScanPowerups(unit_mc, scanDistance) {
var _local11 = new Array();
var _local5 = 0;
var _local4 = 0;
var _local9 = 0;
var _local3 = 0;
while (_local3 < arrPowerUps.length) {
if (_root[arrPowerUps[_local3]].CheckScanable() == true) {
_local5 = _root[arrPowerUps[_local3]]._x - unit_mc._x;
_local4 = _root[arrPowerUps[_local3]]._y - unit_mc._y;
_local9 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local9 <= scanDistance) {
_local11.push({name:arrPowerUps[_local3], distance:_local9, distX:_local5, distY:_local4});
}
}
_local3++;
}
return(_local11);
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function WaterTrail(xloc, yloc, scale) {
var _local3 = new Vector();
_local3._x = xloc + RandNum(-8, 8);
_local3._y = yloc + RandNum(-8, 8);
scale = scale - RandNum(0, 70);
if (avatarInfected == false) {
var _local4 = CreateEffect("water_trail", _local3, false, "", "bottom");
} else {
var _local4 = CreateEffect("water_trail_infected", _local3, false, "", "bottom");
}
_root[_local4]._xscale = (_root[_local4]._yscale = scale);
}
function Effect_UnitDead(xloc, yloc, infected) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
if (infected == false) {
CreateEffect("effect_explode", _local2, false, "", "bottom");
} else {
CreateEffect("effect_explode_infected", _local2, false, "", "bottom");
}
}
function Effect_StunBurst(xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
return(CreateEffect("stun_burst", _local2, false, "", "bottom"));
}
function Effect_Stunned(xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
return(CreateEffect("stunned", _local2, false, "", "bottom"));
}
function Effect_Highlight(xloc, yloc, myName) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
return(CreateEffect("unit_highlighted", _local2, true, myName, "bottom"));
}
function Effect_AllyExplode(xloc, yloc, myRotation) {
var _local3 = new Vector();
_local3._x = xloc;
_local3._y = yloc;
var _local4 = CreateEffect("effect_allyExplode", _local3, false, "", "top");
_root[_local4]._rotation = myRotation;
return(_local4);
}
function PauseGame() {
_global.gamePaused = true;
var _local4 = 0;
while (_local4 < arrAllies.length) {
_root[arrAllies[_local4].name].TurnOff();
_local4++;
}
_local4 = 0;
while (_local4 < arrEnemies.length) {
_root[arrEnemies[_local4]].TurnOff();
_local4++;
}
_local4 = 0;
while (_local4 < arrViruses.length) {
_root[arrViruses[_local4]].TurnOff();
_local4++;
}
_root.pause_mc._visible = true;
_root.pause_mc.gotoAndPlay("pause");
}
function UnPauseGame() {
_global.gamePaused = false;
var _local4 = 0;
while (_local4 < arrAllies.length) {
if (arrAllies[_local4].unitSelected == false) {
_root[arrAllies[_local4].name].TurnOn();
}
_local4++;
}
_local4 = 0;
while (_local4 < arrEnemies.length) {
_root[arrEnemies[_local4]].TurnOn();
_local4++;
}
_local4 = 0;
while (_local4 < arrViruses.length) {
_root[arrViruses[_local4]].TurnOn();
_local4++;
}
_root.pause_mc.gotoAndStop(1);
_root.pause_mc._visible = false;
}
function ClosePauseScreen() {
_root.pause_mc.gotoAndPlay("unpause");
}
}
Symbol 868 MovieClip [__Packages.LevelManager] Frame 0
class LevelManager
{
var arrActionsAvailable;
function LevelManager () {
arrActionsAvailable = new Array();
}
function SetupLevel(myLevelNumber) {
switch (myLevelNumber) {
case 1 :
Level_1();
break;
case 2 :
Level_2();
break;
case 3 :
Level_3();
break;
case 4 :
Level_4();
break;
case 5 :
Level_5();
break;
case 6 :
Level_6();
break;
case 7 :
Level_7();
break;
case 8 :
Level_8();
break;
case 9 :
Level_9();
break;
case 10 :
Level_10();
break;
case 11 :
Level_11();
break;
case 12 :
Level_12();
}
_root.game.SelectNewAvatar();
}
function Level_1() {
_root.game.SpawnUnit("ally", 150, 250, 0, 100, "ally");
_root.game.SpawnUnit("Enemy_2", 400, 250, 180, 100, "enemy");
arrActionsAvailable.push({type:1, chance:16});
arrActionsAvailable.push({type:7, chance:16});
_root.blnTutorialFlag = true;
_root.intKeyLock = 20;
_root.game.PauseGame();
_root.pause_mc.gotoAndPlay("tutorial");
}
function Level_2() {
_root.game.SpawnUnit("ally", 60, 250, 0, 100, "ally");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
arrActionsAvailable.push({type:1, chance:16});
arrActionsAvailable.push({type:4, chance:20});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_3() {
_root.game.SpawnUnit("ally", 60, 250, 0, 100, "ally");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
arrActionsAvailable.push({type:1, chance:20});
arrActionsAvailable.push({type:4, chance:30});
arrActionsAvailable.push({type:5, chance:25});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_4() {
_root.game.SpawnUnit("ally", 60, 250, 0, 100, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 80), RandNum(100, 450), 0, 80, "ally");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
arrActionsAvailable.push({type:1, chance:20});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:30});
arrActionsAvailable.push({type:5, chance:30});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_5() {
_root.game.SpawnUnit("ally", 60, 250, 0, 100, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 80), RandNum(100, 450), 0, 80, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 80), RandNum(100, 450), 0, 80, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 80), RandNum(100, 450), 0, 80, "ally");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
arrActionsAvailable.push({type:1, chance:20});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:30});
arrActionsAvailable.push({type:5, chance:30});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_6() {
_root.game.SpawnUnit("ally", 60, 250, 0, 80, "ally");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 180, "enemy");
_root.game.SetVirusDetails(80, 180, 0, 25, 50);
_root.game.SetVirusDeduction(40, 40, true, 2);
arrActionsAvailable.push({type:1, chance:20});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:30});
arrActionsAvailable.push({type:5, chance:30});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_7() {
_root.game.SpawnUnit("ally", 60, 250, 0, 100, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 80), RandNum(100, 450), 0, 80, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 80), RandNum(100, 450), 0, 80, "ally");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 120, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 120, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SetVirusDetails(80, 200, 350, 1, 5);
_root.game.SetVirusDeduction(40, 40, true, 2);
arrActionsAvailable.push({type:1, chance:15});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:25});
arrActionsAvailable.push({type:5, chance:25});
arrActionsAvailable.push({type:6, chance:15});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_8() {
_root.game.SpawnUnit("ally", 60, 250, 0, 100, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 100), RandNum(100, 450), 0, 80, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 100), RandNum(100, 450), 0, 80, "ally");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
arrActionsAvailable.push({type:1, chance:15});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:25});
arrActionsAvailable.push({type:5, chance:25});
arrActionsAvailable.push({type:6, chance:15});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_9() {
_root.game.SpawnUnit("ally", 60, 250, 0, 100, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 100), RandNum(100, 450), 0, 100, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 100), RandNum(100, 450), 0, 100, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 100), RandNum(100, 450), 0, 100, "ally");
_root.game.SpawnUnit("ally", RandNum(40, 100), RandNum(100, 450), 0, 100, "ally");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 120, "enemy");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 80, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 80, "enemy");
_root.game.SetVirusDetails(80, 200, 1600, 2, 5);
_root.game.SetVirusDeduction(40, 40, true, 2);
arrActionsAvailable.push({type:1, chance:15});
arrActionsAvailable.push({type:2, chance:10});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:25});
arrActionsAvailable.push({type:5, chance:25});
arrActionsAvailable.push({type:6, chance:15});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_10() {
_root.game.SpawnUnit("ally", 60, 250, 0, 90, "ally");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 180, "enemy");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 180, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_2", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 80, "enemy");
_root.game.SetVirusDetails(80, 200, 1900, 2, 5);
_root.game.SetVirusDeduction(40, 40, true, 2);
arrActionsAvailable.push({type:1, chance:15});
arrActionsAvailable.push({type:2, chance:10});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:25});
arrActionsAvailable.push({type:5, chance:25});
arrActionsAvailable.push({type:6, chance:15});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_11() {
_root.game.SpawnUnit("ally", 60, 250, 0, 90, "ally");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 180, "enemy");
_root.game.SpawnUnit("Enemy_3", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SpawnUnit("Enemy_4", RandNum(350, 475), RandNum(150, 350), 180, 120, "enemy");
_root.game.SpawnUnit("Enemy_4", RandNum(350, 475), RandNum(150, 350), 180, 100, "enemy");
_root.game.SpawnUnit("Enemy_1", RandNum(350, 475), RandNum(150, 350), 180, 80, "enemy");
_root.game.SetVirusDetails(80, 200, 1900, 6, 20);
_root.game.SetVirusDeduction(40, 40, true, 2);
arrActionsAvailable.push({type:1, chance:15});
arrActionsAvailable.push({type:2, chance:10});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:25});
arrActionsAvailable.push({type:5, chance:25});
arrActionsAvailable.push({type:6, chance:15});
arrActionsAvailable.push({type:7, chance:16});
}
function Level_12() {
_root.game.SpawnUnit("ally", 60, 250, 0, 90, "ally");
_root.game.SpawnUnit("Enemy_4", RandNum(350, 475), RandNum(150, 350), 180, 180, "enemy");
_root.game.SpawnUnit("Enemy_4", RandNum(350, 475), RandNum(150, 350), 180, 140, "enemy");
_root.game.SpawnUnit("Enemy_4", RandNum(350, 475), RandNum(150, 350), 180, 80, "enemy");
_root.game.SpawnUnit("Enemy_4", RandNum(350, 475), RandNum(150, 350), 180, 60, "enemy");
_root.game.SetVirusDetails(80, 200, 50, 15, 100);
_root.game.SetVirusDeduction(40, 40, true, 2);
arrActionsAvailable.push({type:1, chance:15});
arrActionsAvailable.push({type:2, chance:10});
arrActionsAvailable.push({type:3, chance:20});
arrActionsAvailable.push({type:4, chance:25});
arrActionsAvailable.push({type:5, chance:25});
arrActionsAvailable.push({type:6, chance:15});
arrActionsAvailable.push({type:7, chance:16});
}
function GetAction(myLastType) {
var _local2 = new Array();
var _local4 = 0;
while (_local4 < arrActionsAvailable.length) {
if ((myLastType != arrActionsAvailable[_local4].type) || (arrActionsAvailable.length < 4)) {
_local2.push({type:arrActionsAvailable[_local4].type, chance:arrActionsAvailable[_local4].chance, minChance:0, maxChance:0});
}
_local4++;
}
if (_local2.length == 0) {
_local2.push({type:1, chance:100, minChance:0, maxChance:0});
}
var _local5 = 0;
var _local6 = 0;
var _local9 = 0;
var _local7 = 0;
var _local3 = 0;
while (_local3 < _local2.length) {
_local9 = _local9 + _local2[_local3].chance;
_local3++;
}
_local7 = Math.round(Math.random() * _local9);
_local3 = 0;
while (_local3 < _local2.length) {
_local6 = _local5 + _local2[_local3].chance;
_local2[_local3].minChance = _local5;
_local2[_local3].maxChance = _local6;
_local5 = _local6;
_local3++;
}
var _local8 = -1;
_local3 = 0;
while (_local3 < _local2.length) {
if ((_local7 >= _local2[_local3].minChance) && (_local7 < _local2[_local3].maxChance)) {
_local8 = _local3;
break;
}
_local3++;
}
if (_local8 == -1) {
_local8 = _local2.length - 1;
}
return(_local2[_local8].type);
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
}
Symbol 600 MovieClip Frame 220
stop();
Instance of Symbol 600 MovieClip in Symbol 604 MovieClip Frame 1
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 604 MovieClip Frame 236
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("intro");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(3);
}
Instance of Symbol 603 MovieClip in Symbol 604 MovieClip Frame 236
on (release) {
getURL ("http://www.herointeractive.com", "_blank");
}
Symbol 604 MovieClip Frame 414
_root.gotoAndPlay("menu");
Symbol 613 Button
on (press) {
_root.ColorLevelBoxFunc(1);
}
Symbol 615 MovieClip Frame 1
stop();
Symbol 615 MovieClip Frame 2
stop();
Symbol 616 Button
on (press) {
_root.ColorLevelBoxFunc(2);
}
Symbol 617 MovieClip Frame 1
stop();
Symbol 617 MovieClip Frame 2
stop();
Symbol 618 Button
on (press) {
_root.ColorLevelBoxFunc(3);
}
Symbol 619 MovieClip Frame 1
stop();
Symbol 619 MovieClip Frame 2
stop();
Symbol 622 Button
on (press) {
_root.ColorLevelBoxFunc(4);
}
Symbol 623 MovieClip Frame 1
stop();
Symbol 623 MovieClip Frame 2
stop();
Symbol 624 Button
on (press) {
_root.ColorLevelBoxFunc(5);
}
Symbol 625 MovieClip Frame 1
stop();
Symbol 625 MovieClip Frame 2
stop();
Symbol 626 Button
on (press) {
_root.ColorLevelBoxFunc(6);
}
Symbol 627 MovieClip Frame 1
stop();
Symbol 627 MovieClip Frame 2
stop();
Symbol 630 Button
on (press) {
_root.ColorLevelBoxFunc(7);
}
Symbol 631 MovieClip Frame 1
stop();
Symbol 631 MovieClip Frame 2
stop();
Symbol 632 Button
on (press) {
_root.ColorLevelBoxFunc(8);
}
Symbol 633 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 2
stop();
Symbol 634 Button
on (press) {
_root.ColorLevelBoxFunc(9);
}
Symbol 635 MovieClip Frame 1
stop();
Symbol 635 MovieClip Frame 2
stop();
Symbol 638 Button
on (press) {
_root.ColorLevelBoxFunc(10);
}
Symbol 639 MovieClip Frame 1
stop();
Symbol 639 MovieClip Frame 2
stop();
Symbol 640 Button
on (press) {
_root.ColorLevelBoxFunc(11);
}
Symbol 641 MovieClip Frame 1
stop();
Symbol 641 MovieClip Frame 2
stop();
Symbol 642 Button
on (press) {
_root.ColorLevelBoxFunc(12);
}
Symbol 643 MovieClip Frame 1
stop();
Symbol 643 MovieClip Frame 2
stop();
Symbol 665 Button
on (press) {
_root.ControlsSelected(2);
}
Symbol 666 Button
on (press) {
_root.ControlsSelected(1);
}
Symbol 667 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 21
_root.LockAndUnlockLevels();
Symbol 667 MovieClip Frame 30
_root.playMC.green_btn_1.tabEnabled = false;
_root.playMC.green_btn_2.tabEnabled = false;
_root.playMC.green_btn_3.tabEnabled = false;
_root.playMC.red_btn_1.tabEnabled = false;
_root.playMC.red_btn_2.tabEnabled = false;
_root.playMC.red_btn_3.tabEnabled = false;
_root.playMC.blue_btn_1.tabEnabled = false;
_root.playMC.blue_btn_2.tabEnabled = false;
_root.playMC.blue_btn_3.tabEnabled = false;
_root.playMC.blue_btn_4.tabEnabled = false;
this.lock1.gotoAndStop("off");
stop();
Symbol 667 MovieClip Frame 43
stop();
Symbol 669 MovieClip Frame 1
stop();
Symbol 669 MovieClip Frame 2
stop();
Symbol 682 Button
on (press) {
_global.SoundManager.PlaySound("click");
_root.HotkeysActions();
}
Symbol 693 MovieClip Frame 1
stop();
Symbol 693 MovieClip Frame 2
stop();
Symbol 699 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 != "ico1Clip") {
this.ico1Clip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "ico2Clip") {
this.ico2Clip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "ico3Clip") {
this.ico3Clip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "ico4Clip") {
this.ico4Clip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "ico5Clip") {
this.ico5Clip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "ico6Clip") {
this.ico6Clip.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.hotKey_up = Key.getCode();
OutputValue("up_txt", _global.hotKey_up);
}
if (hasFocus == "downClip") {
_global.hotKey_down = Key.getCode();
OutputValue("down_txt", _global.hotKey_down);
}
if (hasFocus == "leftClip") {
_global.hotKey_left = Key.getCode();
OutputValue("left_txt", _global.hotKey_left);
}
if (hasFocus == "rightClip") {
_global.hotKey_right = Key.getCode();
OutputValue("right_txt", _global.hotKey_right);
}
if (hasFocus == "ico1Clip") {
_global.hotKey_1 = Key.getCode();
OutputValue("i1_txt", _global.hotKey_1);
}
if (hasFocus == "ico2Clip") {
_global.hotKey_2 = Key.getCode();
OutputValue("i2_txt", _global.hotKey_2);
}
if (hasFocus == "ico3Clip") {
_global.hotKey_3 = Key.getCode();
OutputValue("i3_txt", _global.hotKey_3);
}
if (hasFocus == "ico4Clip") {
_global.hotKey_4 = Key.getCode();
OutputValue("i4_txt", _global.hotKey_4);
}
if (hasFocus == "ico5Clip") {
_global.hotKey_5 = Key.getCode();
OutputValue("i5_txt", _global.hotKey_5);
}
if (hasFocus == "ico6Clip") {
_global.hotKey_6 = Key.getCode();
OutputValue("i6_txt", _global.hotKey_6);
}
if (hasFocus == "pauseClip") {
_global.pauseHotkey = Key.getCode();
OutputValue("pause_txt", _global.pauseHotkey);
}
};
Key.addListener(keyListener);
OutputValue("up_txt", _global.hotKey_up);
OutputValue("down_txt", _global.hotKey_down);
OutputValue("left_txt", _global.hotKey_left);
OutputValue("right_txt", _global.hotKey_right);
OutputValue("i1_txt", _global.hotKey_1);
OutputValue("i2_txt", _global.hotKey_2);
OutputValue("i3_txt", _global.hotKey_3);
OutputValue("i4_txt", _global.hotKey_4);
OutputValue("i5_txt", _global.hotKey_5);
OutputValue("i6_txt", _global.hotKey_6);
OutputValue("pause_txt", _global.pauseHotkey);
Instance of Symbol 693 MovieClip "ico1Clip" in Symbol 699 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 693 MovieClip "ico2Clip" in Symbol 699 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 693 MovieClip "ico3Clip" in Symbol 699 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 693 MovieClip "ico4Clip" in Symbol 699 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 693 MovieClip "ico5Clip" in Symbol 699 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 693 MovieClip "ico6Clip" in Symbol 699 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 693 MovieClip "pauseClip" in Symbol 699 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 702 MovieClip Frame 1
stop();
Instance of Symbol 669 MovieClip "low" in Symbol 702 MovieClip Frame 20
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 669 MovieClip "med" in Symbol 702 MovieClip Frame 20
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 669 MovieClip "high" in Symbol 702 MovieClip Frame 20
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 669 MovieClip "musicOn" in Symbol 702 MovieClip Frame 20
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.PlayWithCrossFade(3);
}
Instance of Symbol 669 MovieClip "musicOff" in Symbol 702 MovieClip Frame 20
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 669 MovieClip "soundsOn" in Symbol 702 MovieClip Frame 20
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 669 MovieClip "soundsOff" in Symbol 702 MovieClip Frame 20
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 669 MovieClip "low" in Symbol 702 MovieClip Frame 30
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 669 MovieClip "med" in Symbol 702 MovieClip Frame 30
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 669 MovieClip "high" in Symbol 702 MovieClip Frame 30
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 669 MovieClip "musicOn" in Symbol 702 MovieClip Frame 30
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.PlayWithCrossFade(3);
}
Instance of Symbol 669 MovieClip "musicOff" in Symbol 702 MovieClip Frame 30
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 669 MovieClip "soundsOn" in Symbol 702 MovieClip Frame 30
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 669 MovieClip "soundsOff" in Symbol 702 MovieClip Frame 30
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 702 MovieClip Frame 31
_root.settingsMC.hotkeys_btn.tabEnabled = false;
stop();
Instance of Symbol 669 MovieClip "low" in Symbol 702 MovieClip Frame 31
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 669 MovieClip "med" in Symbol 702 MovieClip Frame 31
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 669 MovieClip "high" in Symbol 702 MovieClip Frame 31
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 669 MovieClip "musicOn" in Symbol 702 MovieClip Frame 31
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.PlayWithCrossFade(3);
}
Instance of Symbol 669 MovieClip "musicOff" in Symbol 702 MovieClip Frame 31
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 669 MovieClip "soundsOn" in Symbol 702 MovieClip Frame 31
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 669 MovieClip "soundsOff" in Symbol 702 MovieClip Frame 31
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 702 MovieClip Frame 44
stop();
Symbol 705 MovieClip Frame 1
stop();
Symbol 705 MovieClip Frame 31
stop();
Symbol 713 MovieClip Frame 1
stop();
Symbol 713 MovieClip Frame 2
stop();
Symbol 713 MovieClip Frame 3
stop();
Symbol 713 MovieClip Frame 4
stop();
Symbol 713 MovieClip Frame 5
stop();
Symbol 721 Button
on (release) {
_root.game.ExitGame();
}
Symbol 733 Button
on (release) {
_root.border2.outsideBorder.gotoAndPlay("toGame");
_root.game.NextLevel();
}
Symbol 736 Button
on (release) {
_root.border2.outsideBorder.gotoAndPlay("toGame");
_root.game.ResetGame();
}
Symbol 738 Button
on (release) {
_root.gotoAndStop("menu");
}
Symbol 743 Button
on (press) {
_root.GameStartAfterTut();
}
Instance of Symbol 539 MovieClip [p1] in Symbol 761 MovieClip Frame 10
on (release) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
Instance of Symbol 536 MovieClip [p2] in Symbol 761 MovieClip Frame 15
on (release) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
Instance of Symbol 533 MovieClip [p3] in Symbol 761 MovieClip Frame 19
on (release) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
Instance of Symbol 530 MovieClip [p4] in Symbol 761 MovieClip Frame 24
on (release) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
Instance of Symbol 528 MovieClip [p5] in Symbol 761 MovieClip Frame 28
on (release) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
Symbol 761 MovieClip Frame 33
stop();
Instance of Symbol 525 MovieClip [p6] in Symbol 761 MovieClip Frame 33
on (release) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
Symbol 785 MovieClip Frame 1
stop();
Symbol 789 MovieClip Frame 1
stop();
Symbol 802 MovieClip Frame 1
stop();
Symbol 804 MovieClip Frame 1
stop();
Symbol 831 MovieClip Frame 1
_root.game.blnTutorialFlag = true;
Symbol 831 MovieClip Frame 2
_root.game.blnTutorialFlag = true;
Symbol 831 MovieClip Frame 3
_root.game.blnTutorialFlag = true;
Symbol 831 MovieClip Frame 4
_root.game.blnTutorialFlag = true;
Symbol 831 MovieClip Frame 157
stop();
Symbol 831 MovieClip Frame 158
_root.game.HideEnemies();
Symbol 831 MovieClip Frame 189
var tempName = _root.game.GetAvatarName();
_root[tempName].TurnOff();
_global.tutorialMove = true;
stop();
Symbol 831 MovieClip Frame 205
_root.attachMovie("power", "power_mc", _root.getNextHighestDepth());
_root.power_mc._x = 270;
_root.power_mc._y = 250;
Symbol 831 MovieClip Frame 235
stop();
Symbol 831 MovieClip Frame 236
var tempName = _root.game.GetAvatarName();
_root[tempName].TurnOff();
_global.tutorialMove = false;
_root[tempName]._xscale = _root[tempName]._xscale + 35;
_root[tempName]._yscale = _root[tempName]._yscale + 35;
_root.power_mc.swapDepths(1);
_root.power_mc.removeMovieClip();
Symbol 831 MovieClip Frame 274
stop();
Symbol 831 MovieClip Frame 305
stop();
Symbol 831 MovieClip Frame 334
_root.GetAllIconStrings();
_root.pause_mc.whoamiBubble.icon1_txt.text = _root.icon1Text;
_root.pause_mc.whoamiBubble.icon2_txt.text = _root.icon2Text;
_root.pause_mc.whoamiBubble.icon3_txt.text = _root.icon3Text;
_root.pause_mc.whoamiBubble.icon4_txt.text = _root.icon4Text;
_root.pause_mc.whoamiBubble.icon5_txt.text = _root.icon5Text;
_root.pause_mc.whoamiBubble.icon6_txt.text = _root.icon6Text;
stop();
Instance of Symbol 772 MovieClip in Symbol 831 MovieClip Frame 334
onClipEvent (enterFrame) {
_root.QuickKeyUse();
}
Symbol 831 MovieClip Frame 335
_root[tempName]._x = 2000;
Symbol 831 MovieClip Frame 374
stop();
Symbol 831 MovieClip Frame 407
stop();
Symbol 831 MovieClip Frame 438
stop();
Symbol 831 MovieClip Frame 471
stop();
Instance of Symbol 814 MovieClip in Symbol 831 MovieClip Frame 480
on (release) {
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
Symbol 831 MovieClip Frame 501
stop();
Symbol 831 MovieClip Frame 532
stop();
Symbol 831 MovieClip Frame 562
stop();
_root.pause_mc.whoamiBubble.pause_button_txt.text = _root.OutputValue2(_global.pauseHotkey);
Symbol 831 MovieClip Frame 577
_root.GameStartAfterTut();
stop();
Symbol 834 Button
on (release) {
_global.SoundManager.PlaySound("click");
_root.pause_mc.whoamiBubble.nextFrame();
_root.pause_mc.whoamiBubble.play();
}
Symbol 835 MovieClip Frame 1
stop();
Symbol 835 MovieClip Frame 15
stop();
Symbol 835 MovieClip Frame 30
_root.game.UnPauseGame();
gotoAndStop (1);
Symbol 835 MovieClip Frame 46
stop();
Symbol 835 MovieClip Frame 61
gotoAndStop (1);
Symbol 835 MovieClip Frame 77
stop();
Symbol 835 MovieClip Frame 92
gotoAndStop (1);
Symbol 835 MovieClip Frame 107
stop();
Symbol 835 MovieClip Frame 119
gotoAndStop (1);
Symbol 835 MovieClip Frame 121
stop();