Section 1
//Boss01 (enemies.Boss01)
package enemies {
import flash.display.*;
import main.*;
public class Boss01 extends Ship {
public var mcHit:MovieClip;
public var health:Number;
public var mcMissileTarget:MovieClip;
private var mines:Number;// = 100
public var mcShield:shieldEnemy;
public var mcGunUnder1:MovieClip;
public var mcGunUnder2:MovieClip;
private var allRuntime:Array;
private var miss:int;// = 0
private var count:int;// = 0
private var deadTimer:int;// = 0
private var timer:int;// = 0
private var phase:Number;// = 0
public var mcDestroy:MovieClip;
public var mcGun1:MovieClip;
public var mcGun2:MovieClip;
public var mcGun3:MovieClip;
public var mcGun4:MovieClip;
public var mcGun6:MovieClip;
public var mcGun5:MovieClip;
private var wings:MovieClip;
public var mcWings:MovieClip;
public function Boss01(){
allRuntime = new Array();
count = 0;
deadTimer = 0;
mines = 100;
miss = 0;
phase = 0;
timer = 0;
super();
stats["bulletDamage"] = 20;
stats["bulletReload"] = -90;
stats["drop"] = 0;
stats["hp"] = 4500;
stats["missileDamage"] = 75;
stats["missileReload"] = -120;
stats["shield"] = 2250;
stats["shieldRadius"] = 95;
stats["shieldRegen"] = 15;
stats["shieldTimer"] = -150;
stats["size"] = "Boss";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 2.3;
stats["value"] = 450;
stats["valueExtra"] = 0;
stats["valueDecay"] = 0;
boss = true;
color = "red";
destroy = MovieClip(mcDestroy);
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
miss = stats["missileReload"];
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
timer = stats["bulletReload"];
wings = MovieClip(mcWings);
allGuns.push(MovieClip(mcGun1));
allGuns.push(MovieClip(mcGun2));
allGuns.push(MovieClip(mcGun3));
allGuns.push(MovieClip(mcGun4));
allGuns.push(MovieClip(mcGun5));
allGuns.push(MovieClip(mcGun6));
allGuns.push(MovieClip(mcGunUnder1));
allGuns.push(MovieClip(mcGunUnder2));
}
public function powerUp(_arg1:Number):void{
var _local2:Number;
_local2 = (stats.shieldRegen / stats.shield);
stats["value"] = 1;
power = true;
stats.hp = ((35000 * _arg1) * 1.2);
hp = stats.hp;
stats.shield = ((15000 * _arg1) * 1.2);
shield = stats.shield;
stats["bulletDamage"] = ((55 * _arg1) * 1.5);
stats["missileDamage"] = ((130 * _arg1) * 1.5);
_local2 = (_local2 * stats.shield);
stats.shieldRegen = _local2;
}
override public function directDamage(_arg1:Number):void{
}
public function doRuntime(_arg1:Object):void{
allRuntime.push(_arg1);
}
override protected function damage(_arg1:Number):void{
shieldTimer = stats.shieldTimer;
if (phase == 1){
shield = (shield - _arg1);
if (shield < 0){
hp = (hp + shield);
shield = 0;
};
if (hp <= 0){
if (((!(isDead)) && (!(power)))){
Shooter.music.fadeOut();
};
isDead = true;
destroy.nextFrame();
MovieClip(parent).bossHp.boss = null;
missileTarget.visible = false;
};
};
}
public function runtime():void{
var _local1:int;
if (!isDead){
if (phase == 0){
shield = stats.shield;
accel();
if (y >= 125){
phase = 1;
decel();
};
} else {
if (phase == 1){
decel();
timer++;
if ((((((((timer == -12)) || ((timer == -9)))) || ((timer == -6)))) || ((timer == -3)))){
bulletReload = 1;
shoot(MovieClip(mcGunUnder1), false, false, true);
shoot(MovieClip(mcGunUnder2), false, false, true);
} else {
if (timer == 0){
bulletReload = 1;
shoot(MovieClip(mcGunUnder1), false, false, true);
shoot(MovieClip(mcGunUnder2), false, false, true);
timer = stats["bulletReload"];
};
};
if ((((((((hp / stats.hp) * 100) < 66)) && (!(count)))) || ((((((hp / stats.hp) * 100) < 33)) && ((count == 1)))))){
count++;
phase = 2;
timer = 0;
};
if (wings.currentLabel == "open"){
wings.nextFrame();
};
mines++;
if ((((((((mines == 1)) || ((mines == 11)))) || ((mines == 21)))) || ((mines == 31)))){
MovieClip(parent).spawn("enemies::Mine01", x, y, this).activate(power);
};
miss++;
if (((!(MovieClip(parent).player.isDead)) && ((((((((miss == 0)) || ((miss == -10)))) || ((miss == -20)))) || ((miss == -30)))))){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
if (!miss){
miss = stats["missileReload"];
};
};
} else {
if (phase == 2){
if (MovieClip(parent).player.x < (x - 10)){
x = (x - 0.7);
};
if (MovieClip(parent).player.x > (x + 10)){
x = (x + 0.7);
};
shieldTimer = 10;
if (wings.currentLabel == "closed"){
wings.nextFrame();
} else {
timer++;
switch (timer){
case 1:
MovieClip(mcGun3).rotation = ((180 - 5) + (Math.random() * 10));
shoot(MovieClip(mcGun3), false, false);
break;
case 2:
MovieClip(mcGun1).rotation = ((180 - 5) + (Math.random() * 10));
shoot(MovieClip(mcGun1), false, false);
break;
case 3:
MovieClip(mcGun5).rotation = ((180 - 5) + (Math.random() * 10));
shoot(MovieClip(mcGun5), false, false);
break;
case 4:
MovieClip(mcGun4).rotation = ((180 - 5) + (Math.random() * 10));
shoot(MovieClip(mcGun4), false, false);
break;
case 5:
MovieClip(mcGun2).rotation = ((180 - 5) + (Math.random() * 10));
shoot(MovieClip(mcGun2), false, false);
break;
case 6:
MovieClip(mcGun6).rotation = ((180 - 5) + (Math.random() * 10));
shoot(MovieClip(mcGun6), false, false);
timer = 0;
break;
default:
break;
};
};
if (shield >= stats.shield){
phase = 1;
timer = stats["bulletReload"];
stats["shield"] = (stats["shield"] * 0.85);
stats["shieldRegen"] = (stats["shieldRegen"] * 0.85);
shield = stats["shield"];
mines = 0;
miss = stats.missileReload;
};
};
};
};
basic();
} else {
deadTimer++;
if (deadTimer == 120){
killBoss();
};
if (deadTimer < 120){
_local1 = 0;
while (_local1 < allRuntime.length) {
allRuntime[_local1].runtime();
_local1++;
};
};
};
health = (hp / stats.hp);
}
}
}//package enemies
Section 2
//Boss02 (enemies.Boss02)
package enemies {
import flash.display.*;
import main.*;
public class Boss02 extends Ship {
public var mcHit:MovieClip;
public var spin2:MovieClip;
public var spin3:MovieClip;
public var spin1:MovieClip;
public var health:Number;
public var mcMissileTarget:MovieClip;
private var mines:Number;// = 100
private var debrisTimer:int;// = 60
public var mcShield:shieldEnemy;
private var debrisToKill2:int;// = 6
private var allRuntime:Array;
private var miss:int;// = 0
private var count:int;// = 0
private var deadTimer:int;// = 0
private var timer:int;// = 0
private var phase:Number;// = 0
private var rotSpeed1:Number;// = 5
private var rotSpeed2:Number;// = 4
public var mcDestroy:MovieClip;
public var mcGun1:MovieClip;
private var debrisToKill:int;// = 5
private var ast1:Number;// = 1000
public function Boss02(){
allRuntime = new Array();
count = 0;
deadTimer = 0;
debrisTimer = 60;
debrisToKill = 5;
debrisToKill2 = 6;
mines = 100;
miss = 0;
phase = 0;
rotSpeed1 = 5;
rotSpeed2 = 4;
timer = 0;
ast1 = 1000;
super();
stats["bulletDamage"] = 28;
stats["bulletReload"] = -80;
stats["drop"] = 0;
stats["hp"] = (debrisToKill2 * 3000);
stats["missileDamage"] = 120;
stats["missileReload"] = -110;
stats["shield"] = (debrisToKill * 1000);
stats["shieldRadius"] = 95;
stats["shieldRegen"] = 25;
stats["shieldTimer"] = -150;
stats["size"] = "Boss";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 2.3;
stats["value"] = 850;
stats["valueExtra"] = 0;
stats["valueDecay"] = 0;
boss = true;
color = "red";
destroy = MovieClip(mcDestroy);
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
miss = stats["missileReload"];
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
timer = stats["bulletReload"];
allGuns.push(MovieClip(mcGun1));
}
public function powerUp(_arg1:Number):void{
var _local2:Number;
_local2 = (stats.shieldRegen / stats.shield);
stats["value"] = 1;
power = true;
debrisToKill = (6 + _arg1);
debrisToKill2 = (7 + _arg1);
ast1 = ((6250 * _arg1) * 1.2);
stats["hp"] = (debrisToKill2 * 4750);
stats["shield"] = (((debrisToKill * 4500) * _arg1) * 1.2);
stats["bulletDamage"] = ((58 * _arg1) * 1.5);
stats["missileDamage"] = ((135 * _arg1) * 1.5);
hp = stats.hp;
shield = stats.shield;
_local2 = (_local2 * stats.shield);
stats.shieldRegen = _local2;
}
override public function directDamage(_arg1:Number):void{
if (shield > 0){
shield = (shield - ast1);
if (shield <= 0){
shield = 0;
};
} else {
damage(1000);
};
}
public function doRuntime(_arg1:Object):void{
allRuntime.push(_arg1);
}
override protected function damage(_arg1:Number):void{
shieldTimer = stats.shieldTimer;
if (shield <= 0){
hp = (hp - _arg1);
shield = 0;
};
if (hp <= 0){
if (((!(isDead)) && (!(power)))){
Shooter.music.fadeOut();
};
isDead = true;
destroy.nextFrame();
MovieClip(parent).bossHp.boss = null;
missileTarget.visible = false;
};
}
public function runtime():void{
var _local1:int;
if (!isDead){
if (phase == 0){
accel();
if (y >= 125){
phase = 1;
decel();
};
} else {
if (phase == 1){
decel();
if (shield <= 0){
timer = 0;
phase = 2;
miss = stats["missileReload"];
timer = stats["bulletReload"];
};
shieldTimer = -1;
timer++;
if ((((timer == -6)) || ((timer == -3)))){
bulletReload = 1;
shootHero(MovieClip(mcGun1), ((Math.random() * 5) - (Math.random() * 5)), false);
} else {
if (timer == 0){
bulletReload = 1;
shootHero(MovieClip(mcGun1), ((Math.random() * 5) - (Math.random() * 5)), false);
timer = stats["bulletReload"];
};
};
miss++;
if (((!(MovieClip(parent).player.isDead)) && ((((((((miss == 0)) || ((miss == -30)))) || ((miss == -60)))) || ((miss == -90)))))){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
if (!miss){
miss = stats["missileReload"];
};
};
} else {
if (phase == 2){
if ((((((((hp / stats.hp) * 100) < 66)) && (!(count)))) || ((((((hp / stats.hp) * 100) < 33)) && ((count == 1)))))){
count++;
phase = 3;
timer = 0;
miss = stats["missileReload"];
timer = stats["bulletReload"];
};
shieldTimer = -1;
miss++;
if (((!(MovieClip(parent).player.isDead)) && ((((((((miss == 0)) || ((miss == -10)))) || ((miss == -70)))) || ((miss == -60)))))){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
if (!miss){
miss = stats["missileReload"];
};
};
timer++;
if ((((((((((timer == -15)) || ((timer == -12)))) || ((timer == -9)))) || ((timer == -6)))) || ((timer == -3)))){
bulletReload = 1;
shootHero(MovieClip(mcGun1), ((Math.random() * 5) - (Math.random() * 5)), false);
} else {
if (timer == 0){
bulletReload = 1;
shootHero(MovieClip(mcGun1), ((Math.random() * 5) - (Math.random() * 5)), false);
timer = stats["bulletReload"];
};
};
} else {
if (phase == 3){
shieldTimer = 10;
if (shield >= stats.shield){
phase = 1;
timer = stats["bulletReload"];
stats["shield"] = (stats["shield"] - 250);
shield = stats["shield"];
mines = 0;
miss = stats.missileReload;
};
shootHero(MovieClip(mcGun1), ((Math.random() * 5) - (Math.random() * 5)), false);
};
};
};
};
basic();
MovieClip(spin1).rotation = (MovieClip(spin1).rotation + rotSpeed1);
MovieClip(spin2).rotation = (MovieClip(spin2).rotation + (rotSpeed1 * 1.25));
MovieClip(spin3).rotation = (MovieClip(spin3).rotation + (rotSpeed1 * 0.9));
if (phase){
debrisTimer++;
if (debrisTimer == 120){
MovieClip(parent).spawn("obstacles::Debris", 0, 0);
debrisTimer = 0;
};
};
} else {
deadTimer++;
if (deadTimer == 120){
if (power){
MovieClip(parent).clearObstacles();
};
killBoss();
};
if (deadTimer < 120){
_local1 = 0;
while (_local1 < allRuntime.length) {
allRuntime[_local1].runtime();
_local1++;
};
};
};
health = (hp / stats.hp);
}
}
}//package enemies
Section 3
//Boss03 (enemies.Boss03)
package enemies {
import flash.display.*;
import main.*;
public class Boss03 extends Ship {
public var mcHit:MovieClip;
private var fire:Boolean;// = true
public var health:Number;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
private var rotSpeed:Number;// = 0
private var allRuntime:Array;
private var miss:int;// = 0
private var count:int;// = 0
private var deadTimer:int;// = 0
private var timer:int;// = 0
private var phase:Number;// = 0
public var mcDestroy:MovieClip;
public var mcGun1:MovieClip;
private var rot:Number;// = 22.5
public function Boss03(){
allRuntime = new Array();
count = 0;
deadTimer = 0;
fire = true;
miss = 0;
phase = 0;
rot = 22.5;
rotSpeed = 0;
timer = 0;
super();
stats["bulletDamage"] = 28;
stats["bulletReload"] = -120;
stats["drop"] = 0;
stats["hp"] = 30000;
stats["missileDamage"] = 120;
stats["missileReload"] = -110;
stats["shield"] = 12000;
stats["shieldRadius"] = 95;
stats["shieldRegen"] = (stats["shield"] / 240);
stats["shieldTimer"] = -150;
stats["size"] = "Boss";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 2.3;
stats["value"] = 1350;
stats["valueExtra"] = 0;
stats["valueDecay"] = 0;
boss = true;
color = "red";
destroy = MovieClip(mcDestroy);
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
miss = stats["missileReload"];
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
timer = -1;
allGuns.push(MovieClip(mcGun1));
}
public function powerUp(_arg1:Number):void{
var _local2:Number;
_local2 = (stats.shieldRegen / stats.shield);
stats["value"] = 1;
power = true;
stats.hp = ((27500 * _arg1) * 1.2);
hp = stats.hp;
stats.shield = ((15000 * _arg1) * 1.2);
shield = stats.shield;
stats["bulletDamage"] = ((61 * _arg1) * 1.5);
stats["missileDamage"] = ((142 * _arg1) * 1.5);
_local2 = (_local2 * stats.shield);
stats.shieldRegen = _local2;
}
override public function directDamage(_arg1:Number):void{
}
public function doRuntime(_arg1:Object):void{
allRuntime.push(_arg1);
}
override protected function damage(_arg1:Number):void{
shieldTimer = stats.shieldTimer;
if ((((phase == 1)) || ((phase == 2)))){
shield = (shield - _arg1);
if (shield < 0){
hp = (hp + shield);
shield = 0;
};
if (hp <= 0){
if (((!(isDead)) && (!(power)))){
Shooter.music.fadeOut();
};
isDead = true;
destroy.nextFrame();
MovieClip(parent).bossHp.boss = null;
missileTarget.visible = false;
};
};
}
public function runtime():void{
var _local1:int;
if (!isDead){
if (phase == 0){
accel();
if (y >= 200){
phase = 1;
decel();
};
} else {
if (phase == 1){
decel();
if ((((MovieClip(parent).player.y < y)) || ((Math.sqrt((Math.pow((MovieClip(parent).player.x - x), 2) + Math.pow((MovieClip(parent).player.y - y), 2))) < 120)))){
shootHero(MovieClip(mcGun1), ((Math.random() * 3) - (Math.random() * 3)), false);
} else {
timer++;
if ((((((((timer == 0)) || ((timer == 3)))) || ((timer == 6)))) || ((timer == 9)))){
bulletReload = 1;
shootAngle((5 + 180), false);
shootAngle((15 + 180), false);
shootAngle((25 + 180), false);
};
if ((((((((timer == 39)) || ((timer == 42)))) || ((timer == 45)))) || ((timer == 48)))){
bulletReload = 1;
shootAngle((-5 + 180), false);
shootAngle((-15 + 180), false);
shootAngle((-25 + 180), false);
};
if ((((((((timer == 24)) || ((timer == 26)))) || ((timer == 53)))) || ((timer == 55)))){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
};
if (timer == 77){
timer = -1;
};
};
if (shield <= 0){
phase = 2;
timer = -30;
};
} else {
if (phase == 2){
shieldTimer = -1;
timer++;
if (fire){
if ((((((((((((timer == 0)) || ((timer == 3)))) || ((timer == 6)))) || ((timer == 9)))) || ((timer == 12)))) || ((timer == 15)))){
shootHero(MovieClip(mcGun1), ((Math.random() * 3) - (Math.random() * 3)), false);
};
if (timer == 18){
timer = -1;
fire = !(fire);
};
} else {
if ((((((timer == 0)) || ((timer == 6)))) || ((timer == 12)))){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
};
if (timer == 18){
timer = -1;
fire = !(fire);
};
};
if ((((((((hp / stats.hp) * 100) < 66)) && (!(count)))) || ((((((hp / stats.hp) * 100) < 33)) && ((count == 1)))))){
fire = true;
count++;
phase = 3;
timer = -60;
};
} else {
if (phase == 3){
shieldTimer = 10;
timer++;
if (timer > 0){
if (fire){
shootAngle((0 + rot), false);
shootAngle((45 + rot), false);
shootAngle((90 + rot), false);
shootAngle((135 + rot), false);
shootAngle((180 + rot), false);
shootAngle((225 + rot), false);
shootAngle((270 + rot), false);
shootAngle((315 + rot), false);
};
fire = !(fire);
rot = (rot + rotSpeed);
if (rotSpeed < 1.5){
rotSpeed = (rotSpeed + 0.05);
};
if (rot >= 382.5){
timer = -30;
phase = 1;
rot = 22.5;
rotSpeed = 0;
};
};
};
};
};
};
basic();
} else {
deadTimer++;
if (deadTimer == 120){
killBoss();
};
if (deadTimer < 120){
_local1 = 0;
while (_local1 < allRuntime.length) {
allRuntime[_local1].runtime();
_local1++;
};
};
};
health = (hp / stats.hp);
}
}
}//package enemies
Section 4
//Boss04 (enemies.Boss04)
package enemies {
import flash.events.*;
import flash.display.*;
import main.*;
import obstacles.*;
public class Boss04 extends Ship {
private var returnToPosition:int;// = 0
public var mcHit:MovieClip;
public var mcSpin1:MovieClip;
public var mcSpin2:MovieClip;
public var health:Number;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
private var rotSpeed:Number;// = 0
private var weaponReload:Number;// = 0
private var desiredRot:Number;// = 5
private var moveSpeed:Number;// = 0
private var allRuntime:Array;
private var miss:int;// = 0
private var count:int;// = 0
private var allAst:Array;
private var deadTimer:int;// = 0
private var timer:int;// = 220
public var astDist:Number;// = 60
private var phase:Number;// = 0
public var mcDestroy:MovieClip;
public var mcGun1:MovieClip;
public var astRot:Number;// = 5
public function Boss04(){
allAst = new Array();
allRuntime = new Array();
count = 0;
deadTimer = 0;
desiredRot = 5;
miss = 0;
moveSpeed = 0;
phase = 0;
returnToPosition = 0;
rotSpeed = 0;
timer = 220;
weaponReload = 0;
astDist = 60;
astRot = 5;
super();
addEventListener("addedToStage", initEvent, false, 0, true);
stats["bulletDamage"] = 60;
stats["bulletReload"] = 0;
stats["drop"] = 0;
stats["hp"] = 40000;
stats["missileDamage"] = 150;
stats["missileReload"] = 0;
stats["shield"] = 30000;
stats["shieldRadius"] = 54;
stats["shieldRegen"] = 50;
stats["shieldTimer"] = 0;
stats["size"] = "Boss";
stats["speedAccel"] = 0.5;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 4;
stats["value"] = 1700;
stats["valueExtra"] = 0;
stats["valueDecay"] = 0;
boss = true;
color = "red";
destroy = MovieClip(mcDestroy);
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
miss = stats["missileReload"];
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
}
public function powerUp(_arg1:Number):void{
var _local2:Number;
_local2 = (stats.shieldRegen / stats.shield);
stats["value"] = 1;
power = true;
stats.hp = ((45000 * _arg1) * 1.2);
hp = stats.hp;
stats.shield = ((30000 * _arg1) * 1.2);
shield = stats.shield;
stats["bulletDamage"] = ((65 * _arg1) * 1.5);
stats["missileDamage"] = ((147 * _arg1) * 1.5);
_local2 = (_local2 * stats.shield);
stats.shieldRegen = _local2;
}
override public function directDamage(_arg1:Number):void{
}
public function doRuntime(_arg1:Object):void{
allRuntime.push(_arg1);
}
private function initEvent(_arg1:Event):void{
var _local2:int;
var _local3:AsteroidFixed;
removeEventListener("addedToStage", initEvent);
_local2 = 0;
while (_local2 < 8) {
_local3 = MovieClip(parent).spawn("obstacles::AsteroidFixed", x, y);
_local3.myShip = this;
_local3.myAngle = (_local2 * 45);
allAst.push(_local3);
_local2++;
};
}
override protected function damage(_arg1:Number):void{
var _local2:int;
shieldTimer = stats.shieldTimer;
if ((((phase == 1)) || ((phase == 2)))){
shield = (shield - _arg1);
if (shield < 0){
hp = (hp + shield);
shield = 0;
};
if ((((hp <= 0)) && (!(isDead)))){
if (((!(isDead)) && (!(power)))){
Shooter.music.fadeOut();
};
_local2 = 0;
while (_local2 < allAst.length) {
allAst[_local2].unlock();
_local2++;
};
isDead = true;
destroy.nextFrame();
MovieClip(parent).bossHp.boss = null;
missileTarget.visible = false;
};
};
}
public function runtime():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (!isDead){
if (phase == 0){
shield = stats.shield;
accel();
if (y >= 200){
phase = 1;
decel();
};
} else {
if (phase == 1){
shieldTimer = -1;
decel();
timer++;
if (timer == 400){
astRot = -5;
astDist = 300;
desiredRot = 18;
weaponReload = -90;
};
if (timer == 800){
astRot = 5;
astDist = 60;
timer = 0;
desiredRot = 5;
weaponReload = -90;
};
weaponReload++;
if (timer < 400){
if (weaponReload == 15){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
weaponReload = 0;
};
if (y > 240){
y = (y - 0.5);
};
} else {
if (weaponReload == 45){
shootHero(MovieClip(mcGun1), 0, false);
shootHero(MovieClip(mcGun1), 3, false);
shootHero(MovieClip(mcGun1), -3, false);
weaponReload = 0;
};
if (y < 350){
y = (y + 0.5);
};
};
if (shield <= 0){
phase = 2;
weaponReload = -90;
};
} else {
if (phase == 2){
shieldTimer = -1;
if (y > 240){
y = (y - 0.5);
};
astRot = 0.2;
astDist = 300;
desiredRot = 5;
weaponReload++;
if ((((((((((weaponReload == 10)) || ((weaponReload == 20)))) || ((weaponReload == 30)))) || ((weaponReload == 40)))) || ((weaponReload == 50)))){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
};
if ((((((((((weaponReload == 120)) || ((weaponReload == 130)))) || ((weaponReload == 140)))) || ((weaponReload == 150)))) || ((weaponReload == 160)))){
_local1 = 0;
while (_local1 < 360) {
shootAngle(_local1, false);
_local1 = (_local1 + 5);
};
};
if (weaponReload == 190){
weaponReload = 0;
};
if ((((((((hp / stats.hp) * 100) < 66)) && (!(count)))) || ((((((hp / stats.hp) * 100) < 33)) && ((count == 1)))))){
count++;
phase = 3;
moveSpeed = 0;
timer = -120;
weaponReload = -60;
};
} else {
if (phase == 3){
shieldTimer = 1;
astDist = 60;
desiredRot = 5;
timer++;
if (timer >= 0){
astRot = 5;
weaponReload++;
if (weaponReload == 30){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
weaponReload = 0;
};
_local2 = x;
_local3 = y;
if (((!(returnToPosition)) && (((MovieClip(parent).player.isDead) || ((shield == stats.shield)))))){
returnToPosition = 1;
timer = 0;
weaponReload = -1000;
};
if (!returnToPosition){
_local2 = MovieClip(parent).player.x;
_local3 = MovieClip(parent).player.y;
} else {
_local2 = 300;
_local3 = 240;
};
if ((((returnToPosition == 0)) || ((returnToPosition == 2)))){
_local4 = Math.sqrt((Math.pow((_local2 - x), 2) + Math.pow((_local3 - y), 2)));
if (_local4 > 5){
moveSpeed = (moveSpeed + 0.15);
if (moveSpeed >= (stats.speedMax * 1.5)){
moveSpeed = (stats.speedMax * 1.5);
};
xs = (((_local2 - x) / _local4) * moveSpeed);
ys = (((_local3 - y) / _local4) * moveSpeed);
} else {
if (returnToPosition == 2){
returnToPosition = 3;
timer = 0;
};
};
};
if ((((returnToPosition == 1)) || ((returnToPosition == 3)))){
moveSpeed = (moveSpeed / stats.speedDecel);
if (Math.abs(moveSpeed) < 0.1){
moveSpeed = 0;
};
moveSpeed = 0;
xs = (xs / (stats.speedDecel * 2));
if (Math.abs(xs) < 0.1){
xs = 0;
};
ys = (ys / stats.speedDecel);
if (Math.abs(ys) < 0.1){
ys = 0;
};
if (timer == 90){
if (returnToPosition == 1){
returnToPosition = 2;
} else {
returnToPosition = 0;
phase = 1;
weaponReload = 0;
timer = 0;
};
};
};
};
};
};
};
};
basic();
_local1 = 0;
while (_local1 < allAst.length) {
allAst[_local1].runtimeBoss();
_local1++;
};
} else {
deadTimer++;
if (deadTimer == 120){
if (power){
MovieClip(parent).clearObstacles();
};
killBoss();
};
if (deadTimer < 120){
_local1 = 0;
while (_local1 < allRuntime.length) {
allRuntime[_local1].runtime();
_local1++;
};
};
};
if (rotSpeed < desiredRot){
rotSpeed = (rotSpeed + 0.15);
if (rotSpeed > desiredRot){
rotSpeed = desiredRot;
};
};
if (rotSpeed > desiredRot){
rotSpeed = (rotSpeed - 0.15);
if (rotSpeed < desiredRot){
rotSpeed = desiredRot;
};
};
MovieClip(mcSpin1).spinner.rotation = (MovieClip(mcSpin1).spinner.rotation + (rotSpeed * 2));
MovieClip(mcSpin2).spinner.rotation = (MovieClip(mcSpin2).spinner.rotation + (rotSpeed * 2));
health = (hp / stats.hp);
}
}
}//package enemies
Section 5
//Boss05 (enemies.Boss05)
package enemies {
import flash.events.*;
import flash.display.*;
import main.*;
public class Boss05 extends Ship {
public var mcHit:MovieClip;
private var fire:Boolean;// = false
public var health:Number;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
private var angle:Number;// = 0
private var weaponReload:Number;// = 0
private var moveSpeed:Number;// = 1
private var allRuntime:Array;
private var miss:int;// = -90
private var count:int;// = 0
private var deadTimer:int;// = 0
private var timer:int;// = -90
private var phase:Number;// = 0
public var mcDestroy:MovieClip;
private var target:Number;// = 460
public var mcGun1:MovieClip;
public var mcGun2:MovieClip;
private var angle2:Number;// = 90
private var leaveSpeed:Number;// = 0
public function Boss05(){
allRuntime = new Array();
angle = 0;
angle2 = 90;
count = 0;
deadTimer = 0;
fire = false;
leaveSpeed = 0;
miss = -90;
moveSpeed = 1;
phase = 0;
target = 460;
timer = -90;
weaponReload = 0;
super();
stats["bulletDamage"] = 70;
stats["bulletReload"] = 0;
stats["drop"] = 0;
stats["hp"] = 80000;
stats["missileDamage"] = 150;
stats["missileReload"] = 0;
stats["shield"] = 40000;
stats["shieldRadius"] = 100;
stats["shieldRegen"] = 65;
stats["shieldTimer"] = 0;
stats["size"] = "Boss";
stats["speedAccel"] = 0.5;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 4;
stats["value"] = 0;
stats["valueExtra"] = 0;
stats["valueDecay"] = 0;
boss = true;
color = "red";
destroy = MovieClip(mcDestroy);
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
}
public function powerUp(_arg1:Number):void{
var _local2:Number;
_local2 = (stats.shieldRegen / stats.shield);
stats["value"] = 1;
power = true;
stats.hp = (stats.hp * (_arg1 * 1.2));
hp = stats.hp;
stats.shield = (stats.shield * (_arg1 * 1.2));
shield = stats.shield;
stats.bulletDamage = (stats.bulletDamage * (_arg1 * 1.5));
stats.missileDamage = (stats.missileDamage * (_arg1 * 1.5));
_local2 = (_local2 * stats.shield);
stats.shieldRegen = _local2;
}
override public function directDamage(_arg1:Number):void{
}
public function doRuntime(_arg1:Object):void{
allRuntime.push(_arg1);
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
}
override protected function damage(_arg1:Number):void{
if ((((((((phase == 1)) || ((phase == 2)))) || ((phase == 6)))) || ((phase == 7)))){
shield = (shield - _arg1);
if (shield < 0){
hp = (hp + shield);
shield = 0;
};
if ((((hp <= 0)) && (!(isDead)))){
if (((!(isDead)) && (!(power)))){
Shooter.music.fadeOut();
};
isDead = true;
destroy.nextFrame();
MovieClip(parent).bossHp.boss = null;
missileTarget.visible = false;
};
};
}
public function runtime():void{
var _local1:int;
var _local2:Number;
if (!isDead){
if (phase == 0){
shield = stats.shield;
accel();
if (y >= 125){
phase = 1;
decel();
};
} else {
if (phase == 1){
shieldTimer = -5;
timer++;
miss++;
if ((((((timer == 20)) || ((timer == 25)))) || ((timer == 30)))){
if (timer == 20){
angle = (((-180 * Math.atan2((MovieClip(parent).player.y - y), (MovieClip(parent).player.x - x))) / Math.PI) - 90);
};
bulletReload = 1;
shootAngle((angle - 30), false);
shootAngle((angle - 20), false);
shootAngle((angle - 10), false);
shootAngle((angle + 0), false);
shootAngle((angle + 10), false);
shootAngle((angle + 20), false);
shootAngle((angle + 30), false);
};
if ((((((miss == 55)) || ((miss == 60)))) || ((miss == 65)))){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
};
if (timer == 90){
timer = 0;
};
if (miss == 90){
miss = 0;
};
if (timer >= 0){
x = (x + moveSpeed);
if ((((moveSpeed > 0)) && ((x > target)))){
moveSpeed = (moveSpeed * -1);
target = 140;
};
if ((((moveSpeed < 0)) && ((x < target)))){
moveSpeed = (moveSpeed * -1);
target = 460;
};
};
decel();
if (shield <= 0){
phase = 2;
timer = -60;
};
} else {
if (phase == 2){
shieldTimer = -5;
timer++;
if (Math.abs((300 - x)) > 2){
if ((x > 300)){
x--;
} else {
x++;
};
timer = -60;
};
if (timer >= 0){
fire = !(fire);
if (fire){
bulletReload = 1;
shootAngle(angle2, false);
shootAngle((angle2 + 180), false);
};
};
if (timer == 60){
angle = 0;
};
if (timer >= 60){
angle++;
if (fire){
bulletReload = 1;
shootAngle(((0 + angle) + 45), false);
shootAngle(((90 + angle) + 45), false);
shootAngle(((180 + angle) + 45), false);
shootAngle(((270 + angle) + 45), false);
};
if (angle == 45){
angle2 = 0;
};
if (angle == 90){
angle2 = 90;
timer = 59;
};
};
if ((((health <= 0.75)) && (!(count)))){
miss = -60;
timer = -60;
phase = 3;
count++;
};
if ((((health <= 0.5)) && ((count == 1)))){
miss = 0;
phase = 4;
timer = 0;
count++;
};
} else {
if (phase == 3){
timer++;
miss++;
if (timer == 8){
_local1 = 0;
while (_local1 < 360) {
bulletReload = 1;
shootAngle(_local1, false);
_local1 = (_local1 + 45);
};
};
if (timer == 16){
_local1 = 22.5;
while (_local1 < 360) {
bulletReload = 1;
shootAngle(_local1, false);
_local1 = (_local1 + 45);
};
timer = 0;
};
shieldTimer = 5;
if (miss == 16){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
};
if (miss == 32){
miss = 0;
};
if (shield >= stats.shield){
miss = -60;
timer = -60;
if (count != 3){
angle = 0;
angle2 = 90;
} else {
angle = 90;
angle2 = 0;
};
phase = ((count == 3)) ? 6 : 1;
};
if ((((Math.abs((300 - x)) > 3)) && ((count == 3)))){
if ((x > 300)){
x = (x - 2);
} else {
x = (x + 2);
};
timer = -60;
miss = -60;
angle = 90;
angle2 = 0;
fire = true;
};
} else {
if (phase == 4){
if (y > (-(stats.shieldRadius) * 1.2)){
y = (y - leaveSpeed);
};
if (leaveSpeed < stats.speedMax){
leaveSpeed = (leaveSpeed + (stats.speedAccel / 5));
};
shieldTimer = 10;
timer++;
if (timer == 180){
_local2 = Math.floor((Math.random() * 3));
switch (_local2){
case 0:
MovieClip(parent).level.base = "gsgmgmgmgmgjeglg<egleg-egrg>egregsg[egsgmgmgjeg<g>g<eglglegrgrgreglgrglgr";
break;
case 1:
MovieClip(parent).level.base = "grgreglglegrgreglglg<g>egrgrg>g<eglglegsgmgmgmgjeg-g<eg-g>egrgrg>g<egsgmgj";
break;
default:
MovieClip(parent).level.base = "glglglg<eg-g>egrgrglegsgmgmgmgjg<g>g<eglglegrgrgregsg[eg-egsgmgmgmgjg<g>";
break;
};
};
if (timer == 1700){
x = 300;
phase = 5;
timer = -60;
miss = -60;
};
} else {
if (phase == 5){
shield = stats.shield;
accel();
if (y >= 125){
stats.shield = (stats.shield * 0.7);
shield = stats.shield;
phase = 6;
decel();
angle = 90;
angle2 = 0;
fire = true;
};
} else {
if (phase == 6){
shieldTimer = -5;
decel();
timer++;
miss++;
if (timer >= 30){
angle2++;
bulletReload = 1;
fire = !(fire);
if (fire){
shootAngle(((45 - angle2) + angle), false);
shootAngle(((-45 + angle2) + angle), false);
shootAngle(((135 + angle2) + angle), false);
shootAngle(((-135 - angle2) + angle), false);
};
if (angle2 == 45){
angle2 = 0;
timer = 0;
angle = ((angle == 90)) ? 0 : 90;
};
};
if (miss == 30){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
miss = 0;
};
if (shield <= 0){
phase = 7;
timer = -60;
miss = -60;
};
} else {
if (phase == 7){
shieldTimer = -5;
timer++;
miss++;
if ((((((((((((timer == 2)) || ((timer == 4)))) || ((timer == 6)))) || ((timer == 8)))) || ((timer == 10)))) || ((timer == 12)))){
shoot(MovieClip(mcGun1), true, false, true);
shoot(MovieClip(mcGun2), true, false, true);
};
if ((((miss == 20)) || ((miss == 40)))){
MovieClip(parent).newMissile(this, stats["missileDamage"]);
};
if (timer == 40){
timer = 0;
};
if (miss == 40){
miss = 0;
};
if (timer >= 0){
x = (x + (moveSpeed * 2));
if ((((moveSpeed > 0)) && ((x > target)))){
moveSpeed = (moveSpeed * -1);
target = 140;
};
if ((((moveSpeed < 0)) && ((x < target)))){
moveSpeed = (moveSpeed * -1);
target = 460;
};
};
if ((((health <= 0.25)) && ((count == 2)))){
count = 3;
miss = -60;
phase = 3;
timer = -60;
};
};
};
};
};
};
};
};
};
basic();
} else {
deadTimer++;
if (deadTimer == 120){
if (power){
MovieClip(parent).level.base = "f�";
};
killBoss();
};
if (deadTimer < 120){
_local1 = 0;
while (_local1 < allRuntime.length) {
allRuntime[_local1].runtime();
_local1++;
};
};
};
health = (hp / stats.hp);
}
}
}//package enemies
Section 6
//BossMissile (enemies.BossMissile)
package enemies {
import flash.events.*;
import flash.display.*;
public class BossMissile extends MovieClip {
private var ys:Number;
public var mc_trail:MovieClip;
private var targetSpeed:Number;// = 1
private var maxSpeed:Number;// = 15
private var speed:Number;// = 0
private var dead:Boolean;// = false
public var damage:Number;
private var xs:Number;
private var target:MovieClip;
private var speed2:Number;// = 0
private var accel:Number;// = 0.5
public function BossMissile(_arg1:Object, _arg2:int){
accel = 0.5;
dead = false;
maxSpeed = 15;
speed = 0;
speed2 = 0;
targetSpeed = 1;
super();
addEventListener("addedToStage", initEvent, false, 0, true);
x = _arg1.x;
y = _arg1.y;
damage = _arg2;
target = new EnemyLock();
xs = ((Math.random() * 5) + 7.5);
ys = ((Math.random() * 5) + 7.5);
MovieClip(mc_trail).stop();
MovieClip(mc_trail).width = 13;
}
public function runtime():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (!MovieClip(parent).player.isDead){
target.nextFrame();
if (speed < maxSpeed){
speed = (speed + accel);
speed2 = (speed2 + accel);
};
_local1 = x;
_local2 = y;
x = (x + ((Math.cos(Math.atan2((target.y - y), (target.x - x))) * speed) + xs));
y = (y + ((Math.sin(Math.atan2((target.y - y), (target.x - x))) * speed) + ys));
_local3 = Math.sqrt((Math.pow((MovieClip(parent).player.x - target.x), 2) + Math.pow((MovieClip(parent).player.y - target.y), 2)));
if (_local3 > 5){
_local4 = 3;
target.x = (target.x + (((MovieClip(parent).player.x - target.x) / _local3) * _local4));
target.y = (target.y + (((MovieClip(parent).player.y - target.y) / _local3) * _local4));
};
rotation = ((180 * Math.atan2((y - _local2), (x - _local1))) / Math.PI);
xs = (xs / 1.1);
ys = (ys / 1.1);
MovieClip(mc_trail).width = (13 + (speed2 * 2));
if (Math.sqrt((Math.pow((x - target.x), 2) + Math.pow((y - target.y), 2))) <= speed){
MovieClip(parent).player.touch(this, true);
killMe();
};
} else {
killMe();
};
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
target.x = ((MovieClip(parent).player.x + (Math.random() * 20)) - (Math.random() * 20));
target.y = ((MovieClip(parent).player.y + (Math.random() * 20)) - (Math.random() * 20));
MovieClip(parent).addChildAt(target, MovieClip(parent).getDepthID(false));
if ((MovieClip(parent).player.x < x)){
xs = (xs * -1);
//unresolved jump
};
if ((MovieClip(parent).player.y < y)){
ys = (ys * -1);
//unresolved jump
};
}
public function deleteMe():void{
}
private function killMe():void{
MovieClip(parent).spawn("ExplosionVerySmall", x, y);
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(target);
MovieClip(parent).removeChild(this);
}
}
}//package enemies
Section 7
//Bullet (enemies.Bullet)
package enemies {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Bullet extends MovieClip {
private var ys:Number;
private var speed:Number;// = 10
public var damage:Number;
private var xs:Number;
private var isDead:Boolean;// = false
private var runList:Array;
public function Bullet(_arg1:Object, _arg2:Point, _arg3:Object, _arg4:Number, _arg5:Number, _arg6:String){
isDead = false;
runList = new Array();
speed = 10;
super();
addFrameScript(7, frame8, 9, frame10, 17, frame18, 19, frame20, 27, frame28, 29, frame30, 37, frame38, 39, frame40);
addEventListener("addedToStage", initEvent, false, 0, true);
x = _arg1.localToGlobal(_arg2).x;
y = _arg1.localToGlobal(_arg2).y;
rotation = _arg4;
damage = _arg5;
stop();
_arg3.gotoAndStop("fire");
if (_arg6 == "red"){
speed = 15;
};
ys = -((speed * Math.cos(((Math.PI / 180) * rotation))));
xs = -((speed * Math.sin(((Math.PI / 180) * rotation))));
rotation = (((180 * Math.atan2(((y + ys) - y), ((x + xs) - x))) / Math.PI) + 90);
gotoAndStop(_arg6);
}
public function runtime():void{
var _local1:Array;
var _local2:int;
if (!isDead){
x = (x + xs);
y = (y + ys);
if ((((((((y < -35)) || ((y > 735)))) || ((x < -35)))) || ((x > 635)))){
deleteMe();
} else {
testCollisions();
};
} else {
nextFrame();
};
_local1 = runList.slice(0);
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2].nextFrame();
_local2++;
};
}
function frame10(){
prevFrame();
}
function frame18(){
deleteMe();
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
testCollisions();
if (!isDead){
x = (x + xs);
y = (y + ys);
};
}
function frame8(){
deleteMe();
}
function frame20(){
prevFrame();
}
function frame30(){
prevFrame();
}
function frame38(){
deleteMe();
}
function frame40(){
prevFrame();
}
function frame28(){
deleteMe();
}
public function backTrack():void{
x = (x - (xs / 5));
y = (y - (ys / 5));
}
private function testCollisions():void{
var _local1:Array;
var _local2:int;
if (((!(MovieClip(parent).player.isDead)) && (MovieClip(parent).player.touch(this)))){
isDead = true;
};
if (!isDead){
_local1 = MovieClip(parent).obstaclesList;
_local2 = 0;
while (_local2 < _local1.length) {
if (_local1[_local2].touch(this)){
isDead = true;
break;
};
_local2++;
};
};
}
public function deleteMe():void{
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
public function doRuntime(_arg1:Object):void{
if ((runList.indexOf(_arg1) == -1)){
runList.push(_arg1);
} else {
runList.splice(runList.indexOf(_arg1), 1);
};
}
}
}//package enemies
Section 8
//BulletBase (enemies.BulletBase)
package enemies {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class BulletBase extends MovieClip {
private var ys:Number;
private var speed:Number;// = 10
public var damage:Number;
private var xs:Number;
private var isDead:Boolean;// = false
private var runList:Array;
public function BulletBase(_arg1:Object, _arg2:Point, _arg3:Object, _arg4:Number, _arg5:Number, _arg6:String){
isDead = false;
runList = new Array();
speed = 10;
super();
addFrameScript(7, frame8, 9, frame10, 17, frame18, 19, frame20, 27, frame28, 29, frame30, 37, frame38, 39, frame40);
addEventListener("addedToStage", initEvent, false, 0, true);
x = _arg1.localToGlobal(_arg2).x;
y = _arg1.localToGlobal(_arg2).y;
rotation = _arg4;
damage = _arg5;
stop();
_arg3.gotoAndStop("fire");
if (_arg6 == "red"){
speed = 15;
};
ys = -((speed * Math.cos(((Math.PI / 180) * rotation))));
xs = -((speed * Math.sin(((Math.PI / 180) * rotation))));
rotation = (((180 * Math.atan2(((y + ys) - y), ((x + xs) - x))) / Math.PI) + 90);
gotoAndStop(_arg6);
x = (x + xs);
y = (y + ys);
}
public function runtime():void{
var _local1:Array;
var _local2:int;
if (!isDead){
x = (x + xs);
y = (y + ys);
y = (y + 5.5);
y = Math.ceil(y);
if ((((((((y < -35)) || ((y > 735)))) || ((x < -35)))) || ((x > 635)))){
deleteMe();
} else {
testCollisions();
};
} else {
nextFrame();
};
_local1 = runList.slice(0);
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2].nextFrame();
_local2++;
};
}
function frame10(){
prevFrame();
}
function frame18(){
deleteMe();
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
testCollisions();
if (!isDead){
x = (x + xs);
y = (y + ys);
};
}
function frame8(){
deleteMe();
}
function frame20(){
prevFrame();
}
function frame30(){
prevFrame();
}
function frame38(){
deleteMe();
}
function frame40(){
prevFrame();
}
function frame28(){
deleteMe();
}
public function backTrack():void{
x = (x - (xs / 5));
y = (y - (ys / 5));
y = (y - 1.1);
}
private function testCollisions():void{
var _local1:Array;
var _local2:int;
if (((!(MovieClip(parent).player.isDead)) && (MovieClip(parent).player.touch(this)))){
isDead = true;
};
if (!isDead){
_local1 = MovieClip(parent).obstaclesList;
_local2 = 0;
while (_local2 < _local1.length) {
if (_local1[_local2].touch(this)){
isDead = true;
break;
};
_local2++;
};
};
}
public function deleteMe():void{
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
public function doRuntime(_arg1:Object):void{
if ((runList.indexOf(_arg1) == -1)){
runList.push(_arg1);
} else {
runList.splice(runList.indexOf(_arg1), 1);
};
}
}
}//package enemies
Section 9
//Double01 (enemies.Double01)
package enemies {
import flash.display.*;
public class Double01 extends Ship {
private var yt:int;
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGun1:MovieClip;
public var mcGear2:MovieClip;
private var rotSpeed:Number;// = 15
private var mode:int;// = 0
public var mcGear1:MovieClip;
public function Double01(){
mode = 0;
rotSpeed = 15;
yt = ((Math.random() * 100) + 100);
super();
stats["bulletDamage"] = 14;
stats["bulletReload"] = -60;
stats["drop"] = 4;
stats["hp"] = 50;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 65;
stats["shieldRadius"] = 19.2;
stats["shieldRegen"] = 0.3;
stats["shieldTimer"] = -150;
stats["size"] = "Small";
stats["speedAccel"] = 0.5;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 5.5;
stats["value"] = 13.5;
stats["valueExtra"] = 7;
stats["valueDecay"] = 0.1;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
color = "green";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
allGuns.push(MovieClip(mcGun1));
}
public function runtime():void{
if (!isDead){
MovieClip(mcGear1).rotation = (MovieClip(mcGear1).rotation - rotSpeed);
MovieClip(mcGear2).rotation = (MovieClip(mcGear2).rotation + rotSpeed);
if (y < yt){
accel();
} else {
decel();
mode = 1;
};
if (mode == 1){
rotSpeed = (rotSpeed + ((5 - rotSpeed) / 10));
shootHero(MovieClip(mcGun1), 3, false);
shootHero(MovieClip(mcGun1), -3);
};
basic();
};
}
}
}//package enemies
Section 10
//Double02 (enemies.Double02)
package enemies {
import flash.display.*;
public class Double02 extends Ship {
private var yt:int;
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGear4:MovieClip;
public var mcGear2:MovieClip;
private var rotSpeed:Number;// = 15
public var mcGear3:MovieClip;
public var mcGear1:MovieClip;
public var mcGun1:MovieClip;
private var mode:int;// = 0
public function Double02(){
mode = 0;
rotSpeed = 15;
yt = ((Math.random() * 100) + 100);
super();
stats["bulletDamage"] = 20;
stats["bulletReload"] = -40;
stats["drop"] = 4;
stats["hp"] = 140;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 250;
stats["shieldRadius"] = 25;
stats["shieldRegen"] = 0.5;
stats["shieldTimer"] = -150;
stats["size"] = "Small";
stats["speedAccel"] = 0.5;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 5.5;
stats["value"] = 20;
stats["valueExtra"] = 11;
stats["valueDecay"] = 0.15;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
color = "green";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
allGuns.push(MovieClip(mcGun1));
}
public function runtime():void{
if (!isDead){
MovieClip(mcGear1).rotation = (MovieClip(mcGear1).rotation - rotSpeed);
MovieClip(mcGear2).rotation = (MovieClip(mcGear2).rotation + rotSpeed);
MovieClip(mcGear3).rotation = (MovieClip(mcGear3).rotation - rotSpeed);
MovieClip(mcGear4).rotation = (MovieClip(mcGear4).rotation + rotSpeed);
if (y < yt){
accel();
} else {
decel();
mode = 1;
};
if (mode == 1){
rotSpeed = (rotSpeed + ((5 - rotSpeed) / 10));
shootHero(MovieClip(mcGun1), 3, false);
shootHero(MovieClip(mcGun1), -3);
};
basic();
};
}
}
}//package enemies
Section 11
//Double03 (enemies.Double03)
package enemies {
import flash.display.*;
public class Double03 extends Ship {
private var yt:int;
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGun1:MovieClip;
private var mode:int;// = 0
public function Double03(){
mode = 0;
yt = ((Math.random() * 100) + 100);
super();
stats["bulletDamage"] = 65;
stats["bulletReload"] = -30;
stats["drop"] = 4;
stats["hp"] = 270;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 450;
stats["shieldRadius"] = 31;
stats["shieldRegen"] = 0.5;
stats["shieldTimer"] = -150;
stats["size"] = "Small";
stats["speedAccel"] = 0.5;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 5.5;
stats["value"] = 27;
stats["valueExtra"] = 10;
stats["valueDecay"] = 0.22;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
color = "green";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
allGuns.push(MovieClip(mcGun1));
}
public function runtime():void{
if (!isDead){
if (y < yt){
accel();
} else {
decel();
mode = 1;
};
if (mode == 1){
shootHero(MovieClip(mcGun1), 3, false);
shootHero(MovieClip(mcGun1), -3);
};
basic();
};
}
}
}//package enemies
Section 12
//Mine01 (enemies.Mine01)
package enemies {
import flash.display.*;
public class Mine01 extends Ship {
private var locked:Boolean;// = false
private var light:MovieClip;
public var mcHit:MovieClip;
public var mcLight:MovieClip;
private var range:int;// = 300
public var mcMissileTarget:MovieClip;
public var mcShield:MovieClip;
private var body:MovieClip;
public var mcBody:MovieClip;
private var speed:Number;
private var rot:Number;// = 0
public function Mine01(){
locked = false;
range = 300;
rot = 0;
speed = (1.5 + (Math.random() * 1));
super();
stats["bulletDamage"] = 25;
stats["bulletReload"] = 0;
stats["hp"] = 40;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 0;
stats["shieldRadius"] = 0;
stats["shieldRegen"] = 0;
stats["shieldTimer"] = 0;
stats["size"] = "VerySmall";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 10;
stats["value"] = 5;
stats["valueExtra"] = 0;
stats["valueDecay"] = 0;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
body = MovieClip(mcBody);
light = MovieClip(mcLight);
light.stop();
}
public function activate(_arg1:Boolean=false):void{
stats["value"] = 0;
light.nextFrame();
locked = true;
speed = 0;
if (_arg1){
stats.hp = 120;
hp = 120;
stats.bulletDamage = 250;
};
}
public function runtime():void{
if (!isDead){
body.rotation = (body.rotation + rot);
if (!locked){
y = (y + speed);
if (Math.sqrt((Math.pow((x - MovieClip(parent).player.x), 2) + Math.pow((y - MovieClip(parent).player.y), 2))) <= range){
light.nextFrame();
locked = true;
speed = 0;
};
} else {
if (!MovieClip(parent).player.isDead){
if (rot < 15){
rot = (rot + 0.5);
};
if (speed < stats.speedMax){
speed = (speed + 0.125);
};
x = (x + (Math.cos(Math.atan2((MovieClip(parent).player.y - y), (MovieClip(parent).player.x - x))) * speed));
y = (y + (Math.sin(Math.atan2((MovieClip(parent).player.y - y), (MovieClip(parent).player.x - x))) * speed));
if (Math.sqrt((Math.pow((x - MovieClip(parent).player.x), 2) + Math.pow((y - MovieClip(parent).player.y), 2))) <= 11){
MovieClip(parent).player.damage(stats.bulletDamage);
stats.value = 0;
damage(999);
};
} else {
stats.value = 0;
damage(999);
};
};
basic();
};
}
override public function setMissilePriority():void{
missilePriority = 9999999;
}
}
}//package enemies
Section 13
//Mine02 (enemies.Mine02)
package enemies {
import flash.display.*;
public class Mine02 extends Ship {
public var mcHit:MovieClip;
public var mcBody:MovieClip;
public var mcMissileTarget:MovieClip;
private var speed:Number;
public var mcShield:MovieClip;
private var field:MovieClip;
public var mcField:MovieClip;
public var mcLight:MovieClip;
private var light:MovieClip;
private var reloadTimer:int;// = -60
private var reload:int;// = 0
private var body:MovieClip;
private var rot:Number;
public function Mine02(){
reload = 0;
reloadTimer = -60;
rot = ((Math.random() * 2) - (Math.random() * 2));
speed = (1.5 + (Math.random() * 1));
super();
stats["bulletDamage"] = 0;
stats["bulletReload"] = 0;
stats["hp"] = 200;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 0;
stats["shieldRadius"] = 0;
stats["shieldRegen"] = 0;
stats["shieldTimer"] = 0;
stats["size"] = "VerySmall";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 10;
stats["value"] = 5;
stats["valueExtra"] = 0;
stats["valueDecay"] = 0;
bulletReload = (stats.bulletReload - Math.ceil((Math.random() * stats.bulletReload)));
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
reload = (((Math.random() * reloadTimer) / 2) + (reloadTimer / 2));
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
body = MovieClip(mcBody);
field = MovieClip(mcField);
light = MovieClip(mcLight);
light.stop();
}
override public function setMissilePriority():void{
missilePriority = 9999999;
}
public function runtime():void{
var _local1:MovieClip;
if (!isDead){
body.rotation = (body.rotation + rot);
y = (y + speed);
basic();
reload++;
if (field.alpha){
field.nextFrame();
field.alpha = (field.alpha - 0.15);
};
if (reload > -5){
light.nextFrame();
if (!reload){
light.prevFrame();
field.alpha = 1;
field.nextFrame();
reload = reloadTimer;
_local1 = MovieClip(parent).player;
if (Math.sqrt((Math.pow((_local1.x - x), 2) + Math.pow((_local1.y - y), 2))) < 55){
_local1.shieldDamage();
};
};
};
};
}
}
}//package enemies
Section 14
//Missile01 (enemies.Missile01)
package enemies {
import flash.display.*;
public class Missile01 extends Ship {
private var yt:int;
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
private var mode:int;// = 0
public function Missile01(){
mode = 0;
yt = ((Math.random() * 150) + 75);
super();
stats["bulletDamage"] = 0;
stats["bulletReload"] = 0;
stats["drop"] = 3;
stats["hp"] = 220;
stats["missileDamage"] = 80;
stats["missileReload"] = -50;
stats["shield"] = 320;
stats["shieldRadius"] = 25;
stats["shieldRegen"] = 0.5;
stats["shieldTimer"] = -150;
stats["size"] = "Small";
stats["speedAccel"] = 0.5;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 8;
stats["value"] = 26;
stats["valueExtra"] = 9;
stats["valueDecay"] = 0.18;
color = "orange";
hit = MovieClip(mcHit);
hp = stats.hp;
missileReload = Math.round((stats.missileReload / 2));
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
}
public function runtime():void{
if (!isDead){
if (y < yt){
accel();
} else {
decel();
};
shootMissile();
basic();
};
}
}
}//package enemies
Section 15
//Missile02 (enemies.Missile02)
package enemies {
import flash.display.*;
public class Missile02 extends Ship {
private var yt:int;
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
private var mode:int;// = 0
public function Missile02(){
mode = 0;
yt = ((Math.random() * 150) + 75);
super();
stats["bulletDamage"] = 0;
stats["bulletReload"] = 0;
stats["drop"] = 3;
stats["hp"] = 340;
stats["missileDamage"] = 150;
stats["missileReload"] = -40;
stats["shield"] = 580;
stats["shieldRadius"] = 35;
stats["shieldRegen"] = 0.5;
stats["shieldTimer"] = -150;
stats["size"] = "Medium";
stats["speedAccel"] = 0.5;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 8;
stats["value"] = 32;
stats["valueExtra"] = 12;
stats["valueDecay"] = 0.22;
color = "orange";
hit = MovieClip(mcHit);
hp = stats.hp;
missileReload = Math.round((stats.missileReload / 2));
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
}
public function runtime():void{
if (!isDead){
if (y < yt){
accel();
} else {
decel();
};
shootMissile();
basic();
};
}
}
}//package enemies
Section 16
//Missile03 (enemies.Missile03)
package enemies {
import flash.display.*;
public class Missile03 extends Ship {
private var yt:int;
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
private var mode:int;// = 0
public function Missile03(){
mode = 0;
yt = ((Math.random() * 150) + 75);
super();
stats["bulletDamage"] = 0;
stats["bulletReload"] = 0;
stats["drop"] = 3;
stats["hp"] = 650;
stats["missileDamage"] = 180;
stats["missileReload"] = -40;
stats["shield"] = 950;
stats["shieldRadius"] = 35;
stats["shieldRegen"] = 0.5;
stats["shieldTimer"] = -150;
stats["size"] = "Medium";
stats["speedAccel"] = 0.5;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 4;
stats["value"] = 58;
stats["valueExtra"] = 20;
stats["valueDecay"] = 0.25;
color = "orange";
hit = MovieClip(mcHit);
hp = stats.hp;
missileReload = Math.round((stats.missileReload / 2));
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
}
public function runtime():void{
if (!isDead){
if (y < yt){
accel();
} else {
decel();
};
if (missileReload == -10){
missileReload = 1;
shootMissile();
missileReload = -10;
};
shootMissile();
basic();
};
}
}
}//package enemies
Section 17
//Ship (enemies.Ship)
package enemies {
import flash.display.*;
import flash.geom.*;
import main.*;
public class Ship extends MovieClip {
protected var destroy:MovieClip;
protected var power:Boolean;// = false
protected var hp:Number;// = 0
protected var ys:Number;// = 0
protected var bulletReload:Number;// = 0
private var soundShoot:Boolean;// = false
public var missileTarget:MovieClip;
protected var missileReload:Number;// = 0
protected var color:String;
protected var shield:Number;
protected var shieldTimer:int;
public var boss:Boolean;// = false
protected var allGuns:Array;
protected var xs:Number;// = 0
protected var shieldSprite:MovieClip;
protected var hit:MovieClip;
protected var stats:Array;
public var isDead:Boolean;// = false
public var missilePriority:Number;// = 0
public function Ship(){
soundShoot = false;
allGuns = new Array();
bulletReload = 0;
hp = 0;
missileReload = 0;
power = false;
stats = new Array();
xs = 0;
ys = 0;
boss = false;
isDead = false;
missilePriority = 0;
super();
stats["bulletDamage"] = 0;
stats["bulletReload"] = 0;
stats["drop"] = 0;
stats["hp"] = 0;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 0;
stats["shieldRadius"] = 0;
stats["shieldRegen"] = 0;
stats["shieldTimer"] = 0;
stats["size"] = "";
stats["speedAccel"] = 0;
stats["speedDecel"] = 0;
stats["speedMax"] = 0;
stats["value"] = 0;
stats["valueDecay"] = 0;
stats["valueExtra"] = 0;
}
protected function killBoss():void{
Shooter.sound.playSound("BoomBoss");
MovieClip(parent).level.bossWait();
if ((stats.valueExtra > 0)){
MovieClip(parent).score = (MovieClip(parent).score + (Math.round(stats.valueExtra) + stats.value));
} else {
MovieClip(parent).score = (MovieClip(parent).score + stats.value);
};
MovieClip(parent).spawn(("Explosion" + stats.size), x, y);
if (stats.size != "VerySmall"){
MovieClip(parent).spawn(("Debris" + stats.size), x, y);
//unresolved jump
};
MovieClip(parent).doRuntime(this);
MovieClip(parent).ships.splice(MovieClip(parent).ships.indexOf(this), 1);
MovieClip(parent).removeChild(this);
}
protected function shootMissile():void{
if ((((missileReload > 0)) && (!(MovieClip(parent).player.isDead)))){
missileReload = stats.missileReload;
MovieClip(parent).newMissile(this, stats["missileDamage"]);
};
}
protected function decel():void{
ys = (ys / stats.speedDecel);
if (Math.abs(ys) < 0.1){
ys = 0;
};
}
protected function basic():void{
var _local1:int;
soundShoot = false;
x = (x + xs);
y = (y + ys);
if (y >= (700 + (stats.shieldRadius * 2))){
MovieClip(parent).doRuntime(this);
MovieClip(parent).ships.splice(MovieClip(parent).ships.indexOf(this), 1);
MovieClip(parent).removeChild(this);
};
shieldTimer++;
if (shieldTimer > 0){
shield = (shield + stats.shieldRegen);
if (shield > stats.shield){
shield = stats.shield;
};
};
shieldSprite.alpha = (shield / stats.shield);
if (y > 0){
stats.valueExtra = (stats.valueExtra - stats.valueDecay);
};
bulletReload++;
missileReload++;
_local1 = 0;
while (_local1 < allGuns.length) {
allGuns[_local1].nextFrame();
_local1++;
};
}
public function touch(_arg1:Object, _arg2:Boolean=false):Boolean{
if (shield){
if (Math.sqrt((Math.pow((x - _arg1.x), 2) + Math.pow((y - _arg1.y), 2))) <= stats.shieldRadius){
if (!_arg2){
while (Math.sqrt((Math.pow((x - _arg1.x), 2) + Math.pow((y - _arg1.y), 2))) <= stats.shieldRadius) {
_arg1.y = (_arg1.y + 0.5);
};
};
shieldSprite.hit((((Math.atan2((_arg1.y - y), (_arg1.x - x)) * 360) / (2 * Math.PI)) + 90));
_arg1.deleteMe();
damage(_arg1.damage);
return (true);
} else {
return (false);
};
} else {
if (_arg1.hitTestObject(hit)){
if (!_arg2){
while (_arg1.hitTestObject(hit)) {
_arg1.y = (_arg1.y + 0.5);
};
};
damage(_arg1.damage);
return (true);
//unresolved jump
};
};
return (!NULL!);
}
protected function shootAngle(_arg1:Number, _arg2:Boolean=true):void{
if ((((bulletReload > 0)) && (!(MovieClip(parent).player.isDead)))){
if (_arg2){
bulletReload = stats.bulletReload;
};
MovieClip(parent).newBullet(this, new Point(0, 0), new MovieClip(), _arg1, stats.bulletDamage, color);
};
}
protected function shoot(_arg1:MovieClip, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:Boolean=false):void{
var _local5:Point;
var _local6:Number;
if ((((bulletReload > 0)) && (!(MovieClip(parent).player.isDead)))){
if (_arg3){
bulletReload = stats.bulletReload;
};
_local5 = new Point(_arg1.x, _arg1.y);
_local6 = (_arg1.rotation - rotation);
if (_arg2){
_local6 = (((-180 * Math.atan2((MovieClip(parent).player.y - y), (MovieClip(parent).player.x - x))) / Math.PI) - 90);
};
if (_arg4){
_local6 = (((-180 * Math.atan2((MovieClip(parent).player.y - (y + _arg1.y)), (MovieClip(parent).player.x - (x + _arg1.x)))) / Math.PI) - 90);
};
MovieClip(parent).newBullet(this, _local5, _arg1, _local6, stats.bulletDamage, color);
};
}
public function setMissilePriority():void{
switch (MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile].targetting){
case 0:
if (stats.shield){
missilePriority = (1 - (((hp / stats.hp) * 0.5) + ((shield / stats.shield) * 0.5)));
} else {
missilePriority = (1 - ((hp / stats.hp) * 1));
};
break;
case 1:
missilePriority = (100000 - (hp + shield));
break;
case 2:
missilePriority = (((hp / stats.hp) * 0.5) + ((shield / stats.shield) * 0.5));
break;
case 3:
missilePriority = (hp + shield);
break;
case 4:
missilePriority = Math.abs((x - MovieClip(parent).player.x));
break;
case 5:
missilePriority = Math.abs((y - MovieClip(parent).player.y));
break;
case 6:
missilePriority = -(Math.abs((x - MovieClip(parent).player.x)));
break;
case 7:
missilePriority = -(Math.abs((y - MovieClip(parent).player.y)));
break;
default:
break;
};
}
protected function damage(_arg1:Number):void{
if (y > -(stats.shieldRadius)){
shieldTimer = stats.shieldTimer;
shield = (shield - _arg1);
};
if (shield < 0){
hp = (hp + shield);
shield = 0;
};
if (hp <= 0){
isDead = true;
if (!boss){
if (stats.drop){
MovieClip(parent).level.drop(this, stats.drop);
};
if ((stats.valueExtra > 0)){
MovieClip(parent).score = (MovieClip(parent).score + (Math.round(stats.valueExtra) + stats.value));
} else {
MovieClip(parent).score = (MovieClip(parent).score + stats.value);
};
MovieClip(parent).spawn(("Explosion" + stats.size), x, y);
if (stats.size != "VerySmall"){
MovieClip(parent).spawn(("Debris" + stats.size), x, y);
//unresolved jump
};
MovieClip(parent).doRuntime(this);
MovieClip(parent).ships.splice(MovieClip(parent).ships.indexOf(this), 1);
MovieClip(parent).removeChild(this);
} else {
destroy.nextFrame();
MovieClip(parent).bossHp.boss = null;
missileTarget.visible = false;
};
};
}
protected function shootHero(_arg1:MovieClip, _arg2:Number=0, _arg3:Boolean=true):void{
var _local4:Point;
var _local5:*;
if ((((bulletReload > 0)) && (!(MovieClip(parent).player.isDead)))){
if (_arg3){
bulletReload = stats.bulletReload;
};
_local4 = new Point(_arg1.x, _arg1.y);
_local5 = (((-180 * Math.atan2((MovieClip(parent).player.y - y), (MovieClip(parent).player.x - x))) / Math.PI) - 90);
_local5 = (_local5 + _arg2);
MovieClip(parent).newBullet(this, _local4, _arg1, _local5, stats.bulletDamage, color);
};
}
public function directDamage(_arg1:Number):void{
if (!isDead){
if (((_arg1 * 4) < 10)){
hp = (hp - 10);
} else {
hp = (hp - (_arg1 * 4));
};
if ((((hp <= 0)) && (!(isDead)))){
isDead = true;
if (stats.drop){
MovieClip(parent).level.drop(this, stats.drop);
};
if ((stats.valueExtra > 0)){
MovieClip(parent).score = (MovieClip(parent).score + (Math.round(stats.valueExtra) + stats.value));
} else {
MovieClip(parent).score = (MovieClip(parent).score + stats.value);
};
MovieClip(parent).spawn(("Explosion" + stats.size), x, y);
if (stats.size != "VerySmall"){
MovieClip(parent).spawn(("Debris" + stats.size), x, y);
//unresolved jump
};
MovieClip(parent).doRuntime(this);
MovieClip(parent).ships.splice(MovieClip(parent).ships.indexOf(this), 1);
MovieClip(parent).removeChild(this);
};
};
}
protected function accel():void{
ys = (ys + stats.speedAccel);
if (ys > stats.speedMax){
ys = stats.speedMax;
};
}
}
}//package enemies
Section 18
//Side01 (enemies.Side01)
package enemies {
import flash.display.*;
public class Side01 extends Ship {
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGun1:MovieClip;
public var mcGun2:MovieClip;
public var mcGun3:MovieClip;
public var mcGun6:MovieClip;
public var mcGear2:MovieClip;
public var mcGun4:MovieClip;
public var mcGun5:MovieClip;
public var mcGear1:MovieClip;
private var rotSpeed:Number;// = 15
public function Side01(){
rotSpeed = 15;
super();
stats["bulletDamage"] = 14;
stats["bulletReload"] = -30;
stats["drop"] = 2;
stats["hp"] = 50;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 90;
stats["shieldRadius"] = 26.5;
stats["shieldRegen"] = 0.75;
stats["shieldTimer"] = -150;
stats["size"] = "Small";
stats["speedAccel"] = 0.3;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 5.5;
stats["value"] = 15;
stats["valueExtra"] = 6;
stats["valueDecay"] = 0.15;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 25)));
color = "yellow";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
}
public function runtime():void{
if (!isDead){
MovieClip(mcGear1).rotation = (MovieClip(mcGear1).rotation - rotSpeed);
MovieClip(mcGear2).rotation = (MovieClip(mcGear2).rotation + rotSpeed);
shoot(MovieClip(mcGun1), false, false);
shoot(MovieClip(mcGun2), false, false);
shoot(MovieClip(mcGun3), false, false);
shoot(MovieClip(mcGun4), false, false);
shoot(MovieClip(mcGun5), false, false);
shoot(MovieClip(mcGun6));
accel();
basic();
};
}
}
}//package enemies
Section 19
//Side02 (enemies.Side02)
package enemies {
import flash.display.*;
public class Side02 extends Ship {
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGun1:MovieClip;
public var mcGun2:MovieClip;
public var mcGun3:MovieClip;
public var mcGun6:MovieClip;
public var mcGun4:MovieClip;
public var mcGun5:MovieClip;
public function Side02(){
stats["bulletDamage"] = 60;
stats["bulletReload"] = -30;
stats["drop"] = 2;
stats["hp"] = 400;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 650;
stats["shieldRadius"] = 30.5;
stats["shieldRegen"] = 0.75;
stats["shieldTimer"] = -150;
stats["size"] = "Small";
stats["speedAccel"] = 0.3;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 5.5;
stats["value"] = 38;
stats["valueExtra"] = 15;
stats["valueDecay"] = 0.2;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 25)));
color = "yellow";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
}
public function runtime():void{
if (!isDead){
shoot(MovieClip(mcGun1), false, false);
shoot(MovieClip(mcGun2), false, false);
shoot(MovieClip(mcGun3), false, false);
shoot(MovieClip(mcGun4), false, false);
shoot(MovieClip(mcGun5), false, false);
shoot(MovieClip(mcGun6));
accel();
basic();
};
}
}
}//package enemies
Section 20
//Single01 (enemies.Single01)
package enemies {
import flash.display.*;
public class Single01 extends Ship {
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGun1:MovieClip;
public function Single01(){
stats["bulletDamage"] = 12;
stats["bulletReload"] = -75;
stats["drop"] = 0;
stats["hp"] = 25;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 12;
stats["shieldRadius"] = 13;
stats["shieldRegen"] = 0.75;
stats["shieldTimer"] = -90;
stats["size"] = "Small";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 2.3;
stats["value"] = 4.5;
stats["valueExtra"] = 2.5;
stats["valueDecay"] = 0.06;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
color = "purple";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
allGuns.push(MovieClip(mcGun1));
}
public function runtime():void{
if (!isDead){
if (MovieClip(parent).player.y > y){
shoot(MovieClip(mcGun1), true);
};
accel();
basic();
};
}
}
}//package enemies
Section 21
//Single02 (enemies.Single02)
package enemies {
import flash.display.*;
public class Single02 extends Ship {
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGun1:MovieClip;
public function Single02(){
stats["bulletDamage"] = 22;
stats["bulletReload"] = -50;
stats["drop"] = 0.5;
stats["hp"] = 30;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 50;
stats["shieldRadius"] = 16;
stats["shieldRegen"] = 0.75;
stats["shieldTimer"] = -90;
stats["size"] = "Small";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 3;
stats["value"] = 6;
stats["valueExtra"] = 3;
stats["valueDecay"] = 0.1;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
color = "purple";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
allGuns.push(MovieClip(mcGun1));
}
public function runtime():void{
if (!isDead){
if (MovieClip(parent).player.y > y){
shoot(MovieClip(mcGun1), true);
};
accel();
basic();
};
}
}
}//package enemies
Section 22
//Single03 (enemies.Single03)
package enemies {
import flash.display.*;
public class Single03 extends Ship {
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGun1:MovieClip;
public function Single03(){
stats["bulletDamage"] = 40;
stats["bulletReload"] = -45;
stats["drop"] = 0.75;
stats["hp"] = 130;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 250;
stats["shieldRadius"] = 16;
stats["shieldRegen"] = 0.75;
stats["shieldTimer"] = -90;
stats["size"] = "Small";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 3;
stats["value"] = 8;
stats["valueExtra"] = 5;
stats["valueDecay"] = 0.12;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
color = "purple";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
allGuns.push(MovieClip(mcGun1));
}
public function runtime():void{
if (!isDead){
if (MovieClip(parent).player.y > y){
shoot(MovieClip(mcGun1), true);
};
accel();
basic();
};
}
}
}//package enemies
Section 23
//Single04 (enemies.Single04)
package enemies {
import flash.display.*;
public class Single04 extends Ship {
public var mcHit:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:shieldEnemy;
public var mcGun1:MovieClip;
public function Single04(){
stats["bulletDamage"] = 50;
stats["bulletReload"] = -40;
stats["drop"] = 0.75;
stats["hp"] = 180;
stats["missileDamage"] = 0;
stats["missileReload"] = 0;
stats["shield"] = 300;
stats["shieldRadius"] = 20;
stats["shieldRegen"] = 0.75;
stats["shieldTimer"] = -90;
stats["size"] = "Small";
stats["speedAccel"] = 0.15;
stats["speedDecel"] = 1.1;
stats["speedMax"] = 4.5;
stats["value"] = 11;
stats["valueExtra"] = 6;
stats["valueDecay"] = 0.15;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
color = "purple";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
shieldSprite.setColor(color);
allGuns.push(MovieClip(mcGun1));
}
public function runtime():void{
if (!isDead){
if (MovieClip(parent).player.y > y){
shoot(MovieClip(mcGun1), true);
};
accel();
basic();
};
}
}
}//package enemies
Section 24
//Turret (enemies.Turret)
package enemies {
import flash.display.*;
import flash.geom.*;
public class Turret extends Ship {
private var gunTimer:Number;// = 0
public var mcHit:MovieClip;
public var mcGear:MovieClip;
public var mcMissileTarget:MovieClip;
public var mcShield:MovieClip;
private var gunRot:Number;
public var mcGun:MovieClip;
public function Turret(){
gunRot = (-25 + (Math.random() * 50));
gunTimer = 0;
super();
stats["bulletDamage"] = 65;
stats["bulletReload"] = -5;
stats["drop"] = 0;
stats["hp"] = 750;
stats["missileDamage"] = 160;
stats["missileReload"] = -30;
stats["shield"] = 0;
stats["shieldRadius"] = 15;
stats["shieldRegen"] = 0;
stats["shieldTimer"] = 0;
stats["size"] = "Small";
stats["speedAccel"] = 0;
stats["speedDecel"] = 0;
stats["speedMax"] = 0;
stats["value"] = 42;
stats["valueExtra"] = 9;
stats["valueDecay"] = 0.15;
bulletReload = (stats.bulletReload + Math.ceil((Math.random() * 35)));
color = "red";
hit = MovieClip(mcHit);
hp = stats.hp;
missileTarget = MovieClip(mcMissileTarget);
shield = stats.shield;
shieldSprite = MovieClip(mcShield);
allGuns.push(MovieClip(mcGun).gun);
}
public function runtime():void{
var _local1:Point;
var _local2:Number;
if (!isDead){
y = (y + 6);
y = Math.ceil(y);
if (y > 0){
gunTimer++;
if (gunTimer == 30){
gunTimer = 0;
_local1 = new Point(0, 0);
_local2 = ((rotation == 0)) ? 180 : rotation;
MovieClip(parent).newBullet(this, _local1, MovieClip(mcGun).gun, _local2, stats.bulletDamage, "ass");
};
};
basic();
MovieClip(mcGear).rotation = (MovieClip(mcGear).rotation + 6);
};
}
}
}//package enemies
Section 25
//Bullet (gameplay.Bullet)
package gameplay {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Bullet extends MovieClip {
private var ys:Number;
private var speed:Number;// = 18
public var damage:Number;
private var xs:Number;
private var isDead:Boolean;// = false
private var runList:Array;
public function Bullet(_arg1:Object, _arg2:Point, _arg3:Object, _arg4:Number, _arg5:Number, _arg6:int){
isDead = false;
runList = new Array();
speed = 18;
super();
addFrameScript(7, frame8, 9, frame10, 17, frame18, 19, frame20);
addEventListener("addedToStage", initEvent, false, 0, true);
x = _arg1.localToGlobal(_arg2).x;
y = _arg1.localToGlobal(_arg2).y;
rotation = _arg4;
damage = _arg5;
stop();
_arg3.gotoAndStop("fire");
ys = -((speed * Math.cos(((Math.PI / 180) * rotation))));
xs = -((speed * Math.sin(((Math.PI / 180) * rotation))));
rotation = (((180 * Math.atan2(((y + ys) - y), ((x + xs) - x))) / Math.PI) + 90);
if (_arg6){
damage = (damage * 2);
gotoAndStop("red");
};
}
public function runtime():void{
var _local1:Array;
var _local2:int;
if (!isDead){
x = (x + xs);
y = (y + ys);
if ((((((((y < -35)) || ((y > 735)))) || ((x < -35)))) || ((x > 635)))){
deleteMe();
} else {
if (y > -(speed)){
testCollisions();
};
};
} else {
nextFrame();
};
_local1 = runList.slice(0);
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2].nextFrame();
_local2++;
};
}
function frame10(){
prevFrame();
}
function frame18(){
deleteMe();
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
testCollisions(true);
}
function frame8(){
deleteMe();
}
function frame20(){
prevFrame();
}
private function testCollisions(_arg1:Boolean=false):void{
var _local2:Number;
var _local3:Array;
var _local4:int;
var _local5:Array;
_local2 = y;
_local3 = MovieClip(parent).ships;
_local4 = 0;
while (_local4 < _local3.length) {
if (_local3[_local4].touch(this, _arg1)){
isDead = true;
break;
};
_local4++;
};
if (!isDead){
_local5 = MovieClip(parent).obstaclesList;
_local4 = 0;
while (_local4 < _local5.length) {
if (_local5[_local4].touch(this)){
isDead = true;
break;
};
_local4++;
};
};
if (_arg1){
y = _local2;
};
}
public function deleteMe():void{
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
public function doRuntime(_arg1:Object):void{
if ((runList.indexOf(_arg1) == -1)){
runList.push(_arg1);
} else {
runList.splice(runList.indexOf(_arg1), 1);
};
}
public function backTrack():void{
x = (x - (xs / 5));
y = (y - (ys / 5));
}
}
}//package gameplay
Section 26
//Finale (gameplay.Finale)
package gameplay {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class Finale extends MovieClip {
private var anim:MovieClip;
public var mcFade:MovieClip;
private var fade:MovieClip;
public var txtLeft:TextField;
public var txtRight:TextField;
public var mcAnim:MovieClip;
public function Finale(){
addEventListener("enterFrame", runtime, false, 0, true);
addEventListener("mouseDown", clickEvent, false, 0, true);
anim = MovieClip(mcAnim);
anim.stop();
fade = MovieClip(mcFade);
fade.gotoAndStop("in");
setText();
}
private function runtime(_arg1:Event):void{
fade.nextFrame();
}
private function startGame():void{
removeEventListener("enterFrame", runtime);
MovieClip(parent.parent).finishFinale();
}
private function setText():void{
if ((anim.currentFrame == 1)){
txtLeft.text = "";
} else {
txtLeft.text = "< PREVIOUS";
};
if ((anim.currentFrame == anim.totalFrames)){
txtRight.text = "CONTINUE >";
} else {
txtRight.text = "NEXT >";
};
}
private function clickEvent(_arg1:MouseEvent):void{
if (txtLeft.hitTestPoint(stage.mouseX, stage.mouseY)){
anim.prevFrame();
};
if (txtRight.hitTestPoint(stage.mouseX, stage.mouseY)){
if (txtRight.text == "CONTINUE >"){
removeEventListener("mouseDown", clickEvent);
fade.gotoAndStop("out");
fade.action = startGame;
};
anim.nextFrame();
};
setText();
}
}
}//package gameplay
Section 27
//Game (gameplay.Game)
package gameplay {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import enemies.*;
import flash.text.*;
import sfx.*;
import main.*;
import obstacles.*;
import flash.utils.*;
public class Game extends MovieClip {
public var mcPause:MovieClip;
private var bonus5:MovieClip;
public var canPause:Boolean;// = true
public var txtScore:TextField;
public var mcPlayer:MovieClip;
public var levelInfo:TextField;
private var bonusNames:Array;
public var txtScore2:TextField;
private var dPlayer:MovieClip;
private var holdPause:Boolean;// = false
private var fade:MovieClip;
public var score:Number;// = 0
public var obstaclesList:Array;
public var mcTut:MovieClip;
private var dBullets:MovieClip;
public var mcDebris:MovieClip;
private var dBackground:MovieClip;
public var player:Player;
private var dDebris:MovieClip;
public var isPaused:Boolean;// = false
public var mcSfx:MovieClip;
private var dEnemies:MovieClip;
private var exit:Boolean;// = false
public var mcBonus2:MovieClip;
public var mcBonus3:MovieClip;
public var mcBonus4:MovieClip;
public var mcBonus5:MovieClip;
private var background:Background;
public var mcBonus1:MovieClip;
public var mcFade:MovieClip;
public var mcBullets:MovieClip;
private var deadTimer:int;// = 0
public var bossHp:MovieClip;
public var mcBackground:MovieClip;
private var levelNum:int;
private var dSfx:MovieClip;
public var level:Level;
public var salvage:Array;
private var scorePrevious:Number;// = 0
public var data:Array;
public var mcEnemies:MovieClip;
public var ships:Array;
private var runList:Array;
private var scoreDisplay:Number;// = 0
private var bonus1:MovieClip;
private var bonus2:MovieClip;
private var bonus3:MovieClip;
private var bonus4:MovieClip;
private var pause:MovieClip;
public function Game(_arg1:int, _arg2:int, _arg3:int){
var _local4:int;
bonusNames = new Array("SHIELD REGENERATION", "BULLET BURST", "BULLET DAMAGE", "MISSILE DAMAGE", "DOUBLE MISSILES");
deadTimer = 0;
exit = false;
holdPause = false;
runList = new Array();
scoreDisplay = 0;
scorePrevious = 0;
canPause = true;
isPaused = false;
obstaclesList = new Array();
salvage = new Array();
score = 0;
ships = new Array();
super();
addEventListener("enterFrame", runtime, false, 0, true);
addEventListener("addedToStage", initEvent, false, 0, true);
bonus1 = MovieClip(mcBonus1);
bonus2 = MovieClip(mcBonus2);
bonus3 = MovieClip(mcBonus3);
bonus4 = MovieClip(mcBonus4);
bonus5 = MovieClip(mcBonus5);
bonus1.alpha = 0;
bonus2.alpha = 0;
bonus3.alpha = 0;
bonus4.alpha = 0;
bonus5.alpha = 0;
dBackground = MovieClip(mcBackground);
dBullets = MovieClip(mcBullets);
dDebris = MovieClip(mcDebris);
dEnemies = MovieClip(mcEnemies);
dPlayer = MovieClip(mcPlayer);
dSfx = MovieClip(mcSfx);
background = Background(addChildAt(new Background(), getChildIndex(dBackground)));
fade = MovieClip(mcFade);
fade.gotoAndStop("in");
_local4 = ((Math.random() * 20) + 90);
while (_local4 > 0) {
doRuntime(addChildAt(new Star(), getChildIndex(dBackground)));
_local4--;
};
pause = MovieClip(mcPause);
player = Player(addChildAt(new Player(_arg1), getChildIndex(dPlayer)));
level = new Level(this, _arg2);
levelInfo.text = ("LEVEL " + String((_arg2 + 1)));
if (_arg2 == 30){
levelInfo.text = "WAVE 1";
};
levelNum = _arg2;
if (_arg3){
txtScore2.text = (String(_arg3) + " $");
};
if ((((((((((((levelNum == 30)) || ((levelNum == 29)))) || ((levelNum == 23)))) || ((levelNum == 17)))) || ((levelNum == 11)))) || ((levelNum == 5)))){
Shooter.music.goBoss();
} else {
Shooter.music.goLevel();
};
}
public function playSound(_arg1:String, _arg2:Number=1):void{
Shooter.sound.playSound(_arg1, _arg2);
}
public function getActiveEnemies():Array{
var _local1:Array;
var _local2:int;
_local1 = new Array();
_local2 = 0;
while (_local2 < ships.length) {
if ((((((ships[_local2].y > 0)) && ((ships[_local2].y < 700)))) && (!(ships[_local2].isDead)))){
_local1.push(ships[_local2]);
};
_local2++;
};
return (_local1);
}
private function returnMenu():void{
Shooter.sound.clearAll();
removeEventListener("enterFrame", runtime);
stage.removeEventListener("click", pause.clicked);
MovieClip(parent.parent).gameSave();
MovieClip(parent.parent).returnMenu();
}
public function finishLevel(_arg1:Boolean=false):void{
var _local2:Array;
canPause = false;
fade.gotoAndStop("out");
fade.action = returnMenu;
if (((((score) && (!(_arg1)))) && (!(player.isDead)))){
MovieClip(parent.parent).missionComplete((level.current + 1), score);
};
if (_arg1){
exit = true;
};
if (((!(_arg1)) && ((levelNum == 29)))){
_local2 = MovieClip(parent.parent).getUnlockables();
fade.action = showFinale;
_local2[0] = 1;
MovieClip(parent.parent).setUnlockables(_local2);
};
if (((score) && ((levelNum == 30)))){
MovieClip(parent.parent).missionComplete((level.current + 1), score, false);
};
if ((((((((((((levelNum == 30)) || ((levelNum == 29)))) || ((levelNum == 23)))) || ((levelNum == 17)))) || ((levelNum == 11)))) || ((levelNum == 5)))){
Shooter.music.fadeOut();
} else {
Shooter.music.goMenu();
};
}
public function newBullet(_arg1:Object, _arg2:Point, _arg3:Object, _arg4:Number, _arg5:Number, _arg6:String="green", _arg7:int=0):void{
if (_arg1 == player){
doRuntime(addChildAt(new Bullet(_arg1, _arg2, _arg3, _arg4, _arg5, _arg7), getChildIndex(dBullets)));
} else {
if (_arg6 == "ass"){
doRuntime(addChildAt(new BulletBase(_arg1, _arg2, _arg3, _arg4, _arg5, "red"), getChildIndex(dBullets)));
} else {
doRuntime(addChildAt(new Bullet(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6), getChildIndex(dBullets)));
};
};
}
public function doRuntime(_arg1:Object):void{
if ((runList.indexOf(_arg1) == -1)){
runList.push(_arg1);
} else {
runList.splice(runList.indexOf(_arg1), 1);
};
}
public function spawnGate(_arg1:String, _arg2:Number, _arg3:Number):void{
var _local4:*;
var _local5:Class;
_local5 = Class(getDefinitionByName(("obstacles::Gate" + _arg1)));
_local4 = new (_local5);
doRuntime(_local4);
addChildAt(_local4, getChildIndex(dEnemies));
_local4.x = _arg2;
_local4.y = _arg3;
}
public function getDepthID(_arg1:Boolean=true):Number{
if (_arg1){
return (getChildIndex(dSfx));
};
return (getChildIndex(dPlayer));
}
public function pickUpBonus(_arg1:int):void{
var _local2:Boolean;
var _local3:int;
_local2 = false;
_local3 = 1;
while (_local3 <= 5) {
if (this[("bonus" + _local3)].bonus == (_arg1 - 1)){
_local2 = true;
};
_local3++;
};
if (!_local2){
_local3 = 5;
while (_local3 >= 1) {
if (this[("bonus" + _local3)].bonus == -1){
this[("bonus" + _local3)].bonus = (_arg1 - 1);
this[("bonus" + _local3)].bar.gotoAndStop(_arg1);
this[("bonus" + _local3)].textBox.text = bonusNames[(_arg1 - 1)];
break;
};
_local3--;
};
};
}
private function showFinale():void{
Shooter.music.goMenu();
removeEventListener("enterFrame", runtime);
stage.removeEventListener("click", pause.clicked);
MovieClip(parent.parent).gameSave();
MovieClip(parent.parent).showFinale();
}
public function newMissile(_arg1:Object, _arg2:Number, _arg3:Object=null, _arg4:int=0):void{
if (_arg1 == player){
doRuntime(addChildAt(new Missile(_arg1, _arg2, _arg3, _arg4), getChildIndex(dBullets)));
} else {
if (((_arg1.boss) && (!(player.isDead)))){
doRuntime(addChildAt(new BossMissile(_arg1, _arg2), getChildIndex(dBullets)));
} else {
if (!player.isDead){
doRuntime(addChildAt(new BossMissile(_arg1, _arg2), getChildIndex(dBullets)));
};
};
};
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
stage.addEventListener("click", pause.clicked, false, 0, true);
}
public function spawn(_arg1:String, _arg2:Number, _arg3:Number, _arg4:MovieClip=null){
var _local5:*;
var _local6:Class;
_local6 = Class(getDefinitionByName(_arg1));
_local5 = new (_local6);
_local5.x = _arg2;
_local5.y = _arg3;
if (!_arg4){
switch (_arg1.substr(0, 3)){
case "ene":
addChildAt(_local5, getChildIndex(dEnemies));
ships.push(_local5);
doRuntime(_local5);
if (_arg1.substr(9, 4) == "Boss"){
MovieClip(bossHp).boss = _local5;
};
break;
case "Exp":
addChildAt(_local5, getChildIndex(dSfx));
doRuntime(_local5);
break;
case "Deb":
addChildAt(_local5, getChildIndex(dDebris));
doRuntime(_local5);
break;
case "obs":
addChildAt(_local5, getChildIndex(dDebris));
doRuntime(_local5);
obstaclesList.push(_local5);
break;
default:
trace((("could not spawn " + _arg1) + ", no type specified"));
_local5 = null;
break;
};
} else {
addChildAt(_local5, getChildIndex(_arg4));
ships.push(_local5);
doRuntime(_local5);
};
return (_local5);
}
public function newWall(_arg1:int, _arg2:Boolean=false):void{
addChildAt(new Wall(this, level, _arg1, _arg2), getChildIndex(dBackground));
}
public function forcePause():void{
if (canPause){
isPaused = true;
};
}
private function runtime(_arg1:Event):void{
var _local2:Array;
var _local3:int;
var _local4:Number;
var _local5:MovieClip;
var _local6:Number;
fade.nextFrame();
if (!isPaused){
if (!player.isDead){
player.runtime();
} else {
canPause = false;
deadTimer++;
if (deadTimer == 90){
finishLevel(true);
};
};
_local2 = runList.slice(0);
_local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3].runtime();
_local3++;
};
level.runtime(ships);
background.runtime();
if (!player.isDead){
player.runtime2();
};
scoreDisplay = (scoreDisplay + ((score - scoreDisplay) / 2.5));
txtScore.text = (String(Math.round(scoreDisplay)) + " $");
_local4 = (MovieClip(bossHp).hitTestObject(player.hit)) ? 0.25 : 1;
MovieClip(bossHp).runtime(_local4);
MovieClip(bossHp).visible = true;
bonus1.visible = true;
bonus2.visible = true;
bonus3.visible = true;
bonus4.visible = true;
bonus5.visible = true;
txtScore.visible = true;
txtScore2.visible = true;
levelInfo.visible = true;
_local3 = 1;
while (_local3 <= 5) {
_local5 = this[("bonus" + _local3)];
if (_local5.bonus != -1){
_local6 = (player.powers[_local5.bonus] / (player.powersDuration[_local5.bonus] * 30));
if (_local6){
_local5.alpha = 1;
_local5.bar.width = (250 * _local6);
} else {
_local5.alpha = (_local5.alpha - (_local5.alpha / 5));
_local5.bar.width = 0;
if (_local5.alpha <= 0.1){
_local5.alpha = 0;
_local5.bonus = -1;
};
};
};
_local3++;
};
} else {
player.pause();
MovieClip(bossHp).visible = false;
bonus1.visible = false;
bonus2.visible = false;
bonus3.visible = false;
bonus4.visible = false;
bonus5.visible = false;
txtScore.visible = false;
txtScore2.visible = false;
levelInfo.visible = false;
};
MovieClip(mcTut).visible = !(isPaused);
if (!exit){
pause.runtime(isPaused);
};
if (canPause){
if (((Shooter.key.control("pause")) || (Shooter.key.control("pause2")))){
if (!holdPause){
holdPause = true;
isPaused = !(isPaused);
};
} else {
holdPause = false;
};
} else {
holdPause = true;
};
}
public function clearObstacles():void{
var _local1:Number;
var _local2:Array;
var _local3:int;
_local1 = Math.ceil((Math.random() * 2));
Shooter.sound.playSound(("MissileBoom" + String(_local1)), 0.6);
_local2 = obstaclesList.slice(0);
_local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3].kill();
_local3++;
};
}
}
}//package gameplay
Section 28
//Intro (gameplay.Intro)
package gameplay {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class Intro extends MovieClip {
private var anim:MovieClip;
public var mcFade:MovieClip;
private var fade:MovieClip;
public var txtLeft:TextField;
public var txtRight:TextField;
public var mcAnim:MovieClip;
public function Intro(){
addEventListener("enterFrame", runtime, false, 0, true);
addEventListener("mouseDown", clickEvent, false, 0, true);
anim = MovieClip(mcAnim);
anim.stop();
fade = MovieClip(mcFade);
fade.gotoAndStop("in");
setText();
}
private function runtime(_arg1:Event):void{
fade.nextFrame();
}
private function startGame():void{
removeEventListener("enterFrame", runtime);
MovieClip(parent.parent).finishIntro();
}
private function setText():void{
if ((anim.currentFrame == 1)){
txtLeft.text = "";
} else {
txtLeft.text = "< PREVIOUS";
};
if ((anim.currentFrame == anim.totalFrames)){
txtRight.text = "CONTINUE >";
} else {
txtRight.text = "NEXT >";
};
}
private function clickEvent(_arg1:MouseEvent):void{
if (txtLeft.hitTestPoint(stage.mouseX, stage.mouseY)){
anim.prevFrame();
};
if (txtRight.hitTestPoint(stage.mouseX, stage.mouseY)){
if (txtRight.text == "CONTINUE >"){
removeEventListener("mouseDown", clickEvent);
fade.gotoAndStop("out");
fade.action = startGame;
};
anim.nextFrame();
};
setText();
}
}
}//package gameplay
Section 29
//Level (gameplay.Level)
package gameplay {
import flash.display.*;
public class Level {
public var current:int;
private var dropChance:Number;// = 0
private var b2:String;// = "boss02"
private var b3:String;// = "boss03"
private var b4:String;// = "boss04"
private var b5:String;// = "boss05"
private var b1:String;// = "boss01"
private var s1:String;// = "single01"
private var s2:String;// = "single02"
private var inBetween:Number;
private var s3:String;// = "single03"
private var s4:String;// = "single04"
private var complete:Boolean;// = false
private var sequence:Array;
private var l1:String;// = "missile01"
private var l3:String;// = "missile03"
private var time:int;// = 75
private var d2:String;// = "double02"
private var d3:String;// = "double03"
public var base:String;// = ""
private var d1:String;// = "double01"
private var l2:String;// = "missile02"
private var tutorial:Boolean;// = false
private var a:String;// = "asteroid"
private var i1:String;// = "side01"
private var walls:Boolean;// = false
private var m1:String;// = "mine01"
private var m2:String;// = "mine02"
private var levels:Array;
private var i2:String;// = "side02"
private var game:Game;
private var d:String;// = "debris"
private var wait:Boolean;// = false
private var w:String;// = "wait"
private var wave:int;// = 0
private var dropChancePowerUp:Number;// = 0
public function Level(_arg1:Game, _arg2:int){
complete = false;
dropChance = 0;
dropChancePowerUp = 0;
levels = new Array();
time = 75;
tutorial = false;
wait = false;
walls = false;
wave = 0;
base = "";
s1 = "single01";
d1 = "double01";
m1 = "mine01";
i1 = "side01";
b1 = "boss01";
s2 = "single02";
d2 = "double02";
b2 = "boss02";
l1 = "missile01";
s3 = "single03";
d3 = "double03";
b3 = "boss03";
l2 = "missile02";
m2 = "mine02";
i2 = "side02";
b4 = "boss04";
s4 = "single04";
l3 = "missile03";
b5 = "boss05";
a = "asteroid";
d = "debris";
w = "wait";
super();
current = _arg2;
game = _arg1;
if (current == 1){
dropChance = 100;
};
inBetween = (30 - (current / 2));
levels[0] = new Array("t1", s1, s1, "t2", s1, s1, "t6", s1, 1, s1, 1, s1, 5, s1, 1, s1, 1, s1, 3, s1, 1, s1, w, s1, s1, 3, s1, s1, s1, w, s1, 1, s1, 1, s1, 1, s1, 4, s1, 1, s1, 1, s1, 1, s1, s1);
levels[1] = new Array(s1, s1, "t3", d1, 1, s1, "t4", s1, 2, d1, s1, 3, d1, s1, 1, s1, w, d1, s1, s1, d1, w, s1, s1, d1, w, s1, s1, w, d1, s1);
levels[2] = new Array(s1, s1, m1, "t5", s1, d1, m1, m1, w, s1, d1, 3, d1, 3, m1, m1, m1, w, s1, s1, s1, 3, d1, m1, m1, w, d1, 2, s1, s1, d1, w, d1, d1, 3, s1, s1, s1);
levels[3] = new Array(s1, s1, s1, m1, m1, m1, 3, d1, s1, w, d1, s1, 2, d1, w, m1, m1, m1, d1, s1, s1, w, s1, d1, 2, d1, s1, w, d1, s1, d1, 3, s1, 1, d1, d1);
levels[4] = new Array(s1, d1, m1, m1, d1, 2, s1, s1, i1, 2, d1, w, m1, m1, s1, d1, i1, w, d1, s1, i1, 2, s1, 2, i1, d1, s1, s1, w, i1, d1, s1);
levels[5] = new Array(b1);
levels[6] = new Array("t7", m1, m1, d1, 1, d, d1, 2, i1, w, d1, s2, 2, s2, 3, m1, d, m1, 1, m1, w, s2, d, 1, i1, 1, s2, 1, d1, w, s2, i1, d, d1, s2, w, s2, d1, i1, w, m1, m1, m1, m1, d, s2, d1, d1, 4, i1, s2, d, s2, d1, d1, s2);
levels[7] = new Array(d1, s2, d, s2, 3, s2, s2, i1, d, s2, 3, s2, i1, s2, w, m1, m1, m1, m1, m1, s2, s2, i1, d, s2, d1, s2, 3, s2, i1, i1, m1, m1, m1, s2, s2, w, s2, i1, s2, d1, d1, i1, s2, 4, i1, s2, m1, m1, m1, m1, s2, i1, s2, s2);
levels[8] = new Array(s2, s2, i1, d, s2, 1, m1, m1, m1, i1, d, s2, w, d2, s2, d, i1, 1, s2, d, 1, d2, i1, d, m1, m1, m1, 4, d2, s2, 1, s2, 1, i1, s2, i1, d2, 4, m1, m1, m1, m1, d2, 1, i1, 1, s2, 1, d2, 3, d2, s2, 2, d2, s2, 1, d2, s2, s2);
levels[9] = new Array(s2, d, d2, s2, 2, d2, m1, m1, s2, d, d2, 1, s2, i1, s2, 2, d2, 2, i1, d, s2, m1, m1, d2, 2, d, d2, 1, s2, m1, m1, d, s2, 2, s2, d2, 1, d2, 4, d2, 1, d2, m1, m1, d2, 1, i1, d2, s2, 3, d2, 2, d2, s2, 2, d2, m1, m1, d2, 2, s2);
levels[10] = new Array(d, s2, s2, m1, d2, m1, d, 2, d2, 1, m1, m1, i1, 3, s2, d2, 2, m1, d2, s2, 1, d, m1, 2, i1, m1, m1, s2, d, i1, s2, d2, 1, d2, s2, 3, m1, d, m1, m1, d2, 1, d2, i1, 1, s2, 3, d2, d, d2, 1, s2, 3, s2, s2, 2, s2, i1, d2, 3, d, m1, 1, s2, d2, 2, s2, d2, 2, s2, s2);
levels[11] = new Array(b2);
levels[12] = new Array(d2, s3, 1, d2, 1, d2, s3, d2, 1, d2, d2, s3, 1, d2, s3, 1, l1, 2, s3, 1, d2, d2, 1, s3, 1, d2, l1, 3, l1, s3, 2, s3, d2, 2, s3, d2, 2, l1, d2, s3, 3, s3, 1, s3, 1, l1, 1, d2, l1);
levels[13] = new Array(s3, 1, s3, s3, 1, d2, 2, s3, s3, 2, s3, 1, d2, s3, l1, 2, s3, s3, 2, l1, 3, s3, s3, d2, l1, w, 2, s3, l1, 1, d2, s3, 2, s3, d2, 2, s3, l1, 3, s3, d2, 3, d2, s3, s3, l1, w, d2, s3, s3, 2, l1, l1, s3, d2);
levels[14] = new Array(s3, d2, 1, s3, 1, l1, s3, 2, 1, d2, 2, l1, s3, 1, s3, 1, s3, 3, d2, l1, s3, 2, s3, d2, l1, 1, s3, 1, s3, d2, d2, s3, 3, l1, s3, 2, s3, l1, 2, s3, 2, s3, l1, d2, 1, s3, 2, l1, s3, 2, s3, 1, d2, l1, 2, s3, 1, l1, 1, d2, 1, s3, l1);
levels[15] = new Array(s3, l1, s3, 2, s3, 2, s3, 1, d3, l1, 2, s3, 2, d3, 2, s3, l1, 2, d3, 1, s3, d3, 2, l1, s3, 2, l1, d3, 1, d3, s3, 2, s3, 3, s3, d3, 2, l1, 1, d3, 2, s3, s3, 1, d3, s3, 3, d3, l1, 2, s3, s3, 3, d3, s3, 1, l1, 2, d3, l1, 2, d3, s3, d3, 2, d3, s3, l1);
levels[16] = new Array(s3, d3, 1, s3, l1, 2, s3, 2, d3, s3, 1, l1, s3, 2, s3, d3, 2, s3, l1, 2, s3, d3, 2, d3, 1, l1, 1, s3, 1, d3, s3, 2, s3, s3, 1, s3, 2, d3, l1, 1, s3, s3, 1, d3, l1, 2, s3, s3, 2, s3, d3, l1, 2, d3, l1, 3, d3, s3, 2, s3, 2, s3, d3, 2, l1, d3, s3, s3, s3);
levels[17] = new Array(b3);
levels[18] = new Array(s3, s3, d3, a, 2, s3, d3, 2, s3, 2, d3, 2, s3, 3, s3, l2, a, 3, s3, d3, l2, 2, s3, d3, 3, s3, 1, a, d3, 2, d3, l2, 2, s3, 1, d3, l2, a, 3, s3, d3, 2, d3, 1, s3, a, d3, 3, d3, l2, 2, l2, d3, a, s3, 2, s3, 2, d3, l2, 3, l2, a, d3, 2, s3, 2, s3, a, 1, s3, d3, l2, 2, l2);
levels[19] = new Array(s3, a, d3, m2, d3, 2, s3, a, m2, 1, l2, d3, m2, a, 2, s3, m2, l2, 2, s3, 2, l2, s3, 1, s3, a, 1, m2, a, m2, m2, s3, 2, a, m2, s3, 2, s3, d3, l2, 1, d3, 1, m2, m2, d3, 2, l2, m2, a, m2, s3, 2, d3, l2, 1, m2, m2, l2, 1, m2, m2, a, d3, 1, d3, 1, s3, 1, l2, 2, d3, s3, 1, s3, l2, 2, m2, m2, a, m2, m2, d3, 1, s3, 1, d3, l2, 2, d3, s3, l2);
levels[20] = new Array(l2, d3, m2, 2, l2, 1, d3, a, i2, m2, 2, d3, l2, 2, m2, 1, d3, l2, 2, m2, a, d3, 2, d3, l2, 2, i2, d3, m2, 3, d3, d3, l2, 2, d3, a, 1, i2, 2, d3, d3, l2, 2, i2, d3, 2, l2, a, i2, 1, l2, 2, m2, a, 2, d3, d3, 1, l2, a, 1, m2, d3, 1, d3, m2, a, 2, l2, i2, 2, d3, m2, a, 2, i2, m2, i2, l2);
levels[21] = new Array(l2, d3, a, m2, 2, d3, i2, a, 2, i2, m2, 2, l2, d3, 2, m2, i2, d3, 2, m2, d3, a, l2, 2, i2, m2, 3, d3, l2, 2, m2, a, i2, d3, 2, i2, m2, 3, l2, d3, a, m2, 2, i2, l2, d3, 3, a, d3, m2, d3, a, 2, l2, i2, 3, d3, l2, a, m2, 2, i2, m2, i2, 2, d3, a, 3, d3, d3, l2, 2, m2, i2, a, 3, d3, m2, l2, 2, a, i2, d3, d3);
levels[22] = new Array(l2, i2, d3, m2, 2, l2, a, d3, 3, i2, d3, 2, l2, m2, a, i2, d3, 3, l2, i2, 2, l2, a, m2, l2, 3, i2, l2, a, m2, d3, 2, l2, i2, d3, a, m2, 3, l2, 2, l2, a, i2, i2, 3, l2, m2, d3, a, i2, d3, 2, d3, l2, i2, m2, 3, d3, l2, i2, a, m2, d3, 3, l2, i2, 2, m2, l2, i2, 3, m2, l2, m2, i2, 1, m2, l2, 1, m2);
levels[23] = new Array(b4);
levels[24] = new Array(".bestje-estjer", 2, l2, s4, 2, i2, s4, 2, l2, s4, ".sjel<etl", l2, i2, s4, 2, s4, 2, s4, 2, l2, i2, ".s]et-est[eg<>", i2, l2, 2, s4, i2, l2, ".tl<eler>egrest]estj", s4, s4, 2, l2, i2, 1, s4, 1, s4, 2, i2, 2, i2, s4, 2, s4, ".efx");
levels[25] = new Array(".b", l3, 1, s4, s4, 1, ".<>g<etl<et-est]eg<g>etretleg-", s4, s4, l3, 3, i2, 1, s4, 1, s4, 1, i2, 3, s4, 1, s4, ".glegregl<et-estmmj", s4, s4, 1, l3, 2, s4, 0.5, s4, 0.5, i2, ".t-et-g<g>g<etlgllerelfx");
levels[26] = new Array(".bees]g<egleg-g>g<el<eg-er>eg-et-eg-", s4, s4, l3, 4, s4, s4, l3, 4, s4, s4, l3, ".tltrg>et-g<etlegrgrg>g<eg-et-<etleg->etr", s4, s4, s4, 1, s4, s4, ".s]g<egleg-egsgmgmgmgjeg>g<g>g<egllglegrg>g<egleefx");
levels[27] = new Array(".best[g>g<eglgleg-g>g<g>egsgmgmgmgjg>g<g>egrgree", s4, 1, l3, s4, 1, s4, 1, s4, 2, l3, s4, ".g-et-eg-eglglglegrtrgrg>g<eglglglg<eg-et-eg-eg<g>g<eglgrgltreg-t-", s4, s4, 1, s4, s4, 2, l3, l3, ".gs]egs[eg-eglgrg>g<eglglegsgmgmgmgjeefx");
levels[28] = new Array(".beeegsgmgmgmgmgmgmgjeg<egltlglg>egrtrg>g<egst[egs[eg-eglgreg-et-eg-g<g>g<eglglgletrgrgregsgmgmgjee", s4, s4, 1, s4, s4, 1, s4, 2, ".gsgmgmgmgmgmgmgjeg<g>g<g>g<eglglglglegrgrgrg>g<g>g<eg-egstmgmgmgjg<g>g<eglglglegst]eg-et-eg-egst[egsgmgmgjeee", l3, s4, 2, l3, s4, "eefx");
levels[29] = new Array(b5, w, "t10");
levels[30] = new Array(b1, w, b2, w, b3, w, b4, w, b5, w, "t8");
sequence = levels[_arg2];
}
public function bossWait():void{
time = (8 * 30);
}
private function tick():void{
var _local1:*;
var _local2:Number;
var _local3:Array;
var _local4:Boolean;
_local1 = sequence.shift();
if (((!(_local1)) && (!(complete)))){
if (((!(game.ships.length)) && (!(game.salvage.length)))){
complete = true;
time = (4 * 30);
game.canPause = false;
game.player.canFire = false;
sequence.push("end");
};
} else {
if (_local1){
_local2 = (150 + (Math.random() * 300));
switch (_local1){
case "single01":
game.spawn("enemies::Single01", _local2, -25);
_local2 = (150 + (Math.random() * 300));
game.spawn("enemies::Single01", _local2, -90);
time = (inBetween * 1.5);
break;
case "double01":
game.spawn("enemies::Double01", _local2, -25);
time = inBetween;
break;
case "mine01":
game.spawn("enemies::Mine01", _local2, (-15 - (Math.random() * 20)));
break;
case "side01":
game.spawn("enemies::Side01", _local2, -45);
time = inBetween;
break;
case "boss01":
if (current == 30){
wave++;
game.spawn("enemies::Boss01", 300, -200).powerUp(wave);
sequence.push(b1);
sequence.push(w);
game.levelInfo.text = ("WAVE " + String(wave));
} else {
game.spawn("enemies::Boss01", 300, -200);
};
break;
case "single02":
game.spawn("enemies::Single02", _local2, -25);
_local2 = (150 + (Math.random() * 300));
game.spawn("enemies::Single02", _local2, -90);
time = (inBetween * 1.5);
break;
case "double02":
game.spawn("enemies::Double02", _local2, -45);
time = inBetween;
break;
case "boss02":
if (current == 30){
game.spawn("enemies::Boss02", 300, -200).powerUp(wave);
sequence.push(b2);
sequence.push(w);
} else {
game.spawn("enemies::Boss02", 300, -200);
};
break;
case "missile01":
game.spawn("enemies::Missile01", _local2, -45);
time = inBetween;
break;
case "single03":
game.spawn("enemies::Single03", _local2, -25);
_local2 = (150 + (Math.random() * 300));
game.spawn("enemies::Single03", _local2, -90);
time = (inBetween * 1.5);
break;
case "double03":
game.spawn("enemies::Double03", _local2, -45);
time = inBetween;
break;
case "boss03":
if (current == 30){
game.spawn("enemies::Boss03", 300, -200).powerUp(wave);
sequence.push(b3);
sequence.push(w);
} else {
game.spawn("enemies::Boss03", 300, -200);
};
break;
case "missile02":
game.spawn("enemies::Missile02", _local2, -45);
time = inBetween;
break;
case "mine02":
game.spawn("enemies::Mine02", _local2, (-15 - (Math.random() * 20)));
break;
case "side02":
game.spawn("enemies::Side02", _local2, -45);
time = inBetween;
break;
case "boss04":
if (current == 30){
game.spawn("enemies::Boss04", 300, -200).powerUp(wave);
sequence.push(b4);
sequence.push(w);
} else {
game.spawn("enemies::Boss04", 300, -200);
};
break;
case "single04":
game.spawn("enemies::Single04", _local2, -25);
_local2 = (150 + (Math.random() * 300));
game.spawn("enemies::Single04", _local2, -90);
time = (inBetween * 1.5);
break;
case "missile03":
game.spawn("enemies::Missile03", _local2, -50);
time = inBetween;
break;
case "boss05":
if (current == 30){
game.spawn("enemies::Boss05", 300, -200).powerUp(wave);
sequence.push(b5);
sequence.push(w);
} else {
game.spawn("enemies::Boss05", 300, -200);
};
base = "b";
spawnWalls();
break;
case "asteroid":
game.spawn("obstacles::Asteroid", 0, 0);
break;
case "debris":
game.spawn("obstacles::Debris", 0, 0);
break;
case "end":
game.finishLevel();
break;
case "wait":
wait = true;
break;
default:
if (!isNaN(_local1)){
time = (_local1 * 30);
} else {
if ((((_local1.substr(0, 1) == "t")) && (((MovieClip(game.parent.parent).allData.pref.tutorials) || ((((((_local1 == "t8")) || ((_local1 == "t9")))) || ((_local1 == "t10")))))))){
_local3 = MovieClip(game.parent.parent).getUnlockables();
_local4 = true;
if (_local1 == "t8"){
if (_local3[1] == 0){
_local3[1] = 1;
_local3[2] = 1;
_local3[3] = 1;
MovieClip(game.parent.parent).setUnlockables(_local3, true);
} else {
_local4 = false;
};
} else {
if (_local1 == "t10"){
if (_local3[0] == 0){
_local3[0] = 1;
MovieClip(game.parent.parent).setUnlockables(_local3);
} else {
_local4 = false;
};
};
};
if (_local4){
time = (game.mcTut.showTut(_local1.substr(1)) * 30);
tutorial = true;
};
} else {
if (!game.ships.length){
base = (base + _local1.substr(1));
time = 180;
} else {
sequence.unshift(_local1);
};
};
};
break;
};
};
};
if (((((!(walls)) && ((current > 23)))) && ((current < 29)))){
spawnWalls((current == 23));
};
}
public function spawnWalls(_arg1:Boolean=false):void{
var _local2:int;
walls = true;
_local2 = 0;
while (_local2 < 5) {
game.newWall(_local2, _arg1);
_local2++;
};
}
public function runtime(_arg1:Array):void{
if (((((!(wait)) || (!(_arg1.length)))) && (!(game.player.isDead)))){
wait = false;
if (time > 0){
time--;
if (((((!(tutorial)) && (!(_arg1.length)))) && (!(game.salvage.length)))){
time--;
};
if (((tutorial) && (!(_arg1.length)))){
game.mcTut.alpha = (game.mcTut.alpha + ((1 - game.mcTut.alpha) / 2.5));
if (time == 0){
tutorial = false;
};
} else {
if (((tutorial) && (_arg1.length))){
time++;
};
};
if (((((!((base == ""))) && ((current > 23)))) && ((current < 29)))){
if (base != "x"){
time++;
if (!_arg1.length){
time++;
};
};
};
} else {
tick();
};
};
if (!tutorial){
game.mcTut.alpha = (game.mcTut.alpha - (game.mcTut.alpha / 2.5));
};
}
public function drop(_arg1:Object, _arg2:Number):void{
var _local3:Number;
dropChance = (dropChance + _arg2);
dropChancePowerUp = (dropChancePowerUp + (_arg2 / 2));
if ((((current > 23)) && ((current < 29)))){
dropChance = -1;
dropChancePowerUp = -1;
};
_local3 = (Math.random() * 100);
if (_local3 <= dropChance){
dropChance = 0;
game.addChildAt(new Salvage(_arg1.x, _arg1.y, current), game.getDepthID());
};
_local3 = (Math.random() * 100);
if (_local3 <= dropChancePowerUp){
dropChancePowerUp = 0;
game.addChildAt(new PowerUp(_arg1.x, _arg1.y), game.getDepthID());
};
}
}
}//package gameplay
Section 30
//Missile (gameplay.Missile)
package gameplay {
import flash.display.*;
public class Missile extends MovieClip {
private var ys:Number;
public var mc_trail:MovieClip;
private var maxSpeed:Number;// = 15
private var speed:Number;// = 0
private var dead:Boolean;// = false
public var damage:Number;
private var xs:Number;
private var target:Object;
private var speed2:Number;// = 0
private var accel:Number;// = 0.5
public function Missile(_arg1:Object, _arg2:Number, _arg3:Object, _arg4:int){
accel = 0.5;
dead = false;
maxSpeed = 15;
speed = 0;
speed2 = 0;
super();
stop();
x = _arg1.x;
y = _arg1.y;
damage = _arg2;
target = _arg3;
xs = ((Math.random() * 5) + 7.5);
ys = ((Math.random() * 5) + 7.5);
if ((target.x < x)){
xs = (xs * -1);
//unresolved jump
};
if ((target.y < y)){
ys = (ys * -1);
//unresolved jump
};
MovieClip(mc_trail).stop();
MovieClip(mc_trail).width = 13;
if (_arg4){
damage = (damage * 2);
MovieClip(mc_trail).nextFrame();
nextFrame();
};
}
public function runtime():void{
var _local1:Number;
var _local2:Number;
var _local3:Array;
if (((((target) && (!(target.isDead)))) && (!((MovieClip(parent).ships.indexOf(target) == -1))))){
target.missileTarget.nextFrame();
if (speed < maxSpeed){
speed = (speed + accel);
speed2 = (speed2 + accel);
};
_local1 = x;
_local2 = y;
x = (x + ((Math.cos(Math.atan2((target.y - y), (target.x - x))) * speed) + xs));
y = (y + ((Math.sin(Math.atan2((target.y - y), (target.x - x))) * speed) + ys));
rotation = ((180 * Math.atan2((y - _local2), (x - _local1))) / Math.PI);
xs = (xs / 1.1);
ys = (ys / 1.1);
MovieClip(mc_trail).width = (13 + (speed2 * 2));
if (target.touch(this, true)){
target.missileTarget.gotoAndStop(1);
killMe();
};
} else {
target = null;
_local3 = MovieClip(parent).getActiveEnemies();
if (_local3.length){
_local3.sortOn("missilePriority", Array.NUMERIC);
target = _local3[0];
xs = ((Math.cos(Math.atan2((target.y - y), (target.x - x))) * (speed / 2)) + xs);
ys = ((Math.sin(Math.atan2((target.y - y), (target.x - x))) * (speed / 2)) + ys);
speed = (speed / 2);
} else {
killMe();
};
};
}
public function deleteMe():void{
}
private function killMe():void{
MovieClip(parent).spawn("ExplosionVerySmall", x, y);
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
}
}//package gameplay
Section 31
//Player (gameplay.Player)
package gameplay {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import main.*;
public class Player extends MovieClip {
public var powers:Array;
public var mcHit:MovieClip;
public var canFire:Boolean;// = true
private var soundShoot:Boolean;// = false
private var missileReload:Number;// = 0
public var mcBeam:MovieClip;
public var mcBarShield:MovieClip;
private var barHealth:MovieClip;
public var mcShield:shieldPlayer;
private var soundScrape;// = null
private var stats:Array;
public var isDead:Boolean;// = false
private var gun1:MovieClip;
private var gun2:MovieClip;
private var gun3:MovieClip;
public var mcShip:MovieClip;
private var hp:Number;
public var xs:Number;// = 0
public var ys:Number;// = 0
private var id:int;
public var collision:Boolean;// = false
private var bulletReload:Number;// = 0
private var barShield:MovieClip;
private var shield:Number;
private var shieldTimer:int;
public var mcBarHealth:MovieClip;
private var firing:Boolean;// = false
private var shieldSprite:MovieClip;
public var hit:MovieClip;
public var mcGun1:MovieClip;
public var mcGun2:MovieClip;
public var mcGun3:MovieClip;
private var beam:MovieClip;
private var p1:Boolean;// = false
private var p2:Boolean;// = false
private var p3:Boolean;// = false
public var powersDuration:Array;
private var salvageObject:Object;
private var upgrades:Array;
private var salvageTimer:Number;// = 0
private var soundShoot2;// = null
public function Player(_arg1:int){
bulletReload = 0;
firing = false;
missileReload = 0;
p1 = false;
p2 = false;
p3 = false;
salvageTimer = 0;
soundShoot = false;
soundShoot2 = null;
soundScrape = null;
canFire = true;
collision = false;
isDead = false;
powers = new Array(0, 0, 0, 0, 0);
powersDuration = new Array(12, 8, 10, 12, 10);
xs = 0;
ys = 0;
super();
addEventListener("addedToStage", initEvent, false, 0, true);
barHealth = MovieClip(mcBarHealth);
barShield = MovieClip(mcBarShield);
beam = MovieClip(mcBeam);
beam.stop();
gun1 = MovieClip(mcGun1);
gun2 = MovieClip(mcGun2);
gun3 = MovieClip(mcGun3);
hit = MovieClip(mcHit);
id = _arg1;
shieldSprite = MovieClip(mcShield);
shieldSprite.color = "blue";
x = 300;
y = 400;
stats = new Array();
stats["bulletDamage"] = 10;
stats["bulletReload"] = -9;
stats["hp"] = 85;
stats["missileDamage"] = 60;
stats["missileReload"] = -120;
stats["shield"] = 45;
stats["shieldRadius"] = 24;
stats["shieldRegen"] = 0.5;
stats["shieldTimer"] = -120;
stats["size"] = "Small";
stats["speedAccel"] = 1.8;
stats["speedDecel"] = 1.25;
stats["speedMax"] = 8;
}
public function pause():void{
if (soundShoot2){
soundShoot2.clear();
soundShoot2 = null;
};
if (soundScrape){
soundScrape.clear();
soundScrape = null;
};
}
private function shoot(_arg1:MovieClip, _arg2:Number=0):void{
var _local3:Point;
bulletReload = stats.bulletReload;
_local3 = new Point(_arg1.x, _arg1.y);
if (!_arg2){
_arg2 = _arg1.rotation;
};
if (p3){
MovieClip(parent).newBullet(this, _local3, _arg1, _arg2, stats.bulletDamage, "asdf", 2);
} else {
MovieClip(parent).newBullet(this, _local3, _arg1, _arg2, stats.bulletDamage, "asdf", powers[2]);
};
}
public function shieldDamage():void{
shieldTimer = stats.shieldTimer;
shield = 0;
}
public function powerUp(_arg1:int):void{
powers[(_arg1 - 1)] = (powersDuration[(_arg1 - 1)] * 30);
}
public function bigDamage(_arg1:Object):void{
if (((canFire) && (!(isDead)))){
hp = (hp - (25 * _arg1.extraDmg));
testDeath();
};
}
private function upEvent(_arg1:MouseEvent):void{
firing = false;
}
private function directDamage():void{
if (((canFire) && (!(isDead)))){
hp = (hp - (stats.hp * 0.04));
testDeath();
};
}
private function testDeath():void{
if ((((hp <= 0)) && (!(isDead)))){
pause();
isDead = true;
MovieClip(parent).spawn(("Explosion" + stats.size), x, y);
MovieClip(parent).spawn(("Debris" + stats.size), x, y);
MovieClip(parent).removeChild(this);
};
}
private function downEvent(_arg1:MouseEvent):void{
firing = true;
}
private function defaultUpgrades():Array{
upgrades = new Array(0, 0, 0, 0);
return (upgrades);
}
public function touch(_arg1:Object, _arg2:Boolean=false):Boolean{
if (shield){
if (Math.sqrt((Math.pow((x - _arg1.x), 2) + Math.pow((y - _arg1.y), 2))) <= stats.shieldRadius){
while (((!(_arg2)) && ((Math.sqrt((Math.pow((x - _arg1.x), 2) + Math.pow((y - _arg1.y), 2))) <= stats.shieldRadius)))) {
_arg1.backTrack();
};
shieldSprite.hit((((Math.atan2((_arg1.y - y), (_arg1.x - x)) * 360) / (2 * Math.PI)) + 90));
_arg1.deleteMe();
damage(_arg1.damage);
return (true);
} else {
return (false);
};
//unresolved jump
};
if (_arg1.hitTestObject(hit)){
while (((!(_arg2)) && (_arg1.hitTestObject(hit)))) {
_arg1.backTrack();
};
damage(_arg1.damage);
return (true);
//unresolved jump
};
return (false);
}
public function runtime2():void{
var _local1:Array;
var _local2:int;
gun1.nextFrame();
gun2.nextFrame();
gun3.nextFrame();
bulletReload++;
if (((canFire) && (((firing) || (Shooter.key.down(32)))))){
if ((((((bulletReload >= 0)) && (!(powers[1])))) && (!(p3)))){
soundShoot = true;
shoot(gun1);
shoot(gun2);
if (upgrades[2]){
shoot(gun3);
};
} else {
if (((powers[1]) || (p3))){
soundShoot = true;
shoot(gun1, (Math.random() * 5));
shoot(gun2, (Math.random() * -5));
if (upgrades[2]){
shoot(gun3, ((Math.random() * -2.5) + (Math.random() * 2.5)));
};
};
};
};
if (((((!(firing)) || (!(canFire)))) && (soundShoot2))){
soundShoot2.clear();
soundShoot2 = null;
};
missileReload++;
if (((((canFire) && ((missileReload >= 0)))) && (((firing) || (Shooter.key.down(32)))))){
_local1 = MovieClip(parent).getActiveEnemies();
if (_local1.length){
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2].setMissilePriority();
_local2++;
};
_local1.sortOn("missilePriority", Array.NUMERIC);
newMissile(_local1[0]);
};
};
if (((soundShoot) && (!(soundShoot2)))){
if (((powers[1]) || (p3))){
soundShoot2 = Shooter.sound.playSoundLoop("BulletPower", 0.7);
} else {
Shooter.sound.playSound("BulletPlayer");
};
soundShoot = false;
};
if (((((soundShoot2) && (!(powers[1])))) && (!(p3)))){
soundShoot2.clear();
soundShoot2 = null;
};
}
private function newMissile(_arg1:Object):void{
var _local2:Array;
var _local3:int;
Shooter.sound.playSound("MissileLaunch", 0.7);
missileReload = stats.missileReload;
if (p2){
MovieClip(parent).newMissile(this, stats.missileDamage, _arg1, 2);
} else {
MovieClip(parent).newMissile(this, stats.missileDamage, _arg1, powers[3]);
};
if (((powers[4]) || (p2))){
_local2 = MovieClip(parent).getActiveEnemies();
_local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3].setMissilePriority();
_local3++;
};
_local2.sortOn("missilePriority", Array.NUMERIC);
if (_local2[1]){
if (p2){
MovieClip(parent).newMissile(this, stats.missileDamage, _local2[1], 2);
} else {
MovieClip(parent).newMissile(this, stats.missileDamage, _local2[1], powers[3]);
};
} else {
if (p2){
MovieClip(parent).newMissile(this, stats.missileDamage, _local2[0], 2);
} else {
MovieClip(parent).newMissile(this, stats.missileDamage, _local2[0], powers[3]);
};
};
};
}
private function initEvent(_arg1:Event):void{
var _local2:Array;
removeEventListener("addedToStage", initEvent);
stage.addEventListener("mouseDown", downEvent, false, 0, true);
stage.addEventListener("mouseUp", upEvent, false, 0, true);
if (MovieClip(parent.parent.parent).allData.profiles[id]["upgrades"] == null){
MovieClip(parent.parent.parent).allData.profiles[id]["upgrades"] = defaultUpgrades();
MovieClip(parent.parent.parent).gameSave();
} else {
upgrades = MovieClip(parent.parent.parent).allData.profiles[id]["upgrades"];
stats["upRatios"] = new Array(3, 1, 0, 20, 13.33, 18, 22, 0.1, 0.05, 0.28);
stats["bulletDamage"] = (stats["bulletDamage"] + (upgrades[0] * stats.upRatios[0]));
stats["bulletReload"] = (stats["bulletReload"] + (upgrades[1] * stats.upRatios[1]));
stats["hp"] = (stats["hp"] + (upgrades[6] * stats.upRatios[6]));
stats["missileDamage"] = (stats["missileDamage"] + (upgrades[3] * stats.upRatios[3]));
stats["missileReload"] = (stats["missileReload"] + (upgrades[4] * stats.upRatios[4]));
stats["shield"] = (stats["shield"] + (upgrades[5] * stats.upRatios[5]));
stats["shieldRadius"] = 24;
stats["shieldRegen"] = (stats["shieldRegen"] + (upgrades[5] * 0.1));
stats["shieldTimer"] = (stats["shieldTimer"] + (upgrades[5] * 4.5));
stats["size"] = "Small";
stats["speedAccel"] = (stats["speedAccel"] + (upgrades[7] * stats.upRatios[7]));
stats["speedDecel"] = (stats["speedDecel"] + (upgrades[7] * stats.upRatios[8]));
stats["speedMax"] = (stats["speedMax"] + (upgrades[7] * stats.upRatios[9]));
};
hp = stats.hp;
shield = stats.shield;
shieldTimer = stats.shieldTimer;
if (((!((MovieClip(parent).level.current == 30))) && (MovieClip(root).allFeatures))){
_local2 = MovieClip(parent.parent.parent).getUnlockables();
if (_local2[1] == 2){
p1 = true;
};
if (_local2[2] == 2){
p2 = true;
};
if (_local2[3] == 2){
p3 = true;
};
};
}
public function damage(_arg1:Number):void{
if (canFire){
shieldTimer = stats.shieldTimer;
shield = (shield - _arg1);
if ((((shield < 0)) && (!(isDead)))){
hp = (hp + shield);
shield = 0;
};
testDeath();
};
}
public function runtime():void{
var _local1:Array;
var _local2:int;
if (((((Shooter.key.control("left")) && (!(Shooter.key.control("right"))))) || (((Shooter.key.control("left2")) && (!(Shooter.key.control("right2"))))))){
xs = (xs - stats.speedAccel);
if (xs < -(stats.speedMax)){
xs = -(stats.speedMax);
};
if (((collision) && ((xs > 0)))){
xs = (xs * -1);
};
} else {
if (((((Shooter.key.control("right")) && (!(Shooter.key.control("left"))))) || (((Shooter.key.control("right2")) && (!(Shooter.key.control("left2"))))))){
xs = (xs + stats.speedAccel);
if (xs > stats.speedMax){
xs = stats.speedMax;
};
if (((collision) && ((xs < 0)))){
xs = (xs * -1);
};
} else {
xs = (xs / stats.speedDecel);
if (Math.abs(xs) < 0.1){
xs = 0;
};
};
};
if (((((Shooter.key.control("up")) && (!(Shooter.key.control("down"))))) || (((Shooter.key.control("up2")) && (!(Shooter.key.control("down2"))))))){
ys = (ys - stats.speedAccel);
if (ys < -(stats.speedMax)){
ys = -(stats.speedMax);
};
if (((collision) && ((ys > 0)))){
ys = (ys * -1);
};
} else {
if (((((Shooter.key.control("down")) && (!(Shooter.key.control("up"))))) || (((Shooter.key.control("down2")) && (!(Shooter.key.control("up2"))))))){
ys = (ys + stats.speedAccel);
if (ys > stats.speedMax){
ys = stats.speedMax;
};
if (((collision) && ((ys < 0)))){
ys = (ys * -1);
};
} else {
ys = (ys / stats.speedDecel);
if (Math.abs(ys) < 0.1){
ys = 0;
};
};
};
if (x < 20){
xs = (xs + (stats.speedAccel * 1.5));
};
if (x > 580){
xs = (xs - (stats.speedAccel * 1.5));
};
if (y < 20){
ys = (ys + (stats.speedAccel * 1.5));
};
if (y > 680){
ys = (ys - (stats.speedAccel * 1.5));
};
x = (x + xs);
y = (y + ys);
shieldTimer++;
if ((((((shieldTimer > 0)) || (powers[0]))) || (p1))){
shield = (shield + stats.shieldRegen);
if (((powers[0]) || (p1))){
shield = (shield + stats.shieldRegen);
};
if (shield > stats.shield){
shield = stats.shield;
};
};
barHealth.gotoAndStop((Math.round(((hp / stats.hp) * 100)) + 1));
barShield.gotoAndStop((Math.round(((shield / stats.shield) * 100)) + 1));
salvageTimer++;
if ((((salvageTimer >= 20)) && (Shooter.key.control("shift")))){
_local1 = MovieClip(parent).salvage;
_local2 = 0;
while (_local2 < _local1.length) {
if (Math.sqrt((Math.pow((_local1[_local2].x - x), 2) + Math.pow((_local1[_local2].y - y), 2))) <= 150){
shieldTimer = stats.shieldTimer;
salvageTimer = 0;
salvageObject = _local1[_local2];
_local1[_local2].collect();
beam.gotoAndStop(1);
break;
};
_local2++;
};
};
if (salvageObject){
beam.rotation = 0;
if (MovieClip(beam.mcMask)){
MovieClip(beam.mcMask).width = Math.sqrt((Math.pow((salvageObject.x - x), 2) + Math.pow((salvageObject.y - y), 2)));
} else {
beam.maskWidth = Math.sqrt((Math.pow((salvageObject.x - x), 2) + Math.pow((salvageObject.y - y), 2)));
};
beam.rotation = ((180 * Math.atan2((salvageObject.y - y), (salvageObject.x - x))) / Math.PI);
beam.nextFrame();
if (beam.currentLabel == "finish"){
beam.gotoAndStop(1);
salvageObject = null;
} else {
beam.alpha = ((10 - salvageTimer) / 5);
};
};
MovieClip(mcShip).spin1.rotation = (MovieClip(mcShip).spin1.rotation + 20);
MovieClip(mcShip).spin2.rotation = (MovieClip(mcShip).spin2.rotation - 20);
shieldSprite.alpha = (shield / stats.shield);
if (collision){
if (!soundScrape){
soundScrape = Shooter.sound.playSoundLoop("DirectDamage");
};
directDamage();
} else {
if (soundScrape){
soundScrape.clear();
soundScrape = null;
};
};
collision = false;
_local2 = 0;
while (_local2 < powers.length) {
if (powers[_local2]){
var _local3 = powers;
var _local4 = _local2;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
};
_local2++;
};
}
}
}//package gameplay
Section 32
//PowerUp (gameplay.PowerUp)
package gameplay {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class PowerUp extends MovieClip {
private var item:MovieClip;
private var ys:Number;
private var bonus:int;
private var timer:Number;// = 0
private var collected:Boolean;// = false
private var xs:Number;
public var priority:Number;// = 1
public var mcItem:MovieClip;
public var box:TextField;
private var rot:Number;
public function PowerUp(_arg1:Number, _arg2:Number):void{
var _local3:*;
collected = false;
rot = ((Math.random() > 0.5)) ? -1 : 1;
timer = 0;
priority = 1;
super();
addEventListener("addedToStage", initEvent, false, 0, true);
bonus = Math.ceil((Math.random() * 5));
item = MovieClip(mcItem);
x = _arg1;
y = _arg2;
stop();
item.gotoAndStop(bonus);
_local3 = ((Math.random() * 0.25) + 0.2);
xs = (Math.random() * _local3);
ys = (_local3 - xs);
if (x > 500){
xs = (xs * -1);
} else {
if ((((Math.random() > 0.5)) && ((x > 100)))){
xs = (xs * -1);
};
};
if (y > 600){
ys = (ys * -1);
} else {
if ((((Math.random() > 0.5)) && ((y > 100)))){
ys = (ys * -1);
};
};
}
public function runtime():void{
if (!collected){
x = (x + xs);
y = (y + ys);
item.rotation = (item.rotation + rot);
timer++;
if (timer == 10){
timer = 0;
setText();
};
if ((((((((x < -10)) || ((x > 610)))) || ((y < -10)))) || ((y > 710)))){
MovieClip(parent).salvage.splice(MovieClip(parent).salvage.indexOf(this), 1);
cleanUp();
};
} else {
nextFrame();
scaleX = (scaleX - 0.025);
scaleY = scaleX;
if (scaleX <= 0){
cleanUp();
};
};
}
public function collect():void{
MovieClip(parent).salvage.splice(MovieClip(parent).salvage.indexOf(this), 1);
MovieClip(parent).player.powerUp(bonus);
MovieClip(parent).pickUpBonus(bonus);
collected = true;
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
MovieClip(parent).salvage.push(this);
MovieClip(parent).salvage.sortOn("priority");
MovieClip(parent).doRuntime(this);
setText();
}
private function setText():void{
var _local1:Object;
var _local2:Number;
_local1 = MovieClip(parent).player;
_local2 = Math.sqrt((Math.pow((_local1.x - x), 2) + Math.pow((_local1.y - y), 2)));
if (_local2 <= 150){
box.text = String(int((_local2 / 5)));
} else {
box.htmlText = (("<font color='#FB5554'>" + String(int((_local2 / 5)))) + "</font>");
};
}
private function cleanUp():void{
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
}
}//package gameplay
Section 33
//Salvage (gameplay.Salvage)
package gameplay {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class Salvage extends MovieClip {
private var item:MovieClip;
private var ys:Number;
private var timer:Number;// = 0
private var collected:Boolean;// = false
private var value:int;
private var xs:Number;
public var priority:Number;// = 2
public var mcItem:MovieClip;
public var box:TextField;
private var rot:Number;
public function Salvage(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:*;
collected = false;
rot = ((Math.random() > 0.5)) ? -1 : 1;
timer = 0;
value = (20 + (Math.random() * 10));
priority = 2;
super();
addEventListener("addedToStage", initEvent, false, 0, true);
item = MovieClip(mcItem);
value = (value * (1 + (_arg3 / 30)));
x = _arg1;
y = _arg2;
stop();
item.gotoAndStop(Math.ceil((Math.random() * item.totalFrames)));
_local4 = ((Math.random() * 0.25) + 0.2);
xs = (Math.random() * _local4);
ys = (_local4 - xs);
if (x > 500){
xs = (xs * -1);
} else {
if ((((Math.random() > 0.5)) && ((x > 100)))){
xs = (xs * -1);
};
};
if (y > 600){
ys = (ys * -1);
} else {
if ((((Math.random() > 0.5)) && ((y > 100)))){
ys = (ys * -1);
};
};
if (y < 100){
ys = ((Math.random() * 0.1) + 0.15);
};
if (y < 0){
y = 20;
ys = Math.abs(ys);
};
}
public function runtime():void{
if (!collected){
x = (x + xs);
y = (y + ys);
item.rotation = (item.rotation + rot);
timer++;
if (timer == 10){
timer = 0;
setText();
};
if ((((((((x < -10)) || ((x > 610)))) || ((y < -10)))) || ((y > 710)))){
MovieClip(parent).salvage.splice(MovieClip(parent).salvage.indexOf(this), 1);
cleanUp();
};
} else {
nextFrame();
scaleX = (scaleX - 0.025);
scaleY = scaleX;
if (scaleX <= 0){
cleanUp();
};
};
}
public function collect():void{
MovieClip(parent).salvage.splice(MovieClip(parent).salvage.indexOf(this), 1);
MovieClip(parent).score = (MovieClip(parent).score + value);
collected = true;
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
MovieClip(parent).salvage.push(this);
MovieClip(parent).salvage.sortOn("priority");
MovieClip(parent).doRuntime(this);
setText();
}
private function setText():void{
var _local1:Object;
var _local2:Number;
_local1 = MovieClip(parent).player;
_local2 = Math.sqrt((Math.pow((_local1.x - x), 2) + Math.pow((_local1.y - y), 2)));
if (_local2 <= 150){
box.text = String(int((_local2 / 5)));
} else {
box.htmlText = (("<font color='#FB5554'>" + String(int((_local2 / 5)))) + "</font>");
};
}
private function cleanUp():void{
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
}
}//package gameplay
Section 34
//Preloader (main.Preloader)
package main {
import flash.display.*;
import flash.ui.*;
import menus.*;
public class Preloader extends MovieClip {
public var mcContent:MovieClip;
private var cContent:MovieClip;
private var contMenu:ContextMenu;
public function Preloader(){
contMenu = new ContextMenu();
super();
contMenu.hideBuiltInItems();
contextMenu = contMenu;
cContent = MovieClip(mcContent);
cContent.addChild(new MenuManager("Preloader"));
}
}
}//package main
Section 35
//Shooter (main.Shooter)
package main {
import gameplay.*;
import tools.*;
import flash.events.*;
import flash.display.*;
import flash.ui.*;
import menus.*;
import flash.utils.*;
public class Shooter extends MovieClip {
public var allData:Array;
public var mcContent:MovieClip;
private var mySave:SaveLoad;
private var cContent:MovieClip;
private var contMenu:ContextMenu;
public var activeProfile:int;
private var watchIntro:Boolean;// = false
public static var music:MgrMusic;
public static var key:KeyManager = new KeyManager();
public static var sound:MgrSound;
public function Shooter(){
allData = new Array();
mySave = new SaveLoad();
contMenu = new ContextMenu();
watchIntro = false;
super();
allData["pref"] = new Array();
allData["pref"]["music"] = true;
allData["pref"]["sound"] = true;
cContent = MovieClip(mcContent);
contMenu.hideBuiltInItems();
contextMenu = contMenu;
contMenu.addEventListener("menuSelect", key.clearKeys, false, 0, true);
addEventListener("deactivate", lostFocus, false, 0, true);
addChild(key);
addChild(mySave);
music = new MgrMusic();
addChild(music);
sound = new MgrSound();
addChild(sound);
cContent.addChild(new MenuManager("Main"));
}
public function showFinale():void{
clearContent();
cContent.addChild(new Finale());
}
public function finishFinale():void{
clearContent();
cContent.addChild(new MenuManager("CommandCenter"));
}
private function lostFocus(_arg1:Event):void{
key.clearKeys();
if (getQualifiedClassName(cContent.getChildAt(0)) == "gameplay::Game"){
MovieClip(cContent.getChildAt(0)).forcePause();
};
}
public function setControls():void{
key.setControl("left", allData["pref"]["left"]);
key.setControl("right", allData["pref"]["right"]);
key.setControl("up", allData["pref"]["up"]);
key.setControl("down", allData["pref"]["down"]);
key.setControl("shift", 16);
key.setControl("left2", 37);
key.setControl("right2", 39);
key.setControl("up2", 38);
key.setControl("down2", 40);
key.setControl("pause", 27);
key.setControl("pause2", 80);
}
public function getUnlockables():Array{
if (allData.profiles[activeProfile]["unlocked"] == undefined){
allData.profiles[activeProfile]["unlocked"] = new Array(0, 0, 0, 0);
gameSave();
trace("no unlocked data");
};
return (allData.profiles[activeProfile]["unlocked"]);
}
public function showIntro():void{
clearContent();
cContent.addChild(new Intro());
}
public function startGame(_arg1:int=99, _arg2:int=0):void{
if (_arg1 != 99){
activeProfile = _arg1;
};
clearContent();
cContent.addChild(new Game(activeProfile, _arg2, allData.profiles[activeProfile]["earnings"][_arg2]));
stage.focus = stage;
}
public function resetProfile():void{
var _local1:int;
allData.profiles[activeProfile]["mission"] = 0;
_local1 = 0;
while (_local1 < 30) {
allData.profiles[activeProfile]["earnings"][_local1] = 0;
_local1++;
};
allData.profiles[activeProfile]["upgrades"] = new Array(0, 0, 0, 0, 0, 0, 0, 0);
allData.profiles[activeProfile]["money"] = 0;
gameSave();
}
private function clearContent():void{
while (cContent.numChildren) {
cContent.removeChildAt(0);
};
}
public function gameSave():void{
mySave.gameSave();
}
public function finishIntro():void{
if (watchIntro){
clearContent();
cContent.addChild(new Game(activeProfile, 0, allData.profiles[activeProfile]["earnings"][0]));
stage.focus = stage;
watchIntro = false;
} else {
clearContent();
cContent.addChild(new MenuManager("CommandCenter"));
};
}
public function returnMenu():void{
clearContent();
cContent.addChild(new MenuManager("CommandCenter"));
}
public function setUnlockables(_arg1:Array, _arg2:Boolean=false):void{
allData.profiles[activeProfile]["unlocked"] = _arg1;
if (_arg2){
gameSave();
};
}
public function missionComplete(_arg1:int, _arg2:int, _arg3:Boolean=true):void{
if (((_arg3) && ((allData.profiles[activeProfile]["mission"] < _arg1)))){
allData.profiles[activeProfile]["mission"] = _arg1;
};
if ((((allData.profiles[activeProfile]["earnings"][(_arg1 - 1)] < _arg2)) || (isNaN(allData.profiles[activeProfile]["earnings"][(_arg1 - 1)])))){
if (_arg3){
allData.profiles[activeProfile]["money"] = (allData.profiles[activeProfile]["money"] + (_arg2 - allData.profiles[activeProfile]["earnings"][(_arg1 - 1)]));
};
allData.profiles[activeProfile]["earnings"][(_arg1 - 1)] = _arg2;
};
}
public function newProfile(_arg1:String, _arg2:int):void{
allData.profiles[_arg2] = new Array();
allData.profiles[_arg2]["earnings"] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
allData.profiles[_arg2]["upgrades"] = new Array(0, 0, 0, 0, 0, 0, 0, 0);
allData.profiles[_arg2]["unlocked"] = new Array(0, 0, 0, 0);
allData.profiles[_arg2]["name"] = _arg1;
allData.profiles[_arg2]["mission"] = 0;
allData.profiles[_arg2]["money"] = 0;
allData.profiles[_arg2]["targetting"] = 0;
activeProfile = _arg2;
gameSave();
watchIntro = true;
}
}
}//package main
Section 36
//BaseMenu (menus.BaseMenu)
package menus {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import main.*;
public class BaseMenu extends MovieClip {
public var b1:MovieClip;
public var b3:MovieClip;
public var b5:MovieClip;
public var b2:MovieClip;
public var b4:MovieClip;
public var b6:MovieClip;
public var b7:MovieClip;
public var mcMissions:MovieClip;
public var b8:MovieClip;
public var mcBonus:MovieClip;
public var bar:MovieClip;
public var txtMoney:TextField;
public var txtInstructions:TextField;
public var b9:MovieClip;
protected var bgAlpha:Number;// = 0
public var mcDel1:MovieClip;
public var mcDel2:MovieClip;
public var mcDel3:MovieClip;
public var mcDel4:MovieClip;
public var mcDel5:MovieClip;
public var mcDel6:MovieClip;
public var mcDel7:MovieClip;
public var mcB1:MovieClip;
public var mcB2:MovieClip;
public var mcB3:MovieClip;
public var mcB4:MovieClip;
public var mcB5:MovieClip;
public var mcB6:MovieClip;
public var mcAudio1:MovieClip;
public var mcB7:MovieClip;
public var mcB8:MovieClip;
protected var canClose:Boolean;// = true
public var txtTutorials:TextField;
public var mcAudio2:MovieClip;
protected var doClicks:Boolean;// = true
public var mcStart:MovieClip;
public var txtControlUp:TextField;
public var txt10:TextField;
public var txt11:TextField;
public var txt14:TextField;
public var txt16:TextField;
public var txt12:TextField;
public var txt13:TextField;
public var txt17:TextField;
public var mcShield:MovieClip;
public var txt15:TextField;
public var param;
public var txt18:TextField;
public var mcToggle:MovieClip;
public var txt20:TextField;
public var txt21:TextField;
public var txt22:TextField;
public var txt23:TextField;
public var txt25:TextField;
public var txt27:TextField;
public var txt29:TextField;
public var txt24:TextField;
public var txt26:TextField;
public var txt28:TextField;
public var txt19:TextField;
public var txt30:TextField;
protected var doRuntime:Boolean;// = true
public var mcHopeku:MovieClip;
protected var closeFunc:Function;
protected var sound:Boolean;// = true
public var mcBuy:MovieClip;
public var usernameBox:TextField;
public var txtName:TextField;
private var btnInfo:Array;
public var txtDesc:TextField;
public var mcBullets:MovieClip;
public var mcWorkshop:MovieClip;
public var txtBox:TextField;
public var txtControlRight:TextField;
public var mcResume:MovieClip;
public var mcReset:MovieClip;
public var mcYes:MovieClip;
public var txtQuality1:TextField;
public var txtQuality3:TextField;
public var saveName:TextField;
public var mcNext:MovieClip;
public var txtQuality2:TextField;
public var txtAudio2:TextField;
public var txtAudio1:TextField;
public var txtHelp:TextField;
public var mcPlay:MovieClip;
public var mcNo:MovieClip;
private var close:MovieClip;
public var txtShield:TextField;
public var mcSlot1:MovieClip;
public var mcSlot2:MovieClip;
public var mcSlot3:MovieClip;
public var mcSlot4:MovieClip;
public var mcSlot5:MovieClip;
public var mcSlot6:MovieClip;
public var mcSlot7:MovieClip;
public var b13:MovieClip;
public var b14:MovieClip;
public var b15:MovieClip;
public var b16:MovieClip;
public var b17:MovieClip;
public var b18:MovieClip;
public var b19:MovieClip;
public var mcMore:MovieClip;
public var b10:MovieClip;
public var b12:MovieClip;
public var b11:MovieClip;
public var b21:MovieClip;
public var mcBoss:MovieClip;
public var mcCredits:MovieClip;
public var mcWebsite:MovieClip;
public var b26:MovieClip;
public var b27:MovieClip;
public var b28:MovieClip;
public var b29:MovieClip;
public var b24:MovieClip;
public var mcRight:MovieClip;
public var b20:MovieClip;
public var b22:MovieClip;
public var b23:MovieClip;
public var b30:MovieClip;
public var mcJoe:MovieClip;
public var b25:MovieClip;
protected var holdEscape:Boolean;// = false
public var txtCost:TextField;
public var mcReturn:MovieClip;
public var mcSam:MovieClip;
public var txtControlLeft:TextField;
public var mcIntro:MovieClip;
private var allButtons:Array;
public var txtTotal:TextField;
public var mcLeft:MovieClip;
public var mcTarget:MovieClip;
public var mcQuality2:MovieClip;
public var mcQuality3:MovieClip;
public var mcQuality1:MovieClip;
public var mcUp:MovieClip;
public var mcFinale:MovieClip;
public var txtLevel:TextField;
public var mcFont:MovieClip;
public var work:MovieClip;
public var txtControlDown:TextField;
public var mcTarg1:MovieClip;
public var mcTarg2:MovieClip;
public var mcTarg3:MovieClip;
public var mcTarg4:MovieClip;
public var mcTarg6:MovieClip;
public var mcTarg8:MovieClip;
public var txtBullets:TextField;
public var mcTarg5:MovieClip;
public var mcTarg7:MovieClip;
public var c_1:TextField;
public var c_3:TextField;
public var c_5:TextField;
public var c_6:TextField;
public var c_7:TextField;
public var c_2:TextField;
public var mcDown:MovieClip;
public var c_8:TextField;
public var c_4:TextField;
public var txtMiss:TextField;
public var mcLoad:MovieClip;
private var closeBtns:Array;
public var mcCancel:MovieClip;
public var mcMiss:MovieClip;
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public var txt4:TextField;
public var txt5:TextField;
public var txt6:TextField;
public var txt7:TextField;
public var txt8:TextField;
public var txt9:TextField;
public var mcExit:MovieClip;
public var mcSettings:MovieClip;
public var mcTutorials:MovieClip;
public var mcText:MovieClip;
public function BaseMenu(){
allButtons = new Array();
btnInfo = new Array();
closeBtns = new Array();
bgAlpha = 0;
canClose = true;
doClicks = true;
doRuntime = true;
holdEscape = false;
sound = true;
super();
addEventListener("addedToStage", initEvent, false, 0, true);
holdEscape = Shooter.key.down(27);
x = 10;
y = (690 + height);
}
protected function newButton(_arg1:Object, _arg2:String, _arg3:String, _arg4:Function):void{
var _local5:Number;
allButtons.push(_arg1);
btnInfo.push(new Array());
_local5 = (btnInfo.length - 1);
if ((_arg2 == "blue")){
btnInfo[_local5]["color"] = "BED2DA";
} else {
btnInfo[_local5]["color"] = "FFFFFF";
};
btnInfo[_local5]["func"] = _arg4;
btnInfo[_local5]["text"] = _arg3;
_arg1.textBox.text = _arg3;
}
protected function changeText(_arg1:Object, _arg2:String, _arg3:Function):void{
var _local4:Number;
_local4 = allButtons.indexOf(_arg1);
btnInfo[_local4]["func"] = _arg3;
btnInfo[_local4]["text"] = _arg2;
_arg1.textBox.text = _arg2;
}
public function closeBtn(_arg1:MovieClip):void{
closeBtns.push(_arg1);
}
public function click():void{
var _local1:int;
if (doClicks){
if (((close) && (close.hitTestPoint(stage.mouseX, stage.mouseY)))){
closeFunc();
if (sound){
Shooter.sound.playSound("Click");
};
} else {
_local1 = 0;
while (_local1 < allButtons.length) {
if (MovieClip(allButtons[_local1]).hitTestPoint(stage.mouseX, stage.mouseY)){
btnInfo[_local1].func();
if (sound){
Shooter.sound.playSound("Click");
};
break;
};
_local1++;
};
};
};
}
public function closeButton(_arg1:MovieClip):void{
close = _arg1;
close.gotoAndStop("off");
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
stage.focus = stage;
}
public function runtime():void{
var _local1:int;
var _local2:MovieClip;
if (doRuntime){
if (((close) && (close.hitTestPoint(stage.mouseX, stage.mouseY)))){
close.gotoAndStop("on");
} else {
if (close){
close.gotoAndStop("off");
};
_local1 = 0;
while (_local1 < allButtons.length) {
_local2 = allButtons[_local1];
if (MovieClip(_local2).hitTestPoint(stage.mouseX, stage.mouseY)){
MovieClip(_local2).textBox.htmlText = (((("<font color='#" + btnInfo[_local1]["color"]) + "'>") + btnInfo[_local1]["text"]) + "</font>");
} else {
MovieClip(_local2).textBox.text = btnInfo[_local1]["text"];
};
_local1++;
};
_local1 = 0;
while (_local1 < closeBtns.length) {
_local2 = closeBtns[_local1];
if (_local2.hitTestPoint(stage.mouseX, stage.mouseY)){
_local2.gotoAndStop("on");
} else {
_local2.gotoAndStop("off");
};
_local1++;
};
};
if (((((((close) && (canClose))) && (!(holdEscape)))) && (Shooter.key.down(27)))){
closeFunc();
};
holdEscape = Shooter.key.down(27);
doClicks = true;
};
}
}
}//package menus
Section 37
//Bouton_Close (menus.Bouton_Close)
package menus {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Bouton_Close extends MovieClip {
public function Bouton_Close(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).closeButton(this);
}
}
}//package menus
Section 38
//MenuManager (menus.MenuManager)
package menus {
import flash.events.*;
import flash.display.*;
import main.*;
import flash.utils.*;
public class MenuManager extends MovieClip {
public var mcContent:MovieClip;
public var mcDark:MovieClip;
public var bgAlpha:Number;
public var mcFade:MovieClip;
private var menuActive;
public var param2:String;// = "none"
private var transition:Boolean;// = true
private var dark:MovieClip;
private var fade:MovieClip;
private var currentMenu:String;
private var cContent:MovieClip;
public var param;
private var menuInactive;
public function MenuManager(_arg1:String="Main"){
transition = true;
param2 = "none";
super();
addEventListener("addedToStage", initEvent, false, 0, true);
addEventListener("enterFrame", runtime, false, 0, true);
cContent = MovieClip(mcContent);
currentMenu = _arg1;
dark = MovieClip(mcDark);
fade = MovieClip(mcFade);
fade.gotoAndStop("in");
if ((((currentMenu == "Main")) || ((currentMenu == "Preloader")))){
dark.alpha = 0.5;
} else {
dark.alpha = 0;
};
spawn(currentMenu);
mouseEnabled = false;
fade.mouseEnabled = false;
}
private function runtime(_arg1:Event):void{
fade.nextFrame();
if (transition){
if (menuActive){
menuActive.y = (menuActive.y + ((680 - menuActive.y) / 2.5));
if (Math.abs((menuActive.y - 680)) < 0.1){
menuActive.y = 680;
if (menuInactive){
removeChild(menuInactive);
};
transition = false;
};
};
if (menuInactive){
menuInactive.y = (menuInactive.y + (((710 + menuInactive.height) - menuInactive.y) / 2.5));
};
} else {
if (menuActive){
menuActive.runtime();
};
};
dark.alpha = (dark.alpha + ((bgAlpha - dark.alpha) / 10));
}
public function showFinale():void{
Shooter.music.fadeOut();
stage.removeEventListener("click", clickEvent);
fade.gotoAndStop("out");
fade.action = showFinaleReal;
menuInactive = menuActive;
menuActive = null;
transition = true;
}
public function exitPreloader():void{
stage.removeEventListener("click", clickEvent);
fade.gotoAndStop("outGrey");
menuInactive = menuActive;
menuActive = null;
transition = true;
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
stage.addEventListener("click", clickEvent, false, 0, true);
}
public function startGame(_arg1:Boolean=false):void{
Shooter.music.fadeOut();
stage.removeEventListener("click", clickEvent);
fade.gotoAndStop("out");
if (_arg1){
fade.action = startGameID;
} else {
fade.action = startGameReal;
};
menuInactive = menuActive;
menuActive = null;
transition = true;
}
private function startGameID():void{
removeEventListener("enterFrame", runtime);
MovieClip(parent.parent).startGame(99, menuInactive.param);
}
public function showIntro():void{
Shooter.music.fadeOut();
stage.removeEventListener("click", clickEvent);
fade.gotoAndStop("out");
fade.action = showIntroReal;
menuInactive = menuActive;
menuActive = null;
transition = true;
}
private function showIntroReal():void{
removeEventListener("enterFrame", runtime);
MovieClip(parent.parent).showIntro();
}
public function spawn(_arg1:String, _arg2=null):void{
var _local3:Class;
if (menuActive){
menuInactive = menuActive;
};
_local3 = Class(getDefinitionByName(_arg1));
menuActive = new (_local3);
param = _arg2;
addChildAt(menuActive, getChildIndex(cContent));
transition = true;
}
private function showFinaleReal():void{
removeEventListener("enterFrame", runtime);
MovieClip(parent.parent).showFinale();
}
private function startGameReal():void{
removeEventListener("enterFrame", runtime);
MovieClip(parent.parent).startGame();
}
private function clickEvent(_arg1:MouseEvent):void{
if (!transition){
menuActive.click();
};
}
}
}//package menus
Section 39
//Asteroid (obstacles.Asteroid)
package obstacles {
import flash.display.*;
public class Asteroid extends Obstacle {
public var mcSprites:MovieClip;
private var sc:Number;
public function Asteroid(){
sc = ((Math.random() * 0.2) + 1);
super();
canDestroy = false;
hp = 5000;
size = (25 * sc);
MovieClip(mcSprites).scaleX = sc;
MovieClip(mcSprites).scaleY = sc;
MovieClip(mcSprites).gotoAndStop(Math.ceil((Math.random() * MovieClip(mcSprites).totalFrames)));
}
}
}//package obstacles
Section 40
//AsteroidFixed (obstacles.AsteroidFixed)
package obstacles {
import flash.display.*;
public class AsteroidFixed extends Obstacle {
public var myShip:MovieClip;
public var mcSprites:MovieClip;
private var sc:Number;
private var ys2:Number;// = 0
public var myAngle:Number;// = 0
public var myDist:Number;// = 0
private var xs2:Number;// = 0
public var myRot:Number;// = 0
public var extraDmg:Number;// = 1
public function AsteroidFixed(){
sc = ((Math.random() * 0.2) + 1.2);
xs2 = 0;
ys2 = 0;
extraDmg = 1;
myAngle = 0;
myDist = 0;
myRot = 0;
super();
canDestroy = false;
hp = 33;
size = (28 * sc);
MovieClip(mcSprites).scaleX = sc;
MovieClip(mcSprites).scaleY = sc;
MovieClip(mcSprites).gotoAndStop(Math.ceil((Math.random() * MovieClip(mcSprites).totalFrames)));
}
public function unlock():void{
xs = xs2;
ys = ys2;
}
public function runtimeBoss():void{
var _local1:Number;
var _local2:Number;
inField = false;
xs = 0;
ys = 0;
rotation = 0;
_local1 = x;
_local2 = y;
extraDmg = ((1 * (myDist / 400)) * (Math.abs(myRot) / 8));
myAngle = (myAngle + myRot);
if (myRot < myShip.astRot){
myRot = (myRot + 0.08);
if (myRot > myShip.astRot){
myRot = myShip.astRot;
};
};
if (myRot > myShip.astRot){
myRot = (myRot - 0.08);
if (myRot < myShip.astRot){
myRot = myShip.astRot;
};
};
if (myDist < myShip.astDist){
myDist = (myDist + 2);
if (myDist > myShip.astDist){
myDist = myShip.astDist;
};
};
if (myDist > myShip.astDist){
myDist = (myDist - 2);
if (myDist < myShip.astDist){
myDist = myShip.astDist;
};
};
x = (myShip.x - (myDist * Math.sin(((Math.PI / 180) * myAngle))));
y = (myShip.y - (myDist * Math.cos(((Math.PI / 180) * myAngle))));
xs2 = (x - _local1);
ys2 = (y - _local2);
}
}
}//package obstacles
Section 41
//Debris (obstacles.Debris)
package obstacles {
import flash.display.*;
public class Debris extends Obstacle {
public var mcSprites:MovieClip;
private var sc:Number;
public function Debris(){
sc = ((Math.random() * 0.2) + 0.8);
super();
canDestroy = true;
hp = 5000;
size = (30 * sc);
MovieClip(mcSprites).scaleX = sc;
MovieClip(mcSprites).scaleY = sc;
MovieClip(mcSprites).gotoAndStop(Math.ceil((Math.random() * MovieClip(mcSprites).totalFrames)));
}
}
}//package obstacles
Section 42
//Gate (obstacles.Gate)
package obstacles {
import flash.display.*;
import main.*;
public class Gate extends MovieClip {
protected var sound:Boolean;// = false
protected var hit:MovieClip;
public function Gate(){
sound = false;
super();
gotoAndStop(Math.ceil((Math.random() * 30)));
}
public function runtime():void{
var _local1:*;
y = (y + 6);
y = Math.ceil(y);
if (y > 0){
nextFrame();
};
if (y > 750){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
};
if (currentLabel == "fire"){
_local1 = MovieClip(parent).player;
if (_local1.hit.hitTestObject(hit)){
_local1.damage(130);
};
if (!sound){
sound = true;
Shooter.sound.playSound("GateSound", 0.7, this, _local1, true);
};
} else {
sound = false;
};
}
}
}//package obstacles
Section 43
//GateBig (obstacles.GateBig)
package obstacles {
import flash.display.*;
public class GateBig extends Gate {
public var mcHit:MovieClip;
public function GateBig(){
addFrameScript(51, frame52, 60, frame61);
hit = MovieClip(mcHit);
}
function frame52(){
if (y > 700){
gotoAndStop((currentFrame - 1));
};
}
function frame61(){
gotoAndStop(1);
}
}
}//package obstacles
Section 44
//GateMedium (obstacles.GateMedium)
package obstacles {
import flash.display.*;
public class GateMedium extends Gate {
public var mcHit:MovieClip;
public function GateMedium(){
addFrameScript(51, frame52, 60, frame61);
hit = MovieClip(mcHit);
}
function frame52(){
if (y > 700){
gotoAndStop((currentFrame - 1));
};
}
function frame61(){
gotoAndStop(1);
}
}
}//package obstacles
Section 45
//GateSmall (obstacles.GateSmall)
package obstacles {
import flash.display.*;
public class GateSmall extends Gate {
public var mcHit:MovieClip;
public function GateSmall(){
addFrameScript(51, frame52, 60, frame61);
hit = MovieClip(mcHit);
}
function frame52(){
if (y > 700){
gotoAndStop((currentFrame - 1));
};
}
function frame61(){
gotoAndStop(1);
}
}
}//package obstacles
Section 46
//Obstacle (obstacles.Obstacle)
package obstacles {
import flash.events.*;
import flash.display.*;
public class Obstacle extends MovieClip {
protected var size:Number;// = 0
private var allRuntime:Array;
protected var hp:Number;
protected var ys:Number;// = 0
protected var canDestroy:Boolean;// = false
protected var xs:Number;// = 0
private var isDead:Boolean;// = false
protected var inField:Boolean;// = false
public function Obstacle(){
allRuntime = new Array();
isDead = false;
canDestroy = false;
inField = false;
size = 0;
xs = 0;
ys = 0;
super();
addEventListener("addedToStage", initEvent, false, 0, true);
rotation = (Math.random() * 360);
}
public function runtime():void{
var _local1:int;
if (!isDead){
_local1 = 0;
while (_local1 < allRuntime.length) {
allRuntime[_local1].nextFrame();
_local1++;
};
if (!MovieClip(parent).player.isDead){
testCollisions(MovieClip(parent).player);
};
_local1 = 0;
while (_local1 < MovieClip(parent).ships.length) {
if (testCollisions(MovieClip(parent).ships[_local1])){
break;
};
_local1++;
};
x = (x + xs);
y = (y + ys);
rotation = (rotation + (xs + ys));
if ((((((((x > -50)) && ((x < 650)))) && ((y > -50)))) && ((y < 750)))){
inField = true;
} else {
if (inField){
MovieClip(parent).doRuntime(this);
MovieClip(parent).obstaclesList.splice(MovieClip(parent).obstaclesList.indexOf(this), 1);
MovieClip(parent).removeChild(this);
};
};
};
}
private function getDist(_arg1:Object):Number{
return (Math.sqrt((Math.pow((x - _arg1.x), 2) + Math.pow((y - _arg1.y), 2))));
}
public function redirect(_arg1:Number, _arg2:Number){
ys = -((_arg2 * Math.cos(((Math.PI / 180) * _arg1))));
xs = -((_arg2 * Math.sin(((Math.PI / 180) * _arg1))));
x = (x + xs);
y = (y + ys);
}
public function touch(_arg1:Object):Boolean{
var _local2:Number;
if (getDist(_arg1) <= size){
while (getDist(_arg1) <= size) {
_arg1.backTrack();
};
damage(_arg1.damage);
_local2 = (((180 * Math.atan2((_arg1.y - y), (_arg1.x - x))) / Math.PI) - 90);
ys = (ys - (0.5 * Math.cos(((Math.PI / 180) * _local2))));
xs = (xs + (0.5 * Math.sin(((Math.PI / 180) * _local2))));
return (true);
//unresolved jump
};
return (false);
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
xs = ((Math.random() * 1.5) + 1);
ys = ((Math.random() * 1.5) + 1);
x = -50;
if (Math.random() > 0.5){
xs = (xs * -1);
x = (x + 700);
};
y = (Math.random() * 250);
}
public function kill():void{
isDead = true;
MovieClip(parent).spawn("ExplosionDebris", x, y);
MovieClip(parent).spawn("DebrisSmall", x, y);
MovieClip(parent).spawn("DebrisSmall", x, y);
MovieClip(parent).doRuntime(this);
MovieClip(parent).obstaclesList.splice(MovieClip(parent).obstaclesList.indexOf(this), 1);
MovieClip(parent).removeChild(this);
}
private function damage(_arg1:Number):void{
var _local2:Number;
if (canDestroy){
hp = (hp - _arg1);
if (hp <= 0){
_local2 = Math.ceil((Math.random() * 2));
MovieClip(parent).playSound(("MissileBoom" + String(_local2)), 0.6);
isDead = true;
MovieClip(parent).spawn("ExplosionDebris", x, y);
MovieClip(parent).spawn("DebrisSmall", x, y);
MovieClip(parent).spawn("DebrisSmall", x, y);
MovieClip(parent).doRuntime(this);
MovieClip(parent).obstaclesList.splice(MovieClip(parent).obstaclesList.indexOf(this), 1);
MovieClip(parent).removeChild(this);
};
};
}
private function testObstacleCollisions(_arg1:Object):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = (getDist(_arg1) * 1.5);
if (_local2 <= (size * 1.5)){
_local3 = ((_arg1.x - x) / _local2);
_local4 = ((_arg1.y - y) / _local2);
_arg1.x = (x + (_local3 * (size * 1.5)));
_arg1.y = (y + (_local4 * (size * 1.5)));
_local5 = (Math.abs(xs) + Math.abs(ys));
_local6 = (Math.abs(_arg1.xs) + Math.abs(_arg1.ys));
_local7 = (((180 * Math.atan2((_arg1.y - y), (_arg1.x - x))) / Math.PI) + 90);
redirect(_local7, _local6);
_arg1.redirect((_local7 + 180), _local5);
return (true);
};
return (false);
}
private function testCollisions(_arg1:Object):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:Number;
_local2 = (getDist(_arg1) * 1.5);
if ((((_arg1 == MovieClip(parent).player)) || (!(_arg1.boss)))){
if (_local2 <= (size * 1.5)){
_local3 = ((_arg1.x - x) / _local2);
_local4 = ((_arg1.y - y) / _local2);
_arg1.x = (x + (_local3 * (size * 1.5)));
_arg1.y = (y + (_local4 * (size * 1.5)));
if ((_arg1 == MovieClip(parent).player)){
_arg1.collision = true;
} else {
_arg1.directDamage((Math.abs(xs) + Math.abs(ys)));
};
_local5 = MovieClip(parent).spawn("ExpCollisionSpark", (x + (_local3 * (size * 0.6))), (y + (_local4 * (size * 0.6))));
_local6 = (Math.atan2((_arg1.y - y), (_arg1.x - x)) / Math.PI);
_local5.rotation = (((_local6 * 180) + (Math.random() * 30)) - (Math.random() * 30));
if (((!(canDestroy)) && ((hp == 33)))){
_arg1.bigDamage(this);
};
return (true);
};
} else {
if (_local2 <= (size * 5)){
damage(hp);
_arg1.directDamage(0);
return (true);
};
};
return (false);
}
public function doRuntime(_arg1):void{
if ((allRuntime.indexOf(_arg1) == -1)){
allRuntime.push(_arg1);
} else {
allRuntime.splice(allRuntime.indexOf(_arg1), 1);
};
}
}
}//package obstacles
Section 47
//Wall (obstacles.Wall)
package obstacles {
import flash.display.*;
public class Wall extends MovieClip {
private var gameLink;
public var lineBottom:MovieClip;
private var speed:Number;// = 6
public var spawnTurret:Boolean;// = false
private var needFrame:Boolean;// = false
private var level;
public var lineTop:MovieClip;
public var spawnGate:Boolean;// = false
private var walls:Array;
public function Wall(_arg1, _arg2, _arg3:int, _arg4:Boolean){
needFrame = false;
speed = 6;
walls = new Array();
spawnGate = false;
spawnTurret = false;
super();
addFrameScript(1, frame2, 16, frame17, 17, frame18, 18, frame19, 29, frame30, 35, frame36);
_arg1.doRuntime(this);
gameLink = _arg1;
level = _arg2;
y = (_arg3 * -200);
getFrame();
cacheAsBitmap = true;
if (_arg4){
y = (y + 700);
};
}
public function runtime():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:int;
if (needFrame){
getFrame();
};
if (speed){
y = (y + speed);
y = Math.ceil(y);
if (y > 900){
y = (y - 1000);
gotoAndStop(1);
needFrame = true;
};
_local1 = MovieClip(parent).player;
if (!_local1.isDead){
_local3 = 0;
while (_local3 < walls.length) {
_local2 = walls[_local3];
if ((((_local1.y < (_local2.y + y))) && (_local2.hitTestPoint(_local1.x, (_local1.y + (_local1.hit.height / 2)))))){
_local1.y = (((_local2.y + y) - (_local2.height / 2)) - (_local1.hit.height / 2));
collision(((_local1.x - (_local1.hit.width / 4)) + ((Math.random() * _local1.hit.width) / 2)), (_local1.y + (_local1.hit.height / 3)), 90);
if (_local1.ys > speed){
_local1.ys = speed;
};
};
if ((((_local1.y > (_local2.y + y))) && (_local2.hitTestPoint(_local1.x, (_local1.y - (_local1.hit.height / 2)))))){
_local1.y = (((_local2.y + y) + (_local2.height / 2)) + (_local1.hit.height / 2));
collision(((_local1.x - (_local1.hit.width / 4)) + ((Math.random() * _local1.hit.width) / 2)), (_local1.y - (_local1.hit.height / 3)), 270);
if (_local1.ys < 0){
_local1.ys = 0;
};
};
if ((((_local1.x < _local2.x)) && (_local2.hitTestPoint((_local1.x + (_local1.hit.width / 2)), _local1.y)))){
_local1.x = ((_local2.x - (_local2.width / 2)) - (_local1.hit.width / 2));
collision((_local1.x + (_local1.hit.width / 3)), ((_local1.y - (_local1.hit.height / 4)) + ((Math.random() * _local1.hit.height) / 2)), 0);
if (_local1.xs > 0){
_local1.xs = 0;
};
};
if ((((_local1.x > _local2.x)) && (_local2.hitTestPoint((_local1.x - (_local1.hit.width / 2)), _local1.y)))){
_local1.x = ((_local2.x + (_local2.width / 2)) + (_local1.hit.width / 2));
collision((_local1.x - (_local1.hit.width / 3)), ((_local1.y - (_local1.hit.height / 4)) + ((Math.random() * _local1.hit.height) / 2)), 180);
if (_local1.xs < 0){
_local1.xs = 0;
};
};
_local3++;
};
};
};
}
private function collision(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:*;
_local4 = MovieClip(parent).spawn("ExpCollisionSpark", _arg1, _arg2);
_local4.rotation = ((_arg3 + (Math.random() * 30)) - (Math.random() * 30));
MovieClip(parent).player.collision = true;
}
function frame18(){
lineTop.alpha = 1;
gotoAndStop("m");
}
function frame17(){
lineBottom.alpha = 1;
gotoAndStop("m");
}
function frame19(){
gotoAndStop((currentFrame + Math.floor((Math.random() * 10))));
}
function frame2(){
gotoAndStop((currentFrame + Math.floor((Math.random() * 10))));
}
public function newWall(_arg1:Object):void{
walls.push(_arg1);
_arg1.visible = false;
MovieClip(parent).obstaclesList.push(_arg1);
}
function frame36(){
gotoAndStop((currentFrame + Math.floor((Math.random() * 5))));
}
function frame30(){
gotoAndStop((currentFrame + Math.floor((Math.random() * 5))));
}
private function getFrame():void{
var _local1:String;
spawnGate = false;
spawnTurret = false;
while (walls.length) {
MovieClip(parent).obstaclesList.splice(MovieClip(parent).obstaclesList.indexOf(walls.shift()), 1);
};
needFrame = false;
gotoAndStop("e");
if (level.base.length){
_local1 = level.base.charAt();
switch (_local1){
case "g":
spawnGate = true;
level.base = level.base.substring(1);
gotoAndStop(level.base.charAt());
level.base = level.base.substring(1);
break;
case "t":
spawnTurret = true;
level.base = level.base.substring(1);
gotoAndStop(level.base.charAt());
level.base = level.base.substring(1);
break;
case "x":
x = -1000;
break;
case "�":
speed = 0;
gameLink.doRuntime(this);
MovieClip(parent).removeChild(this);
gotoAndStop("x");
break;
default:
gotoAndStop(_local1);
level.base = level.base.substring(1);
break;
};
};
}
}
}//package obstacles
Section 48
//Background (sfx.Background)
package sfx {
import flash.display.*;
import flash.geom.*;
public class Background extends MovieClip {
private var bg:MovieClip;
private var speed:Number;// = 1.2
public var mcBg:MovieClip;
public function Background(){
speed = 1.2;
super();
this.scrollRect = new Rectangle(0, 0, 600, 700);
bg = MovieClip(mcBg);
}
public function runtime():void{
bg.y = (bg.y + speed);
if (bg.y >= 1400){
bg.y = (bg.y - 1400);
};
}
}
}//package sfx
Section 49
//Shield (sfx.Shield)
package sfx {
import flash.events.*;
import flash.display.*;
public class Shield extends MovieClip {
public var color:String;
private var runList:Array;
public function Shield(){
runList = new Array();
super();
addEventListener("addedToStage", initEvent, false, 0, true);
}
public function runtime():void{
var _local1:Array;
var _local2:int;
_local1 = runList.slice(0);
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2].nextFrame();
_local2++;
};
}
public function setColor(_arg1:String):void{
color = _arg1;
gotoAndStop(color);
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
MovieClip(parent.parent).doRuntime(this);
}
public function hit(_arg1:Number):void{
var _local2:Absorb;
_local2 = new Absorb();
_local2.rotation = _arg1;
_local2.gotoAndStop(color);
addChild(_local2);
doRuntime(_local2);
}
public function doRuntime(_arg1:Object):void{
if ((runList.indexOf(_arg1) == -1)){
runList.push(_arg1);
} else {
runList.splice(runList.indexOf(_arg1), 1);
};
}
}
}//package sfx
Section 50
//Star (sfx.Star)
package sfx {
import flash.display.*;
public class Star extends MovieClip {
private var speed:Number;
public function Star(){
resetPosition();
y = (Math.random() * 700);
}
public function runtime():void{
y = (y + speed);
if (y >= 705){
resetPosition();
};
}
private function resetPosition():void{
gotoAndStop(Math.ceil((Math.random() * 5)));
speed = ((Math.random() * 2.5) + 2.5);
x = (Math.random() * 600);
y = -5;
}
}
}//package sfx
Section 51
//bonusIndicator_6 (shooter_fla.bonusIndicator_6)
package shooter_fla {
import flash.display.*;
import flash.text.*;
public dynamic class bonusIndicator_6 extends MovieClip {
public var bar:MovieClip;
public var bonus:int;
public var textBox:TextField;
public function bonusIndicator_6(){
addFrameScript(0, frame1);
}
function frame1(){
bonus = -1;
}
}
}//package shooter_fla
Section 52
//boss01destroy_108 (shooter_fla.boss01destroy_108)
package shooter_fla {
import flash.display.*;
public dynamic class boss01destroy_108 extends MovieClip {
public function boss01destroy_108(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 53
//boss01wingsAnim_105 (shooter_fla.boss01wingsAnim_105)
package shooter_fla {
import flash.display.*;
public dynamic class boss01wingsAnim_105 extends MovieClip {
public function boss01wingsAnim_105(){
addFrameScript(0, frame1, 24, frame25, 49, frame50);
}
function frame1(){
stop();
}
function frame25(){
stop();
}
function frame50(){
gotoAndStop(1);
}
}
}//package shooter_fla
Section 54
//boss03destroy_120 (shooter_fla.boss03destroy_120)
package shooter_fla {
import flash.display.*;
public dynamic class boss03destroy_120 extends MovieClip {
public function boss03destroy_120(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 55
//boss04destroy_124 (shooter_fla.boss04destroy_124)
package shooter_fla {
import flash.display.*;
public dynamic class boss04destroy_124 extends MovieClip {
public function boss04destroy_124(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 56
//boss04spin_122 (shooter_fla.boss04spin_122)
package shooter_fla {
import flash.display.*;
public dynamic class boss04spin_122 extends MovieClip {
public var spinner:MovieClip;
}
}//package shooter_fla
Section 57
//boss05destroy_127 (shooter_fla.boss05destroy_127)
package shooter_fla {
import flash.display.*;
public dynamic class boss05destroy_127 extends MovieClip {
public function boss05destroy_127(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 58
//bossHp_8 (shooter_fla.bossHp_8)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class bossHp_8 extends MovieClip {
public var boss:Object;
public var mcBar:MovieClip;
public function bossHp_8(){
addFrameScript(0, frame1);
}
public function runtime(_arg1:Number=1):void{
if (boss){
alpha = (alpha + (((_arg1 * 1) - alpha) / 5));
mcBar.width = (boss.health * 400);
} else {
alpha = (alpha - (alpha / 5));
mcBar.width = 0;
};
}
function frame1(){
boss = null;
alpha = 0;
stop();
}
}
}//package shooter_fla
Section 59
//brainOxide_162 (shooter_fla.brainOxide_162)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class brainOxide_162 extends MovieClip {
public function brainOxide_162(){
addFrameScript(0, frame1, 1, frame2, 189, frame190);
}
function frame1(){
gotoAndPlay("start");
}
public function clickFunc(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.brainoxide.com"), "_blank");
}
function frame2(){
stage.addEventListener("mouseDown", clickFunc, false, 0, true);
}
function frame190(){
stage.removeEventListener("mouseDown", clickFunc);
MovieClip(root).gotoAndStop("game");
}
}
}//package shooter_fla
Section 60
//button01_17 (shooter_fla.button01_17)
package shooter_fla {
import flash.display.*;
import flash.text.*;
public dynamic class button01_17 extends MovieClip {
public var textBox:TextField;
}
}//package shooter_fla
Section 61
//button02_16 (shooter_fla.button02_16)
package shooter_fla {
import flash.display.*;
import flash.text.*;
public dynamic class button02_16 extends MovieClip {
public var textBox:TextField;
}
}//package shooter_fla
Section 62
//buttonDelete_100 (shooter_fla.buttonDelete_100)
package shooter_fla {
import flash.display.*;
public dynamic class buttonDelete_100 extends MovieClip {
public function buttonDelete_100(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 63
//bx_167 (shooter_fla.bx_167)
package shooter_fla {
import flash.display.*;
public dynamic class bx_167 extends MovieClip {
public function bx_167(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package shooter_fla
Section 64
//container_3 (shooter_fla.container_3)
package shooter_fla {
import flash.display.*;
public dynamic class container_3 extends MovieClip {
public function container_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 65
//crate_144 (shooter_fla.crate_144)
package shooter_fla {
import flash.display.*;
public dynamic class crate_144 extends MovieClip {
public function crate_144(){
addFrameScript(0, frame1);
}
function frame1(){
visible = ((Math.random() > 0.5)) ? true : false;
}
}
}//package shooter_fla
Section 66
//debris_58 (shooter_fla.debris_58)
package shooter_fla {
import flash.display.*;
public dynamic class debris_58 extends MovieClip {
public var ys:Number;
public var speed:Number;
public var xs:Number;
public var rotSide:Number;
public function debris_58(){
addFrameScript(0, frame1);
}
public function runtime():void{
x = (x + xs);
y = (y + ys);
rotation = (rotation + (speed * rotSide));
if (((((((((x + parent.x) < -10)) || (((x + parent.x) > 610)))) || (((y + parent.y) < -10)))) || (((y + parent.y) > 710)))){
parent.removeChild(this);
};
}
function frame1(){
speed = (3 + (Math.random() * 4));
rotation = (Math.random() * 360);
if (rotation > 180){
ys = (speed * Math.cos(((Math.PI / 180) * rotation)));
xs = (speed * Math.sin(((Math.PI / 180) * rotation)));
} else {
ys = (speed * Math.cos(((Math.PI / 180) * rotation)));
xs = (speed * Math.sin(((Math.PI / 180) * rotation)));
};
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
scaleX = (scaleX * ((Math.random() * 0.4) + 0.6));
scaleY = scaleX;
rotSide = ((Math.random() > 0.5)) ? 3 : -3;
}
}
}//package shooter_fla
Section 67
//double01dead_143 (shooter_fla.double01dead_143)
package shooter_fla {
import flash.display.*;
public dynamic class double01dead_143 extends MovieClip {
public var mcMissileTarget:MovieClip;
public var mcGun1:MovieClip;
public var mcGear2:MovieClip;
public var mcGear1:MovieClip;
public function double01dead_143(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(mcGear1).rotation = (Math.random() * 360);
MovieClip(mcGear2).rotation = (Math.random() * 360);
visible = ((Math.random() > 0.5)) ? true : false;
}
}
}//package shooter_fla
Section 68
//explosionRandom_109 (shooter_fla.explosionRandom_109)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class explosionRandom_109 extends MovieClip {
public var time:int;
public function explosionRandom_109(){
addFrameScript(0, frame1);
}
public function runtime():void{
time++;
if (!time){
MovieClip(parent.parent.parent).spawn("ExplosionSmall", (x + parent.parent.x), (y + parent.parent.y));
};
if (time == 45){
time = (-(Math.random()) * 40);
};
}
function frame1(){
MovieClip(parent.parent).doRuntime(this);
time = (-(Math.random()) * 30);
}
}
}//package shooter_fla
Section 69
//fadeScreen_18 (shooter_fla.fadeScreen_18)
package shooter_fla {
import flash.display.*;
public dynamic class fadeScreen_18 extends MovieClip {
public var action:Function;
public function fadeScreen_18(){
addFrameScript(0, frame1, 1, frame2, 7, frame8, 38, frame39, 42, frame43, 59, frame60, 90, frame91);
}
function frame91(){
MovieClip(root).gotoAndStop("logo");
}
function frame1(){
mouseEnabled = false;
}
function frame8(){
prevFrame();
}
function frame2(){
stop();
}
function frame39(){
if (Boolean(action)){
action();
action = null;
};
}
function frame43(){
prevFrame();
}
function frame60(){
gotoAndStop("empty");
}
}
}//package shooter_fla
Section 70
//fire_49 (shooter_fla.fire_49)
package shooter_fla {
import flash.display.*;
public dynamic class fire_49 extends MovieClip {
public var ys:Number;
public var smoke:MovieClip;
public var xs:Number;
public var rot:Number;
public function fire_49(){
addFrameScript(0, frame1);
}
public function runtime():void{
if ((((alpha > 0)) && ((scaleX > 0)))){
x = (x + xs);
y = (y + ys);
rotation = (rotation + rot);
xs = (xs / 1.5);
ys = (ys / 1.5);
rot = (rot / 1.5);
scaleX = (scaleX - 0.03);
scaleY = (scaleY - 0.03);
alpha = (alpha - 0.05);
MovieClip(smoke).nextFrame();
};
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * 3)));
scaleX = ((Math.random() * 0.4) + 0.8);
scaleY = scaleX;
alpha = ((Math.random() * 0.4) + 0.8);
rotation = (Math.random() * 360);
rot = ((Math.random() * 5) - (Math.random() * 5));
xs = ((Math.random() * 5) - (Math.random() * 5));
ys = ((Math.random() * 5) - (Math.random() * 5));
}
}
}//package shooter_fla
Section 71
//fire01_51 (shooter_fla.fire01_51)
package shooter_fla {
import flash.display.*;
public dynamic class fire01_51 extends MovieClip {
public function fire01_51(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package shooter_fla
Section 72
//fire03_52 (shooter_fla.fire03_52)
package shooter_fla {
import flash.display.*;
public dynamic class fire03_52 extends MovieClip {
public function fire03_52(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package shooter_fla
Section 73
//gameFadeIn_169 (shooter_fla.gameFadeIn_169)
package shooter_fla {
import flash.display.*;
public dynamic class gameFadeIn_169 extends MovieClip {
public function gameFadeIn_169(){
addFrameScript(0, frame1, 30, frame31);
}
function frame1(){
mouseEnabled = false;
mouseChildren = false;
}
function frame31(){
stop();
}
}
}//package shooter_fla
Section 74
//gun_23 (shooter_fla.gun_23)
package shooter_fla {
import flash.display.*;
public dynamic class gun_23 extends MovieClip {
public function gun_23(){
addFrameScript(1, frame2, 4, frame5);
}
function frame5(){
gotoAndStop(1);
}
function frame2(){
prevFrame();
}
}
}//package shooter_fla
Section 75
//invisible_24 (shooter_fla.invisible_24)
package shooter_fla {
import flash.display.*;
public dynamic class invisible_24 extends MovieClip {
public function invisible_24(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package shooter_fla
Section 76
//MainTimeline (shooter_fla.MainTimeline)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var allFeatures:Number;
public var myURL:String;
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
allFeatures = 0;
myURL = stage.loaderInfo.url;
if (((!((myURL.indexOf("brainoxide") == -1))) || (!((myURL.indexOf("ungrounded") == -1))))){
MovieClip(root).allFeatures = 2;
} else {
if (myURL.indexOf("file:///") != -1){
MovieClip(root).allFeatures = 1;
};
};
if (myURL.indexOf("armorgames") == -1){
MochiBot.track(this, "ec8d8da8");
};
}
}
}//package shooter_fla
Section 77
//mine01Light_69 (shooter_fla.mine01Light_69)
package shooter_fla {
import flash.display.*;
public dynamic class mine01Light_69 extends MovieClip {
public function mine01Light_69(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 78
//mine02dmgField_79 (shooter_fla.mine02dmgField_79)
package shooter_fla {
import flash.display.*;
public dynamic class mine02dmgField_79 extends MovieClip {
public function mine02dmgField_79(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
alpha = 0;
gotoAndStop(1);
}
}
}//package shooter_fla
Section 79
//mine02dmgRay_80 (shooter_fla.mine02dmgRay_80)
package shooter_fla {
import flash.display.*;
public dynamic class mine02dmgRay_80 extends MovieClip {
public function mine02dmgRay_80(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
rotation = (Math.random() * 360);
}
}
}//package shooter_fla
Section 80
//mine02light_82 (shooter_fla.mine02light_82)
package shooter_fla {
import flash.display.*;
public dynamic class mine02light_82 extends MovieClip {
public function mine02light_82(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 81
//missileLock01_63 (shooter_fla.missileLock01_63)
package shooter_fla {
import flash.display.*;
public dynamic class missileLock01_63 extends MovieClip {
public function missileLock01_63(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package shooter_fla
Section 82
//pauseMenu_10 (shooter_fla.pauseMenu_10)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class pauseMenu_10 extends MovieClip {
public var active:Boolean;
public var mcMenu:PauseSettings;
public var bg:MovieClip;
public var menu:MovieClip;
public var speed:Number;
public var mcBg:MovieClip;
public var canClick:Boolean;
public var canRuntime:Boolean;
public function pauseMenu_10(){
addFrameScript(0, frame1);
}
public function runtime(_arg1:Boolean):void{
if (_arg1){
bg.alpha = (bg.alpha + ((1 - bg.alpha) / speed));
menu.y = (menu.y + ((680 - menu.y) / speed));
if (canRuntime){
menu.runtime();
};
} else {
bg.alpha = (bg.alpha - (bg.alpha / speed));
menu.y = (menu.y + ((1175 - menu.y) / speed));
};
if (canRuntime){
canClick = true;
};
}
public function clicked(_arg1:MouseEvent):void{
if (canClick){
menu.click();
};
}
function frame1(){
active = false;
bg = MovieClip(mcBg);
canRuntime = true;
canClick = true;
menu = MovieClip(mcMenu);
speed = 2.5;
bg.alpha = 0;
}
}
}//package shooter_fla
Section 83
//ray_54 (shooter_fla.ray_54)
package shooter_fla {
import flash.display.*;
public dynamic class ray_54 extends MovieClip {
public function ray_54(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
scaleX = (0.8 + (Math.random() * 0.4));
scaleY = (scaleY + (Math.random() * 0.4));
rotation = (Math.random() * 360);
alpha = (0.6 + (Math.random() * 0.4));
}
function frame2(){
stop();
}
}
}//package shooter_fla
Section 84
//rayBig_90 (shooter_fla.rayBig_90)
package shooter_fla {
import flash.display.*;
public dynamic class rayBig_90 extends MovieClip {
public function rayBig_90(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
if ((Math.random() > 0.5)){
scaleY = (scaleY * -1);
//unresolved jump
};
if ((Math.random() > 0.5)){
scaleX = (scaleX * -1);
//unresolved jump
};
}
}
}//package shooter_fla
Section 85
//rayMedium_92 (shooter_fla.rayMedium_92)
package shooter_fla {
import flash.display.*;
public dynamic class rayMedium_92 extends MovieClip {
public function rayMedium_92(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
if ((Math.random() > 0.5)){
scaleY = (scaleY * -1);
//unresolved jump
};
if ((Math.random() > 0.5)){
scaleX = (scaleX * -1);
//unresolved jump
};
}
}
}//package shooter_fla
Section 86
//raySmall_94 (shooter_fla.raySmall_94)
package shooter_fla {
import flash.display.*;
public dynamic class raySmall_94 extends MovieClip {
public function raySmall_94(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
if ((Math.random() > 0.5)){
scaleY = (scaleY * -1);
//unresolved jump
};
if ((Math.random() > 0.5)){
scaleX = (scaleX * -1);
//unresolved jump
};
}
}
}//package shooter_fla
Section 87
//ringAnim_47 (shooter_fla.ringAnim_47)
package shooter_fla {
import flash.display.*;
public dynamic class ringAnim_47 extends MovieClip {
public function ringAnim_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package shooter_fla
Section 88
//ship_25 (shooter_fla.ship_25)
package shooter_fla {
import flash.display.*;
public dynamic class ship_25 extends MovieClip {
public var spin2:MovieClip;
public var spin1:MovieClip;
}
}//package shooter_fla
Section 89
//side01dead_145 (shooter_fla.side01dead_145)
package shooter_fla {
import flash.display.*;
public dynamic class side01dead_145 extends MovieClip {
public var mcGear2:MovieClip;
public var mcGear1:MovieClip;
public function side01dead_145(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(mcGear1).rotation = (Math.random() * 360);
MovieClip(mcGear2).rotation = (Math.random() * 360);
visible = ((Math.random() > 0.5)) ? true : false;
}
}
}//package shooter_fla
Section 90
//single01dead_146 (shooter_fla.single01dead_146)
package shooter_fla {
import flash.display.*;
public dynamic class single01dead_146 extends MovieClip {
public var mcMissileTarget:MovieClip;
public function single01dead_146(){
addFrameScript(0, frame1);
}
function frame1(){
visible = ((Math.random() > 0.5)) ? true : false;
}
}
}//package shooter_fla
Section 91
//smoke_50 (shooter_fla.smoke_50)
package shooter_fla {
import flash.display.*;
public dynamic class smoke_50 extends MovieClip {
public function smoke_50(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
scaleX = (scaleX + (Math.random() * 0.4));
scaleY = scaleX;
stop();
}
function frame20(){
stop();
}
}
}//package shooter_fla
Section 92
//spark_132 (shooter_fla.spark_132)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class spark_132 extends MovieClip {
public var rot:Number;
public function spark_132(){
addFrameScript(0, frame1, 1, frame2, 12, frame13);
}
function frame1(){
rot = rotation;
MovieClip(parent.parent).doRuntime(this);
nextFrame();
}
function frame13(){
gotoAndStop(2);
}
function frame2(){
rotation = ((rot + (Math.random() * 30)) - (Math.random() * 30));
gotoAndStop((Math.ceil((Math.random() * 6)) + 1));
}
}
}//package shooter_fla
Section 93
//spark_53 (shooter_fla.spark_53)
package shooter_fla {
import flash.display.*;
public dynamic class spark_53 extends MovieClip {
public function spark_53(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
scaleX = (0.8 + (Math.random() * 0.4));
scaleY = (0.8 + (Math.random() * 0.4));
rotation = (Math.random() * 360);
gotoAndPlay(Math.ceil((Math.random() * 4)));
stop();
}
}
}//package shooter_fla
Section 94
//spark01_30 (shooter_fla.spark01_30)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class spark01_30 extends MovieClip {
public function spark01_30(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
MovieClip(parent).doRuntime(this);
stop();
}
function frame1(){
MovieClip(parent).doRuntime(this);
scaleX = ((Math.random() * 0.4) + 0.8);
scaleY = ((Math.random() * 0.4) + 0.8);
rotation = (rotation + ((Math.random() * 80) - (Math.random() * 80)));
}
}
}//package shooter_fla
Section 95
//spawnGateBig_149 (shooter_fla.spawnGateBig_149)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class spawnGateBig_149 extends MovieClip {
public function spawnGateBig_149(){
addFrameScript(0, frame1);
}
function frame1(){
if (MovieClip(parent).spawnGate){
MovieClip(parent.parent).spawnGate("Big", x, (y + parent.y));
};
MovieClip(parent).removeChild(this);
}
}
}//package shooter_fla
Section 96
//spawnGateMedium_148 (shooter_fla.spawnGateMedium_148)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class spawnGateMedium_148 extends MovieClip {
public function spawnGateMedium_148(){
addFrameScript(0, frame1);
}
function frame1(){
if (MovieClip(parent).spawnGate){
MovieClip(parent.parent).spawnGate("Medium", x, (y + parent.y));
};
MovieClip(parent).removeChild(this);
}
}
}//package shooter_fla
Section 97
//spawnGateSmall_150 (shooter_fla.spawnGateSmall_150)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class spawnGateSmall_150 extends MovieClip {
public function spawnGateSmall_150(){
addFrameScript(0, frame1);
}
function frame1(){
if (MovieClip(parent).spawnGate){
MovieClip(parent.parent).spawnGate("Small", x, (y + parent.y));
};
MovieClip(parent).removeChild(this);
}
}
}//package shooter_fla
Section 98
//spawnTurret_141 (shooter_fla.spawnTurret_141)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class spawnTurret_141 extends MovieClip {
public var gun;
public function spawnTurret_141(){
addFrameScript(0, frame1);
}
function frame1(){
if (MovieClip(parent).spawnTurret){
gun = MovieClip(parent.parent).spawn("enemies::Turret", x, (y + parent.y));
gun.rotation = rotation;
};
MovieClip(parent).removeChild(this);
}
}
}//package shooter_fla
Section 99
//tractorBeam_20 (shooter_fla.tractorBeam_20)
package shooter_fla {
import flash.display.*;
public dynamic class tractorBeam_20 extends MovieClip {
public var maskWidth;
public var mcMask:MovieClip;
public function tractorBeam_20(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
}
function frame2(){
mcMask.width = maskWidth;
}
}
}//package shooter_fla
Section 100
//turretCanon_88 (shooter_fla.turretCanon_88)
package shooter_fla {
import flash.display.*;
public dynamic class turretCanon_88 extends MovieClip {
public var gun:MovieClip;
}
}//package shooter_fla
Section 101
//tutorials_5 (shooter_fla.tutorials_5)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import main.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class tutorials_5 extends MovieClip {
public var keys:String;
public var txt:TextField;
public var arr:Array;
public function tutorials_5(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
alpha = 0;
stop();
}
function frame2(){
arr = Shooter.key.getKeys();
keys = "";
keys = (keys + arr[MovieClip(parent.parent.parent).allData.pref["up"]]);
keys = (keys + arr[MovieClip(parent.parent.parent).allData.pref["left"]]);
keys = (keys + arr[MovieClip(parent.parent.parent).allData.pref["down"]]);
keys = (keys + arr[MovieClip(parent.parent.parent).allData.pref["right"]]);
txt.text = (("USE " + keys.toUpperCase()) + " OR THE ARROW KEYS TO MOVE.\nHOLD DOWN THE SPACE BAR OR THE LEFT\nMOUSE BUTTON TO FIRE YOUR WEAPONS.");
}
public function showTut(_arg1:int):int{
gotoAndStop((_arg1 + 1));
if ((((((_arg1 == 1)) || ((_arg1 == 3)))) || ((_arg1 == 6)))){
return (8);
};
if ((((_arg1 == 2)) || ((_arg1 == 7)))){
return (5);
};
if ((((((_arg1 == 4)) || ((_arg1 == 5)))) || ((_arg1 == 8)))){
return (7);
};
return (5);
}
}
}//package shooter_fla
Section 102
//wallCollision_142 (shooter_fla.wallCollision_142)
package shooter_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class wallCollision_142 extends MovieClip {
public function wallCollision_142(){
addFrameScript(0, frame1);
}
public function touch(_arg1:Object):Boolean{
if (hitTestPoint(_arg1.x, _arg1.y, true)){
while (hitTestPoint(_arg1.x, _arg1.y, true)) {
_arg1.backTrack();
};
_arg1.backTrack();
return (true);
//unresolved jump
};
return (false);
}
function frame1(){
MovieClip(parent).newWall(this);
}
}
}//package shooter_fla
Section 103
//KeyManager (tools.KeyManager)
package tools {
import flash.events.*;
import flash.display.*;
public class KeyManager extends MovieClip {
private var allKeys:Array;
private var controls:Array;
public function KeyManager(){
allKeys = new Array();
controls = new Array();
super();
addEventListener("addedToStage", initEvent, false, 0, true);
}
public function control(_arg1:String):Boolean{
return (allKeys[controls[_arg1]]);
}
private function initEvent(_arg1:Event):void{
removeEventListener("addedToStage", initEvent);
stage.addEventListener("keyDown", keyDownEvent, false, 0, true);
stage.addEventListener("keyUp", keyUpEvent, false, 0, true);
}
private function keyDownEvent(_arg1:KeyboardEvent):void{
allKeys[_arg1.keyCode] = true;
}
public function getKeys():Array{
var _local1:Array;
_local1 = new Array();
_local1[65] = "A";
_local1[66] = "B";
_local1[67] = "C";
_local1[68] = "D";
_local1[69] = "E";
_local1[70] = "F";
_local1[71] = "G";
_local1[72] = "H";
_local1[73] = "I";
_local1[74] = "J";
_local1[75] = "K";
_local1[76] = "L";
_local1[77] = "M";
_local1[78] = "N";
_local1[79] = "O";
_local1[80] = "P";
_local1[81] = "Q";
_local1[82] = "R";
_local1[83] = "S";
_local1[84] = "T";
_local1[85] = "U";
_local1[86] = "V";
_local1[87] = "W";
_local1[88] = "X";
_local1[89] = "Y";
_local1[90] = "Z";
return (_local1);
}
private function keyUpEvent(_arg1:KeyboardEvent):void{
allKeys[_arg1.keyCode] = false;
}
public function down(_arg1:int):Boolean{
return (allKeys[_arg1]);
}
public function setControl(_arg1:String, _arg2:int):void{
controls[_arg1] = _arg2;
}
public function clearKeys(_arg1=null):void{
allKeys = new Array();
}
}
}//package tools
Section 104
//MgrMusic (tools.MgrMusic)
package tools {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.utils.*;
public class MgrMusic extends MovieClip {
private var channel:SoundChannel;
private var volume:Number;// = 1
private var sndTransform:SoundTransform;
private var song:Sound;
private var canPlay:Boolean;// = true
private var paused:Boolean;// = false
private var realVolume:Number;// = 1
private var muted:Number;// = 1
private var fade:Number;// = 0
private var current:Number;
private var forceVol:Number;// = 0.85
public function MgrMusic(){
fade = 0;
paused = false;
muted = 1;
realVolume = 1;
volume = 1;
current = Math.ceil((Math.random() * 3));
forceVol = 0.85;
canPlay = true;
super();
addEventListener("enterFrame", runtime, false, 0, true);
}
private function runtime(_arg1:Event):void{
muted = (Number(MovieClip(parent).allData.pref.music)) ? 1 : 0;
if (((((!(muted)) && ((realVolume == 0)))) && (canPlay))){
realVolume = 1;
};
volume = (volume + ((((realVolume * muted) * forceVol) - volume) / 5));
if (sndTransform){
sndTransform.volume = volume;
if (channel){
channel.soundTransform = sndTransform;
};
};
if ((((volume <= 0.1)) && (fade))){
fade = 0;
if (channel){
channel.stop();
};
};
}
public function fadeOut():void{
fade = 1;
realVolume = 0;
}
public function goBoss():void{
if (channel){
channel.stop();
};
volume = (forceVol * muted);
realVolume = volume;
song = new BossSong();
channel = song.play(0, 99999);
sndTransform = new SoundTransform();
}
public function goMenu():void{
canPlay = false;
realVolume = 0.65;
}
public function goLevel():void{
var _local1:Class;
canPlay = true;
if (channel){
channel.stop();
};
volume = (forceVol * muted);
realVolume = volume;
_local1 = Class(getDefinitionByName(("Song" + current)));
song = new (_local1);
channel = song.play(0, 99999);
sndTransform = new SoundTransform();
sndTransform.volume = volume;
channel.soundTransform = sndTransform;
current++;
if (current == 4){
current = 1;
};
}
}
}//package tools
Section 105
//MgrSound (tools.MgrSound)
package tools {
import flash.events.*;
import flash.display.*;
public class MgrSound extends MovieClip {
private var volume:Number;// = 1
private var paused:Boolean;// = false
private var sounds:Array;
private var realVolume:Number;// = 1
private var muted:Number;// = 1
private var fade:Number;// = 1
public function MgrSound(){
fade = 1;
paused = false;
muted = 1;
sounds = new Array();
realVolume = 1;
volume = 1;
super();
addEventListener("enterFrame", runtime, false, 0, true);
sounds = new Array();
}
private function runtime(_arg1:Event):void{
var _local2:Array;
var _local3:int;
muted = (Number(MovieClip(parent).allData.pref.sound)) ? 1 : 0;
if (!paused){
volume = (volume + (((fade * realVolume) - volume) / 5));
volume = (volume * muted);
if ((((volume <= 0.01)) && (!(fade)))){
clearAll();
fade = 1;
};
_local2 = sounds.slice(0);
_local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3].runtime(volume);
_local3++;
};
};
}
public function clearAll():void{
while (sounds.length) {
sounds[0].clear();
};
}
public function stopSound(_arg1:String, _arg2:Object):void{
var _local3:Array;
var _local4:int;
_local3 = sounds.slice(0);
_local4 = 0;
while (_local4 < _local3.length) {
if (_local3[_local4].testOrigin(_arg1, _arg2)){
_local3[_local4].clear();
};
_local4++;
};
}
public function mute(_arg1:Boolean=true):void{
realVolume = (_arg1) ? 1 : 0;
}
public function fadeOut():void{
fade = 0;
}
public function playSound(_arg1:String, _arg2:Number=1, _arg3:Object=null, _arg4:Object=null, _arg5:Boolean=false, _arg6:Boolean=false, _arg7:Number=250):ObjSound{
var _local8:Number;
var _local9:ObjSound;
_local8 = ((volume * muted) * _arg2);
_local9 = new ObjSound(this, _arg1, _local8, _arg3, _arg4, _arg5, _arg6, _arg7);
sounds.push(_local9);
return (_local9);
}
public function playSoundLoop(_arg1:String, _arg2:Number=1, _arg3:Object=null, _arg4:Object=null, _arg5:Boolean=false, _arg6:Boolean=false, _arg7:Number=250):ObjLoop{
var _local8:Number;
var _local9:ObjLoop;
_local8 = ((volume * muted) * _arg2);
_local9 = new ObjLoop(this, _arg1, volume, _arg3, _arg4, _arg5, _arg6, _arg7);
sounds.push(_local9);
return (_local9);
}
public function clear(_arg1):void{
if (sounds.indexOf(_arg1) != -1){
sounds.splice(sounds.indexOf(_arg1), 1);
};
}
public function pause(_arg1:Boolean=true):void{
var _local2:Array;
var _local3:int;
if (paused != _arg1){
paused = _arg1;
_local2 = sounds.slice(0);
_local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3].pause(_arg1, muted);
_local3++;
};
};
}
}
}//package tools
Section 106
//ObjLoop (tools.ObjLoop)
package tools {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class ObjLoop {
private var channel:SoundChannel;
private var soundPan:Boolean;// = false
private var sound:Sound;
private var soundDist:Boolean;// = false
private var lastVolume:Number;// = 1
private var myManager:MgrSound;
private var lastPan:Number;// = 0
private var objTarget:Object;
private var transform:SoundTransform;
private var progress:Number;
private var maxDist:Number;
private var objSource:Object;
private var soundName:String;
public function ObjLoop(_arg1:MgrSound, _arg2:String, _arg3:Number, _arg4:Object, _arg5:Object, _arg6:Boolean, _arg7:Boolean, _arg8:Number){
var _local9:Class;
soundDist = false;
soundPan = false;
lastVolume = 1;
lastPan = 0;
super();
myManager = _arg1;
soundName = _arg2;
_local9 = Class(getDefinitionByName(soundName));
sound = new (_local9);
soundDist = _arg6;
soundPan = _arg7;
if (((_arg4) && (_arg5))){
objSource = _arg4;
objTarget = _arg5;
maxDist = _arg8;
objSource.addEventListener("removedFromStage", stopSource, false, 0, true);
objTarget.addEventListener("removedFromStage", stopTarget, false, 0, true);
};
channel = sound.play(0, 999999999);
transform = new SoundTransform();
setVolume(_arg3);
channel.addEventListener("soundComplete", soundFinish, false, 0, true);
}
private function soundFinish(_arg1:Event):void{
channel = sound.play();
channel.addEventListener("soundComplete", soundFinish, false, 0, true);
}
private function stopTarget(_arg1:Event=null):void{
objTarget.removeEventListener("removedFromStage", stopTarget);
objTarget = null;
soundDist = false;
soundPan = false;
}
public function clear():void{
if (objSource){
objSource.removeEventListener("removedFromStage", stopSource);
};
if (objTarget){
objTarget.removeEventListener("removedFromStage", stopTarget);
};
objSource = null;
objTarget = null;
soundDist = false;
soundPan = false;
channel.stop();
channel.removeEventListener("soundComplete", soundFinish);
myManager.clear(this);
}
public function runtime(_arg1:Number):void{
setVolume(_arg1);
}
private function setVolume(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = lastPan;
_local3 = lastVolume;
if (soundDist){
_local4 = Math.sqrt((Math.pow((objSource.x - objTarget.x), 2) + Math.pow((objSource.y - objTarget.y), 2)));
if (_local4 > maxDist){
_local4 = maxDist;
};
_local4 = (maxDist - _local4);
_local3 = (_local4 / maxDist);
lastVolume = _local3;
};
if (soundPan){
_local4 = (objSource.x - objTarget.x);
if (_local4 > maxDist){
_local4 = maxDist;
};
if (_local4 < -(maxDist)){
_local4 = -(maxDist);
};
_local2 = (_local4 / maxDist);
lastPan = _local2;
};
transform.pan = _local2;
transform.volume = (_local3 * _arg1);
channel.soundTransform = transform;
}
public function testOrigin(_arg1:String, _arg2:Object):Boolean{
if ((((soundName == _arg1)) && (((!(objSource)) || ((_arg2 == objSource)))))){
return (true);
};
return (false);
}
public function pause(_arg1:Boolean, _arg2:Number=1):void{
if (_arg1){
progress = channel.position;
channel.stop();
channel.removeEventListener("soundComplete", soundFinish);
} else {
if (_arg2){
channel = sound.play(progress, 999999999);
channel.addEventListener("soundComplete", soundFinish, false, 0, true);
};
};
}
private function stopSource(_arg1:Event=null):void{
objSource.removeEventListener("removedFromStage", stopSource);
if (objTarget){
objTarget.removeEventListener("removedFromStage", stopTarget);
};
objSource = null;
objTarget = null;
soundDist = false;
soundPan = false;
channel.stop();
channel.removeEventListener("soundComplete", soundFinish);
myManager.clear(this);
}
}
}//package tools
Section 107
//ObjSound (tools.ObjSound)
package tools {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class ObjSound {
private var channel:SoundChannel;
private var soundPan:Boolean;// = false
private var sound:Sound;
private var soundDist:Boolean;// = false
private var lastVolume:Number;// = 1
private var myManager:MgrSound;
private var lastPan:Number;// = 0
private var objTarget:Object;
private var transform:SoundTransform;
private var progress:Number;
private var maxDist:Number;
private var objSource:Object;
private var soundName:String;
public function ObjSound(_arg1:MgrSound, _arg2:String, _arg3:Number, _arg4:Object, _arg5:Object, _arg6:Boolean, _arg7:Boolean, _arg8:Number){
var _local9:Class;
soundDist = false;
soundPan = false;
lastVolume = 1;
lastPan = 0;
super();
myManager = _arg1;
soundName = _arg2;
_local9 = Class(getDefinitionByName(soundName));
sound = new (_local9);
soundDist = _arg6;
soundPan = _arg7;
if (((_arg4) && (_arg5))){
objSource = _arg4;
objTarget = _arg5;
maxDist = _arg8;
objSource.addEventListener("removedFromStage", stopDist, false, 0, true);
objTarget.addEventListener("removedFromStage", stopDist, false, 0, true);
};
channel = sound.play();
transform = new SoundTransform();
setVolume(_arg3);
channel.addEventListener("soundComplete", soundFinish, false, 0, true);
}
private function stopDist(_arg1:Event=null):void{
objSource.removeEventListener("removedFromStage", stopDist);
objTarget.removeEventListener("removedFromStage", stopDist);
objSource = null;
objTarget = null;
soundDist = false;
soundPan = false;
}
private function soundFinish(_arg1:Event):void{
channel.removeEventListener("soundComplete", soundFinish);
if (((soundDist) || (soundPan))){
stopDist();
};
myManager.clear(this);
}
public function clear():void{
channel.removeEventListener("soundComplete", soundFinish);
channel.stop();
if (((soundDist) || (soundPan))){
stopDist();
};
myManager.clear(this);
}
public function runtime(_arg1:Number):void{
setVolume(_arg1);
}
private function setVolume(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = lastPan;
_local3 = lastVolume;
if (soundDist){
_local4 = (objSource.y - objTarget.y);
if (_local4 > maxDist){
_local4 = maxDist;
};
_local4 = (maxDist - _local4);
_local3 = (_local4 / maxDist);
lastVolume = _local3;
};
if (soundPan){
_local4 = (objSource.x - objTarget.x);
if (_local4 > maxDist){
_local4 = maxDist;
};
if (_local4 < -(maxDist)){
_local4 = -(maxDist);
};
_local2 = (_local4 / maxDist);
lastPan = _local2;
};
transform.pan = _local2;
transform.volume = (_local3 * _arg1);
channel.soundTransform = transform;
}
public function testOrigin(_arg1:String, _arg2:Object):Boolean{
if ((((soundName == _arg1)) && (((!(objSource)) || ((_arg2 == objSource)))))){
return (true);
};
return (false);
}
public function pause(_arg1:Boolean, _arg2:Number=1):void{
if (_arg1){
progress = channel.position;
channel.stop();
channel.removeEventListener("soundComplete", soundFinish);
} else {
if (_arg2){
channel = sound.play(progress);
channel.addEventListener("soundComplete", soundFinish, false, 0, true);
};
};
}
}
}//package tools
Section 108
//SaveLoad (tools.SaveLoad)
package tools {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class SaveLoad extends MovieClip {
private var saveHandler:Loader;
private var saveGame:MovieClip;
private var saveHandlerFound:Boolean;// = true
private var saveFile:SharedObject;
private var urlReq:URLRequest;
public function SaveLoad(){
saveFile = SharedObject.getLocal("SpaceShooter");
saveHandler = new Loader();
saveHandlerFound = true;
urlReq = new URLRequest("http://brainoxide.com/svh/plaboski.swf");
super();
saveHandler.load(urlReq);
saveHandler.contentLoaderInfo.addEventListener("complete", loadEvent, false, 0, true);
saveHandler.contentLoaderInfo.addEventListener("ioError", errorEvent, false, 0, true);
}
private function loadEvent(_arg1:Event):void{
addChild(saveHandler);
saveHandler.contentLoaderInfo.removeEventListener("complete", loadEvent);
saveHandler.contentLoaderInfo.removeEventListener("ioError", errorEvent);
saveGame = MovieClip(saveHandler.contentLoaderInfo.content);
if (saveGame.hasSaved()){
gameLoad();
} else {
if (saveFile.data.savedData != undefined){
saveHandlerFound = false;
gameLoad();
saveHandlerFound = true;
} else {
gameNew();
};
};
}
private function gameNew():void{
var _local1:int;
MovieClip(parent).allData = new Array();
MovieClip(parent).allData["pref"] = new Array();
MovieClip(parent).allData["pref"]["left"] = 65;
MovieClip(parent).allData["pref"]["right"] = 68;
MovieClip(parent).allData["pref"]["up"] = 87;
MovieClip(parent).allData["pref"]["down"] = 83;
MovieClip(parent).allData["pref"]["tutorials"] = true;
MovieClip(parent).allData["pref"]["music"] = true;
MovieClip(parent).allData["pref"]["sound"] = true;
MovieClip(parent).allData["pref"]["quality"] = "high";
MovieClip(parent).allData["date"] = getToday();
MovieClip(parent).allData["profiles"] = new Array();
_local1 = 0;
while (_local1 < 7) {
MovieClip(parent).allData.profiles.push(new Array());
MovieClip(parent).allData.profiles[_local1]["name"] = "EMPTY SLOT";
_local1++;
};
MovieClip(parent).setControls();
gameSave();
}
private function errorEvent(_arg1:IOErrorEvent):void{
saveHandler.contentLoaderInfo.removeEventListener("complete", loadEvent);
saveHandler.contentLoaderInfo.removeEventListener("ioError", errorEvent);
saveHandlerFound = false;
gameLoad();
}
private function getToday():int{
var _local1:Date;
_local1 = new Date();
return (_local1.getTime());
}
public function gameSave():void{
MovieClip(parent).allData["date"] = getToday();
if (saveHandlerFound){
saveGame.saveGame(MovieClip(parent).allData);
};
saveFile.data.hasSaved = true;
saveFile.data.savedData = MovieClip(parent).allData;
saveFile.flush();
}
private function gameLoad():void{
var _local1:Array;
if (saveHandlerFound){
_local1 = saveGame.loadGame();
if (saveFile.data.savedData == undefined){
MovieClip(parent).allData = saveGame.loadGame();
} else {
if (_local1.date >= saveFile.data.savedData.date){
MovieClip(parent).allData = saveGame.loadGame();
} else {
if (!isNaN(saveFile.data.savedData.date)){
MovieClip(parent).allData = saveFile.data.savedData;
} else {
gameNew();
};
};
};
} else {
if (((!((saveFile.data.savedData == undefined))) && (!(isNaN(saveFile.data.savedData.date))))){
MovieClip(parent).allData = saveFile.data.savedData;
} else {
gameNew();
};
};
MovieClip(parent).setControls();
}
}
}//package tools
Section 109
//Absorb (Absorb)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Absorb extends MovieClip {
public function Absorb(){
addFrameScript(9, frame10, 19, frame20, 29, frame30, 39, frame40, 46, frame47, 56, frame57);
}
function frame10(){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
function frame20(){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
function frame30(){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
function frame40(){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
function frame47(){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
function frame57(){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
}
}//package
Section 110
//Boom1 (Boom1)
package {
import flash.media.*;
public dynamic class Boom1 extends Sound {
}
}//package
Section 111
//Boom2 (Boom2)
package {
import flash.media.*;
public dynamic class Boom2 extends Sound {
}
}//package
Section 112
//Boom3 (Boom3)
package {
import flash.media.*;
public dynamic class Boom3 extends Sound {
}
}//package
Section 113
//BoomBoss (BoomBoss)
package {
import flash.media.*;
public dynamic class BoomBoss extends Sound {
}
}//package
Section 114
//BossSong (BossSong)
package {
import flash.media.*;
public dynamic class BossSong extends Sound {
}
}//package
Section 115
//BulletPlayer (BulletPlayer)
package {
import flash.media.*;
public dynamic class BulletPlayer extends Sound {
}
}//package
Section 116
//BulletPower (BulletPower)
package {
import flash.media.*;
public dynamic class BulletPower extends Sound {
}
}//package
Section 117
//Click (Click)
package {
import flash.media.*;
public dynamic class Click extends Sound {
}
}//package
Section 118
//CommandCenter (CommandCenter)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class CommandCenter extends BaseMenu {
public var i:int;
public var arr:Array;
public var total:int;
public function CommandCenter(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0;
usernameBox.text = MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile]["name"];
newButton(mcNext, "blue", "NEXT MISSION", nextMission);
newButton(mcMissions, "blue", "ALL MISSIONS", browse);
newButton(mcWorkshop, "blue", "WORKSHOP", workshop);
newButton(mcExit, "blue", "EXIT GAME", exitGame);
newButton(mcMore, "blue", "MORE GAMES", moreGames);
newButton(mcBonus, "blue", "UNLOCKABLES", unlock);
arr = MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile]["upgrades"];
total = 0;
i = 0;
while (i < 8) {
total = (total + arr[i]);
i++;
};
if (((((total) || (!(MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile]["earnings"][0])))) || (MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile]["earnings"][1]))){
work.visible = false;
};
if (((MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile]["earnings"][0]) && (!(total)))){
work.visible = true;
};
}
public function moreGames():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://brainoxide.com");
navigateToURL(_local1, "_blank");
}
public function workshop():void{
MovieClip(parent).spawn("Workshop");
}
public function exitGame():void{
MovieClip(parent).spawn("Main");
}
public function browse():void{
MovieClip(parent).spawn("Missions");
}
public function nextMission():void{
param = MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile]["mission"];
MovieClip(parent).startGame(true);
}
public function unlock():void{
MovieClip(parent).spawn("Unlockables");
}
}
}//package
Section 119
//Credits (Credits)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Credits extends BaseMenu {
public function Credits(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0.75;
newButton(mcJoe, "blue", "HTTP://BRAINOXIDE.COM", clickJoe);
newButton(mcHopeku, "blue", "HTTP://HOPEKU.NEWGROUNDS.COM", clickHopeku);
newButton(mcSam, "blue", "HTTP://BRAINOXIDE.COM", clickJoe);
newButton(mcFont, "blue", "HTTP://MINIML.COM", clickFont);
closeFunc = function (){
MovieClip(parent).spawn("Main");
};
}
public function clickJoe():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://www.brainoxide.com");
navigateToURL(_local1, "_blank");
}
public function clickFont():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://miniml.com");
navigateToURL(_local1, "_blank");
}
public function clickHopeku():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://hopeku.newgrounds.com");
navigateToURL(_local1, "_blank");
}
}
}//package
Section 120
//DebrisBoss (DebrisBoss)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class DebrisBoss extends MovieClip {
public function DebrisBoss(){
addFrameScript(0, frame1);
}
public function runtime():void{
var _local1:int;
if (numChildren == 0){
MovieClip(parent).doRuntime(this);
parent.removeChild(this);
} else {
_local1 = 0;
while (_local1 < numChildren) {
MovieClip(getChildAt(_local1)).runtime();
_local1++;
};
};
}
function frame1(){
}
}
}//package
Section 121
//DebrisMedium (DebrisMedium)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class DebrisMedium extends MovieClip {
public function DebrisMedium(){
addFrameScript(0, frame1);
}
public function runtime():void{
var _local1:int;
if (numChildren == 0){
MovieClip(parent).doRuntime(this);
parent.removeChild(this);
} else {
_local1 = 0;
while (_local1 < numChildren) {
MovieClip(getChildAt(_local1)).runtime();
_local1++;
};
};
}
function frame1(){
}
}
}//package
Section 122
//DebrisSmall (DebrisSmall)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class DebrisSmall extends MovieClip {
public function DebrisSmall(){
addFrameScript(0, frame1);
}
public function runtime():void{
var _local1:int;
if (numChildren == 0){
MovieClip(parent).doRuntime(this);
parent.removeChild(this);
} else {
_local1 = 0;
while (_local1 < numChildren) {
MovieClip(getChildAt(_local1)).runtime();
_local1++;
};
};
}
function frame1(){
}
}
}//package
Section 123
//DeleteProfile (DeleteProfile)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class DeleteProfile extends BaseMenu {
public var saveGames:Array;
public function DeleteProfile(){
addFrameScript(0, frame1);
}
public function deleteIt():void{
var _local1:Array;
var _local2:Boolean;
var _local3:int;
MovieClip(parent.parent.parent).allData.profiles[param].name = "EMPTY SLOT";
_local1 = MovieClip(parent.parent.parent).allData.profiles;
_local2 = false;
_local3 = 0;
while (_local3 < _local1.length) {
if (_local1[_local3].name != "EMPTY SLOT"){
_local2 = true;
break;
};
_local3++;
};
if (_local2){
MovieClip(parent).spawn("LoadGame");
} else {
MovieClip(parent).spawn("Main");
};
}
function frame1(){
saveGames = MovieClip(parent.parent.parent).allData.profiles;
MovieClip(parent).bgAlpha = 0.75;
param = MovieClip(parent).param;
txtBox.text = saveGames[param].name;
newButton(mcYes, "blue", "DELETE", deleteIt);
newButton(mcNo, "blue", "CANCEL", closeEsti);
closeFunc = function (){
MovieClip(parent).spawn("LoadGame");
};
}
public function closeEsti():void{
MovieClip(parent).spawn("LoadGame");
}
}
}//package
Section 124
//DirectDamage (DirectDamage)
package {
import flash.media.*;
public dynamic class DirectDamage extends Sound {
}
}//package
Section 125
//EnemyLock (EnemyLock)
package {
import flash.display.*;
public dynamic class EnemyLock extends MovieClip {
public function EnemyLock(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 126
//ExpCollisionSpark (ExpCollisionSpark)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ExpCollisionSpark extends MovieClip {
public var rot:Number;
public function ExpCollisionSpark(){
addFrameScript(0, frame1, 6, frame7);
}
public function runtime():void{
nextFrame();
}
function frame7(){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
}
function frame1(){
rot = rotation;
nextFrame();
}
}
}//package
Section 127
//ExplosionBoss (ExplosionBoss)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ExplosionBoss extends MovieClip {
public var counter:Number;
public function ExplosionBoss(){
addFrameScript(0, frame1);
}
public function runtime():void{
var _local1:int;
counter++;
_local1 = 0;
while (_local1 < numChildren) {
if (MovieClip(getChildAt(_local1)).runtime){
MovieClip(getChildAt(_local1)).runtime();
} else {
MovieClip(getChildAt(_local1)).nextFrame();
};
_local1++;
};
if (counter == 40){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
};
}
function frame1(){
counter = 0;
}
}
}//package
Section 128
//ExplosionDebris (ExplosionDebris)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ExplosionDebris extends MovieClip {
public var counter:Number;
public function ExplosionDebris(){
addFrameScript(0, frame1);
}
public function runtime():void{
var _local1:int;
counter++;
_local1 = 0;
while (_local1 < numChildren) {
if (MovieClip(getChildAt(_local1)).runtime){
MovieClip(getChildAt(_local1)).runtime();
} else {
MovieClip(getChildAt(_local1)).nextFrame();
};
_local1++;
};
if (counter == 40){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
};
}
function frame1(){
counter = 0;
}
}
}//package
Section 129
//ExplosionMedium (ExplosionMedium)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ExplosionMedium extends MovieClip {
public var counter:Number;
public var rand:Number;
public function ExplosionMedium(){
addFrameScript(0, frame1);
}
public function runtime():void{
var _local1:int;
counter++;
_local1 = 0;
while (_local1 < numChildren) {
if (MovieClip(getChildAt(_local1)).runtime){
MovieClip(getChildAt(_local1)).runtime();
} else {
MovieClip(getChildAt(_local1)).nextFrame();
};
_local1++;
};
if (counter == 40){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
};
}
function frame1(){
counter = 0;
rand = Math.ceil((Math.random() * 3));
MovieClip(parent).playSound(("Boom" + String(rand)), 1);
}
}
}//package
Section 130
//ExplosionSmall (ExplosionSmall)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ExplosionSmall extends MovieClip {
public var counter:Number;
public var rand:Number;
public function ExplosionSmall(){
addFrameScript(0, frame1);
}
public function runtime():void{
var _local1:int;
counter++;
_local1 = 0;
while (_local1 < numChildren) {
if (MovieClip(getChildAt(_local1)).runtime){
MovieClip(getChildAt(_local1)).runtime();
} else {
MovieClip(getChildAt(_local1)).nextFrame();
};
_local1++;
};
if (counter == 40){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
};
}
function frame1(){
counter = 0;
rand = Math.ceil((Math.random() * 3));
MovieClip(parent).playSound(("Boom" + String(rand)));
}
}
}//package
Section 131
//ExplosionVerySmall (ExplosionVerySmall)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ExplosionVerySmall extends MovieClip {
public var counter:Number;
public var rand:Number;
public function ExplosionVerySmall(){
addFrameScript(0, frame1);
}
public function runtime():void{
var _local1:int;
counter++;
_local1 = 0;
while (_local1 < numChildren) {
if (MovieClip(getChildAt(_local1)).runtime){
MovieClip(getChildAt(_local1)).runtime();
} else {
MovieClip(getChildAt(_local1)).nextFrame();
};
_local1++;
};
if (counter == 40){
MovieClip(parent).doRuntime(this);
MovieClip(parent).removeChild(this);
};
}
function frame1(){
counter = 0;
rand = Math.ceil((Math.random() * 2));
MovieClip(parent).playSound(("MissileBoom" + String(rand)));
}
}
}//package
Section 132
//GateSound (GateSound)
package {
import flash.media.*;
public dynamic class GateSound extends Sound {
}
}//package
Section 133
//LoadGame (LoadGame)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class LoadGame extends BaseMenu {
public var doNothing:Boolean;
public var saveGames:Array;
public function LoadGame(){
addFrameScript(0, frame1);
}
public function testClick(_arg1:Object, _arg2:int):void{
if (_arg1.hitTestPoint(stage.mouseX, stage.mouseY)){
MovieClip(parent.parent.parent).activeProfile = _arg2;
MovieClip(parent).spawn("CommandCenter");
};
}
function frame1(){
saveGames = MovieClip(parent.parent.parent).allData.profiles;
MovieClip(parent).bgAlpha = 0.75;
doNothing = false;
testSlot(0, mcSlot1, mcDel1);
testSlot(1, mcSlot2, mcDel2);
testSlot(2, mcSlot3, mcDel3);
testSlot(3, mcSlot4, mcDel4);
testSlot(4, mcSlot5, mcDel5);
testSlot(5, mcSlot6, mcDel6);
testSlot(6, mcSlot7, mcDel7);
closeBtn(mcDel1);
closeBtn(mcDel2);
closeBtn(mcDel3);
closeBtn(mcDel4);
closeBtn(mcDel5);
closeBtn(mcDel6);
closeBtn(mcDel7);
closeFunc = function (){
MovieClip(parent).spawn("Main");
};
newButton(mcWebsite, "blue", "VISIT BRAINOXIDE.COM", visit);
if (MovieClip(root).allFeatures == 2){
mcText.x = -1000;
mcWebsite.x = -1000;
};
}
public function testDelete(_arg1:Object, _arg2:int):void{
if (_arg1.hitTestPoint(stage.mouseX, stage.mouseY)){
MovieClip(parent).spawn("DeleteProfile", _arg2);
doNothing = true;
};
}
public function visit():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://www.brainoxide.com");
navigateToURL(_local1, "_blank");
}
public function testSlot(_arg1:int, _arg2:Object, _arg3:Object):void{
if (saveGames[_arg1].name == "EMPTY SLOT"){
_arg2.x = 1000;
_arg3.x = 1000;
} else {
newButton(_arg2, "blue", saveGames[_arg1].name, clickEvent);
};
}
public function clickEvent():void{
doNothing = false;
testDelete(mcDel1, 0);
testDelete(mcDel2, 1);
testDelete(mcDel3, 2);
testDelete(mcDel4, 3);
testDelete(mcDel5, 4);
testDelete(mcDel6, 5);
testDelete(mcDel7, 6);
if (!doNothing){
testClick(mcSlot1, 0);
testClick(mcSlot2, 1);
testClick(mcSlot3, 2);
testClick(mcSlot4, 3);
testClick(mcSlot5, 4);
testClick(mcSlot6, 5);
testClick(mcSlot7, 6);
};
}
}
}//package
Section 134
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Main extends BaseMenu {
public function Main(){
addFrameScript(0, frame1);
}
public function settings():void{
MovieClip(parent).spawn("Settings");
}
function frame1(){
MovieClip(parent).bgAlpha = 0.75;
newButton(mcStart, "blue", "NEW GAME", newGame);
newButton(mcLoad, "blue", "CONTINUE GAME", loadGame);
newButton(mcSettings, "blue", "SETTINGS", settings);
newButton(mcMore, "blue", "MORE GAMES", more);
newButton(mcCredits, "blue", "CREDITS", credits);
}
public function credits():void{
MovieClip(parent).spawn("Credits");
}
public function newGame():void{
MovieClip(parent).spawn("NewGame");
}
public function loadGame():void{
MovieClip(parent).spawn("LoadGame");
}
public function more():void{
MovieClip(parent).spawn("MoreGames");
}
}
}//package
Section 135
//MissileBoom1 (MissileBoom1)
package {
import flash.media.*;
public dynamic class MissileBoom1 extends Sound {
}
}//package
Section 136
//MissileBoom2 (MissileBoom2)
package {
import flash.media.*;
public dynamic class MissileBoom2 extends Sound {
}
}//package
Section 137
//MissileLaunch (MissileLaunch)
package {
import flash.media.*;
public dynamic class MissileLaunch extends Sound {
}
}//package
Section 138
//MissileTarget (MissileTarget)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class MissileTarget extends BaseMenu {
public var i:int;
public var targ;
public var arr:Array;
public var targ2;
public function MissileTarget(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0;
newButton(mcTarg1, "white", "HIGHEST HEALTH PERCENTAGE", clickFunc);
newButton(mcTarg2, "white", "HIGHEST TOTAL HEALTH", clickFunc);
newButton(mcTarg3, "white", "LOWEST HEALTH PERCENTAGE", clickFunc);
newButton(mcTarg4, "white", "LOWEST TOTAL HEALTH", clickFunc);
newButton(mcTarg5, "white", "CLOSEST HORIZONTALLY", clickFunc);
newButton(mcTarg6, "white", "CLOSEST VERTICALLY", clickFunc);
newButton(mcTarg7, "white", "FARTHEST HORIZONTALLY", clickFunc);
newButton(mcTarg8, "white", "FARTHEST VERTICALLY", clickFunc);
targ = MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile].targetting;
targ2 = targ;
arr = new Array();
i = 1;
while (i <= 8) {
if (i == (targ + 1)){
this[("txt" + i)].text = "ON";
};
arr.push(this[("mcTarg" + i)]);
i++;
};
closeFunc = function (){
if (targ != targ2){
MovieClip(parent.parent.parent).gameSave();
};
MovieClip(parent).spawn("Workshop");
};
}
public function clickFunc():void{
var _local1:int;
_local1 = 0;
while (_local1 < arr.length) {
this[("txt" + (_local1 + 1))].text = "";
if (arr[_local1].hitTestPoint(stage.mouseX, stage.mouseY)){
targ = _local1;
MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile].targetting = _local1;
this[("txt" + (_local1 + 1))].text = "ON";
};
_local1++;
};
}
}
}//package
Section 139
//Missions (Missions)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Missions extends BaseMenu {
public var i:int;
public var btn:Array;
public var arr:Array;
public var total:Number;
public function Missions(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0;
arr = MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile];
btn = new Array();
txtMoney.text = (String(arr.money) + " $");
total = 0;
i = 1;
while (i <= 30) {
if ((arr.mission + 1) >= i){
newButton(this[("b" + i)], "white", String(("LEVEL " + i)), clickFunc);
this[("txt" + i)].text = String((arr.earnings[(i - 1)] + " $"));
btn.push(this[("b" + i)]);
} else {
this[("b" + i)].textBox.htmlText = "<font color='#FB5554'>LOCKED</font>";
this[("txt" + i)].text = "";
};
total = (total + arr.earnings[(i - 1)]);
i++;
};
txtTotal.text = (String(total) + " $");
closeFunc = function (){
MovieClip(parent).spawn("CommandCenter");
};
}
public function clickFunc():void{
var _local1:int;
_local1 = 0;
while (_local1 < btn.length) {
if (btn[_local1].hitTestPoint(stage.mouseX, stage.mouseY)){
param = _local1;
MovieClip(parent).startGame(true);
break;
};
_local1++;
};
}
}
}//package
Section 140
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 141
//MoreGames (MoreGames)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class MoreGames extends BaseMenu {
public function MoreGames(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0.75;
newButton(mcPlay, "blue", "PLAY THIS GAME AT BRAINOXIDE", clickPlay);
newButton(mcMore, "blue", "VISIT BRAINOXIDE.COM", clickMore);
closeFunc = function (){
MovieClip(parent).spawn("Main");
};
if (MovieClip(root).allFeatures == 2){
mcPlay.x = -1000;
};
}
public function clickPlay():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://www.brainoxide.com/play/170");
navigateToURL(_local1, "_blank");
}
public function clickMore():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://brainoxide.com");
navigateToURL(_local1, "_blank");
}
}
}//package
Section 142
//NewGame (NewGame)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class NewGame extends BaseMenu {
public var clickedAlready:Boolean;
public var saveGames:Array;
public function NewGame(){
addFrameScript(0, frame1);
}
public function testClick(_arg1:Object, _arg2:int):void{
if (_arg1.hitTestPoint(stage.mouseX, stage.mouseY)){
if (saveGames[_arg2].name == "EMPTY SLOT"){
if (saveName.text == "EMPTY SLOT"){
txtInstructions.text = "PLEASE ENTER A DIFFERENT NAME";
} else {
if (!saveName.text.length){
txtInstructions.text = "PLEASE ENTER A NAME";
} else {
MovieClip(parent.parent.parent).newProfile(saveName.text.toUpperCase(), _arg2);
MovieClip(parent).showIntro();
};
};
} else {
MovieClip(parent).param2 = saveName.text.toUpperCase();
MovieClip(parent).spawn("OverwriteProfile", _arg2);
removeEventListener("keyDown", keyEvent);
removeEventListener("mouseDown", downEvent);
};
};
}
function frame1(){
saveGames = MovieClip(parent.parent.parent).allData.profiles;
MovieClip(parent).bgAlpha = 0.75;
newButton(mcSlot1, "blue", saveGames[0].name, clickEvent);
newButton(mcSlot2, "blue", saveGames[1].name, clickEvent);
newButton(mcSlot3, "blue", saveGames[2].name, clickEvent);
newButton(mcSlot4, "blue", saveGames[3].name, clickEvent);
newButton(mcSlot5, "blue", saveGames[4].name, clickEvent);
newButton(mcSlot6, "blue", saveGames[5].name, clickEvent);
newButton(mcSlot7, "blue", saveGames[6].name, clickEvent);
if (MovieClip(parent).param2 != "none"){
saveName.text = MovieClip(parent).param2;
MovieClip(parent).param2 = "none";
};
addEventListener("mouseDown", downEvent, false, 0, true);
addEventListener("keyDown", keyEvent, false, 0, true);
clickedAlready = false;
closeFunc = function (){
MovieClip(parent).spawn("Main");
removeEventListener("keyDown", keyEvent);
removeEventListener("mouseDown", downEvent);
};
}
public function enteredName():Boolean{
var _local1:Boolean;
var _local2:int;
_local1 = false;
_local2 = 0;
while (_local2 < saveName.text.length) {
if (saveName.text.charAt(_local2) != " "){
_local1 = true;
break;
};
_local2++;
};
return (_local1);
}
public function clickEvent():void{
testClick(mcSlot1, 0);
testClick(mcSlot2, 1);
testClick(mcSlot3, 2);
testClick(mcSlot4, 3);
testClick(mcSlot5, 4);
testClick(mcSlot6, 5);
testClick(mcSlot7, 6);
}
public function downEvent(_arg1:MouseEvent):void{
if (((saveName.hitTestPoint(stage.mouseX, stage.mouseY)) && (!(clickedAlready)))){
clickedAlready = true;
stage.focus = saveName;
saveName.text = "";
};
}
public function keyEvent(_arg1:KeyboardEvent):void{
var _local2:int;
if (_arg1.keyCode == 13){
if (saveName.text == "EMPTY SLOT"){
txtInstructions.text = "PLEASE ENTER A DIFFERENT NAME";
} else {
if (!saveName.text.length){
txtInstructions.text = "PLEASE ENTER A NAME";
} else {
if (!enteredName()){
txtInstructions.text = "PLEASE ENTER A NAME";
} else {
_local2 = 0;
while (_local2 < 7) {
if (saveGames[_local2].name == "EMPTY SLOT"){
removeEventListener("keyDown", keyEvent);
removeEventListener("mouseDown", downEvent);
MovieClip(parent.parent.parent).newProfile(saveName.text.toUpperCase(), _local2);
MovieClip(parent).startGame();
break;
};
_local2++;
};
};
};
};
};
}
}
}//package
Section 143
//OverwriteProfile (OverwriteProfile)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class OverwriteProfile extends BaseMenu {
public var saveGames:Array;
public function OverwriteProfile(){
addFrameScript(0, frame1);
}
public function deleteIt():void{
MovieClip(parent.parent.parent).newProfile(MovieClip(parent).param2, MovieClip(parent).param);
MovieClip(parent).showIntro();
}
function frame1(){
saveGames = MovieClip(parent.parent.parent).allData.profiles;
MovieClip(parent).bgAlpha = 0.75;
param = MovieClip(parent).param;
txtBox.text = saveGames[param].name;
newButton(mcYes, "blue", "OVERWRITE", deleteIt);
newButton(mcNo, "blue", "CANCEL", closeEsti);
closeFunc = function (){
MovieClip(parent).spawn("NewGame");
};
}
public function closeEsti():void{
MovieClip(parent).spawn("NewGame");
}
}
}//package
Section 144
//PauseSettings (PauseSettings)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import main.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class PauseSettings extends BaseMenu {
public var currentDir:String;
public var isClosed:Boolean;
public function PauseSettings(){
addFrameScript(0, frame1);
}
public function resume():void{
MovieClip(parent.parent).isPaused = false;
}
public function moveDown():void{
setKey("Down");
}
function frame1(){
MovieClip(parent).mouseEnabled = false;
isClosed = false;
newButton(mcResume, "blue", "RESUME GAME", resume);
newButton(mcAudio1, "white", "MUSIC", toggleMusic);
newButton(mcAudio2, "white", "SOUND", toggleSound);
newButton(mcQuality1, "white", "HIGH", quality1);
newButton(mcQuality2, "white", "MEDIUM", quality2);
newButton(mcQuality3, "white", "LOW", quality3);
newButton(mcTutorials, "white", "TUTORIALS", toggleTutorials);
newButton(mcUp, "white", "UP", moveUp);
newButton(mcDown, "white", "DOWN", moveDown);
newButton(mcLeft, "white", "LEFT", moveLeft);
newButton(mcRight, "white", "RIGHT", moveRight);
newButton(mcMore, "blue", "PLAY MORE GAMES", moreGames);
newButton(mcReturn, "blue", "RETURN TO MENU", exit);
canClose = false;
closeFunc = function (){
MovieClip(parent.parent).isPaused = false;
};
setText();
}
public function moreGames():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://www.brainoxide.com");
navigateToURL(_local1, "_blank");
}
public function setText(_arg1:Boolean=false):void{
var _local2:Array;
var _local3:Array;
_local2 = MovieClip(parent.parent.parent.parent).allData.pref;
_local3 = Shooter.key.getKeys();
txtAudio1.text = (_local2.music) ? "ON" : "OFF";
txtAudio2.text = (_local2.sound) ? "ON" : "OFF";
txtQuality1.text = ((_local2.quality == "high")) ? "ON" : "";
txtQuality2.text = ((_local2.quality == "medium")) ? "ON" : "";
txtQuality3.text = ((_local2.quality == "low")) ? "ON" : "";
txtTutorials.text = (_local2.tutorials) ? "ON" : "OFF";
txtControlUp.text = _local3[_local2.up];
txtControlDown.text = _local3[_local2.down];
txtControlLeft.text = _local3[_local2.left];
txtControlRight.text = _local3[_local2.right];
if (_arg1){
MovieClip(parent.parent.parent.parent).gameSave();
};
stage.quality = MovieClip(parent.parent.parent.parent).allData.pref.quality;
}
public function moveRight():void{
setKey("Right");
}
public function exit():void{
if (!isClosed){
MovieClip(parent.parent).finishLevel(true);
isClosed = true;
};
}
public function toggleSound():void{
MovieClip(parent.parent.parent.parent).allData.pref.sound = !(MovieClip(parent.parent.parent.parent).allData.pref.sound);
setText();
}
public function moveUp():void{
setKey("Up");
}
public function cancel(_arg1=null):void{
MovieClip(parent).canRuntime = true;
MovieClip(parent).canClick = false;
MovieClip(parent.parent).canPause = true;
stage.removeEventListener("keyDown", keyEvent);
stage.removeEventListener("mouseUp", cancel);
this[("mc" + currentDir)].textBox.text = currentDir.toUpperCase();
}
public function setKey(_arg1:String):void{
stage.addEventListener("keyDown", keyEvent, false, 0, true);
stage.addEventListener("mouseUp", cancel, false, 0, true);
MovieClip(parent).canRuntime = false;
currentDir = _arg1;
this[("mc" + currentDir)].textBox.text = "PRESS A LETTER KEY TO USE";
MovieClip(parent.parent).canPause = false;
}
public function quality1():void{
MovieClip(parent.parent.parent.parent).allData.pref.quality = "high";
setText();
}
public function quality2():void{
MovieClip(parent.parent.parent.parent).allData.pref.quality = "medium";
setText();
}
public function quality3():void{
MovieClip(parent.parent.parent.parent).allData.pref.quality = "low";
setText();
}
public function toggleMusic():void{
MovieClip(parent.parent.parent.parent).allData.pref.music = !(MovieClip(parent.parent.parent.parent).allData.pref.music);
setText();
}
public function moveLeft():void{
setKey("Left");
}
public function keyEvent(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _arg1.keyCode;
if ((((_local2 >= 65)) && ((_local2 <= 90)))){
if (_local2 == 80){
this[("mc" + currentDir)].textBox.text = "THAT KEY IS ALREADY IN USE";
} else {
if (_local2 == MovieClip(parent.parent.parent.parent).allData.pref[currentDir.toLowerCase()]){
cancel();
} else {
if ((((((((_local2 == MovieClip(parent.parent.parent.parent).allData.pref["up"])) || ((_local2 == MovieClip(parent.parent.parent.parent).allData.pref["down"])))) || ((_local2 == MovieClip(parent.parent.parent.parent).allData.pref["left"])))) || ((_local2 == MovieClip(parent.parent.parent.parent).allData.pref["right"])))){
this[("mc" + currentDir)].textBox.text = "THAT KEY IS ALREADY IN USE";
} else {
MovieClip(parent.parent.parent.parent).allData.pref[currentDir.toLowerCase()] = _local2;
MovieClip(parent.parent.parent.parent).setControls();
setText(true);
cancel();
};
};
};
} else {
if (_local2 == 27){
cancel();
} else {
this[("mc" + currentDir)].textBox.text = "PRESS A LETTER KEY";
};
};
}
public function toggleTutorials():void{
MovieClip(parent.parent.parent.parent).allData.pref.tutorials = !(MovieClip(parent.parent.parent.parent).allData.pref.tutorials);
setText();
}
}
}//package
Section 145
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Preloader extends BaseMenu {
public var fakeTotal:Boolean;
public function Preloader(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0.75;
fakeTotal = false;
sound = false;
mcStart.textBox.text = "LOADING - 0%";
addEventListener("enterFrame", loadGame, false, 0, true);
newButton(mcWebsite, "blue", "VISIT BRAINOXIDE.COM", visit);
if (MovieClip(root).allFeatures == 2){
mcText.x = -1000;
mcWebsite.x = -1000;
};
}
public function visit():void{
var _local1:URLRequest;
_local1 = new URLRequest("http://www.brainoxide.com");
navigateToURL(_local1, "_blank");
}
public function loadGame(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = Math.ceil((stage.loaderInfo.bytesTotal / 0x0400));
if (_local2 == 0){
_local2 = Math.ceil(8851);
fakeTotal = true;
};
_local3 = (Math.ceil((stage.loaderInfo.bytesLoaded / 0x0400)) / _local2);
mcStart.textBox.text = (("LOADING - " + String(Math.round((_local3 * 100)))) + "%");
MovieClip(bar).width = (250 * _local3);
if ((((((_local3 >= 0.98)) && (fakeTotal))) || ((_local3 == 1)))){
newButton(mcStart, "blue", "START GAME", startGame);
removeEventListener("enterFrame", loadGame);
MovieClip(bar).width = 250;
};
}
public function startGame():void{
MovieClip(parent).exitPreloader();
}
}
}//package
Section 146
//ResetUpgrades (ResetUpgrades)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ResetUpgrades extends BaseMenu {
public var arr:Array;
public function ResetUpgrades(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0;
arr = MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile];
newButton(mcReset, "blue", "RESET", reset);
newButton(mcCancel, "blue", "CANCEL", cancel);
closeFunc = function (){
MovieClip(parent).spawn("Workshop");
};
}
public function reset():void{
var _local1:Number;
var _local2:int;
_local1 = 0;
_local2 = 0;
while (_local2 < 30) {
_local1 = (_local1 + arr.earnings[_local2]);
if (arr.earnings[_local2] == 0){
break;
};
_local2++;
};
MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile].upgrades = new Array(0, 0, 0, 0, 0, 0, 0, 0);
MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile].money = _local1;
MovieClip(parent.parent.parent).gameSave();
MovieClip(parent).spawn("Workshop");
}
public function cancel():void{
MovieClip(parent).spawn("Workshop");
}
}
}//package
Section 147
//Settings (Settings)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import main.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Settings extends BaseMenu {
public var currentDir:String;
public function Settings(){
addFrameScript(0, frame1);
}
public function resume():void{
MovieClip(parent.parent).isPaused = false;
}
public function moveDown():void{
setKey("Down");
}
function frame1(){
MovieClip(parent).bgAlpha = 0.75;
closeFunc = function (){
MovieClip(parent).spawn("Main");
};
newButton(mcAudio1, "white", "MUSIC", toggleMusic);
newButton(mcAudio2, "white", "SOUND", toggleSound);
newButton(mcQuality1, "white", "HIGH", quality1);
newButton(mcQuality2, "white", "MEDIUM", quality2);
newButton(mcQuality3, "white", "LOW", quality3);
newButton(mcTutorials, "white", "TUTORIALS", toggleTutorials);
newButton(mcUp, "white", "UP", moveUp);
newButton(mcDown, "white", "DOWN", moveDown);
newButton(mcLeft, "white", "LEFT", moveLeft);
newButton(mcRight, "white", "RIGHT", moveRight);
setText();
}
public function setText(_arg1:Boolean=false):void{
var _local2:Array;
var _local3:Array;
_local2 = MovieClip(parent.parent.parent).allData.pref;
_local3 = Shooter.key.getKeys();
txtAudio1.text = (_local2.music) ? "ON" : "OFF";
txtAudio2.text = (_local2.sound) ? "ON" : "OFF";
txtQuality1.text = ((_local2.quality == "high")) ? "ON" : "";
txtQuality2.text = ((_local2.quality == "medium")) ? "ON" : "";
txtQuality3.text = ((_local2.quality == "low")) ? "ON" : "";
txtTutorials.text = (_local2.tutorials) ? "ON" : "OFF";
txtControlUp.text = _local3[_local2.up];
txtControlDown.text = _local3[_local2.down];
txtControlLeft.text = _local3[_local2.left];
txtControlRight.text = _local3[_local2.right];
if (_arg1){
MovieClip(parent.parent.parent).gameSave();
};
stage.quality = MovieClip(parent.parent.parent).allData.pref.quality;
}
public function moveRight():void{
setKey("Right");
}
public function toggleSound():void{
MovieClip(parent.parent.parent).allData.pref.sound = !(MovieClip(parent.parent.parent).allData.pref.sound);
setText();
}
public function moveUp():void{
setKey("Up");
}
public function cancel(_arg1=null):void{
stage.removeEventListener("keyDown", keyEvent);
stage.removeEventListener("mouseUp", cancel);
this[("mc" + currentDir)].textBox.text = currentDir.toUpperCase();
doRuntime = true;
}
public function setKey(_arg1:String):void{
stage.addEventListener("keyDown", keyEvent, false, 0, true);
stage.addEventListener("mouseUp", cancel, false, 0, true);
currentDir = _arg1;
this[("mc" + currentDir)].textBox.text = "PRESS A LETTER KEY TO USE";
doRuntime = false;
doClicks = false;
holdEscape = true;
}
public function quality1():void{
MovieClip(parent.parent.parent).allData.pref.quality = "high";
setText();
}
public function quality2():void{
MovieClip(parent.parent.parent).allData.pref.quality = "medium";
setText();
}
public function quality3():void{
MovieClip(parent.parent.parent).allData.pref.quality = "low";
setText();
}
public function toggleMusic():void{
MovieClip(parent.parent.parent).allData.pref.music = !(MovieClip(parent.parent.parent).allData.pref.music);
setText();
}
public function moveLeft():void{
setKey("Left");
}
public function keyEvent(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _arg1.keyCode;
if ((((_local2 >= 65)) && ((_local2 <= 90)))){
if (_local2 == 80){
this[("mc" + currentDir)].textBox.text = "THAT KEY IS ALREADY IN USE";
} else {
if (_local2 == MovieClip(parent.parent.parent).allData.pref[currentDir.toLowerCase()]){
cancel();
} else {
if ((((((((_local2 == MovieClip(parent.parent.parent).allData.pref["up"])) || ((_local2 == MovieClip(parent.parent.parent).allData.pref["down"])))) || ((_local2 == MovieClip(parent.parent.parent).allData.pref["left"])))) || ((_local2 == MovieClip(parent.parent.parent).allData.pref["right"])))){
this[("mc" + currentDir)].textBox.text = "THAT KEY IS ALREADY IN USE";
} else {
MovieClip(parent.parent.parent).allData.pref[currentDir.toLowerCase()] = _local2;
MovieClip(parent.parent.parent).setControls();
setText(true);
cancel();
};
};
};
} else {
if (_local2 == 27){
cancel();
} else {
this[("mc" + currentDir)].textBox.text = "PRESS A LETTER KEY";
};
};
}
public function toggleTutorials():void{
MovieClip(parent.parent.parent).allData.pref.tutorials = !(MovieClip(parent.parent.parent).allData.pref.tutorials);
setText();
}
}
}//package
Section 148
//shieldEnemy (shieldEnemy)
package {
import sfx.*;
public dynamic class shieldEnemy extends Shield {
}
}//package
Section 149
//shieldPlayer (shieldPlayer)
package {
import sfx.*;
public dynamic class shieldPlayer extends Shield {
}
}//package
Section 150
//Song1 (Song1)
package {
import flash.media.*;
public dynamic class Song1 extends Sound {
}
}//package
Section 151
//Song2 (Song2)
package {
import flash.media.*;
public dynamic class Song2 extends Sound {
}
}//package
Section 152
//Song3 (Song3)
package {
import flash.media.*;
public dynamic class Song3 extends Sound {
}
}//package
Section 153
//SureReset (SureReset)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class SureReset extends BaseMenu {
public var saveGames:Array;
public function SureReset(){
addFrameScript(0, frame1);
}
public function deleteIt():void{
MovieClip(parent.parent.parent).resetProfile();
MovieClip(parent).spawn("Unlockables");
}
function frame1(){
saveGames = MovieClip(parent.parent.parent).allData.profiles;
MovieClip(parent).bgAlpha = 0;
newButton(mcYes, "blue", "DELETE", deleteIt);
newButton(mcNo, "blue", "CANCEL", closeEsti);
closeFunc = function (){
MovieClip(parent).spawn("Unlockables");
};
}
public function closeEsti():void{
MovieClip(parent).spawn("Unlockables");
}
}
}//package
Section 154
//Unlockables (Unlockables)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Unlockables extends BaseMenu {
public var sel:int;
public var select:String;
public var arr:Array;
public var locked:Array;
public var saveGame:Boolean;
public function Unlockables(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0;
arr = MovieClip(parent.parent.parent).getUnlockables();
locked = arr.slice(0);
select = "intro";
if (!MovieClip(root).allFeatures){
locked = new Array(0, 0, 0, 0);
mcBoss.textBox.htmlText = "<font color='#FB5554'>LOCKED</font>";
mcReset.textBox.htmlText = "<font color='#FB5554'>LOCKED</font>";
mcShield.textBox.htmlText = "<font color='#FB5554'>LOCKED</font>";
txtShield.text = "";
mcMiss.textBox.htmlText = "<font color='#FB5554'>LOCKED</font>";
txtMiss.text = "";
mcBullets.textBox.htmlText = "<font color='#FB5554'>LOCKED</font>";
txtBullets.text = "";
} else {
mcText.visible = false;
newButton(mcBoss, "white", "BOSS BLAST", boss);
newButton(mcReset, "white", "ERASE PROGRESS", reset);
newButton(mcShield, "white", "SUPER SHIELD", superShield);
newButton(mcMiss, "white", "SUPER MISSILES", superMissiles);
newButton(mcBullets, "white", "SUPER BLASTER", superBlaster);
};
sel = 0;
saveGame = false;
newButton(mcIntro, "white", "VIEW INTRO", intro);
newButton(mcFinale, "white", "VIEW FINALE", finale);
newButton(mcToggle, "blue", "WATCH MOVIE", acWatch);
setText();
closeFunc = function (){
if (saveGame){
MovieClip(parent.parent.parent).gameSave();
};
MovieClip(parent).spawn("CommandCenter");
};
}
public function superMissiles():void{
select = "missile";
setText();
}
public function setText():void{
if (MovieClip(root).allFeatures){
if (arr[1] == 1){
txtShield.text = "OFF";
} else {
if (arr[1] == 2){
txtShield.text = "ON";
};
};
if (arr[2] == 1){
txtMiss.text = "OFF";
} else {
if (arr[2] == 2){
txtMiss.text = "ON";
};
};
if (arr[3] == 1){
txtBullets.text = "OFF";
} else {
if (arr[3] == 2){
txtBullets.text = "ON";
};
};
};
txtHelp.text = "";
switch (select){
case "intro":
txtName.text = "INTRO MOVIE";
txtDesc.text = "VIEW THE INTRODUCTION CINEMATIC AGAIN";
changeText(mcToggle, "WATCH MOVIE", acWatch);
break;
case "finale":
txtName.text = "FINALE MOVIE";
txtDesc.text = "VIEW THE ENDING CINEMATIC AGAIN";
if (!arr[0]){
txtHelp.text = "BEAT THE GAME TO UNLOCK";
};
changeText(mcToggle, "WATCH MOVIE", acWatch);
break;
case "boss":
txtName.text = "BOSS BLAST";
txtDesc.text = "FIGHT INCREASINGLY DIFFICULT BOSSES UNTIL YOU DIE";
if (!arr[0]){
txtHelp.text = "BEAT THE GAME TO UNLOCK";
};
changeText(mcToggle, "BEGIN", acBoss);
break;
case "reset":
txtName.text = "ERASE PROGRESS";
txtDesc.text = "RESETS YOUR MISSION PROGRESS WHILST KEEPING UNLOCKABLES";
if (!arr[0]){
txtHelp.text = "BEAT THE GAME TO UNLOCK";
};
changeText(mcToggle, "RESET", acReset);
break;
case "shield":
txtName.text = "SUPER SHIELD";
txtDesc.text = "SHIELD POWERUP ALWAYS ENABLED";
if (!arr[1]){
txtHelp.text = "BEAT 1 WAVE OF BOSS BLAST TO UNLOCK";
};
if (arr[1] == 1){
txtName.appendText(" : OFF");
changeText(mcToggle, "TURN ON", acPower);
} else {
if (arr[1] == 2){
txtName.appendText(" : ON");
changeText(mcToggle, "TURN OFF", acPower);
};
};
break;
case "missile":
txtName.text = "SUPER MISSILES";
txtDesc.text = "MISSILE POWERUPS ALWAYS ENABLED";
if (!arr[2]){
txtHelp.text = "BEAT 1 WAVE OF BOSS BLAST TO UNLOCK";
};
if (arr[2] == 1){
txtName.appendText(" : OFF");
changeText(mcToggle, "TURN ON", acPower);
} else {
if (arr[2] == 2){
txtName.appendText(" : ON");
changeText(mcToggle, "TURN OFF", acPower);
};
};
break;
case "blaster":
txtName.text = "SUPER BLASTER";
txtDesc.text = "BLASTER POWERUPS ALWAYS ENABLED";
if (!arr[3]){
txtHelp.text = "BEAT 1 WAVE OF BOSS BLAST TO UNLOCK";
};
if (arr[3] == 1){
txtName.appendText(" : OFF");
changeText(mcToggle, "TURN ON", acPower);
} else {
if (arr[3] == 2){
txtName.appendText(" : ON");
changeText(mcToggle, "TURN OFF", acPower);
};
};
break;
default:
break;
};
}
public function superBlaster():void{
select = "blaster";
setText();
}
public function reset():void{
select = "reset";
setText();
}
public function finale():void{
select = "finale";
setText();
}
public function acWatch():void{
if (select == "intro"){
MovieClip(parent).showIntro();
} else {
MovieClip(parent).showFinale();
};
}
public function acPower():void{
if (select == "shield"){
if (arr[1] == 1){
arr[1] = 2;
} else {
if (arr[1] == 2){
arr[1] = 1;
};
};
};
if (select == "missile"){
if (arr[2] == 1){
arr[2] = 2;
} else {
if (arr[2] == 2){
arr[2] = 1;
};
};
};
if (select == "blaster"){
if (arr[3] == 1){
arr[3] = 2;
} else {
if (arr[3] == 2){
arr[3] = 1;
};
};
};
MovieClip(parent.parent.parent).setUnlockables(arr);
saveGame = true;
setText();
}
public function acReset():void{
if (arr[0]){
if (saveGame){
MovieClip(parent.parent.parent).gameSave();
};
MovieClip(parent).spawn("SureReset");
};
}
public function intro():void{
select = "intro";
setText();
}
public function acBoss():void{
if (arr[0]){
param = 30;
MovieClip(parent).startGame(true);
};
}
public function superShield():void{
select = "shield";
setText();
}
public function boss():void{
select = "boss";
setText();
}
}
}//package
Section 155
//Workshop (Workshop)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import menus.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Workshop extends BaseMenu {
public var sel:int;
public var i:int;
public var upMax:Array;
public var allUpgradesDesc:Array;
public var arr:Array;
public var allUpgrades:Array;
public var allButtons:Array;
public var upgradesCosts:Array;
public var saveGame:Boolean;
public function Workshop(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).bgAlpha = 0;
upgradesCosts = new Array();
upgradesCosts[0] = new Array(250, 300, 350, 400, 450, 500, 550, 600, 650, 700);
upgradesCosts[1] = new Array(225, 300, 375, 450, 525);
upgradesCosts[2] = new Array(950, 0);
upgradesCosts[3] = new Array(300, 375, 450, 525, 600, 675, 750, 825, 900, 975);
upgradesCosts[4] = new Array(300, 350, 400, 450, 500, 550);
upgradesCosts[5] = new Array(250, 300, 350, 400, 450, 500, 550, 600, 650, 700);
upgradesCosts[6] = new Array(250, 300, 350, 400, 450, 500, 550, 600, 650, 700);
upgradesCosts[7] = new Array(200, 225, 250, 275, 300, 325, 350);
allUpgrades = new Array("POWER", "FIRE RATE", "EXTRA GUN", "DAMAGE", "RELOAD TIME", "SHIELD POWER", "HULL RESISTANCE", "ENGINE");
allUpgradesDesc = new Array("INCREASES THE DAMAGE DEALT BY YOUR BLASTER BULLETS.", "DECREASES THE TIME BETWEEN EACH BULLET FIRED.", "INSTALLS A NEW CANNON UNDER YOUR HULL.", "INCREASES THE DAMAGE DEALT BY YOUR MISSILES.", "DECREASES THE TIME BETWEEN EACH MISSILE FIRED.", "IMPROVES YOUR SHIELD'S RESISTANCE AND RECOVERY TIME.", "INCREASES THE DAMAGE YOUR HULL CAN TAKE.", "INCREASES YOUR ACCELERATION AND YOUR MAXIMUM SPEED.");
upMax = new Array(10, 5, 1, 10, 6, 10, 10, 7);
arr = MovieClip(parent.parent.parent).allData["profiles"][MovieClip(parent.parent.parent).activeProfile];
sel = 0;
saveGame = false;
allButtons = new Array();
i = 1;
while (i <= 8) {
allButtons.push(this[("mcB" + i)]);
newButton(allButtons[(i - 1)], "w", allUpgrades[(i - 1)], func);
i++;
};
newButton(mcBuy, "blue", "BUY UPGRADE", buy);
newButton(mcReset, "blue", "RESET UPGRADES", reset);
newButton(mcTarget, "blue", "MISSILE TARGETING", targ);
setText();
closeFunc = function (){
if (saveGame){
MovieClip(parent.parent.parent).gameSave();
};
MovieClip(parent).spawn("CommandCenter");
};
}
public function setText():void{
var _local1:int;
_local1 = 0;
while (_local1 < 8) {
if (arr["upgrades"][_local1] == upMax[_local1]){
this[("c_" + (_local1 + 1))].text = "MAX";
} else {
if (upgradesCosts[_local1][arr["upgrades"][_local1]] <= arr["money"]){
this[("c_" + (_local1 + 1))].text = (String(upgradesCosts[_local1][arr["upgrades"][_local1]]) + " $");
} else {
this[("c_" + (_local1 + 1))].htmlText = (("<font color='#FB5554'>" + String(upgradesCosts[_local1][arr["upgrades"][_local1]])) + " $</font>");
};
};
_local1++;
};
txtMoney.text = (String(arr["money"]) + " $");
txtName.text = allUpgrades[sel];
txtDesc.text = allUpgradesDesc[sel];
txtLevel.text = ((("LEVEL " + String(arr["upgrades"][sel])) + " / ") + String(upMax[sel]));
if (arr["upgrades"][sel] == upMax[sel]){
txtCost.text = "MAX";
} else {
if (upgradesCosts[sel][arr["upgrades"][sel]] <= arr["money"]){
txtCost.text = (String(upgradesCosts[sel][arr["upgrades"][sel]]) + " $");
} else {
txtCost.htmlText = (("<font color='#FB5554'>" + String(upgradesCosts[sel][arr["upgrades"][sel]])) + " $</font>");
};
};
}
public function reset():void{
MovieClip(parent).spawn("ResetUpgrades");
}
public function targ():void{
MovieClip(parent).spawn("MissileTarget");
}
public function buy():void{
if ((((arr.upgrades[sel] < upMax[sel])) && ((upgradesCosts[sel][arr.upgrades[sel]] <= arr["money"])))){
arr["money"] = (arr["money"] - upgradesCosts[sel][arr.upgrades[sel]]);
var _local1 = arr.upgrades;
var _local2 = sel;
var _local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
setText();
saveGame = true;
};
}
public function func():void{
var _local1:int;
_local1 = 0;
while (_local1 < allButtons.length) {
if (allButtons[_local1].hitTestPoint(stage.mouseX, stage.mouseY)){
sel = _local1;
setText();
break;
};
_local1++;
};
}
}
}//package