Frame 1
function onEnterFrame() {
if (this._currentframe == 1) {
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
loader._xscale = getPercent * 100;
if ((bytes_loaded == bytes_total) && (thePlay._x < 0)) {
if ((domain == "armorgames.com") || (domain == "www.armorgames.com")) {
gotoAndStop (2);
}
loader._x = 1000;
outer._x = 1000;
thePlay._x = Stage.width / 2;
thePlay.onRollOver = function () {
thePlay._xscale = (thePlay._yscale = 150);
};
thePlay.onRollOut = function () {
thePlay._xscale = (thePlay._yscale = 100);
};
thePlay.onRelease = function () {
gotoAndStop (2);
};
}
}
}
function goToThisURL() {
getURL ("http://armorgames.com", "_blank");
}
function createContextMenu(menu) {
_root.menu = menu;
}
stop();
Playtomic.Log.View(3394, "f0eee97b344f4bac", _root._url);
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var mainItem = new ContextMenuItem("Play More Games", goToThisURL);
myMenu.customItems.push(mainItem);
createContextMenu(myMenu);
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if ((domain == "armorgames.com") || (domain == "www.armorgames.com")) {
outer._y = Stage.height / 2;
loader._y = Stage.height / 2;
} else {
var CPMStarContentSpotID = "1942QBD15FC50";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
}
Instance of Symbol 91 MovieClip in Frame 1
on (release) {
getURL ("http://armorgames.com", "_BLANK");
}
Instance of Symbol 116 MovieClip in Frame 2
on (release) {
getURL ("http://armorgames.com", "_BLANK");
}
Frame 3
function createTransition(frame) {
st = attachMovie("screenTransition", "screenTransition", 980000);
st._x = Stage.width / 2;
st._y = Stage.height / 2;
st.Frame = frame + 1;
}
function finishTransition() {
st = attachMovie("screenTransition", "screenTransition", 980000);
st.gotoAndPlay(25);
st._x = Stage.width / 2;
st._y = Stage.height / 2;
}
function waitToMove() {
if ((st._x != undefined) && (st._currentframe == 25)) {
gotoAndStop(st.Frame);
st.removeMovieClip();
}
}
function onEnterFrame() {
waitToMove();
if (goMax) {
menu2.sg._xscale = menu2.sg._xscale + ((150 - menu2.sg._xscale) / 4);
} else {
menu2.sg._xscale = menu2.sg._xscale + ((100 - menu2.sg._xscale) / 4);
}
menu2.sg._yscale = menu2.sg._xscale;
if (mgMax) {
menu2.mg._xscale = menu2.mg._xscale + ((150 - menu2.mg._xscale) / 4);
} else {
menu2.mg._xscale = menu2.mg._xscale + ((100 - menu2.mg._xscale) / 4);
}
menu2.mg._yscale = menu2.mg._xscale;
if (optMax) {
menu2.opt._xscale = menu2.opt._xscale + ((150 - menu2.opt._xscale) / 4);
} else {
menu2.opt._xscale = menu2.opt._xscale + ((100 - menu2.opt._xscale) / 4);
}
menu2.opt._yscale = menu2.opt._xscale;
if (creMax) {
menu2.cre._xscale = menu2.cre._xscale + ((150 - menu2.cre._xscale) / 4);
} else {
menu2.cre._xscale = menu2.cre._xscale + ((100 - menu2.cre._xscale) / 4);
}
menu2.cre._yscale = menu2.cre._xscale;
if (lagMax) {
menu2.lag._xscale = menu2.lag._xscale + ((150 - menu2.lag._xscale) / 4);
} else {
menu2.lag._xscale = menu2.lag._xscale + ((100 - menu2.lag._xscale) / 4);
}
menu2.lag._yscale = menu2.lag._xscale;
}
function resetValues() {
days = 0;
penguinsOwned = 1;
penguinsBought = new Array(true, false, false, false, false);
money = 0;
totalKills = 0;
levels = new Array(0, 0, 0, 0);
nextDisplay = 1;
levelsUnlocked = 1;
muted2 = false;
qualityLevel = 2;
penguin1BeaksOwned = new Array(true, false, false, false, false);
penguin1HeadsOwned = new Array(true, false, false, false, false);
penguin1BodiesOwned = new Array(true, false, false, false, false);
penguin1ArmsOwned = new Array(true, false, false, false, false);
penguin1FeetOwned = new Array(true, false, false, false, false);
penguin1Parts = new Array(penguin1BeaksOwned, penguin1HeadsOwned, penguin1BodiesOwned, penguin1ArmsOwned, penguin1FeetOwned);
penguin1PartsEquipped = new Array(1, 1, 1, 1, 1);
penguin2BeaksOwned = new Array(true, false, false, false, false);
penguin2HeadsOwned = new Array(true, false, false, false, false);
penguin2BodiesOwned = new Array(true, false, false, false, false);
penguin2ArmsOwned = new Array(true, false, false, false, false);
penguin2FeetOwned = new Array(true, false, false, false, false);
penguin2Parts = new Array(penguin2BeaksOwned, penguin2HeadsOwned, penguin2BodiesOwned, penguin2ArmsOwned, penguin2FeetOwned);
penguin2PartsEquipped = new Array(1, 1, 1, 1, 1);
penguin3BeaksOwned = new Array(true, false, false, false, false);
penguin3HeadsOwned = new Array(true, false, false, false, false);
penguin3BodiesOwned = new Array(true, false, false, false, false);
penguin3ArmsOwned = new Array(true, false, false, false, false);
penguin3FeetOwned = new Array(true, false, false, false, false);
penguin3Parts = new Array(penguin3BeaksOwned, penguin3HeadsOwned, penguin3BodiesOwned, penguin3ArmsOwned, penguin3FeetOwned);
penguin3PartsEquipped = new Array(1, 1, 1, 1, 1);
penguin4BeaksOwned = new Array(true, false, false, false, false);
penguin4HeadsOwned = new Array(true, false, false, false, false);
penguin4BodiesOwned = new Array(true, false, false, false, false);
penguin4ArmsOwned = new Array(true, false, false, false, false);
penguin4FeetOwned = new Array(true, false, false, false, false);
penguin4Parts = new Array(penguin4BeaksOwned, penguin4HeadsOwned, penguin4BodiesOwned, penguin4ArmsOwned, penguin4FeetOwned);
penguin4PartsEquipped = new Array(1, 1, 1, 1, 1);
penguin5BeaksOwned = new Array(true, false, false, false, false);
penguin5HeadsOwned = new Array(true, false, false, false, false);
penguin5BodiesOwned = new Array(true, false, false, false, false);
penguin5ArmsOwned = new Array(true, false, false, false, false);
penguin5FeetOwned = new Array(true, false, false, false, false);
penguin5Parts = new Array(penguin5BeaksOwned, penguin5HeadsOwned, penguin5BodiesOwned, penguin5ArmsOwned, penguin5FeetOwned);
penguin5PartsEquipped = new Array(1, 1, 1, 1, 1);
penguin6BeaksOwned = new Array(true, false, false, false, false);
penguin6HeadsOwned = new Array(true, false, false, false, false);
penguin6BodiesOwned = new Array(true, false, false, false, false);
penguin6ArmsOwned = new Array(true, false, false, false, false);
penguin6FeetOwned = new Array(true, false, false, false, false);
penguin6Parts = new Array(penguin6BeaksOwned, penguin6HeadsOwned, penguin6BodiesOwned, penguin6ArmsOwned, penguin6FeetOwned);
penguin6PartsEquipped = new Array(1, 1, 1, 1, 1);
penguinParts = new Array(penguin1Parts, penguin2Parts, penguin3Parts, penguin4Parts, penguin5Parts, penguin6Parts);
penguinPartsEquipped = new Array(penguin1PartsEquipped, penguin2PartsEquipped, penguin3PartsEquipped, penguin4PartsEquipped, penguin5PartsEquipped, penguin6PartsEquipped);
}
function saveGame() {
sObject.data.days = days;
sObject.flush();
sObject.data.penguinsBought = penguinsBought;
sObject.flush();
sObject.data.money = money;
sObject.flush();
sObject.data.totalKills = totalKills;
sObject.flush();
sObject.data.levels = levels;
sObject.flush();
sObject.data.nextDisplay = nextDisplay;
sObject.flush();
sObject.data.levelsUnlocked = levelsUnlocked;
sObject.flush();
sObject.data.muted2 = muted2;
sObject.flush();
sObject.data.qualityLevel = qualityLevel;
sObject.flush();
sObject.data.penguin1BeaksOwned = penguin1BeaksOwned;
sObject.flush();
sObject.data.penguin1HeadsOwned = penguin1HeadsOwned;
sObject.flush();
sObject.data.penguin1BodiesOwned = penguin1BodiesOwned;
sObject.flush();
sObject.data.penguin1ArmsOwned = penguin1ArmsOwned;
sObject.flush();
sObject.data.penguin1FeetOwned = penguin1FeetOwned;
sObject.flush();
sObject.data.penguin1PartsEquipped = penguin1PartsEquipped;
sObject.flush();
sObject.data.penguin1Parts = penguin1Parts;
sObject.flush();
sObject.data.penguin2BeaksOwned = penguin2BeaksOwned;
sObject.flush();
sObject.data.penguin2HeadsOwned = penguin2HeadsOwned;
sObject.flush();
sObject.data.penguin2BodiesOwned = penguin2BodiesOwned;
sObject.flush();
sObject.data.penguin2ArmsOwned = penguin2ArmsOwned;
sObject.flush();
sObject.data.penguin2FeetOwned = penguin2FeetOwned;
sObject.flush();
sObject.data.penguin2PartsEquipped = penguin2PartsEquipped;
sObject.flush();
sObject.data.penguin2Parts = penguin2Parts;
sObject.flush();
sObject.data.penguin3BeaksOwned = penguin3BeaksOwned;
sObject.flush();
sObject.data.penguin3HeadsOwned = penguin3HeadsOwned;
sObject.flush();
sObject.data.penguin3BodiesOwned = penguin3BodiesOwned;
sObject.flush();
sObject.data.penguin3ArmsOwned = penguin3ArmsOwned;
sObject.flush();
sObject.data.penguin3FeetOwned = penguin3FeetOwned;
sObject.flush();
sObject.data.penguin3PartsEquipped = penguin3PartsEquipped;
sObject.flush();
sObject.data.penguin3Parts = penguin3Parts;
sObject.flush();
sObject.data.penguin4BeaksOwned = penguin4BeaksOwned;
sObject.flush();
sObject.data.penguin4HeadsOwned = penguin4HeadsOwned;
sObject.flush();
sObject.data.penguin4BodiesOwned = penguin4BodiesOwned;
sObject.flush();
sObject.data.penguin4ArmsOwned = penguin4ArmsOwned;
sObject.flush();
sObject.data.penguin4FeetOwned = penguin4FeetOwned;
sObject.flush();
sObject.data.penguin4PartsEquipped = penguin4PartsEquipped;
sObject.flush();
sObject.data.penguin4Parts = penguin4Parts;
sObject.flush();
sObject.data.penguin5BeaksOwned = penguin5BeaksOwned;
sObject.flush();
sObject.data.penguin5HeadsOwned = penguin5HeadsOwned;
sObject.flush();
sObject.data.penguin5BodiesOwned = penguin5BodiesOwned;
sObject.flush();
sObject.data.penguin5ArmsOwned = penguin5ArmsOwned;
sObject.flush();
sObject.data.penguin5FeetOwned = penguin5FeetOwned;
sObject.flush();
sObject.data.penguin5PartsEquipped = penguin5PartsEquipped;
sObject.flush();
sObject.data.penguin5Parts = penguin5Parts;
sObject.flush();
sObject.data.penguin6BeaksOwned = penguin6BeaksOwned;
sObject.flush();
sObject.data.penguin6HeadsOwned = penguin6HeadsOwned;
sObject.flush();
sObject.data.penguin6BodiesOwned = penguin6BodiesOwned;
sObject.flush();
sObject.data.penguin6ArmsOwned = penguin6ArmsOwned;
sObject.flush();
sObject.data.penguin6FeetOwned = penguin6FeetOwned;
sObject.flush();
sObject.data.penguin6PartsEquipped = penguin6PartsEquipped;
sObject.flush();
sObject.data.penguin6Parts = penguin6Parts;
sObject.flush();
sObject.data.penguinPartsEquipped = penguinPartsEquipped;
sObject.flush();
sObject.data.penguinParts = penguinParts;
sObject.flush();
}
stop();
goMax = false;
mgMax = false;
optMax = false;
creMax = false;
lagMax = false;
menu2.sg.onRollOver = function () {
goMax = true;
};
menu2.sg.onRollOut = function () {
goMax = false;
};
menu2.mg.onRollOver = function () {
mgMax = true;
};
menu2.mg.onRollOut = function () {
mgMax = false;
};
menu2.lag.onRollOver = function () {
lagMax = true;
};
menu2.lag.onRollOut = function () {
lagMax = false;
};
menu2.opt.onRollOver = function () {
optMax = true;
};
menu2.opt.onRollOut = function () {
optMax = false;
};
menu2.cre.onRollOver = function () {
creMax = true;
};
menu2.cre.onRollOut = function () {
creMax = false;
};
menu2.sg.onRelease = function () {
createTransition(3);
Playtomic.Log.Play();
};
menu2.mg.onRelease = function () {
getURL ("http://armorgames.com", "_BLANK");
};
menu2.lag.onRelease = function () {
getURL ("http://www.facebook.com/ArmorGames", "_BLANK");
};
menu2.opt.onRelease = function () {
createTransition(5);
};
menu2.cre.onRelease = function () {
createTransition(4);
};
if (wasHere == undefined) {
wasHere = false;
}
if (wasHere) {
finishTransition();
}
resetValues();
sObject = SharedObject.getLocal("saveFile");
if (sObject.data.muted2 != undefined) {
muted2 = sObject.data.muted2;
}
if (sObject.data.days != undefined) {
days = sObject.data.days;
}
if (sObject.data.penguinsOwned != undefined) {
penguinsOwned = sObject.data.penguinsOwned;
}
if (sObject.data.money != undefined) {
money = sObject.data.money;
}
if (sObject.data.totalKills != undefined) {
totalKills = sObject.data.totalKills;
}
if (sObject.data.nextDisplay != undefined) {
nextDisplay = sObject.data.nextDisplay;
}
if (nextDisplay != 1) {
nextDisplay = 16;
}
if (sObject.data.levelsUnlocked != undefined) {
levelsUnlocked = sObject.data.levelsUnlocked;
}
if (sObject.data.qualityLevel != undefined) {
qualityLevel = sObject.data.qualityLevel;
}
i = 0;
while (i < penguinsBought.length) {
if (sObject.data.penguinsBought[i] != undefined) {
penguinsBought[i] = sObject.data.penguinsBought[i];
}
i++;
}
i = 0;
while (i < levels.length) {
if (sObject.data.levels[i] != undefined) {
levels[i] = sObject.data.levels[i];
}
i++;
}
i = 0;
while (i < penguin1BeaksOwned.length) {
if (sObject.data.penguin1BeaksOwned[i] != undefined) {
penguin1BeaksOwned[i] = sObject.data.penguin1BeaksOwned[i];
}
i++;
}
i = 0;
while (i < penguin1HeadsOwned.length) {
if (sObject.data.penguin1HeadsOwned[i] != undefined) {
penguin1HeadsOwned[i] = sObject.data.penguin1HeadsOwned[i];
}
i++;
}
i = 0;
while (i < penguin1BodiesOwned.length) {
if (sObject.data.penguin1BodiesOwned[i] != undefined) {
penguin1BodiesOwned[i] = sObject.data.penguin1BodiesOwned[i];
}
i++;
}
i = 0;
while (i < penguin1ArmsOwned.length) {
if (sObject.data.penguin1ArmsOwned[i] != undefined) {
penguin1ArmsOwned[i] = sObject.data.penguin1ArmsOwned[i];
}
i++;
}
i = 0;
while (i < penguin1FeetOwned.length) {
if (sObject.data.penguin1FeetOwned[i] != undefined) {
penguin1FeetOwned[i] = sObject.data.penguin1FeetOwned[i];
}
i++;
}
i = 0;
while (i < penguin1Parts.length) {
if (sObject.data.penguin1Parts[i] != undefined) {
penguin1Parts[i] = sObject.data.penguin1Parts[i];
}
i++;
}
i = 0;
while (i < penguin1PartsEquipped.length) {
if (sObject.data.penguin1PartsEquipped[i] != undefined) {
penguin1PartsEquipped[i] = sObject.data.penguin1PartsEquipped[i];
}
i++;
}
i = 0;
while (i < penguin2BeaksOwned.length) {
if (sObject.data.penguin2BeaksOwned[i] != undefined) {
penguin2BeaksOwned[i] = sObject.data.penguin2BeaksOwned[i];
}
i++;
}
i = 0;
while (i < penguin2HeadsOwned.length) {
if (sObject.data.penguin2HeadsOwned[i] != undefined) {
penguin2HeadsOwned[i] = sObject.data.penguin2HeadsOwned[i];
}
i++;
}
i = 0;
while (i < penguin2BodiesOwned.length) {
if (sObject.data.penguin2BodiesOwned[i] != undefined) {
penguin2BodiesOwned[i] = sObject.data.penguin2BodiesOwned[i];
}
i++;
}
i = 0;
while (i < penguin2ArmsOwned.length) {
if (sObject.data.penguin2ArmsOwned[i] != undefined) {
penguin2ArmsOwned[i] = sObject.data.penguin2ArmsOwned[i];
}
i++;
}
i = 0;
while (i < penguin2FeetOwned.length) {
if (sObject.data.penguin2FeetOwned[i] != undefined) {
penguin2FeetOwned[i] = sObject.data.penguin2FeetOwned[i];
}
i++;
}
i = 0;
while (i < penguin2Parts.length) {
if (sObject.data.penguin2Parts[i] != undefined) {
penguin2Parts[i] = sObject.data.penguin2Parts[i];
}
i++;
}
i = 0;
while (i < penguin2PartsEquipped.length) {
if (sObject.data.penguin2PartsEquipped[i] != undefined) {
penguin2PartsEquipped[i] = sObject.data.penguin2PartsEquipped[i];
}
i++;
}
i = 0;
while (i < penguin3BeaksOwned.length) {
if (sObject.data.penguin3BeaksOwned[i] != undefined) {
penguin3BeaksOwned[i] = sObject.data.penguin3BeaksOwned[i];
}
i++;
}
i = 0;
while (i < penguin3HeadsOwned.length) {
if (sObject.data.penguin3HeadsOwned[i] != undefined) {
penguin3HeadsOwned[i] = sObject.data.penguin3HeadsOwned[i];
}
i++;
}
i = 0;
while (i < penguin3BodiesOwned.length) {
if (sObject.data.penguin3BodiesOwned[i] != undefined) {
penguin3BodiesOwned[i] = sObject.data.penguin3BodiesOwned[i];
}
i++;
}
i = 0;
while (i < penguin3ArmsOwned.length) {
if (sObject.data.penguin3ArmsOwned[i] != undefined) {
penguin3ArmsOwned[i] = sObject.data.penguin3ArmsOwned[i];
}
i++;
}
i = 0;
while (i < penguin3FeetOwned.length) {
if (sObject.data.penguin3FeetOwned[i] != undefined) {
penguin3FeetOwned[i] = sObject.data.penguin3FeetOwned[i];
}
i++;
}
i = 0;
while (i < penguin3Parts.length) {
if (sObject.data.penguin3Parts[i] != undefined) {
penguin3Parts[i] = sObject.data.penguin3Parts[i];
}
i++;
}
i = 0;
while (i < penguin3PartsEquipped.length) {
if (sObject.data.penguin3PartsEquipped[i] != undefined) {
penguin3PartsEquipped[i] = sObject.data.penguin3PartsEquipped[i];
}
i++;
}
i = 0;
while (i < penguin4BeaksOwned.length) {
if (sObject.data.penguin4BeaksOwned[i] != undefined) {
penguin4BeaksOwned[i] = sObject.data.penguin4BeaksOwned[i];
}
i++;
}
i = 0;
while (i < penguin4HeadsOwned.length) {
if (sObject.data.penguin4HeadsOwned[i] != undefined) {
penguin4HeadsOwned[i] = sObject.data.penguin4HeadsOwned[i];
}
i++;
}
i = 0;
while (i < penguin4BodiesOwned.length) {
if (sObject.data.penguin4BodiesOwned[i] != undefined) {
penguin4BodiesOwned[i] = sObject.data.penguin4BodiesOwned[i];
}
i++;
}
i = 0;
while (i < penguin4ArmsOwned.length) {
if (sObject.data.penguin4ArmsOwned[i] != undefined) {
penguin4ArmsOwned[i] = sObject.data.penguin4ArmsOwned[i];
}
i++;
}
i = 0;
while (i < penguin4FeetOwned.length) {
if (sObject.data.penguin4FeetOwned[i] != undefined) {
penguin4FeetOwned[i] = sObject.data.penguin4FeetOwned[i];
}
i++;
}
i = 0;
while (i < penguin4Parts.length) {
if (sObject.data.penguin4Parts[i] != undefined) {
penguin4Parts[i] = sObject.data.penguin4Parts[i];
}
i++;
}
i = 0;
while (i < penguin4PartsEquipped.length) {
if (sObject.data.penguin4PartsEquipped[i] != undefined) {
penguin4PartsEquipped[i] = sObject.data.penguin4PartsEquipped[i];
}
i++;
}
i = 0;
while (i < penguin5BeaksOwned.length) {
if (sObject.data.penguin5BeaksOwned[i] != undefined) {
penguin5BeaksOwned[i] = sObject.data.penguin5BeaksOwned[i];
}
i++;
}
i = 0;
while (i < penguin5HeadsOwned.length) {
if (sObject.data.penguin5HeadsOwned[i] != undefined) {
penguin5HeadsOwned[i] = sObject.data.penguin5HeadsOwned[i];
}
i++;
}
i = 0;
while (i < penguin5BodiesOwned.length) {
if (sObject.data.penguin5BodiesOwned[i] != undefined) {
penguin5BodiesOwned[i] = sObject.data.penguin5BodiesOwned[i];
}
i++;
}
i = 0;
while (i < penguin5ArmsOwned.length) {
if (sObject.data.penguin5ArmsOwned[i] != undefined) {
penguin5ArmsOwned[i] = sObject.data.penguin5ArmsOwned[i];
}
i++;
}
i = 0;
while (i < penguin5FeetOwned.length) {
if (sObject.data.penguin5FeetOwned[i] != undefined) {
penguin5FeetOwned[i] = sObject.data.penguin5FeetOwned[i];
}
i++;
}
i = 0;
while (i < penguin5Parts.length) {
if (sObject.data.penguin5Parts[i] != undefined) {
penguin5Parts[i] = sObject.data.penguin5Parts[i];
}
i++;
}
i = 0;
while (i < penguin5PartsEquipped.length) {
if (sObject.data.penguin5PartsEquipped[i] != undefined) {
penguin5PartsEquipped[i] = sObject.data.penguin5PartsEquipped[i];
}
i++;
}
i = 0;
while (i < penguin6BeaksOwned.length) {
if (sObject.data.penguin6BeaksOwned[i] != undefined) {
penguin6BeaksOwned[i] = sObject.data.penguin6BeaksOwned[i];
}
i++;
}
i = 0;
while (i < penguin6HeadsOwned.length) {
if (sObject.data.penguin6HeadsOwned[i] != undefined) {
penguin6HeadsOwned[i] = sObject.data.penguin6HeadsOwned[i];
}
i++;
}
i = 0;
while (i < penguin6BodiesOwned.length) {
if (sObject.data.penguin6BodiesOwned[i] != undefined) {
penguin6BodiesOwned[i] = sObject.data.penguin6BodiesOwned[i];
}
i++;
}
i = 0;
while (i < penguin6ArmsOwned.length) {
if (sObject.data.penguin6ArmsOwned[i] != undefined) {
penguin6ArmsOwned[i] = sObject.data.penguin6ArmsOwned[i];
}
i++;
}
i = 0;
while (i < penguin6FeetOwned.length) {
if (sObject.data.penguin6FeetOwned[i] != undefined) {
penguin6FeetOwned[i] = sObject.data.penguin6FeetOwned[i];
}
i++;
}
i = 0;
while (i < penguin6Parts.length) {
if (sObject.data.penguin6Parts[i] != undefined) {
penguin6Parts[i] = sObject.data.penguin6Parts[i];
}
i++;
}
i = 0;
while (i < penguin6PartsEquipped.length) {
if (sObject.data.penguin6PartsEquipped[i] != undefined) {
penguin6PartsEquipped[i] = sObject.data.penguin6PartsEquipped[i];
}
i++;
}
i = 0;
while (i < penguinParts.length) {
if (sObject.data.penguinParts[i] != undefined) {
penguinParts[i] = sObject.data.penguinParts[i];
}
i++;
}
i = 0;
while (i < penguinPartsEquipped.length) {
if (sObject.data.penguinPartsEquipped[i] != undefined) {
penguinPartsEquipped[i] = sObject.data.penguinPartsEquipped[i];
}
i++;
}
penguinPartsEquipped[5][0] = levels[2];
penguinPartsEquipped[5][1] = levels[2];
penguinPartsEquipped[5][2] = levels[2];
penguinPartsEquipped[5][3] = levels[2];
penguinPartsEquipped[5][4] = levels[2];
bgTarget = Math.floor((levelsUnlocked - 1) / 10);
Instance of Symbol 144 MovieClip in Frame 3
on (release) {
getURL ("http://armorgames.com", "_BLANK");
}
Frame 4
function init() {
ui.swapDepths(890000);
rtp.swapDepths(895000);
highDepth = 900000 /* 0x0DBBA0 */;
depth = 100000 /* 0x0186A0 */;
pDepth = 600000 /* 0x0927C0 */;
lowDepth = 100;
gamePause = true;
playerPause = false;
inMenu = true;
level = 1;
bunniesOnStage = 0;
bg._x = Stage.width / 2;
bg._y = (Stage.height / 2) - 20;
bg.gotoAndStop(level);
bg.obstacle.gotoAndStop(level);
itemScales = new Array(100, 80, 60, 40);
bunniesPerLevelType1C = new Array(2, 5, 0, 5, 15, 0, 15, 30, 0, 10, 0, 10, 0, 20, 8, 0, 80, 0, 0, 20, 7, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15);
bunniesPerLevelType2C = new Array(0, 0, 7, 5, 0, 10, 5, 0, 0, 10, 0, 10, 30, 0, 8, 0, 0, 0, 30, 0, 7, 0, 0, 14, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15);
bunniesPerLevelType3C = new Array(0, 0, 0, 0, 0, 5, 5, 0, 30, 0, 20, 10, 0, 0, 8, 20, 0, 0, 0, 20, 7, 0, 0, 14, 0, 0, 0, 40, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15);
bunniesPerLevelType4C = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 5, 8, 5, 8, 10, 0, 15, 15, 12, 7, 0, 20, 14, 0, 20, 20, 25, 60, 0, 0, 15, 40, 0, 50, 40, 40, 20, 50, 15);
bunniesPerLevelType5C = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 8, 10, 0, 0, 5, 10, 7, 0, 0, 14, 0, 0, 20, 0, 0, 0, 0, 15, 0, 40, 0, 0, 20, 20, 0, 15);
bunniesPerLevelType6C = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 45, 30, 14, 0, 0, 0, 40, 0, 0, 0, 15, 0, 0, 30, 0, 0, 0, 0, 15);
bunniesPerLevelType7C = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 40, 20, 0, 0, 0, 0, 0, 40, 30, 0, 0, 20, 20, 0, 15);
bunniesPerLevelType8C = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 25, 15, 0, 0, 0, 20, 20, 0, 0, 15);
bunniesPerLevelType9C = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 20, 0, 20, 20, 15);
bunniesPerLevelType10C = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 15);
bunniesPerLevelC = new Array(bunniesPerLevelType1C, bunniesPerLevelType2C, bunniesPerLevelType3C, bunniesPerLevelType4C, bunniesPerLevelType5C, bunniesPerLevelType6C, bunniesPerLevelType7C, bunniesPerLevelType8C, bunniesPerLevelType9C, bunniesPerLevelType10C);
bunniesPerLevelType1 = new Array();
bunniesPerLevelType2 = new Array();
bunniesPerLevelType3 = new Array();
bunniesPerLevelType4 = new Array();
bunniesPerLevelType5 = new Array();
bunniesPerLevelType6 = new Array();
bunniesPerLevelType7 = new Array();
bunniesPerLevelType8 = new Array();
bunniesPerLevelType9 = new Array();
bunniesPerLevelType10 = new Array();
bunniesPerLevel = new Array(bunniesPerLevelType1, bunniesPerLevelType2, bunniesPerLevelType3, bunniesPerLevelType4, bunniesPerLevelType5, bunniesPerLevelType6, bunniesPerLevelType7, bunniesPerLevelType8, bunniesPerLevelType9, bunniesPerLevelType10);
i = bunniesPerLevelC.length - 1;
while (i >= 0) {
k = bunniesPerLevelC[i].length - 1;
while (k >= 0) {
bunniesPerLevel[i][k] = bunniesPerLevelC[i][k];
k--;
}
i--;
}
bunnyAmountMax = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10);
updatePenguinStats();
}
function alphaHover(button) {
button.onRollOver = function () {
button._alpha = 75;
};
button.onRollOut = function () {
button._alpha = 100;
};
}
function pauseStuff() {
if (playerPause) {
ps = attachMovie("pauseScreen", "pauseScreen" + highDepth, highDepth++);
ps._x = Stage.width / 2;
ps._y = Stage.height / 2;
ps.ctu.onRelease = function () {
ps.removeMovieClip();
playerPause = false;
};
ps.qtm.onRelease = function () {
ps.removeMovieClip();
removeGame();
gotoAndStop (3);
};
} else {
ps.removeMovieClip();
}
}
function onEnterFrame() {
shopMovement();
transitionManagement();
if ((!gamePause) && (!playerPause)) {
manageGame();
}
}
function shopMovement() {
if (inMenu && (levelBgs[0]._x != undefined)) {
q = levelBgs.length - 1;
while (q >= 0) {
button = levelBgs[q];
if (button.hitTest(_xmouse, _ymouse, true) && (Math.floor((levelsUnlocked - 1) / 10) >= q)) {
bgTarget = q;
}
q--;
}
i = levelBgs.length - 1;
while (i >= 0) {
levelBgs[i]._x = levelBgs[i]._x - ((levelBgs[i]._x - bgTargets[bgTarget][i]) / 4);
i--;
}
}
}
function manageGame() {
if ((!levelStarted) && (!inMenu)) {
timeToRelease = timeToRelease - 1;
setStage();
bunnyMovement();
updateStats();
}
if (levelStarted) {
decideOnBunnies(false);
addMenuManager();
penguinMovement();
shellMovement();
monMovement();
goldMovement();
explosionMovement();
bunnyMovement();
bunBulletMovement();
acidMovement();
stickyMovement();
partMovement();
tDelay();
hitTesting();
specialManager();
updateStats();
}
}
function tDelay() {
transDelay = transDelay - 1;
if (transDelay == 0) {
if (((bunniesOnStage == 0) && (shells.length == 0)) && (!inMenu)) {
gamePause = true;
transitionToGame(3, 0);
}
}
}
function addMenuManager() {
startCounter = startCounter - 1;
if ((startCounter <= 0) && (penguins.length == 0)) {
levelDone(false);
displayInfo(nextDisplay);
}
}
function updateStats() {
ui.moneyTxt.htmlText = bold(money);
ui.bombNum.htmlText = bold(specialAmounts[3]);
if (specialAmounts[3] == 0) {
ui.bombNum.htmlText = "";
}
theTotal = 0;
q = 0;
while (q < bunniesPerLevel.length) {
theTotal = theTotal + bunniesPerLevel[q][level - 1];
q++;
}
ui.enemyTxt.htmlText = bold(theTotal);
}
function special1() {
if (specialAmounts[0] >= 1) {
finishInfo();
specialSpeedLife = specialSpeedLifes[levels[speedLevel]];
specialAmounts[0] = specialAmounts[0] - 1;
specials[0].gotoAndStop(5);
}
}
function special2() {
if (specialAmounts[1] >= 1) {
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
penguin.health = penguin.health + (penguin.healthMax * lifeSpecials[levels[lifeLevel] - 1]);
p--;
}
specialAmounts[1] = specialAmounts[1] - 1;
specials[1].gotoAndStop(5);
}
}
function special3() {
if (specialAmounts[2] >= 1) {
pen = attachMovie("penguin", "penguin" + highDepth, highDepth++);
pen._x = _xmouse;
pen._y = _ymouse;
if (itemInHand != null) {
itemHeld = -1;
itemInHand = null;
pen.removeMovieClip();
} else {
itemInHand = pen;
itemHeld = penguinItem;
}
clickedDelay = 0;
}
}
function special4() {
if (specialAmounts[3] >= 1) {
bo = attachMovie("bomb", "bomb" + highDepth, highDepth++);
bo._x = _xmouse;
bo._y = _ymouse;
if (itemInHand != null) {
itemHeld = -1;
itemInHand = null;
bo.removeMovieClip();
} else {
itemInHand = bo;
itemHeld = bombItem;
}
clickedDelay = 0;
}
}
function specialManager() {
if (MouseDown) {
MouseDown = false;
if (_ymouse < 500) {
if (itemHeld == 0) {
itemHeld = -1;
createSpecialPenguin();
specialAmounts[2] = specialAmounts[2] - 1;
specials[2].gotoAndStop(5);
itemInHand.removeMovieClip();
itemInHand = null;
}
if (itemHeld == 1) {
itemHeld = -1;
createExplosion(_xmouse, _ymouse, true);
specialAmounts[3] = specialAmounts[3] - 1;
specials[3].gotoAndStop(5);
itemInHand.removeMovieClip();
itemInHand = null;
}
} else if (clickedDelay > 1) {
itemHeld = -1;
itemInHand.removeMovieClip();
itemInHand = null;
}
}
clickedDelay = clickedDelay + 1;
if (itemInHand != null) {
itemInHand._x = _xmouse;
itemInHand._y = _ymouse;
}
i = 0;
while (i < specials.length) {
specials[i].gotoAndStop(i + 1);
if ((levels[i] == 0) || (specialAmounts[i] == 0)) {
specials[i].gotoAndStop(5);
}
if ((specialAmounts[i] > 0) && (levels[i] > 0)) {
createSpecialButton(specials[i], i);
}
i++;
}
}
function createExplosion(xCoord, yCoord, isDamaging) {
boom.start();
exp = attachMovie("explosion", "explosion" + highDepth, highDepth++);
exp.isDamaging = isDamaging;
exp._xscale = (exp._yscale = itemScales[Math.floor((level - 1) / 10)]);
exp._x = xCoord;
exp._y = yCoord;
explosions.push(exp);
}
function explosionMovement() {
e = explosions.length - 1;
while (e >= 0) {
explosion = explosions[e];
b = bunnies.length - 1;
while (b >= 0) {
bunny = bunnies[b];
if (explosion.hitBox.hitTest(bunny._x, bunny._y, true) && (explosion.isDamaging)) {
removeBunny(true);
}
b--;
}
if (explosion.ina._currentframe == 47) {
removeExplosion();
}
e--;
}
}
function removeExplosion() {
explosions[e].removeMovieClip();
explosions.splice(e, 1);
}
function createSpecialButton(button, num) {
button.onRollOver = function () {
button._alpha = 75;
};
button.onRollOut = function () {
button._alpha = 100;
};
button.onRelease = function () {
if ((!inMenu) && (levelStarted)) {
specialFunctions[num]();
delete button.onRollOver;
delete button.onRollOut;
delete button.onRelease;
button._alpha = 100;
}
};
}
function setStage() {
if (timeToRelease <= 0) {
timeToRelease = 50;
levelStarted = true;
clash.start();
p = 0;
while (p < 5) {
if (penguinsBought[p]) {
createPenguin(p + 1);
}
p++;
}
if ((days == 1) || (days == 3)) {
displayInfo(nextDisplay);
}
}
decideOnBunnies(true);
}
function decideOnBunnies(starting) {
theTotal = 0;
q = 0;
while (q < bunniesPerLevel.length) {
theTotal = theTotal + bunniesPerLevel[q][level - 1];
q++;
}
bunniesToAdd = theTotal;
if (bunniesToAdd > bunnyAmountMax[level - 1]) {
bunniesToAdd = bunnyAmountMax[level - 1] - bunniesOnStage;
} else {
bunniesToAdd = bunnyAmountMax[level - 1] - bunniesOnStage;
if (bunniesToAdd >= theTotal) {
bunniesToAdd = theTotal;
}
}
b = 0;
while (b < bunniesToAdd) {
bunType = calcType();
createBunny(bunType, starting);
b++;
}
}
function calcType() {
theChances = new Array();
theTotal = 0;
theChances.push(0);
q = 0;
while (q < bunniesPerLevel.length) {
theChances.push(bunniesPerLevel[q][level - 1] + theTotal);
theTotal = theTotal + bunniesPerLevel[q][level - 1];
q++;
}
theChances.push(theTotal);
thePick = randRange(1, theTotal);
theType = 0;
q = 0;
while (q < theChances.length) {
topNum = 0;
if (q == theChances.length) {
topNum = 0;
} else {
topNum = theChances[q];
}
if ((theChances[q + 1] >= thePick) && (topNum <= thePick)) {
bunniesPerLevel[q][level - 1] = bunniesPerLevel[q][level - 1] - 1;
theType = q + 1;
q = theChances.length;
}
q++;
}
return(theType);
}
function createBunny(bunType, starting) {
bunniesOnStage = bunniesOnStage + 1;
if (Math.floor((level - 1) / 10) <= 1) {
bun = attachMovie("bunny", "bunny" + depth, depth++);
bun._xscale = (bun._yscale = (itemScales[Math.floor((level - 1) / 10)] / 1.5) + random(itemScales[Math.floor((level - 1) / 10)] / 2));
} else {
bun = attachMovie("turtleMini", "bunny" + depth, depth++);
bun._xscale = (bun._yscale = (itemScales[Math.floor((level - 1) / 10) - 1] / 1.5) + random(itemScales[Math.floor((level - 1) / 10) - 1] / 2));
}
if (bunType == invisBunny) {
bun._alpha = 0;
}
bun._rotation = random(360);
bun.onStage = false;
if (bunType == immuneBunny) {
bun._alpha = 50;
bun.immuneTimer = 20;
}
if (starting) {
bun._x = randRange(bun._width / 2, Stage.width - (bun._width / 2));
bun._y = randRange(bun._height / 2, (Stage.height - 40) - (bun._height / 2));
} else {
side = randRange(1, 4);
if (side <= 2) {
bun._x = randRange(bun._width / 2, Stage.width - (bun._width / 2));
if (side == 1) {
bun._y = (-bun._height) / 2;
} else {
bun._y = (Stage.height - 40) + (bun._height / 2);
}
} else {
bun._y = randRange(bun._height / 2, Stage.width - (bun._height / 2));
if (side == 3) {
bun._x = (-bun._width) / 2;
} else {
bun._x = Stage.width + (bun._width / 2);
}
}
}
bun.specialDelay = 50;
bun.ina.stop();
bun.ina.shell.gotoAndStop(bunType);
bun.ina.foot1.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot2.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot3.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot4.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.head.gotoAndStop(targetBodies[bunType - 1]);
bun.Type = bunType;
bun.isClone = false;
bun.Worth = bunnyWorths[bunType - 1];
bun.health = 20;
bun.RunFrom = null;
if (bun.Type == shootingBunny) {
bun.shotDelay = 0;
}
if (bunny.Type == teleportBunny) {
bun.startTeleport = false;
bun.endTeleport = false;
}
bun.xSpeed = 0;
bun.ySpeed = 0;
bun.Speed = 2 + random(4);
bun.changeMoveDelay = randRange(0, 15);
bunnies.push(bun);
}
function createCloneBunny() {
bunType = 9;
bunniesOnStage = bunniesOnStage + 1;
bun = attachMovie("bunny", "bunny" + depth, depth++);
bun.ina.stop();
bun.Speed = 2 + random(4);
bun._x = bunny._x;
bun.isClone = true;
bun._x = bun._x + (Math.cos((bunny._rotation * Math.PI) / 180) * 60);
bun._y = bunny._y;
bun.onStage = false;
bun._y = bun._y + (Math.sin((bunny._rotation * Math.PI) / 180) * 60);
bun._xscale = (bun._yscale = itemScales[Math.floor((level - 1) / 10)] / 1.5);
bun.ina.shell.gotoAndStop(bunType);
bun.ina.foot1.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot2.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot3.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot4.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.head.gotoAndStop(targetBodies[bunType - 1]);
bun.Type = bunType;
bun.Worth = bunnyWorths[bunType - 1];
bun.health = -20;
bun.RunFrom = null;
bun.xSpeed = 0;
bun.ySpeed = 0;
bun.changeMoveDelay = randRange(0, 15);
bunnies.push(bun);
}
function createStickBunny() {
bunType = 11;
bunniesOnStage = bunniesOnStage + 1;
bun = attachMovie("sticky", "bunny" + lowDepth, lowDepth++);
bun.ina.stop();
bun.Speed = 0;
bun._x = bunny._x;
bun.isClone = true;
bun.onStage = false;
bun._x = bun._x + (Math.cos((bunny._rotation * Math.PI) / 180) * 60);
bun._y = bunny._y;
bun._y = bun._y + (Math.sin((bunny._rotation * Math.PI) / 180) * 60);
bun._xscale = (bun._yscale = itemScales[Math.floor((level - 1) / 10)] + 30);
bun.ina.shell.gotoAndStop(bunType);
bun.ina.foot1.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot2.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot3.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.foot4.gotoAndStop(targetBodies[bunType - 1]);
bun.ina.head.gotoAndStop(targetBodies[bunType - 1]);
bun.Type = bunType;
bun.Worth = bunnyWorths[bunType - 1];
bun.health = 0;
bun.RunFrom = null;
oDir = (random(360) * Math.PI) / 180;
bun.xSpeed = Math.cos(oDir) * 10;
bun.ySpeed = Math.sin(oDir) * 10;
bun.changeMoveDelay = randRange(0, 15);
bunnies.push(bun);
}
function bunnyMovement() {
b = bunnies.length - 1;
while (b >= 0) {
bunny = bunnies[b];
bunny.changeMoveDelay = bunny.changeMoveDelay - 1;
if ((((bunny.changeMoveDelay <= 0) && (bunny.Type != 11)) && (bunny.Type != teleportBunny)) && (bunny.Type != 10)) {
bunny.changeMoveDelay = 20 + random(20);
if ((Math.abs(bunny.xSpeed) + Math.abs(bunny.ySpeed)) > 0) {
bunny.xSpeed = 0;
bunny.ySpeed = 0;
bunny.ina.stop();
bunny.changeMoveDelay = 5 + random(20);
} else {
dir = randRange(1, 360);
bunny.ina.play();
bunny.xSpeed = (Math.cos((dir * Math.PI) / 180) * bunny.Speed) * (itemScales[Math.floor((level - 1) / 10)] / 100);
bunny.ySpeed = (Math.sin((dir * Math.PI) / 180) * bunny.Speed) * (itemScales[Math.floor((level - 1) / 10)] / 100);
}
}
if (bunny.Type == immuneBunny) {
bunny.immuneTimer = bunny.immuneTimer - 1;
if (bunny.immuneTimer <= 0) {
bunny._alpha = 100;
} else {
bunny._alpha = 50;
}
if (random(60) == 1) {
bunny.immuneTimer = 20;
}
}
if (bunny.Type == teleportBunny) {
bunny.specialDelay = bunny.specialDelay - 1;
if (((bunny.specialDelay <= 0) && (!bunny.startTeleport)) && (!bunny.endTeleport)) {
bunny.startTeleport = true;
}
if (bunny.startTeleport) {
bunny._alpha = bunny._alpha - 20;
if (bunny._alpha <= 0) {
bunny._x = randRange(bunny._width / 2, Stage.width - (bunny._width / 2));
bunny._y = randRange(bunny._height / 2, (Stage.height - 40) - (bunny._height / 2));
p = penguins.length - 1;
while (p >= 0) {
if (penguin.hitTest(bunny)) {
bunny._x = randRange(bunny._width / 2, Stage.width - (bunny._width / 2));
bunny._y = randRange(bunny._height / 2, (Stage.height - 40) - (bunny._height / 2));
}
p--;
}
bunny.startTeleport = false;
bunny.endTeleport = true;
}
}
if (bunny.endTeleport) {
bunny._alpha = bunny._alpha + 20;
if (bunny._alpha >= 100) {
bunny._alpha = 100;
bunny.endTeleport = false;
bunny.specialDelay = 10 + random(10);
}
}
}
if ((((bunny.Type == 10) || (bunny.Type == invisBunny)) || (bunny.Type == teleportBunny)) && (bunny.onStage)) {
runFromPenguin = false;
p = penguins.length - 1;
while (p >= 0) {
if (bunny == penguins[p].Target) {
runFromPenguin = true;
}
p--;
}
if (runFromPenguin) {
bunny.RunFrom = findSmallestDist();
bDir = Math.atan2(bunny._y - bunny.RunFrom._y, bunny._x - bunny.RunFrom._x);
if (bunny.Type == invisBunny) {
bunny._alpha = (300 - Math.sqrt(Math.pow(bunny._x - bunny.RunFrom._x, 2) + Math.pow(bunny._y - bunny.RunFrom._y, 2))) / 3;
}
if (bunny.Type == teleportBunny) {
bunny.ina.play();
bunny.xSpeed = Math.cos(bDir) * bunny.Speed;
bunny.ySpeed = Math.sin(bDir) * bunny.Speed;
}
if (bunny.Type == 10) {
if (bunny.specialDelay >= 0) {
bunny.specialDelay = -20;
bunny.ina.play();
bunny.xSpeed = Math.cos(bDir) * bunny.Speed;
bunny.ySpeed = Math.sin(bDir) * bunny.Speed;
}
if (bunny._x >= (Stage.width - (bunny._width / 2))) {
bunny.xSpeed = bunny.xSpeed * -1;
bunny._x = Stage.width - (bunny._width / 2);
}
if (bunny._y >= ((Stage.height - 40) - (bunny._height / 2))) {
bunny.ySpeed = bunny.ySpeed * -1;
bunny._y = (Stage.height - 40) - (bunny._height / 2);
}
if (bunny._x <= (bunny._width / 2)) {
bunny.xSpeed = bunny.xSpeed * -1;
bunny._x = bunny._width / 2;
}
if (bunny._y <= (bunny._height / 2)) {
bunny.ySpeed = bunny.ySpeed * -1;
bunny._y = bunny._height / 2;
}
}
}
}
if ((bunny.Type == explodingBunny) && (levelStarted)) {
bunny.specialDelay = bunny.specialDelay - 1;
if (bunny.specialDelay <= 0) {
bunny.specialDelay = 100 + random(50);
k = 0;
while (k < 5) {
createPart(bunny._x, bunny._y, 5);
k++;
}
}
}
if (bunny.Type == acidBunny) {
bunny.specialDelay = bunny.specialDelay - 1;
if (bunny.specialDelay <= 0) {
bunny.specialDelay = 100 + random(50);
ad = attachMovie("acid", "acid" + lowDepth, lowDepth++);
ad._xscale = (ad._yscale = itemScales[Math.floor((level - 1) / 10)]);
ad._rotation = bunny._rotation + 90;
ad._x = bunny._x;
ad._y = bunny._y;
hitEgg = false;
m = acids.length - 1;
while (m >= 0) {
if (acids[m].hitTest(ad)) {
hitEgg = true;
}
m--;
}
if (!hitEgg) {
acids.push(ad);
ad.life = 400;
} else {
ad.removeMovieClip();
}
}
}
if (bunny.Type == stickyBunny) {
bunny.specialDelay = bunny.specialDelay - 1;
if ((bunny.specialDelay <= 0) && (bunnies.length <= 20)) {
bunny.specialDelay = 50 + random(25);
createStickBunny();
}
}
bunny._x = bunny._x + (bunny.xSpeed * (itemScales[Math.floor((level - 1) / 10)] / 100));
bunny._y = bunny._y + (bunny.ySpeed * (itemScales[Math.floor((level - 1) / 10)] / 100));
if (bunny.Type != 11) {
while (bg.obstacle.hitTest(bunny._x, bunny._y - ((40 * itemScales[Math.floor((level - 1) / 10)]) / 100), true)) {
bunny._y = bunny._y + 1;
}
while (bg.obstacle.hitTest(bunny._x, bunny._y + ((40 * itemScales[Math.floor((level - 1) / 10)]) / 100), true)) {
bunny._y = bunny._y - 1;
}
while (bg.obstacle.hitTest(bunny._x - ((40 * itemScales[Math.floor((level - 1) / 10)]) / 100), bunny._y, true)) {
bunny._x = bunny._x + 1;
}
while (bg.obstacle.hitTest(bunny._x + ((40 * itemScales[Math.floor((level - 1) / 10)]) / 100), bunny._y, true)) {
bunny._x = bunny._x - 1;
}
}
if ((Math.abs(bunny.xSpeed) + Math.abs(bunny.ySpeed)) != 0) {
bunny._rotation = (Math.atan2(bunny.ySpeed, bunny.xSpeed) * 180) / Math.PI;
}
if (((bunny.Type == shootingBunny) && (levelStarted)) && (penguins.length != 0)) {
bunny.shotDelay = bunny.shotDelay - 1;
if (bunny.xSpeed == 0) {
penguin = findSmallestDist();
bunny._rotation = (Math.atan2(penguin._y - bunny._y, penguin._x - bunny._x) * 180) / Math.PI;
}
if ((bunny.shotDelay <= 0) && (bunny.xSpeed == 0)) {
bunny.shotDelay = 10 + random(10);
createBunBullet();
}
}
if (bunny.Type == 11) {
if (bunny._x >= (Stage.width - (bunny._width / 2))) {
bunny.xSpeed = bunny.xSpeed * -1;
bunny._x = Stage.width - (bunny._width / 2);
}
if (bunny._y >= ((Stage.height - 40) - (bunny._height / 2))) {
bunny.ySpeed = bunny.ySpeed * -1;
bunny._y = (Stage.height - 40) - (bunny._height / 2);
}
if (bunny._x <= (bunny._width / 2)) {
bunny.xSpeed = bunny.xSpeed * -1;
bunny._x = bunny._width / 2;
}
if (bunny._y <= (bunny._height / 2)) {
bunny.ySpeed = bunny.ySpeed * -1;
bunny._y = bunny._height / 2;
}
} else if (bunny.onStage) {
if ((bunny._x + (bunny._width / 2)) >= Stage.width) {
bunny._x = Stage.width - (bunny._width / 2);
bunny.xSpeed = 0;
}
if ((bunny._y + (bunny._height / 2)) >= (Stage.height - 40)) {
bunny._y = (Stage.height - 40) - (bunny._height / 2);
bunny.ySpeed = 0;
}
if ((bunny._x - (bunny._width / 2)) <= 0) {
bunny._x = bunny._width / 2;
bunny.xSpeed = 0;
}
if ((bunny._y - (bunny._height / 2)) <= 0) {
bunny._y = bunny._height / 2;
bunny.ySpeed = 0;
}
} else {
bunny.ina.play();
if ((bunny._x + (bunny._width / 2)) > Stage.width) {
bunny.xSpeed = -bunny.Speed;
}
if ((bunny._y + (bunny._height / 2)) > (Stage.height - 40)) {
bunny.ySpeed = -bunny.Speed;
}
if ((bunny._x - (bunny._width / 2)) < 0) {
bunny.xSpeed = bunny.Speed;
}
if ((bunny._y - (bunny._height / 2)) < 0) {
bunny.ySpeed = bunny.Speed;
}
if (((((bunny._x + (bunny._width / 2)) < Stage.width) && ((bunny._y + (bunny._height / 2)) < (Stage.height - 40))) && ((bunny._x - (bunny._width / 2)) > 0)) && ((bunny._y - (bunny._height / 2)) > 0)) {
bunny.onStage = true;
}
}
b--;
}
}
function findSmallestDist() {
smallestDist = -1;
smallestPen = null;
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
bunDist = Math.sqrt(Math.pow(penguin._x - bunny._x, 2) + Math.pow(penguin._y - bunny._y, 2));
if ((smallestDist == -1) || (bunDist < smallestDist)) {
smallestDist = bunDist;
smallestPen = penguin;
}
p--;
}
return(smallestPen);
}
function monMovement() {
m = mons.length - 1;
while (m >= 0) {
mon = mons[m];
mon.ySpeed = mon.ySpeed * 0.9;
mon._y = mon._y - mon.ySpeed;
mon._alpha = mon._alpha - 2;
if (mon._alpha <= 0) {
removeMon();
}
m--;
}
}
function removeMon() {
mons[m].removeMovieClip();
mons.splice(m, 1);
}
function manageGoldCreation(worth) {
goldAmount = 1 + random(3);
if (goldAmount > worth) {
goldAmount = worth;
}
j = goldAmount - 1;
while (j >= 0) {
realWorth = 0;
realWorth = random(worth - j) + 1;
if (j == 0) {
realWorth = worth;
}
worth = worth - realWorth;
scale = 0;
if (realWorth <= 1) {
scale = 30;
} else if (realWorth <= 3) {
scale = 40;
} else if (realWorth <= 10) {
scale = 50;
} else if (realWorth <= 30) {
scale = 60;
} else if (realWorth <= 100) {
scale = 70;
} else if (realWorth <= 240) {
scale = 80;
}
if (scale <= 55) {
createGold(2, realWorth, scale * 2);
} else {
createGold(1, realWorth, scale);
}
j--;
}
}
function createGold(type, worth, scale) {
if (type == 1) {
gold = attachMovie("gold", "gold" + lowDepth, lowDepth++);
} else {
gold = attachMovie("eggSmall", "gold" + lowDepth, lowDepth++);
}
gold._x = bunny._x;
gold._y = bunny._y;
gold.gotoAndStop(random(4) + 1);
gold.Worth = worth;
gold._xscale = (gold._yscale = scale);
gold.Speed = (Math.random() * 10) + 10;
gold.Dir = (Math.random() * Math.PI) * 2;
gold.Life = 200;
gold.xSpeed = Math.cos(gold.Dir) * gold.Speed;
gold.ySpeed = Math.sin(gold.Dir) * gold.Speed;
golds.push(gold);
}
function goldMovement() {
g = golds.length - 1;
while (g >= 0) {
gold = golds[g];
theX = _xmouse - gold._x;
theY = _ymouse - gold._y;
theDist = Math.sqrt(Math.pow(theX, 2) + Math.pow(theY, 2));
if ((theDist <= 50) && (gold.Life <= 196)) {
goldDir = Math.atan2(theY, theX);
goldForce = (50 - theDist) / 5;
gold.xSpeed = Math.cos(goldDir) * goldForce;
gold.ySpeed = Math.sin(goldDir) * goldForce;
}
gold.xSpeed = gold.xSpeed * 0.8;
gold.ySpeed = gold.ySpeed * 0.8;
gold._x = gold._x + gold.xSpeed;
gold._y = gold._y + gold.ySpeed;
if (gold._x >= (Stage.width - (gold._width / 2))) {
gold._x = Stage.width - (gold._width / 2);
gold.xSpeed = gold.xSpeed * -1;
}
if (gold._x <= (gold._width / 2)) {
gold._x = gold._width / 2;
gold.xSpeed = gold.xSpeed * -1;
}
if (gold._y >= ((Stage.height - (gold._height / 2)) - 40)) {
gold._y = (Stage.height - (gold._height / 2)) - 40;
gold.ySpeed = gold.ySpeed * -1;
}
if (gold._y <= (gold._height / 2)) {
gold._y = gold._height / 2;
gold.ySpeed = gold.ySpeed * -1;
}
while (bg.obstacle.hitTest(gold._x + (gold._width / 2), gold._y, true)) {
gold._x = gold._x - 0.5;
gold.xSpeed = gold.xSpeed * -1;
}
while (bg.obstacle.hitTest(gold._x - (gold._width / 2), gold._y, true)) {
gold._x = gold._x + 0.5;
gold.xSpeed = gold.xSpeed * -1;
}
while (bg.obstacle.hitTest(gold._x, gold._y + (gold._height / 2), true)) {
gold._y = gold._y - 0.5;
gold.ySpeed = gold.ySpeed * -1;
}
while (bg.obstacle.hitTest(gold._x, gold._y - (gold._height / 2), true)) {
gold._y = gold._y + 0.5;
gold.ySpeed = gold.ySpeed * -1;
}
gold.Life = gold.Life - 1;
if (gold.Life <= 20) {
gold._alpha = gold.Life * 5;
if (gold.Life <= 0) {
removeGold();
}
}
if (((gold.hitTest(_xmouse, _ymouse, true) || (theDist <= 15)) && (gold._x != undefined)) && (gold.Life <= 196)) {
money = money + gold.Worth;
bell.start();
mon = attachMovie("mons", "mons" + highDepth, highDepth++);
mon._x = gold._x;
mon._y = gold._y;
mon.monTxt.htmlText = bold("$" + gold.Worth);
mons.push(mon);
mon.ySpeed = 5;
moneyOnLevel = moneyOnLevel + gold.Worth;
removeGold();
}
g--;
}
}
function removeGold() {
golds[g].removeMovieClip();
golds.splice(g, 1);
}
function removeBunny(wasKilled) {
bunniesOnStage = bunniesOnStage - 1;
if (wasKilled) {
mon = attachMovie("mons", "mons" + highDepth, highDepth++);
mon._x = bunny._x;
mon._y = bunny._y;
mon.monTxt.htmlText = bold("KILLED");
mons.push(mon);
mon.ySpeed = 5;
manageGoldCreation(bunny.Worth);
bunniesKilled = bunniesKilled + 1;
totalKills = totalKills + 1;
bunny.gotoAndStop(2);
p = penguins.length - 1;
while (p >= 0) {
if (penguins[p].Target == bunny) {
penguins[p].Target = null;
}
p--;
}
correctBunny();
bunny.theSpeed = 1;
if ((bunny.Type == cloneBunny) && (!bunny.isClone)) {
createCloneBunny();
createCloneBunny();
}
} else {
bunniesPerLevel[bunnies[b].Type - 1][level - 1] = bunniesPerLevel[bunnies[b].Type - 1][level - 1] + 1;
}
bunnies[b].removeMovieClip();
bunnies.splice(b, 1);
}
function correctBunny() {
bunny.ina.shell.gotoAndStop(bunType);
bunny.ina.foot1.gotoAndStop(targetBodies[bunType - 1]);
bunny.ina.foot2.gotoAndStop(targetBodies[bunType - 1]);
bunny.ina.foot3.gotoAndStop(targetBodies[bunType - 1]);
bunny.ina.foot4.gotoAndStop(targetBodies[bunType - 1]);
bunny.ina.head.gotoAndStop(targetBodies[bunType - 1]);
}
function shellMovement() {
s = shells.length - 1;
while (s >= 0) {
shell = shells[s];
if (shell.ina._currentframe == 1) {
removeShell();
}
s--;
}
}
function removeShell() {
shells[s].removeMovieClip();
shells.splice(s, 1);
}
function acidMovement() {
a = acids.length - 1;
while (a >= 0) {
acid = acids[a];
acid.life = acid.life - 1;
if (acid.life <= 20) {
acid._alpha = acid.life * 5;
if (acid.life <= 0) {
removeAcid();
}
}
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
if ((((acid.hitTest(penguin._x + 15, penguin._y, true) || (acid.hitTest(penguin._x, penguin._y + 15, true))) || (acid.hitTest(penguin._x - 15, penguin._y, true))) || (acid.hitTest(penguin._x, penguin._y - 15, true))) && (acid._x != undefined)) {
penguin.health = penguin.health - 150;
removeAcid();
}
p--;
}
a--;
}
}
function removeAcid() {
acids[a].removeMovieClip();
acids.splice(a, 1);
}
function stickyMovement() {
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
penguin.inStick = false;
p--;
}
s = stickys.length - 1;
while (s >= 0) {
sticky = stickys[s];
sticky.life = sticky.life - 1;
if (sticky.life <= 20) {
sticky._alpha = sticky.life * 5;
if (sticky.life <= 0) {
removeSticky();
}
}
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
if (sticky.hitTest(penguin._x, penguin._y, true) && (sticky._x != undefined)) {
penguin.inStick = true;
}
p--;
}
s--;
}
}
function removeSticky() {
stickys[s].removeMovieClip();
stickys.splice(s, 1);
}
function checkStage() {
if (((bunniesOnStage == 0) && (shells.length == 0)) && (!inMenu)) {
if (level == levelsUnlocked) {
levelsUnlocked = levelsUnlocked + 1;
}
if (level == 40) {
gamePause = true;
transitionToGame(5, 0);
} else if (transDelay <= -10) {
transDelay = 30;
}
}
}
function createResults(won) {
lc = attachMovie("levelComplete", "levelComplete", 923000);
lc._x = Stage.width / 2;
lc._y = Stage.height / 2;
if (won) {
lc.s1.htmlText = bold("SUCCESS");
lc.woner.gotoAndStop(1);
} else {
lc.s1.htmlText = bold("FAILURE");
lc.woner.gotoAndStop(2);
}
lc.s2.htmlText = bold(bunniesKilled + " ENEMIES KILLED");
lc.s3.htmlText = bold(("$" + moneyOnLevel) + " EARNED");
lc.s4.htmlText = bold("LEVEL " + level);
lc.s5.htmlText = bold(days + " DAYS");
lc.s6.htmlText = bold("$" + money);
lc.s7.htmlText = bold(totalKills + " ENEMIES KILLED");
specials[0].gotoAndStop(5);
specials[1].gotoAndStop(5);
specials[2].gotoAndStop(5);
specials[3].gotoAndStop(5);
ui.bombNum.htmlText = "";
lc.finished.onRollOver = function () {
lc.finished.gotoAndStop(2);
};
lc.finished.onRollOut = function () {
lc.finished.gotoAndStop(1);
};
lc.finished.onRelease = function () {
transitionToGame(4, 0);
};
}
function beginGame() {
createLevelSelect();
specialManager();
}
function levelDone(won) {
clearScreen();
createResults(won);
bunniesKilled = 0;
bunniesOnStage = 0;
gamePause = true;
inMenu = true;
levelStarted = false;
i = bunniesPerLevelC.length - 1;
while (i >= 0) {
k = bunniesPerLevelC[i].length - 1;
while (k >= 0) {
bunniesPerLevel[i][k] = bunniesPerLevelC[i][k];
k--;
}
i--;
}
}
function createPenguin(num) {
if (Math.floor((level - 1) / 10) <= 1) {
pen = attachMovie("penguin", "penguin" + pDepth, pDepth++);
pen._xscale = (pen._yscale = itemScales[Math.floor((level - 1) / 10)]);
} else {
pen = attachMovie("penguinMini", "penguin" + pDepth, pDepth++);
pen._xscale = (pen._yscale = itemScales[Math.floor((level - 1) / 10) - 1]);
}
pen._x = randRange(pen._width / 2, Stage.width - (pen._width / 2));
pen._y = (Stage.height - 40) + (pen._height / 2);
penguinToFrames(pen, num);
pen.health = penguinHealths[num - 1];
pen.healthMax = pen.health;
pen.Speed = penguinSpeeds[num - 1];
pen.Speed = pen.Speed * (itemScales[Math.floor((level - 1) / 10)] / 100);
pen.Luck = penguinLucks[num - 1];
pen.Range = penguinRanges[num - 1];
pen.Range = pen.Range * (itemScales[Math.floor((level - 1) / 10)] / 100);
pen.number = num;
pen.eatDelay = 0;
createPenguinHealthBar(num);
pen.inStick = false;
pen.Target = null;
penguins.push(pen);
}
function penguinToFrames(pen, num) {
pen.ina.beak.gotoAndStop(penguinPartsEquipped[num - 1][0]);
pen.ina.head.gotoAndStop(penguinPartsEquipped[num - 1][1]);
pen.ina.body.gotoAndStop(penguinPartsEquipped[num - 1][2]);
pen.ina.fin1.gotoAndStop(penguinPartsEquipped[num - 1][3]);
pen.ina.fin2.gotoAndStop(penguinPartsEquipped[num - 1][3]);
pen.ina.foot1.gotoAndStop(penguinPartsEquipped[num - 1][4]);
pen.ina.foot2.gotoAndStop(penguinPartsEquipped[num - 1][4]);
uiPenguins[num - 1].ina.ina.beak.gotoAndStop(penguinPartsEquipped[num - 1][0]);
uiPenguins[num - 1].ina.ina.head.gotoAndStop(penguinPartsEquipped[num - 1][1]);
uiPenguins[num - 1].ina.ina.body.gotoAndStop(penguinPartsEquipped[num - 1][2]);
uiPenguins[num - 1].ina.ina.fin1.gotoAndStop(penguinPartsEquipped[num - 1][3]);
uiPenguins[num - 1].ina.ina.fin2.gotoAndStop(penguinPartsEquipped[num - 1][3]);
uiPenguins[num - 1].ina.ina.foot1.gotoAndStop(penguinPartsEquipped[num - 1][4]);
uiPenguins[num - 1].ina.ina.foot2.gotoAndStop(penguinPartsEquipped[num - 1][4]);
uiPenguins[num - 1].ina.ina.stop();
}
function createSpecialPenguin() {
num = 6;
if (Math.floor((level - 1) / 10) <= 1) {
pen = attachMovie("penguin", "penguin" + pDepth, pDepth++);
pen._xscale = (pen._yscale = itemScales[Math.floor((level - 1) / 10)]);
} else {
pen = attachMovie("penguinMini", "penguin" + pDepth, pDepth++);
pen._xscale = (pen._yscale = itemScales[Math.floor((level - 1) / 10) - 1]);
}
penguinToFrames(pen, num);
pen._x = _xmouse;
pen._y = _ymouse;
penguinToFrames(pen, num);
pen.health = penguinHealths[num - 1];
pen.healthMax = pen.health;
pen.Speed = penguinSpeeds[num - 1];
pen.Speed = pen.Speed * (itemScales[Math.floor((level - 1) / 10)] / 100);
pen.Luck = penguinLucks[num - 1];
pen.Range = penguinRanges[num - 1];
pen.Range = pen.Range * (itemScales[Math.floor((level - 1) / 10)] / 100);
pen.eatDelay = 0;
pen.number = num;
createPenguinHealthBar(num);
pen.inStick = false;
pen.Target = null;
penguins.push(pen);
}
function createPenguinHealthBar(num) {
uiPenguins[num - 1]._alpha = 100;
phb = uiPenguins[num - 1].bar;
pen.healthBar = phb;
}
function penguinMovement() {
allWalking = true;
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
penguinToFrames(penguin, penguin.number);
if (penguin._currentframe == 2) {
allWalking = false;
}
if (penguin.health >= penguin.healthMax) {
penguin.health = penguin.healthMax;
}
penguin.health = penguin.health - 1;
if ((days == 1) || (bunnies.length == 0)) {
penguin.health = penguin.health + 1;
}
penguin.healthBar._xscale = (penguin.health / penguin.healthMax) * 100;
if (penguin.Target._x == undefined) {
penguin.Target = null;
}
if ((penguin.Target == null) && (penguin._currentframe == 1)) {
penguin.ina.stop();
} else {
penguin.ina.play();
}
if (penguin.Target == null) {
smallestDist = -1;
currentChoice = 0;
distances = new Array();
bunnyDistances = new Array();
b = bunnies.length - 1;
while (b >= 0) {
bunny = bunnies[b];
dist = Math.sqrt(Math.pow(bunny._x - penguin._x, 2) + Math.pow(bunny._y - penguin._y, 2));
distances.push(dist);
bunnyDistances.push(bunny);
b--;
}
q = bunnyDistances.length - 1;
while (q >= 0) {
l = penguins.length - 1;
while (l >= 0) {
if (bunnyDistances[q] == penguins[l].Target) {
bunnyDistances.splice(q, 1);
distances.splice(q, 1);
}
bunny = bunnyDistances[q];
if ((bunny.Type == immuneBunny) && (bunny.immuneTimer > 0)) {
bunnyDistances.splice(q, 1);
distances.splice(q, 1);
}
l--;
}
q--;
}
q = bunnyDistances.length - 1;
while (q >= 0) {
if ((smallestDist == -1) || (distances[q] <= smallestDist)) {
smallestDist = distances[q];
penguin.Target = bunnyDistances[q];
}
q--;
}
if (penguin.Target == null) {
penguin.Target = bunnies[randRange(0, bunnies.length)];
}
}
penguinDir = Math.atan2(penguin.Target._y - penguin._y, penguin.Target._x - penguin._x);
penguin.eatDelay = penguin.eatDelay - 1;
if (penguin.eatDelay <= 0) {
penguin._x = penguin._x + (Math.cos(penguinDir) * penguin.Speed);
penguin._y = penguin._y + (Math.sin(penguinDir) * penguin.Speed);
if (penguin.inStick) {
penguin._x = penguin._x - ((Math.cos(penguinDir) * penguin.Speed) / 2);
penguin._y = penguin._y - ((Math.sin(penguinDir) * penguin.Speed) / 2);
}
specialSpeedLife = specialSpeedLife - 1;
if (specialSpeedLife > 0) {
penguin._x = penguin._x + ((Math.cos(penguinDir) * penguin.Speed) * speedSpecials[levels[speedLevel]]);
penguin._y = penguin._y + ((Math.sin(penguinDir) * penguin.Speed) * speedSpecials[levels[speedLevel]]);
}
penguin._rotation = (penguinDir * 180) / Math.PI;
}
while (bg.obstacle.hitTest(penguin._x, penguin._y - ((40 * itemScales[Math.floor((level - 1) / 10)]) / 100), true)) {
penguin._y = penguin._y + 1;
}
while (bg.obstacle.hitTest(penguin._x, penguin._y + ((40 * itemScales[Math.floor((level - 1) / 10)]) / 100), true)) {
penguin._y = penguin._y - 1;
}
while (bg.obstacle.hitTest(penguin._x - ((40 * itemScales[Math.floor((level - 1) / 10)]) / 100), penguin._y, true)) {
penguin._x = penguin._x + 1;
}
while (bg.obstacle.hitTest(penguin._x + ((40 * itemScales[Math.floor((level - 1) / 10)]) / 100), penguin._y, true)) {
penguin._x = penguin._x - 1;
}
if (penguin.health <= 0) {
createExplosion(penguin._x, penguin._y, false);
finishInfo();
removePenguin();
displayInfo(nextDisplay);
if ((penguins.length == 0) && (nextDisplay > 10)) {
startCounter = 25;
createTransition(0);
}
}
p--;
}
if (allWalking) {
checkStage();
}
}
function removePenguin() {
uiPenguins[penguins[p].number - 1]._alpha = 0;
penguins[p].healthBar.removeMovieClip();
penguins[p].removeMovieClip();
penguins.splice(p, 1);
}
function hitTesting() {
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
b = bunnies.length - 1;
while (b >= 0) {
bunny = bunnies[b];
dist = Math.sqrt(Math.pow(penguin._x - bunny._x, 2) + Math.pow(penguin._y - bunny._y, 2));
if ((dist < penguin.Range) && (penguin._currentframe == 1)) {
if ((bunny.Type == immuneBunny) && (bunny.immuneTimer >= 0)) {
penguin.Target = null;
} else if ((days == 2) && (bunnies.length == 1)) {
penguin.eatDelay = 20;
penguin.gotoAndStop(3);
penguin.ina.ina.ina.shell.gotoAndStop(bunny.Type);
penguin.ina.ina.ina.foot1.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot2.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot3.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot4.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.head.gotoAndStop(targetBodies[bunny.Type - 1]);
penguinToFrames(penguin, penguin.number);
mon = attachMovie("mons", "mons" + highDepth, highDepth++);
mon._x = bunny._x;
mon._y = bunny._y;
mon.monTxt.htmlText = bold("MISS");
swish.start();
swish.start();
mons.push(mon);
mon.ySpeed = 5;
} else if ((Math.random() < penguin.Luck) || (days == 1)) {
penguin.health = penguin.health + bunny.health;
penguin.gotoAndStop(2);
penguin.ina.ina.ina.shell.gotoAndStop(bunny.Type);
penguin.ina.ina.ina.foot1.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot2.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot3.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot4.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.head.gotoAndStop(targetBodies[bunny.Type - 1]);
penguinToFrames(penguin, penguin.number);
penguin.eatDelay = 25;
removeBunny(true);
bite.start();
} else {
penguin.eatDelay = 20;
penguin.gotoAndStop(3);
penguin.ina.ina.ina.shell.gotoAndStop(bunny.Type);
penguin.ina.ina.ina.foot1.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot2.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot3.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.foot4.gotoAndStop(targetBodies[bunny.Type - 1]);
penguin.ina.ina.ina.head.gotoAndStop(targetBodies[bunny.Type - 1]);
penguinToFrames(penguin, penguin.number);
mon = attachMovie("mons", "mons" + highDepth, highDepth++);
mon._x = bunny._x;
mon._y = bunny._y;
mon.monTxt.htmlText = bold("MISS");
swish.start();
swish.start();
mons.push(mon);
mon.ySpeed = 5;
}
}
b--;
}
p--;
}
}
function createBunBullet() {
bul = attachMovie("bunnyBullet", "bullet" + depth, depth++);
bul._x = bunny._x;
bul._y = bunny._y;
penguin = findSmallestDist();
bul._xscale = (bul._yscale = itemScales[Math.floor((level - 1) / 10)]);
bulAng = Math.atan2(penguin._y - bunny._y, penguin._x - bunny._x);
bul.xSpeed = Math.cos(bulAng) * 5;
bul.ySpeed = Math.sin(bulAng) * 5;
bunnyBullets.push(bul);
}
function bunBulletMovement() {
e = bunnyBullets.length - 1;
while (e >= 0) {
bunnyBullet = bunnyBullets[e];
bunnyBullet._x = bunnyBullet._x + bunnyBullet.xSpeed;
bunnyBullet._y = bunnyBullet._y + bunnyBullet.ySpeed;
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
if (penguin.hitTest(bunnyBullet._x, bunnyBullet._y, true)) {
penguin.health = penguin.health - 25;
removeBunnyBullet();
}
p--;
}
if (((bunnyBullet._x >= (Stage.width + (bunnyBullet._width / 2))) && (bunnyBullet.xSpeed > 0)) && (bunnyBullet._x != undefined)) {
removeBunnyBullet();
}
if (((bunnyBullet._x <= ((-bunnyBullet._width) / 2)) && (bunnyBullet.xSpeed < 0)) && (bunnyBullet._x != undefined)) {
removeBunnyBullet();
}
if (((bunnyBullet._y >= ((Stage.height - 40) + (bunnyBullet._height / 2))) && (bunnyBullet.ySpeed > 0)) && (bunnyBullet._x != undefined)) {
removeBunnyBullet();
}
if (((bunnyBullet._y <= ((-bunnyBullet._height) / 2)) && (bunnyBullet.ySpeed < 0)) && (bunnyBullet._x != undefined)) {
removeBunnyBullet();
}
e--;
}
}
function removeBunnyBullet() {
bunnyBullets[e].removeMovieClip();
bunnyBullets.splice(e, 1);
}
function createPart(xPlace, yPlace, ptSpeed) {
pt = attachMovie("part1", "part" + depth, depth++);
pt._x = xPlace;
pt._y = yPlace;
parts.push(pt);
ptDir = (randRange(0, 360) * Math.PI) / 180;
pt._xscale = (pt._yscale = itemScales[Math.floor((level - 1) / 10)]);
pt.xSpeed = (Math.cos(ptDir) * ptSpeed) * (Math.random() + 1);
pt.ySpeed = (Math.sin(ptDir) * ptSpeed) * (Math.random() + 1);
pt.Rotation = (Math.random() * 10) - 5;
}
function partMovement() {
pa = parts.length - 1;
while (pa >= 0) {
part = parts[pa];
part._x = part._x + part.xSpeed;
part._y = part._y + part.ySpeed;
part._rotation = part._rotation + part.Rotation;
p = penguins.length - 1;
while (p >= 0) {
penguin = penguins[p];
if (part.hitTest(penguin)) {
removePart();
penguin.health = penguin.health - 100;
}
p--;
}
if ((part._x >= (Stage.width + (part._width / 2))) && (part._x != undefined)) {
removePart();
}
if ((part._x <= ((-part._width) / 2)) && (part._x != undefined)) {
removePart();
}
if ((part._y >= ((Stage.height - 40) + (part._height / 2))) && (part._x != undefined)) {
removePart();
}
if ((part._y <= ((-part._height) / 2)) && (part._x != undefined)) {
removePart();
}
pa--;
}
}
function removePart() {
parts[pa].removeMovieClip();
parts.splice(pa, 1);
}
function clearScreen() {
p = penguins.length - 1;
while (p >= 0) {
removePenguin();
p--;
}
b = bunnies.length - 1;
while (b >= 0) {
removeBunny(false);
b--;
}
e = bunnyBullets.length - 1;
while (e >= 0) {
removeBunnyBullet();
e--;
}
pa = parts.length - 1;
while (pa >= 0) {
removePart();
pa--;
}
s = shells.length - 1;
while (s >= 0) {
removeShell();
s--;
}
m = mons.length - 1;
while (m >= 0) {
removeMon();
m--;
}
g = golds.length - 1;
while (g >= 0) {
removeGold();
g--;
}
itemInHand.removeMovieClip();
itemHeld = -1;
a = acids.length - 1;
while (a >= 0) {
removeAcid();
a--;
}
s = stickys.length - 1;
while (s >= 0) {
removeSticky();
s--;
}
e = explosions.length - 1;
while (e >= 0) {
removeExplosion();
e--;
}
}
function removeGame() {
clearScreen();
ui.removeMovieClip();
keyListener.removeListener();
qbtn.removeMovieClip();
mbtn.removeMovieClip();
pbtn.removeMovieClip();
}
function bold(item) {
return(("<b>" + item) + "</b>");
}
function createShop() {
shop = attachMovie("shop", "shop" + highDepth, highDepth++);
shop._x = Stage.width / 2;
shop._y = (Stage.height / 2) - 20;
updateShopStats();
startShopInfo();
shop.btls.onRollOver = function () {
shop.btls._alpha = 75;
};
shop.btls.onRollOut = function () {
shop.btls._alpha = 100;
};
shop.btls.onRelease = function () {
if ((nextDisplay >= 16) || (nextDisplay == 14)) {
transitionToGame(4, 0);
}
};
penguinButtons = new Array(shop.pen1, shop.pen2, shop.pen3, shop.pen4, shop.pen5);
penguinCanBuys = new Array(shop.canBuy1, shop.canBuy2, shop.canBuy3, shop.canBuy4, shop.canBuy5);
createUpgradeButtons();
createPenguinButtons();
setPenguinImage();
}
function createPenguinButtons() {
i = penguinButtons.length - 1;
while (i >= 0) {
createPButton(penguinButtons[i], i);
i--;
}
}
function createPButton(button, num) {
delete button.onRollOver;
delete button.onRollOut;
delete button.onRelease;
if (penguinsBought[num]) {
button.gotoAndStop(3);
if ((penguinSelected - 1) == num) {
button.gotoAndStop(5);
}
button.penNumTxt.htmlText = bold(num + 1);
} else {
button.gotoAndStop(1);
if (money >= penguinCosts[num]) {
button.gotoAndStop(2);
}
}
if ((money < penguinCosts[num]) && (!penguinsBought[num])) {
button.onRollOver = function () {
button._alpha = 80;
shop.costTxt.htmlText = bold(penguinCosts[num]);
shop.typeTxt.htmlText = bold("");
shop.luckTxt.htmlText = bold("");
shop.speedTxt.htmlText = bold("");
shop.rangeTxt.htmlText = bold("");
shop.healthTxt.htmlText = bold("");
};
button.onRollOut = function () {
button._alpha = 100;
};
}
if ((money >= penguinCosts[num]) || (penguinsBought[num])) {
button.onRollOver = function () {
if (button._currentframe != 5) {
button.gotoAndStop(4);
button.penNumTxt.htmlText = bold(num + 1);
if (!penguinsBought[num]) {
button.gotoAndStop(2);
button._alpha = 80;
shop.costTxt.htmlText = bold(penguinCosts[num]);
shop.typeTxt.htmlText = bold("");
shop.luckTxt.htmlText = bold("");
shop.speedTxt.htmlText = bold("");
shop.rangeTxt.htmlText = bold("");
shop.healthTxt.htmlText = bold("");
} else {
shop.costTxt.htmlText = bold("BOUGHT");
}
}
};
button.onRollOut = function () {
if (button._currentframe == 4) {
button.gotoAndStop(3);
button.penNumTxt.htmlText = bold(num + 1);
}
button._alpha = 100;
};
button.onRelease = function () {
button.penNumTxt.htmlText = bold(num + 1);
if (penguinsBought[num]) {
penguinSelected = num + 1;
createUpgradeButtons();
createPenguinButtons();
setPenguinImage();
startShopInfo();
} else if (money >= penguinCosts[num]) {
money = money - penguinCosts[num];
finishInfo();
displayInfo(nextDisplay);
penguinsOwned = penguinsOwned + 1;
penguinSelected = num + 1;
penguinsBought[num] = true;
createUpgradeButtons();
createPenguinButtons();
setPenguinImage();
startShopInfo();
}
};
}
}
function setPenguinImage() {
shop.penImg.ina.beak.gotoAndStop(penguinPartsEquipped[penguinSelected - 1][0]);
shop.penImg.ina.head.gotoAndStop(penguinPartsEquipped[penguinSelected - 1][1]);
shop.penImg.ina.body.gotoAndStop(penguinPartsEquipped[penguinSelected - 1][2]);
shop.penImg.ina.fin1.gotoAndStop(penguinPartsEquipped[penguinSelected - 1][3]);
shop.penImg.ina.fin2.gotoAndStop(penguinPartsEquipped[penguinSelected - 1][3]);
shop.penImg.ina.foot1.gotoAndStop(penguinPartsEquipped[penguinSelected - 1][4]);
shop.penImg.ina.foot2.gotoAndStop(penguinPartsEquipped[penguinSelected - 1][4]);
i = penguinButtons.length - 1;
while (i >= 0) {
penguinButtons[i].ina.beak.gotoAndStop(penguinPartsEquipped[i][0]);
penguinButtons[i].ina.head.gotoAndStop(penguinPartsEquipped[i][1]);
penguinButtons[i].ina.body.gotoAndStop(penguinPartsEquipped[i][2]);
penguinButtons[i].ina.fin1.gotoAndStop(penguinPartsEquipped[i][3]);
penguinButtons[i].ina.fin2.gotoAndStop(penguinPartsEquipped[i][3]);
penguinButtons[i].ina.foot1.gotoAndStop(penguinPartsEquipped[i][4]);
penguinButtons[i].ina.foot2.gotoAndStop(penguinPartsEquipped[i][4]);
i--;
}
}
function createUpgradeButtons() {
penguinBeakUpgradeButtons = new Array(shop.n1, shop.n2, shop.n3, shop.n4, shop.n5);
penguinHeadUpgradeButtons = new Array(shop.h1, shop.h2, shop.h3, shop.h4, shop.h5);
penguinBodyUpgradeButtons = new Array(shop.b1, shop.b2, shop.b3, shop.b4, shop.b5);
penguinArmsUpgradeButtons = new Array(shop.a1, shop.a2, shop.a3, shop.a4, shop.a5);
penguinFeetUpgradeButtons = new Array(shop.f1, shop.f2, shop.f3, shop.f4, shop.f5);
penguinUpgradeButtons = new Array(penguinBeakUpgradeButtons, penguinHeadUpgradeButtons, penguinBodyUpgradeButtons, penguinArmsUpgradeButtons, penguinFeetUpgradeButtons);
i = penguinUpgradeButtons.length - 1;
while (i >= 0) {
v = penguinUpgradeButtons[i].length - 1;
while (v >= 0) {
createUpgradeButton(penguinUpgradeButtons[i][v], i, v);
v--;
}
i--;
}
speedUpgradeButtons = new Array(shop.s1, shop.s2, shop.s3, shop.s4, shop.s5, shop.s6, shop.s7);
zombieUpgradeButtons = new Array(shop.z1, shop.z2, shop.z3, shop.z4, shop.z5, shop.z6, shop.z7);
extraUpgradeButtons = new Array(shop.e1, shop.e2, shop.e3, shop.e4, shop.e5, shop.e6, shop.e7);
bombUpgradeButtons = new Array(shop.bo1, shop.bo2, shop.bo3, shop.bo4, shop.bo5, shop.bo6, shop.bo7);
upgradeButtons = new Array(speedUpgradeButtons, zombieUpgradeButtons, extraUpgradeButtons, bombUpgradeButtons);
i = upgradeButtons.length - 1;
while (i >= 0) {
v = upgradeButtons[i].length - 1;
while (v >= 0) {
createUpgradeButton2(upgradeButtons[i][v], i, v);
v--;
}
i--;
}
}
function createUpgradeButton2(button, num, num2) {
delete button.onRollOver;
delete button.onRollOut;
delete button.onRelease;
if (money < upgradeCosts[num][num2]) {
button.onRollOver = function () {
updateShopInfo2(num, num2);
button._alpha = 80;
};
button.onRollOut = function () {
button._alpha = 100;
};
}
if (money >= upgradeCosts[num][num2]) {
if (levels[num] > num2) {
button.gotoAndStop(3);
} else {
button.gotoAndStop(2);
button.onRollOver = function () {
button._alpha = 75;
updateShopInfo2(num, num2);
};
button.onRollOut = function () {
button._alpha = 100;
};
button.onRelease = function () {
if ((nextDisplay >= 16) || (nextDisplay == 13)) {
finishInfo();
displayInfo(nextDisplay);
button._alpha = 100;
money = money - upgradeCosts[num][num2];
createUpgradeButtons();
levels[num] = num2 + 1;
if (num == 2) {
penguinPartsEquipped[5][0] = num2 + 1;
penguinPartsEquipped[5][1] = num2 + 1;
penguinPartsEquipped[5][2] = num2 + 1;
penguinPartsEquipped[5][3] = num2 + 1;
penguinPartsEquipped[5][4] = num2 + 1;
}
updateEverything();
updatePenguinStats();
updateShopInfo(num, num2);
createUpgradeButtons();
}
};
}
} else if (levels[num] > num2) {
button.gotoAndStop(3);
} else {
button.gotoAndStop(1);
}
}
function createUpgradeButton(button, num, num2) {
delete button.ina.rbtn.onRollOver;
delete button.ina.rbtn.onRollOut;
delete button.ina.rbtn.onRelease;
button.ina.gotoAndStop(((num * 5) + num2) + 1);
if (penguinParts[penguinSelected - 1][num][num2]) {
button.canBuy.gotoAndStop(4);
if (penguinPartsEquipped[penguinSelected - 1][num] == (num2 + 1)) {
button.canBuy.gotoAndStop(3);
}
} else if (money >= partCosts[num][num2]) {
button.canBuy.gotoAndStop(2);
} else {
button.canBuy.gotoAndStop(1);
}
if (button.canBuy._currentframe == 1) {
button.ina.rbtn.onRollOver = function () {
updateShopInfo(num, num2);
button.ina.rbtn._alpha = 80;
};
button.ina.rbtn.onRollOut = function () {
button.ina.rbtn._alpha = 100;
};
}
if (button.canBuy._currentframe == 2) {
button.ina.rbtn.onRollOver = function () {
rollover.start();
button._alpha = 75;
updateShopInfo(num, num2);
};
button.ina.rbtn.onRollOut = function () {
button._alpha = 100;
};
button.ina.rbtn.onRelease = function () {
if ((nextDisplay >= 16) || (nextDisplay == 12)) {
if (money >= partCosts[num][num2]) {
finishInfo();
displayInfo(nextDisplay);
button._alpha = 100;
money = money - partCosts[num][num2];
button.canBuy.gotoAndStop(4);
penguinParts[penguinSelected - 1][num][num2] = true;
penguinPartsEquipped[penguinSelected - 1][num] = num2 + 1;
createUpgradeButtons();
updateEverything();
setPenguinImage();
updateShopInfo(num, num2);
}
}
};
}
if ((button.canBuy._currentframe == 3) || (button.canBuy._currentframe == 4)) {
button.ina.rbtn.onRollOver = function () {
rollover.start();
button._alpha = 75;
updateShopInfo(num, num2);
};
button.ina.rbtn.onRollOut = function () {
button._alpha = 100;
};
button.ina.rbtn.onRelease = function () {
button._alpha = 100;
penguinPartsEquipped[penguinSelected - 1][num] = num2 + 1;
createUpgradeButtons();
updateEverything();
setPenguinImage();
updateShopInfo(num, num2);
};
}
}
function updateShopStats() {
shop.moneyTxt.htmlText = bold("$" + money);
shop.daysTxt.htmlText - bold(level);
}
function updateShopInfo(num, num2) {
shop.typeTxt.htmlText = bold(types[num]);
shop.luckTxt.htmlText = bold(partStats[num][luckPart][num2]);
shop.costTxt.htmlText = bold(partCosts[num][num2]);
shop.speedTxt.htmlText = bold(partStats[num][speedPart][num2]);
shop.rangeTxt.htmlText = bold(partStats[num][rangePart][num2]);
shop.healthTxt.htmlText = bold(partStats[num][healthPart][num2]);
shop.descTxt.htmlText = bold(descriptions[num][num2]);
shop.healthBar.bar._xscale = (penguinHealths[penguinSelected - 1] / statMaxes[0]) * 100;
shop.speedBar.bar._xscale = (penguinSpeeds[penguinSelected - 1] / statMaxes[1]) * 100;
shop.luckBar.bar._xscale = (penguinLucks[penguinSelected - 1] / statMaxes[2]) * 100;
shop.rangeBar.bar._xscale = (penguinRanges[penguinSelected - 1] / statMaxes[3]) * 100;
shop.healthBar.statTxt.htmlText = bold((penguinHealths[penguinSelected - 1] + "/") + statMaxes[0]);
shop.speedBar.statTxt.htmlText = bold((penguinSpeeds[penguinSelected - 1] + "/") + statMaxes[1]);
shop.luckBar.statTxt.htmlText = bold((penguinLucks[penguinSelected - 1] + "/") + statMaxes[2]);
shop.rangeBar.statTxt.htmlText = bold((penguinRanges[penguinSelected - 1] + "/") + statMaxes[3]);
}
function startShopInfo() {
shop.typeTxt.htmlText = bold("");
shop.luckTxt.htmlText = bold("");
shop.costTxt.htmlText = bold("");
shop.speedTxt.htmlText = bold("");
shop.rangeTxt.htmlText = bold("");
shop.healthTxt.htmlText = bold("");
shop.descTxt.htmlText = bold("Please select an item");
shop.healthBar.bar._xscale = (penguinHealths[penguinSelected - 1] / statMaxes[0]) * 100;
shop.speedBar.bar._xscale = (penguinSpeeds[penguinSelected - 1] / statMaxes[1]) * 100;
shop.luckBar.bar._xscale = (penguinLucks[penguinSelected - 1] / statMaxes[2]) * 100;
shop.rangeBar.bar._xscale = (penguinRanges[penguinSelected - 1] / statMaxes[3]) * 100;
shop.healthBar.statTxt.htmlText = bold((penguinHealths[penguinSelected - 1] + "/") + statMaxes[0]);
shop.speedBar.statTxt.htmlText = bold((penguinSpeeds[penguinSelected - 1] + "/") + statMaxes[1]);
shop.luckBar.statTxt.htmlText = bold((penguinLucks[penguinSelected - 1] + "/") + statMaxes[2]);
shop.rangeBar.statTxt.htmlText = bold((penguinRanges[penguinSelected - 1] + "/") + statMaxes[3]);
}
function updateShopInfo2(num, num2) {
shop.typeTxt.htmlText = bold(types2[num]);
shop.luckTxt.htmlText = bold("N/A");
shop.costTxt.htmlText = bold(upgradeCosts[num][num2]);
shop.speedTxt.htmlText = bold("N/A");
shop.rangeTxt.htmlText = bold("N/A");
shop.healthTxt.htmlText = bold("N/A");
shop.descTxt.htmlText = bold(descriptions2[num][num2]);
}
function updatePenguinStats() {
j = 0;
while (j < 6) {
penguinStats[0][j] = 0;
penguinStats[1][j] = 0;
penguinStats[2][j] = 0;
penguinStats[3][j] = 0;
g = 0;
while (g < 5) {
penguinStats[healthPart][j] = penguinStats[healthPart][j] + partStats[g][0][penguinPartsEquipped[j][g] - 1];
penguinStats[speedPart][j] = penguinStats[speedPart][j] + partStats[g][1][penguinPartsEquipped[j][g] - 1];
penguinStats[luckPart][j] = penguinStats[luckPart][j] + partStats[g][2][penguinPartsEquipped[j][g] - 1];
penguinStats[rangePart][j] = penguinStats[rangePart][j] + partStats[g][3][penguinPartsEquipped[j][g] - 1];
g++;
}
j++;
}
}
function updateEverything() {
updateShopStats();
updatePenguinStats();
createPenguinButtons();
}
function createLevelSelect() {
ls = attachMovie("levelSelector", "levelSelector" + highDepth, highDepth++);
ls._x = Stage.width / 2;
ls._y = (Stage.height / 2) - 20;
gamePause = true;
ls.gts.onRollOver = function () {
rollover.start();
ls.gts._alpha = 75;
};
ls.gts.onRollOut = function () {
ls.gts._alpha = 100;
};
ls.gts.onRelease = function () {
if ((nextDisplay >= 16) || (nextDisplay == 10)) {
transitionToGame(2, 0);
}
};
levelSelectButtons = new Array(ls.bg1.l1, ls.bg1.l2, ls.bg1.l3, ls.bg1.l4, ls.bg1.l5, ls.bg1.l6, ls.bg1.l7, ls.bg1.l8, ls.bg1.l9, ls.bg1.l10, ls.bg2.l11, ls.bg2.l12, ls.bg2.l13, ls.bg2.l14, ls.bg2.l15, ls.bg2.l16, ls.bg2.l17, ls.bg2.l18, ls.bg2.l19, ls.bg2.l20, ls.bg3.l21, ls.bg3.l22, ls.bg3.l23, ls.bg3.l24, ls.bg3.l25, ls.bg3.l26, ls.bg3.l27, ls.bg3.l28, ls.bg3.l29, ls.bg3.l30, ls.bg4.l31, ls.bg4.l32, ls.bg4.l33, ls.bg4.l34, ls.bg4.l35, ls.bg4.l36, ls.bg4.l37, ls.bg4.l38, ls.bg4.l39, ls.bg4.l40);
l = 0;
while (l < levelSelectButtons.length) {
createLevelSelectButton(levelSelectButtons[l], l);
l++;
}
levelBgs = new Array(ls.bg1, ls.bg2, ls.bg3, ls.bg4);
bgTarget = Math.floor((levelsUnlocked - 1) / 10);
i = levelBgs.length - 1;
while (i >= 0) {
if ((levelsUnlocked / 10) > i) {
levelBgs[i].b1._alpha = 100;
levelBgs[i].locked._alpha = 0;
} else {
levelBgs[i].b1._alpha = 0;
levelBgs[i].locked._alpha = 100;
}
levelBgs[i]._x = bgTargets[bgTarget][i];
i--;
}
}
function createLevelSelectButton(button, l) {
if ((l + 1) <= levelsUnlocked) {
button.levelNumTxt.htmlText = bold(l + 1);
button.onRollOver = function () {
rollover.start();
button._alpha = 75;
ls.descTxt.htmlText = bold(levelDescriptions[l]);
};
button.onRollOut = function () {
button._alpha = 100;
};
button.onRelease = function () {
if ((((nextDisplay >= 16) || (nextDisplay == 2)) || (nextDisplay == 7)) || (nextDisplay == 15)) {
if ((nextDisplay == 7) && (l == 0)) {
} else if ((nextDisplay == 15) && ((l == 0) || (l == 2))) {
} else {
transitionToGame(1, l);
}
}
};
} else {
button.gotoAndStop(2);
}
}
function transitionToGame(num, holder) {
if (num == 1) {
outHolder = holder;
}
mech1.start();
st = attachMovie("screenTransition", "screenTransition", 980000);
st._x = Stage.width / 2;
st._y = Stage.height / 2;
st.Type = num;
}
function transitionManagement() {
if (st._currentframe == 15) {
mech3.start();
}
if (st._currentframe == 26) {
mech2.start();
}
if (((st._x != undefined) && (st.Type == 1)) && (st._currentframe == 25)) {
ls.removeMovieClip();
gamePause = false;
level = outHolder + 1;
days = days + 1;
moneyOnLevel = 0;
bg.gotoAndStop(level);
bg.obstacle.gotoAndStop(level);
inMenu = false;
finishInfo();
rtp.gotoAndPlay(2);
o = 3;
while (o >= 0) {
if (levels[o] >= 1) {
specialAmounts[o] = 1;
if (o == 3) {
specialAmounts[o] = levels[o];
}
} else {
specials[o].gotoAndStop(5);
}
o--;
}
updatePenguinStats();
}
if (((st._x != undefined) && (st.Type == 2)) && (st._currentframe == 25)) {
if (days == 2) {
money = 16;
}
createShop();
finishInfo();
displayInfo(nextDisplay);
ls.removeMovieClip();
}
if (((st._x != undefined) && (st.Type == 3)) && (st._currentframe == 25)) {
levelDone(true);
saveGame();
ui.spec1.gotoAndStop(5);
ui.spec2.gotoAndStop(5);
ui.spec3.gotoAndStop(5);
ui.spec4.gotoAndStop(5);
ui.spec5.gotoAndStop(5);
displayInfo(nextDisplay);
}
if (((st._x != undefined) && (st.Type == 4)) && (st._currentframe == 25)) {
lc.removeMovieClip();
finishInfo();
displayInfo(nextDisplay);
shop.removeMovieClip();
createLevelSelect();
i = levelBgs.length - 1;
while (i >= 0) {
levelBgs[i]._x = bgTargets[bgTarget][i];
i--;
}
}
if (((st._x != undefined) && (st.Type == 5)) && (st._currentframe == 25)) {
removeGame();
gotoAndStop (7);
}
}
function displayInfo(num) {
if (nextDisplay < 16) {
num = infoDisplayOrder[num - 1];
nextDisplay = nextDisplay + 1;
gamePause = true;
delete info.doneBtn.onRollOver;
delete info.doneBtn.onRollOut;
delete info.doneBtn.onRelease;
info._y = Stage.height / 2;
t = instructionArrows.length - 1;
while (t >= 0) {
instructionArrows[t]._alpha = 0;
t--;
}
if ((num <= instructionArrows.length) && (num != 1)) {
instructionArrows[num - 1]._alpha = 100;
info.doneBtn._alpha = 0;
} else {
instructionArrows[num - 1]._alpha = 100;
info.doneBtn._alpha = 100;
info.doneBtn.onRollOver = function () {
info.doneBtn.gotoAndStop(2);
};
info.doneBtn.onRollOut = function () {
info.doneBtn.gotoAndStop(1);
};
info.doneBtn.onRelease = function () {
finishInfo();
if ((num == 13) || (num == 1)) {
displayInfo(nextDisplay);
}
if (num == 12) {
startCounter = 25;
createTransition(0);
}
};
}
info.descTxt.htmlText = bold(instructionDescriptions[num - 1]);
}
}
function finishInfo() {
info._y = 2000;
if (!inMenu) {
gamePause = false;
}
}
function randRange(smallNum, bigNum) {
return(Math.floor(Math.random() * ((bigNum - smallNum) + 1)) + smallNum);
}
finishTransition();
wasHere = true;
stop();
var mech1 = new Sound();
mech1.attachSound("mech1.mp3");
var mech2 = new Sound();
mech2.attachSound("mech2.mp3");
var mech3 = new Sound();
mech3.attachSound("mech3.mp3");
var bite = new Sound();
bite.attachSound("bite.mp3");
var swish = new Sound();
swish.attachSound("swish.mp3");
var clash = new Sound();
clash.attachSound("clash.mp3");
var boom = new Sound();
boom.attachSound("boom.mp3");
var rollover = new Sound();
rollover.attachSound("rollover.mp3");
var bell = new Sound();
bell.attachSound("bell.mp3");
var loop = new Sound();
loop.attachSound("loop.mp3");
loop.start(0, 100000);
keyListener = new Object();
keyListener.onKeyDown = function () {
num = Key.getAscii();
if (num == 112) {
playerPause = !playerPause;
pauseStuff();
}
};
Key.addListener(keyListener);
alphaHover(pbtn);
alphaHover(mbtn);
alphaHover(qbtn);
pbtn.swapDepths(850200);
mbtn.swapDepths(850201);
qbtn.swapDepths(850202);
pbtn.onRelease = function () {
playerPause = !playerPause;
pauseStuff();
};
if (muted2) {
mech1.setVolume(0);
}
mbtn.onRelease = function () {
if (muted2) {
muted2 = !muted2;
mech1.setVolume(100);
} else {
muted2 = !muted2;
mech1.setVolume(0);
}
};
if (qualityLevel == 1) {
_quality = "LOW";
}
if (qualityLevel == 2) {
_quality = "MEDIUM";
}
if (qualityLevel == 3) {
_quality = "HIGH";
}
qbtn.onRelease = function () {
if (_quality == "LOW") {
_quality = "MEDIUM";
qualityLevel = 2;
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
qualityLevel = 3;
} else {
_quality = "LOW";
qualityLevel = 1;
}
};
levelStarted = false;
timeToRelease = 50;
transDelay = 0;
startCounter = 0;
specialAmounts = new Array(0, 0, 0, 0);
speedSpecials = new Array(0.3, 0.6, 1, 1.3, 1.6, 2, 2.5, 3);
specialSpeedLifes = new Array(90, 120, 150, 180, 210, 240, 270, 300);
specialSpeedLife = 0;
lifeSpecials = new Array(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7);
itemHeld = -1;
itemInHand = null;
penguinItem = 0;
bombItem = 1;
clickedDelay = 0;
MouseDown = false;
onMouseDown = function () {
MouseDown = true;
};
onMouseUp = function () {
MouseDown = false;
};
uiPenguins = new Array(ui.p1, ui.p2, ui.p3, ui.p4, ui.p5, ui.p6);
k = uiPenguins.length - 1;
while (k >= 0) {
uiPenguins[k]._alpha = 0;
k--;
}
specials = new Array(ui.spec1, ui.spec2, ui.spec3, ui.spec4);
specialFunctions = new Array(special1, special2, special3, special4);
explosions = new Array();
theTotal = 0;
bunniesKilled = 0;
teleportBunny = 7;
explodingBunny = 5;
shootingBunny = 4;
acidBunny = 6;
stickyBunny = 8;
invisBunny = 2;
immuneBunny = 3;
cloneBunny = 9;
targetBodies = new Array(1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4);
bunnies = new Array();
bunnyWorths = new Array(3, 5, 10, 25, 40, 50, 75, 200, 100, 400, 50);
mons = new Array();
golds = new Array();
shells = new Array();
acids = new Array();
stickys = new Array();
penguins = new Array();
penguinHealths = new Array(0, 0, 0, 0, 0, 0);
penguinSpeeds = new Array(0, 0, 0, 0, 0, 0);
penguinLucks = new Array(0, 0, 0, 0, 0, 0);
penguinRanges = new Array(0, 0, 0, 0, 0, 0);
penguinStats = new Array(penguinHealths, penguinSpeeds, penguinLucks, penguinRanges);
statMaxes = new Array(4000, 11, 1, 110);
bunnyBullets = new Array();
parts = new Array();
beakCosts = new Array(0, 5, 150, 1200, 10000);
headCosts = new Array(0, 60, 750, 4000, 20000);
bodyCosts = new Array(0, 100, 1000, 5000, 30000);
armsCosts = new Array(0, 25, 250, 2000, 12000);
feetCosts = new Array(0, 40, 400, 3000, 15000);
partCosts = new Array(beakCosts, headCosts, bodyCosts, armsCosts, feetCosts);
beakHealths = new Array(75, 150, 250, 350, 500);
beakSpeeds = new Array(0.8, 1.2, 1.5, 1.8, 2);
beakLucks = new Array(0.03, 0.06, 0.09, 0.12, 0.15);
beakRanges = new Array(4, 8, 12, 16, 20);
beakStats = new Array(beakHealths, beakSpeeds, beakLucks, beakRanges);
headHealths = new Array(25, 50, 100, 150, 200);
headSpeeds = new Array(0.2, 0.3, 0.5, 0.6, 0.7);
headLucks = new Array(0.01, 0.02, 0.03, 0.04, 0.05);
headRanges = new Array(10, 20, 40, 50, 60);
headStats = new Array(headHealths, headSpeeds, headLucks, headRanges);
bodyHealths = new Array(200, 400, 1000, 1800, 2900);
bodySpeeds = new Array(0.2, 0.3, 0.5, 0.6, 0.7);
bodyLucks = new Array(0.01, 0.02, 0.03, 0.04, 0.05);
bodyRanges = new Array(2, 4, 6, 8, 10);
bodyStats = new Array(bodyHealths, bodySpeeds, bodyLucks, bodyRanges);
armsHealths = new Array(25, 50, 100, 150, 200);
armsSpeeds = new Array(0.2, 0.3, 0.5, 0.6, 0.6);
armsLucks = new Array(0.3, 0.4, 0.5, 0.6, 0.7);
armsRanges = new Array(2, 4, 6, 8, 10);
armsStats = new Array(armsHealths, armsSpeeds, armsLucks, armsRanges);
feetHealths = new Array(25, 50, 100, 150, 200);
feetSpeeds = new Array(3, 4, 5, 6, 7);
feetLucks = new Array(0.01, 0.02, 0.03, 0.04, 0.05);
feetRanges = new Array(2, 4, 6, 8, 10);
feetStats = new Array(feetHealths, feetSpeeds, feetLucks, feetRanges);
partStats = new Array(beakStats, headStats, bodyStats, armsStats, feetStats);
penguinSelected = 1;
penguinCosts = new Array(0, 10, 200, 5000, 20000);
speedCosts = new Array(1, 10, 100, 1000, 8000, 15000, 30000);
zombieCosts = new Array(50, 300, 1000, 3000, 8000, 15000, 30000);
extraCosts = new Array(75, 150, 1500, 7500, 40000);
bombCosts = new Array(50, 200, 750, 2000, 7000, 20000, 40000);
upgradeCosts = new Array(speedCosts, zombieCosts, extraCosts, bombCosts);
speedLevel = 0;
lifeLevel = 1;
extraLevel = 2;
bombLevel = 3;
healthPart = 0;
speedPart = 1;
luckPart = 2;
rangePart = 3;
beakDescriptions = new Array("Normal Penguin's beak", "Fighter Penguin's beak", "Armored Penguin's beak", "Zombie Penguin's beak", "Robo Penguin's beak");
headDescriptions = new Array("Normal Penguin's head", "Fighter Penguin's head", "Armored Penguin's head", "Zombie Penguin's head", "Robo Penguin's head");
bodyDescriptions = new Array("Normal Penguin's body", "Fighter Penguin's body", "Armored Penguin's body", "Zombie Penguin's body", "Robo Penguin's body");
armsDescriptions = new Array("Normal Penguin's arms", "Fighter Penguin's arms", "Armored Penguin's arms", "Zombie Penguin's arms", "Robo Penguin's arms");
feetDescriptions = new Array("Normal Penguin's feet", "Fighter Penguin's feet", "Armored Penguin's feet", "Zombie Penguin's feet", "Robo Penguin's feet");
descriptions = new Array(beakDescriptions, headDescriptions, bodyDescriptions, armsDescriptions, feetDescriptions);
types = new Array("Beak", "Head", "Body", "Arms", "Feet");
healthDescriptions = new Array("10% Health Boost for all penguins when used", "20% Health Boost for all penguins when used", "30% Health Boost for all penguins when used", "40% Health Boost for all penguins when used", "50% Health Boost for all penguins when used", "60% Health Boost for all penguins when used", "70% Health Boost for all penguins when used", "80% Health Boost for all penguins when used");
speedDescriptions = new Array("30% speed increase for 3 seconds", "60% speed increase for 4 seconds", "100% speed increase for 5 seconds", "130% speed increase for 6 seconds", "160% speed increase for 7 seconds", "200% speed increase for 8 seconds", "250% speed increase for 9 seconds", "300% speed increase for 10 seconds");
luckDescriptions = new Array("Bonus regular penguin", "Bonus fighter penguin", "Bonus armored penguin", "Bonus zombie penguin", "Bonus robotic penguin");
rangeDescriptions = new Array("One Bomb", "Two Bombs", "Three Bombs", "Four Bombs", "Five Bombs", "Six Bombs", "Seven Bombs", "Eight Bombs");
descriptions2 = new Array(speedDescriptions, healthDescriptions, luckDescriptions, rangeDescriptions);
types2 = new Array("Speed", "Life", "Extra", "Bomb");
bg1Targets = new Array(-84, -56, -28, 0);
bg2Targets = new Array(-675, -56, -28, 0);
bg3Targets = new Array(-675, -648, -28, 0);
bg4Targets = new Array(-675, -648, -621, 0);
bgTargets = new Array(bg1Targets, bg2Targets, bg3Targets, bg4Targets);
levelDescriptions = new Array("This is the first level description", "This is the second level description", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
moneyOnLevel = 0;
outHolder = 0;
instructionArrows = new Array(info.game1, info.game2, info.levelSelect1, info.levelSelect3, info.levelSelect2, info.shop1, info.shop2, info.shop3, info.shop4, info.result1, info.result1);
instructionDescriptions = new Array("Your penguins and their health will be displayed here, they will slowly grow hungry (lose health) over time.", "You can use your speed special by clicking on this button; try it out. That's it for the tutorial, good luck beating all 40 groups of enemy turtles!", "Welcome to Penguin Overlords. The turtles have taken over the world and it's your duty to raise a turtle eating army and take back what's rightfully yours! Click here to play the first level.", "Click here to play the second level.", "Click here to access the shop which has a bunch of upgrade options for you to choose from.", "Another penguin should help to beat level 2, click on the button to buy one.", "Let's buy a new part for your penguin, click on the second beak to purchase it.", "Great! It's time to beat level 2. Click the back button to return to the level select.", "Time to buy a special upgrade, click on the speed boost to purchase it.", "Huzzah, you completed the first level! This is the results screen which gives you information on how you did. Click FINISHED to return to the level select screen", "Click FINISHED to return to the level select screen. You're going to need to try this level again after you upgrade your army.", "Yikes, you lost. It appears your penguin has exploded which means it ran out of health! Fortunately you can play levels as many times as you need to in order to win.", "Hello player, the objective of each level is to eat all the turtles before your penguins starve.", "Your penguins will automatically run after turtles and try to devour them. You must assist them by collecting eggs (money) with your mouse.");
info.swapDepths(973000);
infoDisplayOrder = new Array(3, 13, 1, 14, 10, 4, 12, 11, 5, 6, 7, 9, 8, 4, 2);
init();
beginGame();
displayInfo(nextDisplay);
updatePenguinStats();
Frame 5
back.onRollOver = function () {
back._alpha = 75;
};
back.onRollOut = function () {
back._alpha = 100;
};
back.onRelease = function () {
createTransition(2);
};
wasHere = true;
finishTransition();
Instance of Symbol 91 MovieClip in Frame 5
on (release) {
getURL ("http://armorgames.com", "_BLANK");
}
Frame 6
function bold(item) {
return(("<b>" + item) + "</b>");
}
function createBasicHover(button, num) {
button.onRollOver = function () {
button._alpha = 75;
options.descTxt.htmlText = bold(optDescs[num - 1]);
};
button.onRollOut = function () {
button._alpha = 100;
};
}
finishTransition();
back.onRollOver = function () {
back._alpha = 75;
};
back.onRollOut = function () {
back._alpha = 100;
};
back.onRelease = function () {
createTransition(2);
};
wasHere = true;
createBasicHover(options.csbtn, 1);
createBasicHover(options.mubtn, 2);
createBasicHover(options.qubtn, 3);
options.mubtn.onRelease = function () {
muted2 = !muted2;
saveGame();
};
options.qubtn.onRelease = function () {
if (_quality == "LOW") {
_quality = "MEDIUM";
qualityLevel = 2;
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
qualityLevel = 3;
} else {
_quality = "LOW";
qualityLevel = 1;
}
saveGame();
};
optDescs = new Array("THIS BUTTON WILL CLEAR ALL YOUR SAVED DATA, ARE YOU SURE YOU WANT TO CONTINUE?", "THE GAME IS CURRENTLY muted2, WOULD YOU LIKE TO UNMUTE?", "THE GAME IS CURRENTLY ON LOW QUALITY, WOULD YOU LIKE TO CHANGE IT?", "WARNING: ALL DATA WILL BE DELTED", "");
options.csbtn.onRelease = function () {
options.aus._alpha = 100;
createBasicHover(options.aus.ybtn, 4);
createBasicHover(options.aus.nbtn, 5);
options.aus.ybtn.onRelease = function () {
options.aus._alpha = 0;
sObject.clear();
};
options.aus.nbtn.onRelease = function () {
options.aus._alpha = 0;
};
};
Frame 7
function onEnterFrame() {
waitToMove();
}
finishTransition();
gameOverScreen.credits.btm.onRollOver = function () {
gameOverScreen.credits.btm._alpha = 75;
};
gameOverScreen.credits.btm.onRollOut = function () {
gameOverScreen.credits.btm._alpha = 100;
};
gameOverScreen.credits.btm.onRelease = function () {
createTransition(2);
};
Symbol 30 MovieClip [Blood3] Frame 33
_parent.removeMovieClip();
Symbol 44 MovieClip [Blood1] Frame 25
_parent.removeMovieClip();
Symbol 61 MovieClip [Blood2] Frame 32
_parent.removeMovieClip();
Symbol 83 MovieClip [Blood4] Frame 15
_parent.removeMovieClip();
Symbol 84 MovieClip [blood] Frame 1
stop();
Symbol 886 MovieClip [__Packages.Playtomic.LogRequest] Frame 0
class Playtomic.LogRequest
{
var Pieces;
function LogRequest () {
}
function Queue(data) {
Pieces++;
Data = Data + (((Data == "") ? "" : "~") + data);
if ((Pieces == 8) || (Data.length > 300)) {
Pieces = 0;
Ready = true;
}
}
function Send() {
var _local2 = new LoadVars();
_local2.load(((((((((("http://g" + Playtomic.Log.GUID) + ".api.playtomic.com/Tracker/q.aspx?swfid=") + Playtomic.Log.SWFID) + "&q=") + Data) + "&url=") + Playtomic.Log.SourceUrl) + "&") + Math.random()) + "z", null, "POST");
}
var Data = "";
var Ready = false;
}
Symbol 887 MovieClip [__Packages.Playtomic.Log] Frame 0
class Playtomic.Log
{
static var SourceUrl, Cookie;
function Log () {
}
static function View(swfid, guid, defaulturl) {
if (swfid == undefined) {
swfid = 0;
}
if (guid == undefined) {
guid = "";
}
if (defaulturl == undefined) {
defaulturl = "";
}
if (SWFID > 0) {
return(undefined);
}
SWFID = swfid;
GUID = guid;
Enabled = true;
if ((SWFID == 0) || (GUID == "")) {
Enabled = false;
return(undefined);
}
if (((defaulturl.indexOf("http://") != 0) && (System.security.sandboxType != "localWithNetwork")) && (System.security.sandboxType != "localTrusted")) {
Enabled = false;
return(undefined);
}
SourceUrl = GetUrl(defaulturl);
if (((SourceUrl == null) || (SourceUrl == "")) || (SourceUrl.indexOf("https://") == 0)) {
Enabled = false;
return(undefined);
}
Cookie = SharedObject.getLocal("playtomic");
var _local2 = GetCookie("views");
_local2++;
SaveCookie("views", _local2);
Send("v/" + _local2, true);
_global.setTimeout(PingServer, 60000);
}
static function ForceSend() {
Request.Send();
Request = new Playtomic.LogRequest();
}
static function Play() {
if (!Enabled) {
return(undefined);
}
LevelCounters = new Array();
LevelAverages = new Array();
LevelRangeds = new Array();
Plays++;
Send("p/" + Plays);
}
static function CustomMetric(name, group, unique) {
if (!Enabled) {
return(undefined);
}
if ((group == null) || (group == undefined)) {
group = "";
}
if ((unique == null) || (unique == undefined)) {
unique = false;
}
if (unique) {
if (Customs.indexOf(name) > -1) {
return(undefined);
}
Customs.push(name);
}
Send((("c/" + Clean(name)) + "/") + Clean(group));
}
static function Link(url, name, group, unique, total, fail) {
if (!Enabled) {
return(undefined);
}
Send((((((((((("l/" + Clean(name)) + "/") + Clean(group)) + "/") + Clean(url)) + "/") + unique) + "/") + total) + "/") + fail);
}
static function LevelCounterMetric(name, level, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
if (LevelCounters.indexOf(name) > -1) {
return(undefined);
}
LevelCounters.push(name);
}
Send((("lc/" + Clean(name)) + "/") + Clean(level));
}
static function LevelRangedMetric(name, level, value, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
if (LevelRangeds.indexOf(name) > -1) {
return(undefined);
}
LevelRangeds.push(name);
SaveCookie("lr_" + name, 1);
}
Send((((("lr/" + Clean(name)) + "/") + Clean(level)) + "/") + value);
}
static function LevelAverageMetric(name, level, value, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
if (LevelAverages.indexOf(name) > -1) {
return(undefined);
}
LevelAverages.push(name);
}
Send((((("la/" + Clean(name)) + "/") + Clean(level)) + "/") + value);
}
static function PingServer() {
if (!Enabled) {
return(undefined);
}
Pings++;
Send((("t/" + (FirstPing ? "y" : "n")) + "/") + Pings, true);
if (FirstPing) {
FirstPing = false;
setInterval(PingServer, 60000);
}
}
static function Send(s, view) {
if (view == undefined) {
view = false;
}
Request.Queue(s);
if ((Request.Ready || (view)) || (!Queue)) {
Request.Send();
Request = new Playtomic.LogRequest();
}
}
static function GetCookie(n) {
if (Cookie.data[n] == undefined) {
return(0);
}
return(parseInt(Cookie.data[n]));
}
static function SaveCookie(n, v) {
var _local1 = SharedObject.getLocal("swfstats");
_local1.data[n] = v.toString();
_local1.flush();
}
static function Clean(s) {
while (s.indexOf("/") > -1) {
s = s.replace("/", "\\");
}
while (s.indexOf("~") > -1) {
s = s.replace("~", "-");
}
return(escape(s));
}
static function Replace(str, find, replace) {
return(str.split(find).join(replace));
}
static function GetUrl(defaulturl) {
return(defaulturl);
}
static var Enabled = false;
static var Queue = true;
static var SWFID = 0;
static var GUID = "";
static var Request = new Playtomic.LogRequest();
static var FirstPing = true;
static var Pings = 0;
static var Plays = 0;
static var HighestGoal = 0;
static var Customs = new Array();
static var LevelCounters = new Array();
static var LevelAverages = new Array();
static var LevelRangeds = new Array();
}
Symbol 116 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Symbol 116 MovieClip Frame 225
_root.nextFrame();
Symbol 143 MovieClip [screenTransition] Frame 39
this.removeMovieClip();
Symbol 155 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 1
stop();
Symbol 188 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 271 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 15
stop();
Symbol 281 MovieClip [bunny] Frame 1
stop();
Symbol 282 MovieClip Frame 25
_parent.gotoAndStop(1);
Symbol 283 MovieClip Frame 20
_parent.gotoAndStop(1);
Symbol 284 MovieClip [penguin] Frame 1
stop();
Symbol 284 MovieClip [penguin] Frame 2
stop();
Symbol 345 MovieClip Frame 1
stop();
Symbol 351 MovieClip [skillUpgrade] Frame 1
stop();
Symbol 399 MovieClip Frame 1
gotoAndPlay(random(88) + 2);
Symbol 399 MovieClip Frame 90
gotoAndPlay (2);
Symbol 513 MovieClip Frame 48
_parent.removeMovieClip();
Symbol 529 MovieClip Frame 1
stop();
Symbol 603 MovieClip [background] Frame 1
stop();
Symbol 623 MovieClip Frame 1
stop();
Symbol 634 MovieClip Frame 1
stop();
Symbol 641 MovieClip Frame 1
stop();
Symbol 652 MovieClip Frame 1
stop();
Symbol 659 MovieClip Frame 1
stop();
Symbol 666 MovieClip Frame 1
stop();
Symbol 673 MovieClip Frame 1
stop();
Symbol 681 MovieClip Frame 1
stop();
Symbol 688 MovieClip Frame 1
stop();
Symbol 709 MovieClip Frame 1
stop();
Symbol 716 MovieClip Frame 1
stop();
Symbol 723 MovieClip Frame 1
stop();
Symbol 730 MovieClip Frame 1
stop();
Symbol 732 MovieClip Frame 25
_parent.gotoAndStop(1);
Symbol 733 MovieClip Frame 20
_parent.gotoAndStop(1);
Symbol 734 MovieClip [penguinMini] Frame 1
stop();
Symbol 754 MovieClip [turtleMini] Frame 1
stop();
Symbol 762 MovieClip Frame 1
stop();
Symbol 762 MovieClip Frame 90
stop();
Symbol 769 MovieClip Frame 1
stop();
Symbol 779 MovieClip Frame 1
stop();
Instance of Symbol 144 MovieClip in Symbol 790 MovieClip [levelComplete] Frame 1
on (release) {
getURL ("http://armorgames.com", "_BLANK");
}
Symbol 822 MovieClip Frame 1
stop();
Symbol 832 MovieClip [gold] Frame 1
stop();
Symbol 884 MovieClip Frame 600
stop();