Section 1
//clip_sd88detincelle_8 (BI_fla.clip_sd88detincelle_8)
package BI_fla {
import flash.display.*;
public dynamic class clip_sd88detincelle_8 extends MovieClip {
public function clip_sd88detincelle_8(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package BI_fla
Section 2
//flaire_7 (BI_fla.flaire_7)
package BI_fla {
import flash.display.*;
public dynamic class flaire_7 extends MovieClip {
public function flaire_7(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package BI_fla
Section 3
//freesponsergames_6 (BI_fla.freesponsergames_6)
package BI_fla {
import flash.display.*;
public dynamic class freesponsergames_6 extends MovieClip {
public function freesponsergames_6(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package BI_fla
Section 4
//HoldStuff_9 (BI_fla.HoldStuff_9)
package BI_fla {
import flash.display.*;
public dynamic class HoldStuff_9 extends MovieClip {
public function HoldStuff_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BI_fla
Section 5
//MainTimeline (BI_fla.MainTimeline)
package BI_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var reloadTime:Number;
public var powerups:Array;
public var explosions:Array;
public var starbg:MovieClip;
public var badBullets:Array;
public var enemies:Array;
public var landmrksZoom:Array;
public var playerDegrees2:Number;
public var goodBullets:Array;
public var beenHere:Number;
public var starTime;
public var bryce:MovieClip;
public var record:MovieClip;
public var stransform:SoundTransform;
public var exampl:MovieClip;
public var enemiesMissed;
public var start:SimpleButton;
public var playerRadians:Number;
public var e1:enemysprite;
public var ebulletSpd:Number;
public var stars:Bitmap;
public var squarInv:MovieClip;
public var lastMouseY:Number;
public var baseHealth:Array;
public var squarAr:Array;
public var ee:Number;
public var scoretxt:TextField;
public var insNum:Number;
public var score:Number;
public var enemiesAllow:Number;
public var money:Number;
public var ammo:Array;
public var lastMouseX:Number;
public var base:planet;
public var playerRadius:Number;
public var bgs:Array;
public var goZoom:Number;
public var player:playersprite;
public var mainstage:MovieClip;
public var texts:Array;
public var next:SimpleButton;
public var squares:Array;
public var enemySpd:Number;
public var schannel2:SoundChannel;
public var schannel3:SoundChannel;
public var onRoll;
public var song:gamesong;
public var sponsor:MovieClip;
public var starData:BitmapData;
public var schannel:SoundChannel;
public var bgs2:Array;
public var weapSelected:Number;
public var maxgg:SimpleButton;
public var bulletSpd:Number;
public var mmenu:SimpleButton;
public var enemiesContainer:MovieClip;
public var more:SimpleButton;
public var dieTime:Number;
public var starbg2:MovieClip;
public var starScrollSpd:Number;
public var maxg:SimpleButton;
public var level:Number;
public var enemy:enemysprite;
public var reload:Number;
public var dlsong:SimpleButton;
public var mk:Number;
public var tickCounter:Timer;
public var maxggg:SimpleButton;
public var instructions:MovieClip;
public var titl:MovieClip;
public var difficulty;
public var frameStatus:Number;
public var bulletsContainer:MovieClip;
public var weapNames:Array;
public var rest:restsong;
public var reloadbar:MovieClip;
public var spdMod:Number;
public var starCount;
public var fscore:TextField;
public var goBack:Boolean;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
public function MouseClick(_arg1:MouseEvent):void{
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
_local2 = false;
if (weapSelected == 0){
_local2 = true;
} else {
if (ammo[1] > 0){
_local2 = true;
};
};
if ((((reload >= reloadTime)) && ((_local2 == true)))){
playSound(2);
player.play();
if (weapSelected != 0){
ammo[1] = (ammo[1] - 1);
};
reload = 0;
if ((((((weapSelected == 0)) || ((weapSelected == 3)))) || ((weapSelected == 2)))){
fire(0, 0, player.rotation, 1, true, 0xFFFFFF, weapSelected, 26);
};
if (weapSelected == 1){
fire(0, 0, (player.rotation - 2), 1, true, 0xFFFFFF, weapSelected, 26);
fire(0, 0, player.rotation, 1, true, 0xFFFFFF, weapSelected, 26);
fire(0, 0, (player.rotation + 2), 1, true, 0xFFFFFF, weapSelected, 26);
};
if (weapSelected == 4){
_local3 = -5;
_local4 = 0;
while (_local4 < 10) {
fire(0, 0, (player.rotation + _local3), 1, true, 0xFFFFFF, weapSelected, 26);
_local3++;
_local4++;
};
};
};
}
public function bryceEnterFrame(_arg1:Event){
if (currentFrame == 3){
if (bryce.currentFrame == 75){
gotoAndStop(4);
};
} else {
if (bryce){
bryce.stop();
};
};
}
public function preLoad(_arg1:TimerEvent){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = Math.round(root.loaderInfo.bytesLoaded);
_local3 = Math.round(root.loaderInfo.bytesTotal);
_local4 = (_local2 / _local3);
_local5 = _local4;
_local6 = 0;
while (_local6 < 34) {
squares[_local6].scaleX = _local5;
squares[_local6].scaleY = _local5;
squares[_local6].alpha = _local5;
squares[_local6].rotation = (45 + (45 * _local5));
_local6++;
};
if (_local4 >= 1){
_local6 = 0;
while (_local6 < 34) {
removeChild(squares[0]);
squares.splice(0, 1);
_local6++;
};
gotoAndStop(2);
tickCounter.stop();
};
trace(_local4);
}
public function mouse2(_arg1:MouseEvent){
insNum++;
}
public function fire(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Boolean, _arg6:uint, _arg7:Number, _arg8:Number):void{
var _local9:bulletsprite;
var _local10:ColorTransform;
_local9 = new bulletsprite();
_local10 = _local9.transform.colorTransform;
_local10.color = _arg6;
_local9.transform.colorTransform = _local10;
_local9.x = _arg1;
_local9.weap = _arg7;
_local9.y = _arg2;
_local9.gotoAndStop(_arg4);
_local9.rotation = _arg3;
_local9.y = (_local9.y + (_arg8 * Math.cos(((Math.PI / 180) * (_local9.rotation + 180)))));
_local9.x = (_local9.x - (_arg8 * Math.sin(((Math.PI / 180) * (_local9.rotation + 180)))));
if (_arg7 == 3){
_local9.addRot = 0;
_local9.rotation = (_arg3 + 90);
};
if (_arg5 == true){
goodBullets.push(_local9);
bulletsContainer.addChild(goodBullets[(goodBullets.length - 1)]);
};
if (_arg5 == false){
badBullets.push(_local9);
bulletsContainer.addChild(badBullets[(badBullets.length - 1)]);
};
}
public function createText(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:MovieClip;
_local4 = new txt();
_local4.gotoAndStop(_arg1);
_local4.x = _arg2;
_local4.scaleX = 0.4;
_local4.scaleY = 0.4;
_local4.y = _arg3;
_local4.alpha = 0;
_local4.stg = 0;
texts.push(_local4);
mainstage.addChild(_local4);
}
public function playSound(_arg1:Number){
var _local2:enemyfiresound;
var _local3:playerfiresound;
var _local4:playerhitsound;
var _local5:enemyhitsound;
var _local6:reflect;
if (_arg1 == 1){
stransform.volume = 0.2;
_local2 = new enemyfiresound();
schannel3 = _local2.play();
schannel3.soundTransform = stransform;
};
if (_arg1 == 2){
stransform.volume = 0.1;
_local3 = new playerfiresound();
schannel3 = _local3.play();
schannel3.soundTransform = stransform;
};
if (_arg1 == 3){
stransform.volume = 0.2;
_local4 = new playerhitsound();
schannel3 = _local4.play();
schannel3.soundTransform = stransform;
};
if (_arg1 == 4){
stransform.volume = 0.4;
_local5 = new enemyhitsound();
schannel3 = _local5.play();
schannel3.soundTransform = stransform;
};
if (_arg1 == 5){
stransform.volume = 0.1;
_local6 = new reflect();
schannel3 = _local6.play();
schannel3.soundTransform = stransform;
};
}
public function gomenu(_arg1:MouseEvent){
goBack = true;
}
function frame2(){
stop();
sponsor.addEventListener(MouseEvent.MOUSE_DOWN, clicksponsor);
addEventListener(Event.ENTER_FRAME, buzEnterFrame);
}
function frame3(){
stop();
addEventListener(Event.ENTER_FRAME, bryceEnterFrame);
}
function frame4(){
stop();
more.addEventListener(MouseEvent.MOUSE_DOWN, playmore);
dlsong.addEventListener(MouseEvent.MOUSE_DOWN, clickng);
maxgg.addEventListener(MouseEvent.MOUSE_DOWN, playmore);
start.addEventListener(MouseEvent.MOUSE_DOWN, mouse);
next.addEventListener(MouseEvent.MOUSE_DOWN, mouse2);
addEventListener(Event.ENTER_FRAME, EnterFrame);
insNum = 0;
beenHere = 0;
start.visible = false;
}
public function randomEnemyFire(){
var _local1:Number;
_local1 = Math.floor((Math.random() * enemies.length));
fire(enemies[_local1].x, enemies[_local1].y, (enemies[_local1].rotation + 180), 1, false, enemies[_local1].color, 1, 5);
}
public function manageText():void{
var _local1:Number;
_local1 = 0;
while (_local1 < texts.length) {
if (texts[_local1].stg == 0){
texts[_local1].alpha = (texts[_local1].alpha + 0.05);
texts[_local1].y = (texts[_local1].y - 1);
if (texts[_local1].alpha >= 1){
texts[_local1].stg = 1;
texts[_local1].timr = 60;
};
};
if (texts[_local1].stg == 1){
texts[_local1].y = (texts[_local1].y - 0.3);
texts[_local1].timr--;
if (texts[_local1].timr <= 0){
texts[_local1].stg = 2;
};
};
if (texts[_local1].stg == 2){
texts[_local1].y = (texts[_local1].y - 1);
texts[_local1].alpha = (texts[_local1].alpha - 0.05);
if (texts[_local1].alpha <= 0){
mainstage.removeChild(texts[_local1]);
texts.splice(_local1, 1);
};
};
_local1++;
};
}
public function clickspons(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.MaxGames.com");
navigateToURL(_local2, "_blank");
}
public function makePlayer():void{
}
function frame5(){
stop();
maxggg.addEventListener(MouseEvent.MOUSE_DOWN, clickspons);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyDown);
mmenu.visible = false;
fscore.visible = false;
mmenu.addEventListener(MouseEvent.MOUSE_DOWN, gomenu);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyUp);
song = new gamesong();
rest = new restsong();
schannel = new SoundChannel();
schannel2 = new SoundChannel();
schannel3 = new SoundChannel();
stransform = new SoundTransform();
schannel3.soundTransform = stransform;
schannel2 = rest.play();
schannel = song.play();
bulletsContainer = new MovieClip();
enemy = new enemysprite();
enemiesContainer = new MovieClip();
player = new playersprite();
base = new planet();
score = 0;
starbg = new MovieClip();
starbg2 = new MovieClip();
starScrollSpd = 0.125;
goBack = false;
baseHealth = [4, 4, 4, 4];
reloadTime = 22;
reload = 0;
goodBullets = new Array();
badBullets = new Array();
enemies = new Array();
bulletSpd = 3;
ebulletSpd = 1.2;
enemySpd = 0.1;
explosions = new Array();
ammo = new Array();
weapNames = ["Regular", "Split", "Jumper", "SideWinder", "SuperSplit"];
money = new Number();
landmrksZoom = [68.3, 119.273];
goZoom = 2;
powerups = new Array();
weapSelected = 0;
dieTime = (4 * 30);
level = 0;
spdMod = 1;
starTime = 0;
enemiesAllow = 0;
starCount = 15;
difficulty = 100;
onRoll = 0;
enemiesMissed = 0;
texts = new Array();
ammo[0] = -1;
ammo[1] = 0;
base.x = 0;
base.y = 0;
base.scaleX = 0.5;
base.scaleY = 0.5;
player.scaleX = 0.5;
player.scaleY = 0.5;
player.gotoAndStop(1);
mainstage.addChild(starbg2);
mainstage.addChild(starbg);
mainstage.addChild(base);
mainstage.addChild(enemiesContainer);
mainstage.addChild(bulletsContainer);
mainstage.addChild(player);
manageBase();
mainstage.alpha = 1;
base.filters = [new GlowFilter(35890, 0.5, 15, 15, 3, 3, false)];
player.visible = true;
starData = new starbgone(650, 400);
stars = new Bitmap(starData);
playerRadius = 20;
playerRadians = Math.atan2((mainstage.mouseY - player.y), (mainstage.mouseX - player.x));
playerDegrees2 = Math.round(((playerRadians / Math.PI) * 180));
player.rotation = (playerDegrees2 + 90);
lastMouseX = mouseX;
lastMouseY = mouseY;
mainstage.scaleX = 2;
mainstage.scaleY = 2;
mainstage.alpha = 1;
base.cacheAsBitmap = true;
frameStatus = 0;
starbg.alpha = 1;
bgs = new Array();
bgs2 = new Array();
makeStars();
ee = 0;
while (ee < 10) {
createEnemy(1);
enemies[ee].radius = ((Math.random() * 150) + 50);
ee++;
};
createEnemy(4);
makePlayer();
}
function frame1(){
stop();
maxg.addEventListener(MouseEvent.MOUSE_DOWN, clicksponser);
tickCounter = new Timer(200, 0);
tickCounter.addEventListener(TimerEvent.TIMER, preLoad);
tickCounter.start();
squares = new Array();
squarAr = [[3, 1], [4, 1], [2, 2], [3, 2], [4, 2], [5, 2], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3], [6, 3], [0, 4], [1, 4], [3, 4], [4, 4], [6, 4], [7, 4], [0, 5], [1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [6, 5], [7, 5], [1, 6], [3, 6], [4, 6], [6, 6], [0, 7], [7, 7], [1, 8], [6, 8]];
mk = 0;
while (mk < 34) {
squarInv = new MovieClip();
squarInv.graphics.beginFill(0x990000);
squarInv.alpha = 0;
squarInv.graphics.drawRect(-15, -15, 30, 30);
squarInv.graphics.endFill();
squarInv.x = (210 + (squarAr[mk][0] * 30));
squarInv.y = (75 + (squarAr[mk][1] * 30));
squares.push(squarInv);
addChild(squares[(squares.length - 1)]);
mk++;
};
}
public function manageBullets():void{
var _local1:Number;
var _local2:Point;
var _local3:Number;
var _local4:Number;
_local1 = 0;
while (_local1 < goodBullets.length) {
if ((((((((goodBullets[_local1].weap == 0)) || ((goodBullets[_local1].weap == 1)))) || ((goodBullets[_local1].weap == 4)))) || ((goodBullets[_local1].weap == 2)))){
goodBullets[_local1].y = (goodBullets[_local1].y + (bulletSpd * Math.cos(((Math.PI / 180) * (goodBullets[_local1].rotation + 180)))));
goodBullets[_local1].x = (goodBullets[_local1].x - (bulletSpd * Math.sin(((Math.PI / 180) * (goodBullets[_local1].rotation + 180)))));
};
if (goodBullets[_local1].weap == 3){
goodBullets[_local1].y = (goodBullets[_local1].y + (bulletSpd * Math.cos(((Math.PI / 180) * (goodBullets[_local1].rotation + 180)))));
goodBullets[_local1].x = (goodBullets[_local1].x - (bulletSpd * Math.sin(((Math.PI / 180) * (goodBullets[_local1].rotation + 180)))));
goodBullets[_local1].rotation = (goodBullets[_local1].rotation + (3.14 + goodBullets[_local1].addRot));
goodBullets[_local1].addRot = (goodBullets[_local1].addRot - 0.001);
};
if (((((((((goodBullets[_local1].x * mainstage.scaleX) > 325)) || (((goodBullets[_local1].x * mainstage.scaleX) < -325)))) || (((goodBullets[_local1].y * mainstage.scaleY) > 200)))) || (((goodBullets[_local1].y * mainstage.scaleY) < -200)))){
bulletsContainer.removeChild(goodBullets[_local1]);
goodBullets.splice(_local1, 1);
_local1--;
} else {
_local2 = new Point(goodBullets[_local1].x, goodBullets[_local1].y);
_local3 = 0;
while (_local3 < enemies.length) {
_local2 = new Point(goodBullets[_local1].x, goodBullets[_local1].y);
_local2 = mainstage.localToGlobal(_local2);
if (enemies[_local3].hitTestPoint(_local2.x, _local2.y, true)){
playSound(4);
enemies[_local3].health--;
enemies[_local3].brightnes = 1;
if (goodBullets[_local1].weap == 2){
fire(enemies[_local3].x, enemies[_local3].y, (Math.random() * 360), 1, true, 0xFFFFFF, 1, 0);
fire(enemies[_local3].x, enemies[_local3].y, (Math.random() * 360), 1, true, 0xFFFFFF, 1, 0);
fire(enemies[_local3].x, enemies[_local3].y, (Math.random() * 360), 1, true, 0xFFFFFF, 1, 0);
fire(enemies[_local3].x, enemies[_local3].y, (Math.random() * 360), 1, true, 0xFFFFFF, 1, 0);
fire(enemies[_local3].x, enemies[_local3].y, (Math.random() * 360), 1, true, 0xFFFFFF, 1, 0);
};
bulletsContainer.removeChild(goodBullets[_local1]);
goodBullets.splice(_local1, 1);
break;
};
_local3++;
};
_local4 = 0;
while (_local4 < powerups.length) {
if (!goodBullets[_local1]){
break;
};
_local2 = new Point(goodBullets[_local1].x, goodBullets[_local1].y);
_local2 = mainstage.localToGlobal(_local2);
if (powerups[_local4].hitTestPoint(_local2.x, _local2.y, true)){
bulletsContainer.removeChild(powerups[_local4]);
ammo[1] = 20;
bulletsContainer.removeChild(goodBullets[_local1]);
goodBullets.splice(_local1, 1);
weapSelected = powerups[_local4].weap;
explosion(powerups[_local4].x, powerups[_local4].y, 4975482, 5);
powerups.splice(_local4, 1);
};
_local4++;
};
};
_local1++;
};
_local1 = 0;
while (_local1 < badBullets.length) {
if (((((((((badBullets[_local1].x * mainstage.scaleX) > 325)) || (((badBullets[_local1].x * mainstage.scaleX) < -325)))) || (((badBullets[_local1].y * mainstage.scaleY) > 200)))) || (((badBullets[_local1].y * mainstage.scaleY) < -200)))){
bulletsContainer.removeChild(badBullets[_local1]);
badBullets.splice(_local1, 1);
_local1--;
} else {
badBullets[_local1].y = (badBullets[_local1].y + (ebulletSpd * Math.cos(((Math.PI / 180) * (badBullets[_local1].rotation + 180)))));
badBullets[_local1].x = (badBullets[_local1].x - (ebulletSpd * Math.sin(((Math.PI / 180) * (badBullets[_local1].rotation + 180)))));
_local2 = new Point(badBullets[_local1].x, badBullets[_local1].y);
_local2 = mainstage.localToGlobal(_local2);
if (player.hitTestPoint(_local2.x, _local2.y, true)){
playSound(5);
explosion(badBullets[_local1].x, badBullets[_local1].y, 0xFFFFFF, 5);
bulletsContainer.removeChild(badBullets[_local1]);
badBullets.splice(_local1, 1);
_local1--;
} else {
if (((base.part1.hitTestPoint(_local2.x, _local2.y, true)) && ((baseHealth[0] > 0)))){
playSound(3);
var _local5 = baseHealth;
var _local6:int;
var _local7 = (_local5[_local6] - 1);
_local5[_local6] = _local7;
explosion(badBullets[_local1].x, badBullets[_local1].y, 42815, 5);
enemiesMissed = 0;
base.gotoAndStop(baseHealth[0]);
bulletsContainer.removeChild(badBullets[_local1]);
badBullets.splice(_local1, 1);
_local1--;
} else {
if (((base.part2.hitTestPoint(_local2.x, _local2.y, true)) && ((baseHealth[1] > 0)))){
playSound(3);
_local5 = baseHealth;
_local6 = 1;
_local7 = (_local5[_local6] - 1);
_local5[_local6] = _local7;
enemiesMissed = 0;
explosion(badBullets[_local1].x, badBullets[_local1].y, 42815, 5);
base.gotoAndStop(baseHealth[1]);
bulletsContainer.removeChild(badBullets[_local1]);
badBullets.splice(_local1, 1);
_local1--;
} else {
if (((base.part3.hitTestPoint(_local2.x, _local2.y, true)) && ((baseHealth[2] > 0)))){
playSound(3);
_local5 = baseHealth;
_local6 = 2;
_local7 = (_local5[_local6] - 1);
_local5[_local6] = _local7;
enemiesMissed = 0;
explosion(badBullets[_local1].x, badBullets[_local1].y, 42815, 5);
base.gotoAndStop(baseHealth[2]);
bulletsContainer.removeChild(badBullets[_local1]);
badBullets.splice(_local1, 1);
_local1--;
} else {
if (((base.part4.hitTestPoint(_local2.x, _local2.y, true)) && ((baseHealth[3] > 0)))){
playSound(3);
_local5 = baseHealth;
_local6 = 3;
_local7 = (_local5[_local6] - 1);
_local5[_local6] = _local7;
enemiesMissed = 0;
explosion(badBullets[_local1].x, badBullets[_local1].y, 42815, 5);
base.gotoAndStop(baseHealth[3]);
bulletsContainer.removeChild(badBullets[_local1]);
badBullets.splice(_local1, 1);
_local1--;
};
};
};
};
};
};
_local1++;
};
}
public function createEnemy(_arg1:Number):void{
var _local2:enemysprite;
var _local3:ColorTransform;
_local2 = new enemysprite();
_local3 = _local2.transform.colorTransform;
_local2.scaleX = 0.5;
_local2.scaleY = 0.5;
if (_arg1 == 1){
_local3.color = 0xCC0000;
_local2.color = 0xCC0000;
_local2.origFrame = 1;
_local2.health = 1;
};
if (_arg1 == 2){
_local3.color = 0xCC6600;
_local2.color = 0xCC6600;
_local2.origFrame = 3;
_local2.health = 1;
};
if (_arg1 == 3){
_local3.color = 3355545;
_local2.color = 3355545;
_local2.origFrame = 5;
_local2.health = 2;
};
if (_arg1 == 4){
_local3.color = 6723891;
_local2.color = 6723891;
_local2.origFrame = 1;
_local2.health = 2;
};
if (_arg1 == 5){
_local3.color = 0x666666;
_local2.color = 0x666666;
_local2.origFrame = 3;
_local2.health = 3;
};
if (_arg1 == 6){
_local2.scaleX = 1;
_local2.scaleY = 1;
_local3.color = 0x6666;
_local2.color = 0x6666;
_local2.origFrame = 5;
_local2.health = 4;
};
_local2.degrees = (Math.random() * 360);
_local2.radius = ((750 / mainstage.scaleX) / 2);
_local2.etype = _arg1;
_local2.transform.colorTransform = _local3;
_local2.brightnes = 0;
_local2.gotoAndStop((1 + frameStatus));
manageEnemies();
_local2.filters = [new GlowFilter(_local2.color, 0.5, 15, 15, 3)];
enemies.push(_local2);
enemiesContainer.addChild(enemies[(enemies.length - 1)]);
}
public function managePowerups(){
var _local1:Number;
_local1 = 0;
while (_local1 < powerups.length) {
if ((((powerups[_local1].alpha < 1)) && ((powerups[_local1].timer > 0)))){
powerups[_local1].alpha = (powerups[_local1].alpha + 0.1);
};
powerups[_local1].x = (powerups[_local1].x + powerups[_local1].dir);
powerups[_local1].y = (powerups[_local1].y + powerups[_local1].dir);
powerups[_local1].timer--;
if (powerups[_local1].timer <= 0){
powerups[_local1].alpha = (powerups[_local1].alpha - 0.1);
if (powerups[_local1].alpha <= 0){
bulletsContainer.removeChild(powerups[_local1]);
powerups.splice(_local1, 1);
_local1--;
};
};
_local1++;
};
}
public function clicksponsor(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.MaxGames.com");
navigateToURL(_local2, "_blank");
}
public function mouse(_arg1:MouseEvent){
nextFrame();
}
public function managePlayer():void{
player.x = Math.round(player.x);
player.y = Math.round(player.y);
playerRadians = Math.atan2((mainstage.mouseY - player.y), (mainstage.mouseX - player.x));
playerDegrees2 = Math.round(((playerRadians / Math.PI) * 180));
player.rotation = (playerDegrees2 + 90);
lastMouseX = mouseX;
lastMouseY = mouseY;
if (ammo[1] <= 0){
weapSelected = 0;
};
}
public function playmore(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.MaxGames.com");
navigateToURL(_local2, "_blank");
}
public function onEnterFrame(_arg1:Event){
var _local2:Number;
var _local3:Number;
if (currentFrame == 5){
scoretxt.text = ("Score: " + score);
if (enemiesMissed == 0){
onRoll = 0;
} else {
if (enemiesMissed > 70){
if (onRoll == 6){
createText(7, 0, 0);
};
onRoll = 7;
} else {
if (enemiesMissed > 60){
if (onRoll == 5){
createText(6, 0, 0);
};
onRoll = 6;
} else {
if (enemiesMissed > 50){
if (onRoll == 4){
createText(5, 0, 0);
};
onRoll = 5;
} else {
if (enemiesMissed > 40){
if (onRoll == 3){
createText(4, 0, 0);
};
onRoll = 4;
} else {
if (enemiesMissed > 30){
if (onRoll == 2){
createText(3, 0, 0);
};
onRoll = 3;
} else {
if (enemiesMissed > 20){
if (onRoll == 1){
createText(2, 0, 0);
};
onRoll = 2;
} else {
if (enemiesMissed > 10){
if (onRoll == 0){
createText(1, 0, 0);
};
onRoll = 1;
};
};
};
};
};
};
};
};
if (enemiesMissed > 70){
weapSelected = 2;
ammo[1] = 20;
};
record.gotoAndStop((onRoll + 1));
if (player.currentFrame == 1){
player.stop();
};
if (mainstage.scaleX > goZoom){
mainstage.scaleX = (mainstage.scaleX - ((mainstage.scaleX - goZoom) / 6));
mainstage.scaleY = (mainstage.scaleY - ((mainstage.scaleY - goZoom) / 6));
};
if (reload < reloadTime){
reload++;
};
if ((((((((baseHealth[0] <= 0)) && ((baseHealth[1] <= 0)))) && ((baseHealth[2] <= 0)))) && ((baseHealth[3] <= 0)))){
if (dieTime == (4 * 30)){
createText(8, 0, 0);
};
dieTime--;
explosion(0, 0, 42815, 35);
schannel.stop();
schannel2.stop();
if (dieTime <= 0){
mmenu.visible = true;
fscore.visible = true;
fscore.text = ("FINAL SCORE: " + score);
};
if (goBack == true){
schannel.stop();
schannel2.stop();
player.visible = true;
dieTime = (4 * 30);
baseHealth[0] = 4;
baseHealth[1] = 4;
baseHealth[2] = 4;
baseHealth[3] = 4;
base.part1.gotoAndStop(1);
base.part2.gotoAndStop(1);
base.part3.gotoAndStop(1);
base.part4.gotoAndStop(1);
weapSelected = 0;
ammo[1] = 0;
_local3 = 0;
while (_local3 < enemies.length) {
enemies.pop();
_local3++;
};
_local3 = 0;
while (_local3 < goodBullets.length) {
goodBullets.pop();
_local3++;
};
_local3 = 0;
while (_local3 < badBullets.length) {
badBullets.pop();
_local3++;
};
_local3 = 0;
while (_local3 < powerups.length) {
powerups.pop();
_local3++;
};
gotoAndStop(4);
};
};
_local2 = (reload / reloadTime);
reloadbar.mask1.width = Math.round((_local2 * 155.9));
_local2 = (ammo[1] / 20);
base.ammoBar.height = Math.round((_local2 * 55));
base.ammoName.text = weapNames[weapSelected];
handleLevelMusic();
scrollStars();
manageBase();
managePowerups();
manageText();
manageExplosions();
if (dieTime >= (4 * 30)){
manageEnemies();
managePlayer();
manageBullets();
};
};
}
public function manageEnemies():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Point;
var _local10:ColorTransform;
var _local11:Number;
var _local12:Number;
_local1 = 0;
while (_local1 < enemies.length) {
if (enemies[_local1].brightnes > 0){
enemies[_local1].brightnes = (enemies[_local1].brightnes - 0.1);
_local10 = enemies[_local1].transform.colorTransform;
_local10.color = 0xFFFFFF;
} else {
_local10 = enemies[_local1].transform.colorTransform;
_local10.color = enemies[_local1].color;
};
enemies[_local1].transform.colorTransform = _local10;
_local2 = Math.atan2((base.y - enemies[_local1].y), (base.x - enemies[_local1].x));
_local3 = Math.round(((_local2 / Math.PI) * 180));
enemies[_local1].rotation = ((_local3 + 90) + 180);
if ((((((((enemies[_local1].etype == 1)) || ((enemies[_local1].etype == 4)))) || ((enemies[_local1].etype == 5)))) || ((enemies[_local1].etype == 6)))){
enemies[_local1].radius = (enemies[_local1].radius - enemySpd);
};
if ((((enemies[_local1].etype == 2)) || ((enemies[_local1].etype == 3)))){
enemies[_local1].radius = (enemies[_local1].radius - (enemySpd * 2));
};
if (enemies[_local1].etype == 1){
enemies[_local1].degrees = (enemies[_local1].degrees - (schannel2.leftPeak / 10));
};
if (enemies[_local1].etype == 4){
enemies[_local1].degrees = (enemies[_local1].degrees - 1);
};
if (enemies[_local1].etype == 3){
enemies[_local1].degrees = (enemies[_local1].degrees - (schannel2.leftPeak / 5));
};
_local4 = base.x;
_local5 = base.y;
_local6 = (enemies[_local1].degrees * (Math.PI / 180));
_local7 = (enemies[_local1].radius * Math.cos(_local6));
_local8 = (enemies[_local1].radius * Math.sin(_local6));
enemies[_local1].x = (_local7 + _local4);
enemies[_local1].y = (_local8 + _local5);
enemies[_local1].gotoAndStop((enemies[_local1].origFrame + frameStatus));
if ((((((enemies[_local1].etype == 1)) || ((enemies[_local1].etype == 2)))) || ((enemies[_local1].etype == 3)))){
_local11 = Math.round((Math.random() * 600));
if (_local11 == 50){
fire(enemies[_local1].x, enemies[_local1].y, (enemies[_local1].rotation + 180), 1, false, enemies[_local1].color, 0, 4);
};
};
if (enemies[_local1].etype == 4){
_local11 = Math.round((Math.random() * 400));
if (_local11 == 50){
fire(enemies[_local1].x, enemies[_local1].y, (enemies[_local1].rotation + 180), 2, false, enemies[_local1].color, 0, 4);
};
};
if (enemies[_local1].etype == 5){
enemies[_local1].graphics.clear();
enemies[_local1].graphics.lineStyle(1, enemies[_local1].color);
_local12 = 0;
while (_local12 < 10) {
enemies[_local1].graphics.moveTo(0, 0);
enemies[_local1].graphics.lineTo(((Math.random() * 50) - 25), ((Math.random() * 50) - 25));
_local12++;
};
_local11 = Math.round((Math.random() * 350));
if (_local11 == 50){
fire(enemies[_local1].x, enemies[_local1].y, (enemies[_local1].rotation + 180), 1, false, enemies[_local1].color, 0, 4);
};
};
if (enemies[_local1].etype == 6){
_local11 = Math.round((Math.random() * 200));
if (_local11 == 50){
fire(enemies[_local1].x, enemies[_local1].y, ((enemies[_local1].rotation + 180) - 3), 1, false, enemies[_local1].color, 0, 4);
fire(enemies[_local1].x, enemies[_local1].y, ((enemies[_local1].rotation + 180) + 3), 1, false, enemies[_local1].color, 0, 4);
};
};
if (_local11 == 50){
playSound(1);
};
_local9 = new Point(enemies[_local1].x, enemies[_local1].y);
_local9 = mainstage.localToGlobal(_local9);
if (player.hitTestPoint(_local9.x, _local9.y)){
playSound(4);
enemies[_local1].health = 0;
explosion(enemies[_local1].x, enemies[_local1].y, 0xFFFFFF, 10);
};
_local9 = new Point(enemies[_local1].x, enemies[_local1].y);
_local9 = mainstage.localToGlobal(_local9);
if (((base.part1.hitTestPoint(_local9.x, _local9.y)) && ((baseHealth[0] > 0)))){
playSound(3);
enemiesMissed = 0;
enemies[_local1].health = 0;
base.gotoAndStop(baseHealth[0]);
var _local13 = baseHealth;
var _local14:int;
var _local15 = (_local13[_local14] - 1);
_local13[_local14] = _local15;
explosion(enemies[_local1].x, enemies[_local1].y, 42815, 5);
};
if (((base.part2.hitTestPoint(_local9.x, _local9.y)) && ((baseHealth[1] > 0)))){
playSound(3);
enemiesMissed = 0;
enemies[_local1].health = 0;
base.gotoAndStop(baseHealth[1]);
_local13 = baseHealth;
_local14 = 1;
_local15 = (_local13[_local14] - 1);
_local13[_local14] = _local15;
explosion(enemies[_local1].x, enemies[_local1].y, 42815, 5);
};
if (((base.part3.hitTestPoint(_local9.x, _local9.y)) && ((baseHealth[2] > 0)))){
playSound(3);
enemiesMissed = 0;
enemies[_local1].health = 0;
base.gotoAndStop(baseHealth[2]);
_local13 = baseHealth;
_local14 = 2;
_local15 = (_local13[_local14] - 1);
_local13[_local14] = _local15;
explosion(enemies[_local1].x, enemies[_local1].y, 42815, 5);
};
if (((base.part4.hitTestPoint(_local9.x, _local9.y)) && ((baseHealth[3] > 0)))){
playSound(3);
enemiesMissed = 0;
enemies[_local1].health = 0;
base.gotoAndStop(baseHealth[3]);
_local13 = baseHealth;
_local14 = 3;
_local15 = (_local13[_local14] - 1);
_local13[_local14] = _local15;
explosion(enemies[_local1].x, enemies[_local1].y, 42815, 5);
};
if (enemies[_local1].health <= 0){
score = (score + Math.round(((enemies[_local1].etype / difficulty) * 100)));
enemiesMissed++;
explosion(enemies[_local1].x, enemies[_local1].y, enemies[_local1].color, 15);
enemiesContainer.removeChild(enemies[_local1]);
enemies.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function makeStars():void{
var _local1:Number;
var _local2:MovieClip;
var _local3:Number;
_local1 = 0;
while (_local1 < 50) {
_local2 = new MovieClip();
_local2.x = ((Math.random() * 650) - 325);
_local2.y = ((Math.random() * 400) - 200);
_local2.graphics.beginFill(0xFFFFFF);
_local3 = (Math.random() + 0.5);
_local2.graphics.drawCircle(0, 0, _local3);
_local2.alpha = _local3;
_local2.s = _local3;
_local2.graphics.endFill();
bgs2.push(_local2);
starbg2.addChild(_local2);
_local1++;
};
}
public function explosion(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number):void{
var _local5:Number;
var _local6:MovieClip;
_local5 = 0;
while (_local5 < _arg4) {
_local6 = new MovieClip();
_local6.graphics.beginFill(_arg3, (Math.random() + 0.5));
_local6.graphics.drawRect(-1, -1, 2, 2);
_local6.graphics.endFill();
_local6.x = _arg1;
_local6.scaleX = 2;
_local6.scaleY = 2;
_local6.y = _arg2;
_local6.rotation = (Math.random() * 360);
_local6.spd = (Math.random() + 0.3);
mainstage.addChild(_local6);
explosions.push(_local6);
_local5++;
};
}
public function clickng(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.newgrounds.com/audio/view.php?id=141725");
navigateToURL(_local2, "_blank");
}
public function handleLevelMusic(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:ColorTransform;
var _local5:Number;
_local1 = Math.round((Math.random() * 1000));
if (_local1 == 1){
createPowerup();
};
_local2 = Math.round((Math.random() * (difficulty - (level * 4))));
if (_local2 == 1){
_local5 = Math.round((Math.random() * enemiesAllow));
createEnemy((_local5 + 1));
};
if (level == 0){
if (schannel.position > (34 * 1000)){
starScrollSpd = 1;
enemiesAllow = 1;
difficulty = 60;
};
if (schannel.position > (68 * 1000)){
starScrollSpd = 2;
enemiesAllow = 2;
difficulty = 30;
};
if (schannel.position > (119 * 1000)){
starScrollSpd = 3;
enemiesAllow = 3;
difficulty = 25;
};
};
if (level > 0){
if (schannel.position > (34 * 1000)){
starScrollSpd = (1 * level);
enemiesAllow = 4;
difficulty = 60;
};
if (schannel.position > (68 * 1000)){
starScrollSpd = (2 * level);
enemiesAllow = 5;
difficulty = 30;
};
if (schannel.position > (119 * 1000)){
starScrollSpd = (3 * level);
enemiesAllow = 6;
difficulty = 25;
};
};
if (schannel.leftPeak > 0.75){
frameStatus = 1;
} else {
frameStatus = 0;
};
if (schannel.position > (85.281 * 1000)){
spdMod = 1.5;
};
if (schannel.position > (119 * 1000)){
spdMod = 2;
};
if (schannel.position < (85.281 * 1000)){
spdMod = 1;
};
if (schannel.position >= (187.525 * 1000)){
if (reloadTime > 2){
reloadTime = (reloadTime - 3);
};
schannel = song.play((28.15 * 1000));
schannel2 = rest.play((28.15 * 1000));
level++;
};
if (schannel.position >= (landmrksZoom[0] * 1000)){
goZoom = 1.75;
};
if (schannel.position >= (landmrksZoom[1] * 1000)){
goZoom = 1.5;
};
if (schannel.position < (landmrksZoom[0] * 1000)){
goZoom = 2;
mainstage.scaleX = 2;
mainstage.scaleY = 2;
};
if (schannel.leftPeak > (_local3 + 0.15)){
randomEnemyFire();
};
_local3 = schannel.leftPeak;
_local4 = base.transform.colorTransform;
_local4.redMultiplier = (0.5 + (schannel.leftPeak / 2));
_local4.blueMultiplier = (0.5 + (schannel.leftPeak / 2));
_local4.greenMultiplier = (0.5 + (schannel.leftPeak / 2));
_local4.alphaMultiplier = 1;
base.transform.colorTransform = _local4;
enemySpd = (schannel.leftPeak * spdMod);
ebulletSpd = ((schannel.leftPeak * 3) * spdMod);
}
public function KeyUp(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _arg1.keyCode;
if (_local2 == 83){
};
}
public function manageExplosions():void{
var _local1:Number;
_local1 = 0;
while (_local1 < explosions.length) {
explosions[_local1].y = (explosions[_local1].y + (explosions[_local1].spd * Math.cos(((Math.PI / 180) * (explosions[_local1].rotation + 180)))));
explosions[_local1].x = (explosions[_local1].x - (explosions[_local1].spd * Math.sin(((Math.PI / 180) * (explosions[_local1].rotation + 180)))));
explosions[_local1].alpha = (explosions[_local1].alpha - 0.05);
explosions[_local1].scaleX = (explosions[_local1].scaleX - 0.08);
explosions[_local1].scaleY = (explosions[_local1].scaleY - 0.08);
if (explosions[_local1].alpha <= 0){
mainstage.removeChild(explosions[_local1]);
explosions.splice(_local1, 1);
};
_local1++;
};
}
public function clicksponser(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.MaxGames.com");
navigateToURL(_local2, "_blank");
}
public function buzEnterFrame(_arg1:Event){
if (currentFrame == 2){
if (sponsor.currentFrame == 270){
gotoAndStop(3);
};
};
}
public function getDistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
var _local5:Number;
var _local6:Number;
_local5 = (_arg1 - _arg3);
_local6 = (_arg2 - _arg4);
return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))));
}
public function KeyDown(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _arg1.keyCode;
if (_local2 == 83){
};
}
public function EnterFrame(_arg1:Event){
if (currentFrame == 4){
titl.play();
instructions.gotoAndStop((insNum + 1));
if (insNum == 0){
if (exampl.currentFrame == 36){
exampl.gotoAndPlay(1);
};
};
if (insNum == 1){
if (exampl.currentFrame == 56){
exampl.gotoAndPlay(36);
};
};
if (insNum == 2){
if (exampl.currentFrame == 86){
exampl.gotoAndPlay(56);
};
};
if (insNum == 3){
exampl.gotoAndStop(87);
next.visible = false;
start.visible = true;
};
};
}
public function scrollStars():void{
var _local1:MovieClip;
var _local2:Number;
if (onRoll >= 5){
_local1 = new MovieClip();
_local1.graphics.lineStyle(2, 0x9900);
_local1.alpha = (((schannel.leftPeak + schannel.rightPeak) / 2) / 2);
if (onRoll == 7){
_local1.graphics.lineStyle(2, 16763955);
_local1.alpha = (((schannel.leftPeak + schannel.rightPeak) / 2) / 1.5);
};
_local1.graphics.drawCircle(0, 0, 10);
_local1.x = 0;
_local1.y = 0;
starbg.addChild(_local1);
bgs.push(_local1);
_local2 = 0;
while (_local2 < bgs.length) {
bgs[_local2].scaleX = (bgs[_local2].scaleX + 0.4);
bgs[_local2].scaleY = (bgs[_local2].scaleY + 0.4);
bgs[_local2].alpha = (bgs[_local2].alpha - 0.05);
if (bgs[_local2].alpha <= 0){
starbg.removeChild(bgs[_local2]);
bgs.splice(_local2, 1);
_local2--;
};
_local2++;
};
} else {
_local2 = 0;
while (_local2 < bgs.length) {
starbg.removeChild(bgs[0]);
bgs.splice(0, 1);
_local2++;
};
};
_local2 = 0;
while (_local2 < bgs2.length) {
bgs2[_local2].x = (bgs2[_local2].x + (((bgs2[_local2].s + schannel.leftPeak) / 2) * starScrollSpd));
if (bgs2[_local2].x > 325){
bgs2[_local2].x = -325;
};
_local2++;
};
}
public function createPowerup(){
var _local1:Number;
var _local2:powerup;
_local1 = Math.round((Math.random() * 3));
_local2 = new powerup();
_local2.gotoAndStop((1 + _local1));
_local2.scaleX = 0.35;
_local2.scaleY = 0.35;
_local2.timer = (5 * 30);
_local2.weap = (_local1 + 1);
_local2.dir = (-0.5 + (Math.random() * 1));
_local2.x = (-(((650 / mainstage.scaleX) / 2)) + Math.round((Math.random() * (650 / mainstage.scaleX))));
_local2.y = (-(((400 / mainstage.scaleY) / 2)) + Math.round((Math.random() * (400 / mainstage.scaleY))));
_local2.alpha = 0;
bulletsContainer.addChild(_local2);
powerups.push(_local2);
}
public function manageBase():void{
if (baseHealth[0] > 0){
base.part1.gotoAndStop(baseHealth[0]);
} else {
base.part1.visible = false;
};
if (baseHealth[1] > 0){
base.part2.gotoAndStop(baseHealth[1]);
} else {
base.part2.visible = false;
};
if (baseHealth[2] > 0){
base.part3.gotoAndStop(baseHealth[2]);
} else {
base.part3.visible = false;
};
if (baseHealth[3] > 0){
base.part4.gotoAndStop(baseHealth[3]);
} else {
base.part4.visible = false;
};
}
}
}//package BI_fla
Section 6
//reload_29 (BI_fla.reload_29)
package BI_fla {
import flash.display.*;
public dynamic class reload_29 extends MovieClip {
public var mask1:MovieClip;
}
}//package BI_fla
Section 7
//bulletsprite (bulletsprite)
package {
import flash.display.*;
public dynamic class bulletsprite extends MovieClip {
}
}//package
Section 8
//enemyfiresound (enemyfiresound)
package {
import flash.media.*;
public dynamic class enemyfiresound extends Sound {
}
}//package
Section 9
//enemyhitsound (enemyhitsound)
package {
import flash.media.*;
public dynamic class enemyhitsound extends Sound {
}
}//package
Section 10
//enemysprite (enemysprite)
package {
import flash.display.*;
public dynamic class enemysprite extends MovieClip {
}
}//package
Section 11
//gamesong (gamesong)
package {
import flash.media.*;
public dynamic class gamesong extends Sound {
}
}//package
Section 12
//planet (planet)
package {
import flash.display.*;
import flash.text.*;
public dynamic class planet extends MovieClip {
public var ammoBar:MovieClip;
public var ammoName:TextField;
public var part2:MovieClip;
public var part4:MovieClip;
public var part3:MovieClip;
public var part1:MovieClip;
}
}//package
Section 13
//playerfiresound (playerfiresound)
package {
import flash.media.*;
public dynamic class playerfiresound extends Sound {
}
}//package
Section 14
//playerhitsound (playerhitsound)
package {
import flash.media.*;
public dynamic class playerhitsound extends Sound {
}
}//package
Section 15
//playersprite (playersprite)
package {
import flash.display.*;
public dynamic class playersprite extends MovieClip {
}
}//package
Section 16
//powerup (powerup)
package {
import flash.display.*;
public dynamic class powerup extends MovieClip {
}
}//package
Section 17
//reflect (reflect)
package {
import flash.media.*;
public dynamic class reflect extends Sound {
}
}//package
Section 18
//restsong (restsong)
package {
import flash.media.*;
public dynamic class restsong extends Sound {
}
}//package
Section 19
//starbgone (starbgone)
package {
import flash.display.*;
public dynamic class starbgone extends BitmapData {
public function starbgone(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 20
//txt (txt)
package {
import flash.display.*;
public dynamic class txt extends MovieClip {
}
}//package