Frame 1
function playAgain() {
tellTarget ("_level0") {
gotoAndStop (5);
};
}
System.security.allowDomain("shockwave.com", "intranet.shockwave.com", "gameblast.shockwave.com", "www.shockwave.com", "dev.shockwave.com", "stage.shockwave.com", "brettbits.com");
_level0.swHighScoreObject = new Object();
_level0.swHighScoreObject.showTab = "view";
_level0.swHighScoreObject.gameId = "mayhemskies";
_level0.swHighScoreObject.gameTitle = "Mayhem In The Skies!";
_level0.swHighScoreObject.screenWidth = 400;
_level0.swHighScoreObject.screenHeight = 600;
_level0.swHighScoreObject.scoreDescriptor = "points";
_level0.swHighScoreObject.numPlayers = 1;
_level0.swHighScoreObject.player1Score = 0;
_level0.swHighScoreObject.player2Score = 0;
_level0.swHighScoreObject.player3Score = 0;
_level0.swHighScoreObject.player4Score = 0;
_level0.HSHubURL = "http://www.shockwave.com/content/highscores/scorez-2002.swf";
i = 1;
while (100 >= i) {
_root.link.duplicateMovieClip("link" + i, i);
_root["link" + i]._x = 200;
_root["link" + i]._y = i * 5;
i++;
}
_root.spark.duplicateMovieClip("spark2", 101);
_root.link._visible = false;
_root.spark._visible = false;
Instance of Symbol 8 MovieClip "spark" in Frame 1
onClipEvent (enterFrame) {
}
Frame 2
_root.link1._x = _root._xmouse;
_root.link1._y = _root._ymouse;
percentLoaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
percentRemaining = 100 - percentLoaded;
i = 2;
while (percentRemaining >= i) {
xOffset = _root["link" + i]._x - _root["link" + (i - 1)]._x;
xOffset = xOffset * 0.05;
if (5 < xOffset) {
xOffset = 5;
}
if (xOffset < -5) {
xOffset = -5;
}
_root["link" + i]._x = _root["link" + (i - 1)]._x + xOffset;
_root["link" + i]._y = _root["link" + (i - 1)]._y + 5;
i++;
}
_root.spark2._x = _root["link" + (percentRemaining - 1)]._x;
_root.spark2._y = _root["link" + (percentRemaining - 1)]._y;
i = percentRemaining;
while (100 >= i) {
_root["link" + i].removeMovieClip();
i++;
}
loadingMessage._alpha = (percentLoaded * 0.5) + 25;
loadingMessage._rotation = loadingMessage._rotation + (percentLoaded * 0.3);
Instance of Symbol 13 MovieClip "loadingMessage" in Frame 2
onClipEvent (enterFrame) {
fins._alpha = _root.percentLoaded;
}
Frame 3
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
gotoAndPlay (2);
} else {
i = 1;
while (100 >= i) {
_root["link" + i].removeMovieClip();
i++;
}
_root.spark2.removeMovieClip();
stopAllSounds();
masterSoundFXVolume = 1;
masterMusicVolume = 100;
aimAngleLimit = 60;
pauseMenuDepth = 10005;
cursorsDepth = 10010;
gameTimerDepth = 10001;
scoreBoxDepth = 10002;
babyDropMeterDepth = 10003;
cannonballSpecialDepth = 10004;
SCORE_MULTIPLIER_INCREASE = 0.05;
TIME_REMAINING_INCREASE = 200;
showUpgradesExplanation = true;
}
Frame 5
function newGame() {
currentLevel = 1;
gravity = 3;
cannonHealth = 100;
firemenHealth = 100;
levelCoolDownRate = 5;
levelDropProb = 0.0001;
levelDropProbIncreaseRate = 0.0001;
bombDamage = 10;
firemenSpeed = 5;
firepowerMultiplier = 1;
trampolineBouncebackMultiplier = 1;
powerbarStartsAt = 2;
largeTrampoline = false;
showTimer = false;
cannonballsFired = 0;
cannonballsLanded = 0;
bombsDestroyed = 0;
bombsMissed = 0;
babiesCaught = 0;
babiesMissed = 0;
numMusic = 3;
numBackgrounds = 4;
numCursors = 4;
score = 0;
maxBabyDrops = 3;
timeRemainingStart = 800;
spendablePoints = score;
oldScore = 0;
cannonballPowerLevel = 1;
tipBookPurchased = false;
awardHandbookPurchased = false;
}
stop();
Instance of Symbol 70 MovieClip "music" in Frame 5
onClipEvent (load) {
this.gotoAndPlay(2);
}
Frame 6
stop();
Frame 7
stop();
Frame 8
tellTarget ("_level0") {
gotoAndStop (4);
};
Frame 9
function removeObject(obj) {
obj.removeMovieClip();
}
function OA_addObject(arr, obj) {
arr[arr.length] = obj;
}
function OA_getPositionOf(arr, obj) {
i = 0;
while (i < arr.length) {
if (arr[i] == obj) {
return(i);
}
i++;
}
}
function OA_removeObject(arr, obj) {
pos = OA_getPositionOf(arr, obj);
i = pos;
while (i < (arr.length - 1)) {
arr[i] = arr[i + 1];
i++;
}
delete arr[arr.length - 1];
arr.length = arr.length - 1;
removeObject(obj);
}
function getMax(a, b) {
if (b < a) {
return(a);
}
return(b);
}
function advanceDepth() {
currDepth++;
if (currDepth >= maxDepth) {
currDepth = 1;
}
}
function playSound(snd, volume, pan) {
mySound = new Sound(_root.sounds);
mySound.setVolume(volume * _root.masterSoundFXVolume);
mySound.setPan(pan);
_root.sounds.gotoAndPlay(snd);
}
function changeMusic(musicFrame) {
stopAllSounds();
_root.music.gotoAndStop(musicFrame);
}
function setMusicVolume() {
theMusic = new Sound(_root.music);
theMusic.setVolume(_root.masterMusicVolume);
}
function addToScore(num) {
score = score + Math.round(num * scoreMultiplier);
levelScore = levelScore + Math.round(num * scoreMultiplier);
}
function increaseLevel() {
currentLevel++;
timeRemainingStart = timeRemainingStart + TIME_REMAINING_INCREASE;
gravity = gravity + (0.35 + (Math.random() * 0.2));
if (2 < levelCoolDownRate) {
levelCoolDownRate = levelCoolDownRate - (0.15 + (Math.random() * 0.25));
}
levelDropProb = levelDropProb + 0.0005;
levelDropProbIncreaseRate = levelDropProbIncreaseRate + 0.0003;
bombDamage = bombDamage + Math.floor(Math.sqrt(currentLevel));
}
function beginLevel() {
timeRemaining = timeRemainingStart;
currDepth = 1;
coolDownRate = levelCoolDownRate;
dropProb = levelDropProb;
levelBabyDrops = 0;
changeMusic(((_root.currentLevel - 1) % _root.numMusic) + 2);
setMusicVolume();
}
function endLevel(gameIsOver) {
cursors.gotoAndStop(1);
Mouse.show();
stopAllSounds();
i = 0;
while (i < bombArray.length) {
removeObject(bombArray[i]);
i++;
}
i = 0;
while (i < babyArray.length) {
removeObject(babyArray[i]);
i++;
}
i = 0;
while (i < cannonballArray.length) {
removeObject(cannonballArray[i]);
i++;
}
gameTimer.removeMovieClip();
scoreBox.removeMovieClip();
babyDropMeter.removeMovieClip();
pauseMenu.removeMovieClip();
cursors.removeMovieClip();
cannonballSpecial.removeMovieClip();
if (gameIsOver) {
gameOver();
} else {
gotoAndStop ("levelComplete");
}
}
function gameOver() {
gotoAndStop ("gameover");
}
aimAngleLimit = 60;
paused = false;
levelStarted = false;
currDepth = 1;
maxDepth = 10000;
cannonballArray = new Array();
bombArray = new Array();
babyArray = new Array();
levelCannonballsFired = 0;
levelCannonballsLanded = 0;
levelBombsDestroyed = 0;
levelBombsMissed = 0;
levelBabiesCaught = 0;
levelScore = 0;
smoothDescent = true;
cannonballReflectionCount = 0;
firemenMovementCounter = 0;
scoreMultiplier = 1;
detonationHeightTotal = 0;
detonationCount = 0;
fireWhileCooldownCount = 0;
cannonPowerCount = 0;
stop();
Instance of Symbol 385 MovieClip "background" in Frame 9
onClipEvent (load) {
this.gotoAndStop(((_root.currentLevel - 1) % _root.numBackgrounds) + 1);
}
Instance of Symbol 260 MovieClip "cannonball" in Frame 9
onClipEvent (load) {
function fireSpecial() {
FIRE_SPECIAL_PROB = 1 / Math.pow(_root.currentLevel, 2 / (6 - _root.cannonballPowerLevel));
if (Math.random() < FIRE_SPECIAL_PROB) {
_root.cannonballSpecial._x = _x;
_root.cannonballSpecial._y = _y;
_root.cannonballSpecial.gotoAndPlay("level" + _root.cannonballPowerLevel);
}
}
if (_name == "cannonball") {
_visible = false;
}
this.gotoAndStop(_root.cannonballPowerLevel);
}
onClipEvent (enterFrame) {
if ((_name != "cannonball") and (!_root.paused)) {
if (600 < _y) {
_root.scoreMultiplier = 1;
_root.OA_removeObject(_root.cannonballArray, this);
}
_x = (_x + xMove);
_y = (_y + yMove);
if ((yMove + _root.gravity) < 70) {
yMove = yMove + _root.gravity;
}
i = 0;
while (i < _root.bombArray.length) {
if (this.hitTest(_root.bombArray[i].bomb) and (!root.bombArray[i].detonated)) {
_root.bombArray[i].detonate();
_root.detonationHeightTotal = _root.detonationHeightTotal + (600 - _root.bombArray[i]._y);
_root.detonationCount++;
_root.bombsDestroyed++;
_root.cannonballsLanded++;
_root.levelBombsDestroyed++;
_root.levelCannonballsLanded++;
_root.addToScore(560 - _root.bombArray[i]._y);
_root.scoreMultiplier = _root.scoreMultiplier + _root.SCORE_MULTIPLIER_INCREASE;
fireSpecial();
_root.OA_removeObject(_root.cannonballArray, this);
}
i++;
}
i = 0;
while (i < _root.babyArray.length) {
if (this.hitTest(_root.babyArray[i].baby) and (!_root.babyArray[i].lostChute)) {
_root.smoothDescent = false;
_root.babyArray[i].loseChute();
_root.detonationHeightTotal = _root.detonationHeightTotal + (600 - _root.babyArray[i]._y);
_root.detonationCount++;
_root.cannonballsLanded++;
_root.levelCannonballsLanded++;
_root.addToScore((560 - _root.babyArray[i]._y) / 3);
_root.scoreMultiplier = _root.scoreMultiplier + _root.SCORE_MULTIPLIER_INCREASE;
fireSpecial();
_root.OA_removeObject(_root.cannonballArray, this);
}
i++;
}
if (this.hitTest(_root.firemen.trampoline.hitArea)) {
_root.cannonballReflectionCount++;
_root.addToScore(_root.currentLevel * 5);
yMove = (-yMove) * _root.trampolineBouncebackMultiplier;
xMove = (_x - _root.firemen._x) * 0.1;
_y = (_root.firemen._y - 10);
_root.playSound("trampolineBounce", (-yMove) * 2, (_x - 200) / 2);
_root.firemen.trampoline.bounce.play();
}
}
}
Instance of Symbol 223 MovieClip "cannon" in Frame 9
onClipEvent (load) {
function takeDamage(damage) {
if (cannonBarrel.dead) {
return(undefined);
}
health = health - damage;
healthMeter.setValue((health / totalHealth) * 100);
if (crack._currentframe == 1) {
crack.gotoAndPlay(2);
cannonBarrel.crack.gotoAndPlay(2);
}
if (0 >= health) {
die();
}
}
function die() {
healthMeter.bar._xscale = 0;
cannonBarrel.gotoAndPlay("die");
statusMeter._visible = false;
healthMeter._visible = false;
base.gotoAndPlay("die");
_root.playSound("cannonDie", 100, 0);
cannonBarrel.dead = true;
}
totalHealth = _root.cannonHealth;
health = totalHealth;
}
onClipEvent (unload) {
_root.mechanicsDream = health == totalHealth;
_root.cannonless = 0 >= health;
}
Instance of Symbol 395 MovieClip "cannonballSpecial" in Frame 9
onClipEvent (load) {
this.swapDepths(_root.cannonballSpecialDepth);
}
Instance of Symbol 396 MovieClip "firemen" in Frame 9
onClipEvent (load) {
function takeDamage(damage) {
health = health - damage;
healthMeter.setValue((health / totalHealth) * 100);
if (0 >= health) {
die();
}
}
function die() {
healthMeter.bar._xscale = 0;
dead = true;
gotoAndPlay (11);
}
moveSpeed = _root.firemenSpeed;
leftLimit = 50;
rightLimit = 350;
totalHealth = _root.firemenHealth;
health = totalHealth;
dead = false;
if (_root.largeTrampoline) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (((!dead) and (!_root.paused)) and _root.levelStarted) {
if (Key.isDown(37)) {
_root.firemenMovementCounter++;
_x = (_x - moveSpeed);
} else if (Key.isDown(39)) {
_root.firemenMovementCounter++;
_x = (_x + moveSpeed);
}
if (_x < leftLimit) {
_x = leftLimit;
}
if (rightLimit < _x) {
_x = rightLimit;
}
}
}
onClipEvent (keyDown) {
if (!_root.levelStarted) {
return(false);
}
if (Key.isDown(37) || (Key.isDown(39))) {
fireman1.play();
fireman2.play();
}
}
onClipEvent (keyUp) {
if (!_root.levelStarted) {
return(false);
}
if ((!Key.isDown(37)) && (!Key.isDown(39))) {
fireman1.gotoAndStop(1);
fireman2.gotoAndStop(1);
}
}
onClipEvent (unload) {
_root.heroesInRedUnscathed = health == totalHealth;
_root.minusATrampoline = 0 >= health;
}
Instance of Symbol 291 MovieClip "bomb" in Frame 9
onClipEvent (load) {
function detonate() {
_root.playSound("explosion", 100, (_x - 200) / 2);
detonated = true;
this.gotoAndPlay(2);
}
swingingRight = true;
maxSwingAmplitude = 5;
swingAmplitude = maxSwingAmplitude;
_rotation = 25;
detonated = false;
if (_name == "bomb") {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (((_name != "bomb") and (!detonated)) and (!_root.paused)) {
if (swingingRight) {
_rotation = (_rotation - swingAmplitude);
} else {
_rotation = (_rotation + swingAmplitude);
}
swingAmplitude = swingAmplitude - 0.25;
if (swingAmplitude < 0.25) {
swingAmplitude = maxSwingAmplitude;
swingingRight = (swingingRight ? false : true);
}
_y = (_y + _root.gravity);
if ((550 < _y) and (!detonated)) {
_root.bombsMissed++;
_root.levelBombsMissed++;
detonate();
}
}
}
Instance of Symbol 399 MovieClip "controller" in Frame 9
onClipEvent (load) {
function generateBomb() {
_root.advanceDepth();
_root.bomb.duplicateMovieClip("bomb" + _root.currDepth, _root.currDepth);
newBomb = _root["bomb" + _root.currDepth];
_root.OA_addObject(_root.bombArray, newBomb);
newBomb._x = (Math.random() * 350) + 25;
newBomb._y = -50;
}
function generateBaby() {
_root.advanceDepth();
_root.baby.duplicateMovieClip("baby" + _root.currDepth, _root.currDepth);
newBaby = _root["baby" + _root.currDepth];
_root.OA_addObject(_root.babyArray, newBaby);
newBaby._x = (Math.random() * 350) + 25;
newBaby._y = -50;
}
function togglePause() {
if (!_root.levelStarted) {
return(false);
}
_root.hasPausedThisLevel = true;
_root.paused = (_root.paused ? false : true);
if (_root.paused) {
_root.pauseMenu.gotoAndPlay("pauseGame");
} else {
_root.pauseMenu.gotoAndPlay("unpauseGame");
}
}
_visible = false;
_root.hasPausedThisLevel = false;
pKeyReleased = false;
}
onClipEvent (enterFrame) {
if (_root.paused or (!_root.levelStarted)) {
return(false);
}
if (Math.random() < _root.dropProb) {
if (Math.random() < 0.5) {
generateBomb();
} else {
generateBaby();
}
_root.dropProb = _root.levelDropProb;
} else {
_root.dropProb = _root.dropProb + _root.levelDropProbIncreaseRate;
}
}
onClipEvent (keyUp) {
if ((String.fromCharCode(Key.getAscii()) == "p") || (String.fromCharCode(Key.getAscii()) == "P")) {
togglePause();
}
}
Instance of Symbol 300 MovieClip "baby" in Frame 9
onClipEvent (load) {
function loseChute() {
chute._visible = false;
lostChute = true;
}
if (_name == "baby") {
_visible = false;
}
swingingRight = true;
maxSwingAmplitude = 2;
swingAmplitude = maxSwingAmplitude;
_rotation = 5;
lostChute = false;
race = Math.floor(Math.random() * 3) + 1;
baby.gotoAndStop(race);
yMove = _root.gravity;
}
onClipEvent (enterFrame) {
if ((_name != "baby") and (!_root.paused)) {
if (!lostChute) {
if (swingingRight) {
_rotation = (_rotation - swingAmplitude);
} else {
_rotation = (_rotation + swingAmplitude);
}
swingAmplitude = swingAmplitude - 0.25;
if (swingAmplitude < 0.25) {
swingAmplitude = maxSwingAmplitude;
swingingRight = (swingingRight ? false : true);
}
}
if (lostChute) {
if ((yMove + _root.gravity) < 50) {
yMove = yMove + _root.gravity;
}
baby._rotation = baby._rotation + 2;
}
_y = (_y + yMove);
if (hitArea.hitTest(_root.firemen.trampoline.hitArea)) {
_root.babiesCaught++;
_root.levelBabiesCaught++;
_root.addToScore(300);
_root.playSound("laughingBaby", 100, (_x - 200) / 2);
_root.OA_removeObject(_root.babyArray, this);
} else if (550 < _y) {
_root.babyDropMeter.prevFrame();
_root.babiesMissed++;
_root.levelBabyDrops++;
_root.playSound("cryingBaby", 100, (_x - 200) / 2);
if (_root.levelBabyDrops >= _root.maxBabyDrops) {
_root.endLevel(true);
}
_root.OA_removeObject(_root.babyArray, this);
}
}
}
Instance of Symbol 402 MovieClip "scoreBox" in Frame 9
onClipEvent (load) {
this.swapDepths(_root.scoreBoxDepth);
INCREASE_PER_FRAME = Math.round(17 * Math.sqrt(_root.currentLevel + 1));
displayScore = _root.score;
display = "Score: " + displayScore;
}
onClipEvent (enterFrame) {
if (displayScore != _root.score) {
if ((displayScore + INCREASE_PER_FRAME) < _root.score) {
displayScore = displayScore + INCREASE_PER_FRAME;
} else {
displayScore = _root.score;
}
display = "Score: " + displayScore;
}
}
Instance of Symbol 412 MovieClip "babyDropMeter" in Frame 9
onClipEvent (load) {
this.swapDepths(_root.babyDropMeterDepth);
this.gotoAndStop(_root.maxBabyDrops);
}
Instance of Symbol 432 MovieClip in Frame 9
onClipEvent (load) {
message = "Level " + _root.currentLevel;
}
Instance of Symbol 435 MovieClip "gameTimer" in Frame 9
onClipEvent (load) {
this.swapDepths(_root.gameTimerDepth);
_visible = _root.showTimer;
}
onClipEvent (enterFrame) {
if (_root.levelStarted and (!_root.paused)) {
_root.timeRemaining--;
this._xscale = (_root.timeRemaining / _root.timeRemainingStart) * 100;
if (0 >= _root.timeRemaining) {
_root.endLevel(false);
}
}
}
Instance of Symbol 543 MovieClip "pauseMenu" in Frame 9
onClipEvent (load) {
function resetSoundFXButtons() {
i = 1;
while (5 >= i) {
this["soundFXVolume" + i].gotoAndStop(1);
i++;
}
}
function resetMusicButtons() {
i = 1;
while (5 >= i) {
this["musicVolume" + i].gotoAndStop(1);
i++;
}
}
function resetQualityButtons() {
i = 1;
while (5 >= i) {
this["quality" + i].gotoAndStop(1);
i++;
}
}
this.swapDepths(_root.pauseMenuDepth);
}
Instance of Symbol 633 MovieClip "cursors" in Frame 9
onClipEvent (load) {
this.swapDepths(_root.cursorsDepth);
startDrag (this, true);
}
Frame 10
endLevel(true);
Frame 11
_root.playSound("gameOverExplosion", 100, 0);
Frame 12
tellTarget ("_level0") {
gotoAndStop (4);
};
Frame 13
_root.playSound("levelComplete", 100, 0);
Instance of Symbol 725 MovieClip in Frame 13
onClipEvent (load) {
levelScore = _root.levelScore;
score = _root.oldScore;
spendablePoints = _root.spendablePoints;
bonus = 0;
awards = "";
if (_root.levelBabyDrops == (_root.maxBabyDrops - 1)) {
awards = awards + "Hanging By A Thread: 2500 pts.\n";
bonus = bonus + 2500;
}
if (_root.levelBabyDrops == 0) {
awards = awards + (("Maternal Instinct: " + (500 * _root.currentLevel)) + " pts.\n");
bonus = bonus + (500 * _root.currentLevel);
}
if (_root.levelBombsMissed == 0) {
awards = awards + "Bomb Squad: 500 pts.\n";
bonus = bonus + 500;
}
if (0.05 < (_root.levelCannonballsFired / _root.timeRemainingStart)) {
awards = awards + "Trigger-Happy: 1000 pts.\n";
bonus = bonus + 1000;
}
if (_root.levelCannonballsFired == 0) {
awards = awards + "Gandhi: 15000 pts.\n";
bonus = bonus + 15000;
}
if (_root.mechanicsDream) {
awards = awards + (("A Mechanic's Dream: " + (500 * _root.currentLevel)) + " pts.\n");
bonus = bonus + (500 * _root.currentLevel);
}
if (_root.heroesInRedUnscathed) {
awards = awards + (("Heroes Unscathed: " + (500 * _root.currentLevel)) + " pts.\n");
bonus = bonus + (500 * _root.currentLevel);
}
if (_root.levelScore < (1000 * _root.currentLevel)) {
awards = awards + (("Pity Points: " + (1000 * _root.currentLevel)) + " pts.\n");
bonus = bonus + (1000 * _root.currentLevel);
}
if (!_root.hasPausedThisLevel) {
awards = awards + "No Need For Breaks: 500 pts.\n";
bonus = bonus + 500;
}
if (_root.cannonless) {
awards = awards + "Cannonless: 2500 pts.\n";
bonus = bonus + 2500;
}
if (_root.minusATrampoline) {
awards = awards + "Minus A Trampoline: 5000 pts.\n";
bonus = bonus + 5000;
}
if (((_root.currentLevel * 2) < _root.levelCannonballsFired) and (_root.levelCannonballsLanded >= _root.levelCannonballsFired)) {
awards = awards + "Perfect Aim: 2000 pts.\n";
bonus = bonus + 2000;
} else if (((_root.currentLevel * 2) < _root.levelCannonballsFired) and (_root.levelCannonballsLanded >= (_root.levelCannonballsFired * 0.85))) {
awards = awards + "Marksmanship: 1000 pts.\n";
bonus = bonus + 1000;
}
if (_root.smoothDescent) {
awards = awards + "Smooth Descent: 500 pts.\n";
bonus = bonus + 500;
}
if (0.02 < (_root.cannonballReflectionCount / _root.timeRemainingStart)) {
awards = awards + "Reflective: 1500 pts.\n";
bonus = bonus + 1500;
} else if (0.01 < (_root.cannonballReflectionCount / _root.timeRemainingStart)) {
awards = awards + "Bounceback: 750 pts.\n";
bonus = bonus + 750;
}
if (0.8 < (_root.firemenMovementCounter / _root.timeRemainingStart)) {
awards = awards + "Nomadic: 2000 pts.\n";
bonus = bonus + 2000;
} else if (0.6 < (_root.firemenMovementCounter / _root.timeRemainingStart)) {
awards = awards + "On The Move: 1000 pts.\n";
bonus = bonus + 1000;
}
if (450 < (_root.detonationHeightTotal / _root.detonationCount)) {
awards = awards + "High In The Sky: 1500 pts.\n";
bonus = bonus + 1500;
}
if (0.01333 < (_root.fireWhileCooldownCount / _root.timeRemainingStart)) {
awards = awards + "Impatient: 500 pts.\n";
bonus = bonus + 500;
}
if ((_root.cannonPowerCount / _root.levelCannonballsFired) >= 0.8) {
awards = awards + "Gunpowder Zeal: 500 pts.\n";
bonus = bonus + 500;
}
if (0.4 >= (_root.cannonPowerCount / _root.levelCannonballsFired)) {
awards = awards + "Ligyrophobic: 500 pts.\n";
bonus = bonus + 500;
}
if ((_root.levelScore % 13) == 0) {
awards = awards + "Lucky 13: 1313 pts.\n";
bonus = bonus + 1313;
}
if ((500000 < _root.score) and ((_root.score - _root.levelScore) < 500000)) {
awards = awards + "Big Player: 15000 pts.\n";
bonus = bonus + 15000;
}
if ((1000000 < _root.score) and ((_root.score - _root.levelScore) < 1000000)) {
awards = awards + "Millionaire: 30000 pts.\n";
bonus = bonus + 30000;
}
awards = awards + (("\nTotal Bonus Points: " + bonus) + " pts.");
_root.score = _root.score + bonus;
_root.oldScore = _root.score;
_root.spendablePoints = _root.spendablePoints + (_root.levelScore + bonus);
}
Frame 14
_root.gameOver();
Frame 15
changeMusic(8);
Instance of Symbol 921 MovieClip in Frame 15
onClipEvent (load) {
function deductPoints(cost) {
_root.spendablePoints = _root.spendablePoints - cost;
}
INCREASE_PER_FRAME = Math.floor(263 * Math.pow(1.1, _root.currentLevel));
spendablePoints = _root.spendablePoints;
}
onClipEvent (enterFrame) {
if (spendablePoints < (_root.spendablePoints + INCREASE_PER_FRAME)) {
spendablePoints = _root.spendablePoints;
} else {
spendablePoints = spendablePoints - INCREASE_PER_FRAME;
}
}
Frame 16
_root.gameOver();
Instance of Symbol 12 MovieClip "fins" in Symbol 13 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 17 Button
on (release) {
getURL ("http://www.brettbits.com/", "_blank");
}
Symbol 50 Button
on (release) {
_root.play();
}
Symbol 64 Button
on (release) {
getURL ("http://www.addictinggames.com", _blank);
}
Symbol 65 MovieClip Frame 90
_root.play();
Symbol 66 MovieClip Frame 1
_parent.stop();
Symbol 66 MovieClip Frame 91
stop();
Symbol 70 MovieClip Frame 3
stop();
Symbol 73 Button
on (release) {
stopAllSounds();
nextFrame();
}
Symbol 75 Button
on (release) {
_root.music.gotoAndPlay(2);
prevFrame();
}
Symbol 76 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 1
this.gotoAndPlay(Math.floor(Math.random() * 14) + 2);
Symbol 91 MovieClip Frame 17
gotoAndPlay (2);
Symbol 94 Button
on (release) {
function afterLightning() {
stopAllSounds();
_root.newGame();
tellTarget ("_level0") {
gotoAndStop ("game");
};
}
_root.lightning._y = _root._ymouse;
_root.descBox.gotoAndStop("blank");
_root.lightning.gotoAndPlay(2);
}
on (rollOver) {
_root.descBox.gotoAndStop("play");
}
on (rollOut, releaseOutside) {
_root.descBox.gotoAndStop("blank");
}
Symbol 99 Button
on (release) {
function afterLightning() {
gotoAndStop (6);
}
_root.lightning._y = _root._ymouse;
_root.descBox.gotoAndStop("blank");
_root.lightning.gotoAndPlay(2);
}
on (rollOver) {
_root.descBox.gotoAndStop("instructions");
}
on (rollOut, releaseOutside) {
_root.descBox.gotoAndStop("blank");
}
Symbol 104 Button
on (release) {
function afterLightning() {
gotoAndStop (7);
}
_root.lightning._y = _root._ymouse;
_root.descBox.gotoAndStop("blank");
_root.lightning.gotoAndPlay(2);
}
on (rollOver) {
_root.descBox.gotoAndStop("credits");
}
on (rollOut, releaseOutside) {
_root.descBox.gotoAndStop("blank");
}
Symbol 109 Button
on (release) {
function afterLightning() {
getURL ("http://www.brettbits.com/", "_blank");
}
_root.lightning._y = _root._ymouse;
_root.descBox.gotoAndStop("blank");
_root.lightning.gotoAndPlay(2);
}
on (rollOver) {
_root.descBox.gotoAndStop("website");
}
on (rollOut, releaseOutside) {
_root.descBox.gotoAndStop("blank");
}
Symbol 113 Button
on (release) {
function afterLightning() {
getURL ("mailto:Brett McLean<brettbits@hotmail.com>?subject=Mayhem In The Skies!");
}
_root.lightning._y = _root._ymouse;
_root.descBox.gotoAndStop("blank");
_root.lightning.gotoAndPlay(2);
}
on (rollOver) {
_root.descBox.gotoAndStop("email");
}
on (rollOut, releaseOutside) {
_root.descBox.gotoAndStop("blank");
}
Symbol 118 Button
on (release) {
function afterLightning() {
getURL ("http://www.addictinggames.com", "_blank");
}
_root.lightning._y = _root._ymouse;
_root.descBox.gotoAndStop("blank");
_root.lightning.gotoAndPlay(2);
}
on (rollOver) {
_root.descBox.gotoAndStop("addictinggames");
}
on (rollOut, releaseOutside) {
_root.descBox.gotoAndStop("blank");
}
Symbol 134 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 16
_root.afterLightning();
Symbol 141 Button
on (release) {
tellTarget ("_level0") {
gotoAndStop (5);
};
}
Symbol 144 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 102
gotoAndStop (1);
Symbol 171 MovieClip Frame 110
stop();
Symbol 179 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 7
stop();
Symbol 189 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 17
if (_root.powerbarStartsAt == 16) {
gotoAndPlay(_root.powerbarStartsAt);
}
Symbol 206 MovieClip Frame 23
if (_root.powerbarStartsAt == 10) {
gotoAndPlay(_root.powerbarStartsAt);
}
Symbol 206 MovieClip Frame 27
if (_root.powerbarStartsAt == 6) {
gotoAndPlay(_root.powerbarStartsAt);
}
Symbol 206 MovieClip Frame 31
gotoAndPlay (2);
Symbol 212 MovieClip Frame 1
stop();
Instance of Symbol 206 MovieClip "powerMeter" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
function getPowerPercentage() {
powerRating = _currentframe - 1;
if (15 >= powerRating) {
return(powerRating / 15);
}
powerRating = powerRating - 15;
return(1 - (powerRating / 15));
}
_parent._parent.cannonBarrel.coolingDown = false;
if (_parent._parent.cannonBarrel.fireAttemptedDuringCooldown) {
_parent._parent.cannonBarrel.prepareCannonFire();
} else {
stop();
}
}
onClipEvent (enterFrame) {
if (_root.paused and (1 < _currentframe)) {
_parent._parent.cannonBarrel.fireCannon();
}
}
Instance of Symbol 211 MovieClip "cooldownMeter" in Symbol 212 MovieClip Frame 2
onClipEvent (load) {
bar._xscale = _parent.coolDownPercent;
barrelPlayFrame = Math.round(_parent.coolDownPercent / _root.coolDownRate);
if (100 < barrelPlayFrame) {
barrelPlayFrame = 100;
}
_parent._parent.cannonBarrel.gotoAndPlay(101 - barrelPlayFrame);
}
onClipEvent (enterFrame) {
if (!_root.paused) {
bar._xscale = bar._xscale - _root.coolDownRate;
}
if (bar._xscale < _root.coolDownRate) {
_parent.gotoAndStop("powerFrame");
}
}
Instance of Symbol 215 MovieClip "bar" in Symbol 222 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 217 MovieClip in Symbol 222 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x - 5);
if (_x < _width) {
_x = _parent.bar._width;
}
_xscale = (10 + _parent.bar._xscale);
}
Instance of Symbol 217 MovieClip in Symbol 222 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x - 5);
if (_x < _width) {
_x = _parent.bar._width;
}
_xscale = (10 + _parent.bar._xscale);
}
Instance of Symbol 217 MovieClip in Symbol 222 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x - 5);
if (_x < _width) {
_x = _parent.bar._width;
}
_xscale = (10 + _parent.bar._xscale);
}
Instance of Symbol 171 MovieClip "cannonBarrel" in Symbol 223 MovieClip Frame 1
onClipEvent (load) {
function prepareCannonFire() {
if (coolingDown) {
_root.fireWhileCooldownCount++;
fireAttemptedDuringCooldown = true;
return(undefined);
}
_parent.statusMeter.powerMeter.gotoAndPlay(_root.powerbarStartsAt);
}
function fireCannon() {
fireAttemptedDuringCooldown = false;
if (coolingDown) {
return(undefined);
}
coolingDown = true;
power = _parent.statusMeter.powerMeter.getPowerPercentage();
_root.cannonPowerCount = _root.cannonPowerCount + power;
_parent.statusMeter.powerMeter.gotoAndStop(1);
_root.advanceDepth();
ratio = 75 / hyp;
_root.cannonball.duplicateMovieClip("cannonball" + _root.currDepth, _root.currDepth);
newBall = _root["cannonball" + _root.currDepth];
_root.OA_addObject(_root.cannonballArray, newBall);
newBall._x = _parent._x + (x * ratio);
newBall._y = (_parent._y + (y * ratio)) - 20;
max = _root.getMax(Math.abs(x), Math.abs(y));
newBall.xMove = (((x / max) * BALL_SPEED_MULTIPLIER) * power) * _root.firepowerMultiplier;
if (65 < newBall.xMove) {
newBall.xMove = 65;
}
if (newBall.xMove < -65) {
newBall.xMove = -65;
}
newBall.yMove = (((y / max) * BALL_SPEED_MULTIPLIER) * power) * _root.firepowerMultiplier;
_parent.statusMeter.coolDown(power * 100);
initialSmoke.gotoAndPlay(2);
_root.playSound("cannonFire", power * 100, 0);
_root.cannonballsFired++;
_root.levelCannonballsFired++;
}
function calcAngle() {
xDiff = _root._xmouse - _parent._x;
yDiff = _root._ymouse - _parent._y;
hyp = Math.sqrt(Math.pow(Math.abs(xDiff), 2) + Math.pow(Math.abs(yDiff), 2));
cos = xDiff / hyp;
thetaRad = Math.acos(cos);
thetaDeg = (180 * thetaRad) / Math.PI;
if (yDiff < 0) {
thetaDeg = -thetaDeg;
} else if ((Math.round(yDiff) == 0) and (xDiff < 0)) {
thetaDeg = 180;
}
if ((thetaDeg < (-90 + _root.aimAngleLimit)) and ((-90 - _root.aimAngleLimit) < thetaDeg)) {
angle = thetaDeg;
x = xDiff;
y = yDiff;
}
}
BALL_SPEED_MULTIPLIER = 65;
(x = 0);
(y = 0);
(hyp = 0);
(angle = -90);
coolingDown = false;
fireAttemptedDuringCooldown = false;
dead = false;
}
onClipEvent (enterFrame) {
calcAngle();
if ((!_root.paused) and _root.levelStarted) {
_rotation = angle;
}
}
Instance of Symbol 212 MovieClip "statusMeter" in Symbol 223 MovieClip Frame 1
onClipEvent (load) {
function coolDown(cooldown) {
coolDownPercent = cooldown;
this.gotoAndStop("cooldownFrame");
}
coolDownPercent = 0;
}
Instance of Symbol 222 MovieClip "healthMeter" in Symbol 223 MovieClip Frame 1
onClipEvent (load) {
function setValue(percent) {
bar._xscale = percent;
bar.gotoAndStop(100 - Math.round(bar._xscale));
}
}
Symbol 225 MovieClip Frame 1
_visible = false;
Symbol 231 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 4
if (450 < _y) {
_root.cannon.takeDamage(_root.bombDamage);
}
if (this.hitTest(_root.firemen)) {
_root.firemen.takeDamage(_root.bombDamage);
}
Symbol 291 MovieClip Frame 22
stop();
_root.OA_removeObject(_root.bombArray, this);
Instance of Symbol 239 MovieClip "fireman1" in Symbol 313 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 239 MovieClip "fireman2" in Symbol 313 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 222 MovieClip "healthMeter" in Symbol 313 MovieClip Frame 1
onClipEvent (load) {
function setValue(percent) {
bar._xscale = percent;
bar.gotoAndStop(100 - Math.round(bar._xscale));
}
}
Instance of Symbol 239 MovieClip "fireman1" in Symbol 313 MovieClip Frame 155
onClipEvent (load) {
stop();
}
Instance of Symbol 239 MovieClip "fireman2" in Symbol 313 MovieClip Frame 155
onClipEvent (load) {
stop();
}
Instance of Symbol 222 MovieClip "healthMeter" in Symbol 313 MovieClip Frame 155
onClipEvent (load) {
function setValue(percent) {
bar._xscale = percent;
bar.gotoAndStop(100 - Math.round(bar._xscale));
}
}
Instance of Symbol 260 MovieClip in Symbol 313 MovieClip Frame 586
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 211 MovieClip in Symbol 313 MovieClip Frame 746
onClipEvent (enterFrame) {
if (0 < bar._xscale) {
bar._xscale = bar._xscale - 1;
} else {
_visible = false;
}
}
Instance of Symbol 300 MovieClip in Symbol 313 MovieClip Frame 920
onClipEvent (load) {
baby.gotoAndStop(1);
}
Symbol 313 MovieClip Frame 1796
stop();
Symbol 325 Button
on (release) {
getURL ("http://www.brettbits.com/", "_blank");
}
Symbol 326 Button
on (release) {
getURL ("http://sweetwretch.deviantart.com/", "_blank");
}
Symbol 327 Button
on (release) {
getURL ("http://pyscospaz.deviantart.com/", "_blank");
}
Symbol 343 MovieClip Frame 1
stop();
Symbol 343 MovieClip Frame 2
gotoAndStop (1);
Symbol 343 MovieClip Frame 3
gotoAndStop (1);
Symbol 343 MovieClip Frame 4
gotoAndStop (1);
Symbol 343 MovieClip Frame 5
gotoAndStop (1);
Symbol 343 MovieClip Frame 6
gotoAndStop (1);
Symbol 343 MovieClip Frame 7
gotoAndStop (1);
Symbol 343 MovieClip Frame 8
gotoAndStop (1);
Symbol 343 MovieClip Frame 9
gotoAndStop (1);
Symbol 343 MovieClip Frame 10
gotoAndStop (1);
Symbol 343 MovieClip Frame 11
gotoAndStop (1);
Symbol 343 MovieClip Frame 12
gotoAndStop (1);
Symbol 343 MovieClip Frame 13
gotoAndStop (1);
Symbol 343 MovieClip Frame 14
gotoAndStop (1);
Symbol 343 MovieClip Frame 15
gotoAndStop (1);
Symbol 351 MovieClip Frame 1
stop();
Instance of Symbol 370 MovieClip in Symbol 373 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (30 + ((_root.timeRemaining / _root.timeRemainingStart) * 40));
}
Symbol 383 MovieClip Frame 1
function moveRing(ring) {
multiplier = 1.1 + ((1 - (_root.timeRemaining / _root.timeRemainingStart)) * 0.2);
ring._xscale = ring._xscale * multiplier;
ring._yscale = ring._yscale * multiplier;
if (4000 < ring._xscale) {
gotoAndPlay (2);
}
}
stop();
Instance of Symbol 376 MovieClip in Symbol 383 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.moveRing(this);
}
Instance of Symbol 378 MovieClip in Symbol 383 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.moveRing(this);
}
Instance of Symbol 380 MovieClip in Symbol 383 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.moveRing(this);
}
Instance of Symbol 382 MovieClip in Symbol 383 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.moveRing(this);
}
Instance of Symbol 376 MovieClip in Symbol 383 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.moveRing(this);
}
Instance of Symbol 376 MovieClip in Symbol 383 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.moveRing(this);
}
Symbol 383 MovieClip Frame 2
count = (_root.timeRemaining / _root.timeRemainingStart) * 125;
gotoAndPlay (4);
Symbol 383 MovieClip Frame 4
count--;
if (0 < count) {
gotoAndPlay (3);
}
Instance of Symbol 383 MovieClip in Symbol 384 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (15 + ((1 - (_root.timeRemaining / _root.timeRemainingStart)) * 45));
}
Symbol 395 MovieClip Frame 1
stop();
Symbol 395 MovieClip Frame 2
_root.playSound("cannonballSpecialAttack", ((_root.cannonballPowerLevel - 1) / 3) * 100, (_x - 200) / 2);
Symbol 395 MovieClip Frame 6
i = 0;
while (i < _root.bombArray.length) {
if (this.hitTest(_root.bombArray[i].bomb) and (!root.bombArray[i].detonated)) {
_root.bombArray[i].detonate();
_root.detonationHeightTotal = _root.detonationHeightTotal + (600 - _root.bombArray[i]._y);
_root.detonationCount++;
_root.bombsDestroyed++;
_root.levelBombsDestroyed++;
_root.addToScore(560 - _root.bombArray[i]._y);
_root.scoreMultiplier = _root.scoreMultiplier + _root.SCORE_MULTIPLIER_INCREASE;
}
i++;
}
Symbol 395 MovieClip Frame 11
gotoAndPlay (1);
Symbol 395 MovieClip Frame 15
call(2);
Symbol 395 MovieClip Frame 21
call(6);
Symbol 395 MovieClip Frame 26
gotoAndPlay (1);
Symbol 395 MovieClip Frame 30
call(2);
Symbol 395 MovieClip Frame 41
call(6);
Symbol 395 MovieClip Frame 47
gotoAndStop (1);
Instance of Symbol 239 MovieClip "fireman1" in Symbol 396 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 239 MovieClip "fireman2" in Symbol 396 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Instance of Symbol 222 MovieClip "healthMeter" in Symbol 396 MovieClip Frame 1
onClipEvent (load) {
function setValue(percent) {
bar._xscale = percent;
bar.gotoAndStop(100 - Math.round(bar._xscale));
}
}
Symbol 396 MovieClip Frame 17
stop();
Instance of Symbol 420 MovieClip in Symbol 432 MovieClip Frame 1
onClipEvent (enterFrame) {
currnumber = 2.5 - (_parent._currentframe / 25);
currnumber = currnumber * 100;
currnumber = Math.round(currnumber);
currnumber = currnumber / 100;
_x = (_x - 5);
}
Instance of Symbol 425 MovieClip in Symbol 432 MovieClip Frame 1
onClipEvent (load) {
if (3 < _root.currentLevel) {
_visible = false;
}
}
Symbol 432 MovieClip Frame 2
_root.playSound("getReady", 100, 0);
Symbol 432 MovieClip Frame 45
_root.playSound("go", 100, 0);
Symbol 432 MovieClip Frame 61
_root.levelStarted = true;
_root.beginLevel();
stop();
Symbol 433 Button
on (press) {
if (((!_root.paused) and (!_root.cannon.cannonBarrel.dead)) and _root.levelStarted) {
_root.cannon.cannonBarrel.prepareCannonFire();
}
}
on (release) {
if (((!_root.paused) and (!_root.cannon.cannonBarrel.dead)) and _root.levelStarted) {
_root.cannon.cannonBarrel.fireCannon();
}
}
Symbol 457 Button
on (release) {
clicked();
gotoAndStop (2);
}
Symbol 484 Button
on (release) {
_root.controller.togglePause();
}
Symbol 491 Button
on (release) {
current = _root.cursors._currentframe;
current--;
if (current == 0) {
current = _root.numCursors;
}
Mouse.hide();
_root.cursors.gotoAndStop(current);
}
Symbol 492 Button
on (release) {
current = _root.cursors._currentframe;
current++;
if (current == (_root.numCursors + 1)) {
current = 1;
}
Mouse.hide();
_root.cursors.gotoAndStop(current);
}
Symbol 493 Button
on (release) {
current = _root.background._currentframe;
current--;
if (current == 0) {
current = _root.numBackgrounds;
}
_root.background.gotoAndStop(current);
_root.scoreBox.gotoAndStop(current);
}
Symbol 494 Button
on (release) {
current = _root.background._currentframe;
current++;
if (current == (_root.numBackgrounds + 1)) {
current = 1;
}
_root.background.gotoAndStop(current);
_root.scoreBox.gotoAndStop(current);
}
Symbol 525 Button
on (release) {
current = _root.music._currentframe;
current--;
if (current == 1) {
current = _root.numMusic + 1;
}
_root.changeMusic(current);
currentlyPlaying.updateDisplay();
}
Symbol 526 Button
on (release) {
current = _root.music._currentframe;
current++;
if (current == (_root.numMusic + 2)) {
current = 2;
}
_root.changeMusic(current);
currentlyPlaying.updateDisplay();
}
Symbol 543 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 12
stop();
Instance of Symbol 459 MovieClip "musicVolume1" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetMusicButtons();
_root.masterMusicVolume = value;
_root.setMusicVolume();
}
value = 0;
if (_root.masterMusicVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "musicVolume2" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetMusicButtons();
_root.masterMusicVolume = value;
_root.setMusicVolume();
}
value = 25;
if (_root.masterMusicVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "musicVolume3" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetMusicButtons();
_root.masterMusicVolume = value;
_root.setMusicVolume();
}
value = 50;
if (_root.masterMusicVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "musicVolume4" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetMusicButtons();
_root.masterMusicVolume = value;
_root.setMusicVolume();
}
value = 75;
if (_root.masterMusicVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "musicVolume5" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetMusicButtons();
_root.masterMusicVolume = value;
_root.setMusicVolume();
}
value = 100;
if (_root.masterMusicVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "soundFXVolume1" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetSoundFXButtons();
_root.masterSoundFXVolume = value;
_root.playSound("cannonFire", 100, 0);
}
value = 0;
if (_root.masterSoundFXVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "soundFXVolume2" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetSoundFXButtons();
_root.masterSoundFXVolume = value;
_root.playSound("cannonFire", 100, 0);
}
value = 0.25;
if (_root.masterSoundFXVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "soundFXVolume3" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetSoundFXButtons();
_root.masterSoundFXVolume = value;
_root.playSound("cannonFire", 100, 0);
}
value = 0.5;
if (_root.masterSoundFXVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "soundFXVolume4" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetSoundFXButtons();
_root.masterSoundFXVolume = value;
_root.playSound("cannonFire", 100, 0);
}
value = 0.75;
if (_root.masterSoundFXVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "soundFXVolume5" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetSoundFXButtons();
_root.masterSoundFXVolume = value;
_root.playSound("cannonFire", 100, 0);
}
value = 1;
if (_root.masterSoundFXVolume == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "quality1" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetQualityButtons();
_root._quality = value;
}
value = "LOW";
if (_root._quality == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "quality2" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetQualityButtons();
_root._quality = value;
}
value = "MEDIUM";
if (_root._quality == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 459 MovieClip "quality3" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function clicked() {
_parent.resetQualityButtons();
_root._quality = value;
}
value = "HIGH";
if (_root._quality == value) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 542 MovieClip "currentlyPlaying" in Symbol 543 MovieClip Frame 12
onClipEvent (load) {
function updateDisplay() {
gotoAndStop(_root.music._currentframe);
}
updateDisplay();
}
Symbol 602 MovieClip Frame 1
_rotation = (Math.random() * 360);
Symbol 633 MovieClip Frame 1
Mouse.show();
stop();
Instance of Symbol 548 MovieClip in Symbol 633 MovieClip Frame 2
onClipEvent (load) {
}
Instance of Symbol 558 MovieClip in Symbol 633 MovieClip Frame 3
onClipEvent (enterFrame) {
_alpha = (30 + (Math.random() * 40));
}
Instance of Symbol 564 MovieClip in Symbol 633 MovieClip Frame 4
onClipEvent (enterFrame) {
_rotation = (_rotation + 5);
}
Symbol 634 Button
on (release) {
_root.playAgain();
}
Symbol 639 MovieClip Frame 49
stop();
Symbol 664 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 672 MovieClip Frame 1
stop();
Symbol 676 Button
on (release) {
_root.swHighScoreObject.showTab = "submit";
docount = true;
loadMovieNum (_root.HSHubURL, 2);
_parent._parent._visible = false;
}
Symbol 679 Button
on (release) {
_root.swHighScoreObject.showTab = "view";
docount = true;
loadMovieNum (_root.HSHubURL, 2);
_parent._parent._visible = false;
}
Symbol 683 MovieClip Frame 1
stop();
Instance of Symbol 682 MovieClip "buttonInstances" in Symbol 683 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(100033);
docount = false;
trycount = 0;
}
onClipEvent (enterFrame) {
if (docount) {
trycount++;
if ((_level2.getBytesTotal() == -1) && (60 < trycount)) {
docount = false;
trycount = 0;
}
}
}
Instance of Symbol 652 MovieClip in Symbol 684 MovieClip Frame 1
onClipEvent (load) {
numFrames = 11;
gotoAndStop(Math.floor(Math.random() * numFrames) + 1);
}
Instance of Symbol 683 MovieClip in Symbol 684 MovieClip Frame 1
onClipEvent (load) {
_level0.swHighScoreObject.player1Score = _root.score;
}
Symbol 687 Button
on (release) {
tellTarget ("_level0") {
gotoAndStop ("powerups");
};
}
Symbol 705 MovieClip Frame 41
if (_parent._parent.levelScore != 0) {
if (_parent._parent.levelScore >= INCREASE_PER_FRAME) {
amount = INCREASE_PER_FRAME;
} else {
amount = _parent._parent.levelScore;
}
_parent._parent.levelScore = _parent._parent.levelScore - amount;
_parent._parent.score = _parent._parent.score + amount;
_parent._parent.spendablePoints = _parent._parent.spendablePoints + amount;
gotoAndPlay(_currentframe - 1);
}
Symbol 705 MovieClip Frame 42
stopAllSounds();
Symbol 705 MovieClip Frame 49
if (_parent._parent.bonus == 0) {
gotoAndPlay(_currentframe + 2);
}
Symbol 705 MovieClip Frame 52
if (_parent._parent.bonus != 0) {
if (_parent._parent.bonus >= INCREASE_PER_FRAME) {
amount = INCREASE_PER_FRAME;
} else {
amount = _parent._parent.bonus;
}
_parent._parent.bonus = _parent._parent.bonus - amount;
_parent._parent.score = _parent._parent.score + amount;
_parent._parent.spendablePoints = _parent._parent.spendablePoints + amount;
gotoAndPlay(_currentframe - 1);
}
Symbol 705 MovieClip Frame 53
stopAllSounds();
Symbol 705 MovieClip Frame 55
_parent._parent.bonusList.gotoAndStop(2);
stop();
Instance of Symbol 705 MovieClip in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
INCREASE_PER_FRAME = Math.round(263 * Math.sqrt(_root.currentLevel + 1));
}
Symbol 708 Button
on (release) {
gotoAndStop (2);
}
Symbol 712 Button
on (release) {
gotoAndStop (1);
}
Symbol 717 Button
on (press) {
isPressed = true;
}
on (release, releaseOutside) {
isPressed = false;
}
Symbol 720 MovieClip Frame 1
stop();
Instance of Symbol 718 MovieClip in Symbol 720 MovieClip Frame 2
onClipEvent (load) {
isPressed = false;
}
onClipEvent (enterFrame) {
if (isPressed) {
_parent._parent.awards.scroll = _parent._parent.awards.scroll - 1;
}
}
Instance of Symbol 718 MovieClip in Symbol 720 MovieClip Frame 2
onClipEvent (load) {
isPressed = false;
}
onClipEvent (enterFrame) {
if (isPressed) {
_parent._parent.awards.scroll = _parent._parent.awards.scroll + 1;
}
}
Symbol 724 MovieClip Frame 35
stop();
Instance of Symbol 686 MovieClip in Symbol 725 MovieClip Frame 1
onClipEvent (load) {
display = ("Level " + _root.currentLevel) + " Complete";
}
Symbol 734 Button
on (release) {
_root.increaseLevel();
stopAllSounds();
tellTarget ("_level0") {
gotoAndStop ("game");
};
}
Symbol 738 MovieClip Frame 1
this.gotoAndPlay(Math.floor(Math.random() * 29) + 2);
Symbol 738 MovieClip Frame 31
gotoAndPlay (2);
Symbol 747 Button
on (release) {
if (isDisabled()) {
return(false);
}
if (hasEnoughPoints()) {
_root.playSound("powerup", 100, 0);
makePurchase();
} else {
_root.playSound("notEnoughPoints", 100, 0);
_parent.desc = "You do not have enough points to purchase this item.";
}
display();
}
on (rollOver) {
if (isDisabled()) {
_parent.desc = "This attribute has been maxed out.";
} else {
_parent.desc = getDescription();
}
}
on (rollOut, releaseOutside) {
_parent.desc = _parent.defaultDesc;
}
Symbol 778 Button
on (release) {
_root.playSound("tabClick", 100, 0);
gotoAndStop (2);
}
Symbol 779 Button
on (release) {
_root.playSound("tabClick", 100, 0);
gotoAndStop (1);
}
Symbol 780 Button
on (release) {
_root.playSound("tabClick", 100, 0);
gotoAndStop (3);
}
Symbol 803 Button
on (release) {
if (isDisabled()) {
return(false);
}
if (hasEnoughPoints()) {
_root.playSound("powerup", 100, 0);
makePurchase();
} else {
_root.playSound("notEnoughPoints", 100, 0);
_parent.desc = "You do not have enough points to purchase this item.";
}
display();
}
on (rollOver) {
if (isDisabled()) {
_parent.desc = "This item has already been purchased.";
} else {
_parent.desc = getDescription();
}
}
on (rollOut, releaseOutside) {
_parent.desc = _parent.defaultDesc;
}
Symbol 834 Button
on (release) {
if (isDisabled()) {
_parent.tipBook._visible = true;
return(false);
}
if (hasEnoughPoints()) {
_root.playSound("powerup", 100, 0);
makePurchase();
} else {
_root.playSound("notEnoughPoints", 100, 0);
_parent.desc = "You do not have enough points to purchase this item.";
}
display();
}
on (rollOver) {
if (isDisabled()) {
_parent.desc = "Click here to read Tip Book.";
} else {
_parent.desc = getDescription();
}
}
on (rollOut, releaseOutside) {
_parent.desc = _parent.defaultDesc;
}
Symbol 844 Button
on (release) {
if (isDisabled()) {
_parent.awardHandbook._visible = true;
return(false);
}
if (hasEnoughPoints()) {
_root.playSound("powerup", 100, 0);
makePurchase();
} else {
_root.playSound("notEnoughPoints", 100, 0);
_parent.desc = "You do not have enough points to purchase this item.";
}
display();
}
on (rollOver) {
if (isDisabled()) {
_parent.desc = "Click here to read Awards Handbook.";
} else {
_parent.desc = getDescription();
}
}
on (rollOut, releaseOutside) {
_parent.desc = _parent.defaultDesc;
}
Symbol 855 Button
on (release) {
_visible = false;
}
Symbol 856 Button
on (release) {
nextFrame();
}
Symbol 860 Button
on (release) {
prevFrame();
}
Symbol 879 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Hanging By A Thread\nThe player was only one more dropped baby away from Game Over.\nPoints: 2500";
rollover(value);
}
Symbol 880 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Bomb Squad\nDestroyed all bombs in previous level.\nPoints: 500";
rollover(value);
}
Symbol 881 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Maternal Instinct\nAll babies in the previous level were caught in the trampoline.\nPoints: 500 * (# of levels completed)";
rollover(value);
}
Symbol 882 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Pity Points\nLess than [1000 * (# of levels completed)] points were earned during the level.\nPoints: 1000 * (# of levels completed)";
rollover(value);
}
Symbol 883 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "No Need For Breaks\nGame was not paused during previous level.\nPoints: 500";
rollover(value);
}
Symbol 884 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Heroes Unscathed\nFiremen took no damage.\nPoints: 500 * (# of levels completed)";
rollover(value);
}
Symbol 885 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Gandhi\nThe cannon was not fired at all.\nPoints: 15000";
rollover(value);
}
Symbol 886 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "A Mechanic's Dream\nCannon took no damage.\nPoints: 500 * (# of levels completed)";
rollover(value);
}
Symbol 887 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Triggerhappy\nApproximately more than 1 cannonball was fired per second.\nPoints: 1000";
rollover(value);
}
Symbol 888 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Minus A Trampoline\nFinished level with trampoline destroyed.\nPoints: 5000";
rollover(value);
}
Symbol 889 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Perfect Aim\nAll cannonballs fired hit a target in the air.\nPoints: 2000";
rollover(value);
}
Symbol 890 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Cannonless\nFinished level with cannon completely destroyed.\nPoints: 2500";
rollover(value);
}
Symbol 891 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Smooth Descent\nNo babies were hit by cannonballs during previous level.\nPoints: 500";
rollover(value);
}
Symbol 892 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Reflective\nApproximately more than 2 cannonballs were bounced against the trampoline every 5 seconds.\nPoints: 1500";
rollover(value);
}
Symbol 893 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Marksmanship\nMore than 85% of cannonballs fired hit a target in the air.\nPoints: 1000";
rollover(value);
}
Symbol 894 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Nomadic\nFiremen were being moved for more than 80% of the level.\nPoints: 2000";
rollover(value);
}
Symbol 895 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "On The Move\nFiremen were being moved for more than 60% of the level.\nPoints: 1000";
rollover(value);
}
Symbol 896 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Bounceback\nApproximately one cannonball was bounced against the trampoline every 5 seconds.\nPoints: 750";
rollover(value);
}
Symbol 897 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Lucky 13:\nPoints earned during the level were divisible by 13.\nPoints: 1313";
rollover(value);
}
Symbol 898 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Big Player\nPlayer passed 500,000 points during level.\nPoints: 15000";
rollover(value);
}
Symbol 899 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Ligyrophobic\nThe average cannonball was shot at below 40% power.\nPoints: 500";
rollover(value);
}
Symbol 900 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Impatient\nSeveral attempts were made to fire the cannon while it was still cooling down.\nPoints: 500";
rollover(value);
}
Symbol 901 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Gunpowder Zeal\nThe average cannonball was shot at above 80% power.\nPoints: 500";
rollover(value);
}
Symbol 902 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "High In The Sky\nThe average target was hit while still in the top 25% of the screen.\nPoints: 1500";
rollover(value);
}
Symbol 903 Button
on (rollOut) {
rollout();
}
on (rollOver) {
value = "Millionaire\nPlayer passed 1,000,000 points during level.\nPoints: 30000";
rollover(value);
}
Instance of Symbol 751 MovieClip in Symbol 905 MovieClip Frame 1
onClipEvent (load) {
function isDisabled() {
return(_root.firemenSpeed >= maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "";
} else {
cost = Math.round(1000 * Math.pow(2, _root.firemenSpeed - 5));
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.firemenSpeed = _root.firemenSpeed + 0.5;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This attribute has been maxed out.");
}
return(("Energy Drink: Increases movement speed of firemen. Firemen's current movement speed is " + _root.firemenSpeed) + ".");
}
maxValue = 10;
display();
}
Instance of Symbol 754 MovieClip in Symbol 905 MovieClip Frame 1
onClipEvent (load) {
function isDisabled() {
return(_root.levelCoolDownRate >= maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "";
} else {
cost = 5000 + (500 * _root.currentLevel);
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.levelCoolDownRate = _root.levelCoolDownRate + 0.5;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This attribute has been maxed out.");
}
currNum = _root.levelCoolDownRate;
currNum = currNum * 100;
currNum = Math.round(currNum) / 100;
return(("Cooling Fan: Increases rate of cannon cooldown after firing a cannonball. Current rate of cooldown is " + currNum) + ".");
}
maxValue = 10;
display();
}
Instance of Symbol 758 MovieClip in Symbol 905 MovieClip Frame 1
onClipEvent (load) {
function isDisabled() {
return(_root.firepowerMultiplier >= maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "";
} else {
cost = Math.round(5000 * Math.pow(5, _root.firepowerMultiplier - 1));
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.firepowerMultiplier = _root.firepowerMultiplier + 0.05;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This attribute has been maxed out.");
}
currNum = _root.firepowerMultiplier;
currNum = currNum * 100;
return(("Nitroglycerin: Increases cannon's maximum firepower rating to help counteract the increasing force of gravity. Current firepower rating: " + currNum) + "%.");
}
maxValue = 2;
display();
}
Instance of Symbol 763 MovieClip in Symbol 905 MovieClip Frame 1
onClipEvent (load) {
function isDisabled() {
return(_root.powerbarStartsAt >= maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
gotoAndStop (3);
_alpha = 20;
costDisplay = "";
} else {
if (_root.powerbarStartsAt == 2) {
gotoAndStop (1);
cost = 20000;
} else if (_root.powerbarStartsAt == 6) {
gotoAndStop (2);
cost = 35000;
} else if (_root.powerbarStartsAt == 10) {
gotoAndStop (3);
cost = 50000;
}
costDisplay = "$" + cost;
}
}
function makePurchase() {
if (_root.powerbarStartsAt == 2) {
_root.powerbarStartsAt = 6;
} else if (_root.powerbarStartsAt == 6) {
_root.powerbarStartsAt = 10;
} else if (_root.powerbarStartsAt == 10) {
_root.powerbarStartsAt = 16;
}
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (_root.powerbarStartsAt == 2) {
currNum = "0%";
} else if (_root.powerbarStartsAt == 6) {
currNum = "30%";
} else if (_root.powerbarStartsAt == 10) {
currNum = "65%";
} else {
return("This attribute has been maxed out.");
}
return(("ReadyCharge: Reduces cannon charging time by starting charge at a higher level. Current starting charge: " + currNum) + ".");
}
maxValue = 16;
display();
}
Instance of Symbol 767 MovieClip in Symbol 905 MovieClip Frame 1
onClipEvent (load) {
function isDisabled() {
return(false);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (_root.largeTrampoline) {
gotoAndStop (2);
cost = 7500;
} else {
gotoAndStop (1);
cost = 20000;
}
costDisplay = "$" + cost;
}
function makePurchase() {
_root.largeTrampoline = (_root.largeTrampoline ? false : true);
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (_root.largeTrampoline) {
return("Small Trampoline: Keeps your firemen closer together, helping them to avoid falling bombs.");
}
return("Large Trampoline: Helps your firemen to catch falling babies more easily.");
}
display();
}
Instance of Symbol 774 MovieClip in Symbol 905 MovieClip Frame 1
onClipEvent (load) {
function isDisabled() {
return(_root.cannonballPowerLevel >= maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
gotoAndStop (3);
_alpha = 20;
costDisplay = "";
} else {
if (_root.cannonballPowerLevel == 1) {
gotoAndStop (1);
cost = 10000;
} else if (_root.cannonballPowerLevel == 2) {
gotoAndStop (2);
cost = 20000;
} else if (_root.cannonballPowerLevel == 3) {
gotoAndStop (3);
cost = 30000;
}
costDisplay = "$" + cost;
}
}
function makePurchase() {
if (_root.cannonballPowerLevel == 1) {
_root.cannonballPowerLevel = 2;
} else if (_root.cannonballPowerLevel == 2) {
_root.cannonballPowerLevel = 3;
} else if (_root.cannonballPowerLevel == 3) {
_root.cannonballPowerLevel = 4;
}
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This attribute has been maxed out.");
}
return(("Cannonball Upgrade: Randomly discharges bomb-destroying attacks upon hitting its target. Cannonballs fired are currently Power Level " + _root.cannonballPowerLevel) + ".");
}
maxValue = 4;
display();
}
Instance of Symbol 786 MovieClip in Symbol 905 MovieClip Frame 2
onClipEvent (load) {
function isDisabled() {
return(_root.maxBabyDrops >= maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "";
} else {
cost = Math.round(30000 * Math.pow(1.5, _root.maxBabyDrops - 3));
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.maxBabyDrops++;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This attribute has been maxed out.");
}
return(("Improved Infant Mortality Rate: Increases the number of babies the player is allowed to miss in one level, before the game is over. Currently, the game ends when the player misses " + _root.maxBabyDrops) + " babies in one level.");
}
maxValue = 9;
display();
}
Instance of Symbol 789 MovieClip in Symbol 905 MovieClip Frame 2
onClipEvent (load) {
function isDisabled() {
return(false);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
cost = Math.round(5000 * Math.pow(5, (_root.cannonHealth - 100) / 100));
costDisplay = "$" + cost;
}
function makePurchase() {
_root.cannonHealth = _root.cannonHealth + 20;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
return(("Toolbox: Increases cannon durability. It is important to upgrade this attribute, because the bombs become more destructive as the game progresses. Current cannon durability: " + _root.cannonHealth) + ".");
}
display();
}
Instance of Symbol 792 MovieClip in Symbol 905 MovieClip Frame 2
onClipEvent (load) {
function isDisabled() {
return(false);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
cost = Math.round(5000 * Math.pow(5, (_root.firemenHealth - 100) / 100));
costDisplay = "$" + cost;
}
function makePurchase() {
_root.firemenHealth = _root.firemenHealth + 20;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
return(("First Aid Kit: Increases the vitality of your firemen. It is important to upgrade this attribute, because the bombs become more destructive as the game progresses. Current firemen vitality: " + _root.firemenHealth) + ".");
}
display();
}
Instance of Symbol 795 MovieClip in Symbol 905 MovieClip Frame 2
onClipEvent (load) {
function isDisabled() {
return(_root.trampolineBouncebackMultiplier >= maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "";
} else {
cost = Math.round(5000 * Math.pow(5, _root.trampolineBouncebackMultiplier - 1));
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.trampolineBouncebackMultiplier = _root.trampolineBouncebackMultiplier + 0.05;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This attribute has been maxed out.");
}
currNum = _root.trampolineBouncebackMultiplier;
currNum = currNum * 100;
return(("Flubber Trampoline Enhancer: Increases the reflective effect of the trampoline on any cannonballs that bounce off of it. This helps to counteract the increasing force of gravity. Current trampoline elasticity: " + currNum) + "%.");
}
maxValue = 1.5;
display();
}
Instance of Symbol 798 MovieClip in Symbol 905 MovieClip Frame 2
onClipEvent (load) {
function isDisabled() {
return(minValue >= _root.gravity);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "";
} else {
cost = 20000 + (5000 * _root.currentLevel);
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.gravity = _root.gravity - 1;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This attribute has been maxed out.");
}
currNum = _root.gravity;
currNum = currNum * 100;
currNum = Math.round(currNum) / 100;
return(("Anti-gravity device: Reduces the force of gravity during gameplay, temporarily slowing the descent of objects for a few levels. Current force of gravity: " + currNum) + ".");
}
minValue = 1.25;
display();
}
Instance of Symbol 801 MovieClip in Symbol 905 MovieClip Frame 2
onClipEvent (load) {
function isDisabled() {
return(minValue >= _root.timeRemainingStart);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "";
} else {
cost = 20000 + (5000 * _root.currentLevel);
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.timeRemainingStart = _root.timeRemainingStart * 0.75;
_root.timeRemainingStart = Math.floor(_root.timeRemainingStart);
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This attribute has been maxed out.");
}
currNum = _root.timeRemainingStart / 25;
return(("Reverse Hourglass: Reduces the length of time spent in one level. Current length of level: approximately " + currNum) + " seconds.");
}
minValue = 100;
display();
}
Instance of Symbol 819 MovieClip in Symbol 905 MovieClip Frame 3
onClipEvent (load) {
function isDisabled() {
return(_root.showTimer);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "";
} else {
cost = 15000;
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.showTimer = true;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This item has already been purchased.");
}
return("Timer Countdown: Displays a translucent bar at the top of the gameplay screen showing the player how much time remains before the level is complete.");
}
display();
}
Instance of Symbol 827 MovieClip in Symbol 905 MovieClip Frame 3
onClipEvent (load) {
function isDisabled() {
return(_root.numBackgrounds == maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
gotoAndStop (3);
_alpha = 20;
costDisplay = "";
} else {
if (_root.numBackgrounds == 4) {
gotoAndStop (1);
cost = 5000;
} else if (_root.numBackgrounds == 5) {
gotoAndStop (2);
cost = 10000;
} else if (_root.numBackgrounds == 6) {
gotoAndStop (3);
cost = 15000;
}
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.numBackgrounds++;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This item has already been purchased.");
}
if (_root.numBackgrounds == 4) {
return("Crayons: Adds a 5th background for use during gameplay. Backgrounds can be selected on the pause menu (press P during gameplay).");
}
if (_root.numBackgrounds == 5) {
return("Artist's Easel: Adds a 6th background for use during gameplay. Backgrounds can be selected on the pause menu (press P during gameplay).");
}
if (_root.numBackgrounds == 6) {
return("Adobe Photoshop: Adds a 7th background for use during gameplay. Backgrounds can be selected on the pause menu (press P during gameplay).");
}
}
maxValue = 7;
display();
}
Instance of Symbol 833 MovieClip in Symbol 905 MovieClip Frame 3
onClipEvent (load) {
function isDisabled() {
return(_root.numCursors == maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
gotoAndStop (3);
_alpha = 20;
costDisplay = "";
} else {
if (_root.numCursors == 4) {
gotoAndStop (1);
cost = 3000;
} else if (_root.numCursors == 8) {
gotoAndStop (2);
cost = 6000;
} else if (_root.numCursors == 12) {
gotoAndStop (3);
cost = 9000;
}
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.numCursors = _root.numCursors + 4;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This item has already been purchased.");
}
if (_root.numCursors == 4) {
return("Cursor Pack Volume 1: Adds 4 new custom cursors for use during gameplay. Cursors can be selected on the pause menu (press P during gameplay).");
}
if (_root.numCursors == 8) {
return("Cursor Pack Volume 2: Adds 4 new custom cursors for use during gameplay. Cursors can be selected on the pause menu (press P during gameplay).");
}
if (_root.numCursors == 12) {
return("Cursor Pack Volume 3: Adds 4 new custom cursors for use during gameplay. Cursors can be selected on the pause menu (press P during gameplay).");
}
}
maxValue = 16;
display();
}
Instance of Symbol 837 MovieClip in Symbol 905 MovieClip Frame 3
onClipEvent (load) {
function isDisabled() {
return(_root.tipBookPurchased);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "$0";
} else {
cost = 30000;
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.tipBookPurchased = true;
_parent.tipBook._visible = true;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("Click here to read Tip Book.");
}
return("Tip Book: Gives helpful hints and tips on achieving higher scores and progressing further into this game.");
}
display();
}
Instance of Symbol 843 MovieClip in Symbol 905 MovieClip Frame 3
onClipEvent (load) {
function isDisabled() {
return(_root.numMusic == maxValue);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
gotoAndStop (3);
_alpha = 20;
costDisplay = "";
} else {
if (_root.numMusic == 3) {
gotoAndStop (1);
cost = 10000;
} else if (_root.numMusic == 4) {
gotoAndStop (2);
cost = 20000;
} else if (_root.numMusic == 5) {
gotoAndStop (3);
cost = 30000;
}
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.numMusic++;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("This item has already been purchased.");
}
if (_root.numMusic == 3) {
return("Music Box: Adds a 4th music track for use during gameplay. Music can be selected on the pause menu (press P during gameplay).");
}
if (_root.numMusic == 4) {
return("Jukebox: Adds a 5th music track for use during gameplay. Music can be selected on the pause menu (press P during gameplay).");
}
if (_root.numMusic == 5) {
return("iPod: Adds a 6th music track for use during gameplay. Music can be selected on the pause menu (press P during gameplay).");
}
}
maxValue = 6;
display();
}
Instance of Symbol 848 MovieClip in Symbol 905 MovieClip Frame 3
onClipEvent (load) {
function isDisabled() {
return(_root.awardHandbookPurchased);
}
function hasEnoughPoints() {
return(_root.spendablePoints >= cost);
}
function display() {
if (isDisabled()) {
_alpha = 20;
costDisplay = "$0";
} else {
cost = 20000;
costDisplay = "$" + cost;
}
}
function makePurchase() {
_root.awardHandbookPurchased = true;
_parent.awardHandbook._visible = true;
_parent._parent.deductPoints(cost);
_parent.desc = getDescription();
}
function getDescription() {
if (isDisabled()) {
return("Click here to read Awards Handbook.");
}
return("Awards Handbook: Describes all of the bonus awards given after each level, as well as how to earn them.");
}
display();
}
Instance of Symbol 874 MovieClip "tipBook" in Symbol 905 MovieClip Frame 3
onClipEvent (load) {
stop();
_visible = false;
}
Instance of Symbol 904 MovieClip "awardHandbook" in Symbol 905 MovieClip Frame 3
onClipEvent (load) {
function rollover(value) {
desc = value;
}
function rollout() {
desc = "Mouse over any of the above available awards, and a description of it will appear here.";
}
stop();
_visible = false;
desc = "";
}
Symbol 919 Button
on (release) {
_root.showUpgradesExplanation = false;
_visible = false;
}
Instance of Symbol 905 MovieClip in Symbol 921 MovieClip Frame 1
onClipEvent (load) {
defaultDesc = "Buy upgrades that will help you through the harder levels. Move your mouse over an item to see a description of it, and click on it to purchase it. More upgrades can be found by clicking the three tabs near the top.";
desc = defaultDesc;
stop();
}
Instance of Symbol 920 MovieClip in Symbol 921 MovieClip Frame 1
onClipEvent (load) {
_visible = _root.showUpgradesExplanation;
}