Frame 1
stop();
stop();
playBut._x = playBut._x - 1000;
preloaderActive = true;
Stage.showMenu = false;
var savefile = SharedObject.getLocal("SHORESIEGEBEST");
pMask.setMask(pLoad);
Instance of Symbol 345 MovieClip "pLoad" in Frame 1
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Instance of Symbol 18 MovieClip "hg" in Frame 1
onClipEvent (enterFrame) {
if (_alpha == 0) {
_alpha = 100;
}
if (_alpha > 1) {
_alpha = (_alpha - 9);
} else {
this.swapDepths(666);
this.removeMovieClip();
}
}
Frame 2
stop();
Instance of Symbol 369 MovieClip in Frame 2
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Instance of Symbol 18 MovieClip "hr" in Frame 2
onClipEvent (enterFrame) {
if (_alpha == 0) {
_alpha = 100;
}
if (_alpha > 1) {
_alpha = (_alpha - 9);
} else {
this.swapDepths(666);
this.removeMovieClip();
}
}
Frame 3
stop();
currentText = "";
currentText2 = "";
_root.bestScore = 4;
_root.mus == undefined;
Instance of Symbol 18 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (moveVar == undefined) {
moveVar = 0;
}
_parent.BG.waves._x = _parent.BG.waves._x + moveVar;
if (moveVarS == true) {
if (moveVar < 0.5) {
moveVar = moveVar + 0.2;
} else {
moveVarS = false;
}
} else if (moveVar > -0.5) {
moveVar = moveVar - 0.2;
} else {
moveVarS = true;
}
}
Instance of Symbol 395 MovieClip "TS" in Frame 3
onClipEvent (enterFrame) {
if (_parent.BG.clouds._x > 0) {
_parent.BG.clouds._x = _parent.BG.clouds._x - (_parent.BG.clouds._width / 2);
} else {
_parent.BG.clouds._x = _parent.BG.clouds._x + 1.5;
}
}
Instance of Symbol 398 MovieClip in Frame 3
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Instance of Symbol 18 MovieClip "hj" in Frame 3
onClipEvent (enterFrame) {
if (_alpha == 0) {
_alpha = 100;
}
if (_alpha > 1) {
_alpha = (_alpha - 9);
} else {
this.swapDepths(666);
this.removeMovieClip();
}
}
Frame 5
stop();
Frame 6
Mouse.show();
Frame 7
Mouse.show();
Symbol 9 MovieClip [Enemy_BSpat] Frame 1
_xscale = 150;
_yscale = 150;
Symbol 9 MovieClip [Enemy_BSpat] Frame 8
this.removeMovieClip();
Symbol 18 MovieClip Frame 1
_alpha = 0;
Symbol 20 MovieClip [enemy_Bomb] Frame 1
stop();
Symbol 25 MovieClip Frame 1
function onEnterFrame() {
health._xscale = (_parent.health / _parent.maxHealth) * 100;
}
_parent.health = _parent.maxHealth;
Symbol 26 MovieClip [ENEMY_Bird] Frame 1
if (_root.bombVis == undefined) {
bomb._visible = false;
}
Symbol 33 MovieClip [BirdCatcher] Frame 44
this.removeMovieClip();
Symbol 35 MovieClip [BirdCatcher_fail] Frame 1
function onEnterFrame() {
_y = (_y + drop);
drop = drop + 2;
_rotation = (_rotation + rotSpeed);
if (_y > 400) {
this.removeMovieClip();
}
}
var drop = -14;
var rotSpeed = (random(10) - 5);
Symbol 41 MovieClip [HPP] Frame 1
function onEnterFrame() {
_y = (_y - 1);
_alpha = (_alpha - 5);
if (_alpha < 0) {
this.removeMovieClip();
}
}
Symbol 55 MovieClip Frame 1
stop();
_visible = false;
Symbol 60 MovieClip [BombPlace] Frame 1
function onEnterFrame() {
_xscale = (_xscale - 3);
_yscale = (_yscale - 3);
if (_xscale < 0) {
this.removeMovieClip();
}
}
Symbol 62 MovieClip [Effect_Smoke] Frame 1
function onEnterFrame() {
_xscale = (_xscale - 2);
_alpha = (_alpha - 3);
_rotation = (_rotation + rotSpin);
_y = (_y - 5);
if (_xscale < 0) {
this.removeMovieClip();
}
}
_x = (_x + (random(20) - 10));
_y = (_y + (random(20) - 10));
_rotation = random(360);
rotSpin = random(20) - 10;
_alpha = 80;
Symbol 64 MovieClip [Effect_Steam] Frame 1
function onEnterFrame() {
_xscale = (_xscale - 2);
_alpha = (_alpha - 3);
_rotation = (_rotation + rotSpin);
_y = (_y - 5);
if (_xscale < 0) {
this.removeMovieClip();
}
}
_x = (_x + (random(20) - 10));
_y = (_y + (random(20) - 10));
_rotation = random(360);
rotSpin = random(20) - 10;
_alpha = 80;
Symbol 73 Button
on (release) {
if (_root.roundNum < 7) {
nextFrame();
} else {
_parent.UPGRADERMASK.play();
_parent.newDay();
}
}
on (rollOver, dragOver) {
outText = "Continue on to the next day.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 75 Button
on (release) {
RS._x = RS._x + 3000;
RS.play();
}
on (rollOver, dragOver) {
outText = "Pay to repair the Ship. Once the ship is fully repaired you can leave the island.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 87 MovieClip [boom1] Frame 1
function onEnterFrame() {
this._x = this._x - (_root.levelSpeed / 3);
}
Symbol 87 MovieClip [boom1] Frame 9
this.removeMovieClip();
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 2
Ball.gotoAndStop(2);
Symbol 111 MovieClip Frame 1
stop();
Instance of Symbol 90 MovieClip "cannon" in Symbol 111 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 130 MovieClip Frame 1
_xscale = (100 + random(20));
_yscale = (100 + random(20));
if (random(2) == 0) {
_yscale = (_yscale * -1);
}
Symbol 132 MovieClip Frame 1
stop();
Instance of Symbol 138 MovieClip "ammoPrompt" in Symbol 139 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 140 Button
on (release) {
_root.pirateActive++;
_parent["pirateMan" + _root.pirateActive].active = true;
_parent["pirateMan" + _root.pirateActive]._visible = true;
this["pirateMan" + _root.pirateActive]._visible = true;
_root.money = _root.money - 4000;
_parent.W_A._visible = true;
}
on (rollOver, dragOver) {
outText = "Buying a Sniper Pirate adds an automated attacker onto your ship as you keep him fed up on ammunition.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 141 Button
on (release) {
_root.pirateTrain = _root.pirateTrain + 10;
_root.money = _root.money - 1000;
}
on (rollOver, dragOver) {
outText = "The higher your training level is, the better each of your sniper pirates will be at taking on the enemy.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 142 Button
on (release) {
_root.turretActive = true;
_parent.W_T._alpha = 100;
_parent.HUDBAR.W_T._alpha = 30;
_root.money = _root.money - 2000;
}
on (rollOver, dragOver) {
outText = "Buying this option allows you to place auto turrets (at a cost of $500 each) onto the battlefield.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 143 Button
on (release) {
SHIP.cannon._visible = true;
_parent.SHIP.cannon._visible = true;
_parent.W_B._alpha = 100;
_parent.HUDBAR.W_B._alpha = 100;
_root.money = _root.money - 2000;
}
on (rollOver, dragOver) {
outText = "Buying this option allows you to fire artillary shots to the battlefield and take out the enemies. Each shot cost $20.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 144 Button
on (release) {
_root.nailUpgrade = 2;
_root.money = _root.money - 4000;
_parent.Pin.gotoAndStop(2);
}
on (rollOver, dragOver) {
outText = "This upgrades your rusty nail to a golden nail. The golden nail does 10 times the damage of the rusty nail.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 145 Button
on (release) {
_root.flameUpgrade = 2;
_root.money = _root.money - 2000;
_parent.Flame.gotoAndStop(2);
}
on (rollOver, dragOver) {
outText = "This upgrades your flame to a rare White flame, which instantly roasts Shmallowmen.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 146 Button
on (release) {
_root.dropUpgrade = 2;
_root.money = _root.money - 2000;
_parent.Water.gotoAndStop(2);
}
on (rollOver, dragOver) {
outText = "This upgrade freezes your water drop, making cooling Flierballs easy peasy!";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 147 Button
on (release) {
_root.maxHealth = _root.maxHealth + 10;
_parent.W_H._visible = true;
_root.money = _root.money - 1000;
}
on (rollOver, dragOver) {
outText = "Increase the maximum health of your ship up to 200 in increments of 10.";
}
on (rollOut, dragOut) {
outText = "";
}
Symbol 172 MovieClip Frame 1
function onEnterFrame() {
_rotation = (_rotation + 5);
}
Symbol 175 MovieClip Frame 1
SHIP.gotoAndStop(_root.shipRepair);
stop();
_x = (_x - 3000);
Instance of Symbol 18 MovieClip "bg" in Symbol 175 MovieClip Frame 1
onClipEvent (load) {
_alpha = 60;
}
on (release) {
}
Symbol 175 MovieClip Frame 2
bg._alpha = 70;
Symbol 175 MovieClip Frame 15
_root.shipRepair++;
SHIP.gotoAndStop(_root.shipRepair);
Symbol 175 MovieClip Frame 59
_root.money = _root.money - 5000;
if (_root.shipRepair == 11) {
stop();
_parent._parent.pirateMan1._visible = false;
_parent._parent.pirateMan2._visible = false;
_parent._parent.pirateMan3._visible = false;
_parent._parent.pirateMan4._visible = false;
_root.score = _root.roundNum;
_root.roundNum = "O";
stopAllSounds();
_parent._parent.UPGRADERMASK.play();
_parent._parent.newDay();
} else {
gotoAndStop (1);
}
Symbol 191 MovieClip Frame 1
swapDepths(10000);
Symbol 212 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 1
gotoAndStop(_root.roundNum);
Instance of Symbol 26 MovieClip [ENEMY_Bird] in Symbol 241 MovieClip Frame 1
onClipEvent (load) {
hBar._visible = false;
}
Instance of Symbol 184 MovieClip in Symbol 241 MovieClip Frame 2
onClipEvent (load) {
hBar._visible = false;
}
Instance of Symbol 191 MovieClip in Symbol 241 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 242 Button
on (release) {
_parent.UPGRADERMASK.play();
_parent.newDay();
}
Symbol 244 MovieClip [Upgrader] Frame 1
function onEnterFrame() {
dTimer--;
if (dTimer == 0) {
dTimer = 30;
_parent.mouseMC.swapDepths(_parent.getNextHighestDepth() + 20);
}
_parent.mouseMC.gotoAndStop(1);
SHIP.gotoAndStop(_root.shipRepair);
_parent.SHIP.gotoAndStop(_root.shipRepair);
SHIP.cannon._visible = _parent.SHIP.cannon._visible;
repairsLeft = (11 - _root.shipRepair) + " REPAIRS";
covers();
}
function covers() {
if (cover_BP._x > 0) {
cover_BP._x = cover_BP._x - 10000;
}
cover_BP.stop();
if (cover_UP._x > 0) {
cover_UP._x = cover_UP._x - 10000;
}
cover_UP.stop();
if (cover_RT._x > 0) {
cover_RT._x = cover_RT._x - 10000;
}
cover_RT.stop();
if (cover_RA._x > 0) {
cover_RA._x = cover_RA._x - 10000;
}
cover_RA.stop();
if (cover_UN._x > 0) {
cover_UN._x = cover_UN._x - 10000;
}
cover_UN.stop();
if (cover_UF._x > 0) {
cover_UF._x = cover_UF._x - 10000;
}
cover_UF.stop();
if (cover_UD._x > 0) {
cover_UD._x = cover_UD._x - 10000;
}
cover_UD.stop();
if (cover_HM._x > 0) {
cover_HM._x = cover_HM._x - 10000;
}
cover_HM.stop();
if (cover_RS._x > 0) {
cover_RS._x = cover_RS._x - 10000;
}
cover_RS.stop();
if ((_root.money < 4000) || (_root.pirateActive > 3)) {
cover_BP._x = cover_BP._x + 10000;
}
if (((_root.money < 1000) || (_root.pirateTrain > 90)) || (_root.pirateActive == 0)) {
cover_UP._x = cover_UP._x + 10000;
}
if ((_root.money < 2000) || (_root.turretActive == true)) {
cover_RT._x = cover_RT._x + 10000;
}
if ((_root.money < 2000) || (SHIP.cannon._visible == true)) {
cover_RA._x = cover_RA._x + 10000;
}
if ((_root.money < 4000) || (_root.nailUpgrade == 2)) {
cover_UN._x = cover_UN._x + 10000;
}
if (((_root.money < 2000) || (_root.dropUpgrade == 0)) || (_root.dropUpgrade == 2)) {
cover_UD._x = cover_UD._x + 10000;
}
if (((_root.money < 2000) || (_root.flameUpgrade == 0)) || (_root.flameUpgrade == 2)) {
cover_UF._x = cover_UF._x + 10000;
}
if ((_root.money < 1000) || (_root.maxHealth > 190)) {
cover_HM._x = cover_HM._x + 10000;
}
if (_root.money < 5000) {
cover_RS._x = cover_RS._x + 10000;
}
}
stop();
dTimer = 30;
Instance of Symbol 66 MovieClip in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 139 MovieClip "pirateMan1" in Symbol 244 MovieClip [Upgrader] Frame 1
onClipEvent (load) {
_visible = _parent._parent[_name]._visible;
}
Instance of Symbol 139 MovieClip "pirateMan4" in Symbol 244 MovieClip [Upgrader] Frame 1
onClipEvent (load) {
_visible = _parent._parent[_name]._visible;
}
Instance of Symbol 139 MovieClip "pirateMan2" in Symbol 244 MovieClip [Upgrader] Frame 1
onClipEvent (load) {
_visible = _parent._parent[_name]._visible;
}
Instance of Symbol 139 MovieClip "pirateMan3" in Symbol 244 MovieClip [Upgrader] Frame 1
onClipEvent (load) {
_visible = _parent._parent[_name]._visible;
}
Instance of Symbol 170 MovieClip "cover_HM" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 170 MovieClip "cover_UD" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 170 MovieClip "cover_UF" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 170 MovieClip "cover_UN" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 170 MovieClip "cover_RA" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 170 MovieClip "cover_RT" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 170 MovieClip "cover_UP" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 170 MovieClip "cover_BP" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Instance of Symbol 170 MovieClip "cover_RS" in Symbol 244 MovieClip [Upgrader] Frame 1
on (release) {
}
Symbol 244 MovieClip [Upgrader] Frame 2
function onEnterFrame() {
}
Symbol 249 MovieClip [UpgradeMask] Frame 1
stopAllSounds();
Symbol 249 MovieClip [UpgradeMask] Frame 40
stop();
_parent.BG._visible = false;
_parent.destroyAllEnemy();
Symbol 249 MovieClip [UpgradeMask] Frame 41
_parent.BG._visible = true;
Symbol 249 MovieClip [UpgradeMask] Frame 80
_parent.UPGRADER.removeMovieClip();
if ((_root.roundNum != "O") && (_root.mus == undefined)) {
_root.MUSIC.play();
}
this.removeMovieClip();
Symbol 254 MovieClip [OUTRO] Frame 1
function onEnterFrame() {
if (random(10) == 0) {
_parent.shakeScreen(5, 2);
}
}
Symbol 254 MovieClip [OUTRO] Frame 60
_parent.SHIP._visible = false;
SHIP.gotoAndStop(11);
Symbol 254 MovieClip [OUTRO] Frame 280
function onEnterFrame() {
}
stop();
_root.gotoAndStop("END");
Symbol 267 MovieClip Frame 1
stop();
Symbol 272 MovieClip [Enemy_Turret] Frame 1
stop();
if (active == true) {
zone._alpha = 20;
} else {
zone._alpha = 0;
}
Symbol 272 MovieClip [Enemy_Turret] Frame 2
stop();
stop();
Symbol 272 MovieClip [Enemy_Turret] Frame 6
active = true;
gotoAndStop (1);
Symbol 284 MovieClip [explosion] Frame 1
if (_x < _parent._parent.castlePoint) {
_rotation = 90;
_y = (_y - 60);
_parent._parent.hurtShip(8);
} else {
_x = (_x - 30);
}
_parent._parent.shakeScreen(20, 2);
_xscale = 200;
_yscale = 200;
Symbol 284 MovieClip [explosion] Frame 11
this.removeMovieClip();
Symbol 296 MovieClip Frame 1
function onEnterFrame() {
_x = (_x + _root.controlSkewAngleDivTen);
}
Symbol 298 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 1
stop();
Symbol 336 Button
on (release) {
_root.play();
}
Symbol 345 MovieClip Frame 1
function onEnterFrame() {
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
_parent.pMask.loadText = ("LOADED: " + Math.round(PercentLoaded)) + "%";
if (PercentLoaded != 100) {
_xscale = PercentLoaded;
} else if (_alpha == 100) {
_xscale = 100;
_root.playBut._x = _root.playBut._x + 1000;
_alpha = 99;
} else if (_parent.pMask._alpha > 0) {
_parent.pMask._alpha = _parent.pMask._alpha - 5;
_parent.pSand._alpha = _parent.pSand._alpha - 8;
}
}
Symbol 366 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 369 MovieClip Frame 1
_visible = false;
Symbol 369 MovieClip Frame 2
_visible = true;
Symbol 369 MovieClip Frame 126
_root.nextFrame();
Symbol 369 MovieClip Frame 127
_root.nextFrame();
Symbol 371 Button
on (release) {
if (Key.isDown(39)) {
_root.gotoAndStop("END");
} else {
yPos = -270;
gameSwitch = true;
}
}
Symbol 372 Button
on (release) {
gotoAndStop (2);
}
Symbol 373 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 381 MovieClip Frame 1
textBox = _root.currentText2;
Symbol 383 Button
on (release) {
yPos = -270;
gameSwitch = true;
}
Symbol 384 Button
on (release) {
getURL ("http://armorgames.com", "_blank");
}
Symbol 385 Button
on (release) {
gotoAndStop (3);
}
Symbol 395 MovieClip Frame 1
function onEnterFrame() {
this._y = this._y + ((yPos - _y) / 5);
if ((_y < -240) && (gameSwitch == true)) {
_root.play();
}
}
yPos = _y;
_y = (_y - 1000);
gameSwitch = false;
Instance of Symbol 381 MovieClip "banner1" in Symbol 395 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.BG.clouds._x > 0) {
_parent.BG.clouds._x = _parent.BG.clouds._x - (_parent.BG.clouds._width / 2);
} else {
_parent.BG.clouds._x = _parent.BG.clouds._x + 1.5;
}
}
Symbol 395 MovieClip Frame 2
stop();
banner1._visible = false;
banner2._visible = false;
trace(_root.savefile.data.bestScore);
if (_root.savefile.data.bestScore != undefined) {
flagText1 = ("Best Score: " + _root.savefile.data.bestScore) + " days";
banner1._visible = true;
} else {
flagText1 = "";
flagText2 = "";
}
Symbol 408 MovieClip Frame 1
if ((_parent._name != "Pin") || (_root.money > 0)) {
this.swapDepths(666);
this.removeMovieClip();
}
Symbol 410 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 290
stop();
Symbol 414 MovieClip Frame 236
stop();
Symbol 415 Button
on (release) {
if (Math.round(_parent.HUDBAR._y) == Math.round(_parent.HUDBAR.yPos)) {
_parent.SHIP._visible = true;
_parent.gameState = 2;
stopAllSounds();
_root.MUSIC.play();
this.swapDepths(0);
this.removeMovieClip();
}
}
Symbol 417 MovieClip Frame 1
_parent.W_H._alpha = 0;
Symbol 417 MovieClip Frame 10
SHIP.gotoAndStop(11);
Symbol 417 MovieClip Frame 91
SHIP.gotoAndStop(10);
Instance of Symbol 284 MovieClip [explosion] in Symbol 417 MovieClip Frame 91
onClipEvent (enterFrame) {
_rotation = -90;
}
Instance of Symbol 284 MovieClip [explosion] in Symbol 417 MovieClip Frame 108
onClipEvent (enterFrame) {
_rotation = 0;
}
Instance of Symbol 284 MovieClip [explosion] in Symbol 417 MovieClip Frame 124
onClipEvent (enterFrame) {
_rotation = -90;
}
Symbol 417 MovieClip Frame 131
SHIP.gotoAndStop(3);
Symbol 417 MovieClip Frame 179
stop();
_root.health = 100;
_parent.W_H._visible = false;
_parent.W_H._alpha = 100;
Instance of Symbol 410 MovieClip "Pini" in Symbol 417 MovieClip Frame 179
onClipEvent (load) {
timer = 0;
scaleSwitch = false;
}
on (release) {
active = true;
_parent.startHud = true;
_parent.play();
}
onClipEvent (enterFrame) {
if (active == true) {
_y = (_y + 15);
if (_yscale < 200) {
_yscale = (_yscale + 10);
_xscale = (_xscale + 10);
}
_x = (_x - 30);
} else if (timer < 200) {
timer++;
} else {
trace(_xscale);
if (scaleSwitch == true) {
if (_xscale < 100) {
_xscale = (_xscale + 5);
_yscale = (_yscale + 5);
} else {
scaleSwitch = false;
}
} else if (_xscale > 50) {
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
} else {
scaleSwitch = true;
}
}
}
Symbol 417 MovieClip Frame 203
stop();
Symbol 419 MovieClip Frame 1
stop();
Instance of Symbol 20 MovieClip [enemy_Bomb] in Symbol 419 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 272 MovieClip [Enemy_Turret] in Symbol 419 MovieClip Frame 3
onClipEvent (load) {
hBar._visible = false;
}
Instance of Symbol 422 MovieClip "bar" in Symbol 426 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (100);
}
Symbol 427 Button
on (release) {
if (gameState == 2) {
_root.gamePaused = true;
}
}
Symbol 433 MovieClip Frame 1
stop();
Symbol 437 MovieClip Frame 1
stop();
Symbol 440 MovieClip Frame 1
function onEnterFrame() {
sprite._rotation = sprite._rotation + 3;
}
stop();
Instance of Symbol 443 MovieClip "hand" in Symbol 447 MovieClip Frame 1
onClipEvent (load) {
_rotation = -100;
}
Symbol 448 MovieClip Frame 1
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
Instance of Symbol 121 MovieClip [Coin] "Coin" in Symbol 448 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
}
onClipEvent (enterFrame) {
if (_xscale > 120) {
_xscale = (_xscale / 1.1);
_yscale = _xscale;
} else {
_xscale = 120;
_yscale = 120;
}
}
Instance of Symbol 272 MovieClip [Enemy_Turret] "W_T" in Symbol 448 MovieClip Frame 1
onClipEvent (load) {
hBar._visible = false;
}
Instance of Symbol 20 MovieClip [enemy_Bomb] "W_B" in Symbol 448 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
}
Instance of Symbol 212 MovieClip "FlameStill" in Symbol 448 MovieClip Frame 1
onClipEvent (load) {
s1.stop();
s2.stop();
_visible = false;
}
Symbol 452 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
function onMouseDown() {
mousePressed = true;
}
function onMouseUp() {
mousePressed = false;
mouseHold = 0;
}
function pythag(x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(y1 - y2, 2) + Math.pow(x1 - x2, 2)));
}
function angle(x1, y1, x2, y2) {
return(Math.round((Math.atan2(y2 - y1, x2 - x1) / 3.141593) * 180) + 90);
}
function calcSpeed(angle, speed) {
var _local2 = angle * 0.01745329;
var _local1 = new Object();
_local1.x = speed * Math.cos(_local2);
_local1.y = speed * Math.sin(_local2);
return(_local1);
}
function rotatedXY(xPos, yPos, rotate) {
var _local1 = new Object();
var _local2 = 0.0174444444444444 * rotate;
var _local4 = Math.sin(_local2);
var _local3 = Math.cos(_local2);
_local1.x = (xPos * _local3) - (yPos * _local4);
_local1.y = (xPos * _local4) + (yPos * _local3);
return(_local1);
}
function onEnterFrame() {
if (gameState == 2) {
pauseBut._alpha = 100;
} else {
pauseBut._alpha = 30;
}
if (_root.gamePaused == true) {
Mouse.show();
_root.pScreen._x = -100;
_root.pScreen._y = -200;
} else {
_root.pScreen._x = -10000;
_root.pScreen._y = -1000;
if (_root.health <= 0) {
if (deadTimer > 0) {
if (deadTimer == 20) {
SHIP._visible = false;
}
deadTimer--;
_root.health = 0;
_root.roundTimer--;
if (random(4) == 0) {
var _local2 = SHIP._x;
var _local3 = SHIP._y;
newEffect("Explosion", random(4), (SHIP._x = SHIP._x + (random(100) - 50)), (SHIP._y = SHIP._y + (random(100) - 50)));
SHIP._x = _local2;
SHIP._y = _local3;
}
} else {
_root.gotoAndStop("DEAD");
}
}
if (gameState == 0) {
introMovie();
} else if (gameState == 3) {
outroMovie();
} else if (gameState == 2) {
if (gameActive == true) {
spawnControl();
updateBlob();
updateShmallow();
updateRoller();
updateDino();
updateBird();
updateBloon();
updateVamp();
updateVampDead();
updateTurret();
updateBomb();
updatePirates();
if (_ymouse > (HUDBAR._y - 10)) {
HUDBAR["T" + Math.ceil((_xmouse - 145) / 67)].gotoAndPlay(2);
}
}
dayControl();
}
controlWind();
controlWing();
controlSkew();
HUDBARControl();
flameControl();
updateCoins();
updateShake();
drawHandle();
mouseControl();
outPutText();
}
}
function setEnemyArray() {
enemyArray_blob = new Array();
enemyArray_shmallow = new Array();
enemyArray_roller = new Array();
enemyArray_dino = new Array();
enemyArray_bird = new Array();
enemyArray_bloon = new Array();
enemyArray_vamp = new Array();
enemyArray_ALL = new Array();
enemyArray_GROUND = new Array(enemyArray_blob, enemyArray_shmallow, enemyArray_dino, enemyArray_roller);
enemyArray_AIR = new Array(enemyArray_vamp, enemyArray_bloon, enemyArray_bird, enemyArray_blob, enemyArray_shmallow, enemyArray_dino, enemyArray_roller);
}
function newEnemy(type, layer) {
if (((_root.roundTimer < (_root.roundTimerMax - 10)) || (type == "turret")) || (type == "bomb")) {
var _local3 = this["ELAYER_" + layer].attachMovie("ENEMY_" + type, "E" + this["ELAYER_" + layer].getNextHighestDepth(), this["ELAYER_" + layer].getNextHighestDepth());
_local3._x = 850;
_local3._y = 250 + (20 * layer);
_local3.layer = layer;
this["enemyArray_" + type].push(_local3);
this["loadSettings_" + type](_local3);
type.toLowerCase();
if (type != "turret") {
enemyArray_ALL.push(_local3);
enemyCounter++;
}
_local3.nom = type;
return(_local3);
}
}
function loadSettings_blob(enemy) {
enemy.maxHealth = 10;
enemy.deadAnim = "Enemy_BSpat";
enemy.xSpeed = 0;
}
function loadSettings_shmallow(enemy) {
enemy.speed = 1.5 + (random(3) / 10);
enemy.active = false;
enemy._y = enemy._y + 10;
enemy.maxHealth = 20;
enemy.anim.sprite.faceSprite.setMask(enemy.anim.sprite.faceMask);
}
function loadSettings_roller(enemy) {
enemy._y = enemy._y - 5;
enemy.deadAnim = "Enemy_RSpat";
enemy.maxHealth = 15;
enemy.yPos = enemy._y;
enemy.active = false;
enemy.ySpeed = 0;
enemy.xSpeed = 0;
enemy.rotSpeed = 0;
}
function loadSettings_vampDead(enemy) {
enemy.yPos = enemy._y;
enemy._x = _root.weaponX;
enemy._y = _root.weaponY;
enemy.active = false;
enemy.ySpeed = 0;
enemy.xSpeed = 0;
enemy.rotSpeed = 0;
}
function loadSettings_dino(enemy) {
enemy.deadAnim = "Enemy_DSpat";
enemy._y = enemy._y + 10;
enemy.xSpeed = 0;
enemy.maxHealth = 60;
}
function loadSettings_vamp(enemy) {
enemy.deadAnim = "Enemy_VSpat";
enemy._y = enemy._y - 80;
enemy.maxHealth = 200;
enemy.shadow._y = enemy.shadow._y + 80;
enemy.shadow._alpha = 30;
}
function loadSettings_bird(enemy) {
_root.bombVis = true;
enemy.bomb._alpha = 100;
enemy.maxHealth = 30;
enemy._xscale = 80;
enemy._yscale = 80;
enemy.flyaway = 0;
enemy.speed = 3 + ((random(20) / 10) - 0.1);
enemy._y = enemy._y - 90;
enemy.shadow._y = enemy.shadow._y + 125;
}
function loadSettings_bloon(enemy) {
enemy.sprite._rotation = (-controlWingAngleDivTen) / 5;
enemy.flyaway = 0;
enemy.speed = 3 + ((random(20) / 10) - 0.1);
enemy._y = enemy._y - 90;
enemy.maxHealth = 20;
enemy.shadow._y = enemy.shadow._y + 125;
}
function pinDeath(enemy, ammount) {
if (Pin.killActive == true) {
if (enemy.hitTest(Pin._x, Pin._y) && (enemy.pinSwitch != true)) {
enemy.pinSwitch = true;
if (hurtEnemy(enemy, ammount) == true) {
return(true);
}
return(false);
}
if (enemy.hitTest(Pin._x, Pin._y) == false) {
enemy.pinSwitch = false;
}
}
}
function updateBlob() {
var _local2 = 0;
while (_local2 < enemyArray_blob.length) {
var _local1 = enemyArray_blob[_local2];
eolBuffer(_local1._x);
_local1._x = _local1._x - _local1.xSpeed;
_local1.xSpeed = _local1.xSpeed + 0.5;
_local1.xSpeed = _local1.xSpeed / 1.2;
_local1.sprite.skew(controlSkewAngle, 0);
pinDeath(_local1, 10);
if (_local1.health == 0) {
newEffect("Enemy_BSpat", _local1.layer, _local1._x - 20, _local1._y - 20);
newCoins(1, _local1._x, _local1._y);
deleteEnemy(_local1, enemyArray_blob, _local2);
} else if (_local1._x < castlePoint) {
hurtShip(3);
newEffect("Enemy_BSpat", _local1.layer, _local1._x - 20, _local1._y - 20);
deleteEnemy(_local1, enemyArray_blob, _local2);
}
_local2++;
}
}
function updateShmallow() {
var _local3 = 0;
while (_local3 < enemyArray_shmallow.length) {
var _local2 = enemyArray_shmallow[_local3];
eolBuffer(_local2._x);
if (_local2.active == true) {
if (pythag(_local2._x, _local2._y, Flame._x, Flame._y) < 40) {
if (_root.flameUpgrade == 2) {
_local2.health = _local2.health - 10;
} else {
_local2.health = _local2.health - 1;
}
if (_local2.health < 0) {
_local2.health = 0;
}
_local2.anim.sprite.nextFrame();
newEffect("Effect_Smoke", _local2.layer, _local2._x, _local2._y - 10);
}
if (_local2.health == 0) {
newCoins(1, _local2._x, _local2._y);
deleteEnemy(_local2, enemyArray_shmallow, _local3);
} else if (_local2._x > castlePoint) {
_local2.anim.skew(controlSkewAngle, 0);
_local2.anim._y = _local2.anim._y + (controlSkewAngleDivTen / 2);
_local2._x = _local2._x - _local2.speed;
if (_local2._x < castlePoint) {
_local2._y = _local2._y + 15;
_local2.hBar._y = _local2.hBar._y - 15;
_local2.anim._y = _local2.anim._y - 15;
}
} else {
newEffect("Explosion", weapon.layer, weapon._x - 20, weapon._y - 20);
deleteEnemy(_local2, enemyArray_shmallow, _local3);
}
} else if (controlSkewAngle == 16) {
_local2.active = true;
}
_local3++;
}
}
function updateRoller() {
var _local2 = 0;
while (_local2 < enemyArray_roller.length) {
var _local1 = enemyArray_roller[_local2];
eolBuffer(_local1._x);
if (_local1.active == false) {
if (_local1._y > (_local1.yPos - 5)) {
if (_local1._x > castlePoint) {
_local1.xSpeed = _local1.xSpeed + 0.5;
} else {
_local1.xSpeed = _local1.xSpeed - 0.5;
}
_local1.xSpeed = _local1.xSpeed / 1.25;
_local1.rotSpeed = _local1.rotSpeed / 1.2;
}
_local1.ySpeed--;
_local1._x = _local1._x - _local1.xSpeed;
_local1._y = _local1._y - _local1.ySpeed;
if (_local1._y > _local1.yPos) {
_local1._y = _local1.yPos;
_local1.ySpeed = _local1.ySpeed * -0.5;
}
if ((_local1._x < (castlePoint + 5)) && (_local1._x > (castlePoint - 5))) {
_local1.castleTimer++;
if (_local1.castleTimer > 20) {
_local1._alpha = _local1._alpha * -1;
}
} else {
_local1.castleTimer = 0;
_local1._alpha = 100;
}
if (_local1.castleTimer > 60) {
_local1.deadSet = true;
}
if ((mouseHold == 0) && (mouseState == 1)) {
if (pythag(_xmouse, _ymouse, _local1._x, _local1._y) < 30) {
mouseState = 2;
if (mousePressed == true) {
_local1.active = true;
mouseHold = 1;
}
}
}
_local1.sprite._rotation = _local1.sprite._rotation - (5 + _local1.rotSpeed);
_local1.rotSpeed = _local1.rotSpeed / 1.02;
} else if (mousePressed == false) {
_local1.active = false;
} else {
mouseState = 3;
var _local4 = _local1._x;
var _local3 = _local1._y;
_local1._x = _local1._x + ((_xmouse - _local1._x) / 3);
_local1._y = _local1._y + ((_ymouse - _local1._y) / 3);
if (_local1._y > _local1.yPos) {
_local1._y = _local1.yPos;
}
_local1.xSpeed = (_local1._x - _xmouse) / 3;
_local1.ySpeed = (_local1._y - _ymouse) / 3;
_local1.rotSpeed = random(100) - 50;
}
if (_local1._x > 800) {
_local1._x = 800;
_local1.xSpeed = _local1.xSpeed * -1;
} else if ((((_local1._y > (_local1.yPos - 5)) && (_local1._x < 80)) || (_local1.health <= 0)) || (_local1._x < 0)) {
newEffect("Effect_Steam", _local1.layer, _local1._x - 20, _local1._y + 20);
newCoins(2, _local1._x, _local1._y);
deleteEnemy(_local1, enemyArray_roller, _local2);
} else if (_local1.deadSet == true) {
newEffect("Explosion", _local1.layer, _local1._x - 20, _local1._y + 20);
deleteEnemy(_local1, enemyArray_roller, _local2);
} else if (_local1._x < 80) {
_local1.shadow._alpha = _local1.shadow._alpha * -1;
} else {
_local1.shadow._alpha = 100;
}
_local1.shadow._y = (_local1.yPos - _local1._y) + 15;
_local2++;
}
}
function updateDino() {
var _local2 = 0;
while (_local2 < enemyArray_dino.length) {
var _local1 = enemyArray_dino[_local2];
eolBuffer(_local1._x);
if (_local1.xSpeed < 1) {
_local1.xSpeed = _local1.xSpeed + 1;
}
_local1._x = _local1._x - _local1.xSpeed;
if (_local1._x < castlePoint) {
newEffect("Explosion", _local1.layer, _local1._x - 20, _local1._y + 20);
deleteEnemy(_local1, enemyArray_dino, _local2);
} else if (_local1.health == 0) {
newCoins(4, _local1._x, _local1._y);
deleteEnemy(_local1, enemyArray_dino, _local2);
}
_local2++;
}
}
function updateVamp() {
var _local4 = 0;
while (_local4 < enemyArray_vamp.length) {
var _local2 = enemyArray_vamp[_local4];
eolBuffer(_local2._x);
_local2._x = _local2._x - 3;
_local2._y = _local2._y + (controlSkewAngleDivTen / 5);
if (pythag(_local2._x, _local2._y, Flame._x, Flame._y) < 40) {
if (_local2.health < _local2.maxHealth) {
_local2.health++;
}
}
if (pythag(_local2._x, _local2._y, Water._x, Water._y) < 40) {
if (_root.dropUpgrade == 2) {
_local2.health = _local2.health - 100;
var _local3 = 0;
while (_local3 < 10) {
newEffect("Effect_Steam", _local2.layer, _local2._x, _local2._y);
_local3++;
}
} else {
_local2.health = _local2.health - 10;
}
_local2.soundBox.play();
if (_local2.health < 0) {
_local2.health = 0;
}
_local2.sprite._alpha = _local2.sprite._alpha - 2;
newEffect("Effect_Steam", _local2.layer, _local2._x, _local2._y);
}
if (_local2.health == 0) {
newCoins(3, _local2._x, _local2._y);
deleteEnemy(_local2, enemyArray_vamp, _local4);
} else if (_local2._x < (castlePoint - 20)) {
hurtShip(10);
newEffect("Explosion", _local2.layer, _local2._x, _local2._y + 20);
deleteEnemy(_local2, enemyArray_vamp, _local4);
} else if (_local2._x < (castlePoint + 100)) {
_local2._y = _local2._y + 1;
_local2.shadow._y = _local2.shadow._y - 1;
}
_local4++;
}
}
function updateBird() {
var _local3 = 0;
while (_local3 < enemyArray_bird.length) {
var _local2 = enemyArray_bird[_local3];
eolBuffer(_local2._x);
_local2.wingR._rotation = controlWingAngle;
_local2.wingL.wingL._rotation = controlWingAngle;
_local2._x = _local2._x - _local2.speed;
if (_local2.health == 0) {
newCoins(2, _local2._x, _local2._y);
deleteEnemy(_local2, enemyArray_bird, _local3);
} else if (_local2._x < (castlePoint - 10)) {
if (_local2._y > 0) {
_local2._y = _local2._y - _local2.flyaway;
_local2.bomb._alpha = 0;
_local2.shadow._y = _local2.shadow._y + (_local2.flyaway * 1.2);
_local2.shadow._alpha = _local2.shadow._alpha / 1.05;
if (_local2.flyaway == 0) {
_root.weaponX = _local2._x;
_root.weaponY = _local2._y;
newEnemy("bomb", _local2.layer);
} else if (_local2.flyAway == 3) {
hurtShip(8);
}
_local2.flyaway = _local2.flyaway + 0.5;
_local2.speed = _local2.speed / 1.05;
} else {
deleteEnemy(_local2, enemyArray_bird, _local3);
}
} else {
_local2._y = _local2._y - controlWingAngleDivTen;
_local2.shadow._y = _local2.shadow._y + controlWingAngleDivTen;
}
_local3++;
}
}
function updateBloon() {
var _local3 = 0;
while (_local3 < enemyArray_bloon.length) {
var _local2 = enemyArray_bloon[_local3];
eolBuffer(_local2._x);
_local2._x = _local2._x - (_local2.speed / 3);
if (_local2.health == 0) {
newCoins(4, _local2._x, _local2._y);
newEffect("Enemy_BSpat", _local2.layer, _local2._x - 20, _local2._y - 20);
deleteEnemy(_local2, enemyArray_bloon, _local3);
} else if (_local2._x < castlePoint) {
if (_local2._y > 0) {
_local2._y = _local2._y - _local2.flyaway;
_local2.shadow._y = _local2.shadow._y + (_local2.flyaway * 1.2);
_local2.shadow._alpha = _local2.shadow._alpha / 1.05;
if (((_local2.flyaway == 0) || (_local2.flyaway == 4)) || (_local2.flyaway == 8)) {
_root.weaponX = _local2._x;
_root.weaponY = _local2._y;
newEnemy("bomb", _local2.layer);
}
_local2.flyaway = _local2.flyaway + 0.5;
_local2.speed = _local2.speed / 1.05;
} else {
deleteEnemy(_local2, enemyArray_bloon, _local3);
}
} else {
_local2.sprite._rotation = _local2.sprite._rotation - (controlWingAngleDivTen / 5);
}
_local2._xscale = 100;
_local2._yscale = 100;
if (_root.nailUpgrade == 2) {
pinState = pinDeath(_local2, 50);
} else {
pinState = pinDeath(_local2, 5);
}
if (pinState == true) {
newEnemy("bomb", (_local2.layer - 1) + iii);
} else if (pinState == false) {
_local2._xscale = 90;
_local2._yscale = 90;
}
_local3++;
}
}
function loadSettings_bomb(weapon) {
weapon._x = _root.weaponX;
weapon._y = _root.weaponY;
weapon._xscale = 70;
weapon._yscale = 70;
weapon.ySpeed = 0;
weapon._rotation = -20;
weapon.dropPos = 260 + (20 * weapon.layer);
}
function loadSettings_turret(weapon) {
weapon.active = false;
weapon.timer = 0;
weapon.health = 0;
weapon.maxHealth = 40;
weapon.fireTimer = 0;
weapon._x = _root.weaponX;
weapon._y = _root.weaponY;
weapon.gotoAndStop(2);
}
function updateTurret() {
var _local3 = 0;
while (_local3 < enemyArray_turret.length) {
var _local1 = enemyArray_turret[_local3];
if (_local1.active == false) {
if (_local1.health < (_local1.maxHealth - 1)) {
_local1.health = _local1.health + 0.8;
if (_local1.health > _local1.maxHealth) {
_local1.health = _local1.maxHealth;
}
} else if (_local1.health == _local1.maxHealth) {
_local1.health = 0;
}
if (_local1.timer < 20) {
_local1.timer = _local1.timer + 2;
_local1.health = _local1.health + 2;
} else {
_local1.nextFrame();
_local1.timer = 0;
}
} else {
if (_local1.fireTimer > 0) {
shakeScreen(3, 5);
_local1.barrel.play();
_local1.fireTimer--;
_local1.health = _local1.health - 1;
} else {
var _local5 = false;
if (_local1.timer == 0) {
_local3 = 0;
while (_local3 < enemyArray_GROUND.length) {
var _local4 = 0;
while (_local4 < enemyArray_GROUND[_local3].length) {
var _local2 = enemyArray_GROUND[_local3][_local4];
if (_local2.layer == _local1.layer) {
if (((_local2._x > (_local1._x + 10)) && (_local2._x < (_local1._x + 400))) && (_local2._y > (_local1._y - 20))) {
drawBullet(_local1._x + 20, (_local1._y - 10) + random(5), _local2._x, _local2._y - 15);
_local5 = true;
_local2.xSpeed = _local2.xSpeed - (5 + random(10));
_local2.ySpeed = _local2.ySpeed - (10 + random(5));
hurtEnemy(_local2, 5);
}
}
_local4++;
}
_local3++;
}
_local1.timer = 15 + random(10);
} else {
_local1.timer--;
}
if (_local5 == true) {
weapn.timer = 2;
_local1.fireTimer = 5;
}
}
if (_local1.health <= 0) {
bombBlast(_local1._x, _local1._y);
newEffect("Explosion", _local1.layer, _local1._x - 20, _local1._y + 20);
deleteEnemy(_local1, enemyArray_turret, _local3);
}
}
_local3++;
}
}
function updateBomb() {
var _local2 = 0;
while (_local2 < enemyArray_bomb.length) {
var _local1 = enemyArray_bomb[_local2];
_local1._x = _local1._x + _local1.xSpeed;
_local1._y = _local1._y + _local1.ySpeed;
_local1.ySpeed = _local1.ySpeed + 0.8;
if (_local1._y > _local1.dropPos) {
bombBlast(_local1._x, _local1._y);
newEffect("Explosion", _local1.layer, _local1._x - 20, _local1._y - 20);
deleteEnemy(_local1, enemyArray_bomb, _local2);
}
_local2++;
}
}
function bombBlast(xPos, yPos) {
var _local3 = 0;
while (_local3 < enemyArray_AIR.length) {
var _local2 = 0;
while (_local2 < enemyArray_AIR[_local3].length) {
var _local1 = enemyArray_AIR[_local3][_local2];
if (pythag(xPos, yPos, _local1._x, _local1._y) < 90) {
hurtEnemy(_local1, 50);
}
_local2++;
}
_local3++;
}
}
function enemyEffect(enemy) {
newEffect(enemy.deadAnim, enemy.layer, enemy._x, enemy._y);
}
function newEffect(type, layer, xPos, yPos) {
var _local2 = this["ELAYER_" + layer].attachMovie(type, this["ELAYER_" + layer].getNextHighestDepth(), this["ELAYER_" + layer].getNextHighestDepth());
_local2._x = xPos;
_local2._y = yPos;
}
function drawHandle() {
if (clearTimer == 3) {
clearTimer = 0;
EFFECTS.clear();
EFFECTS.lineStyle(1 + (random(10) / 10), 10857729, random(50) + 30);
} else {
clearTimer++;
}
}
function drawBullet(x1, y1, x2, y2) {
EFFECTS.moveTo(x1, y1);
EFFECTS.lineTo(x2, y2);
}
function shakeScreen(ammount, time) {
if (ammount >= shakeAmmount) {
shakeAmmount = ammount;
shakeTime = time;
}
}
function updateShake() {
_x = ((0 + random(shakeAmmount)) - (shakeAmmount / 2));
_y = ((0 + random(shakeAmmount)) - (shakeAmmount / 2));
shakeAmmount = shakeAmmount / (1 + (shakeTime / 10));
}
function catchBird(xPos, yPos) {
var _local6 = true;
var _local3 = 0;
while (_local3 < enemyArray_bird.length) {
var _local2 = enemyArray_bird[_local3];
if (_local2.health > 0) {
if (pythag(xPos, yPos, _local2._x, _local2._y - 10) < 40) {
var _local7 = WEAPONS.attachMovie("BirdCatcher", "BC" + WEAPONS.getNextHighestDepth(), WEAPONS.getNextHighestDepth());
_local7._x = xPos;
_local7._y = yPos;
if (_local2.bomb._alpha > 0) {
_root.weaponX = _local2._x;
_root.weaponY = _local2._y;
newEnemy("bomb", _local2.layer);
}
newCoins(2, _local2._x, _local2._y);
deleteEnemy(_local2, enemyArray_bird, _local3);
_local6 = false;
break;
}
}
_local3++;
}
if (_local6 == true) {
var _local7 = WEAPONS.attachMovie("BirdCatcher_fail", "BC" + WEAPONS.getNextHighestDepth(), WEAPONS.getNextHighestDepth());
_local7._x = xPos;
_local7._y = yPos;
}
}
function updatePirates() {
var _local4 = 1;
while (_local4 < 5) {
var _local3 = this["pirateMan" + _local4];
if (_local3.health < 3) {
_local3.ammoPrompt._visible = true;
} else {
_local3.ammoPrompt._visible = false;
}
if ((this["pirateMan" + _local4]._visible == true) && (this["pirateMan" + _local4].health > 0)) {
if ((_local3.active == true) && (_local3.shootTime == 0)) {
if (pirateAim(_local3, random(enemyArray_AIR.length)) == true) {
_local3.shootTime = (_root.pirateShootTime - (_root.pirateTrain / 2)) + random(20);
}
} else {
_local3.shootTime--;
}
}
_local4++;
}
}
function pirateAim(pirate, cycle) {
var _local5 = false;
var _local7 = false;
var _local3 = cycle;
while (_local3 < enemyArray_AIR.length) {
var _local4 = 0;
while (_local4 < enemyArray_AIR[_local3].length) {
var _local1 = enemyArray_AIR[_local3][_local4];
if (_local5 == false) {
if (_local1._x < 550) {
hurtEnemy(_local1, 10);
pirate.arm.play();
pirate.arm._rotation = angle(pirate._x, pirate._y, _local1._x, _local1._y) - 90;
drawBullet(pirate._x, pirate._y, _local1._x, _local1._y);
pirate.health--;
_local5 = true;
}
}
_local4++;
}
if (_local3 == enemyArray_AIR.length) {
_local3 = 0;
} else if ((_local3 == cycle) && (_local7 == false)) {
_local7 = true;
} else if (_local3 == cycle) {
break;
}
_local3++;
}
return(_local5);
}
function deleteEnemy(enemy, array, i) {
enemyCounter--;
if (enemy.nom == "turret") {
enemyCounter++;
trace("TURRET REMOVED");
}
enemy.removeMovieClip();
array.splice(i, 1);
}
function flameControl() {
Flame._alpha = random(50) + 30;
if (random(4) == 0) {
Flame._xscale = 90 + random(20);
}
if (random(4) == 0) {
Flame._yscale = 70 + random(30);
}
}
function controlWind() {
BG.clouds._x = BG.clouds._x + controlWindPower;
BG.waves._x = BG.waves._x + (controlWingAngleDivTen / 2);
if (BG.clouds._x < -800) {
BG.clouds._x = BG.clouds._x + 800;
} else if (BG.clouds._x > 0) {
BG.clouds._x = BG.clouds._x - 800;
}
}
function controlWing() {
if ((controlWingAngle < 45) && (controlWingSwitch == false)) {
controlWingAngle = controlWingAngle + 20;
} else if ((controlWingAngle > -45) && (controlWingSwitch == true)) {
controlWingAngle = controlWingAngle - 20;
} else if (controlWingSwitch == true) {
controlWingSwitch = false;
} else {
controlWingSwitch = true;
}
controlWingAngleDivTen = controlWingAngle / 15;
}
function controlSkew() {
if ((controlSkewAngle < 16) && (controlSkewSwitch == false)) {
controlSkewAngle = controlSkewAngle + 4;
} else if ((controlSkewAngle > -16) && (controlSkewSwitch == true)) {
controlSkewAngle = controlSkewAngle - 2;
} else if (controlSkewSwitch == true) {
controlSkewSwitch = false;
} else {
controlSkewSwitch = true;
}
controlSkewAngleDivTen = controlSkewAngle / 10;
}
function mouseControl() {
mouseMC.gotoAndStop(mouseState);
if (mouseState != 1) {
if (changeStateFlag < 1) {
changeStateFlag++;
} else {
mouseState = 1;
changeStateFlag = 0;
}
}
mouseMC._x = _xmouse;
mouseMC._y = _ymouse;
}
function hurtEnemy(enemy, ammount) {
if (ammount > 1) {
ammount = Math.round(ammount);
enemy.health = enemy.health - ammount;
var _local1 = EFFECTS.attachMovie("HPP", "H", EFFECTS.getNextHighestDepth());
_local1._x = enemy._x;
_local1._y = enemy._y;
_local1.textBox = ("- " + ammount) + " HP";
if (enemy.health <= 0) {
enemy.health = 0;
return(true);
}
}
}
function hurtShip(ammount) {
W_H._visible = true;
_root.healthPot = _root.healthPot + ammount;
shakeScreen(ammount * 3, 3);
shipHealth.flasher._alpha = 100;
}
function HUDBARControl() {
var _local2 = Math.round((100 / _root.maxHealth) * _root.health);
if (shipHealth.flasher._alpha > 0) {
shipHealth.flasher._alpha = shipHealth.flasher._alpha - 5;
shipHealth.flasher._width = shipHealth.bar._currentframe * 2;
if ((shipHealth.flasher._width < 40) && (shipHealth.flasher._alpha <= 0)) {
shipHealth.flasher._alpha = 40;
}
}
if (_root.healthPot > 0) {
_root.health--;
_root.healthPot--;
}
shipHealth.bar.gotoAndStop(_local2);
}
function newEffect(type, layer, xPos, yPos) {
var _local2 = this["ELAYER_" + layer].attachMovie(type, this["ELAYER_" + layer].getNextHighestDepth(), this["ELAYER_" + layer].getNextHighestDepth());
_local2._x = xPos;
_local2._y = yPos;
}
function newCoins(ammount, xPos, yPos) {
var _local2 = 0;
while (_local2 < ammount) {
var _local1 = ELAYER_4.attachMovie("Coin", "C" + ELAYER_4.getNextHighestDepth(), ELAYER_4.getNextHighestDepth());
_local1._x = xPos;
_local1._y = yPos;
_local1._xscale = _local1._xscale + random(20);
_local1._yscale = _local1._xscale;
_local1.xSpeed = random(10) - 5;
_local1.ySpeed = -(random(3) + 2);
_local1.timer = 20;
_local1.rotSpeed = random(20) - 10;
coinArray.push(_local1);
_local2++;
}
}
function updateCoins() {
if (_root.moneyPot > 0) {
_root.money = _root.money + 9;
_root.moneyPot = _root.moneyPot - 9;
} else {
_root.money = _root.money + _root.moneyPot;
_root.moneyPot = 0;
}
var _local3 = 0;
while (_local3 < coinArray.length) {
var _local2 = coinArray[_local3];
_local2.timer--;
if (_local2.timer > 0) {
_local2._x = _local2._x + _local2.xSpeed;
_local2._y = _local2._y + _local2.ySpeed;
_local2._rotation = _local2._rotation + _local2.rotSpeed;
_local2.ySpeed = _local2.ySpeed + 0.5;
} else if (_local2.timer > -12) {
_local2._x = _local2._x - ((_local2._x - Coin._x) / 7);
_local2._y = _local2._y - ((_local2._y - Coin._y) / 7);
} else {
HUDBAR.tBox.gotoAndPlay(2);
_root.moneyPot = _root.moneyPot + ((50 + _local2._xscale) - 80);
_local2.removeMovieClip();
coinArray.splice(_local3, 1);
}
_local3++;
}
}
function newDay() {
_root.roundTimer = 0;
if (_root.roundNum != "O") {
_root.roundNum++;
itemUnlock();
} else {
attachMovie("OUTRO", "OUTROE", getNextHighestDepth());
OUTROE._y = OUTROE._y - 5;
}
dayEnded = false;
gameActive = true;
controlWindPower = (random(600) - 300) / 100;
}
function dayControl() {
if (_root.roundNum == 1) {
_root.roundTimer = _root.roundTimer + 2;
} else if (_root.roundNum == 2) {
_root.roundTimer = _root.roundTimer + 1.5;
} else if (_root.roundTimer < (_root.roundTimerMax + 5)) {
_root.roundTimer++;
} else {
_root.roundTimer--;
}
var _local2 = Math.floor((200 / _root.roundTimerMax) * _root.roundTimer);
BG.ozone.gotoAndStop(_local2);
if (_root.roundTimer < _root.roundTimerMax) {
HUDBAR.clock.hand._rotation = _local2 - 100;
}
_root.eolBuffer--;
if (((_root.roundTimer > _root.roundTimerMax) && (dayEnded == false)) && (_root.eolBuffer < 0)) {
dayEnded = true;
gameActive = false;
newUpgradeScreen();
}
}
function destroyAllEnemy() {
var _local1 = 0;
while (_local1 < enemyArray_ALL.length) {
enemyArray_ALL[_local1].removeMovieClip();
_local1++;
}
setEnemyArray();
}
function newUpgradeScreen() {
attachMovie("Upgrader", "UPGRADER", getNextHighestDepth());
attachMovie("UpgradeMask", "UPGRADERMASK", getNextHighestDepth());
UPGRADERMASK._xscale = 125;
UPGRADERMASK._yscale = 125;
UPGRADERMASK._x = -400;
UPGRADERMASK._y = -150;
UPGRADER.setMask(UPGRADERMASK);
mouseMC.swapDepths(getNextHighestDepth());
}
function itemUnlock() {
if (_root.roundNum == 2) {
W_C._visible = true;
HUDBAR.W_C._alpha = 100;
} else if (_root.roundNum == 2) {
} else if (_root.roundNum == 4) {
_root.flameUpgrade = 1;
Flame._visible = true;
HUDBAR.FlameStill._alpha = 40;
} else if (_root.roundNum == 5) {
_root.dropUpgrade = 1;
Water._visible = true;
HUDBAR.Water._alpha = 40;
} else if (_root.roundNum == 6) {
} else if (_root.roundNum == 7) {
}
}
function spawnControl() {
if (_root.roundTimer > 50) {
_root.bombVis = undefined;
if (_root.roundNum == 1) {
if (random(30) == 0) {
newEnemy("blob", random(4));
}
} else if (_root.roundNum == 2) {
if (random(60) == 0) {
newEnemy("blob", random(4));
}
if (random(100) == 0) {
newEnemy("bird", random(4));
}
} else if (_root.roundNum == 3) {
if (random(100) == 0) {
newEnemy("blob", random(4));
}
if (random(150) == 0) {
newEnemy("bird", random(4));
}
if (random(200) == 0) {
newEnemy("roller", random(4));
}
} else if (_root.roundNum == 4) {
if (random(160) == 0) {
newEnemy("blob", random(4));
}
if (random(220) == 0) {
newEnemy("bird", random(4));
}
if (random(260) == 0) {
newEnemy("roller", random(4));
}
if (random(260) == 0) {
newEnemy("shmallow", random(4));
}
} else if (_root.roundNum == 5) {
if (random(200) == 0) {
newEnemy("blob", random(4));
}
if (random(250) == 0) {
newEnemy("bird", random(4));
}
if (random(270) == 0) {
newEnemy("roller", random(4));
}
if (random(270) == 0) {
newEnemy("shmallow", random(4));
}
if (random(270) == 0) {
newEnemy("vamp", random(4));
}
} else if (_root.roundNum == 6) {
if (random(250) == 0) {
newEnemy("blob", random(4));
}
if (random(250) == 0) {
newEnemy("bird", random(4));
}
if (random(250) == 0) {
newEnemy("roller", random(4));
}
if (random(250) == 0) {
newEnemy("shmallow", random(4));
}
if (random(250) == 0) {
newEnemy("vamp", random(4));
}
if (random(250) == 0) {
newEnemy("dino", random(4));
}
} else if (_root.roundNum != "O") {
if (random(260 - (_root.roundNum * 3)) == 0) {
newEnemy("blob", random(4));
}
if (random(260 - (_root.roundNum * 3)) == 0) {
newEnemy("bird", random(4));
}
if (random(260 - (_root.roundNum * 3)) == 0) {
newEnemy("roller", random(4));
}
if (random(260 - (_root.roundNum * 3)) == 0) {
newEnemy("shmallow", random(4));
}
if (random(260 - (_root.roundNum * 3)) == 0) {
newEnemy("vamp", random(4));
}
if (random(260 - (_root.roundNum * 3)) == 0) {
newEnemy("dino", random(4));
}
if (random(260 - (_root.roundNum * 3)) == 0) {
newEnemy("bloon", random(4));
}
}
}
}
function introMovie() {
if (introMC.startHud == true) {
raiseHud = true;
}
if (raiseHud == true) {
HUDBAR._y = HUDBAR._y + ((HUDBAR.yPos - HUDBAR._y) / 5);
if (shipHealth._alpha < 100) {
shipHealth._alpha = shipHealth._alpha + 10;
}
if (Math.round(HUDBAR._y) == Math.round(HUDBAR.yPos)) {
Pin._visible = true;
}
}
}
function outPutText() {
Border.pText = "Press SPACE to pause";
}
function eolBuffer(xPos) {
if (xPos < 800) {
_root.eolBuffer = 25;
}
}
stop();
_root.money = 0;
_root.moneyPot = 0;
_root.maxHealth = 100;
_root.health = 100;
_root.healthPot = 0;
_root.shipRepair = 1;
_root.turretActive = false;
_root.dropUpgrade = 0;
_root.flameUpgrade = 0;
_root.nailUpgrade = 0;
_root.pirateActive = 0;
_root.pirateTrain = 0;
_root.pirateShootTime = 100;
_root.pirateAmmo = 20;
var pirateArray = new Array();
var p = 1;
while (p < 5) {
this["pirateMan" + p].active = true;
this["pirateMan" + p]._visible = false;
this["pirateMan" + p].shootTime = 0;
this["pirateMan" + p].maxHealth = _root.pirateAmmo;
pirateArray.push(this["pirateMan" + p]);
p++;
}
Mouse.hide();
_root.roundTimerMax = 1400;
bCount = -200;
gameState = 0;
deadTimer = 80;
_root.gamePaused = false;
_root.pScreen._x = -10000;
gamePauseSwitch = false;
Border.pauseText = "Press Space to pause";
_quality = "medium";
var i = 0;
while (i < 5) {
createEmptyMovieClip("ELAYER_" + i, getNextHighestDepth());
i++;
}
createEmptyMovieClip("WEAPONS", getNextHighestDepth());
createEmptyMovieClip("EFFECTS", getNextHighestDepth());
castlePoint = 250;
_root.weaponDepth = 200;
var enemyArray_blob = new Array();
var enemyArray_shmallow = new Array();
var enemyArray_roller = new Array();
var enemyArray_dino = new Array();
var enemyArray_bird = new Array();
var enemyArray_bloon = new Array();
var enemyArray_vamp = new Array();
var enemyArray_ALL = new Array();
var enemyArray_GROUND = new Array(enemyArray_blob, enemyArray_shmallow, enemyArray_dino, enemyArray_roller);
var enemyArray_AIR = new Array(enemyArray_vamp, enemyArray_bloon, enemyArray_bird, enemyArray_blob, enemyArray_shmallow, enemyArray_dino, enemyArray_roller);
enemyCounter = 0;
var enemyArray_turret = new Array();
var enemyArray_bomb = new Array();
clearTimer = 0;
shakeAmmount = 0;
shakeTime = 0;
var controlWindPower = ((random(600) - 300) / 100);
var controlWingAngle = 0;
var controlWingAngleDivTen = 0;
var controlWingSwitch = false;
MovieClip.prototype.skew = function (_xskew, _yskew, base_xscale, base_yscale) {
this._xskew = _xskew;
this._yskew = _yskew;
if (arguments.length == 2) {
base_xscale = 100;
base_yscale = 100;
}
if (!this.inner_mc) {
for (var _local3 in this) {
if (typeof(this[_local3]) == "movieclip") {
this.inner_mc = this[_local3];
break;
}
}
if (!this.inner_mc) {
trace(("No interior clip for skewing found in " + this._name) + ".");
return(undefined);
}
this.inner_mc._rotation = -45;
}
var _local5 = (Math.PI/180);
var _local8 = _xskew * _local5;
var _local7 = _yskew * _local5;
var _local6 = Math.cos(_local8);
var _local9 = Math.cos(_local7);
this._rotation = 45 + ((_xskew + _yskew) / 2);
var _local4 = Math.sin(this._rotation * _local5) * 0.707106781186547;
if (!_local4) {
_local4 = 1E-7;
}
this._xscale = (100 * (Math.sin(_local7) + _local6)) / _local4;
this._yscale = (100 * (Math.sin(_local8) + _local9)) / _local4;
this.inner_mc._xscale = (base_xscale * 0.5) / _local9;
this.inner_mc._yscale = (base_yscale * 0.5) / _local6;
};
var controlSkewAngle = 0;
var controlSkewSwitch = false;
var controlSkewAngleDivTen = 0;
var mouseState = 1;
var mouseHold = 0;
changeStateFlag = 0;
mouseMC.stop();
hurtShip(0);
var coinArray = new Array();
_root.enemyTimer_flyBuffer = 30;
_root.enemyTimer_groundBuffer = 30;
_root.roundNum = 0;
newDay();
SHIP._visible = false;
outTextCount = 0;
_root.outTextBuffer = 0;
Instance of Symbol 419 MovieClip "AIM" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
armed = false;
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = Math.round(_root._ymouse / 20) * 20;
if (_x < 265) {
_x = 265;
_visible = false;
}
if (_y > 320) {
_y = 320;
} else if (_y < 260) {
_y = 260;
}
if ((_root._ymouse > 330) || (_root._ymouse < 200)) {
_visible = false;
this._y = -200;
armed = false;
} else {
armed = true;
if (_root._xmouse >= 265) {
_visible = true;
}
}
}
Instance of Symbol 448 MovieClip "HUDBAR" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
var yPos = _y;
_y = (_y + 1000);
}
Instance of Symbol 121 MovieClip [Coin] "Coin" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
}
onClipEvent (enterFrame) {
if (_xscale > 120) {
_xscale = (_xscale / 1.1);
_yscale = _xscale;
} else {
_xscale = 120;
_yscale = 120;
}
}
Instance of Symbol 272 MovieClip [Enemy_Turret] "W_T" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
_parent.ELAYER_4.swapDepths(_parent.getNextHighestDepth());
_parent.Border.swapDepths(_parent.getNextHighestDepth());
active = false;
armed = false;
speed = 0;
xPos = _x;
yPos = _y;
_alpha = 0;
hBar._visible = false;
}
on (press) {
if ((_alpha == 100) && (_root.money > 800)) {
_parent.AIM.gotoAndStop("turret");
active = true;
}
}
onClipEvent (mouseUp) {
_parent.AIM.gotoAndStop(1);
if (((active == true) && (_parent.AIM._y >= 260)) && (_parent.AIM._y < 350)) {
_root.weaponX = _parent.AIM._x;
_root.weaponY = _parent.AIM._y - 12;
var weaponDepth = ((_parent.AIM._y - 260) / 20);
_root.money = _root.money - 800;
_parent.newEnemy("turret", weaponDepth);
}
_x = xPos;
_y = yPos;
active = false;
_visible = true;
}
onClipEvent (enterFrame) {
if (active == true) {
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
_x = (_x + ((_root._xmouse - _x) / 2));
_y = (_y + ((_root._ymouse - _y) / 2));
if (_parent.AIM._visible == true) {
_visible = false;
} else {
_visible = true;
}
}
}
on (rollOver, dragOver) {
if (_alpha == 100) {
_parent.Border.outText = "TURRET: Drag onto the grass and it will attack ground based units. Cost: $800";
_root.outTextBuffer++;
}
}
on (rollOut, dragOut) {
if (_alpha == 100) {
_parent.Border.outText = "";
}
}
Instance of Symbol 20 MovieClip [enemy_Bomb] "W_B" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
active = false;
armed = false;
speed = 0;
xPos = _x;
yPos = _y;
_alpha = 0;
gotoAndStop (2);
}
on (press) {
if ((_alpha == 100) && (_root.money > 20)) {
_parent.AIM.gotoAndStop("bomb");
active = true;
}
}
onClipEvent (mouseUp) {
_parent.AIM.gotoAndStop(1);
var weaponDepth = ((_parent.AIM._y - 260) / 20);
if (((weaponDepth > -1) && (weaponDepth < 4)) && (active == true)) {
armed = true;
_root.weaponX = _parent.AIM._x;
_root.weaponY = -50;
var bomb = _parent.newEnemy("bomb", weaponDepth);
_parent.SHIP.cannon.play();
_root.money = _root.money - 20;
_parent.newEffect("BombPlace", weaponDepth, _parent.AIM._x, _parent.AIM._y);
bomb._rotation = -90;
bomb.gotoAndStop(2);
bomb._rotation = random(360);
}
_x = xPos;
_y = yPos;
active = false;
armed = false;
_visible = true;
}
onClipEvent (enterFrame) {
if ((active == false) && (armed == false)) {
_x = (_x + ((xPos - _x) / 5));
_y = (_y + ((yPos - _y) / 5));
} else if ((active == true) && (armed == false)) {
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
_x = (_x + ((_root._xmouse - _x) / 2));
_y = (_y + ((_root._ymouse - _y) / 2));
if (_parent.AIM._y > 300) {
_parent.AIM.flapS._visible = false;
} else {
_parent.AIM.flapS._visible = true;
}
if (_parent.AIM._y < 280) {
_parent.AIM.flapN._visible = false;
} else {
_parent.AIM.flapN._visible = true;
}
if (_parent.AIM._visible == true) {
_visible = false;
} else {
_visible = true;
}
}
}
on (rollOver, dragOver) {
if (_alpha == 100) {
_parent.Border.outText = "Artillary: Death from above! Drag bomb to field to aim. Cost: $20.";
_root.outTextBuffer++;
}
}
on (rollOut, dragOut) {
if (_alpha == 100) {
_parent.Border.outText = "";
}
}
Instance of Symbol 29 MovieClip "W_C" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
active = false;
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
xPos = _x;
yPos = _y;
_visible = false;
}
on (press) {
active = true;
}
onClipEvent (mouseUp) {
if ((_y < 320) && (active == true)) {
_parent.catchBird(_x, _y);
}
_x = xPos;
_y = yPos;
active = false;
}
onClipEvent (enterFrame) {
if (_visible == true) {
if (active == true) {
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
_x = (_x + ((_parent._xmouse - _x) / 2));
_y = (_y + ((_parent._ymouse - _y) / 2));
}
}
}
on (rollOver, dragOver) {
if (_visible == true) {
_parent.Border.outText = "BIRDCAGE: Drag over a bird and release the mouse button to cage those demons!";
_root.outTextBuffer++;
}
}
on (rollOut, dragOut) {
if (_visible == true) {
_parent.Border.outText = "";
}
}
Instance of Symbol 410 MovieClip "Pin" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
active = false;
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
killActive = false;
xPos = _x;
yPos = _y;
xOld = _x;
yOld = _y;
_visible = false;
}
on (press) {
active = true;
}
onClipEvent (mouseUp) {
active = false;
}
onClipEvent (enterFrame) {
if (_visible == true) {
if (active == true) {
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
xOld = _x;
yOld = _y;
_x = (_x + (((_root._xmouse - 20) - _x) / 1.2));
_y = (_y + (((_root._ymouse + 20) - _y) / 1.2));
var angleTemp = _parent.angle(_x, _y, xOld, yOld);
if ((angleTemp < 90) && (angleTemp > 0)) {
killActive = true;
} else {
killActive = false;
}
} else {
_x = (_x + ((xPos - _x) / 1.5));
_y = (_y + ((yPos - _y) / 1.5));
}
}
}
on (rollOver, dragOver) {
if (_visible == true) {
_parent.Border.outText = "Nail: The working man's crowbar. Use this to pop nasty blobs of goo and airships.";
_root.outTextBuffer++;
}
}
on (rollOut, dragOut) {
if (_visible == true) {
_parent.Border.outText = "";
}
}
Instance of Symbol 440 MovieClip "Water" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
active = false;
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
_visible = false;
xPos = _x;
yPos = _y;
}
on (press) {
if (_visible == true) {
active = true;
}
}
onClipEvent (mouseUp) {
active = false;
}
onClipEvent (enterFrame) {
if (active == true) {
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
_x = (_x + ((_root._xmouse - _x) / 1.2));
_y = (_y + ((_root._ymouse - _y) / 1.2));
} else {
_x = (_x + ((xPos - _x) / 1.5));
_y = (_y + ((yPos - _y) / 1.5));
}
}
on (rollOver, dragOver) {
if (_visible == true) {
_parent.Border.outText = "DROPLET: Use to cool and destroy flaming enemies.";
_root.outTextBuffer++;
}
}
on (rollOut, dragOut) {
if (_visible == true) {
_parent.Border.outText = "";
}
}
Instance of Symbol 212 MovieClip "Flame" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
active = false;
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
xPos = _x;
yPos = _y;
_visible = false;
}
on (press) {
active = true;
}
onClipEvent (mouseUp) {
active = false;
}
onClipEvent (enterFrame) {
if (_visible == true) {
if (active == true) {
_parent.HUDBAR.FlameStill._visible = true;
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
_x = (_x + ((_root._xmouse - _x) / 1.2));
_y = (_y + ((_root._ymouse - _y) / 1.2));
} else {
_parent.HUDBAR.FlameStill._visible = false;
_x = (_x + ((xPos - _x) / 1.5));
_y = (_y + ((yPos - _y) / 1.5));
}
}
}
on (rollOver, dragOver) {
if (_visible == true) {
_parent.Border.outText = "FLAME: Drag over Shmallowmen to roast them! Ah, brings back memories of summer camp.";
_root.outTextBuffer++;
}
}
on (rollOut, dragOut) {
if (_visible == true) {
_parent.Border.outText = "";
}
}
Instance of Symbol 452 MovieClip "W_A" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
active = false;
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
_visible = false;
xPos = _x;
yPos = _y;
}
on (press) {
if ((_visible == true) && (_root.money >= 600)) {
active = true;
}
}
onClipEvent (mouseUp) {
if (active == true) {
if (_parent.pythag(_x, _y, _parent.pirateMan3._x, _parent.pirateMan3._y) < 85) {
_root.money = _root.money - 600;
_x = xPos;
_y = yPos;
play();
_parent.pirateMan1.health = _root.pirateAmmo;
_parent.pirateMan2.health = _root.pirateAmmo;
_parent.pirateMan3.health = _root.pirateAmmo;
_parent.pirateMan4.health = _root.pirateAmmo;
}
active = false;
}
}
onClipEvent (enterFrame) {
if (active == true) {
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
_x = (_x + ((_root._xmouse - _x) / 1.2));
_y = (_y + ((_root._ymouse - _y) / 1.2));
} else {
_x = (_x + ((xPos - _x) / 1.5));
_y = (_y + ((yPos - _y) / 1.5));
}
}
on (rollOut, dragOut) {
if (_visible == true) {
_parent.Border.outText = "AMMO: Drag onto your Pirate Snipers to refill their ammunition. COST: $600";
_root.outTextBuffer++;
}
}
on (rollOver, dragOver) {
if (_visible == true) {
_parent.Border.outText = "";
}
}
Instance of Symbol 455 MovieClip "W_H" in Symbol 457 MovieClip Frame 1
onClipEvent (load) {
active = false;
this.swapDepths(_parent.getNextHighestDepth() + _root.weaponDepth);
_visible = false;
xPos = _x;
yPos = _y;
}
on (press) {
if ((_visible == true) && (_root.money >= 500)) {
active = true;
}
}
onClipEvent (mouseUp) {
if (active == true) {
if (_parent.pythag(_x, _y, _parent.SHIP._x + 10, _parent.SHIP._y - 10) < 85) {
_root.money = _root.money - 500;
_x = xPos;
_y = yPos;
play();
_root.health = _root.health + Math.round(_root.maxHealth / 4);
if (_root.health > _root.maxHealth) {
_root.health = _root.maxHealth;
}
}
active = false;
}
}
onClipEvent (enterFrame) {
if (active == true) {
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
_x = (_x + ((_root._xmouse - _x) / 1.2));
_y = (_y + ((_root._ymouse - _y) / 1.2));
} else {
_x = (_x + ((xPos - _x) / 1.5));
_y = (_y + ((yPos - _y) / 1.5));
}
}
on (rollOver, dragOver) {
if (_visible == true) {
_parent.Border.outText = "HEALTH: Drag onto the ship to regain %25 health. COST: $500";
_root.outTextBuffer++;
}
}
on (rollOut, dragOut) {
if (_visible == true) {
_parent.Border.outText = "";
}
}
Symbol 460 MovieClip Frame 1
stop();
Symbol 463 Button
on (release) {
Mouse.hide();
_root.gamePaused = false;
}
Symbol 465 Button
on (release) {
if (qual == "High") {
qual = "Low";
_quality = "low";
} else {
qual = "High";
_quality = "medium";
}
}
Symbol 469 Button
on (release) {
if (_root.mus == undefined) {
_root.mus = false;
mus = "Off";
stopAllSounds();
} else {
_root.mus = undefined;
mus = "On";
_root.MUSIC.play();
}
}
Symbol 472 Button
on (release) {
nextFrame();
}
Symbol 475 Button
on (release) {
prevFrame();
}
Symbol 478 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("TITLE");
}
Symbol 480 MovieClip Frame 1
stop();
Symbol 481 MovieClip Frame 1
qual = "High";
if (_root.mus == undefined) {
mus = "On";
} else {
mus = "Off";
}
Instance of Symbol 462 MovieClip in Symbol 481 MovieClip Frame 1
on (release) {
}
Symbol 489 MovieClip Frame 1
textBox = _root.currentText;
Symbol 489 MovieClip Frame 85
stop();
Symbol 493 MovieClip Frame 1
textBox = _root.currentText;
Symbol 493 MovieClip Frame 85
stop();
Symbol 497 MovieClip Frame 1
textBox = _root.currentText;
textBox2 = _root.currentText2;
stop();
Instance of Symbol 482 MovieClip in Symbol 498 MovieClip Frame 1
onClipEvent (load) {
moveSwitch = false;
movePos = _x;
}
onClipEvent (enterFrame) {
if (moveSwitch == false) {
if (_x > (movePos - 500)) {
_x = (_x - 10);
} else {
moveSwitch = true;
}
} else if (_x < movePos) {
_x = (_x + 10);
} else {
moveSwitch = false;
}
}
Symbol 498 MovieClip Frame 36
_root.currentText = "MADE BY";
Symbol 498 MovieClip Frame 80
_root.currentText = "ARMOR GAMES";
Symbol 498 MovieClip Frame 121
_root.currentText = "ANTONY LAVELLE";
Symbol 498 MovieClip Frame 161
_root.currentText = "CHRIS IGNATOV";
Symbol 498 MovieClip Frame 333
_root.currentText2 = "ART INSPIRED BY";
_root.currentText = "";
Symbol 498 MovieClip Frame 378
_root.currentText = "DAN PALADIN";
Symbol 498 MovieClip Frame 491
_root.currentText = " ";
Symbol 498 MovieClip Frame 502
_root.currentText2 = "Special Thanks to";
_root.currentText = "";
Symbol 498 MovieClip Frame 555
_root.currentText2 = "Dan McNeely";
_root.currentText = " ";
Symbol 498 MovieClip Frame 608
_root.currentText2 = "Ido Tal";
_root.currentText = "";
Symbol 498 MovieClip Frame 659
_root.currentText2 = "John Cooney";
_root.currentText = "";
Symbol 498 MovieClip Frame 730
stop();
_root.currentText = "";
_root.currentText2 = "";
_root.sharkBubble = false;
Symbol 498 MovieClip Frame 747
shipH.gotoAndStop(11);
Symbol 498 MovieClip Frame 779
_root.sharkBubble = true;
Symbol 498 MovieClip Frame 822
stopAllSounds();
_root.gotoAndStop("GAME");
Symbol 503 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("TITLE");
}
Symbol 504 Button
on (release) {
_parent.EM.play();
_parent.nextFrame();
}
Symbol 507 MovieClip Frame 1
if ((_root.savefile.data.bestScore == undefined) || (_root.score > _root.savefile.data.bestScore)) {
_root.savefile.data.bestScore = _root.score;
}
_root.savefile.flush();
Instance of Symbol 111 MovieClip "SHIPh" in Symbol 508 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (11);
waveSwitch = false;
ySpeed = 0;
xSpeed = 4;
Mouse.show();
}
onClipEvent (enterFrame) {
_x = (_x - xSpeed);
if (_x < 390) {
xSpeed = xSpeed / 1.1;
}
if (waveSwitch == false) {
if (ySpeed < 2) {
ySpeed = ySpeed + 0.2;
} else {
waveSwitch = true;
}
} else if (ySpeed > -2) {
ySpeed = ySpeed - 0.2;
} else {
waveSwitch = false;
}
_y = (_y + (ySpeed / 2));
}
Instance of Symbol 482 MovieClip in Symbol 508 MovieClip Frame 1
onClipEvent (load) {
moveSwitch = false;
movePos = _x;
}
onClipEvent (enterFrame) {
if (moveSwitch == false) {
if (_x > (movePos - 90)) {
_x = (_x - 5);
} else {
moveSwitch = true;
}
} else if (_x < movePos) {
_x = (_x + 5);
} else {
moveSwitch = false;
}
}
Symbol 508 MovieClip Frame 146
SHIPh.gotoAndStop(11);
Symbol 508 MovieClip Frame 1040
stop();
Symbol 510 Button
on (release) {
_root.gotoAndStop("TITLE");
}