Frame 2
var MainMusic = new Sound(MainMenuInstance_mc);
MainMusic.attachSound("Theme.mp3");
MainMusic.start(0, 0);
MainMusic.onSoundComplete = function () {
this.start(0, 0);
};
var SFXVolume = 100;
stop();
Instance of Symbol 194 MovieClip in Frame 2
onClipEvent (load) {
var ParticleArray = new Array();
var num = 0;
while (num < 100) {
ParticleArray[num] = createEmptyMovieClip("Particle" + num, num);
var color = 16777215;
ParticleArray[num].lineStyle(2, color, 100);
ParticleArray[num].moveTo(0, 0);
ParticleArray[num].lineTo(0, 1);
ParticleArray[num]._x = random(800);
ParticleArray[num]._y = random(300);
ParticleArray[num].xspeed = particleXspeed;
ParticleArray[num].yspeed = particleYspeed;
ParticleArray[num]._xscale = (ParticleArray[num]._yscale = random(100));
ParticleArray[num].scaleFactor = ParticleArray[num]._yscale / 100;
ParticleArray[num]._alpha = 100 - (ParticleArray[num]._y / 3);
ParticleArray[num].onEnterFrame = function () {
this._x = this._x + 0.2;
if (this._x > 800) {
this._x = 0;
}
if (this._x < 0) {
this._x = 800;
}
};
num++;
}
}
Frame 3
stop();
Frame 4
stop();
Instance of Symbol 231 MovieClip in Frame 4
onClipEvent (load) {
this.SliderKnob._x = _root.SFXVolume - 50;
}
onClipEvent (enterFrame) {
var percent = (this.SliderKnob._x + 50);
_root.SFXVolume = percent;
}
Instance of Symbol 231 MovieClip in Frame 4
onClipEvent (load) {
this.SliderKnob._x = _root.MainMusic.getVolume() - 50;
}
onClipEvent (enterFrame) {
var percent = (this.SliderKnob._x + 50);
_root.MainMusic.setVolume(percent);
}
Instance of Symbol 231 MovieClip in Frame 4
onClipEvent (load) {
if (_quality == "LOW") {
this.SliderKnob._x = -50;
}
if (_quality == "MEDIUM") {
this.SliderKnob._x = 0;
}
if (_quality == "HIGH") {
this.SliderKnob._x = 50;
}
}
onClipEvent (enterFrame) {
var percent = (this.SliderKnob._x + 50);
if (percent >= 0) {
_quality = "LOW";
}
if (percent >= 33) {
_quality = "MEDIUM";
}
if (percent >= 66) {
_quality = "HIGH";
}
}
Frame 5
var Paused = false;
_root.PlayerHealthBar.gotoAndStop(100);
InfantryKilled = 0;
AircraftKilled = 0;
ArmorKilled = 0;
TotalCash = 0;
function CreatePlayerBullet(shape, xpos, ypos, speed, damage, angle, hitsize, DestroyEffect) {
var _local6 = PlayerBulletArray.length;
PlayerBulletArray[_local6] = _root.attachMovie(shape, "PlayerBullet" + _local6, _root.getNextHighestDepth());
PlayerBulletArray[_local6]._x = xpos;
PlayerBulletArray[_local6]._y = ypos;
PlayerBulletArray[_local6]._rotation = angle;
PlayerBulletArray[_local6].speed = speed;
PlayerBulletArray[_local6].damage = damage;
PlayerBulletArray[_local6].explosionSize = hitsize;
PlayerBulletArray[_local6].ID = _local6;
PlayerBulletArray[_local6].ParticleTrail = ParticleTrail;
PlayerBulletArray[_local6].onEnterFrame = function () {
this._x = this._x + (Math.sin(this._rotation * (Math.PI/180)) * this.speed);
this._y = this._y - (Math.cos(this._rotation * (Math.PI/180)) * this.speed);
if (((this._x >= 1000) or (this._y >= 360)) or (this._y < -100)) {
CreateExplosion(DestroyEffect, this._x, this._y, this._rotation, this.explosionSize, this.explosionSize);
var _local5 = this.ID;
var _local3 = _local5;
while (_local3 < _root.PlayerBulletArray.length) {
PlayerBulletArray[_local3].ID = PlayerBulletArray[_local3].ID - 1;
_local3++;
}
_root.PlayerBulletArray.splice(_local5, 1);
this.removeMovieClip();
}
var _local4 = 0;
while (_local4 < _root.EnemyArray.length) {
if (this.hitTest(_root.EnemyArray[_local4])) {
_root.EnemyArray[_local4].Health = _root.EnemyArray[_local4].Health - this.damage;
CreateExplosion(DestroyEffect, this._x, this._y, this._rotation, this.explosionSize, this.explosionSize);
var _local5 = this.ID;
var _local3 = _local5;
while (_local3 < _root.PlayerBulletArray.length) {
PlayerBulletArray[_local3].ID = PlayerBulletArray[_local3].ID - 1;
_local3++;
}
_root.PlayerBulletArray.splice(_local5, 1);
this.removeMovieClip();
}
_local4++;
}
};
}
var PlayerBulletArray = new Array();
function CreateEnemyBullet(shape, xpos, ypos, speed, angle, hitsize, DestroyEffect) {
var _local4 = EnemyBulletArray.length;
EnemyBulletArray[_local4] = _root.attachMovie(shape, "EnemyBullet" + _local4, _root.getNextHighestDepth());
EnemyBulletArray[_local4]._x = xpos;
EnemyBulletArray[_local4]._y = ypos;
EnemyBulletArray[_local4]._rotation = angle;
EnemyBulletArray[_local4].speed = speed;
EnemyBulletArray[_local4].explosionSize = hitsize;
EnemyBulletArray[_local4].ID = _local4;
EnemyBulletArray[_local4].ParticleTrail = ParticleTrail;
EnemyBulletArray[_local4].onEnterFrame = function () {
this._x = this._x + (Math.sin(this._rotation * (Math.PI/180)) * this.speed);
this._y = this._y - (Math.cos(this._rotation * (Math.PI/180)) * this.speed);
if (this._x <= 45) {
CreateExplosion(DestroyEffect, 45, this._y, this._rotation, this.explosionSize, this.explosionSize);
var _local4 = this.ID;
var _local3 = _local4;
while (_local3 < _root.EnemyBulletArray.length) {
EnemyBulletArray[_local3].ID = EnemyBulletArray[_local3].ID - 1;
_local3++;
}
_root.EnemyBulletArray.splice(_local4, 1);
this.removeMovieClip();
}
};
}
var EnemyBulletArray = new Array();
function CreateParticle(shape, xpos, ypos, size, rotationSpeed, xspeed, yspeed, bounce, gravity) {
var _local4 = ParticleArray.length;
ParticleArray[_local4] = _root.attachMovie(shape, "Particle" + _local4, _root.getNextHighestDepth());
ParticleArray[_local4]._x = xpos;
ParticleArray[_local4]._y = ypos;
ParticleArray[_local4]._yscale = (ParticleArray[_local4]._xscale = size);
ParticleArray[_local4].ID = _local4;
ParticleArray[_local4].xspeed = xspeed;
ParticleArray[_local4].yspeed = yspeed;
ParticleArray[_local4].rotationSpeed = rotationSpeed;
ParticleArray[_local4].bounce = bounce;
ParticleArray[_local4].gravity = gravity;
ParticleArray[_local4].onEnterFrame = function () {
if (_root.Paused == false) {
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
this._rotation = this._rotation + this.rotationSpeed;
if (this._y > 370) {
this._y = 370;
this.yspeed = this.yspeed * (-this.bounce);
this.xspeed = this.xspeed * 0.5;
this.rotationSpeed = this.rotationSpeed * 0.2;
}
this.yspeed = this.yspeed + this.gravity;
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
var _local4 = this.ID;
var _local3 = _local4;
while (_local3 < _root.ParticleArray.length) {
ParticleArray[_local3].ID = ParticleArray[_local3].ID - 1;
_local3++;
}
_root.ParticleArray.splice(_local4, 1);
this.removeMovieClip();
}
}
};
}
var ParticleArray = new Array();
var ExplosionArray = new Array();
function CreateExplosion(ExplosionShape, xpos, ypos, startrotation, xsize, ysize) {
var _local4 = ExplosionArray.length;
ExplosionArray[_local4] = _root.attachMovie(ExplosionShape, "Explosion" + _local4, _root.getNextHighestDepth());
ExplosionArray[_local4]._x = xpos;
ExplosionArray[_local4]._y = ypos;
ExplosionArray[_local4]._rotation = startrotation;
ExplosionArray[_local4]._xscale = xsize;
ExplosionArray[_local4]._yscale = ysize;
ExplosionArray[_local4].ID = _local4;
ExplosionArray[_local4].onEnterFrame = function () {
this._alpha = this._alpha - 6.66666666666667;
if (this._alpha <= 0) {
var _local4 = this.ID;
var _local3 = _local4;
while (_local3 < _root.ExplosionArray.length) {
ExplosionArray[_local3].ID = ExplosionArray[_local3].ID - 1;
_local3++;
}
_root.ExplosionArray.splice(_local4, 1);
this.removeMovieClip();
}
};
}
var ExplosionArray = new Array();
function CreateMech() {
var _local6 = EnemyArray.length;
EnemyArray[_local6] = _root.attachMovie("Mech", "Mech" + _local6, _root.getNextHighestDepth());
EnemyArray[_local6]._x = 900;
EnemyArray[_local6]._y = 375;
EnemyArray[_local6].range = random(150) + 400;
EnemyArray[_local6].animation = "Walk";
EnemyArray[_local6].Health = 200;
EnemyArray[_local6].ID = _local6;
EnemyArray[_local6].onEnterFrame = function () {
if (_root.Paused == false) {
if (this._x <= this.range) {
this.animation = "Shoot";
} else {
this._x = this._x - 1;
}
var _local3 = 0;
while (_local3 < _root.PlayerCannon.BulletArray.length) {
if (_root.PlayerCannon.BulletArray[_local3].hitTest(this) and (_root.PlayerCannon.BulletArray[_local3]._currentframe < 4)) {
this.Health = this.Health - _root.PlayerCannon.BulletArray[_local3].Damage;
_root.PlayerCannon.BulletArray[_local3].Explode();
}
_local3++;
}
if (this.Health <= 0) {
var _local5 = 0;
while (_local5 < 20) {
_root.CreateParticle("ChunkParticle", (this._x + random(50)) - 25, (this._y + random(50)) - 25, random(50), random(20) - 10, random(20) - 10, -random(20), 0.5, 1);
_local5++;
}
_root.CreateParticle("MechHead", this._x, this._y, 100, random(20) - 10, random(20) - 10, (-random(10)) - 10, 0.5, 1);
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash + 5000;
_root.TotalCash = _root.TotalCash + 5000;
var _local6 = this.ID;
var _local4 = _local6;
while (_local4 < _root.EnemyArray.length) {
EnemyArray[_local4].ID = EnemyArray[_local4].ID - 1;
_local4++;
}
_root.EnemyArray.splice(_local6, 1);
this.removeMovieClip();
_root.ArmorKilled++;
}
if (_root._currentframe == 6) {
this.removeMovieClip();
}
this.gotoAndStop(this.animation);
} else {
this.gotoAndStop("Walk");
}
};
}
var EnemyArray = new Array();
function CreateTank() {
var _local6 = EnemyArray.length;
EnemyArray[_local6] = _root.attachMovie("Tank", "Tank" + _local6, _root.getNextHighestDepth());
EnemyArray[_local6]._x = 900;
EnemyArray[_local6]._y = 375;
EnemyArray[_local6].range = random(150) + 300;
EnemyArray[_local6].animation = "Move";
EnemyArray[_local6].Health = 100;
EnemyArray[_local6].ID = _local6;
EnemyArray[_local6].onEnterFrame = function () {
if (_root.Paused == false) {
if (this._x <= this.range) {
this.animation = "Shoot";
} else {
this._x = this._x - 0.5;
}
var _local3 = 0;
while (_local3 < _root.PlayerCannon.BulletArray.length) {
if (_root.PlayerCannon.BulletArray[_local3].hitTest(this) and (_root.PlayerCannon.BulletArray[_local3]._currentframe < 4)) {
this.Health = this.Health - _root.PlayerCannon.BulletArray[_local3].Damage;
_root.PlayerCannon.BulletArray[_local3].Explode();
}
_local3++;
}
if (this.Health <= 0) {
var _local5 = 0;
while (_local5 < 20) {
_root.CreateParticle("ChunkParticle", (this._x + random(50)) - 25, (this._y + random(50)) - 25, random(50), random(20) - 10, random(20) - 10, -random(20), 0.5, 1);
_local5++;
}
_root.CreateParticle("TankTurret", this._x, this._y, 100, random(20) - 10, random(20) - 10, (-random(10)) - 10, 0.5, 1);
_root.CreateParticle("TankBase", this._x, this._y, 100, 0, 0, 0, 0, 0);
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash + 1000;
_root.TotalCash = _root.TotalCash + 1000;
var _local6 = this.ID;
var _local4 = _local6;
while (_local4 < _root.EnemyArray.length) {
EnemyArray[_local4].ID = EnemyArray[_local4].ID - 1;
_local4++;
}
_root.EnemyArray.splice(_local6, 1);
this.removeMovieClip();
_root.ArmorKilled++;
}
if (_root._currentframe == 6) {
this.removeMovieClip();
}
this.gotoAndStop(this.animation);
} else {
this.gotoAndStop("Move");
}
};
}
var EnemyArray = new Array();
function CreateTransportHelicopter() {
var _local7 = EnemyArray.length;
EnemyArray[_local7] = _root.attachMovie("TransportHelicopter", "TransportHelicopter" + _local7, _root.getNextHighestDepth());
EnemyArray[_local7]._x = 900;
EnemyArray[_local7]._y = random(50) + 100;
EnemyArray[_local7].ID = _local7;
EnemyArray[_local7].Health = 40;
EnemyArray[_local7].TroopCount = 5;
EnemyArray[_local7].SoldiersSpawned = 0;
EnemyArray[_local7].xspeed = -5;
EnemyArray[_local7].yspeed = 0;
EnemyArray[_local7].Landing = true;
EnemyArray[_local7].onEnterFrame = function () {
if (_root._currentframe == 6) {
this.removeMovieClip();
}
if (_root.Paused == false) {
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
var _local3 = 0;
while (_local3 < _root.PlayerCannon.BulletArray.length) {
if (_root.PlayerCannon.BulletArray[_local3].hitTest(this) and (_root.PlayerCannon.BulletArray[_local3]._currentframe < 4)) {
this.Health = this.Health - _root.PlayerCannon.BulletArray[_local3].Damage;
_root.PlayerCannon.BulletArray[_local3].Explode();
}
_local3++;
}
if (this.Landing == true) {
this.yspeed = this.yspeed + 0.05;
this.xspeed = this.xspeed + 0.02;
}
if (this.Landing == false) {
this.yspeed = this.yspeed - 0.1;
this.xspeed = this.xspeed - 0.05;
}
if (this._y > 360) {
this._y = 360;
this.yspeed = 0;
this.xspeed = 0;
if (this.SpawnTicks >= 15) {
_root.CreateSoldier(this._x);
this.SpawnTicks = 0;
this.SoldiersSpawned++;
} else {
this.SpawnTicks++;
}
if (this.SoldiersSpawned >= this.TroopCount) {
this.Landing = false;
}
}
if (this.Health <= 0) {
var _local6 = 0;
while (_local6 < 20) {
_root.CreateParticle("ChunkParticle", (this._x + random(50)) - 25, (this._y + random(50)) - 25, random(50), random(20) - 10, random(20) - 10, -random(20), 0.5, 1);
_local6++;
}
_root.CreateParticle("TransportHelicopterTail", this._x + 50, this._y, 100, random(20) - 10, random(10), -random(10), 0.5, 1);
_root.CreateParticle("TransportHelicopterBody", this._x - 25, this._y, 100, random(20) - 10, -random(3), -random(10), 0.5, 1);
_root.CreateParticle("TransportHelicopterNose", this._x - 50, this._y, 100, random(20) - 10, -random(10), -random(10), 0.5, 1);
_root.CreateParticle("HelicopterBlade", this._x + 10, this._y + 10, 100, random(20) - 10, random(20) - 10, -20, 0.5, 1);
_root.CreateParticle("HelicopterBlade", this._x - 10, this._y + 10, 100, random(20) - 10, random(20) - 10, -20, 0.5, 1);
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash + 500;
_root.TotalCash = _root.TotalCash + 500;
var _local7 = this.ID;
var _local5 = _local7;
while (_local5 < _root.EnemyArray.length) {
EnemyArray[_local5].ID = EnemyArray[_local5].ID - 1;
_local5++;
}
_root.EnemyArray.splice(_local7, 1);
this.removeMovieClip();
_root.AircraftKilled++;
}
if (this._x < -100) {
var _local4 = 0;
while (_local4 < _root.EnemyArray.length) {
if (_root.EnemyArray[_local4] == this) {
_root.EnemyArray.splice(_local4, 1);
}
_local4++;
}
this.removeMovieClip();
}
}
};
}
var EnemyArray = new Array();
function CreateHelicopter() {
var _local6 = EnemyArray.length;
EnemyArray[_local6] = _root.attachMovie("Helicopter", "Helicopter" + _local6, _root.getNextHighestDepth());
EnemyArray[_local6]._x = 900;
EnemyArray[_local6]._y = random(50) + 100;
EnemyArray[_local6].ID = _local6;
EnemyArray[_local6].range = random(100) + 200;
EnemyArray[_local6].animation = "Fly";
EnemyArray[_local6].Health = 20;
EnemyArray[_local6].onEnterFrame = function () {
if (_root.Paused == false) {
if (this._x <= this.range) {
this.animation = "Shoot";
} else {
this._x = this._x - 5;
}
var _local3 = 0;
while (_local3 < _root.PlayerCannon.BulletArray.length) {
if (_root.PlayerCannon.BulletArray[_local3].hitTest(this) and (_root.PlayerCannon.BulletArray[_local3]._currentframe < 4)) {
this.Health = this.Health - _root.PlayerCannon.BulletArray[_local3].Damage;
_root.PlayerCannon.BulletArray[_local3].Explode();
}
_local3++;
}
if (this.Health <= 0) {
var _local5 = 0;
while (_local5 < 20) {
_root.CreateParticle("ChunkParticle", (this._x + random(50)) - 25, (this._y + random(50)) - 25, random(50), random(20) - 10, random(20) - 10, -random(20), 0.5, 1);
_local5++;
}
_root.CreateParticle("HelicopterTail", this._x + 50, this._y, 100, random(20) - 10, random(10), -random(10), 0.5, 1);
_root.CreateParticle("HelicopterBody", this._x - 25, this._y, 100, random(20) - 10, -random(3), -random(10), 0.5, 1);
_root.CreateParticle("HelicopterNose", this._x - 50, this._y, 100, random(20) - 10, -random(10), -random(10), 0.5, 1);
_root.CreateParticle("HelicopterBlade", this._x, this._y + 10, 100, random(20) - 10, random(20) - 10, -20, 0.5, 1);
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash + 500;
_root.TotalCash = _root.TotalCash + 500;
var _local6 = this.ID;
var _local4 = _local6;
while (_local4 < _root.EnemyArray.length) {
EnemyArray[_local4].ID = EnemyArray[_local4].ID - 1;
_local4++;
}
_root.EnemyArray.splice(_local6, 1);
this.removeMovieClip();
_root.AircraftKilled++;
}
if (_root._currentframe == 6) {
this.removeMovieClip();
}
this.gotoAndStop(this.animation);
} else {
this.gotoAndStop("Fly");
}
};
}
var EnemyArray = new Array();
function CreateRocketSoldier() {
var _local6 = EnemyArray.length;
EnemyArray[_local6] = _root.attachMovie("RocketSoldier", "RocketSoldier" + _local6, _root.getNextHighestDepth());
EnemyArray[_local6]._x = 800;
EnemyArray[_local6]._y = 375;
EnemyArray[_local6].ID = _local6;
EnemyArray[_local6].range = random(100) + 300;
EnemyArray[_local6].animation = "Walk";
EnemyArray[_local6].onEnterFrame = function () {
if (_root.Paused == false) {
if (this._x <= this.range) {
this.animation = "Shoot";
} else {
this._x = this._x - 0.8;
}
var _local3 = 0;
while (_local3 < _root.ExplosionArray.length) {
if (_root.ExplosionArray[_local3].hitTest(this) and (_root.ExplosionArray[_local3]._currentframe < 4)) {
_root.CreateParticle("DeadSoldier", this._x, this._y - 10, 100, (this._x - _root.ExplosionArray[_local3]._x) / 5, (this._x - _root.ExplosionArray[_local3]._x) / 10, (-random(10)) - 5, 0.5, 1);
_root.CreateParticle("SoldierRocketLauncher", this._x, this._y, 100, (((this._x - _root.ExplosionArray[_local3]._x) / 5) + random(20)) - 10, (((this._x - _root.ExplosionArray[_local3]._x) / 10) + random(20)) - 10, (-random(10)) - 5, 0.5, 1);
this.removeMovieClip();
_root.InfantryKilled++;
var _local5 = this.ID;
var _local4 = _local5;
while (_local4 < _root.EnemyArray.length) {
EnemyArray[_local4].ID = EnemyArray[_local4].ID - 1;
_local4++;
}
_root.EnemyArray.splice(_local5, 1);
this.removeMovieClip();
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash + 100;
_root.TotalCash = _root.TotalCash + 100;
}
_local3++;
}
if (_root._currentframe == 6) {
this.removeMovieClip();
}
this.gotoAndStop(this.animation);
} else {
this.gotoAndStop("Walk");
}
};
}
var EnemyArray = new Array();
function CreateSoldier(xpos) {
var _local6 = EnemyArray.length;
EnemyArray[_local6] = _root.attachMovie("Soldier", "Soldier" + _local6, _root.getNextHighestDepth());
EnemyArray[_local6]._x = xpos;
EnemyArray[_local6]._y = 375;
EnemyArray[_local6].ID = _local6;
EnemyArray[_local6].range = random(100) + 200;
EnemyArray[_local6].animation = "Walk";
EnemyArray[_local6].onEnterFrame = function () {
if (_root.Paused == false) {
if (this._x <= this.range) {
this.animation = "StandShoot";
} else {
this._x = this._x - 1;
}
var _local3 = 0;
while (_local3 < _root.ExplosionArray.length) {
if (_root.ExplosionArray[_local3].hitTest(this) and (_root.ExplosionArray[_local3]._currentframe < 4)) {
_root.CreateParticle("DeadSoldier", this._x, this._y - 10, 100, (this._x - _root.ExplosionArray[_local3]._x) / 5, (this._x - _root.ExplosionArray[_local3]._x) / 10, (-random(10)) - 5, 0.5, 1);
_root.CreateParticle("SoldierGun", this._x, this._y, 100, (((this._x - _root.ExplosionArray[_local3]._x) / 5) + random(20)) - 10, (((this._x - _root.ExplosionArray[_local3]._x) / 10) + random(20)) - 10, (-random(10)) - 5, 0.5, 1);
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash + 50;
_root.TotalCash = _root.TotalCash + 50;
var _local5 = this.ID;
var _local4 = _local5;
while (_local4 < _root.EnemyArray.length) {
EnemyArray[_local4].ID = EnemyArray[_local4].ID - 1;
_local4++;
}
_root.EnemyArray.splice(_local5, 1);
this.removeMovieClip();
_root.InfantryKilled++;
}
_local3++;
}
this.gotoAndStop(this.animation);
if (_root._currentframe == 6) {
this.removeMovieClip();
}
} else {
this.gotoAndStop("Walk");
}
};
}
var EnemyArray = new Array();
Instance of Symbol 324 MovieClip "ReloadingReminder" in Frame 5
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (this._alpha > 0) {
this._alpha = this._alpha - 10;
}
}
Instance of Symbol 331 MovieClip in Frame 5
onClipEvent (load) {
function Aim() {
var _local4 = 100000 /* 0x0186A0 */;
var _local3 = 0;
while (_local3 < _root.EnemyArray.length) {
if ((_root.EnemyArray[_local3]._x - this._x) < _local4) {
_local4 = _root.EnemyArray[_local3]._x;
closestEnemy = _root.EnemyArray[_local3];
}
_local3++;
}
var _local6 = this._x - closestEnemy._x;
var _local5 = this._y - closestEnemy._y;
var _local7 = Math.atan2(_local5, _local6) * 57.2957795130823;
this._rotation = _local7 + 180;
}
function Shoot() {
var _local5 = Math.cos(this._rotation * (Math.PI/180)) * 50;
var _local4 = Math.sin(this._rotation * (Math.PI/180)) * 50;
if (_root.PlayerCannon.Turret3 == "MiniGun") {
if (closestEnemy._x < 700) {
if (fireTicks >= 2) {
_root.CreatePlayerBullet("StreakBullet", this._x + _local5, this._y + _local4, 40, 0.2, (this._rotation + 90) + (random(10) - 5), -5, "BulletHit");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("SoldierShot.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
if (_root.PlayerCannon.Turret3 == "Rocket") {
if (closestEnemy._x < 700) {
if (fireTicks >= 80) {
_root.CreatePlayerBullet("Rocket", this._x + _local5, this._y + _local4, 20, 20, this._rotation + 90, -10, "Explosion");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("rocketLaunch.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
if (_root.PlayerCannon.Turret3 == "Laser") {
if (closestEnemy._x < 700) {
if (fireTicks >= 20) {
_root.CreatePlayerBullet("LaserBeam", this._x + _local5, this._y + _local4, 50, 20, this._rotation + 90, -10, "LaserHit");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("laserFire.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
}
var fireTicks = 0;
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.Turret3);
if (_root.Paused == false) {
Aim();
Shoot();
}
}
Instance of Symbol 331 MovieClip in Frame 5
onClipEvent (load) {
function Aim() {
var _local4 = 100000 /* 0x0186A0 */;
var _local3 = 0;
while (_local3 < _root.EnemyArray.length) {
if ((_root.EnemyArray[_local3]._x - this._x) < _local4) {
_local4 = _root.EnemyArray[_local3]._x;
closestEnemy = _root.EnemyArray[_local3];
}
_local3++;
}
var _local6 = this._x - closestEnemy._x;
var _local5 = this._y - closestEnemy._y;
var _local7 = Math.atan2(_local5, _local6) * 57.2957795130823;
this._rotation = _local7 + 180;
}
function Shoot() {
var _local5 = Math.cos(this._rotation * (Math.PI/180)) * 50;
var _local4 = Math.sin(this._rotation * (Math.PI/180)) * 50;
if (_root.PlayerCannon.Turret2 == "MiniGun") {
if (closestEnemy._x < 700) {
if (fireTicks >= 2) {
_root.CreatePlayerBullet("StreakBullet", this._x + _local5, this._y + _local4, 40, 0.2, (this._rotation + 90) + (random(10) - 5), -5, "BulletHit");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("SoldierShot.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
if (_root.PlayerCannon.Turret2 == "Rocket") {
if (closestEnemy._x < 700) {
if (fireTicks >= 80) {
_root.CreatePlayerBullet("Rocket", this._x + _local5, this._y + _local4, 20, 20, this._rotation + 90, -10, "Explosion");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("rocketLaunch.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
if (_root.PlayerCannon.Turret2 == "Laser") {
if (closestEnemy._x < 700) {
if (fireTicks >= 20) {
_root.CreatePlayerBullet("LaserBeam", this._x + _local5, this._y + _local4, 50, 20, this._rotation + 90, -10, "LaserHit");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("laserFire.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
}
var fireTicks = 0;
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.Turret2);
if (_root.Paused == false) {
Aim();
Shoot();
}
}
Instance of Symbol 331 MovieClip in Frame 5
onClipEvent (load) {
function Aim() {
var _local4 = 100000 /* 0x0186A0 */;
var _local3 = 0;
while (_local3 < _root.EnemyArray.length) {
if ((_root.EnemyArray[_local3]._x - this._x) < _local4) {
_local4 = _root.EnemyArray[_local3]._x;
closestEnemy = _root.EnemyArray[_local3];
}
_local3++;
}
var _local6 = this._x - closestEnemy._x;
var _local5 = this._y - closestEnemy._y;
var _local7 = Math.atan2(_local5, _local6) * 57.2957795130823;
this._rotation = _local7 + 180;
}
function Shoot() {
var _local5 = Math.cos(this._rotation * (Math.PI/180)) * 50;
var _local4 = Math.sin(this._rotation * (Math.PI/180)) * 50;
if (_root.PlayerCannon.Turret1 == "MiniGun") {
if (closestEnemy._x < 700) {
if (fireTicks >= 2) {
_root.CreatePlayerBullet("StreakBullet", this._x + _local5, this._y + _local4, 40, 0.2, (this._rotation + 90) + (random(10) - 5), -5, "BulletHit");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("SoldierShot.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
if (_root.PlayerCannon.Turret1 == "Rocket") {
if (closestEnemy._x < 700) {
if (fireTicks >= 80) {
_root.CreatePlayerBullet("Rocket", this._x + _local5, this._y + _local4, 20, 20, this._rotation + 90, -10, "Explosion");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("rocketLaunch.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
if (_root.PlayerCannon.Turret1 == "Laser") {
if (closestEnemy._x < 700) {
if (fireTicks >= 20) {
_root.CreatePlayerBullet("LaserBeam", this._x + _local5, this._y + _local4, 50, 20, this._rotation + 90, -10, "LaserHit");
fireTicks = 0;
var _local3 = new Sound(this);
_local3.attachSound("laserFire.aif");
_local3.setVolume(_root.SFXVolume * 0.2);
_local3.start(0, 0);
}
fireTicks++;
}
}
}
var fireTicks = 0;
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.Turret1);
if (_root.Paused == false) {
Aim();
Shoot();
}
}
Instance of Symbol 335 MovieClip "CameraMover" in Frame 5
onClipEvent (load) {
CameraShake = 0;
}
onClipEvent (enterFrame) {
_root._x = (0 + (random(CameraShake) * 2)) - CameraShake;
_root._y = (0 + (random(CameraShake) * 2)) - CameraShake;
CameraShake = CameraShake / 1.1;
}
Instance of Symbol 335 MovieClip "EnemySpawner" in Frame 5
onClipEvent (load) {
var HelicopterTimer = 4000;
var TransportHelicopterTimer = 5000;
var TankTimer = 8000;
var TroopTimer = 0;
var RocketTroopTimer = 1000;
var MechTimer = 15000;
}
onClipEvent (enterFrame) {
if (_root.Paused == false) {
var num = random(100);
if ((num == 1) and (TroopTimer <= 0)) {
_root.CreateSoldier(800);
}
var num = random(150);
if ((num == 1) and (RocketTroopTimer <= 0)) {
_root.CreateRocketSoldier();
}
var num = random(350);
if ((num == 1) and (HelicopterTimer <= 0)) {
_root.CreateHelicopter();
}
var num = random(600);
if ((num == 1) and (TransportHelicopterTimer <= 0)) {
_root.CreateTransportHelicopter();
}
var num = random(500);
if ((num == 1) and (TankTimer <= 0)) {
_root.CreateTank();
}
var num = random(1000);
if ((num == 1) and (MechTimer <= 0)) {
_root.CreateMech();
}
HelicopterTimer--;
TransportHelicopterTimer--;
TankTimer--;
TroopTimer--;
RocketTroopTimer--;
MechTimer--;
}
}
Instance of Symbol 341 MovieClip "PlayerCannon" in Frame 5
onClipEvent (mouseDown) {
if ((_root._xmouse < 125) and (_root._ymouse < 75)) {
MouseHit = false;
} else {
MouseHit = true;
}
}
onClipEvent (load) {
function Aim() {
var _local4 = this._x - _root._xmouse;
var _local3 = this._y - _root._ymouse;
var _local5 = Math.atan2(_local3, _local4) * 57.2957795130823;
this._rotation = _local5 + 180;
}
function Shoot() {
var _local4 = BulletArray.length;
BulletArray[_local4] = _root.attachMovie("Shell", "Shell" + _local4, _root.getNextHighestDepth());
BulletArray[_local4]._x = this._x + (Math.cos(this._rotation * (Math.PI/180)) * 70);
BulletArray[_local4]._y = this._y + (Math.sin(this._rotation * (Math.PI/180)) * 70);
BulletArray[_local4]._rotation = this._rotation;
BulletArray[_local4].ID = _local4;
BulletArray[_local4].BlastArea = BlastArea;
BulletArray[_local4].Damage = Damage;
BulletArray[_local4].xspeed = Math.cos(this._rotation * (Math.PI/180)) * FirePower;
BulletArray[_local4].yspeed = Math.sin(this._rotation * (Math.PI/180)) * FirePower;
BulletArray[_local4].trail = _root.createEmptyMovieClip("ShellTrail" + _local4, _root.getNextHighestDepth());
BulletArray[_local4].trail.lineStyle(2, 16777215, 10);
BulletArray[_local4].Explode = function () {
_root.CreateExplosion("Explosion", this._x, this._y, 0, this.BlastArea, random(this.BlastArea) + (this.BlastArea / 2));
_root.CameraMover.CameraShake = this.BlastArea / 5;
this.removeMovieClip();
_root.PlayerCannon.BulletArray.splice(this.ID - 1, 1);
};
BulletArray[_local4].trail.onEnterFrame = function () {
if (_root.Paused == false) {
this._alpha = this._alpha - 1;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
BulletArray[_local4].onEnterFrame = function () {
if (_root.Paused == false) {
this.trail.moveTo(this._x, this._y);
if ((this._y + this.yspeed) < 370) {
this.trail.lineTo(this._x + this.xspeed, this._y + this.yspeed);
}
this._x = this._x + this.xspeed;
this._y = this._y + this.yspeed;
this._rotation = Math.atan2(this.yspeed, this.xspeed) * 57.2957795130823;
this.yspeed = this.yspeed + 1;
if (this._y > 370) {
var _local3 = 0;
while (_local3 < 20) {
_root.CreateParticle("ChunkParticle", (this._x + random(50)) - 25, 370, random(7) + 5, random(20) - 10, random(20) - 10, -random(20), 0.5, 1);
_local3++;
}
_root.CreateParticle("Crater", this._x, 370, this.BlastArea * 3, 0, 0, 0, 0, 0);
this.Explode();
}
}
};
}
this.stop();
FirePower = 20;
Damage = 10;
BlastArea = 20;
FireRate = 25;
MaxHealth = 100;
Health = 100;
Cash = 0;
Ammo = 10;
MaxAmmo = 10;
ReloadTime = 100;
ReloadTimer = 0;
Turret1 = "None";
Turret2 = "None";
Turret3 = "None";
BulletArray = new Array();
}
onClipEvent (enterFrame) {
if (_root.Paused == false) {
if (Ammo <= 0) {
ReloadTimer = ReloadTimer + 1;
}
if (ReloadTimer >= ReloadTime) {
ReloadTimer = 0;
Ammo = MaxAmmo;
GunLoadSound = new Sound(this);
GunLoadSound.attachSound("CannonReload.aif");
GunLoadSound.setVolume(_root.SFXVolume);
GunLoadSound.start(0, 0);
}
if (this.Health < 0) {
_root.PlayerDeathExplosion.play();
}
_root.PlayerHealthBar.gotoAndStop(Math.round((this.Health / this.MaxHealth) * 100));
if (Ammo > 0) {
_root.PlayerAmmoText.text = (Ammo + "/") + MaxAmmo;
} else {
_root.PlayerAmmoText.text = "Reloading";
}
_root.CashText.text = "CASH: $" + Cash;
Aim();
FireTicks++;
if (Key.isDown(32)) {
Ammo = 0;
}
if ((FireTicks >= FireRate) and (MouseHit == true)) {
if (Ammo > 0) {
Shoot();
Ammo = Ammo - 1;
FireTicks = 0;
this.gotoAndPlay("Fire");
} else {
_root.ReloadingReminder._alpha = 100;
}
}
}
MouseHit = false;
}
Frame 6
var ii = 0;
while (ii < _root.EnemyArray.length) {
_root.EnemyArray.pop();
ii++;
}
_root.InfantryKilledText.text = _root.InfantryKilled;
_root.AircraftKilledText.text = _root.AircraftKilled;
_root.ArmorKilledText.text = _root.ArmorKilled;
_root.CashText.text = _root.TotalCash;
Instance of Symbol 331 MovieClip in Frame 7
onClipEvent (load) {
stop();
}
Instance of Symbol 341 MovieClip in Frame 7
onClipEvent (load) {
stop();
}
Symbol 34 MovieClip Frame 2
_root.PlayerCannon.Health = _root.PlayerCannon.Health - 0.1;
var Shotsound = new Sound(this);
Shotsound.attachSound("SoldierShot.aif");
Shotsound.setVolume(_root.SFXVolume * 0.2);
Shotsound.start(0, 0);
Symbol 46 MovieClip Frame 1
_root.PlayerCannon.Health = _root.PlayerCannon.Health - 0.4;
_root.CreateEnemyBullet("StreakBullet", _parent._x - 90, _parent._y + 35, 20, -120 + random(10), -3, "BulletHit");
var Shotsound = new Sound(this);
Shotsound.attachSound("HelicopterShot.aif");
Shotsound.setVolume(_root.SFXVolume * 0.2);
Shotsound.start(0, 0);
Symbol 65 MovieClip Frame 2
_root.PlayerCannon.Health = _root.PlayerCannon.Health - 2;
_root.CreateEnemyBullet("Rocket", _parent._x, _parent._y, 20, -90 + random(10), -10, "Explosion");
var Shotsound = new Sound(this);
Shotsound.attachSound("rocketLaunch.aif");
Shotsound.setVolume(_root.SFXVolume * 0.2);
Shotsound.start(0, 0);
Symbol 101 MovieClip [BulletHit] Frame 3
stop();
Symbol 131 MovieClip Frame 2
_root.PlayerCannon.Health = _root.PlayerCannon.Health - 1;
_root.CreateEnemyBullet("LaserBeam", _parent._x - 100, _parent._y - 55, 50, -90 + random(5), -10, "LaserHit");
var Shotsound = new Sound(this);
Shotsound.attachSound("LaserFire.aif");
Shotsound.setVolume(_root.SFXVolume * 0.2);
Shotsound.start(0, 0);
Symbol 141 MovieClip [Explosion] Frame 1
var Explosionsound = new Sound(this);
Explosionsound.attachSound("Explosion.aif");
Explosionsound.setVolume(_root.SFXVolume);
Explosionsound.start(0, 0);
Symbol 141 MovieClip [Explosion] Frame 15
stop();
Symbol 156 MovieClip Frame 2
_root.PlayerCannon.Health = _root.PlayerCannon.Health - 10;
_root.CreateEnemyBullet("Rocket", _parent._x, _parent._y, 80, -90 + random(20), -20, "Explosion");
var Shotsound = new Sound(this);
Shotsound.attachSound("Explosion.aif");
Shotsound.setVolume(_root.SFXVolume);
Shotsound.start(0, 0);
Symbol 167 MovieClip Frame 1
function timerHandler() {
if (!loadingComplete) {
var _local4 = _root.getBytesLoaded() / _root.getBytesTotal();
bar._xscale = 100 * _local4;
if (_local4 == 1) {
loadingComplete = true;
if (AUTO_PLAY) {
startMovie();
} else {
gotoAndStop ("loaded");
}
return(undefined);
}
}
dt = getTimer() - time;
time = time + dt;
frameAccum = frameAccum + dt;
var _local3 = 0;
while ((frameAccum >= FRAME_TIME) && (_local3 < MAX_FRAME_SKIP)) {
advanceFrame(tankLogo, true, true);
advanceFrame(loadingText, false, true);
advanceFrame(barGfx, false, true);
if (loadingComplete) {
advanceFrame(this, false, false);
}
(frameAccum = frameAccum - FRAME_TIME);
_local3++;
}
updateAfterEvent();
}
function advanceFrame(clip, recurse, loop) {
if (!clip) {
return(undefined);
}
clip.stop();
if (clip._currentframe == clip._totalframes) {
if (loop) {
clip.gotoAndStop(1);
}
} else {
clip.nextFrame();
}
if (recurse) {
for (childName in clip) {
if (typeof(clip[childName]) == "movieclip") {
advanceFrame(clip[childName], recurse, loop);
}
}
}
}
function startMovie() {
clearInterval(intervalId);
_root.play();
}
_root.stop();
stop();
var FRAME_TIME = 33.3333333333333;
var AUTO_PLAY = false;
var MAX_FRAME_SKIP = 5;
var loadingComplete;
var intervalId;
var time;
var frameAccum;
loadingComplete = false;
intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2);
frameAccum = 0;
time = getTimer();
timerHandler();
Symbol 167 MovieClip Frame 37
startMovie();
Symbol 180 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 183 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Symbol 183 MovieClip Frame 218
stop();
Symbol 192 MovieClip Frame 440
_root.play();
Symbol 200 Button
on (release) {
getURL ("http://armorgames.com/");
}
Symbol 203 Button
on (release) {
FrameToGoTo = "HelpScreen";
play();
}
Symbol 206 Button
on (release) {
FrameToGoTo = "OptionsMenu";
play();
}
Symbol 210 Button
on (release) {
FrameToGoTo = "Game";
play();
}
Symbol 215 MovieClip Frame 1
Symbol 215 MovieClip Frame 20
stop();
Symbol 215 MovieClip Frame 21
Symbol 215 MovieClip Frame 50
_root.gotoAndStop(FrameToGoTo);
Symbol 226 MovieClip Frame 20
stop();
Symbol 226 MovieClip Frame 40
_root.gotoAndStop(FrameToGoTo);
Instance of Symbol 228 MovieClip "SliderKnob" in Symbol 231 MovieClip Frame 1
on (press) {
startDrag (this);
}
on (releaseOutside) {
stopDrag();
}
on (release) {
stopDrag();
}
onClipEvent (enterFrame) {
if (this._x >= (_parent.SliderBar._x + 50)) {
this._x = _parent.SliderBar._x + 50;
}
if (this._x <= (_parent.SliderBar._x - 50)) {
this._x = _parent.SliderBar._x - 50;
}
this._y = _parent.SliderBar._y;
}
Symbol 236 Button
on (release) {
_root.TransitionFade.FrameToGoTo = "MainMenu";
_root.TransitionFade.play();
}
Symbol 243 Button
on (release) {
if (_root.PlayerCannon.Cash >= 5000) {
if (_root.PlayerCannon.ReloadTime > 20) {
_root.PlayerCannon.ReloadTime = _root.PlayerCannon.ReloadTime - 20;
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 5000;
}
}
}
Symbol 248 Button
on (release) {
if (_root.PlayerCannon.Cash >= 5000) {
if (_root.PlayerCannon.MaxAmmo < 50) {
_root.PlayerCannon.MaxAmmo = _root.PlayerCannon.MaxAmmo + 10;
_root.PlayerCannon.Ammo = _root.PlayerCannon.Ammo + 10;
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 5000;
}
}
}
Symbol 256 Button
on (release) {
this.play();
}
Symbol 257 Button
on (release) {
if (_root.PlayerCannon.Cash >= 15000) {
if (_root.PlayerCannon.MaxHealth < 500) {
_root.PlayerCannon.MaxHealth = _root.PlayerCannon.MaxHealth + 100;
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 15000;
}
}
}
Symbol 258 Button
on (release) {
if (_root.PlayerCannon.Cash >= 6000) {
if (_root.PlayerCannon.BlastArea < 50) {
_root.PlayerCannon.BlastArea = _root.PlayerCannon.BlastArea + 10;
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 6000;
}
}
}
Symbol 259 Button
on (release) {
if (_root.PlayerCannon.Cash >= 10000) {
if (_root.PlayerCannon.FireRate > 5) {
_root.PlayerCannon.FireRate = _root.PlayerCannon.FireRate - 5;
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 10000;
}
}
}
Symbol 260 Button
on (release) {
if (_root.PlayerCannon.Cash >= 3000) {
if (_root.PlayerCannon.FirePower < 50) {
_root.PlayerCannon.FirePower = _root.PlayerCannon.FirePower + 10;
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 3000;
}
}
}
Symbol 261 Button
on (release) {
if (_root.PlayerCannon.Cash >= 10000) {
if (_root.PlayerCannon.Damage < 50) {
_root.PlayerCannon.Damage = _root.PlayerCannon.Damage + 10;
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 10000;
}
}
}
Symbol 279 Button
on (release) {
if ((_root.PlayerCannon.Cash >= 500) and (_root.PlayerCannon.Health < _root.PlayerCannon.MaxHealth)) {
_root.PlayerCannon.Health = _root.PlayerCannon.Health + 10;
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 500;
}
}
Symbol 289 Button
on (release) {
play();
}
Symbol 293 Button
on (release) {
if (_root.PlayerCannon.Cash >= 15000) {
if (_name == "PlayerTurret1") {
if (_root.PlayerCannon.Turret1 != "Laser") {
_root.PlayerCannon.Turret1 = "Laser";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 15000;
}
}
if (_name == "PlayerTurret2") {
if (_root.PlayerCannon.Turret2 != "Laser") {
_root.PlayerCannon.Turret2 = "Laser";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 15000;
}
}
if (_name == "PlayerTurret3") {
if (_root.PlayerCannon.Turret3 != "Laser") {
_root.PlayerCannon.Turret3 = "Laser";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 15000;
}
}
}
}
Symbol 294 Button
on (release) {
if (_root.PlayerCannon.Cash >= 10000) {
if (_name == "PlayerTurret1") {
if (_root.PlayerCannon.Turret1 != "Rocket") {
_root.PlayerCannon.Turret1 = "Rocket";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 10000;
}
}
if (_name == "PlayerTurret2") {
if (_root.PlayerCannon.Turret2 != "Rocket") {
_root.PlayerCannon.Turret2 = "Rocket";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 1000;
}
}
if (_name == "PlayerTurret3") {
if (_root.PlayerCannon.Turret3 != "Rocket") {
_root.PlayerCannon.Turret3 = "Rocket";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 1000;
}
}
}
}
Symbol 295 Button
on (release) {
if (_root.PlayerCannon.Cash >= 5000) {
if (_name == "PlayerTurret1") {
if (_root.PlayerCannon.Turret1 != "MiniGun") {
_root.PlayerCannon.Turret1 = "MiniGun";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 5000;
}
}
if (_name == "PlayerTurret2") {
if (_root.PlayerCannon.Turret2 != "MiniGun") {
_root.PlayerCannon.Turret2 = "MiniGun";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 5000;
}
}
if (_name == "PlayerTurret3") {
if (_root.PlayerCannon.Turret3 != "MiniGun") {
_root.PlayerCannon.Turret3 = "MiniGun";
_root.PlayerCannon.Cash = _root.PlayerCannon.Cash - 5000;
}
}
}
}
Symbol 304 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 10
stop();
Instance of Symbol 246 MovieClip in Symbol 304 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop(80);
}
Instance of Symbol 246 MovieClip in Symbol 304 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop(20);
}
Instance of Symbol 246 MovieClip in Symbol 304 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop(20);
}
Instance of Symbol 246 MovieClip in Symbol 304 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop(20);
}
Instance of Symbol 246 MovieClip in Symbol 304 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop(95);
}
Instance of Symbol 246 MovieClip in Symbol 304 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop(1);
}
Symbol 322 MovieClip Frame 1
_root.Paused = true;
Instance of Symbol 246 MovieClip "Reload" in Symbol 322 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(120 - _root.PlayerCannon.ReloadTime);
}
Instance of Symbol 246 MovieClip "Ammo" in Symbol 322 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.MaxAmmo * 2);
}
Instance of Symbol 246 MovieClip "Health" in Symbol 322 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.MaxHealth / 5);
}
Instance of Symbol 246 MovieClip "BlastRadius" in Symbol 322 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.BlastArea * 2);
}
Instance of Symbol 246 MovieClip "FireRateBar" in Symbol 322 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop((120 - (_root.PlayerCannon.FireRate * 4)) + 1);
}
Instance of Symbol 246 MovieClip "VelocityBar" in Symbol 322 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.FirePower * 2);
}
Instance of Symbol 246 MovieClip "DamageBar" in Symbol 322 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.Damage * 2);
}
Instance of Symbol 246 MovieClip in Symbol 322 MovieClip Frame 10
onClipEvent (enterFrame) {
this.gotoAndStop(Math.round((_root.PlayerCannon.Health / _root.PlayerCannon.MaxHealth) * 100));
_parent.WindowCashText.text = "$ " + _root.PlayerCannon.Cash;
}
Symbol 322 MovieClip Frame 20
stop();
Instance of Symbol 304 MovieClip "PlayerTurret1" in Symbol 322 MovieClip Frame 20
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe < 10) {
this.play();
}
}
}
Instance of Symbol 304 MovieClip "PlayerTurret2" in Symbol 322 MovieClip Frame 20
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe < 10) {
this.play();
}
}
}
Instance of Symbol 304 MovieClip "PlayerTurret3" in Symbol 322 MovieClip Frame 20
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe < 10) {
this.play();
}
}
}
Instance of Symbol 309 MovieClip in Symbol 322 MovieClip Frame 20
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.Turret1);
}
Instance of Symbol 309 MovieClip in Symbol 322 MovieClip Frame 20
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.Turret2);
}
Instance of Symbol 309 MovieClip in Symbol 322 MovieClip Frame 20
onClipEvent (enterFrame) {
this.gotoAndStop(_root.PlayerCannon.Turret3);
}
Symbol 322 MovieClip Frame 40
stop();
_root.Paused = false;
Symbol 327 Button
on (release) {
_root.UpgradeWindow.play();
_root.UpgradeWindow.swapDepths(_root.getNextHighestDepth());
}
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 20
_root.gotoAndStop("Death");
Symbol 341 MovieClip Frame 2
var Shotsound = new Sound(this);
Shotsound.attachSound("GunFire.aif");
Shotsound.setVolume(_root.SFXVolume);
Shotsound.start(0, 0);
Symbol 341 MovieClip Frame 10
stop();
Symbol 347 MovieClip Frame 39
stop();