Frame 1
stop();
go = function () {
title.play();
logo.play();
loader.play();
credits.play();
};
var menu = new ContextMenu();
menu.hideBuiltInItems();
Frame 2
music = new Sound();
music.stop();
delete music;
Frame 4
function init() {
with (_root) {
screenT = 0;
screenL = 0;
screenB = 400;
screenR = 550;
_global.field = _root.attachMovie("field", "gameField", _root.getNextHighestDepth());
field.L = screenL;
field.R = screenR;
field.T = screenT;
field.B = screenB;
field.attachMovie("player", "player", _root.getNextHighestDepth());
_root.player = field.player;
player._x = -50;
player._y = 200;
player.radius = 15;
player.speed = 2;
player.ammoRate = 0.0833333333333333;
player.shooting = false;
player.shotType = "normal";
player.secondaryWeapon = "mine";
player.movementMode = "normal";
player.mass = 40;
player.powerBullets = false;
player.splashBullets = false;
player.ammoRecharge = false;
evilCount = 0;
powerupCount = 0;
explosionCount = 0;
hintCount = 0;
powerupChance = 10;
timeFrozen = false;
timeFrozenTimer = 0;
running = true;
musicVolume = 100;
_root.powerupHintTime = 10;
attachMovie("spawner", "spawner", _root.getNextHighestDepth());
spawner.delay = 60;
spawner.chances = [80, 18, 2];
spawner.types = ["tracker", "rock", "boulder"];
spawner.startLevel = 0;
spawner.levelInc = 1.2;
spawner.spawning = true;
timeLevelInc = 0;
attachMovie("pointer", "pointer", _root.getNextHighestDepth());
hideMouse();
score = 0;
frameCount = 0;
normalBulletSpeed = 4;
normalBulletDamage = 2;
normalShootRate = 4;
normalBulletMass = 5;
normalBulletRadius = 2;
mineSpeed = 25;
mineDamage = 25;
mineRadius = 10;
mineFuse = 10;
mineShootRate = 15;
mineMass = 40;
turretAttackRate = 50;
turretBulletSpeed = 10;
turretAttackDamage = 1.5;
turretMass = 10;
turretDamage = 10;
turretLife = 50;
fireBombSpeed = 50;
fireBombRadius = 10;
fireBombDamage = 0.208333333333333;
fireBombFuse = 3;
fireBombBurnTime = 2;
tag = _root.attachMovie("statusBar", "statusBar", _root.getNextHighestDepth());
tag._x = 10;
tag._y = 350;
_global.music = new Sound();
music.attachSound("BGmusic");
music.start();
music.setVolume(100);
music.onSoundComplete = function () {
if (music.getVolume() > 0) {
music.start();
}
};
}
}
function movePlayer(where, howMuch) {
newX = player._x;
newY = player._y;
if (player.movementMode == "normal") {
switch (where) {
case "up" :
newY = newY - howMuch;
break;
case "down" :
newY = newY + howMuch;
break;
case "left" :
newX = newX - howMuch;
break;
case "right" :
newX = newX + howMuch;
}
} else if (player.movementMode == "relative") {
var _local6 = _root._xmouse - _root.player._x;
var _local5 = _root._ymouse - _root.player._y;
var _local4 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
var _local3 = aMath.atan(_local5, _local6);
if (_local4 > howMuch) {
_local4 = howMuch;
}
switch (where) {
case "up" :
newX = newX + (_local4 * aMath.cos(_local3));
newY = newY + (_local4 * aMath.sin(_local3));
break;
case "down" :
newX = newX + (_local4 * aMath.cos(_local3 - 180));
newY = newY + (_local4 * aMath.sin(_local3 - 180));
break;
case "left" :
newX = newX + (howMuch * aMath.cos(_local3 - 90));
newY = newY + (howMuch * aMath.sin(_local3 - 90));
break;
case "right" :
newX = newX + (howMuch * aMath.cos(_local3 + 90));
newY = newY + (howMuch * aMath.sin(_local3 + 90));
}
}
if ((newX > screenL) and (newX < screenR)) {
player._x = newX;
}
if ((newY > screenT) and (newY < screenB)) {
player._y = newY;
}
}
function createEvil(T, L) {
switch (T) {
case "tracker" :
tag = field.evils.attachMovie("trackerEvil", "evil" + evilCount, field.evils.getNextHighestDepth());
tag.target = field.player;
break;
case "rock" :
tag = field.evils.attachMovie("rockEvil", "evil" + evilCount, field.evils.getNextHighestDepth());
break;
case "boulder" :
tag = field.evils.attachMovie("boulderEvil", "evil" + evilCount, field.evils.getNextHighestDepth());
break;
case "bullet" :
tag = field.evils.attachMovie("evilBullet", "evil" + evilCount, field.evils.getNextHighestDepth());
break;
case "cannon" :
tag = field.evils.attachMovie("cannonEvil", "evil" + evilCount, field.evils.getNextHighestDepth());
}
tag.level = L;
evilCount++;
return(tag);
}
function endGame() {
gotoAndStop (35);
}
function pauseGame() {
running = false;
showMouse();
_root.attachMovie("pauseScreen", "pauseScreen", _root.getNextHighestDepth());
}
function resumeGame() {
running = true;
hideMouse();
_root.pauseScreen.remove();
}
function freezeTime(howLong) {
if (!timeFrozen) {
for (key in field.evils) {
field.evils[key].active = false;
}
for (key in field.bullets) {
field.bullets[key].active = false;
}
timeFrozenTimer = 0;
timeFrozen = true;
}
timeFrozenTimer = timeFrozenTimer + howLong;
}
function unFreezeTime() {
timeFrozen = false;
timeFrozenTimer = 0;
for (key in field.evils) {
field.evils[key].active = true;
}
for (key in field.bullets) {
field.bullets[key].active = true;
}
}
function showMouse() {
Mouse.show();
_root.pointer.gotoAndPlay(31);
}
function hideMouse() {
_root.pointer.gotoAndPlay(2);
Mouse.hide();
}
init();
_root.onEnterFrame = function () {
DX = 275 - player._x;
player._x = player._x + (DX / 10);
};
_global.dropPowerup = function (type) {
tag = field.powerups.attachMovie("powerup", "powerup" + _root.powerupCount, field.powerups.getNextHighestDepth());
_root.powerupCount++;
tag.type = type;
tag.time = 20;
tag.radius = 10;
return(tag);
};
_global.explode = function (X, Y, R) {
tag = field.explosions.attachMovie("explosion", "explosion" + _root.explosionCount, field.explosions.getNextHighestDepth());
explosionCount++;
tag._x = X;
tag._y = Y;
tag.radius = R;
return(tag);
};
_global.onScreen = function (what) {
with (what) {
if ((_x + radius) > (_root.screenL - field._x)) {
if ((_x - radius) < (_root.screenR - field._x)) {
if ((_y + radius) > (_root.screenT - field._y)) {
if ((_y - radius) < (_root.screenB - field._y)) {
return(true);
}
}
}
}
}
return(false);
};
_global.onField = function (what) {
with (what) {
if ((_x + radius) > field.L) {
if ((_x - radius) < field.R) {
if ((_y + radius) > field.T) {
if ((_y - radius) < field.B) {
return(true);
}
}
}
}
}
};
_global.contact = function (A, B, N) {
DX = A._x - B._x;
DY = A._y - B._y;
D = (DX * DX) + (DY * DY);
R = A.radius + B.radius;
if (!N) {
N = 0;
}
if (D < ((R + N) * (R + N))) {
return(true);
}
return(false);
};
_global.applySplashDamage = function (X, Y, damage, blastPower, radius) {
var _local1 = new Object();
_local1._x = X;
_local1._y = Y;
_local1.radius = radius;
_local1.damage = damage;
for (key in field.evils) {
tag = field.evils[key];
if (tag.active and contact(_local1, tag)) {
tag.hit(_local1);
R = radius + tag.radius;
DX = tag._x - _local1._x;
DY = tag._y - _local1._y;
D = Math.sqrt((DX * DX) + (DY * DY));
A = aMath.atan(DY, DX);
P = R - D;
DX = P * aMath.cos(A);
DY = P * aMath.sin(A);
tag.EFX = tag.EFX + ((blastPower * DX) / tag.mass);
tag.EFY = tag.EFY + ((blastPower * DY) / tag.mass);
}
}
};
_global.addHint = function (target, time) {
tag = _root.attachMovie("hint", "hint" + _root.hintCount, _root.getNextHighestDepth());
tag.target = target;
tag.time = time;
_root.hintCount++;
return(tag);
};
Frame 34
stop();
_root.onEnterFrame = function () {
if (running) {
if (Key.isDown(80)) {
pauseGame();
}
if (Key.isDown(87)) {
movePlayer("up", field.player.speed);
}
if (Key.isDown(83)) {
movePlayer("down", field.player.speed);
}
if (Key.isDown(65)) {
movePlayer("left", field.player.speed);
}
if (Key.isDown(68)) {
movePlayer("right", field.player.speed);
}
if (Key.isDown(32)) {
field.player.gun.shoot(player.secondaryWeapon);
}
if (timeFrozen) {
timeFrozenTimer = timeFrozenTimer - 0.0166666666666667;
if (timeFrozenTimer <= 0) {
unFreezeTime();
}
} else {
spawner.level = spawner.level + timeLevelInc;
frameCount++;
}
}
};
_root.onMouseDown = function () {
field.player.shooting = true;
};
_root.onMouseUp = function () {
field.player.shooting = false;
};
Frame 35
tag = _root.attachMovie("gameOver", gameOver, _root.getNextHighestDepth());
skipHints = true;
tag._x = 275;
tag._y = 200;
showMouse();
field.lightOnFire();
Symbol 23 MovieClip [console] Frame 1
tracking = false;
bubbleUp = function () {
i = 0;
while ((this != _parent.getInstanceAtDepth(_parent.getNextHighestDepth() - 1)) and (i < 100)) {
this.swapDepths(_parent.getNextHighestDepth() - 1);
i++;
}
};
this.onEnterFrame = function () {
if (tracking) {
var_value_TF.text = eval (var_name_TF.text);
}
if (this != _parent.getInstanceAtDepth(_parent.getNextHighestDepth() - 1)) {
bubbleUp();
}
};
set_B.onRelease = function () {
if (number) {
Set(var_name_TF.text, Number(var_value_TF.text));
} else {
Set(var_name_TF.text, var_value_TF.text);
}
get_B.onRelease();
};
get_B.onRelease = function () {
tracking = true;
};
var_value_TF.onSetFocus = function () {
tracking = false;
};
hide_B.onRelease = function () {
BG._visible = false;
var_name_TF._visible = false;
var_value_TF._visible = false;
set_B._visible = false;
get_B._visible = false;
hide_B._visible = false;
show_B._visible = true;
};
show_B.onRelease = function () {
BG._visible = true;
var_name_TF._visible = true;
var_value_TF._visible = true;
set_B._visible = true;
get_B._visible = true;
hide_B._visible = true;
show_B._visible = false;
};
hide_B.onRelease();
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 30
stop();
Symbol 34 MovieClip Frame 1
T = _root.getBytesTotal();
bar._xscale = 0;
this.onEnterFrame = function () {
L = _root.getBytesLoaded();
X = (L / T) * 100;
DX = X - bar._xscale;
bar._xscale = bar._xscale + (DX / 10);
if (bar._xscale > 99) {
_parent.play_B.play();
this.onEnterFrame = null;
}
};
Symbol 39 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 2
play_B.onRelease = function () {
gotoAndPlay (31);
_root.go();
};
Symbol 39 MovieClip Frame 31
stop();
Symbol 39 MovieClip Frame 60
stop();
Symbol 40 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 30
stop();
_root.play();
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 30
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 30
stop();
Symbol 163 MovieClip [__Packages.aMath] Frame 0
class aMath
{
function aMath () {
}
static function d2r(x) {
return((x / 180) * Math.PI);
}
static function r2d(x) {
return((x * 180) / Math.PI);
}
static function r2d2() {
with (_root) {
var bip = new TextField();
var format = new TextFormat();
var r2runner = new MovieClip();
_root.createTextField("bip", _root.getNextHighestDepth(), 150, 150, 250, 100);
bip.text = "Bip Bip Bip.";
bip.selectable = false;
format.color = 16711680 /* 0xFF0000 */;
format.size = 50;
format.align = "center";
format.font = "Courier";
bip.setTextFormat(format);
_root.createEmptyMovieClip("r2runner", _root.getNextHighestDepth());
r2runner.onEnterFrame = function () {
if (!random(30)) {
bip._x = random(300);
bip._y = random(300);
}
};
}
}
static function sin(x) {
return(Math.sin(d2r(x)));
}
static function cos(x) {
return(Math.cos(d2r(x)));
}
static function tan(x) {
return(Math.tan(d2r(x)));
}
static function asin(x) {
return(r2d(Math.asin(x)));
}
static function acos(x) {
return(r2d(Math.acos(x)));
}
static function atan(y, x) {
return(r2d(Math.atan2(y, x)));
}
static function sign(num) {
if (num > 0) {
return(1);
}
if (num < 0) {
return(-1);
}
return(0);
}
static function sRand(rand) {
return(random((rand * 2) + 1) - rand);
}
static function limit(min, num, max) {
if (num < min) {
return(min);
}
if (num > max) {
return(max);
}
return(num);
}
static function enclosed(num, min, max) {
if (((num > min) and (num < max)) or ((num < min) and (num > max))) {
return(true);
}
return(false);
}
static function solve(str) {
var _local3;
var _local5;
var _local4;
var _local1;
_local1 = 1;
while (_local1 < str.length) {
switch (str.charAt(_local1)) {
case "=" :
case "+" :
case "-" :
case "*" :
case "/" :
_local3 = Number(str.substr(0, _local1));
_local5 = str.charAt(_local1);
_local4 = Number(str.slice(_local1 + 1, str.length));
}
if (_local3) {
break;
}
_local1++;
}
switch (_local5) {
case "=" :
return(_local4);
case "+" :
return(_local3 + _local4);
case "-" :
return(_local3 - _local4);
case "*" :
return(_local3 * _local4);
case "/" :
return(_local3 / _local4);
}
return(undefined);
}
static function aRand(chanceList) {
var _local2 = new Array();
var _local4;
var _local1;
_local2[0] = 0;
_local1 = 0;
while (_local1 < chanceList.length) {
_local2[_local1 + 1] = _local2[_local1] + chanceList[_local1];
_local1++;
}
_local4 = random(_local2[_local2.length - 1]);
_local1 = 0;
while (_local1 < _local2.length) {
if (_local4 < _local2[_local1 + 1]) {
return(_local1);
}
_local1++;
}
return(undefined);
}
static function findDist(a, b) {
var _local2 = getProperty(a, _x) - getProperty(b, _x);
var _local1 = getProperty(a, _y) - getProperty(b, _y);
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
}
Symbol 54 MovieClip Frame 1
getValue = function () {
return(((slider._x - 5) / 90) * 100);
};
setValue = function (V) {
slider._x = ((V / 100) * 90) + 5;
};
this.addProperty("value", getValue, setValue);
rail_B.onPress = function () {
drag = true;
offset = _xmouse - slider._x;
};
rail_B.onRelease = function () {
drag = false;
};
rail_B.onReleaseOutside = function () {
rail_B.onRelease();
};
this.onEnterFrame = function () {
if (drag) {
prevX = slider._x;
slider._x = _xmouse - offset;
slider._x = aMath.limit(5, slider._x, 95);
if (slider._x != prevX) {
this.onChanged();
}
}
};
onLoaded();
Symbol 61 MovieClip [pauseScreen] Frame 1
_alpha = 0;
volume_B.onLoaded = function () {
volume_B.value = music.getVolume();
};
volume_B.onChanged = function () {
if ((volume_B.value > 0) and (music.getVolume() <= 0)) {
music.start();
}
music.setVolume(volume_B.value);
if (volume_B.value <= 0) {
music.stop();
}
};
unpause.onRelease = function () {
_root.resumeGame();
};
this.onEnterFrame = function () {
_alpha = (_alpha + 3);
if (_alpha >= 100) {
this.onEnterFrame = null;
}
};
remove = function () {
this.onEnterFrame = function () {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
this.removeMovieClip();
}
};
};
Symbol 64 MovieClip [ammoUnit] Frame 1
stop();
this.onEnterFrame = function () {
if (_parent.ammo > N) {
play();
}
};
Symbol 64 MovieClip [ammoUnit] Frame 11
stop();
this.onEnterFrame = function () {
if (_parent.ammo <= N) {
play();
}
};
Symbol 66 MovieClip Frame 1
this.onEnterFrame = function () {
scale = 50 + (_parent.energy / 2);
_xscale = scale;
_yscale = scale;
};
Symbol 68 MovieClip Frame 1
ammo = 0;
i = 1;
while (i <= 24) {
tag = attachMovie("ammoUnit", "ammoUnit" + ammo, this.getNextHighestDepth());
tag._rotation = i * 15;
tag.N = i;
i++;
}
Symbol 72 MovieClip Frame 1
set = function (num) {
thing._x = (-num) / 20;
};
Symbol 74 MovieClip Frame 1
bulletCount = 0;
shotTimer = 0;
this.onEnterFrame = function () {
if (_root.running) {
if (shotTimer > 0) {
shotTimer--;
}
}
};
shoot = function (how) {
if (shotTimer == 0) {
switch (how) {
case "normal" :
if (ammo.ammo > 0.8) {
ammo.ammo = ammo.ammo - 0.8;
tag = createBullet("normalBullet", 15);
tag.speed = _root.normalBulletSpeed;
tag.damage = _root.normalBulletDamage;
tag.mass = _root.normalBulletMass;
tag.radius = _root.normalBulletRadius;
if (_parent.powerBullets > 0) {
tag.powerBullet = true;
}
if (_parent.splashBullets > 0) {
tag.splash = true;
}
shotTimer = _root.normalShootRate;
}
break;
case "mine" :
if (ammo.ammo > 5) {
ammo.ammo = ammo.ammo - 5;
tag = createBullet("mine", 15);
tag.speed = _root.mineSpeed;
tag.damage = _root.mineDamage;
tag.radius = _root.mineRadius;
tag.fuse = _root.mineFuse;
tag.mass = _root.mineMass;
shotTimer = _root.mineShootRate;
}
break;
case "fireBomb" :
if (ammo.ammo <= 5) {
break;
}
ammo.ammo = ammo.ammo - 5;
tag = createBullet("fireBomb", 15);
tag.speed = _root.fireBombSpeed;
tag.damage = _root.fireBombDamage;
tag.radius = _root.fireBombRadius;
tag.fuse = _root.fireBombFuse;
tag.burnTime = _root.fireBombBurnTime;
shotTimer = _root.mineShootRate;
}
}
};
createBullet = function (name, dist) {
tag = field.bullets.attachMovie(name, "bullet" + bulletCount, field.bullets.getNextHighestDepth());
bulletCount++;
tag._x = _parent._x;
tag._y = _parent._y;
tag._x = tag._x + (dist * aMath.cos(_rotation));
tag._y = tag._y + (dist * aMath.sin(_rotation));
tag._rotation = this._rotation;
if (_root.timeFrozen) {
tag.active = false;
} else {
tag.active = true;
}
return(tag);
};
Symbol 75 MovieClip [player] Frame 1
if (!_root.skipHints) {
tag = addHint(this, 10);
tag.text = "this is you.\nSWAD to move.\nmouse to aim and shoot.\nspace to lay a mine.\nP to pause.";
}
var ammoCount = 0;
energy = 100;
energyRegen = 0.1;
player = true;
EFX = 0;
EFY = 0;
secondaryWeaponCount = 0;
weaponPowerUpCount = 0;
speedUpCount = 0;
turretCount = 0;
_xscale = (radius * 2);
_yscale = (radius * 2);
active = true;
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
DX = field._xmouse - _x;
DY = field._ymouse - _y;
gun._rotation = aMath.atan(DY, DX);
if (shooting) {
gun.shoot(shotType);
}
if (gun.ammo.ammo < 24) {
if (ammoRecharge > 0) {
gun.ammo.ammo = gun.ammo.ammo + (ammoRate * 2);
}
gun.ammo.ammo = gun.ammo.ammo + ammoRate;
}
}
for (key in field.evils) {
tag = field.evils[key];
if (tag.active and contact(this, tag)) {
evilHit(tag);
}
}
if (energy <= 0) {
die();
}
if (energy < 100) {
energy = energy + energyRegen;
}
if (!_root.timeFrozen) {
if (splashBullets > 0) {
splashBullets = splashBullets - 0.0166666666666667;
}
if (powerBullets > 0) {
powerBullets = powerBullets - 0.0166666666666667;
}
if (ammoRecharge > 0) {
ammoRecharge = ammoRecharge - 0.0166666666666667;
}
if (secondaryWeaponCount > 0) {
secondaryWeaponCount = secondaryWeaponCount - 0.0166666666666667;
} else if (secondaryWeaponCount <= 0) {
secondaryWeapon = "mine";
}
}
if (active) {
newX = _x + EFX;
newY = _y + EFY;
if ((newX > 0) and (newX < 550)) {
_x = newX;
}
if ((newY > _root.screenT) and (newY < _root.screenB)) {
_y = newY;
}
EFX = EFX * 0.9;
EFY = EFY * 0.9;
}
}
};
evilHit = function (tag) {
energy = energy - tag.damage;
if (energy < 0) {
energy = 0;
}
DX = tag._x - this._x;
DY = tag._y - this._y;
this.EFX = this.EFX + ((-((tag.mass * DX) / this.mass)) / 10);
this.EFY = this.EFY + ((-((tag.mass * DY) / this.mass)) / 10);
tag.EFX = tag.EFX + (((this.mass * DX) / tag.mass) / 10);
tag.EFY = tag.EFY + (((this.mass * DY) / tag.mass) / 10);
tag.playerHit();
};
die = function () {
_root.endGame();
};
activatePowerUp = function (type, time, who) {
switch (type) {
case "splash" :
splashBullets = splashBullets + time;
return;
case "power" :
powerBullets = powerBullets + time;
return;
case "ammoRecharge" :
ammoRecharge = ammoRecharge + time;
return;
case "turret" :
tag = gun.createBullet("turret", 15);
tag._x = who._x;
tag._y = who._y;
tag.shootRate = _root.turretAttackRate;
tag.turn = _root.turretTurn;
tag.bulletSpeed = _root.turretBulletSpeed;
tag.time = _root.turretTime;
tag.mass = _root.turretMass;
tag.damage = _root.turretDamage;
tag.radius = 10;
tag.life = _root.turretLife;
return;
case "heal" :
energy = energy + 50;
if (energy > 100) {
energy = 100;
}
for (key in field.bullets) {
tag = field.bullets[key];
if (tag.life) {
tag.life = tag.baseLife;
}
}
return;
case "fireBomb" :
secondaryWeaponCount = time;
secondaryWeapon = "fireBomb";
return;
case "speedUp" :
if (speedUpCount <= 15) {
speed = speed + 0.2;
}
case "weaponPowerUp" :
if (weaponPowerUpCount <= 15) {
with (_root) {
normalBulletDamage = normalBulletDamage + 0.3;
weaponPowerUpCount++;
normalBulletRadius = normalBulletRadius + 0.05;
mineDamage = mineDamage + 3;
mineRadius = mineRadius + 0.1;
turretAttackDamage = turretAttackDamage + 0.3;
turretDamage = turretDamage + 5;
turretLife = turretLife + 10;
fireBombRadius = fireBombRadius + 0.1;
fireBombDamage = fireBombDamage + 0.00416666666666667;
fireBombBurnTime = fireBombBurnTime + 0.0833333333333333;
}
}
return;
case "freezeTime" :
_root.freezeTime(5);
}
};
levelUp = function () {
};
Symbol 78 MovieClip [explosion] Frame 1
_xscale = (radius * 2);
_yscale = (radius * 2);
Symbol 78 MovieClip [explosion] Frame 15
this.removeMovieClip();
Symbol 81 MovieClip [field] Frame 1
this.createEmptyMovieClip("bullets", this.getNextHighestDepth());
player.swapDepths(this.getNextHighestDepth());
this.createEmptyMovieClip("evils", this.getNextHighestDepth());
this.createEmptyMovieClip("powerups", this.getNextHighestDepth());
this.createEmptyMovieClip("explosions", this.getNextHighestDepth());
burn = function () {
powerups.removeMovieClip();
bullets.removeMovieClip();
evils.removeMovieClip();
explosions.removeMovieClip();
player.removeMovieClip();
this.removeMovieClip();
};
lightOnFire = function () {
_root.onEnterFrame = null;
player.active = false;
a = 100;
d = 0.0555555555555556;
this.onEnterFrame = function () {
_alpha = a;
a = a - d;
if (a < 0) {
burn();
}
};
};
Symbol 85 MovieClip [pointer] Frame 1
this.onEnterFrame = function () {
this._x = _root._xmouse;
this._y = _root._ymouse;
this._rotation = _root.player.gun._rotation;
};
Symbol 85 MovieClip [pointer] Frame 30
stop();
Symbol 85 MovieClip [pointer] Frame 60
stop();
Symbol 87 MovieClip [spawner] Frame 1
var limits = new Array();
this.onEnterFrame = function () {
if (_root.running) {
if (_root.timeFrozen <= 0) {
if (spawning) {
if (timer <= 0) {
type = types[aMath.aRand(chances)];
tag = _root.createEvil(type, level);
A = random(360);
tag._x = ((350 * aMath.cos(A)) + 275) - field._x;
tag._y = ((350 * aMath.sin(A)) + 200) - field._y;
CX = ((_root.screenR - _root.screenL) / 2) - field._x;
CY = ((_root.screenB - _root.screenT) / 2) - field._y;
DX = CX - tag._x;
DY = CY - tag._y;
tag._rotation = aMath.atan(DY, DX) + aMath.sRand(36);
level = level + levelInc;
timer = delay;
} else {
timer--;
}
}
}
}
};
newPhase = function () {
timer = delay;
level = startLevel;
};
newPhase();
Symbol 89 MovieClip [statusBar] Frame 1
i = 0;
while (i < 5) {
tag = attachMovie("timer", "timer" + i, this.getNextHighestDepth());
tag._x = 15;
tag._y = -30 * i;
tag._xscale = 75;
tag._yscale = 75;
tag.G.gotoAndStop(i + 1);
tag._alpha = 50;
tag.pie.set(0);
i++;
}
timer0.target = "field.player.splashBullets";
timer0.mod = 10;
timer1.target = "field.player.powerBullets";
timer1.mod = 10;
timer2.target = "field.player.ammoRecharge";
timer2.mod = 10;
timer3.target = "field.player.secondaryWeaponCount";
timer3.mod = 10;
timer4.target = "_root.timeFrozenTimer";
timer4.mod = 20;
Symbol 95 MovieClip Frame 1
BP._visible = false;
set = function (num) {
if (num < 0) {
num = 0;
}
if (num > 360) {
num = 360;
}
if (num <= 180) {
rightHalf._rotation = 180;
leftHalf._rotation = num;
} else {
rightHalf._rotation = num;
leftHalf._rotation = 180;
}
};
Symbol 103 MovieClip [timer] Frame 1
this.onEnterFrame = function () {
if (eval (target) <= 0) {
_visible = false;
} else {
_visible = true;
pie.set(eval (target) * mod);
}
};
Symbol 106 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.running and _parent._parent.active) {
play();
} else {
stop();
}
};
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 12
stop();
Symbol 109 MovieClip [fireBomb] Frame 1
stop();
bullet = true;
impact = -1;
anim.stop();
_xscale = (radius * 2);
_yscale = (radius * 2);
DX = speed * aMath.cos(_rotation);
DY = speed * aMath.sin(_rotation);
this.cacheAsBitmap = true;
time = fuse;
maxTime = time;
burning = false;
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
if (speed > 0.01) {
_x = (_x + DX);
_y = (_y + DY);
DX = DX * 0.5;
DY = DY * 0.5;
if (!onField(this)) {
this.removeMovieClip();
}
speed = speed * 0.5;
} else if (!burning) {
if (time > 0) {
time = time - 0.0166666666666667;
pie.set(360 - ((time / maxTime) * 360));
} else {
time = burnTime;
burning = true;
BG.play();
}
} else if (time > 0) {
time = time - 0.0166666666666667;
applySplashDamage(_x, _y, damage, 0, radius * 4);
} else {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
this.removeMovieClip();
}
}
}
}
};
Symbol 114 MovieClip [mine] Frame 1
stop();
bullet = true;
impact = -1;
anim.stop();
_xscale = (radius * 2);
_yscale = (radius * 2);
DX = speed * aMath.cos(_rotation);
DY = speed * aMath.sin(_rotation);
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
if (speed > 0.01) {
_x = (_x + DX);
_y = (_y + DY);
DX = DX * 0.5;
DY = DY * 0.5;
if (!onField(this)) {
this.removeMovieClip();
}
speed = speed * 0.5;
} else if (impact > 0) {
impact--;
} else if (impact == 0) {
explode(_x, _y, radius * 3);
applySplashDamage(_x, _y, damage, damage / 5, radius * 5);
this.removeMovieClip();
} else {
for (key in field.evils) {
tag = field.evils[key];
if (tag.active and contact(this, tag, radius * 2)) {
impact = fuse;
anim.play();
}
}
}
}
}
};
Symbol 116 MovieClip [normalBullet] Frame 1
stop();
bullet = true;
_xscale = (radius * 2);
_yscale = (radius * 2);
if (powerBullet) {
speed = speed * 2;
mass = mass * 2;
damage = damage * 2;
_xscale = (_xscale * 2);
}
if (splash) {
_yscale = (_yscale * 1.5);
}
XS = speed * aMath.cos(_rotation);
YS = speed * aMath.sin(_rotation);
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
_x = (_x + XS);
_y = (_y + YS);
if (!onField(this)) {
this.removeMovieClip();
}
for (key in field.evils) {
tag = field.evils[key];
if (tag.active and contact(this, tag)) {
if (splash) {
applySplashDamage(_x, _y, damage, 0, radius * 3);
explode(_x, _y, radius * 5);
} else {
tag.hit(this);
explode(_x, _y, radius * 3);
}
this.removeMovieClip();
}
}
}
}
};
Symbol 119 MovieClip Frame 1
this.onEnterFrame = function () {
R = (_parent.life / _parent.baseLife) * 100;
D = R - _xscale;
_xscale = (_xscale + (D / 5));
_xscale = ((_xscale < 0) ? 0 : (_xscale));
_yscale = _xscale;
};
Symbol 120 MovieClip [turret] Frame 1
stop();
bullet = true;
shootTimer = 0;
maxTime = time;
baseLife = life;
_xscale = (radius * 2);
_yscale = (radius * 2);
spin = aMath.sRand(100) / 25;
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
_rotation = (_rotation + spin);
for (key in field.evils) {
tag = field.evils[key];
if (tag.active and contact(this, tag)) {
evilHit(tag);
}
}
if (shootTimer <= 0) {
target = findTarget();
if (target.active) {
tag = createBullet();
DX = target._x - this._x;
DY = target._y - this._y;
tag._rotation = aMath.atan(DY, DX);
this.swapDepths(tag);
shootTimer = shootRate + aMath.sRand(15);
}
}
shootTimer--;
}
}
};
evilHit = function (what) {
DX = what._x - this._x;
DY = what._y - this._y;
tag.EFX = tag.EFX + (((this.mass * DX) / what.mass) / 10);
tag.EFY = tag.EFY + (((this.mass * DY) / what.mass) / 10);
this.life = this.life - (what.damage * 2);
what.playerHit();
if (life < 0) {
die();
}
};
die = function () {
_alpha = 75;
explode(_x, _y, 30);
applySplashDamage(_x, _y, damage, damage / 5, radius / 2);
this.onEnterFrame = function () {
_alpha = (_alpha - 5);
if (_alpha < 0) {
this.removeMovieClip();
}
};
};
findTarget = function () {
var _local1 = [];
for (key in field.evils) {
tag = field.evils[key];
if (tag.active and tag.beenInside) {
_local1.push(tag);
}
}
target = _local1[random(_local1.length)];
return(target);
};
createBullet = function () {
tag = field.bullets.attachMovie("normalBullet", "bullet" + field.player.gun.bulletCount, field.bullets.getNextHighestDepth());
field.player.gun.bulletCount++;
tag._x = this._x;
tag._y = this._y;
tag._x = tag._x + aMath.cos(gun._rotation);
tag._y = tag._y + aMath.sin(gun._rotation);
tag.radius = _root.normalBulletRadius * 1.5;
tag.speed = bulletSpeed;
tag.damage = _root.turretAttackDamage;
tag.mass = _root.normalBulletMass * 0.75;
tag.splash = false;
tag.active = true;
return(tag);
};
Symbol 122 MovieClip [boulderEvil] Frame 1
var evil = true;
var active = true;
var beenInside = false;
radius = 150 + (0.5 * (level - 1));
life = 1000 + (25 * (level - 1));
speed = 0.03;
mass = 60 + (0.166666666666667 * (level - 1));
damage = radius / 20;
baseLife = life;
baseRadius = radius;
score = life / 2;
_xscale = (radius * 2);
_yscale = (radius * 2);
switch (random(4)) {
case 0 :
_x = (((_root.screenL - field._x) - radius) - 20);
_y = (((_root.screenB - _root.screenT) / 2) - field._y);
X = field.R;
Y = random(field.B - field.T) + field.T;
break;
case 1 :
_x = (((_root.screenR - _root.screenL) / 2) - field._x);
_y = (((_root.screenT - field._y) - radius) - 20);
X = random(field.R - field.L) + field.L;
Y = field.B;
break;
case 2 :
_x = (((_root.screenR - field._x) + radius) + 20);
_y = (((_root.screenB - _root.screenT) / 2) - field._y);
X = field.L;
Y = random(field.B - field.T) + field.T;
break;
case 3 :
_x = (((_root.screenR - _root.screenL) / 2) - field._x);
_y = (((_root.screenB - field._y) + radius) + 20);
X = random(field.R - field.L) + field.L;
Y = field.T;
}
EFX = 0;
EFY = 0;
DX = X - this._x;
DY = Y - this._y;
_rotation = aMath.atan(DY, DX);
DX = speed * aMath.cos(_rotation);
DY = speed * aMath.sin(_rotation);
i = 0;
while (i < ((level + 60) / 30)) {
tag = _root.createEvil("cannon", level);
tag.A = random(360);
tag.father = this;
tag.active = true;
i++;
}
_root.spawner.spawning = false;
XL = _x;
YL = _y;
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
if (beenInside) {
if (!onField(this)) {
_root.spawner.spawning = true;
this.removeMovieClip();
}
} else if (onScreen(this)) {
beenInside = true;
}
if (blink > 0) {
blink--;
} else if (blink == 0) {
blink--;
endBlink();
}
if (life <= 0) {
die();
}
XL = XL + DX;
YL = YL + DY;
_x = XL;
_y = YL;
}
}
};
hit = function (byWhat) {
life = life - ((blink > 0) ? (byWhat.damage * 1.5) : (byWhat.damage));
startBlink(2);
};
die = function () {
_root.score = _root.score + score;
field.player.levelUp();
active = false;
_root.spawner.spawning = true;
BDX = ((_root.screenR - _root.screenL) / 2) - this._x;
BDY = ((_root.screenB - _root.screenT) / 2) - this._y;
A = aMath.atan(BDY, BDX);
i = 0;
while (i < ((level + 50) / 25)) {
R = A + aMath.sRand(36);
X = radius * aMath.cos(R);
Y = radius * aMath.sin(R);
tag = dropPowerup("random");
tag._x = _x + X;
tag._y = _y + Y;
i++;
}
this.onEnterFrame = function () {
if (_root.running) {
_alpha = (_alpha - 5);
_xscale = (_xscale * 0.99);
_yscale = (_yscale * 0.99);
if (_alpha < 0) {
this.removeMovieClip();
}
_x = (_x + XS);
_y = (_y + YS);
}
};
};
startBlink = function (time) {
blink = time;
_alpha = 85;
};
endBlink = function () {
_alpha = 100;
};
Symbol 124 MovieClip [cannonEvil] Frame 1
var evil = true;
radius = 15;
life = father.life;
mass = 60;
damage = 2;
score = father.score / 10;
dir = aMath.sRand(500) / 250;
dir = dir * 2;
baseDir = dir;
baseLife = life;
spin = aMath.sRand(500) / 500;
_rotation = A;
mode = "orbiting";
R = father.radius;
blink = 0;
_xscale = (radius * 2);
_yscale = (radius * 2);
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
orbit();
switch (mode) {
case "orbiting" :
A = A + dir;
_rotation = A;
if (!random(360)) {
mode = "stoping";
}
break;
case "stoping" :
dir = dir * 0.94;
A = A + dir;
_rotation = A;
if (Math.abs(dir) < 0.01) {
mode = "spinning";
}
break;
case "spinning" :
spin = spin * 1.05;
_rotation = (_rotation + spin);
if (Math.abs(spin) > 24) {
mode = "shooting";
offset = 12;
time = random(240) / 60;
}
break;
case "shooting" :
_rotation = (_rotation + spin);
if (shootTimer <= 0) {
tag = createBullet();
tag._x = _x;
tag._y = _y;
DX = field.player._x - tag._x;
DY = field.player._y - tag._y;
tag._rotation = aMath.atan(DY, DX) + (aMath.sRand(offset * 10) / 10);
offset = offset * 0.85;
shootTimer = 0.25;
}
shootTimer = shootTimer - 0.0166666666666667;
time = time - 0.0166666666666667;
if (time <= 0) {
mode = "unspinning";
}
break;
case "unspinning" :
spin = spin / 1.3;
_rotation = (_rotation + spin);
if (Math.abs(spin) < 0.1) {
mode = "unstoping";
_rotation = A;
}
break;
case "unstoping" :
dir = dir / 0.9;
A = A + dir;
_rotation = A;
if (Math.abs(dir) <= Math.abs(baseDir)) {
break;
}
mode = "orbiting";
}
if ((life <= 0) or (!father.active)) {
die();
}
if (blink > 0) {
blink--;
} else if (blink == 0) {
blink--;
endBlink();
}
}
}
};
createBullet = function () {
tag = _root.createEvil("bullet", 0);
tag.radius = 7;
tag.speed = 5;
tag.damage = 15;
tag.mass = 100;
tag.active = true;
return(tag);
};
orbit = function () {
_x = father._x;
_y = father._y;
_x = (_x + ((radius + R) * aMath.cos(A)));
_y = (_y + ((radius + R) * aMath.sin(A)));
};
hit = function (byWhat) {
dmg = byWhat.damage;
if (blink > 0) {
dmg = dmg * 1.5;
}
life = life - dmg;
startBlink(2);
};
die = function () {
_root.score = _root.score + score;
field.player.levelUp();
active = false;
if (random(100) < (_root.powerupChance * 2)) {
tag = dropPowerup("random");
tag._x = _x;
tag._y = _y;
}
this.onEnterFrame = function () {
if (_root.running) {
active = false;
_alpha = (_alpha - 5);
_xscale = (_xscale * 0.99);
_yscale = (_yscale * 0.99);
if (_alpha < 0) {
this.removeMovieClip();
}
}
};
};
startBlink = function (time) {
blink = time;
_alpha = 85;
};
endBlink = function () {
_alpha = 100;
};
Symbol 126 MovieClip [evilBullet] Frame 1
stop();
evil = true;
_xscale = (radius * 2);
_yscale = (radius * 2);
score = 1;
XS = speed * aMath.cos(_rotation);
YS = speed * aMath.sin(_rotation);
beenInside = false;
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
_x = (_x + XS);
_y = (_y + YS);
if (beenInside) {
if (!onField(this)) {
this.removeMovieClip();
}
} else if (onScreen(this)) {
beenInside = true;
}
}
}
};
playerHit = function (byWhat) {
explode(_x, _y, radius * 2);
die();
};
hit = function (byWhat) {
die();
};
die = function () {
active = false;
_root.score = _root.score + score;
if (random(100) < _root.powerupChance) {
tag = dropPowerup("random");
tag._x = _x;
tag._y = _y;
}
this.onEnterFrame = function () {
if (_root.running) {
active = false;
_alpha = (_alpha - 5);
_xscale = (_xscale * 0.99);
_yscale = (_yscale * 0.99);
if (_alpha < 0) {
this.removeMovieClip();
}
_x = (_x + XS);
_y = (_y + YS);
XS = XS * 0.9;
YS = YS * 0.9;
}
};
};
Symbol 128 MovieClip [rockEvil] Frame 1
var evil = true;
var active = true;
var beenInside = false;
radius = 30 + (0.166666666666667 * (level - 1));
life = 10 + (1 * (level - 1));
speed = 0.1 + (0.00833333333333333 * (level - 1));
mass = 60 + (0.166666666666667 * (level - 1));
damage = radius / 2;
score = life;
baseLife = life;
_xscale = (radius * 2);
_yscale = (radius * 2);
baseLife = life;
EFX = 0;
EFY = 0;
blink = 0;
X = random(field.R - field.L) + field.L;
Y = random(field.B - field.T) + field.T;
DX = X - this._x;
DY = Y - this._y;
_rotation = aMath.atan(DY, DX);
DX = speed * aMath.cos(_rotation);
DY = speed * aMath.sin(_rotation);
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
if (beenInside) {
if (!onField(this)) {
this.removeMovieClip();
}
} else if (onScreen(this)) {
beenInside = true;
}
if (life <= 0) {
die();
}
if (blink > 0) {
blink--;
} else if (blink == 0) {
blink--;
endBlink();
}
_x = (_x + (DX + EFX));
_y = (_y + (DY + EFY));
EFX = EFX * 0.9;
EFY = EFY * 0.9;
}
}
};
hit = function (byWhat) {
dmg = byWhat.damage;
if (blink > 0) {
dmg = dmg * 1.5;
}
speed = speed - (dmg / baseLife);
if (speed < 0) {
speed = 0;
}
DX = speed * aMath.cos(_rotation);
DY = speed * aMath.sin(_rotation);
life = life - dmg;
startBlink(2);
};
die = function () {
_root.score = _root.score + score;
field.player.levelUp();
active = false;
if (random(100) < _root.powerupChance) {
tag = dropPowerup("random");
tag._x = _x;
tag._y = _y;
}
this.onEnterFrame = function () {
if (_root.running) {
active = false;
_alpha = (_alpha - 5);
_xscale = (_xscale * 0.99);
_yscale = (_yscale * 0.99);
if (_alpha < 0) {
this.removeMovieClip();
}
_x = (_x + (DX + EFX));
_y = (_y + (DY + EFY));
EFX = EFX * 0.9;
EFY = EFY * 0.9;
}
};
};
startBlink = function (time) {
blink = time;
_alpha = 85;
};
endBlink = function () {
_alpha = 100;
};
Symbol 131 MovieClip [trackerEvil] Frame 1
var evil = true;
var active = true;
var beenInside = false;
radius = 10 + (0.0666666666666667 * (level - 1));
life = 1 + (0.08 * (level - 1));
speed = 1 + (0.0142857142857143 * (level - 1));
turn = 0.1 + (0.0666666666666667 * (level - 1));
mass = 10 + (0.0333333333333333 * (level - 1));
damage = 10;
score = life;
baseLife = life;
_xscale = (radius * 2);
_yscale = (radius * 2);
baseLife = life;
EFX = 0;
EFY = 0;
blink = 0;
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
if (_root.running) {
if (active) {
DX = target._x - this._x;
DY = target._y - this._y;
DX = DX + aMath.sRand(Math.abs(DY));
DY = DY + aMath.sRand(Math.abs(DX));
R = this._rotation;
A = aMath.atan(DY, DX);
D = A - R;
if (D > 180) {
D = -360 + D;
}
if (D < -180) {
D = 360 - D;
}
D = aMath.limit(-turn, D, turn);
_rotation = (_rotation + D);
FX = speed * aMath.cos(_rotation);
FY = speed * aMath.sin(_rotation);
if (beenInside) {
if (!onField(this)) {
this.removeMovieClip();
}
} else if (onScreen(this)) {
beenInside = true;
}
if (life <= 0) {
die();
}
if (blink > 0) {
blink--;
} else if (blink == 0) {
blink--;
endBlink();
}
_x = (_x + (FX + EFX));
_y = (_y + (FY + EFY));
EFX = EFX * 0.9;
EFY = EFY * 0.9;
}
}
};
hit = function (byWhat) {
dmg = byWhat.damage;
if (blink > 0) {
dmg = dmg * 1.5;
}
speed = speed - (dmg / baseLife);
if (speed < 0) {
speed = 0;
}
turn = turn - dmg;
if (turn < 0) {
turn = 0;
}
life = life - dmg;
startBlink(2);
};
die = function () {
active = false;
dying = true;
if (random(100) < _root.powerupChance) {
tag = dropPowerup("random");
tag._x = _x;
tag._y = _y;
}
};
die = function () {
_root.score = _root.score + score;
field.player.levelUp();
active = false;
if (random(100) < _root.powerupChance) {
tag = dropPowerup("random");
tag._x = _x;
tag._y = _y;
}
this.onEnterFrame = function () {
if (_root.running) {
active = false;
_alpha = (_alpha - 5);
_xscale = (_xscale * 0.99);
_yscale = (_yscale * 0.99);
if (_alpha < 0) {
this.removeMovieClip();
}
_x = (_x + (FX + EFX));
_y = (_y + (FY + EFY));
EFX = EFX * 0.9;
EFY = EFY * 0.9;
}
};
};
startBlink = function (time) {
blink = time;
_alpha = 85;
};
endBlink = function () {
_alpha = 100;
};
Symbol 140 MovieClip Frame 1
level_TF.text = Math.round(_root.score) + ".";
time_TF.text = Math.round(_root.frameCount / 60) + " seconds.";
again_B.onRelease = function () {
_parent.play();
};
Symbol 141 MovieClip [gameOver] Frame 1
this.onEnterFrame = function () {
music.setVolume(music.getVolume() - 4);
};
Symbol 141 MovieClip [gameOver] Frame 30
stop();
music.stop();
delete music;
Symbol 141 MovieClip [gameOver] Frame 31
field.d = 5;
Symbol 141 MovieClip [gameOver] Frame 60
field.burn();
_root.statusBar.removeMovieClip();
_root.spawner.removeMovieClip();
_root.pointer.removeMovieClip();
_root.gotoAndPlay(3);
this.removeMovieClip();
Symbol 144 MovieClip [hint] Frame 1
TF.autoSize = true;
TF.bold = true;
TF.text = text;
BG._xscale = TF._width;
BG._yscale = TF._height;
bubbleUp = function () {
i = 0;
while ((this != _root.getInstanceAtDepth(_root.getNextHighestDepth())) and (i < 100)) {
this.swapDepths(_root.getNextHighestDepth());
i++;
}
};
this.onEnterFrame = function () {
bubbleUp();
DX = target._x - this._x;
DY = target._y - this._y;
this._x = this._x + (DX / 15);
this._y = this._y + (DY / 15);
if (this._x < _root.screenL) {
this._x = screenL;
}
if (this._x > (_root.screenR - TF._width)) {
this._x = _root.screenR - TF._width;
}
if (this._y < _root.screenT) {
this._y = screenT;
}
if (this._y > (_root.screenB - TF._height)) {
this._y = _root.screenB - TF._height;
}
if (time > 0) {
time = time - 0.0166666666666667;
} else if ((time <= 0) and (time > -1)) {
die();
}
if (!eval (target)) {
die();
}
};
die = function () {
this.onEnterFrame = function () {
_x = (_x + (DX / 10));
_y = (_y + (DY / 10));
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.removeMovieClip();
}
};
};
Symbol 156 MovieClip Frame 1
_parent.type = "splash";
Symbol 156 MovieClip Frame 2
_parent.type = "power";
Symbol 156 MovieClip Frame 3
_parent.type = "ammoRecharge";
Symbol 156 MovieClip Frame 4
_parent.type = "turret";
Symbol 156 MovieClip Frame 5
_parent.type = "heal";
Symbol 156 MovieClip Frame 6
_parent.type = "fireBomb";
Symbol 156 MovieClip Frame 7
if (field.player.speedUpCount > 15) {
_parent.chooseRandom();
} else {
_parent.type = "speedUp";
}
Symbol 156 MovieClip Frame 8
if (field.player.weaponPowerUpCount > 15) {
_parent.chooseRandom();
} else {
_parent.type = "weaponPowerUp";
}
Symbol 156 MovieClip Frame 9
_parent.type = "freezeTime";
Symbol 157 MovieClip [powerup] Frame 1
if (!onField(this)) {
this.removeMovieClip();
}
taken = false;
bonus = true;
_xscale = (radius * 2);
_yscale = (radius * 2);
rotate = (random(2) ? -1 : 1);
chooseRandom = function () {
graphic.gotoAndStop(aMath.aRand([10, 10, 10, 20, 10, 10, 10, 10, 10]) + 1);
};
if (type == "random") {
chooseRandom();
} else {
graphic.gotoAndStop(type);
}
Symbol 157 MovieClip [powerup] Frame 30
stop();
time = 10;
this.onEnterFrame = function () {
if (_root.running) {
_rotation = (_rotation + rotate);
if (!taken) {
time = time - 0.0166666666666667;
if (time <= 0) {
delete this.onEnterFrame;
play();
}
if (contact(this, field.player)) {
taken = true;
field.player.activatePowerUp(type, 20, this);
}
} else {
gotoAndPlay (65);
delete this.onEnterFrame;
}
}
};
flag = ("_root." + type) + "powerupHinted";
if ((!_root.skipHints) and (!eval (flag))) {
tag = addHint(this, 10);
switch (type) {
case "splash" :
tag.text = "this adds splash demage to your bullets, for a limited time.";
break;
case "power" :
tag.text = "this makes your bullets stronger, for a limited time.";
break;
case "ammoRecharge" :
tag.text = "this increases your reload rate, for a limited time.";
break;
case "turret" :
tag.text = "this creates a turret that attackes enemies.";
break;
case "heal" :
tag.text = "this heals you and the turrets.";
break;
case "fireBomb" :
tag.text = "this makes you shoot fire bombs instead of mines, for a limited time.";
break;
case "speedUp" :
tag.text = "this makes you a little faster, permanently.";
break;
case "weaponPowerUp" :
tag.text = "this makes your bullets, mines, and firebombs a little better, permanently.";
break;
case "freezeTime" :
tag.text = "this freezes the time for a few seconds.";
}
Set(flag, true);
}
Symbol 157 MovieClip [powerup] Frame 60
this.removeMovieClip();
Symbol 157 MovieClip [powerup] Frame 95
this.removeMovieClip();
Symbol 160 MovieClip Frame 1
time = getTimer();
prevFrameTime = 0;
this.onEnterFrame = function () {
frameTime = getTimer() - time;
frameTime = 1 / (frameTime / 1000);
if (((frameTime + prevFrameTime) / 2) < 30) {
_root._quality = "LOW";
} else if (((frameTime + prevFrameTime) / 2) > 55) {
_root._quality = "MEDIUM";
}
time = getTimer();
prevFrameTime = frameTime;
};
Symbol 162 MovieClip Frame 1
this.onEnterFrame = function () {
level_TF.text = Math.round(_root.score);
};