Frame 1
skipArmor = false;
stop();
var loadMsg = ("0 / " + _root.getBytesTotal());
onEnterFrame = function () {
loadMsg = (_root.getBytesLoaded() + " / ") + _root.getBytesTotal();
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
if (skipArmor == false) {
gotoAndStop (3);
} else {
gotoAndStop (5);
}
_root.kongregateServices.connect();
}
};
var rcMenu = new ContextMenu();
rcMenu.hideBuiltInItems();
_root.menu = rcMenu;
Frame 4
gotoAndStop (5);
Frame 5
function __rankz_send__(par1, par2, par3, par4) {
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
par227.flashkey = par227.flashkey.split("=").join("");
par227.SU0249 = par227.SU0249.split("=").join("");
par228.onLoad = function (success) {
if (success) {
trace(par228.msg);
} else {
trace(par228.loaded);
}
};
par227.sendAndLoad("http://rankz.armorbot.com/submit/", par228, "POST");
var _local1 = getTimer();
while ((getTimer() - _local1) < 1500) {
}
getURL ("http://rankz.armorbot.com/dodgegame/", "_blank", "GET");
}
MovieClip.prototype.drawEllipse = function (xRadius, yRadius, centerX, centerY, sides) {
this.moveTo(centerX + xRadius, centerY);
var _local2 = 0;
while (_local2 <= sides) {
var _local8 = _local2 / sides;
var _local3 = (_local8 * 2) * Math.PI;
var _local6 = Math.cos(_local3);
var _local4 = Math.sin(_local3);
var _local7 = centerX + (_local6 * xRadius);
var _local5 = centerY + (_local4 * yRadius);
this.lineTo(_local7, _local5);
_local2++;
}
};
var rcMenu = new ContextMenu();
rcMenu.hideBuiltInItems();
_root.menu = rcMenu;
var pauseListener = new Object();
pauseListener.onKeyDown = function () {
if (Key.getAscii() == 112) {
if (LevelManager.isPausable()) {
if (Stepper.isPaused()) {
Stepper.unpause();
_root.mainMenu._visible = false;
_root.mainMenu.swapDepths(-112);
_root.mainMenu._alpha = 100;
} else {
Stepper.pause();
_root.mainMenu._visible = true;
_root.mainMenu.swapDepths(_root.getNextHighestDepth());
_root.mainMenu._alpha = 50;
}
}
} else if (Key.getAscii() == 109) {
SoundManager.mute();
}
};
Key.addListener(pauseListener);
attachMovie("gridbg", "bg", -10);
var debrisField = new DebrisField();
var effects;
var stepper = new Stepper();
var player = new Player(400, 300);
var lm = new LevelManager();
var hm = new HudManager();
effects = 1;
_quality = "MEDIUM";
Stepper.pause();
stop();
onEnterFrame = function () {
stepper.stepAll();
};
Instance of Symbol 136 MovieClip "mainMenu" in Frame 5
onClipEvent (load) {
this.swapDepths(_root.getNextHighestDepth());
}
Symbol 137 MovieClip [__Packages.ScoreManager] Frame 0
class ScoreManager
{
function ScoreManager () {
}
static function getScore() {
return(score);
}
static function getMultiplier() {
return(multiplier);
}
static function resetMultiplier() {
multiplier = 1;
_root.kongregateStats.submit("LongestStreak", streak);
streak = 1;
}
static function incrementMultiplier() {
if (multiplier < 8) {
multiplier++;
}
streak++;
}
static function addScore(num) {
score = score + (num * multiplier);
}
static function resetScore() {
score = 0;
multiplier = 1;
}
static function subtractHealthScore() {
if (score >= 25000) {
score = score - 25000;
return(true);
}
return(false);
}
static var score = 0;
static var multiplier = 1;
static var streak = 1;
}
Symbol 138 MovieClip [__Packages.LevelManager] Frame 0
class LevelManager extends MovieClip
{
static var wm, title, displayBox;
function LevelManager () {
super();
signal();
}
static function addStuffTest() {
wm = new WaveManager(210, 360);
var _local1 = 0;
while (_local1 < (3 * level)) {
wm.push("Enemy");
_local1++;
}
_local1 = 0;
while (_local1 < ((2 * level) - 2)) {
wm.push("MovingEnemy");
_local1++;
}
_local1 = 0;
while (_local1 < ((1.5 * level) - 3)) {
wm.push("SelfDestructingEnemy");
_local1++;
}
_local1 = 0;
while (_local1 < ((0.5 * level) - 1.5)) {
wm.push("TeleportingEnemy");
_local1++;
}
_local1 = 0;
while (_local1 < ((0.5 * level) - 2)) {
wm.push("StraightEnemy");
_local1++;
}
}
static function populateWave() {
switch (level) {
case 1 :
title = "Getting your feet wet";
wm = new WaveManager(60, 120, 1);
var _local1 = 0;
while (_local1 < 6) {
wm.push("Enemy");
_local1++;
}
break;
case 2 :
title = "Here they come!";
wm = new WaveManager(90, 150, 2);
_local1 = 0;
while (_local1 < 12) {
wm.push("Enemy");
_local1++;
}
break;
case 3 :
title = "New and improved!";
wm = new WaveManager(60, 120, 1);
_local1 = 0;
while (_local1 < 6) {
wm.push("Enemy");
_local1++;
}
wm.push("MovingEnemy");
wm.push("MovingEnemy");
break;
case 4 :
title = "Medley";
wm = new WaveManager(90, 150, 2);
_local1 = 0;
while (_local1 < 6) {
wm.push("Enemy");
wm.push("MovingEnemy");
_local1++;
}
break;
case 5 :
title = "Restless";
wm = new WaveManager(60, 90, 1);
_local1 = 0;
while (_local1 < 8) {
wm.push("MovingEnemy");
_local1++;
}
break;
case 6 :
title = "Suicidal";
wm = new WaveManager(60, 90, 1);
_local1 = 0;
while (_local1 < 6) {
wm.push("Enemy");
wm.push("MovingEnemy");
_local1++;
}
_local1 = 0;
while (_local1 < 3) {
wm.push("SelfDestructingEnemy");
_local1++;
}
break;
case 7 :
title = "Escalation";
wm = new WaveManager(90, 150, 2);
_local1 = 0;
while (_local1 < 8) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
_local1++;
}
break;
case 8 :
title = "They come in threes";
wm = new WaveManager(120, 180, 3);
_local1 = 0;
while (_local1 < 10) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
_local1++;
}
break;
case 9 :
title = "Just dodge";
wm = new WaveManager(420, 420, 4);
_local1 = 0;
while (_local1 < 12) {
wm.push("SelfDestructingEnemy");
_local1++;
}
break;
case 10 :
title = "Huh?";
wm = new WaveManager(90, 150, 2);
_local1 = 0;
while (_local1 < 6) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
_local1++;
}
_local1 = 0;
while (_local1 < 3) {
wm.push("TeleportingEnemy");
wm.push("SelfDestructingEnemy");
_local1++;
}
break;
case 11 :
title = "Medley II";
wm = new WaveManager(120, 180, 3);
_local1 = 0;
while (_local1 < 12) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
wm.push("TeleportingEnemy");
_local1++;
}
break;
case 12 :
title = "Green mayhem";
wm = new WaveManager(90, 150, 2);
_local1 = 0;
while (_local1 < 12) {
wm.push("TeleportingEnemy");
wm.push("SelfDestructingEnemy");
_local1++;
}
break;
case 13 :
title = "Lucky thirteen";
wm = new WaveManager(60, 90, 13);
_local1 = 0;
while (_local1 < 4) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
wm.push("TeleportingEnemy");
_local1++;
}
wm.push("Enemy");
break;
case 14 :
title = "Four of 'em";
wm = new WaveManager(150, 210, 4);
_local1 = 0;
while (_local1 < 20) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
wm.push("TeleportingEnemy");
_local1++;
}
break;
case 15 :
title = "Don't blink!";
wm = new WaveManager(60, 90, 2);
_local1 = 0;
while (_local1 < 50) {
wm.push("TeleportingEnemy");
_local1++;
}
break;
case 16 :
title = "Snipers";
wm = new WaveManager(90, 150, 2);
_local1 = 0;
while (_local1 < 6) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
wm.push("TeleportingEnemy");
_local1++;
}
_local1 = 0;
while (_local1 < 3) {
wm.push("StraightEnemy");
_local1++;
}
break;
case 17 :
title = "Medley III";
wm = new WaveManager(120, 180, 3);
_local1 = 0;
while (_local1 < 12) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
wm.push("TeleportingEnemy");
wm.push("StraightEnemy");
_local1++;
}
_local1 = 0;
while (_local1 < 3) {
wm.push("SelfDestructingEnemy");
_local1++;
}
break;
case 18 :
title = "Citrus";
wm = new WaveManager(90, 150, 2);
_local1 = 0;
while (_local1 < 15) {
wm.push("StraightEnemy");
_local1++;
}
break;
case 19 :
title = "Last stand";
wm = new WaveManager(150, 240, 5);
_local1 = 0;
while (_local1 < 20) {
wm.push("Enemy");
wm.push("MovingEnemy");
wm.push("SelfDestructingEnemy");
wm.push("TeleportingEnemy");
wm.push("StraightEnemy");
_local1++;
}
break;
case 20 :
title = "Back to the beginning";
wm = new FinaleWaveManager();
}
}
static function resetPlayer() {
_root.player.getMovie()._x = Stage.width >> 1;
_root.player.getMovie()._y = Stage.height >> 1;
_root.player.getMovie()._rotation = 0;
}
static function start() {
pausable = true;
displayBox.removeMovieClip();
_root.debrisField.dimField();
Stepper.unpause();
}
static function signal() {
pausable = false;
_root.kongregateStats.submit("MaxLevel", level);
level++;
wm.die();
populateWave();
Stepper.pause();
resetPlayer();
display((("Level " + level) + ": ") + title);
}
static function signalFinished() {
_root.kongregateStats.submit("GameComplete", 1);
ScoreManager.addScore(ScoreManager.getScore() * 0.1);
restart();
displayScore("Congratulations! You win!");
}
static function signalDeath() {
restart();
displayScore("You died!");
}
static function restart() {
_root.kongregateStats.submit("Score", ScoreManager.getScore());
pausable = false;
level = 0;
wm.die();
wm = null;
var _local3 = 0;
while (_local3 < 10) {
var _local2 = 0;
while (_local2 < Enemy.enemies.size()) {
Enemy.enemies.get(_local2).die();
_local2++;
}
_local2 = 0;
while (_local2 < Missile.missiles.size()) {
Missile.missiles.get(_local2).die();
_local2++;
}
_local3++;
}
_root.player.die();
_root.hm = new HudManager();
}
static function display(msg) {
displayBox = _root.attachMovie("levelDisplayBox", "levelDisplayBox" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
displayBox._x = Stage.width >> 1;
displayBox._y = Stage.height >> 1;
displayBox.lvlText = msg;
}
static function displayScore(msg) {
displayBox = _root.attachMovie("scoreDisplayBox", "scoreDisplayBox" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
displayBox._x = Stage.width >> 1;
displayBox._y = Stage.height >> 1;
displayBox.score = "Score: " + ScoreManager.getScore();
displayBox.lvlText = msg;
}
static function isPausable() {
return(pausable);
}
static var level = 0;
static var pausable = false;
}
Symbol 139 MovieClip [__Packages.Steppable] Frame 0
interface Steppable
{
}
Symbol 140 MovieClip [__Packages.WaveManager] Frame 0
class WaveManager implements Steppable
{
var enemyList, minTime, maxTime, releaseTime;
function WaveManager (minTime, maxTime, maxPerWave) {
enemyList = new Array();
this.minTime = minTime;
this.maxTime = maxTime;
if (maxPerWave != null) {
this.maxPerWave = maxPerWave;
}
releaseTime = CustomMath.randomRange(minTime, maxTime);
timer = releaseTime - 30;
Stepper.add(this);
}
function step() {
if (timer > releaseTime) {
releaseEnemies();
timer = 0;
} else {
if ((enemyList.size() <= 0) && (isDone())) {
SoundManager.endLevel();
LevelManager.signal();
die();
}
timer++;
}
}
function push(e) {
enemyList.push(e);
shuffle();
}
function clear() {
enemyList = new Array();
}
function shuffle() {
var _local5 = 0;
while (_local5 < 3) {
var _local2 = 0;
while (_local2 < enemyList.length) {
var _local3 = enemyList[_local2];
var _local4;
_local4 = random(enemyList.length);
enemyList[_local2] = enemyList[_local4];
enemyList[_local4] = _local3;
_local2++;
}
_local5++;
}
}
function releaseEnemies() {
var _local5 = CustomMath.randomRange(1, maxPerWave);
var _local3 = 0;
while (_local3 < maxPerWave) {
if (enemyList.length <= 0) {
return(undefined);
}
var _local4 = enemyList.pop();
var _local2 = getRandomPoint();
switch (_local4) {
case "Enemy" :
new Enemy(_local2.x, _local2.y);
break;
case "MovingEnemy" :
new MovingEnemy(_local2.x, _local2.y);
break;
case "SelfDestructingEnemy" :
new SelfDestructingEnemy(_local2.x, _local2.y);
break;
case "TeleportingEnemy" :
new TeleportingEnemy(_local2.x, _local2.y);
break;
case "StraightEnemy" :
new StraightEnemy(_local2.x, _local2.y);
break;
default :
new Enemy(_local2.x, _local2.y);
}
_local3++;
}
}
function getRandomPoint() {
var _local2;
var _local1;
if (Math.random() < 0.5) {
_local1 = CustomMath.randomRange(-30, Stage.height + 30);
if (Math.random() < 0.5) {
_local2 = CustomMath.randomRange(-40, -20);
} else {
_local2 = CustomMath.randomRange(Stage.width + 20, Stage.width + 40);
}
} else {
_local2 = CustomMath.randomRange(-30, Stage.width + 30);
if (Math.random() < 0.5) {
_local1 = CustomMath.randomRange(-40, -20);
} else {
_local1 = CustomMath.randomRange(Stage.height + 20, Stage.height + 40);
}
}
return(new flash.geom.Point(_local2, _local1));
}
function getRandomX() {
if (Math.random() < 0.5) {
return((Math.random() * 30) - 20);
}
return((Math.random() * 30) + Stage.width);
}
function getRandomY() {
if (Math.random() < 0.5) {
return((Math.random() * 30) - 20);
}
return((Math.random() * 30) + Stage.height);
}
function isDone() {
if ((((enemyList <= 0) && (Missile.missiles.size() <= 0)) && (Enemy.enemies.size() <= 0)) && (!dead)) {
endTimer++;
}
return(endTimer >= 105);
}
function die() {
dead = true;
Stepper.remove(this);
}
var maxPerWave = 3;
var timer = 0;
var dead = false;
var endTimer = 0;
}
Symbol 141 MovieClip [__Packages.CustomMath] Frame 0
class CustomMath
{
function CustomMath () {
}
static function degToRad(n) {
return((Math.PI * n) / 180);
}
static function radToDeg(n) {
return((n * 180) / Math.PI);
}
static function isInStage(mc) {
return(!((((mc._x < -50) || (mc._x > (Stage.width + 50))) || (mc._y < -50)) || (mc._y > (Stage.height + 50))));
}
static function getAngleToPlayer(x, y) {
return(radToDeg(Math.atan2(_root.player.getCoords().y - y, _root.player.getCoords().x - x)));
}
static function randomRange(min, max) {
var _local1 = max - min;
return((Math.random() * (_local1 + 1)) + min);
}
}
Symbol 142 MovieClip [__Packages.ObjectList] Frame 0
class ObjectList
{
var list, pos;
function ObjectList () {
list = new Array();
pos = 0;
}
function add(o) {
if (indexOf(o) < 0) {
list[pos] = o;
pos++;
}
}
function get(index) {
return(list[index]);
}
function remove(o) {
var _local2 = indexOf(o);
if (_local2 >= 0) {
list[_local2] = list[--pos];
}
}
function getLength() {
return(pos);
}
function size() {
return(pos);
}
function indexOf(o) {
var _local2 = 0;
while (_local2 < list.length) {
if (o == list[_local2]) {
return(_local2);
}
_local2++;
}
return(-1);
}
function toArray() {
return(list);
}
}
Symbol 143 MovieClip [__Packages.Stepper] Frame 0
class Stepper
{
static var removalStack;
function Stepper () {
}
static function add(s) {
steppables.add(s);
}
static function remove(s) {
addToRemoveStack(s);
}
function stepAll() {
if (!paused) {
removeAllFromStack();
var _local2 = 0;
while (_local2 < steppables.getLength()) {
Steppable(steppables.get(_local2)).step();
_local2++;
}
}
}
static function addToRemoveStack(o) {
if (removalStack == null) {
removalStack = new Array();
}
removalStack.push(o);
}
function removeAllFromStack() {
var _local1 = 0;
while (_local1 < removalStack.length) {
steppables.remove(removalStack[_local1]);
_local1++;
}
removalStack = null;
}
static function pause() {
paused = true;
}
static function unpause() {
paused = false;
}
static function isPaused() {
return(paused);
}
function killAll() {
var _local1 = 0;
while (_local1 < steppables.size()) {
addToRemoveStack(steppables.get(_local1));
_local1++;
}
}
static var steppables = new ObjectList(true);
static var paused = false;
}
Symbol 144 MovieClip [__Packages.SoundManager] Frame 0
class SoundManager
{
function SoundManager () {
}
static function playBGM() {
function loopBack() {
SoundManager.bgm.start();
}
bgm.attachSound("sBGM");
bgm.start();
bgm.onSoundComplete = loopBack;
}
static function stopBGM() {
bgm.stop();
}
static function explosion() {
var _local1 = new Sound();
_local1.attachSound("sExplosion1");
_local1.start();
}
static function endLevel() {
var _local1 = new Sound();
_local1.attachSound("sEndLevel");
_local1.start();
}
static function fireRedMissile() {
var _local1 = new Sound();
_local1.attachSound("sFireRedMissile");
_local1.start();
}
static function fireOrangeMissile() {
var _local1 = new Sound();
_local1.attachSound("sFireOrangeMissile");
_local1.start();
}
static function bigExplosion() {
var _local1 = new Sound();
_local1.attachSound("sExplosion2");
_local1.start();
}
static function teleport() {
var _local1 = new Sound();
_local1.attachSound("sTeleport");
_local1.start();
}
static function mute() {
var _local1 = new Sound();
if (isMuted) {
_local1.setVolume(100);
} else {
_local1.setVolume(0);
}
isMuted = !isMuted;
}
static function muted() {
return(isMuted);
}
static var isMuted = false;
static var bgm = new Sound();
}
Symbol 145 MovieClip [__Packages.MovieClipHolder] Frame 0
class MovieClipHolder extends MovieClip
{
var mc;
function MovieClipHolder (m, shiny, doNotAdd, lowQualGlow) {
super();
mc = m;
if ((_root.effects >= 2) && (!doNotAdd)) {
mc.blendMode = "add";
}
if ((_root.effects >= 0) && (shiny != null)) {
var _local4 = mc.filters;
_local4.push(new flash.filters.GlowFilter(shiny, 100, 15, 15, 1, ((lowQualGlow || (_root.effects == 0)) ? 1 : 2)));
mc.filters = _local4;
}
}
function setMovie(m, shiny) {
mc = m;
if (_root.effects >= 2) {
mc.blendMode = "add";
}
if (_root.effects >= 1) {
if (shiny) {
var _local3 = mc.filters;
_local3.push(new flash.filters.GlowFilter(shiny, 25, 15, 15, 1.5, 2));
mc.filters = _local3;
}
}
}
function getMovie() {
return(mc);
}
}
Symbol 146 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends MovieClipHolder implements Steppable
{
var mc, health, targetCoords, xspeed, yspeed, tm, dm;
function Enemy (x, y) {
super(_root.attachMovie(getEnemyType(), getEnemyType() + _root.getNextHighestDepth(), _root.getNextHighestDepth()), getColor(), true);
mc._x = x;
mc._y = y;
assignNewTarget();
createTrailManager();
createDebrisManager();
health = getMaxHealth();
Stepper.add(this);
add(this);
var _local4 = Math.atan2(targetCoords.y - mc._y, targetCoords.x - mc._x);
xspeed = getSpeed() * Math.cos(_local4);
yspeed = getSpeed() * Math.sin(_local4);
mc._rotation = CustomMath.radToDeg(_local4);
}
function getScore() {
return(SCORE);
}
function getSpeed() {
return(SPEED);
}
function getEnemyType() {
return(ENEMY_TYPE);
}
function getWaitTime() {
return(WAIT_TIME);
}
function getMaxHealth() {
return(MAX_HEALTH);
}
function getColor() {
return(COLOR);
}
function getShapeFlag() {
return(SHAPE_FLAG);
}
static function add(m) {
enemies.add(m);
}
static function remove(m) {
enemies.remove(m);
}
function step() {
if (checkProximity()) {
shootIfAble();
tm.die();
delete tm;
} else {
move();
}
checkHit();
}
function createDebrisManager() {
dm = new DebrisManager(getColor(), 6);
}
function createTrailManager() {
if (_root.effects >= 2) {
tm = new TrailManager(mc, mc.exhaust1, 1, 16566798);
} else {
tm = new TrailManager(mc, mc.exhaust1, 1);
}
}
function checkProximity() {
return((Math.abs(mc._x - targetCoords.x) < 10) && (Math.abs(mc._y - targetCoords.y) < 10));
}
function move() {
mc._x = mc._x + xspeed;
mc._y = mc._y + yspeed;
tm.makeTrail();
}
function getWeaponsPoints() {
var _local2 = new flash.geom.Point(mc.weapon1._x, mc.weapon1._y);
mc.localToGlobal(_local2);
return(new Array(_local2));
}
function shootIfAble() {
rotateToPlayer();
if (timer > getWaitTime()) {
var _local4 = getWeaponsPoints();
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
createNewMissile(_local3.x, _local3.y);
_local2++;
}
timer = 0;
}
timer++;
}
function assignNewTarget() {
targetCoords = new flash.geom.Point(CustomMath.randomRange(100, Stage.width - 100), CustomMath.randomRange(100, Stage.height - 100));
}
function createNewMissile(x, y) {
new Missile(x, y);
}
function rotateToPlayer() {
var _local3 = Math.atan2(_root.player.getMovie()._y - mc._y, _root.player.getMovie()._x - mc._x);
mc._rotation = CustomMath.radToDeg(_local3);
}
function checkHit() {
var _local3 = missileCheckNumber;
while (_local3 < Missile.missiles.getLength()) {
var _local2 = Missile.missiles.get(_local3);
if (_local2.hit(mc, getShapeFlag())) {
health = health - _local2.getDamage();
_local2.die();
}
_local3 = _local3 + 2;
}
if (health <= 0) {
die();
}
if (missileCheckNumber == 0) {
missileCheckNumber = 1;
} else {
missileCheckNumber = 0;
}
}
function die() {
if (health <= 0) {
ScoreManager.addScore(getScore());
ScoreManager.incrementMultiplier();
}
tm.die();
dm.createDebrisField(mc._x, mc._y);
Stepper.remove(this);
remove(this);
mc.blendMode = "normal";
var _local3 = new Array();
_local3.push(new flash.filters.GlowFilter(getColor(), 100, 15, 15, 1.5, 1));
mc.filters = _local3;
mc.swapDepths(_root.getNextHighetDepth());
mc.gotoAndPlay("death");
}
static var SCORE = 100;
static var SPEED = 5;
static var WAIT_TIME = 60;
static var ENEMY_TYPE = "enemy1";
static var MAX_HEALTH = 2;
static var COLOR = 16776960;
static var SHAPE_FLAG = false;
static var enemies = new ObjectList();
var timer = 0;
var missileCheckNumber = 0;
}
Symbol 147 MovieClip [__Packages.DebrisManager] Frame 0
class DebrisManager extends MovieClip
{
var color, number;
function DebrisManager (color, number) {
super();
this.color = color;
this.number = number;
}
function createDebrisField(x, y) {
if (_root.effects >= 0) {
var _local3 = 0;
while (_local3 < ((number * _root.effects) + 1)) {
new Debris(x, y, color, Math.random() * 360, CustomMath.randomRange(8, 15), BASE_TIME * _root.effects);
_local3++;
}
}
}
static var BASE_TIME = 150;
}
Symbol 148 MovieClip [__Packages.Debris] Frame 0
class Debris extends MovieClipHolder implements Steppable
{
var mc, angle, speed, max_time;
function Debris (x, y, color, angle, speed, time) {
super(_root.createEmptyMovieClip("debris" + _root.getNextHighestDepth(), _root.getNextHighestDepth()), ((_root.effects >= 2) ? (color) : null), false, true);
mc.lineStyle(2, color);
var _local4 = new flash.geom.Point(CustomMath.randomRange(-5, 0), CustomMath.randomRange(-2, 2));
mc.moveTo(_local4.x, _local4.y);
mc.lineTo(CustomMath.randomRange(0, 5), CustomMath.randomRange(2, 6));
mc.lineTo(CustomMath.randomRange(5, 10), CustomMath.randomRange(-2, 2));
mc.lineTo(CustomMath.randomRange(0, 5), CustomMath.randomRange(-2, -6));
mc.lineTo(_local4.x, _local4.y);
mc._alpha = 25;
mc._x = x;
mc._y = y;
this.angle = angle;
this.speed = speed;
max_time = time;
mc._rotation = Math.random() * 360;
Stepper.add(this);
}
function step() {
move();
}
function move() {
if (speed > 0.1) {
mc._rotation = mc._rotation + speed;
var _local3 = CustomMath.degToRad(angle);
mc._x = mc._x + (speed * Math.cos(_local3));
mc._y = mc._y + (speed * Math.sin(_local3));
speed = speed * BASE_DECAY;
} else {
_root.debrisField.addDebris(this);
die();
}
}
function die() {
mc.removeMovieClip();
Stepper.remove(this);
}
static var BASE_DECAY = 0.9;
var timer = 0;
}
Symbol 149 MovieClip [__Packages.TrailManager] Frame 0
class TrailManager extends MovieClipHolder
{
var parent, target, trailNumber, color, mc;
function TrailManager (parent, target, trailNumber, color) {
super(_root.createEmptyMovieClip("trail" + _root.getNextHighestDepth(), _root.getNextHighestDepth()), ((_root.effects >= 3) ? (color) : null), false, true);
this.parent = parent;
this.target = target;
this.trailNumber = trailNumber;
this.color = color;
if (_root.effects >= 1) {
mc.blendMode = "add";
}
}
function getCoords() {
var _local2 = new flash.geom.Point(target._x, target._y);
parent.localToGlobal(_local2);
return(_local2);
}
function makeTrail(rot) {
var _local2 = mc.attachMovie("trail" + trailNumber, "trail" + mc.getNextHighestDepth(), mc.getNextHighestDepth());
var _local3 = getCoords();
_local2._x = _local3.x;
_local2._y = _local3.y;
if (rot != null) {
_local2._rotation = rot;
} else {
_local2._rotation = Math.random() * 180;
}
}
function die() {
mc.removeMovieClip();
}
}
Symbol 150 MovieClip [__Packages.Missile] Frame 0
class Missile extends MovieClipHolder implements Steppable
{
var mc, newAngle, tm, dm;
function Missile (x, y, newAngle) {
super(_root.attachMovie("missile1", "missile1" + _root.getNextHighestDepth(), _root.getNextHighestDepth()));
mc._x = x;
mc._y = y;
this.newAngle = newAngle;
createTrailManager();
createDebrisManager();
createSound();
add(this);
Stepper.add(this);
}
function getMaxSpeed() {
return(MAX_SPEED);
}
function getAccel() {
return(ACCEL);
}
function getMissileTimer() {
return(MISSILE_TIMER);
}
function getGraceTimer() {
return(GRACE_TIMER);
}
static function add(m) {
missiles.add(m);
}
static function remove(m) {
missiles.remove(m);
}
function step() {
followPlayer();
if (graceTimer > getMissileTimer()) {
die();
}
graceTimer++;
if ((((mc._x < 0) || (mc._x > Stage.width)) || (mc._y < 0)) || (mc._y > Stage.height)) {
outOfBounds();
}
}
function createSound() {
SoundManager.fireRedMissile();
}
function outOfBounds() {
die();
}
function createTrailManager() {
tm = new EfficientTrailManager(mc, mc.exhaust1, 2, ((_root.effects >= 3) ? 16711680 : null), getTrailLength(), true, 50);
}
function getTrailLength() {
if (_root.effects <= 1) {
return(6);
}
return(9);
}
function createDebrisManager() {
if (_root.effects >= 2) {
dm = new DebrisManager(16711680, 1);
}
}
function followPlayer() {
if (skipSwitch) {
var _local3;
if (isGrace() && (newAngle)) {
_local3 = CustomMath.degToRad(newAngle);
} else {
_local3 = Math.atan2(_root.player.getMovie()._y - mc._y, _root.player.getMovie()._x - mc._x);
}
var _local4 = (xspeed * xspeed) + (yspeed * yspeed);
var _local5 = getMaxSpeed() * getMaxSpeed();
xspeed = xspeed + (getAccel() * Math.cos(_local3));
yspeed = yspeed + (getAccel() * Math.sin(_local3));
if (_local4 > _local5) {
xspeed = xspeed * (_local5 / _local4);
yspeed = yspeed * (_local5 / _local4);
}
}
mc._x = mc._x + xspeed;
mc._y = mc._y + yspeed;
tm.makeTrail();
skipSwitch = !skipSwitch;
}
function isGrace() {
return(graceTimer < getGraceTimer());
}
function getX() {
return(mc._x);
}
function getY() {
return(mc._y);
}
function getDamage() {
return(DAMAGE);
}
function hit(m, shapeFlag, isPlayer) {
if (isPlayer || (!isGrace())) {
return(m.hitTest(mc._x, mc._y, shapeFlag));
}
return(false);
}
function die() {
dm.createDebrisField(mc._x, mc._y);
Stepper.remove(this);
remove(this);
tm.die();
new Explosion(mc._x, mc._y, 1, 0);
mc.removeMovieClip();
}
static var MAX_SPEED = 6;
static var ACCEL = 2;
static var DAMAGE = 1;
static var GRACE_TIMER = 12;
static var MISSILE_TIMER = 150;
static var missiles = new ObjectList();
var xspeed = 0;
var yspeed = 0;
var graceTimer = 0;
var skipSwitch = true;
}
Symbol 151 MovieClip [__Packages.EfficientTrailManager] Frame 0
class EfficientTrailManager extends TrailManager
{
var endTransform, trailClips, getCoords, mc, trailNumber;
function EfficientTrailManager (parent, target, trailNumber, color, number, fade, endTransform, rotType) {
super(parent, target, trailNumber, color);
if (number != null) {
this.number = number;
}
if (fade != null) {
this.fade = fade;
}
if (rotType != null) {
this.rotType = rotType;
}
this.endTransform = endTransform;
trailClips = new Array();
var _local3 = getCoords();
trailClips.push(mc.attachMovie("trail" + trailNumber, "t" + mc.getNextHighestDepth(), mc.getNextHighestDepth(), {x:_local3.x, y:_local3.y, cacheAsBitmap:true, _rotation:this.rotType}));
}
function makeTrail() {
var _local3 = getCoords();
if (trailClips.length < number) {
trailClips.push(createNewTrail());
}
var _local2 = trailClips.length - 1;
while (_local2 > 0) {
trailClips[_local2]._x = trailClips[_local2 - 1]._x;
trailClips[_local2]._y = trailClips[_local2 - 1]._y;
_local2--;
}
trailClips[0]._x = _local3.x;
trailClips[0]._y = _local3.y;
}
function createNewTrail() {
var _local3 = trailClips[trailClips.length - 1];
var _local2 = new Object();
if (fade) {
_local2._alpha = 100 - ((trailClips.length - 1) * (100 / number));
}
if (endTransform != null) {
var _local4 = 100 - endTransform;
_local2._xscale = (((endTransform - 100) / number) * (trailClips.length - 1)) + 100;
_local2._yscale = _local2._xscale;
}
_local2._rotation = rotType;
_local2.cacheAsBitmap = true;
return(mc.attachMovie("trail" + trailNumber, "t" + mc.getNextHighestDepth(), mc.getNextHighestDepth(), _local2));
}
function die() {
mc.removeMovieClip();
}
var number = 10;
var fade = true;
var rotType = 0;
}
Symbol 152 MovieClip [__Packages.Explosion] Frame 0
class Explosion extends MovieClip implements Steppable
{
function Explosion (x, y, explosionType, delay) {
super();
type = explosionType;
SoundManager.explosion();
this.x = x;
this.y = y;
if (delay) {
this.delay = delay;
}
Stepper.add(this);
}
function step() {
if (timer >= delay) {
createExplosion();
die();
}
timer++;
}
function createExplosion() {
var _local3 = _root.attachMovie("explosion" + type, "explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = x;
_local3._y = y;
if (_root.effects >= 2) {
_local3.blendMode = "add";
} else {
_local3.blendMode = "normal";
}
}
function die() {
Stepper.remove(this);
}
var type = 1;
var size = 10;
var x = 0;
var y = 0;
var delay = 0;
var timer = 0;
}
Symbol 153 MovieClip [__Packages.MovingEnemy] Frame 0
class MovingEnemy extends Enemy
{
var mc, targetCoords, tm, checkProximity, assignNewTarget, shootIfAble, checkHit;
function MovingEnemy (x, y) {
super(x, y);
}
function getScore() {
return(SCORE);
}
function getSpeed() {
return(SPEED);
}
function getEnemyType() {
return(ENEMY_TYPE);
}
function getWaitTime() {
return(WAIT_TIME);
}
function getMaxHealth() {
return(MAX_HEALTH);
}
function getAccel() {
return(ACCEL);
}
function getColor() {
return(COLOR);
}
function getShapeFlag() {
return(SHAPE_FLAG);
}
function move() {
if ((skipSwitch % 3) == 0) {
var _local4;
_local4 = Math.atan2(targetCoords.y - mc._y, targetCoords.x - mc._x);
var _local2 = (xspeed * xspeed) + (yspeed * yspeed);
var _local3 = getSpeed() * getSpeed();
xspeed = xspeed + (getAccel() * Math.cos(_local4));
yspeed = yspeed + (getAccel() * Math.sin(_local4));
if (_local2 > _local3) {
xspeed = xspeed * (_local3 / _local2);
yspeed = yspeed * (_local3 / _local2);
}
mc._rotation = CustomMath.radToDeg(Math.atan2(yspeed, xspeed));
}
skipSwitch++;
mc._x = mc._x + xspeed;
mc._y = mc._y + yspeed;
tm.makeTrail();
}
function step() {
if (checkProximity()) {
assignNewTarget();
} else {
move();
}
shootIfAble();
checkHit();
}
function getWeaponsPoints() {
var _local2 = new flash.geom.Point(mc.turret.weapon1._x, mc.turret.weapon1._y);
mc.turret.localToGlobal(_local2);
return(new Array(_local2));
}
function rotateToPlayer() {
var _local3 = Math.atan2(_root.player.getMovie()._y - mc._y, _root.player.getMovie()._x - mc._x);
mc.turret._rotation = CustomMath.radToDeg(_local3) - mc._rotation;
}
static var SCORE = 150;
static var SPEED = 2;
static var ACCEL = 0.3;
static var WAIT_TIME = 60;
static var ENEMY_TYPE = "enemy2";
static var MAX_HEALTH = 3;
static var SHAPE_FLAG = false;
static var COLOR = 65535;
var xspeed = 0;
var yspeed = 0;
var skipSwitch = 0;
}
Symbol 154 MovieClip [__Packages.SelfDestructingEnemy] Frame 0
class SelfDestructingEnemy extends Enemy
{
var mc, die;
function SelfDestructingEnemy (x, y) {
super(x, y);
}
function getScore() {
return(SCORE);
}
function getSpeed() {
return(SPEED);
}
function getEnemyType() {
return(ENEMY_TYPE);
}
function getWaitTime() {
return(WAIT_TIME);
}
function getMaxHealth() {
return(MAX_HEALTH);
}
function getColor() {
return(COLOR);
}
function getShapeFlag() {
return(SHAPE_FLAG);
}
function createTrailManager() {
}
function rotateToPlayer() {
}
function createNewMissile() {
SoundManager.bigExplosion();
var _local2 = 0;
while (_local2 < SHOTS) {
new FastMissile(mc._x, mc._y, Math.random() * 360);
_local2++;
}
die();
}
static var SCORE = 100;
static var SHOTS = 8;
static var SPEED = 7;
static var WAIT_TIME = 180;
static var ENEMY_TYPE = "enemy3";
static var MAX_HEALTH = 2;
static var COLOR = 65280;
static var SHAPE_FLAG = false;
}
Symbol 155 MovieClip [__Packages.FastMissile] Frame 0
class FastMissile extends Missile
{
var tm, mc, getTrailLength, dm;
function FastMissile (x, y, newAngle) {
super(x, y, newAngle);
}
function getMaxSpeed() {
return(MAX_SPEED);
}
function getMissileTimer() {
return(MISSILE_TIMER);
}
function createTrailManager() {
tm = new EfficientTrailManager(mc, mc.exhaust1, 3, ((_root.effects >= 3) ? 65280 : null), getTrailLength(), false, 5);
}
function createSound() {
}
function createDebrisManager() {
if (_root.effects >= 2) {
dm = new DebrisManager(65280, 1);
}
}
function getDamage() {
return(DAMAGE);
}
static var MISSILE_TIMER = 180;
static var MAX_SPEED = 11;
static var DAMAGE = 2;
}
Symbol 156 MovieClip [__Packages.TeleportingEnemy] Frame 0
class TeleportingEnemy extends Enemy
{
var targetCoords, mc, tm, assignNewTarget, health;
function TeleportingEnemy (x, y) {
super(x, y);
mc._x = targetCoords.x;
mc._y = targetCoords.y;
mc.gotoAndPlay("teleport");
}
function getScore() {
return(SCORE);
}
function getEnemyType() {
return(ENEMY_TYPE);
}
function getWaitTime() {
return(WAIT_TIME);
}
function getMaxHealth() {
return(MAX_HEALTH);
}
function getColor() {
return(COLOR);
}
function createTrailManager() {
tm = null;
}
function rotateToPlayer() {
mc._rotation = mc._rotation + 3;
}
function createNewMissile() {
SoundManager.teleport();
var _local3 = 0;
while (_local3 < SHOTS) {
new FastMissile(mc._x, mc._y, mc._rotation + (_local3 * 120));
_local3++;
}
assignNewTarget();
mc._x = targetCoords.x;
mc._y = targetCoords.y;
mc.gotoAndPlay("teleport");
_root.attachMovie("blink", "blink" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
health = getMaxHealth();
}
static var SCORE = 200;
static var SHOTS = 3;
static var WAIT_TIME = 180;
static var ENEMY_TYPE = "enemy5";
static var MAX_HEALTH = 2;
static var COLOR = 16711935;
}
Symbol 157 MovieClip [__Packages.StraightEnemy] Frame 0
class StraightEnemy extends Enemy
{
var mc, weaponType;
function StraightEnemy (x, y) {
super(x, y);
}
function getScore() {
return(SCORE);
}
function getSpeed() {
return(SPEED);
}
function getEnemyType() {
return(ENEMY_TYPE);
}
function getWaitTime() {
return(WAIT_TIME);
}
function getMaxHealth() {
return(MAX_HEALTH);
}
function getColor() {
return(COLOR);
}
function getShapeFlag() {
return(SHAPE_FLAG);
}
function getWeaponsPoints() {
var _local3 = new Array();
var _local2 = new flash.geom.Point(mc.weapon1._x, mc.weapon1._y);
mc.localToGlobal(_local2);
_local3.push(_local2);
_local2 = new flash.geom.Point(mc.weapon2._x, mc.weapon2._y);
mc.localToGlobal(_local2);
_local3.push(_local2);
return(_local3);
}
function shootIfAble() {
weaponType = Math.random();
super.shootIfAble();
}
function createNewMissile(x, y) {
if (weaponType < 0.7) {
new StraightMissile(x, y, mc._rotation);
} else {
new Missile(x, y, mc._rotation);
}
}
static var SCORE = 200;
static var SPEED = 5;
static var WAIT_TIME = 45;
static var ENEMY_TYPE = "enemy4";
static var MAX_HEALTH = 3;
static var COLOR = 16226057;
static var SHAPE_FLAG = false;
}
Symbol 158 MovieClip [__Packages.StraightMissile] Frame 0
class StraightMissile extends Missile
{
var angleRad, xspeed, yspeed, tm, mc, getTrailLength, newAngle, dm, isGrace;
function StraightMissile (x, y, newAngle) {
super(x, y, newAngle);
angleRad = CustomMath.degToRad(newAngle);
xspeed = Math.cos(angleRad) * getMaxSpeed();
yspeed = Math.sin(angleRad) * getMaxSpeed();
}
function getMaxSpeed() {
return(MAX_SPEED);
}
function getDamage() {
return(DAMAGE);
}
function getMissileTimer() {
return(MISSILE_TIMER);
}
function getGraceTimer() {
return(GRACE_TIMER);
}
function createTrailManager() {
tm = new EfficientTrailManager(mc, mc.exhaust1, 4, ((_root.effects >= 3) ? 16226057 : null), getTrailLength(), true, 100, newAngle);
}
function createDebrisManager() {
if (_root.effects >= 2) {
dm = new DebrisManager(16226057, 1);
}
}
function createSound() {
SoundManager.fireOrangeMissile();
}
function followPlayer() {
mc._x = mc._x + xspeed;
mc._y = mc._y + yspeed;
tm.makeTrail(angleRad);
}
function hit(m, shapeFlag, isPlayer) {
if (isPlayer || (!isGrace())) {
var _local2 = CustomMath.degToRad(newAngle);
return(m.hitTest(mc._x, mc._y, shapeFlag) || (m.hitTest(mc._x + (Math.cos(_local2) * (getMaxSpeed() >> 1)), mc._y + (Math.sin(_local2) * (getMaxSpeed() >> 1)), shapeFlag)));
}
return(false);
}
static var MAX_SPEED = 10;
static var DAMAGE = 3;
static var MISSILE_TIMER = 60;
static var GRACE_TIMER = 3;
static var missiles = new ObjectList();
}
Symbol 159 MovieClip [__Packages.FinaleWaveManager] Frame 0
class FinaleWaveManager extends WaveManager
{
var enemyList, releaseTime, timer, releaseEnemies, isDone, die;
function FinaleWaveManager () {
super(330, 330, 15);
enemyList = new Array();
var _local3 = 0;
while (_local3 < 9) {
enemyList.push("Enemy");
enemyList.push("MovingEnemy");
enemyList.push("SelfDestructingEnemy");
enemyList.push("TeleportingEnemy");
enemyList.push("StraightEnemy");
_local3++;
}
_local3 = 0;
while (_local3 < 30) {
enemyList.push("StraightEnemy");
_local3++;
}
_local3 = 0;
while (_local3 < 30) {
enemyList.push("TeleportingEnemy");
_local3++;
}
_local3 = 0;
while (_local3 < 30) {
enemyList.push("SelfDestructingEnemy");
_local3++;
}
_local3 = 0;
while (_local3 < 30) {
enemyList.push("MovingEnemy");
_local3++;
}
_local3 = 0;
while (_local3 < 30) {
enemyList.push("Enemy");
_local3++;
}
}
function push(e) {
}
function step() {
if (timer > releaseTime) {
releaseEnemies();
timer = 0;
} else {
if (isDone()) {
SoundManager.endLevel();
LevelManager.signalFinished();
die();
}
timer++;
}
}
}
Symbol 160 MovieClip [__Packages.HudManager] Frame 0
class HudManager extends MovieClip implements Steppable
{
var hud, lastMultiplier, lastScore;
function HudManager () {
super();
hud = _root.attachMovie("hud", "hud", -8);
Stepper.add(this);
}
function step() {
updateHealth();
updateMultiplier();
updateScore();
}
function updateHealth() {
hud.health = _root.player.getHealth();
}
function updateMultiplier() {
if (ScoreManager.getMultiplier() != lastMultiplier) {
hud.multiplier = ScoreManager.getMultiplier() + "x";
var _local2 = new Array();
_local2.push(new flash.filters.GlowFilter(16777215, 25, 7, 7, (ScoreManager.getMultiplier() / 4) - 0.25, 2));
hud.multBox.filters = _local2;
lastMultiplier = ScoreManager.getMultiplier();
}
}
function updateScore() {
if (ScoreManager.getScore() != lastScore) {
hud.score = ScoreManager.getScore();
lastScore = ScoreManager.getScore();
}
}
function die() {
Stepper.remove(this);
}
}
Symbol 161 MovieClip [__Packages.Player] Frame 0
class Player extends MovieClipHolder implements Steppable
{
static var SPEED_DIAG;
var mc, tms;
function Player (x, y) {
super(_root.attachMovie("player", "player" + _root.getNextHighestDepth(), _root.getNextHighestDepth()), 204);
mc._x = x;
mc._y = y;
mc.blendMode = "normal";
SPEED_DIAG = Math.sqrt((SPEED * SPEED) / 2);
tms = new Array();
if (_root.effects >= 2) {
tms.push(new TrailManager(mc, mc.exhaust1, 5, 16566787));
tms.push(new TrailManager(mc, mc.exhaust2, 5, 16566787));
} else {
tms.push(new TrailManager(mc, mc.exhaust1, 5));
tms.push(new TrailManager(mc, mc.exhaust2, 5));
}
Stepper.add(this);
}
function step() {
move();
checkHit();
}
function checkHit() {
var _local3 = 0;
while (_local3 < Missile.missiles.getLength()) {
var _local2 = Missile.missiles.get(_local3);
if (_local2.hit(mc, false, true)) {
health = health - (_local2.getDamage() * 1.75);
_local2.die();
ScoreManager.resetMultiplier();
break;
}
_local3++;
}
if (health <= 0) {
LevelManager.signalDeath();
}
}
function makeTrail() {
var _local2 = 0;
while (_local2 < tms.length) {
tms[_local2].makeTrail();
_local2++;
}
}
function move() {
var _local3;
var _local2;
if (Key.isDown(40) || (Key.isDown(83))) {
if (Key.isDown(37) || (Key.isDown(65))) {
_local3 = mc._x - SPEED_DIAG;
_local2 = mc._y + SPEED_DIAG;
mc._rotation = 225;
} else if (Key.isDown(39) || (Key.isDown(68))) {
_local3 = mc._x + SPEED_DIAG;
_local2 = mc._y + SPEED_DIAG;
mc._rotation = 135;
} else {
_local2 = mc._y + SPEED;
mc._rotation = 180;
}
makeTrail();
} else if (Key.isDown(38) || (Key.isDown(87))) {
if (Key.isDown(37) || (Key.isDown(65))) {
_local3 = mc._x - SPEED_DIAG;
_local2 = mc._y - SPEED_DIAG;
mc._rotation = -45;
} else if (Key.isDown(39) || (Key.isDown(68))) {
_local3 = mc._x + SPEED_DIAG;
_local2 = mc._y - SPEED_DIAG;
mc._rotation = 45;
} else {
_local2 = mc._y - SPEED;
mc._rotation = 0;
}
makeTrail();
} else if (Key.isDown(37) || (Key.isDown(65))) {
_local3 = mc._x - SPEED;
mc._rotation = -90;
makeTrail();
} else if (Key.isDown(39) || (Key.isDown(68))) {
_local3 = mc._x + SPEED;
mc._rotation = 90;
makeTrail();
}
if (_local3 < 0) {
_local3 = 0;
} else if (_local3 > Stage.width) {
_local3 = Stage.width;
}
if (_local2 < 0) {
_local2 = 0;
} else if (_local2 > Stage.height) {
_local2 = Stage.height;
}
mc._x = _local3;
mc._y = _local2;
}
function getHealth() {
return(health);
}
function renewHealth() {
health = MAXHEALTH;
}
function die() {
Stepper.remove(this);
mc.removeMovieClip();
}
static var SPEED = 10;
static var MAXHEALTH = 100;
var health = MAXHEALTH;
}
Symbol 162 MovieClip [__Packages.DebrisField] Frame 0
class DebrisField extends MovieClipHolder
{
var bfield, mc;
function DebrisField () {
super(_root.createEmptyMovieClip("debrisField", -9));
bfield = new flash.display.BitmapData(Stage.width, Stage.height, true, 0);
updateField();
}
function addDebris(debris) {
var _local3 = new flash.geom.Matrix();
_local3.rotate(CustomMath.degToRad(debris.getMovie()._rotation));
var _local5 = new flash.geom.Matrix();
_local5.translate(debris.getMovie()._x, debris.getMovie()._y);
_local3.concat(_local5);
if (_root.effects >= 2) {
bfield.draw(debris.getMovie(), _local3, new flash.geom.ColorTransform(1, 1, 1, 0.25, 0, 0, 0, 0), "add");
} else {
bfield.draw(debris.getMovie(), _local3, new flash.geom.ColorTransform(1, 1, 1, 0.25, 0, 0, 0, 0));
}
}
function clearField() {
bfield.fillRect(new flash.geom.Rectangle(0, 0, Stage.width, Stage.height), 0);
}
function dimField() {
bfield.colorTransform(bfield.rectangle, new flash.geom.ColorTransform(0.65, 0.65, 0.65, 1, 0, 0, 0, 0));
}
function updateField() {
mc.attachBitmap(bfield, mc.getNextHighestDepth());
}
}
Symbol 163 MovieClip [__Packages.ab3.rankz.Armor_Bot_30_En_AS1] Frame 0
class ab3.rankz.Armor_Bot_30_En_AS1 extends Object
{
static var _CharsReverseLookup;
var _Armor_Bot_30_En_AS1Str, _Armor_Bot_30_En_AS1Count;
function Armor_Bot_30_En_AS1 () {
super();
}
static function Encode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.encodeArmor_Bot_30_En_AS1(str));
}
static function Decode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.decodeArmor_Bot_30_En_AS1(str));
}
static function StringReplaceAll(source, find, replacement) {
return(source.split(find).join(replacement));
}
static function InitReverseChars() {
_CharsReverseLookup = new Array();
var _local1 = 0;
while (_local1 < _Chars.length) {
_CharsReverseLookup[_Chars[_local1]] = _local1;
_local1++;
}
return(true);
}
static function UrlDecode(str) {
str = StringReplaceAll(str, "\\", " ");
str = unescape(str);
return(str);
}
static function UrlEncode(str) {
str = escape(str);
str = StringReplaceAll(str, "\\", "%2B");
str = StringReplaceAll(str, "%20", "+");
return(str);
}
function setArmor_Bot_30_En_AS1Str(str) {
_Armor_Bot_30_En_AS1Str = str;
_Armor_Bot_30_En_AS1Count = 0;
}
function readArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charCodeAt(_Armor_Bot_30_En_AS1Count) & 255;
_Armor_Bot_30_En_AS1Count++;
return(_local2);
}
function encodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(3);
var _local5 = 0;
var _local4 = false;
while ((!_local4) && (((_local2[0] = readArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[1] = readArmor_Bot_30_En_AS1();
_local2[2] = readArmor_Bot_30_En_AS1();
_local3 = _local3 + _Chars[_local2[0] >> 2];
if (_local2[1] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[0] << 4) & 48) | (_local2[1] >> 4)];
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[1] << 2) & 60) | (_local2[2] >> 6)];
_local3 = _local3 + _Chars[_local2[2] & 63];
} else {
_local3 = _local3 + _Chars[(_local2[1] << 2) & 60];
_local3 = _local3 + "=";
_local4 = true;
}
} else {
_local3 = _local3 + _Chars[(_local2[0] << 4) & 48];
_local3 = _local3 + "=";
_local3 = _local3 + "=";
_local4 = true;
}
_local5 = _local5 + 4;
if (_local5 >= 76) {
_local3 = _local3 + newline;
_local5 = 0;
}
}
return(_local3);
}
function readReverseArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
while (true) {
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charAt(_Armor_Bot_30_En_AS1Count);
_Armor_Bot_30_En_AS1Count++;
if (_CharsReverseLookup[_local2]) {
return(_CharsReverseLookup[_local2]);
}
if (_local2 == "A") {
return(0);
}
}
}
function ntos(n) {
var _local1 = n.toString(16);
if (_local1.length == 1) {
_local1 = "0" + _local1;
}
_local1 = "%" + _local1;
return(unescape(_local1));
}
function decodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(4);
var _local4 = false;
while (((!_local4) && (((_local2[0] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) && (((_local2[1] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[2] = readReverseArmor_Bot_30_En_AS1();
_local2[3] = readReverseArmor_Bot_30_En_AS1();
_local3 = _local3 + ntos(((_local2[0] << 2) & 255) | (_local2[1] >> 4));
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[1] << 4) & 255) | (_local2[2] >> 2));
if (_local2[3] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[2] << 6) & 255) | _local2[3]);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
}
return(_local3);
}
function toHex(n) {
var _local4 = "";
var _local3 = true;
var _local1 = 32;
while (_local1 > 0) {
_local1 = _local1 - 4;
var _local2 = (n >> _local1) & 15;
if ((!_local3) || (_local2 != 0)) {
_local3 = false;
_local4 = _local4 + _Digits[_local2];
}
}
return(((_local4 == "") ? "0" : (_local4)));
}
function pad(str, len, pad) {
var _local2 = str;
var _local1 = str.length;
while (_local1 < len) {
_local2 = pad + _local2;
_local1++;
}
return(_local2);
}
function encodeHex(str) {
var _local4 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local4 = _local4 + pad(toHex(str.charCodeAt(_local2) & 255), 2, "0");
_local2++;
}
return(_local4);
}
function decodeHex(str) {
var _local5 = "";
var _local3 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local3 = _local3 + str.charAt(_local2);
if (_local3.length == 2) {
_local5 = _local5 + ntos(parseInt("0x" + _local3));
_local3 = "";
}
_local2++;
}
return(_local5);
}
static var _EndOfInput = -1;
static var _Chars = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
static var _CharsReverseLookupInited = InitReverseChars();
static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
}
Symbol 11 MovieClip Frame 1
stop();
Instance of Symbol 11 MovieClip in Symbol 13 MovieClip [hud] Frame 1
onClipEvent (enterFrame) {
if ((_parent.health > 0) && (_parent.health <= 100)) {
this._visible = true;
this.gotoAndStop(Math.floor(101 - _parent.health));
} else {
this._visible = false;
}
}
Symbol 24 Button
on (release, keyPress "<Space>") {
LevelManager.start();
}
Symbol 28 Button
on (release) {
if (ScoreManager.subtractHealthScore()) {
_root.player.renewHealth();
_root.hm.step();
}
healthButton._alpha = 25;
healthButton.enabled = false;
healthButton.useHandCursor = false;
}
Symbol 29 MovieClip [levelDisplayBox] Frame 1
if (((ScoreManager.getScore() < 25000) || (ScoreManager.getScore() == null)) || (_root.player.getHealth() > 50)) {
healthButton._alpha = 25;
healthButton.enabled = false;
healthButton.useHandCursor = false;
}
Symbol 33 Button
on (release) {
ScoreManager.resetScore();
LevelManager.signal();
_root.mainMenu._visible = true;
_root.mainMenu.startGameButton._visible = true;
_root.mainMenu.resumeButton._visible = false;
_root.mainMenu.news._visible = true;
_root.debrisField.clearField();
_root.player = new Player(400, 300);
_root.mainMenu.swapDepths(_root.getNextHighestDepth());
Stepper.pause();
SoundManager.stopBGM();
this.removeMovieClip();
}
Symbol 39 Button
on (release) {
if (nameBox.text != "Input Name") {
bXlnYW1lX25hbWVfdmFyaWFibGU = nameBox.text;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = ScoreManager.getScore();
_root.__rankz_send__("MzIwMWolZSVhJW4lcw==", "aU9QblFRdkY=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
submitButton._visible = false;
}
}
Symbol 42 Button
on (release) {
getURL ("http://ArmorGames.com", "_blank", "GET");
}
Symbol 43 MovieClip [scoreDisplayBox] Frame 1
if (((ScoreManager.getScore() < 25000) || (ScoreManager.getScore() == null)) || (_root.player.getHealth() > 25)) {
healthButton._visible = false;
}
Symbol 45 MovieClip [blink] Frame 3
this.removeMovieClip();
Symbol 47 MovieClip [explosion1] Frame 35
this.removeMovieClip();
stop();
Symbol 52 MovieClip [enemy1] Frame 1
stop();
Symbol 52 MovieClip [enemy1] Frame 28
this.removeMovieClip();
Symbol 56 MovieClip [enemy2] Frame 1
stop();
Symbol 56 MovieClip [enemy2] Frame 34
this.removeMovieClip();
Symbol 60 MovieClip [enemy3] Frame 1
stop();
Symbol 60 MovieClip [enemy3] Frame 36
this.removeMovieClip();
Symbol 62 MovieClip [enemy4] Frame 1
stop();
Symbol 62 MovieClip [enemy4] Frame 35
this.removeMovieClip();
Symbol 64 MovieClip [enemy5] Frame 90
stop();
Symbol 64 MovieClip [enemy5] Frame 131
this.removeMovieClip();
Symbol 66 MovieClip [player] Frame 1
stop();
Symbol 66 MovieClip [player] Frame 35
stop();
Symbol 68 MovieClip [trail1] Frame 10
this.removeMovieClip();
Symbol 70 MovieClip [trail2] Frame 1
stop();
Symbol 70 MovieClip [trail2] Frame 10
this.removeMovieClip();
Symbol 72 MovieClip [trail3] Frame 1
stop();
Symbol 72 MovieClip [trail3] Frame 15
this.removeMovieClip();
Symbol 74 MovieClip [trail4] Frame 1
stop();
Symbol 74 MovieClip [trail4] Frame 10
this.removeMovieClip();
Symbol 76 MovieClip [trail5] Frame 10
this.removeMovieClip();
Symbol 96 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 99 MovieClip Frame 218
_root.nextFrame();
Symbol 109 Button
on (release) {
switch (_root._quality) {
case "LOW" :
_root._quality = "MEDIUM";
quality = "[medium]";
break;
case "MEDIUM" :
_root._quality = "HIGH";
quality = "[high]";
break;
case "HIGH" :
_root._quality = "LOW";
quality = "[low]";
}
}
Symbol 113 Button
on (release) {
switch (_root.effects) {
case -1 :
_root.effects = 0;
effects = "[low]";
break;
case 0 :
_root.effects = 1;
effects = "[medium]";
break;
case 1 :
_root.effects = 2;
effects = "[high]";
break;
case 2 :
_root.effects = 3;
effects = "[extreme]";
break;
case 3 :
_root.effects = -1;
effects = "[none]";
}
}
Symbol 119 Button
on (release) {
if (sound == "[on]") {
sound = "[off]";
} else {
sound = "[on]";
}
SoundManager.mute();
}
Symbol 123 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/199114", "_blank", "GET");
}
Symbol 126 Button
on (release) {
getURL ("http://ArmorGames.com", "_blank", "GET");
}
Symbol 129 Button
on (release) {
getURL ("http://ArmorBlog.com", "_blank", "GET");
}
Symbol 132 Button
on (release) {
this._visible = false;
news._visible = false;
startGameButton._visible = false;
resumeButton._visible = true;
SoundManager.playBGM();
}
Symbol 134 Button
on (release) {
this._visible = false;
Stepper.unpause();
_root.mainMenu.swapDepths(-112);
_root.mainMenu._alpha = 100;
}
Symbol 135 Button
on (release) {
getURL ("http://ArmorGames.com", "_blank", "GET");
}
Symbol 136 MovieClip Frame 1
quality = "[medium]";
effects = "[medium]";
sound = "[on]";
resumeButton._visible = false;