Section 1
//Char_85 (_fla.Char_85)
package _fla {
import flash.events.*;
import flash.display.*;
import flash.filters.*;
public dynamic class Char_85 extends MovieClip {
public var xpos:Number;
public var ypos:Number;
public var b:Number;
public var max:Number;
public var filter:GlowFilter;
public var elec:MovieClip;
public var p1:MovieClip;
public var dude:MovieClip;
public var colarr:Array;
public var randomizer:Number;
public function Char_85(){
addFrameScript(0, frame1);
}
public function OEF(_arg1){
var _local2:Number;
var _local3:Number;
var _local4:Number;
elec.graphics.clear();
elec.graphics.moveTo(dude.x, dude.y);
_local2 = 1;
while (_local2 < max) {
elec.graphics.lineStyle((Math.round((Math.random() * 2)) + 1), colarr[0]);
elec.filters = [filter];
_local3 = ((((p1.x - dude.x) * (_local2 / (max - 1))) + Math.round((Math.random() * randomizer))) - Math.round((Math.random() * randomizer)));
_local4 = ((((p1.y - dude.y) * (_local2 / (max - 1))) + Math.round((Math.random() * randomizer))) - Math.round((Math.random() * randomizer)));
elec.graphics.lineTo((dude.x + _local3), (dude.y + _local4));
_local2++;
};
elec.graphics.lineTo(p1.x, p1.y);
}
function frame1(){
filter = new GlowFilter(13426175, 200, 10, 10, 2);
colarr = ["0xFFFFFF"];
dude.visible = false;
p1.visible = false;
b = 101;
randomizer = 5;
max = (6 + Math.round((Math.random() * 3)));
xpos = dude.x;
ypos = dude.y;
elec = new MovieClip();
addChild(elec);
addEventListener(Event.ENTER_FRAME, OEF);
}
}
}//package _fla
Section 2
//loadED_77 (_fla.loadED_77)
package _fla {
import flash.display.*;
public dynamic class loadED_77 extends MovieClip {
public function loadED_77(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package _fla
Section 3
//MainTimeline (_fla.MainTimeline)
package _fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.filters.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public const i:Number = 30;
public const menuphei:int = 45;
public const phei:int = 40;
public const leng:int = 0x0100;
public const lhei:int = 50;
public const color:String = "ffffff";
public const rhei:int = 250;
public const num:Number = 0.70703125;
public const maxnum:Number = 0x0200;
public const sizeness:int = 3;
public var scorebox:TextField;
public var left:Boolean;
public var right:Boolean;
public var lbar:MovieClip;
public var ngbut:SimpleButton;
public var ycoord:Number;
public var quiet:Boolean;
public var xspd:Number;
public var sc:SoundChannel;
public var minc:Number;
public var fbut:SimpleButton;
public var filtbox:TextField;
public var e:Number;
public var bytes:ByteArray;
public var menubytes:ByteArray;
public var g:Graphics;
public var vharr:Array;
public var scount:Number;
public var aArr:Array;
public var s:Sound;
public var score:Number;
public var agbut:SimpleButton;
public var yspd:Number;
public var xSpeed:Number;
public var down:Boolean;
public var up:Boolean;
public var beated:Boolean;
public var gm:Graphics;
public var sArr:Array;
public var quiettime:Number;
public var song:Number;
public var sound:menusong;
public var highx:Number;
public var mult:Number;
public var menumc:MovieClip;
public var curxspot:Number;
public var ySpeed:Number;
public var acount:Number;
public var char:MovieClip;
public var filteron:Boolean;
public var sndChannel:SoundChannel;
public var playbutton:SimpleButton;
public var filterstatus:String;
public var filter:GlowFilter;
public var shield:Number;
public var mc:MovieClip;
public var oldpeak:Number;
public var xcoord:Number;
public var shieldbox:TextField;
public var gameover:Boolean;
public var but1:SimpleButton;
public var but2:SimpleButton;
public var but3:SimpleButton;
public var but4:SimpleButton;
public var structionsx:Number;
public var playx:Number;
public var sharr:Array;
public var stuff:SimpleButton;
public var structionsbutton:SimpleButton;
public var beated2:Boolean;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function showAmplitude(_arg1:Event){
var _local2:Number;
var _local3:Number;
_local2 = 70;
_local3 = 30;
if ((100 * sc.leftPeak) > (oldpeak + minc)){
if (!beated){
shield = (shield + 2);
shoot();
asteroid();
};
beated2 = true;
beated = true;
} else {
beated = false;
};
oldpeak = (100 * sc.leftPeak);
}
public function fin(_arg1:Event){
gameover = true;
sc.removeEventListener(Event.SOUND_COMPLETE, fin);
}
public function playdagame(_arg1){
if (curxspot != playx){
curxspot = playx;
} else {
removeChild(menumc);
sndChannel.stop();
stage.removeEventListener(Event.ENTER_FRAME, menuOEF);
gotoAndStop("game");
};
}
public function shoot(){
var bul:shot;
var sOEF:Function;
var spd:*;
sOEF = function (_arg1){
_arg1.target.x = (_arg1.target.x + spd);
if (_arg1.target.x > (stage.stageWidth + 20)){
_arg1.target.removeEventListener(Event.ENTER_FRAME, sOEF);
_arg1.target.parent.removeChild(_arg1.target);
};
};
scount++;
bul = new shot();
addChild(bul);
bul.name = ("b_" + scount);
sArr.push(bul);
bul.filters = [filter];
bul.x = (char.x + 50);
bul.y = (char.y - 5);
var _local2 = bul;
with (_local2) {
if (xspd > 0){
spd = (8 + xspd);
} else {
spd = 8;
};
};
bul.addEventListener(Event.ENTER_FRAME, sOEF);
}
public function kup(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 37){
_arg1.keyCode = 0;
left = false;
};
if (_arg1.keyCode == 39){
_arg1.keyCode = 0;
right = false;
};
if (_arg1.keyCode == 40){
_arg1.keyCode = 0;
down = false;
};
if (_arg1.keyCode == 38){
_arg1.keyCode = 0;
up = false;
};
}
public function onclick2(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.armorgames.com"), "_blank");
}
public function bclick(_arg1:MouseEvent){
if (curxspot == playx){
if (_arg1.target.name == "but1"){
song = 1;
} else {
if (_arg1.target.name == "but2"){
song = 2;
} else {
if (_arg1.target.name == "but3"){
song = 3;
} else {
if (_arg1.target.name == "but4"){
song = 4;
};
};
};
};
};
if (_arg1.target.name == "fbut"){
if (filteron){
filteron = false;
} else {
filteron = true;
};
};
}
function frame3(){
stop();
score = 0;
shield = 100;
left = false;
right = false;
up = false;
down = false;
mc = new MovieClip();
addChild(mc);
g = mc.graphics;
xcoord = i;
ycoord = 0;
e = 0;
while (e < 100) {
enemy();
e++;
};
xspd = 0;
yspd = 0;
sc = s.play();
quiettime = 0;
quiet = false;
gameover = false;
sc.addEventListener(Event.SOUND_COMPLETE, fin);
this.addEventListener(Event.ENTER_FRAME, showAmplitude);
beated = false;
beated2 = false;
oldpeak = 0;
sArr = new Array();
scount = -1;
xSpeed = 0;
ySpeed = 0;
bytes = new ByteArray();
char.alpha = 100;
aArr = new Array();
acount = -1;
stage.addEventListener(KeyboardEvent.KEY_DOWN, kdown);
stage.addEventListener(Event.ENTER_FRAME, OEF);
stage.addEventListener(KeyboardEvent.KEY_UP, kup);
}
function frame4(){
curxspot = playx;
gotoAndStop(2);
}
public function struc(_arg1){
curxspot = structionsx;
}
function frame2(){
stop();
filteron = true;
vharr = new Array(0, 1300, 1301, 1302, 1303);
sharr = new Array(0, "IIOUNT", "ARXLYW", "SXCNCW", "SJDDAN");
fbut.addEventListener(MouseEvent.CLICK, bclick);
but1.addEventListener(MouseEvent.CLICK, bclick);
but2.addEventListener(MouseEvent.CLICK, bclick);
but3.addEventListener(MouseEvent.CLICK, bclick);
but4.addEventListener(MouseEvent.CLICK, bclick);
mult = (stage.stageWidth / leng);
sound = new menusong();
sndChannel = sound.play(0, 9999);
stage.addEventListener(Event.ENTER_FRAME, menuOEF);
menubytes = new ByteArray();
menumc = new MovieClip();
gm = menumc.graphics;
addChild(menumc);
structionsx = 759;
highx = -695;
structionsbutton.addEventListener(MouseEvent.CLICK, struc);
playbutton.addEventListener(MouseEvent.CLICK, playdagame);
}
function frame1(){
stop();
song = 1;
playx = 33;
curxspot = playx;
ngbut.addEventListener(MouseEvent.CLICK, onclick);
agbut.addEventListener(MouseEvent.CLICK, onclick2);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING);
stage.addEventListener(Event.ENTER_FRAME, frameness);
}
public function asteroid(){
var a:MovieClip;
var gr:Graphics;
var bangle:Number;
var aspd:Number;
var rotd:Number;
var aOEF:Function;
var origi:*;
var i:*;
var xcoord:*;
var ycoord:*;
var npo:*;
var type1:*;
var xspot:*;
aOEF = function (_arg1){
if (_arg1.target != null){
if (_arg1.target.hitTestObject(char)){
shield = (shield - 25);
score = (score - 300);
splosion(_arg1.target.x, _arg1.target.y);
_arg1.target.x = -100;
_arg1.target.xspot = -100;
};
};
if (_arg1.target.x < -50){
if (_arg1.target.x > -100){
score = (score - 10);
};
_arg1.target.removeEventListener(Event.ENTER_FRAME, aOEF);
_arg1.target.parent.removeChild(_arg1.target);
};
if (beated){
xspot = (_arg1.target.x - 150);
};
_arg1.target.rotation = (_arg1.target.rotation + rotd);
_arg1.target.x = (_arg1.target.x + ((xspot - _arg1.target.x) / aspd));
};
a = new MovieClip();
gr = a.graphics;
gr.lineStyle(2, 0xFFFFFF);
addChild(a);
aArr.push(a);
acount++;
a.name = ("a_" + acount);
a.filters = [filter];
a.x = (stage.stageWidth + 50);
a.y = Math.round((Math.random() * stage.stageHeight));
a.addEventListener(Event.ENTER_FRAME, aOEF);
var _local2 = a;
with (_local2) {
origi = (15 + Math.round((Math.random() * 10)));
i = origi;
xcoord = i;
ycoord = 0;
npo = (12 + Math.round(((Math.random() * 7) - (Math.random() * 7))));
type1 = Math.round(Math.random());
xspot = (x - 150);
};
gr.beginFill(0xFFFFFF, 0.1);
gr.moveTo(xcoord, ycoord);
bangle = 0;
while (bangle <= 362) {
if ((((bangle >= (361 - (361 / npo)))) || ((bangle == (361 / npo))))){
i = origi;
} else {
i = ((origi + (Math.random() * 10)) - (Math.random() * 5));
};
xcoord = (Math.cos((bangle * (Math.PI / 180))) * i);
ycoord = (Math.sin((bangle * (Math.PI / 180))) * i);
gr.lineTo(xcoord, ycoord);
bangle = (bangle + (361 / npo));
};
gr.endFill();
aspd = 7;
rotd = ((Math.random() * 10) - (Math.random() * 10));
}
public function onclick(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.newgrounds.com"), "_blank");
}
public function OEF(_arg1):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (score <= 0){
score = 0;
};
if (shield <= 0){
shield = 0;
char.alpha = 0;
splosion(char.x, char.y);
gameover = true;
};
if (shield >= 100){
shield = 100;
};
shieldbox.text = (("Shield: " + shield) + "%");
scorebox.text = ("Score: " + score);
mc.filters = [filter];
mc.x = (char.x + 15);
mc.y = (char.y - 5);
mc.rotation = (mc.rotation + (1 / 10));
if (!gameover){
if (left == true){
if (xspd > -10){
xspd = (xspd - 2);
};
};
if (right == true){
if (xspd < 10){
xspd = (xspd + 2);
};
};
if (up == true){
if (yspd > -10){
yspd = (yspd - 2);
};
};
if (down == true){
if (yspd < 10){
yspd = (yspd + 2);
};
};
if (char.x > (stage.stageWidth - (char.width / 2))){
char.x = (stage.stageWidth - (char.width / 2));
};
if (char.x < (char.width / 2)){
char.x = (char.width / 2);
};
if (char.y > (stage.stageHeight - (char.height / 2))){
char.y = (stage.stageHeight - (char.height / 2));
};
if (char.y < (char.height / 2)){
char.y = (char.height / 2);
};
if (((!(right)) && (!(left)))){
if (xspd >= 1){
xspd = (xspd - 1);
};
if (xspd <= -1){
xspd = (xspd + 1);
};
};
} else {
mc.rotation = 0;
xspd++;
if (char.x > (stage.stageWidth + 200)){
_local5 = (acount - 55);
while (_local5 <= acount) {
if (_local5 < 0){
_local5 = 0;
};
if (((!((sArr[_local5].parent == null))) && (!((sArr[_local5] == null))))){
sArr[_local5].x = 1000;
};
if (((!((aArr[_local5].parent == null))) && (!((sArr[_local5] == null))))){
aArr[_local5].x = -100;
aArr[_local5].xspot = -100;
};
_local5++;
};
xspd = 0;
yspd = 0;
sc.stop();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kdown);
stage.removeEventListener(KeyboardEvent.KEY_UP, kup);
this.removeEventListener(Event.ENTER_FRAME, showAmplitude);
char.x = 100;
nextFrame();
stage.removeEventListener(Event.ENTER_FRAME, OEF);
} else {
_local5 = (acount - 55);
while (_local5 <= acount) {
if (_local5 < 0){
_local5 = 0;
};
if (((!((aArr[_local5].parent == null))) && (!((sArr[_local5] == null))))){
splosion(aArr[_local5].x, aArr[_local5].y);
aArr[_local5].x = -100;
aArr[_local5].xspot = -100;
};
_local5++;
};
};
};
if (((!(up)) && (!(down)))){
if (yspd >= 1){
yspd = (yspd - 1);
};
if (yspd <= -1){
yspd = (yspd + 1);
};
};
char.x = (char.x + xspd);
char.y = (char.y + yspd);
SoundMixer.computeSpectrum(bytes, false, 0);
g.clear();
g.lineStyle(2, 0xFFFFFF, 0.8);
_local2 = 0;
_local3 = 0;
g.beginFill(0xFFFFFF, 0.1);
g.moveTo(xcoord, ycoord);
_local4 = 0;
while (_local4 < 362) {
_local3 = bytes.readFloat();
_local2 = (_local3 * phei);
xcoord = ((Math.acos((_local2 * (Math.PI / 180))) * Math.cos((_local4 * (Math.PI / 180)))) * (((i * shield) / 100) + Math.abs(((xspd * shield) / 100))));
ycoord = ((Math.acos((_local2 * (Math.PI / 180))) * Math.sin((_local4 * (Math.PI / 180)))) * (((i * shield) / 100) + Math.abs(((yspd * shield) / 100))));
g.lineTo(xcoord, ycoord);
_local4 = (_local4 + num);
};
g.endFill();
if (beated2){
_local6 = (acount - 45);
while (_local6 < acount) {
_local7 = (scount - 45);
while (_local7 <= scount) {
if (_local6 < 0){
_local6 = 0;
};
if (_local7 < 0){
_local7 = 0;
};
if (aArr[_local6].hitTestObject(sArr[_local7])){
splosion(aArr[_local6].x, aArr[_local6].y);
if (aArr[_local6].parent != null){
aArr[_local6].x = -100;
aArr[_local6].xspot = -100;
score = (score + 200);
};
if (sArr[_local7].parent != null){
sArr[_local7].x = 1000;
};
};
_local7++;
};
_local6++;
};
};
}
public function frameness(_arg1){
if (lbar.currentFrame == 130){
lbar.addEventListener(MouseEvent.CLICK, clicky);
};
if (lbar.currentFrame == 154){
play();
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, PL_LOADING);
stage.removeEventListener(Event.ENTER_FRAME, frameness);
};
}
public function splosion(_arg1, _arg2){
var i:Number;
var pOEF:Function;
var part:MovieClip;
var pg:Graphics;
var pspd:Number;
var xpos = _arg1;
var ypos = _arg2;
pOEF = function (_arg1){
var event = _arg1;
var _local3 = event.target;
with (_local3) {
x = (x + (pspd * Math.sin((rotation * (Math.PI / 180)))));
y = (y - (pspd * Math.cos((rotation * (Math.PI / 180)))));
alpha = (alpha - 0.01);
if ((((y >= stage.stageHeight)) || ((y <= 0)))){
rotation = (rotation * 2);
};
};
if ((((((event.target.alpha <= 0)) || ((event.target.x >= stage.stageWidth)))) || ((event.target.x <= 0)))){
event.target.removeEventListener(Event.ENTER_FRAME, pOEF);
event.target.parent.removeChild(event.target);
};
};
i = 0;
while (i < 30) {
part = new MovieClip();
pg = part.graphics;
pg.lineStyle(2, 0xFFFFFF);
pg.moveTo(0, 0);
pg.lineTo(0, 5);
part.x = xpos;
part.y = ypos;
addChild(part);
part.rotation = Math.round((Math.random() * 360));
pspd = (2 + (Math.random() * 5));
part.addEventListener(Event.ENTER_FRAME, pOEF);
i = (i + 1);
};
}
public function menuOEF(_arg1:Event){
var _local2:Number;
var _local3:int;
if (song == 1){
s = new NG73427();
minc = 25;
but1.alpha = 0.39;
but2.alpha = (but3.alpha = (but4.alpha = 0));
} else {
if (song == 2){
s = new NG82621();
minc = 17;
but2.alpha = 0.39;
but1.alpha = (but3.alpha = (but4.alpha = 0));
} else {
if (song == 3){
s = new NG84981();
minc = 15;
but3.alpha = 0.39;
but2.alpha = (but1.alpha = (but4.alpha = 0));
} else {
if (song == 4){
s = new NG65353();
minc = 13;
but4.alpha = 0.39;
but2.alpha = (but3.alpha = (but1.alpha = 0));
};
};
};
};
if (!filteron){
filter = new GlowFilter(13426175, 0, 0, 0, 0);
} else {
filter = new GlowFilter(13426175, 200, 10, 10, 2);
};
if (filteron){
filterstatus = "ON";
} else {
filterstatus = "OFF";
};
filtbox.text = ("Filters are " + filterstatus);
but1.x = (but1.x + ((curxspot - stuff.x) / 10));
but2.x = (but3.x = (but4.x = but1.x));
stuff.x = (stuff.x + ((curxspot - stuff.x) / 10));
menumc.filters = [filter];
SoundMixer.computeSpectrum(menubytes, true, 0);
gm.clear();
gm.lineStyle(sizeness, ("0x" + color), 0.8);
gm.moveTo(0, lhei);
_local2 = 0;
_local3 = 0;
while (_local3 < leng) {
_local2 = (menubytes.readFloat() * menuphei);
gm.lineTo((_local3 * mult), (lhei + _local2));
_local3++;
};
gm.lineTo((leng * mult), lhei);
gm.moveTo((leng * mult), rhei);
_local3 = leng;
while (_local3 > 0) {
_local2 = (menubytes.readFloat() * menuphei);
gm.lineTo((_local3 * mult), (rhei - _local2));
_local3--;
};
gm.lineTo(0, rhei);
}
public function enemy(){
var en:MovieClip;
var l:Graphics;
var eOEF:Function;
var type1:*;
var xspot:*;
eOEF = function (_arg1){
var event = _arg1;
if (beated){
xspot = ((event.target.x - 10) - (10 * type1));
};
event.target.x = (event.target.x + ((xspot - event.target.x) / 10));
if (event.target.x < -2){
xspot = (stage.stageWidth + 5);
event.target.x = (stage.stageWidth + 10);
};
if (((gameover) && ((char.x > (stage.stageWidth + 200))))){
event.target.removeEventListener(Event.ENTER_FRAME, eOEF);
event.target.parent.removeChild(event.target);
};
var _local3 = event.target;
with (_local3) {
l.clear();
l.beginFill(0xFFFFFF, 0.8);
l.drawCircle(0, 0, (3 - (sc.leftPeak * 3)));
l.endFill();
l.lineStyle(1, 0xFFFFFF, 0.8);
l.drawCircle(0, 0, (sc.rightPeak * 5));
};
};
en = new MovieClip();
en.addEventListener(Event.ENTER_FRAME, eOEF);
l = en.graphics;
en.x = (Math.random() * stage.stageWidth);
en.y = (Math.random() * stage.stageHeight);
var _local2 = en;
with (_local2) {
type1 = Math.round(Math.random());
xspot = x;
};
addChild(en);
}
public function kdown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 37){
left = true;
};
if (_arg1.keyCode == 39){
right = true;
};
if (_arg1.keyCode == 40){
down = true;
};
if (_arg1.keyCode == 38){
up = true;
};
}
public function PL_LOADING(_arg1:ProgressEvent){
var _local2:Number;
_local2 = Math.floor((_arg1.bytesLoaded / _arg1.bytesTotal));
lbar.gotoAndStop((_local2 * 100));
if (((((_local2 * 100) == 100)) && ((lbar.currentFrame == 100)))){
lbar.play();
};
}
public function clicky(_arg1:MouseEvent){
lbar.removeEventListener(MouseEvent.CLICK, clicky);
lbar.play();
}
}
}//package _fla
Section 4
//ng_Drummer_4 (_fla.ng_Drummer_4)
package _fla {
import flash.display.*;
public dynamic class ng_Drummer_4 extends MovieClip {
public function ng_Drummer_4(){
addFrameScript(140, frame141);
}
function frame141(){
gotoAndPlay("bb");
}
}
}//package _fla
Section 5
//ng_preloader_73 (_fla.ng_preloader_73)
package _fla {
import flash.display.*;
public dynamic class ng_preloader_73 extends MovieClip {
public function ng_preloader_73(){
addFrameScript(129, frame130);
}
function frame130(){
stop();
}
}
}//package _fla
Section 6
//blah (blah)
package {
import flash.display.*;
public dynamic class blah extends MovieClip {
}
}//package
Section 7
//menusong (menusong)
package {
import flash.media.*;
public dynamic class menusong extends Sound {
}
}//package
Section 8
//NG65353 (NG65353)
package {
import flash.media.*;
public dynamic class NG65353 extends Sound {
}
}//package
Section 9
//NG73427 (NG73427)
package {
import flash.media.*;
public dynamic class NG73427 extends Sound {
}
}//package
Section 10
//NG82621 (NG82621)
package {
import flash.media.*;
public dynamic class NG82621 extends Sound {
}
}//package
Section 11
//NG84981 (NG84981)
package {
import flash.media.*;
public dynamic class NG84981 extends Sound {
}
}//package
Section 12
//shot (shot)
package {
import flash.display.*;
public dynamic class shot extends MovieClip {
}
}//package