Section 1
//animation_34 (kesSpace_fla.animation_34)
package kesSpace_fla {
import flash.display.*;
public dynamic class animation_34 extends MovieClip {
public var ani:MovieClip;
public function animation_34(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 2
//animationLevel0_35 (kesSpace_fla.animationLevel0_35)
package kesSpace_fla {
import flash.display.*;
public dynamic class animationLevel0_35 extends MovieClip {
public function animationLevel0_35(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 3
//animationLevel1_36 (kesSpace_fla.animationLevel1_36)
package kesSpace_fla {
import flash.display.*;
public dynamic class animationLevel1_36 extends MovieClip {
public function animationLevel1_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 4
//animationLevel2_37 (kesSpace_fla.animationLevel2_37)
package kesSpace_fla {
import flash.display.*;
public dynamic class animationLevel2_37 extends MovieClip {
public function animationLevel2_37(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 5
//animationLevel3_38 (kesSpace_fla.animationLevel3_38)
package kesSpace_fla {
import flash.display.*;
public dynamic class animationLevel3_38 extends MovieClip {
public function animationLevel3_38(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 6
//animationLevel4_39 (kesSpace_fla.animationLevel4_39)
package kesSpace_fla {
import flash.display.*;
public dynamic class animationLevel4_39 extends MovieClip {
public function animationLevel4_39(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 7
//animationLevel5_40 (kesSpace_fla.animationLevel5_40)
package kesSpace_fla {
import flash.display.*;
public dynamic class animationLevel5_40 extends MovieClip {
public function animationLevel5_40(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 8
//asteroidBreak_73 (kesSpace_fla.asteroidBreak_73)
package kesSpace_fla {
import flash.display.*;
public dynamic class asteroidBreak_73 extends MovieClip {
public function asteroidBreak_73(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 9
//bombarmingdevice_43 (kesSpace_fla.bombarmingdevice_43)
package kesSpace_fla {
import flash.display.*;
public dynamic class bombarmingdevice_43 extends MovieClip {
public function bombarmingdevice_43(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 10
//capsule1speed_77 (kesSpace_fla.capsule1speed_77)
package kesSpace_fla {
import flash.display.*;
public dynamic class capsule1speed_77 extends MovieClip {
public function capsule1speed_77(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package kesSpace_fla
Section 11
//chomp_75 (kesSpace_fla.chomp_75)
package kesSpace_fla {
import flash.display.*;
public dynamic class chomp_75 extends MovieClip {
public function chomp_75(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 12
//credits_23 (kesSpace_fla.credits_23)
package kesSpace_fla {
import flash.display.*;
public dynamic class credits_23 extends MovieClip {
public var backBtn:SimpleButton;
public var creditsTween:MovieClip;
public function credits_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 13
//CreditsTween_24 (kesSpace_fla.CreditsTween_24)
package kesSpace_fla {
import flash.display.*;
public dynamic class CreditsTween_24 extends MovieClip {
public var creditsUGOBtn:SimpleButton;
public var creditsKESBtn:SimpleButton;
public var creditsPrankardBtn:SimpleButton;
}
}//package kesSpace_fla
Section 14
//fiveText_22 (kesSpace_fla.fiveText_22)
package kesSpace_fla {
import flash.display.*;
public dynamic class fiveText_22 extends MovieClip {
public function fiveText_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 15
//fourText_21 (kesSpace_fla.fourText_21)
package kesSpace_fla {
import flash.display.*;
public dynamic class fourText_21 extends MovieClip {
public function fourText_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 16
//gameoverAni_41 (kesSpace_fla.gameoverAni_41)
package kesSpace_fla {
import flash.display.*;
public dynamic class gameoverAni_41 extends MovieClip {
public function gameoverAni_41(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 17
//guns_11 (kesSpace_fla.guns_11)
package kesSpace_fla {
import flash.display.*;
public dynamic class guns_11 extends MovieClip {
public function guns_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 18
//harcoreTxt_18 (kesSpace_fla.harcoreTxt_18)
package kesSpace_fla {
import flash.display.*;
public dynamic class harcoreTxt_18 extends MovieClip {
public function harcoreTxt_18(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 19
//instructionsBomb_17 (kesSpace_fla.instructionsBomb_17)
package kesSpace_fla {
import flash.display.*;
public dynamic class instructionsBomb_17 extends MovieClip {
public var shields:MovieClip;
public var guns:MovieClip;
}
}//package kesSpace_fla
Section 20
//instructionsMissile_15 (kesSpace_fla.instructionsMissile_15)
package kesSpace_fla {
import flash.display.*;
public dynamic class instructionsMissile_15 extends MovieClip {
public var shields:MovieClip;
public var guns:MovieClip;
}
}//package kesSpace_fla
Section 21
//instructionsMove_10 (kesSpace_fla.instructionsMove_10)
package kesSpace_fla {
import flash.display.*;
public dynamic class instructionsMove_10 extends MovieClip {
public var shields:MovieClip;
public var guns:MovieClip;
}
}//package kesSpace_fla
Section 22
//instructionsShoot_13 (kesSpace_fla.instructionsShoot_13)
package kesSpace_fla {
import flash.display.*;
public dynamic class instructionsShoot_13 extends MovieClip {
public var shields:MovieClip;
public var guns:MovieClip;
}
}//package kesSpace_fla
Section 23
//levelHolder_44 (kesSpace_fla.levelHolder_44)
package kesSpace_fla {
import flash.display.*;
public dynamic class levelHolder_44 extends MovieClip {
public var levelTween:MovieClip;
public function levelHolder_44(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 24
//levelTween_45 (kesSpace_fla.levelTween_45)
package kesSpace_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelTween_45 extends MovieClip {
public var levelTxt:TextField;
}
}//package kesSpace_fla
Section 25
//MainTimeline (kesSpace_fla.MainTimeline)
package kesSpace_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var canPause:Boolean;
public var tempLevel:Array;
public var varUp:Boolean;
public var gameoverAni:MovieClip;
public var speed:Number;
public var waitForSubmit:int;
public var i:int;
public var twoBtn:SimpleButton;
public var hardcoreImage:MovieClip;
public var twoTxt:MovieClip;
public var acc:Number;
public var varDown:Boolean;
public var flyWait:int;
public var shtspd:int;
public var credits:MovieClip;
public var starCont:Sprite;
public var gameMode:String;
public var loopSound:SpaceMusic;
public var planetCont:MovieClip;
public var playMoreBtn:SimpleButton;
public var menuHighscoreBtn:SimpleButton;
public var ii:int;
public var level1:Array;
public var level2:Array;
public var level3:Array;
public var level5:Array;
public var level4:Array;
public var shotCont:Sprite;
public var playMoreHighscoreBtn:SimpleButton;
public var enemyShotCont:MovieClip;
public var levelScore:int;
public var levels:Array;
public var viewBtn:SimpleButton;
public var missileCont:MovieClip;
public var currentLevel:int;
public var bulletWait:int;
public var totalScore:int;
public var flyVar:Number;
public var maxspd:Number;
public var loopChannel:SoundChannel;
public var levelCounter:int;
public var bombGraphic:MovieClip;
public var missileContainer:MovieClip;
public var keysActive:Boolean;
public var varSpace:Boolean;
public var xspd:Number;
public var scoreOutput:TextField;
public var ship:MovieClip;
public var musicPlaying;
public var fiveBtn:SimpleButton;
public var levelHolder:MovieClip;
public var star:MovieClip;
public var so:SharedObject;
public var fiveTxt:MovieClip;
public var unlockedLevel:int;
public var noSubmitBtn:SimpleButton;
public var speedWait:int;
public var boss3:Boolean;
public var speedNumber:int;
public var intro:MovieClip;
public var boss1:Boolean;
public var health:int;
public var boss2:Boolean;
public var playBtn:SimpleButton;
public var yspd:Number;
public var score:int;
public var bomb:Boolean;
public var pointsCont:MovieClip;
public var enemyCont:MovieClip;
public var scoreHolder:MovieClip;
public var loopVolume;
public var hardcoreBtn:SimpleButton;
public var hardcoreTxt:MovieClip;
public var pausedVar:Boolean;
public var submitBtn:SimpleButton;
public var guns:int;
public var varRight:Boolean;
public var bombWait:int;
public var pausedScreen:MovieClip;
public var timer:int;
public var scorePlus:int;
public var fourBtn:SimpleButton;
public var winningMessage:MovieClip;
public var creditsBtn:SimpleButton;
public var sentData:Boolean;
public var fourTxt:MovieClip;
public var animation:MovieClip;
public var missileCount:int;
public var currentLevelArray:Array;
public var mslespd:int;
public var explodeCont:MovieClip;
public var varLeft:Boolean;
public var threeBtn:SimpleButton;
public var bonusCont:Sprite;
public var threeTxt:MovieClip;
public var bombCharge:Boolean;
public var shieldBar:MovieClip;
public var nameInput:TextField;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
public function updateData():void{
so.data.unlockedLevel = unlockedLevel;
so.flush();
trace(so.data.unlockedLevel);
}
public function flyingIn(_arg1:Event):void{
if (flyWait > 0){
flyVar = (flyVar - 0.2);
ship.y = (ship.y - flyVar);
if (flyVar <= 0){
if (keysActive == false){
addKeys();
};
flyWait = 0;
flyVar = 0;
playLevel();
removeEventListener("enterFrame", flyingIn);
};
} else {
flyWait++;
currentLevel++;
if (unlockedLevel < currentLevel){
unlockedLevel = currentLevel;
updateData();
};
flyVar = 10;
ship.rotation = 0;
ship.y = 600;
ship.x = 250;
if (gameMode == "normal"){
health = 15;
shieldBar.gotoAndStop((health + 1));
};
};
}
public function movementSwirl(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Boolean;
_local2 = _arg1.target.x;
_local3 = enemy(_arg1.target).acc;
_local4 = enemy(_arg1.target).maxSpd;
_local5 = enemy(_arg1.target).leftBool;
if (_arg1.target.y > 0){
if (_local3 > _local4){
_local5 = true;
} else {
if (_local3 < -(_local4)){
_local5 = false;
};
};
if (_local5){
_local3--;
} else {
_local3++;
};
_arg1.target.x = (_arg1.target.x + _local3);
enemy(_arg1.target).acc = _local3;
enemy(_arg1.target).leftBool = _local5;
if (_local2 !== x){
_arg1.target.rotation = ((_local2 - _arg1.target.x) * 2);
};
};
}
public function addSpeed():void{
if (speedNumber < 5){
speedNumber++;
ship.gotoAndStop(speedNumber);
maxspd = (maxspd * 1.2);
acc = (acc * 1.2);
speedWait = 0;
} else {
score = (score + 1000);
};
}
public function movementShotSpin(_arg1):void{
var localYspd:int;
var shot:MovieClip;
var event = _arg1;
if (enemy(event.target).rotated == false){
localYspd = enemy(event.target).ySpd;
event.target.y = (event.target.y + localYspd);
if (getDistance(ship, event.target) < 400){
if (localYspd > 0){
localYspd = (localYspd - 1);
enemy(event.target).ySpd = localYspd;
} else {
enemy(event.target).rotated = true;
};
};
} else {
event.target.rotation = (event.target.rotation - 2);
if ((event.target.rotation / 12) == Math.round((event.target.rotation / 12))){
shot = new MovieClip();
var _local3 = shot.graphics;
with (_local3) {
lineStyle(10, 0xFF00);
lineTo(0, 10);
};
shot.scaleX = 0.5;
shot.scaleY = 0.5;
shot.x = event.target.x;
shot.y = event.target.y;
shot.rotation = -(event.target.rotation);
enemyShotCont.addChild(shot);
fireSound();
shot.addEventListener("enterFrame", moveEnemyShot);
};
};
}
public function addWave1(_arg1:String, _arg2:String):void{
addEnemyAt(_arg1, _arg2, 50, -100);
addEnemyAt(_arg1, _arg2, 150, -50);
addEnemyAt(_arg1, _arg2, 250, -25);
addEnemyAt(_arg1, _arg2, 350, -50);
addEnemyAt(_arg1, _arg2, 450, -100);
}
public function addWave2(_arg1:String, _arg2:String):void{
addEnemyAt(_arg1, _arg2, ((Math.random() * 450) + 25), -50);
addEnemyAt(_arg1, _arg2, ((Math.random() * 450) + 25), -150);
addEnemyAt(_arg1, _arg2, ((Math.random() * 450) + 25), -250);
addEnemyAt(_arg1, _arg2, ((Math.random() * 450) + 25), -350);
}
public function fiveBtnFunction(_arg1:MouseEvent):void{
currentLevel = 4;
removeListeners();
gameMode = "normal";
gotoAndStop("game");
}
public function movementCharge(_arg1:Event):void{
var _local2:int;
if (enemy(_arg1.target).rotated == false){
_local2 = enemy(_arg1.target).ySpd;
_arg1.target.y = (_arg1.target.y + _local2);
if (getDistance(ship, _arg1.target) < 400){
if (_local2 > 0){
_local2--;
enemy(_arg1.target).ySpd = _local2;
} else {
enemy(_arg1.target).rotated = true;
};
};
} else {
rotateAndCharge(_arg1);
};
}
public function rotateAndCharge(_arg1:Event):void{
var _local2:Number;
var _local3:int;
if (enemy(_arg1.target).charge == false){
_local2 = Math.atan(((_arg1.target.x - ship.x) / (ship.y - _arg1.target.y)));
_local3 = ((180 / 3.1415926) * _local2);
if (_local3 == _arg1.target.rotation){
enemy(_arg1.target).charge = true;
};
if (_local3 > _arg1.target.rotation){
_arg1.target.rotation++;
} else {
_arg1.target.rotation--;
};
} else {
_arg1.target.x = (_arg1.target.x - (Math.sin(((3.1415926 / 180) * _arg1.target.rotation)) * 10));
_arg1.target.y = (_arg1.target.y + (Math.cos(((3.1415926 / 180) * _arg1.target.rotation)) * 10));
};
}
public function waitForScores(_arg1:Event):void{
var _local2:scoreSound;
scoreHolder.scoreTween.lScore.text = String(levelScore);
trace(scoreHolder.scoreTween.tScore.text);
scoreHolder.scoreTween.tScore.text = String(totalScore);
if (scoreHolder.currentFrame == Math.ceil((scoreHolder.totalFrames / 2))){
scoreHolder.stop();
if (levelScore > scorePlus){
scorePlus++;
levelScore = (levelScore - scorePlus);
totalScore = (totalScore + scorePlus);
_local2 = new scoreSound();
_local2.play();
} else {
totalScore = (totalScore + levelScore);
levelScore = 0;
scorePlus = 1;
scoreHolder.play();
};
} else {
if (scoreHolder.currentFrame == scoreHolder.totalFrames){
playAnimation();
removeEventListener("enterFrame", waitForScores);
};
};
}
public function flyingOff(_arg1:Event):void{
if (flyWait > 140){
if (keysActive == true){
removeKeys();
};
flyVar = (flyVar + 0.2);
ship.y = (ship.y - flyVar);
if (ship.y < -50){
flyWait = 0;
flyVar = 0;
playScores();
removeEventListener("enterFrame", flyingOff);
};
} else {
flyWait++;
};
}
function frame1(){
this.stop();
this.addEventListener("enterFrame", load_bar);
unlockedLevel = 0;
so = SharedObject.getLocal("spaceAggressorData");
trace(so.data.unlockedLevel);
if (so.data.unlockedLevel > 0){
unlockedLevel = so.data.unlockedLevel;
} else {
unlockedLevel = 0;
updateData();
};
starCont = new Sprite();
addChildAt(starCont, 0);
currentLevel = 0;
gameMode = "normal";
i = 0;
while (i < 100) {
star = new MovieClip();
var _local2 = star.graphics;
with (_local2) {
lineStyle(10, 0xFFFFFF);
lineTo(0, 4);
};
star.x = (Math.random() * 550);
star.y = ((Math.random() * 750) - 125);
star.scaleY = (Math.random() * 0.3);
star.scaleX = star.scaleY;
starCont.addChild(star);
star.addEventListener("enterFrame", OEF);
i++;
};
}
function frame4(){
ship.gotoAndStop(2);
stage.quality = "low";
varRight = false;
varLeft = false;
varUp = false;
varDown = false;
varSpace = false;
keysActive = false;
timer = 0;
flyVar = 0;
flyWait = 0;
yspd = 0;
xspd = 0;
acc = 1;
speed = 10;
maxspd = speed;
shtspd = 15;
mslespd = 15;
score = 0;
levelScore = 0;
totalScore = 0;
scorePlus = 1;
canPause = false;
speedNumber = 1;
guns = 1;
bomb = false;
bombCharge = false;
bulletWait = 100;
speedWait = 300;
bombWait = 0;
missileCount = 0;
missileContainer.gotoAndStop((missileCount + 1));
health = 15;
boss1 = false;
boss2 = false;
boss3 = false;
level1 = new Array("0:asteroid:line1:fallAndRotate", "60:critter:single:swirl", "5:asteroid:single:fallAndRotate", "20:critter:single:swirlAndAttract", "5:asteroidBlue:single:fallAndRotate", "20:critter:single:swirlAndAttract", "40:asteroid:line2:fallAndRotate", "20:asteroidBlue:single:fallAndRotate", "20:critter:wave2:swirl", "5:asteroid:single:fallAndRotate", "40:critter:wave2:swirl", "40:type1:wave2:swirlAndShoot", "60:asteroid:line3:fallAndRotate", "60:critter:single:attract", "30:critter:single:attract", "10:critter:single:attract", "5:asteroid:single:fallAndRotate", "20:critter:single:attract", "40:type1:wave2:attractAndShoot", "20:critter:line3:swirl", "40:asteroid:line2:fallAndRotate", "20:asteroidBlue:single:fallAndRotate", "20:critter:wave2:swirl", "5:asteroid:single:fallAndRotate", "40:critter:wave2:swirl", "5:asteroid:single:fallAndRotate", "40:type1:single:swirlAndShoot", "10:type1:single:swirlAndShoot", "20:type1:single:swirlAndShoot", "5:asteroidBlue:single:fallAndRotate", "30:type1:single:swirlAndShoot", "40:critter:line3:swirl", "30:type1:wave2:swirlAndShoot", "10:asteroid:cluster1:fallAndRotate", "30:asteroidBlue:single:fallAndRotate", "10:asteroidBlue:single:fallAndRotate", "30:critter:single:swirlAndAttract", "20:critter:single:swirlAndAttract", "10:critter:single:swirlAndAttract", "30:critter:single:swirlAndAttract", "5:asteroidBlue:cluster1:fallAndRotate", "30:asteroid:line3:fallAndRotate", "20:asteroid:single:fallAndRotate", "10:asteroidBlue:singlel:fallAndRotate", "5:asteroidBlue:single:fallAndRotate", "10:type1:single:attractAndShoot", "5:asteroid:line1:fallAndRotate", "20:asteroid:line1:fallAndRotate", "10:asteroid:single:fallAndRotate", "10:asteroid:single:fallAndRotate", "20:asteroidBlue:single:fallAndRotate");
level2 = new Array("0:asteroid:single:fallAndRotate", "5:asteroid:single:fallAndRotate", "30:asteroid:line1:fallAndRotate", "10:asteroid:line1:fallAndRotate", "10:asteroid:line1:fallAndRotate", "50:asteroid:line2:fallAndRotate", "10:asteroid:line2:fallAndRotate", "40:asteroidBlue:single:fallAndRotate", "5:asteroidBlue:single:fallAndRotate", "10:asteroidBlue:single:fallAndRotate", "30:asteroidBlue:single:fallAndRotate", "20:critter:single:swirlAndAttract", "50:asteroid:cluster1:fallAndRotate", "40:asteroid:cluster1:fallAndRotate", "5:asteroidBlue:single:fallAndRotate", "30:asteroid:cluster1:fallAndRotate", "30:asteroidBlue:single:fallAndRotate", "40:asteroid:cluster1:fallAndRotate", "0:asteroidBlue:single:fallAndRotate", "5:asteroidBlue:single:fallAndRotate", "30:asteroidBlue:line1:fallAndRotate", "10:asteroidBlue:line1:fallAndRotate", "10:asteroidBlue:line1:fallAndRotate", "50:asteroidBlue:line2:fallAndRotate", "10:asteroidBlue:line2:fallAndRotate", "60:bonus:guns", "90:asteroidBlue:single:fallAndRotate", "5:asteroidBlue:single:fallAndRotate", "50:asteroidBlue:line2:fallAndRotate", "10:asteroidBlue:line2:fallAndRotate", "20:asteroidBlue:cluster1:fallAndRotate", "30:asteroidBlue:cluster1:fallAndRotate", "30:asteroidBlue:line1:fallAndRotate", "10:asteroidBlue:line1:fallAndRotate", "10:asteroidBlue:line1:fallAndRotate", "30:asteroidBlue:single:fallAndRotate", "20,asteroidRed:single:fallAndRotate", "20,asteroidBlue:single:fallAndRotate", "10,asteroidRed:cluster1:fallAndRotate", "40,asteroidRed:cluster:fallAndRotate", "90:asteroidRed:single:fallAndRotate", "5:asteroidRed:single:fallAndRotate", "50:asteroidRed:line2:fallAndRotate", "10:asteroidRed:line2:fallAndRotate", "20:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:line1:fallAndRotate", "10:asteroidRed:line1:fallAndRotate", "10:asteroidRed:line1:fallAndRotate", "50:asteroidRed:line2:fallAndRotate", "10:asteroidRed:line2:fallAndRotate", "20:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:line1:fallAndRotate", "10:asteroidRed:line1:fallAndRotate", "10:asteroidRed:line1:fallAndRotate", "50:asteroidRed:line2:fallAndRotate", "10:asteroidRed:line2:fallAndRotate", "20:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:line1:fallAndRotate", "10:asteroidRed:line1:fallAndRotate", "10:asteroidRed:line1:fallAndRotate");
level3 = new Array("0:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:single:fallAndRotate", "20:asteroidRed:single:fallAndRotate", "10:asteroidRed:single:fallAndRotate", "10:type1:wave2:swirlAndShoot", "20:critter:wave1:attract", "30:asteroidRed:line1:fallAndRotate", "30:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:single:fallAndRotate", "20:asteroidRed:single:fallAndRotate", "10:asteroidRed:single:fallAndRotate", "10:type1:wave2:swirlAndShoot", "20:critter:wave1:attract", "60:type2:single:attractAndShoot", "20:type2:single:attractAndShoot", "10:asteroidRed:single:fallAndRotate", "30:type1:wave1:swirlAndShoot", "20:type2:single:attractAndShoot", "20:type2:single:attractAndShoot", "10:asteroidRed:single:fallAndRotate", "30:type1:wave1:swirlAndShoot", "30:type1:wave1:attractAndShoot", "10:type2:single:swirlAndShoot", "10:asteroidBlue:line3:fallAndRotate", "20:asteroidBlue:line3:fallAndRotate", "20:asteroidBlue:line3:fallAndRotate", "30:critter:wave2:swirl", "5:type2:single:attractAndShoot", "10:asteroidRed:single:fallAndRotate", "30:type1:wave1:swirlAndShoot", "20:type2:single:attractAndShoot", "20:type2:single:attractAndShoot", "10:asteroidRed:single:fallAndRotate", "30:type1:wave1:swirlAndShoot", "30:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:single:fallAndRotate", "20:asteroidRed:single:fallAndRotate", "10:asteroidRed:single:fallAndRotate", "10:type1:wave2:swirlAndShoot", "20:asteroidRed:cluster1:fallAndRotate", "30:asteroidRed:cluster1:fallAndRotate", "10:asteroidRed:single:fallAndRotate", "30:asteroidRed:single:fallAndRotate", "60:critter:line3:swirl", "30:asteroidRed:single:fallAndRotate", "10:asteroidRed:single:fallAndRotate", "20:asteroidRed:single:fallAndRotate", "10:asteroidRed:single:fallAndRotate", "60:type2:wave1:attractAndShoot");
level4 = new Array("0:asteroidRed:cluster1:fallAndRotate", "7:asteroidRed:cluster1:fallAndRotate", "5:asteroidRed:line2:fallAndRotate", "50:critter:line2:swirl", "5:asteroidRed:single:fallAndRotate", "40:type1:wave1:attractAndShoot", "5:asteroidRed:single:fallAndRotate", "20:asteroidRed:cluster1:fallAndRotate", "10:type2:single:attractAndShoot", "10:type2:single:attractAndShoot", "20:asteroidRed:cluster1:fallAndRotate", "30:type2:single:attractAndShoot", "20:type1:wave1:attractAndShoot", "50:type1:wave2:attractAndShoot", "40:asteroidRed:cluster1:fallAndRotate", "7:asteroidRed:cluster1:fallAndRotate", "5:asteroidRed:line2:fallAndRotate", "50:critter:line2:swirl", "5:asteroidRed:single:fallAndRotate", "40:type1:wave1:attractAndShoot", "5:asteroidRed:single:fallAndRotate", "20:asteroidRed:cluster1:fallAndRotate", "10:type2:single:attractAndShoot", "10:type2:single:attractAndShoot", "20:asteroidRed:cluster1:fallAndRotate", "30:type2:single:attractAndShoot", "20:type1:wave1:attractAndShoot", "50:type1:wave2:attractAndShoot", "50:asteroidRed:cluster1:fallAndRotate", "20:asteroidRed:line1:fallAndRotate", "5:asteroidRed:cluster1:fallAndRotate", "30:turret:single:rotateAndShoot", "20:asteroidRed:cluster1:fallAndRotate", "20:type1:wave2:attractAndShoot", "40:turret:single:rotateAndShoot", "20:type1:wave1:attractAndShoot", "20:turret:single:rotateAndShoot", "10:asteroidRed:cluster1:fallAndRotate", "20:type1:single:attractAndShoot", "10:critter:wave2:swirl", "5:asteroidRed:single:fallAndRotate", "20:type2:wave2:attractAndShoot", "50:critter:single:charge", "10:critter:single:charge", "20:critter:single:charge", "10:asteroidRed:single:fallAndRotate", "5:asteroidRed:single:fallAndRotate", "5:asteroidRed:single:fallAndRotate", "10:asteroidRed:single:fallAndRotate", "20:turret:single:rotateAndShoot", "40:critter:wave1:swirl");
level5 = new Array("0:asteroidRed:line2:fallAndRotate", "7:asteroidRed:line2:fallAndRotate", "5:asteroidRed:line2:fallAndRotate", "50:critter:line2:swirl", "5:asteroidRed:single:fallAndRotate", "40:type1:wave2:attractAndShoot", "5:asteroidRed:single:fallAndRotate", "20:asteroidRed:cluster1:fallAndRotate", "10:type2:single:attractAndShoot", "10:type2:single:attractAndShoot", "20:asteroidRed:cluster1:fallAndRotate", "30:type2:single:attractAndShoot", "20:type1:wave1:attractAndShoot", "50:type2:wave2:swirlAndShoot", "40:asteroidRed:line2:fallAndRotate", "7:asteroidRed:line2:fallAndRotate", "5:asteroidRed:line2:fallAndRotate", "50:critter:line2:swirl", "5:asteroidRed:single:fallAndRotate", "40:type1:wave2:attractAndShoot", "5:asteroidRed:single:fallAndRotate", "20:asteroidRed:cluster1:fallAndRotate", "10:type2:single:attractAndShoot", "10:type2:single:attractAndShoot", "20:asteroidRed:cluster1:fallAndRotate", "30:type2:single:attractAndShoot", "20:type1:wave1:attractAndShoot", "50:type2:wave2:swirlAndShoot", "50:asteroidRed:cluster1:fallAndRotate", "20:asteroidRed:line1:fallAndRotate", "5:asteroidRed:cluster1:fallAndRotate", "30:turret:single:rotateAndShoot", "20:asteroidRed:cluster1:fallAndRotate", "20:type1:wave2:attractAndShoot", "40:turret:single:rotateAndShoot", "20:type1:wave1:attractAndShoot", "20:turret:single:rotateAndShoot", "10:asteroidRed:cluster1:fallAndRotate", "20:type1:single:attractAndShoot", "10:critter:wave2:swirl", "5:asteroidRed:single:fallAndRotate", "20:type2:wave2:attractAndShoot", "10:asteroidRed:single:fallAndRotate", "5:asteroidRed:single:fallAndRotate", "5:asteroidRed:single:fallAndRotate", "10:asteroidRed:single:fallAndRotate", "20:turret:single:rotateAndShoot", "40:critter:wave1:charge");
tempLevel = new Array("0:asteroid:single:fallAndRotate", "10:asteroid:single:fallAndRotate");
levels = new Array(level1, level2, level3, level4, level5);
currentLevelArray = levels;
levelCounter = 0;
enemyCont = new MovieClip();
enemyShotCont = new MovieClip();
explodeCont = new MovieClip();
planetCont = new MovieClip();
bonusCont = new Sprite();
shotCont = new Sprite();
missileCont = new MovieClip();
pointsCont = new MovieClip();
addChild(planetCont);
addChild(bonusCont);
addChild(shotCont);
addChild(missileCont);
addChild(enemyShotCont);
addChild(enemyCont);
addChild(explodeCont);
addChild(pointsCont);
this.setChildIndex(ship, (numChildren - 1));
this.setChildIndex(shieldBar, (numChildren - 1));
this.setChildIndex(missileContainer, (numChildren - 1));
this.setChildIndex(bombGraphic, (numChildren - 1));
this.setChildIndex(scoreHolder, (numChildren - 1));
this.setChildIndex(levelHolder, (numChildren - 1));
this.setChildIndex(gameoverAni, (numChildren - 1));
this.setChildIndex(animation, (numChildren - 1));
this.setChildIndex(pausedScreen, (numChildren - 1));
shieldBar.gotoAndStop(16);
enemyCont.cacheAsBitmap = true;
planetCont.cacheAsBitmap = false;
pausedVar = false;
ii = 0;
while (ii < 5) {
createPlanet();
ii++;
};
stage.addEventListener("enterFrame", movement);
addEventListener("enterFrame", initiate);
}
public function twoBtnFunction(_arg1:MouseEvent):void{
currentLevel = 1;
removeListeners();
gameMode = "normal";
gotoAndStop("game");
}
function frame3(){
stop();
addListeners();
}
public function unPauseGame():void{
var _local1:int;
pausedScreen.x = -1000;
pausedScreen.y = -1000;
_local1 = 0;
while (_local1 < enemyCont.numChildren) {
enemyCont.getChildAt(_local1).addEventListener("enterFrame", enemyMove);
_local1++;
};
_local1 = 0;
while (_local1 < enemyShotCont.numChildren) {
enemyShotCont.getChildAt(_local1).addEventListener("enterFrame", moveEnemyShot);
_local1++;
};
_local1 = 0;
while (_local1 < planetCont.numChildren) {
planetCont.getChildAt(_local1).addEventListener("enterFrame", OEFPlanet);
_local1++;
};
_local1 = 0;
while (_local1 < shotCont.numChildren) {
shotCont.getChildAt(_local1).addEventListener("enterFrame", moveShot);
_local1++;
};
_local1 = 0;
while (_local1 < starCont.numChildren) {
starCont.getChildAt(_local1).addEventListener("enterFrame", OEF);
_local1++;
};
_local1 = 0;
while (_local1 < bonusCont.numChildren) {
bonus(bonusCont.getChildAt(_local1)).unPause();
_local1++;
};
_local1 = 0;
while (_local1 < pointsCont.numChildren) {
Points(pointsCont.getChildAt(_local1)).unPause();
_local1++;
};
addEventListener("enterFrame", levelFunction);
stage.addEventListener("enterFrame", movement);
pausedVar = false;
}
function frame2(){
musicPlaying = true;
loopSound = new SpaceMusic();
loopVolume = "full";
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpsAlways);
playLoop(null);
}
public function playScores():void{
scoreHolder.gotoAndPlay(1);
addEventListener("enterFrame", waitForScores);
}
public function quickEndLevel():void{
levels.shift();
addEventListener("enterFrame", flyingOff);
removeEventListener("enterFrame", levelFunction);
canPause = false;
}
public function addHighscoreListeners():void{
submitBtn.addEventListener("click", submitBtnFunction);
noSubmitBtn.addEventListener("click", noSubmitBtnFunction);
viewBtn.addEventListener("click", viewBtnFunction);
playMoreHighscoreBtn.addEventListener("click", playMoreBtnFunction);
}
public function bigBossCheck(_arg1:Event):void{
if (enemyCont.numChildren == 0){
addEventListener("enterFrame", flyingOff);
removeEventListener("enterFrame", bigBossCheck);
};
}
public function fireSound():void{
var _local1:int;
var _local2:fire1Sound;
var _local3:fire2Sound;
var _local4:fire3Sound;
_local1 = Math.ceil((Math.random() * 3));
if (_local1 == 3){
_local2 = new fire1Sound();
_local2.play();
} else {
if (_local1 == 2){
_local3 = new fire2Sound();
_local3.play();
} else {
_local4 = new fire3Sound();
_local4.play();
};
};
}
function frame5(){
stop();
addHighscoreListeners();
sentData = false;
waitForSubmit = 0;
if (gameMode == "hardcore"){
hardcoreImage.visible = true;
} else {
hardcoreImage.visible = false;
};
if (totalScore == 0){
totalScore = levelScore;
};
scoreOutput.text = String(totalScore);
}
function frame6(){
if (gameMode == "hardcore"){
winningMessage.gotoAndStop(2);
} else {
winningMessage.gotoAndStop(1);
};
if (totalScore == 0){
totalScore = levelScore;
};
stop();
addHighscoreListeners();
sentData = false;
waitForSubmit = 0;
if (gameMode == "hardcore"){
hardcoreImage.visible = true;
} else {
hardcoreImage.visible = false;
};
scoreOutput.text = String(totalScore);
}
public function removeKeys():void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, checkKeys);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUps);
varRight = false;
varLeft = false;
varUp = false;
varDown = false;
varSpace = false;
keysActive = false;
}
public function waitForBoss(_arg1:Event):void{
if (levelHolder.currentFrame == levelHolder.totalFrames){
addEventListener("enterFrame", bossCheck);
addEnemy("miniBoss", "bossMove");
if (currentLevel == 3){
boss1 = true;
} else {
if (currentLevel == 4){
boss2 = true;
};
};
removeEventListener("enterFrame", waitForBoss);
};
}
public function movement(_arg1:Event){
var j:int;
var k:int;
var i:int;
var shot:MovieClip;
var shot2:MovieClip;
var shot3:MovieClip;
var localType:String;
var event = _arg1;
timer++;
if (varRight == true){
if (ship.x < 420){
if (xspd < maxspd){
xspd = (xspd + acc);
ship.rotation = (ship.rotation + (acc * 2));
};
} else {
if (xspd > 0){
xspd = (xspd - (acc * Math.pow(1.2, speedNumber)));
ship.rotation = (ship.rotation - (acc * 2));
} else {
xspd = 0;
};
};
} else {
if (varLeft == true){
if (ship.x > 80){
if (xspd > -(maxspd)){
xspd = (xspd - acc);
ship.rotation = (ship.rotation - (acc * 2));
};
} else {
if (xspd < 0){
xspd = (xspd + (acc * Math.pow(1.2, speedNumber)));
ship.rotation = (ship.rotation + (acc * 2));
} else {
xspd = 0;
};
};
} else {
if (xspd > 0){
xspd = (xspd - (acc / 2));
ship.rotation = (ship.rotation - acc);
} else {
xspd = (xspd + (acc / 2));
ship.rotation = (ship.rotation + acc);
};
if ((((xspd > -(acc))) && ((xspd < acc)))){
xspd = 0;
ship.rotation = 0;
};
};
};
if (varUp == true){
if (ship.y > 40){
if (yspd < maxspd){
yspd = (yspd + acc);
};
} else {
if (yspd < 0){
yspd = (yspd - (acc * Math.pow(1.2, speedNumber)));
} else {
yspd = 0;
};
};
} else {
if (varDown == true){
if (ship.y < 470){
if (yspd > -(maxspd)){
yspd = (yspd - acc);
};
} else {
if (yspd < 0){
yspd = (yspd + (acc * Math.pow(1.2, speedNumber)));
} else {
yspd = 0;
};
};
} else {
if (yspd > 0){
yspd = (yspd - (acc / 2));
} else {
yspd = (yspd + (acc / 2));
};
if ((((yspd > -(acc))) && ((yspd < acc)))){
yspd = 0;
};
};
};
ship.y = (ship.y - yspd);
ship.x = (ship.x + xspd);
if (varSpace == true){
if (bulletWait > 0){
fireSound();
bulletWait = -3;
i = 0;
while (i < 2) {
shot = new MovieClip();
var _local3 = shot.graphics;
with (_local3) {
lineStyle(5, 0xFFFF00);
lineTo(0, 15);
};
shot.scaleX = 0.5;
shot.scaleY = 0.5;
shot.x = ((ship.x - 15) + (i * 30));
shot.y = (ship.y - 30);
shot.rotation = ship.rotation;
shotCont.addChild(shot);
shot.addEventListener("enterFrame", moveShot);
i = (i + 1);
};
if (guns >= 2){
i = 0;
while (i < 2) {
shot2 = new MovieClip();
_local3 = shot2.graphics;
with (_local3) {
lineStyle(5, 0xFFFF00);
lineTo(0, 15);
};
shot2.scaleX = 0.5;
shot2.scaleY = 0.5;
shot2.x = ((ship.x - 25) + (i * 50));
shot2.y = (ship.y - 20);
shot2.rotation = ship.rotation;
shotCont.addChild(shot2);
shot2.addEventListener("enterFrame", moveShot);
i = (i + 1);
};
};
if (guns >= 3){
i = 0;
while (i < 2) {
shot3 = new MovieClip();
_local3 = shot3.graphics;
with (_local3) {
lineStyle(5, 0xFFFF00);
lineTo(0, 15);
};
shot3.scaleX = 0.5;
shot3.scaleY = 0.5;
shot3.x = ((ship.x - 32.5) + (i * 65));
shot3.y = (ship.y - 5);
shot3.rotation = ship.rotation;
shotCont.addChild(shot3);
shot3.addEventListener("enterFrame", moveShot);
i = (i + 1);
};
};
};
};
j = 0;
while (j < enemyCont.numChildren) {
if (ship.hitTestObject(enemyCont.getChildAt(j))){
healthMinus(1);
if ((((((((enemy(enemyCont.getChildAt(j)).enemyType == "bigBoss")) || ((enemy(enemyCont.getChildAt(j)).enemyType == "miniBoss")))) || ((enemy(enemyCont.getChildAt(j)).enemyType == "bigBossPart1")))) || ((enemy(enemyCont.getChildAt(j)).enemyType == "bigBossPart2")))){
trace("fuck");
} else {
trace("oww");
enemyDieNoSpawn(MovieClip(enemyCont.getChildAt(j)));
};
};
j = (j + 1);
};
k = 0;
while (k < bonusCont.numChildren) {
if (ship.hitTestObject(bonusCont.getChildAt(k))){
localType = bonus(bonusCont.getChildAt(k)).bonusType;
if (localType == "speed"){
addSpeed();
} else {
if (localType == "health"){
addHealth();
} else {
if (localType == "guns"){
addGuns();
} else {
if (localType == "bomb"){
if (((!(bombCharge)) && (!(bomb)))){
bombCharge = true;
addEventListener("enterFrame", bombWaiter);
};
} else {
if (localType == "missile"){
if (missileCount < 8){
missileCount++;
missileContainer.gotoAndStop((missileCount + 1));
} else {
score = (score + 1000);
};
};
};
};
};
};
addNameGraphic(bonusCont.getChildAt(k).x, bonusCont.getChildAt(k).y, localType);
bonus(bonusCont.getChildAt(k)).removeSelf();
};
k = (k + 1);
};
bulletWait++;
}
public function playLevel():void{
levelHolder.levelTween.levelTxt.text = String(("Level " + currentLevel));
trace(levelHolder.levelTween.levelTxt.text);
trace(levelHolder.currentFrame);
trace(levelHolder.levelTween.levelTxt.alpha);
trace(levelHolder.levelTween.levelTxt.visible);
levelHolder.gotoAndPlay(1);
addEventListener("enterFrame", waitForLevel);
}
public function removeAfterPlayed(_arg1:Event):void{
if (_arg1.target.currentFrame == _arg1.target.totalFrames){
explodeCont.removeChild(DisplayObject(_arg1.target));
_arg1.target.removeEventListener("enterFrame", removeAfterPlayed);
};
}
public function playBoss():void{
levelHolder.levelTween.levelTxt.text = String("MiniBoss");
levelHolder.gotoAndPlay(1);
addEventListener("enterFrame", waitForBoss);
}
public function skipAnimation(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 81){
MovieClip(animation.getChildAt(currentLevel)).gotoAndPlay(MovieClip(animation.getChildAt(currentLevel)).totalFrames);
};
}
public function useBomb():void{
var _local1:int;
if (bomb){
bomb = false;
bombGraphic.gotoAndStop(1);
_local1 = 0;
while (_local1 < enemyCont.numChildren) {
enemy(enemyCont.getChildAt(_local1)).health = (enemy(enemyCont.getChildAt(_local1)).health - 4);
if (enemy(enemyCont.getChildAt(_local1)).health <= 0){
enemyDieNoSpawn(MovieClip(enemyCont.getChildAt(_local1)));
_local1--;
} else {
MovieClip(enemyCont.getChildAt(_local1)).shields.play();
};
_local1++;
};
addBombExplosion();
};
}
public function waitForLevel(_arg1:Event):void{
if (levelHolder.currentFrame == levelHolder.totalFrames){
addEventListener("enterFrame", levelFunction);
removeEventListener("enterFrame", waitForLevel);
};
}
public function hardcoreBtnFunction(_arg1:MouseEvent):void{
currentLevel = 0;
removeListeners();
gameMode = "hardcore";
gotoAndStop("game");
}
public function removeSpecialAfterPlayed(_arg1:Event):void{
_arg1.target.y = (_arg1.target.y + 10);
if (_arg1.target.currentFrame == _arg1.target.totalFrames){
explodeCont.removeChild(DisplayObject(_arg1.target));
_arg1.target.removeEventListener("enterFrame", removeSpecialAfterPlayed);
};
}
public function addSpecialExplosion(_arg1:Number, _arg2:Number, _arg3:String, _arg4:int):void{
var _local5:MovieClip;
explosionSound();
_local5 = new SpecialExplosion();
if ((((((_arg3 == "asteroid")) || ((_arg3 == "asteroidRed")))) || ((_arg3 == "asteroidBlue")))){
_local5.explosionHolder.gotoAndStop((_arg3 + _arg4));
} else {
_local5.explosionHolder.gotoAndStop(_arg3);
};
trace(_arg3);
_local5.x = _arg1;
_local5.y = _arg2;
explodeCont.addChild(_local5);
_local5.addEventListener("enterFrame", removeSpecialAfterPlayed);
}
public function OEF(_arg1:Event){
_arg1.target.y = (_arg1.target.y + (_arg1.target.scaleY * 20));
if (_arg1.target.y > 675){
_arg1.target.y = -10;
_arg1.target.x = (Math.random() * 550);
};
}
public function addCluster1(_arg1:String, _arg2:String):void{
var _local3:Number;
var _local4:int;
_local3 = ((Math.random() * 450) + 25);
_local4 = 0;
while (_local4 < 5) {
addEnemyAt(_arg1, _arg2, (((Math.random() * 100) - 50) + _local3), ((Math.random() * 100) - 150));
_local4++;
};
}
public function addCluster2(_arg1:String, _arg2:String):void{
var _local3:Number;
var _local4:int;
_local3 = 0;
_local4 = 0;
while (_local4 < 10) {
_local3 = (_local3 + ((Math.random() * 20) + 30));
addEnemyAt(_arg1, _arg2, _local3, -50);
_local4++;
};
}
public function load_bar(_arg1:Event){
intro.preload.lbar.scaleX = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal);
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
intro.play();
this.addEventListener(Event.ENTER_FRAME, waiting);
this.removeEventListener("enterFrame", load_bar);
};
}
public function addCluster3(_arg1:String, _arg2:String):void{
var _local3:Number;
var _local4:int;
_local3 = 500;
_local4 = 0;
while (_local4 < 10) {
_local3 = (_local3 - ((Math.random() * 20) + 30));
addEnemyAt(_arg1, _arg2, _local3, -50);
_local4++;
};
}
public function addBlock1(_arg1:String):void{
var _local2:*;
_local2 = 0;
while (_local2 < 3) {
_local2++;
};
}
public function fourBtnFunction(_arg1:MouseEvent):void{
currentLevel = 3;
removeListeners();
gameMode = "normal";
gotoAndStop("game");
}
public function movementAttract(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target.x;
_local3 = enemy(_arg1.target).acc;
_local4 = enemy(_arg1.target).maxSpd;
if (_arg1.target.y > 0){
if (_arg1.target.x < (ship.x - 20)){
_local3++;
} else {
if (_arg1.target.x > (ship.x + 20)){
_local3--;
} else {
if (_local3 !== 0){
if (_local3 > 0){
_local3--;
} else {
_local3++;
};
};
};
};
};
if (_local3 > _local4){
_local3 = _local4;
} else {
if (_local3 < -(_local4)){
_local3 = -(_local4);
};
};
enemy(_arg1.target).acc = _local3;
_arg1.target.x = (_arg1.target.x + enemy(_arg1.target).acc);
if (_local2 !== x){
_arg1.target.rotation = ((_local2 - _arg1.target.x) * 2);
};
}
public function addMissile():void{
var _local1:MovieClip;
if (missileCount > 0){
missileSound();
missileCount--;
missileContainer.gotoAndStop((missileCount + 1));
_local1 = new missile();
_local1.scaleX = (_local1.scaleY = 0.5);
_local1.x = ship.x;
_local1.y = (ship.y - 30);
_local1.rotation = ship.rotation;
_local1.addEventListener("enterFrame", missileMove);
missileCont.addChild(_local1);
};
}
public function creditsBtnFunction(_arg1:MouseEvent):void{
removeListeners();
credits.x = 0;
credits.y = 0;
credits.play();
addEventListener("enterFrame", waitForCredits);
credits.backBtn.addEventListener("click", creditsBackBtn);
credits.creditsTween.creditsKESBtn.addEventListener("click", creditsKESBtnFunction);
credits.creditsTween.creditsPrankardBtn.addEventListener("click", creditsPrankardBtnFunction);
credits.creditsTween.creditsUGOBtn.addEventListener("click", playMoreBtnFunction);
}
public function spawnBonus(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:String;
var _local5:MovieClip;
_local3 = Math.random();
if (_local3 < 0.5){
_local3 = Math.random();
if (_local3 < 0.2){
_local4 = "bomb";
} else {
if (_local3 < 0.5){
_local4 = "missile";
} else {
_local4 = "health";
};
};
_local5 = new bonus(_local4);
_local5.x = _arg1;
_local5.y = _arg2;
bonus(_local5).xspd = (Math.random() * 3);
bonus(_local5).yspd = (Math.random() * 3);
bonusCont.addChild(_local5);
};
}
public function getDistance(_arg1:Object, _arg2:Object):Number{
return (Math.sqrt((Math.pow((_arg1.x - _arg2.x), 2) + Math.pow((_arg1.y - _arg2.y), 2))));
}
public function addPointsGraphic(_arg1:Number, _arg2:Number, _arg3:int):void{
var _local4:Points;
_local4 = new Points();
_local4.myTextfield.text = String(_arg3);
_local4.x = _arg1;
_local4.y = _arg2;
pointsCont.addChild(_local4);
}
public function creditsKESBtnFunction(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://thehappysheep.newgrounds.com/");
navigateToURL(_local2, "_blank");
}
public function lowerVolume():void{
var _local1:SoundTransform;
stage.frameRate = 30;
stage.quality = "high";
loopVolume = "half";
_local1 = new SoundTransform(0.2, 0);
loopChannel.soundTransform = _local1;
}
public function sendHardcoreData():void{
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:Number;
var _local4:String;
_local1 = new URLRequest("http://rankz.armorbot.com/submit/as3_v0.php");
_local1.method = URLRequestMethod.POST;
_local2 = new URLVariables();
_local2.flashkey = "QWpYUmRKWVQ=";
_local2.SU0249 = "MjQzMGolZSVhJW4lcw==";
_local2.bmFtZTE = nameInput.text;
_local3 = totalScore;
_local4 = (_local3 + "Z");
_local2.c2NvcmUx = _local4.split("0").join("U");
_local2.c2NvcmUx = _local2.c2NvcmUx.split("").join("A");
_local2.c2NvcmUx = _local2.c2NvcmUx.split("AU").join("Y");
_local2.c2NvcmUx = _local2.c2NvcmUx.split("A1").join("B");
_local2.c2NvcmUx = _local2.c2NvcmUx.split(".").join("N");
_local1.data = _local2;
sendToURL(_local1);
}
public function enemyShoot(_arg1:Event):void{
var shot:MovieClip;
var i:int;
var shot2:MovieClip;
var event = _arg1;
if (enemy(event.target).shoot == 1){
shot = new MovieClip();
var _local3 = shot.graphics;
with (_local3) {
lineStyle(10, 0xFF00);
lineTo(0, 10);
};
shot.scaleX = 0.5;
shot.scaleY = 0.5;
shot.x = event.target.x;
shot.y = event.target.y;
shot.rotation = -(event.target.rotation);
enemyShotCont.addChild(shot);
fireSound();
shot.addEventListener("enterFrame", moveEnemyShot);
} else {
if (enemy(event.target).shoot == 2){
i = 0;
while (i < 2) {
shot2 = new MovieClip();
_local3 = shot2.graphics;
with (_local3) {
lineStyle(10, 0xFF00);
lineTo(0, 10);
};
shot2.scaleX = 0.5;
shot2.scaleY = 0.5;
shot2.x = ((event.target.x - 10) + (i * 20));
shot2.y = event.target.y;
shot2.rotation = -(event.target.rotation);
enemyShotCont.addChild(shot2);
fireSound();
shot2.addEventListener("enterFrame", moveEnemyShot);
i = (i + 1);
};
};
};
}
public function removeHighscoreListeners():void{
submitBtn.removeEventListener("click", submitBtnFunction);
noSubmitBtn.removeEventListener("click", noSubmitBtnFunction);
viewBtn.removeEventListener("click", viewBtnFunction);
playMoreHighscoreBtn.removeEventListener("click", playMoreBtnFunction);
}
public function bossCheck(_arg1:Event):void{
if (enemyCont.numChildren == 0){
addEventListener("enterFrame", flyingOff);
removeEventListener("enterFrame", bossCheck);
};
}
public function keyUpsAlways(_arg1:KeyboardEvent){
if (_arg1.keyCode == 77){
toggleMusic();
};
}
public function createPlanet():void{
var _local1:*;
var _local2:uint;
var _local3:ColorTransform;
_local1 = new planets();
_local1.y = ((Math.random() * 750) - 125);
_local1.x = (Math.random() * 500);
_local1.gotoAndStop(Math.ceil((Math.random() * 3)));
_local1.scaleX = (_local1.scaleY = (Math.ceil((Math.random() * 4)) / 3));
_local1.planetGlow.visible = true;
_local1.planetGlow.alpha = (Math.round((Math.random() * 4)) / 4);
_local2 = new uint();
_local3 = new ColorTransform();
_local3.redMultiplier = (Math.random() * 1);
_local3.greenMultiplier = (Math.random() * 1);
_local3.blueMultiplier = (Math.random() * 1);
_local1.transform.colorTransform = _local3;
planetCont.addChild(_local1);
_local1.addEventListener("enterFrame", OEFPlanet);
}
public function moveEnemyShot(_arg1:Event):void{
var event = _arg1;
var _local3 = event.target;
with (_local3) {
x = (x + (shtspd * Math.sin((rotation * (Math.PI / 180)))));
y = (y + (shtspd * Math.cos((rotation * (Math.PI / 180)))));
if (parent.parent.ship.hitTestPoint(x, y, true)){
healthMinus(1);
event.target.removeEventListener("enterFrame", moveEnemyShot);
enemyShotCont.removeChild(DisplayObject(event.target));
};
if ((((((((x >= 500)) || ((x <= 0)))) || ((y >= 550)))) || ((y <= 0)))){
event.target.removeEventListener("enterFrame", moveEnemyShot);
enemyShotCont.removeChild(DisplayObject(event.target));
};
};
}
public function threeBtnFunction(_arg1:MouseEvent):void{
currentLevel = 2;
removeListeners();
gameMode = "normal";
gotoAndStop("game");
}
public function playMoreBtnFunction(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://secure-us.imrworldwide.com/cgi-bin/b?cg=ugoplayer_flash_games&ci=us-ugclicks&tu=http://www.ugoplayer.com");
navigateToURL(_local2, "_blank");
}
public function addEnemyAt(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local5:MovieClip;
_local5 = new enemy(_arg1, _arg2);
_local5.x = _arg3;
_local5.y = _arg4;
_local5.addEventListener("enterFrame", enemyMove);
enemyCont.addChild(_local5);
}
public function creditsBackBtn(_arg1:MouseEvent):void{
credits.gotoAndStop(1);
removeCredits();
addListeners();
}
public function menuHighscoreBtnFunction(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://rankz.armorbot.com/spaceaggressor/");
navigateToURL(_local2, "_blank");
}
public function missileMove(_arg1:Event):void{
var i:*;
var event = _arg1;
var _local3 = event.target;
with (_local3) {
x = (x + (mslespd * Math.sin((rotation * (Math.PI / 180)))));
y = (y - (mslespd * Math.cos((rotation * (Math.PI / 180)))));
i = 0;
while (i < enemyCont.numChildren) {
if (enemyCont.getChildAt(i).hitTestPoint(event.target.x, event.target.y, false)){
enemyDieMissile(enemyCont.getChildAt(i));
event.target.removeEventListener("enterFrame", missileMove);
missileCont.removeChild(DisplayObject(event.target));
};
i++;
};
if ((((((((x >= 500)) || ((x <= 0)))) || ((y >= 550)))) || ((y <= 0)))){
event.target.removeEventListener("enterFrame", missileMove);
missileCont.removeChild(DisplayObject(event.target));
};
};
}
public function removeListeners():void{
playMoreBtn.removeEventListener("click", playMoreBtnFunction);
menuHighscoreBtn.removeEventListener("click", menuHighscoreBtnFunction);
playBtn.removeEventListener("click", playBtnFunction);
creditsBtn.removeEventListener("click", creditsBtnFunction);
if (unlockedLevel > 1){
twoBtn.removeEventListener("click", twoBtnFunction);
};
if (unlockedLevel > 2){
threeBtn.removeEventListener("click", threeBtnFunction);
};
if (unlockedLevel > 3){
fourBtn.removeEventListener("click", fourBtnFunction);
};
if (unlockedLevel > 4){
fiveBtn.removeEventListener("click", fiveBtnFunction);
};
if (unlockedLevel > 5){
hardcoreBtn.removeEventListener("click", hardcoreBtnFunction);
};
}
public function bombWaiter(_arg1:Event):void{
if (bombGraphic.currentFrame == 1){
bombGraphic.play();
} else {
if (bombGraphic.currentFrame == bombGraphic.totalFrames){
bombCharge = false;
bomb = true;
bombGraphic.stop();
removeEventListener("enterFrame", bombWaiter);
};
};
}
public function enemyDieMissile(_arg1:MovieClip){
var _local2:MovieClip;
var _local3:int;
var _local4:Object;
var _local5:int;
explosionSound();
_local2 = new Explosion();
_local3 = Math.ceil((Math.random() * 5));
_local2.explosionHolder.gotoAndStop(_local3);
_local2.x = _arg1.x;
_local2.y = _arg1.y;
_local2.scaleX = (_local2.scaleY = 1.5);
explodeCont.addChild(_local2);
_local2.addEventListener("enterFrame", removeAfterPlayed);
_local4 = _arg1;
_local5 = 0;
while (_local5 < enemyCont.numChildren) {
if (Math.abs(getDistance(enemyCont.getChildAt(_local5), _local4)) < 120){
enemy(enemyCont.getChildAt(_local5)).health = (enemy(enemyCont.getChildAt(_local5)).health - 8);
if (enemy(enemyCont.getChildAt(_local5)).health <= 0){
enemyCont.getChildAt(_local5).removeEventListener("enterFrame", enemyMove);
enemyCont.removeChildAt(_local5);
_local5--;
};
};
_local5++;
};
}
public function addKeys():void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, checkKeys);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUps);
varRight = false;
varLeft = false;
varUp = false;
varDown = false;
varSpace = false;
keysActive = true;
}
public function removeEverything():void{
var _local1:int;
_local1 = 0;
while (_local1 < enemyCont.numChildren) {
enemyCont.getChildAt(_local1).removeEventListener("enterFrame", enemyMove);
_local1++;
};
while (enemyCont.numChildren > 0) {
enemyCont.removeChildAt(0);
};
_local1 = 0;
while (_local1 < enemyShotCont.numChildren) {
enemyShotCont.getChildAt(_local1).removeEventListener("enterFrame", moveEnemyShot);
_local1++;
};
while (enemyShotCont.numChildren > 0) {
enemyShotCont.removeChildAt(0);
};
_local1 = 0;
while (_local1 < planetCont.numChildren) {
planetCont.getChildAt(_local1).removeEventListener("enterFrame", OEFPlanet);
_local1++;
};
while (planetCont.numChildren > 0) {
planetCont.removeChildAt(0);
};
while (bonusCont.numChildren > 0) {
bonus(bonusCont.getChildAt(0)).removeSelf();
};
removeChild(shieldBar);
removeChild(missileContainer);
removeChild(bombGraphic);
removeChild(pausedScreen);
removeEventListener("enterFrame", bigBossCheck);
removeEventListener("enterFrame", bossCheck);
}
public function keyUps(_arg1:KeyboardEvent){
if (_arg1.keyCode == 67){
addMissile();
};
if (_arg1.keyCode == 39){
_arg1.keyCode = 0;
varRight = false;
};
if (_arg1.keyCode == 38){
_arg1.keyCode = 0;
varUp = false;
};
if (_arg1.keyCode == 37){
_arg1.keyCode = 0;
varLeft = false;
};
if (_arg1.keyCode == 40){
_arg1.keyCode = 0;
varDown = false;
};
if (_arg1.keyCode == 32){
_arg1.keyCode = 0;
varSpace = false;
};
if (_arg1.keyCode == 86){
useBomb();
};
}
public function addHealth():void{
if (health < 15){
health++;
shieldBar.gotoAndStop((health + 1));
} else {
score = (score + 1000);
};
}
public function waiting(_arg1:Event):void{
if (intro.currentFrame == intro.totalFrames){
gotoAndPlay(2);
removeEventListener("enterFrame", waiting);
};
}
public function viewBtnFunction(_arg1:MouseEvent):void{
viewScores();
}
public function moveShot(_arg1:Event):void{
var privateBreak:*;
var i:*;
var event = _arg1;
var _local3 = event.target;
with (_local3) {
privateBreak = false;
x = (x + (shtspd * Math.sin((rotation * (Math.PI / 180)))));
y = (y - (shtspd * Math.cos((rotation * (Math.PI / 180)))));
i = 0;
while (i < enemyCont.numChildren) {
if (enemyCont.getChildAt(i).hitTestPoint(event.target.x, event.target.y, true)){
enemy(enemyCont.getChildAt(i)).health--;
if (enemy(enemyCont.getChildAt(i)).health <= 0){
enemyDie(enemyCont.getChildAt(i));
} else {
enemyCont.getChildAt(i).shields.play();
};
event.target.removeEventListener("enterFrame", moveShot);
shotCont.removeChild(DisplayObject(event.target));
privateBreak = true;
break;
};
i++;
};
if (!privateBreak){
if ((((((((x >= 500)) || ((x <= 0)))) || ((y >= 550)))) || ((y <= 0)))){
event.target.removeEventListener("enterFrame", moveShot);
shotCont.removeChild(DisplayObject(event.target));
};
};
};
}
public function gameOverWait(_arg1:Event):void{
if (gameoverAni.currentFrame == gameoverAni.totalFrames){
removeEverything();
stage.quality = "high";
removeEventListener("enterFrame", gameOverWait);
gotoAndStop("highscores");
};
}
public function playBtnFunction(_arg1:MouseEvent):void{
currentLevel = 0;
removeListeners();
gameMode = "normal";
gotoAndStop("game");
}
public function addNameGraphic(_arg1:Number, _arg2:Number, _arg3:String):void{
var _local4:Points;
_local4 = new Points();
_local4.myTextfield.text = _arg3;
_local4.myTextfield.textColor = uint("0xFFFF00");
_local4.x = _arg1;
_local4.y = _arg2;
pointsCont.addChild(_local4);
}
public function waitingForSubmit(_arg1:Event):void{
waitForSubmit++;
if (waitForSubmit > 10){
viewScores();
removeEventListener("enterFrame", waitingForSubmit);
};
}
public function addLine1(_arg1:String, _arg2:String):void{
addEnemyAt(_arg1, _arg2, 0, -125);
addEnemyAt(_arg1, _arg2, 50, -112.5);
addEnemyAt(_arg1, _arg2, 100, -100);
addEnemyAt(_arg1, _arg2, 150, -87.5);
addEnemyAt(_arg1, _arg2, 200, -75);
addEnemyAt(_arg1, _arg2, 250, -62.5);
addEnemyAt(_arg1, _arg2, 300, -50);
addEnemyAt(_arg1, _arg2, 350, -37.5);
addEnemyAt(_arg1, _arg2, 400, -25);
addEnemyAt(_arg1, _arg2, 450, -12.5);
addEnemyAt(_arg1, _arg2, 500, 0);
}
public function addLine2(_arg1:String, _arg2:String):void{
addEnemyAt(_arg1, _arg2, 500, -125);
addEnemyAt(_arg1, _arg2, 450, -112.5);
addEnemyAt(_arg1, _arg2, 400, -100);
addEnemyAt(_arg1, _arg2, 350, -87.5);
addEnemyAt(_arg1, _arg2, 300, -75);
addEnemyAt(_arg1, _arg2, 250, -62.5);
addEnemyAt(_arg1, _arg2, 200, -50);
addEnemyAt(_arg1, _arg2, 150, -37.5);
addEnemyAt(_arg1, _arg2, 100, -25);
addEnemyAt(_arg1, _arg2, 50, -12.5);
addEnemyAt(_arg1, _arg2, 0, 0);
}
public function addListeners():void{
playMoreBtn.addEventListener("click", playMoreBtnFunction);
menuHighscoreBtn.addEventListener("click", menuHighscoreBtnFunction);
playBtn.addEventListener("click", playBtnFunction);
creditsBtn.addEventListener("click", creditsBtnFunction);
if (unlockedLevel > 1){
twoBtn.addEventListener("click", twoBtnFunction);
twoTxt.gotoAndStop(2);
};
if (unlockedLevel > 2){
threeBtn.addEventListener("click", threeBtnFunction);
threeTxt.gotoAndStop(2);
};
if (unlockedLevel > 3){
fourBtn.addEventListener("click", fourBtnFunction);
fourTxt.gotoAndStop(2);
};
if (unlockedLevel > 4){
fiveBtn.addEventListener("click", fiveBtnFunction);
fiveTxt.gotoAndStop(2);
};
if (unlockedLevel > 5){
hardcoreBtn.addEventListener("click", hardcoreBtnFunction);
hardcoreTxt.gotoAndStop(2);
};
}
public function initiate(_arg1:Event):void{
if (MovieClip(animation.getChildAt(currentLevel)).currentFrame == 2){
removeEventListener("enterFrame", initiate);
stage.addEventListener(KeyboardEvent.KEY_UP, skipAnimation);
addEventListener("enterFrame", waitForAnimation);
} else {
MovieClip(animation.getChildAt(currentLevel)).gotoAndPlay(2);
lowerVolume();
};
while ((5 - currentLevel) < levels.length) {
levels.shift();
};
if (currentLevel > 3){
guns = 2;
ship.gotoAndStop(3);
} else {
if (currentLevel > 1){
guns = 2;
} else {
guns = 1;
};
};
ship.guns.gotoAndStop(guns);
}
public function creditsPrankardBtnFunction(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.prankard.com/");
navigateToURL(_local2, "_blank");
}
public function addLine3(_arg1:String, _arg2:String):void{
addEnemyAt(_arg1, _arg2, 500, -50);
addEnemyAt(_arg1, _arg2, 450, -50);
addEnemyAt(_arg1, _arg2, 400, -50);
addEnemyAt(_arg1, _arg2, 350, -50);
addEnemyAt(_arg1, _arg2, 300, -50);
addEnemyAt(_arg1, _arg2, 250, -50);
addEnemyAt(_arg1, _arg2, 200, -50);
addEnemyAt(_arg1, _arg2, 150, -50);
addEnemyAt(_arg1, _arg2, 100, -50);
addEnemyAt(_arg1, _arg2, 50, -50);
addEnemyAt(_arg1, _arg2, 0, -50);
}
public function redesignPlanet(_arg1:MovieClip):void{
var _local2:ColorTransform;
_arg1.scaleX = (_arg1.scaleY = (Math.ceil((Math.random() * 4)) / 3));
_arg1.planetGlow.alpha = (Math.round((Math.random() * 4)) / 4);
_arg1.gotoAndStop(Math.ceil((Math.random() * 4)));
_arg1.y = (-(_arg1.height) / 2);
_arg1.x = (Math.random() * 500);
_local2 = new ColorTransform();
_local2.redMultiplier = (Math.random() * 1);
_local2.greenMultiplier = (Math.random() * 1);
_local2.blueMultiplier = (Math.random() * 1);
_arg1.transform.colorTransform = _local2;
}
public function playAnimation():void{
lowerVolume();
MovieClip(animation.getChildAt(currentLevel)).play();
stage.addEventListener(KeyboardEvent.KEY_UP, skipAnimation);
addEventListener("enterFrame", waitForAnimation);
}
public function playBigBoss():void{
levelHolder.levelTween.levelTxt.text = String("Final Boss");
levelHolder.gotoAndPlay(1);
trace(levelHolder.currentFrame);
addEventListener("enterFrame", waitForBigBoss);
}
public function waitForAnimation(_arg1:Event):void{
if (MovieClip(animation.getChildAt(currentLevel)).currentFrame == MovieClip(animation.getChildAt(currentLevel)).totalFrames){
normalVolume();
removeEventListener("enterFrame", waitForAnimation);
stage.removeEventListener(KeyboardEvent.KEY_UP, skipAnimation);
if (currentLevel == 5){
stage.removeEventListener("enterFrame", movement);
removeEverything();
stage.quality = "high";
gotoAndStop("completed");
} else {
addEventListener("enterFrame", flyingIn);
};
};
}
public function movementSwirlAttract(_arg1:Event):void{
if ((ship.y - _arg1.target.y) > 250){
movementSwirl(_arg1);
} else {
movementAttract(_arg1);
};
}
public function waitForBigBoss(_arg1:Event):void{
if (levelHolder.currentFrame == levelHolder.totalFrames){
addEventListener("enterFrame", bigBossCheck);
addEnemy("bigBoss", "bigBossMove");
addEnemy("bigBossPart1", "bigBossPartMove");
addEnemy("bigBossPart2", "bigBossPartMove");
boss3 = true;
removeEventListener("enterFrame", waitForBigBoss);
};
}
public function normalVolume():void{
stage.frameRate = 50;
loopVolume = "full";
stage.quality = "low";
loopChannel.soundTransform = new SoundTransform();
}
public function waitForCredits(_arg1:Event):void{
if (credits.currentFrame == credits.totalFrames){
removeCredits();
addListeners();
};
}
public function OEFPlanet(_arg1:Event){
_arg1.target.y = (_arg1.target.y + (_arg1.target.scaleY * 5));
if (_arg1.target.y > (550 + (_arg1.target.height / 2))){
redesignPlanet(MovieClip(_arg1.target));
};
}
public function explosionSound():void{
var _local1:int;
var _local2:explosion1Sound;
var _local3:explosion2Sound;
var _local4:explosion3Sound;
_local1 = Math.ceil((Math.random() * 3));
if (_local1 == 3){
_local2 = new explosion1Sound();
_local2.play();
} else {
if (_local1 == 2){
_local3 = new explosion2Sound();
_local3.play();
} else {
_local4 = new explosion3Sound();
_local4.play();
};
};
}
public function pauseGame():void{
var _local1:int;
if (canPause){
pausedScreen.x = 0;
pausedScreen.y = 0;
_local1 = 0;
while (_local1 < enemyCont.numChildren) {
enemyCont.getChildAt(_local1).removeEventListener("enterFrame", enemyMove);
_local1++;
};
_local1 = 0;
while (_local1 < enemyShotCont.numChildren) {
enemyShotCont.getChildAt(_local1).removeEventListener("enterFrame", moveEnemyShot);
_local1++;
};
_local1 = 0;
while (_local1 < planetCont.numChildren) {
planetCont.getChildAt(_local1).removeEventListener("enterFrame", OEFPlanet);
_local1++;
};
_local1 = 0;
while (_local1 < shotCont.numChildren) {
shotCont.getChildAt(_local1).removeEventListener("enterFrame", moveShot);
_local1++;
};
_local1 = 0;
while (_local1 < starCont.numChildren) {
starCont.getChildAt(_local1).removeEventListener("enterFrame", OEF);
_local1++;
};
_local1 = 0;
while (_local1 < bonusCont.numChildren) {
bonus(bonusCont.getChildAt(_local1)).pause();
_local1++;
};
_local1 = 0;
while (_local1 < pointsCont.numChildren) {
Points(pointsCont.getChildAt(_local1)).pause();
_local1++;
};
removeEventListener("enterFrame", levelFunction);
stage.removeEventListener("enterFrame", movement);
pausedVar = true;
};
}
public function checkKeys(_arg1:KeyboardEvent){
if (_arg1.keyCode == 39){
varRight = true;
};
if (_arg1.keyCode == 38){
varUp = true;
};
if (_arg1.keyCode == 37){
varLeft = true;
};
if (_arg1.keyCode == 40){
varDown = true;
};
if (_arg1.keyCode == 32){
varSpace = true;
};
}
public function shieldSound():void{
var _local1:int;
var _local2:shield1Sound;
var _local3:shield2Sound;
var _local4:shield3Sound;
_local1 = Math.ceil((Math.random() * 3));
if (_local1 == 3){
_local2 = new shield1Sound();
_local2.play();
} else {
if (_local1 == 2){
_local3 = new shield2Sound();
_local3.play();
} else {
_local4 = new shield3Sound();
_local4.play();
};
};
}
public function submitBtnFunction(_arg1:MouseEvent):void{
if (nameInput.text !== "name here"){
if (!sentData){
sentData = true;
if (gameMode == "hardcore"){
sendHardcoreData();
} else {
sendData();
};
addEventListener("enterFrame", waitingForSubmit);
removeHighscoreListeners();
gotoAndStop("menu");
};
};
}
public function viewScores():void{
var _local1:URLRequest;
var _local2:URLRequest;
if (gameMode == "hardcore"){
_local1 = new URLRequest("http://rankz.armorbot.com/spaceaggressorhardcore/");
navigateToURL(_local1, "_blank");
} else {
_local2 = new URLRequest("http://rankz.armorbot.com/spaceaggressor/");
navigateToURL(_local2, "_blank");
};
}
public function toggleMusic():void{
if (musicPlaying){
loopChannel.removeEventListener("soundComplete", playLoop);
loopChannel.stop();
musicPlaying = false;
} else {
playLoop(null);
musicPlaying = true;
};
}
public function enemyDieNoSpawn(_arg1:MovieClip){
addExplosion(_arg1.x, _arg1.y);
_arg1.removeEventListener("enterFrame", enemyMove);
enemyCont.removeChild(_arg1);
}
public function sendData():void{
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:Number;
var _local4:String;
_local1 = new URLRequest("http://rankz.armorbot.com/submit/as3_v0.php");
_local1.method = URLRequestMethod.POST;
_local2 = new URLVariables();
_local2.flashkey = "eWdCWVBuc1E=";
_local2.SU0249 = "MjQyOWolZSVhJW4lcw==";
_local2.bmFtZTE = nameInput.text;
_local3 = totalScore;
_local4 = (_local3 + "Z");
_local2.c2NvcmUx = _local4.split("0").join("U");
_local2.c2NvcmUx = _local2.c2NvcmUx.split("").join("A");
_local2.c2NvcmUx = _local2.c2NvcmUx.split("AU").join("Y");
_local2.c2NvcmUx = _local2.c2NvcmUx.split("A1").join("B");
_local2.c2NvcmUx = _local2.c2NvcmUx.split(".").join("N");
_local1.data = _local2;
sendToURL(_local1);
}
public function noSubmitBtnFunction(_arg1:MouseEvent):void{
removeHighscoreListeners();
gotoAndStop("menu");
}
public function addEnemy(_arg1:String, _arg2:String):void{
var _local3:MovieClip;
_local3 = new enemy(_arg1, _arg2);
_local3.addEventListener("enterFrame", enemyMove);
enemyCont.addChild(_local3);
}
public function addBombExplosion():void{
var _local1:MovieClip;
_local1 = new bombExplode();
explodeCont.addChild(_local1);
_local1.addEventListener("enterFrame", removeAfterPlayed);
}
public function removeCredits():void{
removeEventListener("enterFrame", waitForCredits);
credits.backBtn.removeEventListener("click", creditsBackBtn);
credits.creditsTween.creditsKESBtn.removeEventListener("click", creditsKESBtnFunction);
credits.creditsTween.creditsPrankardBtn.removeEventListener("click", creditsPrankardBtnFunction);
credits.creditsTween.creditsUGOBtn.removeEventListener("click", playMoreBtnFunction);
credits.x = 1000;
credits.y = 1000;
}
public function enemyMove(_arg1:Event):void{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
_local2 = enemy(_arg1.target).movementType;
if (_local2 == "fallAndRotate"){
_arg1.target.y = (_arg1.target.y + enemy(_arg1.target).ySpd);
_arg1.target.rotation = (_arg1.target.rotation + 3);
} else {
if (_local2 == "swirl"){
_arg1.target.y = (_arg1.target.y + enemy(_arg1.target).ySpd);
movementSwirl(_arg1);
} else {
if (_local2 == "attract"){
_arg1.target.y = (_arg1.target.y + enemy(_arg1.target).ySpd);
movementAttract(_arg1);
} else {
if (_local2 == "attractAndShoot"){
_arg1.target.y = (_arg1.target.y + enemy(_arg1.target).ySpd);
movementAttract(_arg1);
if (enemy(_arg1.target).count == 15){
enemyShoot(_arg1);
enemy(_arg1.target).count = 0;
} else {
enemy(_arg1.target).count++;
};
} else {
if (_local2 == "rotateAndShoot"){
_arg1.target.y = (_arg1.target.y + enemy(_arg1.target).ySpd);
movementShotSpin(_arg1);
} else {
if (_local2 == "swirlAndShoot"){
_arg1.target.y = (_arg1.target.y + enemy(_arg1.target).ySpd);
movementSwirl(_arg1);
if (enemy(_arg1.target).count == 15){
enemyShoot(_arg1);
enemy(_arg1.target).count = 0;
} else {
enemy(_arg1.target).count++;
};
} else {
if (_local2 == "swirlAndAttract"){
_arg1.target.y = (_arg1.target.y + enemy(_arg1.target).ySpd);
movementSwirlAttract(_arg1);
} else {
if (_local2 == "charge"){
_arg1.target.y = (_arg1.target.y + enemy(_arg1.target).ySpd);
movementCharge(_arg1);
} else {
if (_local2 == "bossMove"){
if (_arg1.target.y < 100){
_arg1.target.y = (_arg1.target.y + 3);
};
if (((enemy(_arg1.target).film.visible) && ((enemy(_arg1.target).health < 35)))){
enemy(_arg1.target).film.visible = false;
enemy(_arg1.target).eye.play();
} else {
if (((enemy(_arg1.target).film.visible) && ((enemy(_arg1.target).health > 35)))){
enemy(_arg1.target).film.alpha = (((enemy(_arg1.target).health - 35) * 3) / 100);
} else {
if (!enemy(_arg1.target).film.visible){
_local3 = (_arg1.target.y - ship.y);
_local4 = (_arg1.target.x - ship.x);
_local5 = Math.atan2(_local3, _local4);
enemy(_arg1.target).eye.pupil.rotation = (_local5 / (3.14 / 180));
};
};
};
_arg1.target.x = (_arg1.target.x + enemy(_arg1.target).xSpd);
if ((((_arg1.target.x > 450)) || ((_arg1.target.x < 50)))){
enemy(_arg1.target).xSpd = -(enemy(_arg1.target).xSpd);
_arg1.target.x = (_arg1.target.x + (enemy(_arg1.target).xSpd * 2));
};
if (Math.round((timer / 6)) == (timer / 6)){
addEnemy("critter", "swirl");
};
} else {
if (_local2 == "bigBossMove"){
if (_arg1.target.y < 100){
_arg1.target.y = (_arg1.target.y + 3);
};
enemy(_arg1.target).count++;
if (enemy(_arg1.target).count > 20){
enemy(_arg1.target).spawn.play();
enemy(_arg1.target).count = 0;
addEnemyAt("critter", "attract", _arg1.target.x, (_arg1.target.y + 40));
};
} else {
if (_local2 == "bigBossPartMove"){
if (_arg1.target.y < 100){
_arg1.target.y = (_arg1.target.y + 3);
};
_local6 = enemy(_arg1.target).count;
++_local6;
if (_local6 > 100){
if (_local6 > 200){
if (_arg1.target.y > 100){
_arg1.target.y = (_arg1.target.y - 7);
};
} else {
if (_arg1.target.y < 400){
_arg1.target.y = (_arg1.target.y + 7);
};
};
if (_local6 >= 250){
_local6 = 0;
};
};
if ((((((((((_local6 == 20)) || ((_local6 == 40)))) || ((_local6 == 60)))) || ((_local6 == 80)))) || ((_local6 == 100)))){
addEnemyAt("critter", "charge", _arg1.target.x, _arg1.target.y);
} else {
if (_local6 == 124){
addEnemyAt("turret", "rotateAndShoot", _arg1.target.x, -50);
};
};
enemy(_arg1.target).count = _local6;
};
};
};
};
};
};
};
};
};
};
};
if (_arg1.target.y > 600){
enemyCont.removeChild(DisplayObject(_arg1.target));
_arg1.target.removeEventListener("enterFrame", enemyMove);
};
}
public function addExplosion(_arg1:Number, _arg2:Number):void{
var _local3:MovieClip;
var _local4:int;
explosionSound();
_local3 = new Explosion();
_local4 = Math.ceil((Math.random() * 5));
_local3.explosionHolder.gotoAndStop(_local4);
_local3.x = _arg1;
_local3.y = _arg2;
explodeCont.addChild(_local3);
_local3.addEventListener("enterFrame", removeAfterPlayed);
}
public function levelFunction(_arg1:Event):void{
var _local2:Array;
var _local3:String;
canPause = true;
_local2 = levels[0][0].split(":");
if (_local2[0] > 0){
_local2[0] = (_local2[0] - 1);
_local3 = ((((((_local2[0] + ":") + _local2[1]) + ":") + _local2[2]) + ":") + _local2[3]);
levels[0][0] = _local3;
} else {
_local2.shift();
if (_local2[1] == "wave1"){
addWave1(_local2[0], _local2[2]);
} else {
if (_local2[1] == "wave2"){
addWave2(_local2[0], _local2[2]);
} else {
if (_local2[1] == "line1"){
addLine1(_local2[0], _local2[2]);
} else {
if (_local2[1] == "line2"){
addLine2(_local2[0], _local2[2]);
} else {
if (_local2[1] == "line3"){
addLine3(_local2[0], _local2[2]);
} else {
if (_local2[1] == "single"){
addEnemy(_local2[0], _local2[2]);
} else {
if (_local2[1] == "cluster1"){
addCluster1(_local2[0], _local2[2]);
} else {
if (_local2[1] == "cluster2"){
addCluster2(_local2[0], _local2[2]);
} else {
if (_local2[1] == "cluster3"){
addCluster3(_local2[0], _local2[2]);
} else {
if (_local2[0] == "bonus"){
addBonus(_local2[1]);
};
};
};
};
};
};
};
};
};
};
levels[0].shift();
if (levels[0].length <= 0){
levels.shift();
if ((((currentLevel == 3)) && ((boss1 == false)))){
playBoss();
removeEventListener("enterFrame", levelFunction);
} else {
if ((((currentLevel == 4)) && ((boss2 == false)))){
playBoss();
removeEventListener("enterFrame", levelFunction);
} else {
if ((((currentLevel == 5)) && ((boss3 == false)))){
playBigBoss();
removeEventListener("enterFrame", levelFunction);
} else {
if ((((currentLevel == 5)) && ((boss3 == true)))){
removeEverything();
removeEventListener("enterFrame", levelFunction);
gotoAndStop("menu");
} else {
addEventListener("enterFrame", flyingOff);
removeEventListener("enterFrame", levelFunction);
canPause = false;
};
};
};
};
};
};
}
public function addGuns():void{
if (guns < 3){
guns++;
ship.guns.gotoAndStop(guns);
} else {
score = (score + 1000);
};
}
public function missileSound():void{
var _local1:int;
var _local2:missile1Sound;
var _local3:missile2Sound;
var _local4:missile3Sound;
_local1 = Math.ceil((Math.random() * 3));
if (_local1 == 3){
_local2 = new missile1Sound();
_local2.play();
} else {
if (_local1 == 2){
_local3 = new missile2Sound();
_local3.play();
} else {
_local4 = new missile3Sound();
_local4.play();
};
};
}
public function healthMinus(_arg1:int):void{
health = (health - _arg1);
if (health > 0){
ship.shields.play();
shieldSound();
} else {
gameOver();
health = 0;
};
shieldBar.gotoAndStop((health + 1));
}
public function enemyDie(_arg1:MovieClip){
if (Math.ceil((Math.random() * 5)) == 5){
addSpecialExplosion(_arg1.x, _arg1.y, enemy(_arg1).enemyType, enemy(_arg1).asteroidType);
} else {
addExplosion(_arg1.x, _arg1.y);
};
levelScore = (levelScore + enemy(_arg1).worth);
addPointsGraphic(_arg1.x, _arg1.y, enemy(_arg1).worth);
if (gameMode == "normal"){
if (((((!((enemy(_arg1).enemyType === "asteroid"))) && (!((enemy(_arg1).enemyType === "asteroidBlue"))))) && (!((enemy(_arg1).enemyType === "asteroidRed"))))){
spawnBonus(_arg1.x, _arg1.y);
};
};
_arg1.removeEventListener("enterFrame", enemyMove);
enemyCont.removeChild(_arg1);
}
public function gameOver():void{
addExplosion(ship.x, ship.y);
gameoverAni.play();
ship.x = -100;
ship.y = -100;
removeKeys();
stage.removeEventListener("enterFrame", movement);
removeEventListener("enterFrame", flyingOff);
removeEventListener("enterFrame", levelFunction);
addEventListener("enterFrame", gameOverWait);
}
public function playLoop(_arg1:Event):void{
if (loopChannel != null){
loopChannel.removeEventListener("soundComplete", playLoop);
};
loopChannel = loopSound.play();
loopChannel.addEventListener("soundComplete", playLoop);
if (loopVolume == "half"){
lowerVolume();
};
}
public function addBonus(_arg1:String):void{
var _local2:MovieClip;
_local2 = new bonus(_arg1);
bonusCont.addChild(_local2);
}
}
}//package kesSpace_fla
Section 26
//missileContainer_31 (kesSpace_fla.missileContainer_31)
package kesSpace_fla {
import flash.display.*;
public dynamic class missileContainer_31 extends MovieClip {
public function missileContainer_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 27
//preload_3 (kesSpace_fla.preload_3)
package kesSpace_fla {
import flash.display.*;
public dynamic class preload_3 extends MovieClip {
public var lbar:MovieClip;
}
}//package kesSpace_fla
Section 28
//preloader_1 (kesSpace_fla.preloader_1)
package kesSpace_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class preloader_1 extends MovieClip {
public var preload:MovieClip;
public var sponsor:MovieClip;
public function preloader_1(){
addFrameScript(0, frame1, 40, frame41);
}
function frame1(){
stop();
}
function frame41(){
sponsor.clicktagbtn.addEventListener("click", sponsorclicker);
}
public function sponsorclicker(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://secure-us.imrworldwide.com/cgi-bin/b?cg=ugoplayer_flash_games&ci=us-ugclicks&tu=http://www.ugoplayer.com");
navigateToURL(_local2, "_blank");
}
}
}//package kesSpace_fla
Section 29
//scoreHolder_32 (kesSpace_fla.scoreHolder_32)
package kesSpace_fla {
import flash.display.*;
public dynamic class scoreHolder_32 extends MovieClip {
public var scoreTween:MovieClip;
public function scoreHolder_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 30
//scoreTween_33 (kesSpace_fla.scoreTween_33)
package kesSpace_fla {
import flash.display.*;
import flash.text.*;
public dynamic class scoreTween_33 extends MovieClip {
public var lScore:TextField;
public var tScore:TextField;
}
}//package kesSpace_fla
Section 31
//shields_12 (kesSpace_fla.shields_12)
package kesSpace_fla {
import flash.display.*;
public dynamic class shields_12 extends MovieClip {
public function shields_12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 32
//ship_29 (kesSpace_fla.ship_29)
package kesSpace_fla {
import flash.display.*;
public dynamic class ship_29 extends MovieClip {
public var shields:MovieClip;
public var guns:MovieClip;
public function ship_29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 33
//soundsLoad_9 (kesSpace_fla.soundsLoad_9)
package kesSpace_fla {
import flash.display.*;
public dynamic class soundsLoad_9 extends MovieClip {
public function soundsLoad_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 34
//Sponsor_5 (kesSpace_fla.Sponsor_5)
package kesSpace_fla {
import flash.display.*;
import flash.net.*;
public dynamic class Sponsor_5 extends MovieClip {
public var clicktagbtn:SimpleButton;
public function Sponsor_5(){
addFrameScript(20, frame21);
}
function frame21(){
nielsen("game_intro");
trace("ran");
}
public function nielsen(_arg1){
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:URLRequest;
var _local6:Loader;
_local2 = "us-ugo";
_local3 = "ugoplayer_flashgames";
_local4 = escape(_arg1);
_local5 = new URLRequest(((((((("http://secure-us.imrworldwide.com/cgi-bin/m?ci=" + _local2) + "&cg=") + _local3) + "&si=") + _local4) + "&rnd=") + Math.ceil((Math.random() * 100000000))));
_local6 = new Loader();
_local6.load(_local5);
addChild(_local6);
}
}
}//package kesSpace_fla
Section 35
//theeye_71 (kesSpace_fla.theeye_71)
package kesSpace_fla {
import flash.display.*;
public dynamic class theeye_71 extends MovieClip {
public var pupil:MovieClip;
public function theeye_71(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 36
//threeTxt_20 (kesSpace_fla.threeTxt_20)
package kesSpace_fla {
import flash.display.*;
public dynamic class threeTxt_20 extends MovieClip {
public function threeTxt_20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 37
//twoTxt_19 (kesSpace_fla.twoTxt_19)
package kesSpace_fla {
import flash.display.*;
public dynamic class twoTxt_19 extends MovieClip {
public function twoTxt_19(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package kesSpace_fla
Section 38
//txt_6 (kesSpace_fla.txt_6)
package kesSpace_fla {
import flash.display.*;
public dynamic class txt_6 extends MovieClip {
public function txt_6(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package kesSpace_fla
Section 39
//bombExplode (bombExplode)
package {
import flash.display.*;
public dynamic class bombExplode extends MovieClip {
}
}//package
Section 40
//bonus (bonus)
package {
import flash.events.*;
import flash.display.*;
public class bonus extends MovieClip {
public var xspd:Number;
public var yspd:Number;// = 3
public var bonusType:String;
public function bonus(_arg1:String):void{
xspd = (3 * (Math.round((Math.random() * 2)) - 0.5));
yspd = 3;
super();
this.gotoAndStop(_arg1);
x = (Math.random() * 550);
y = (0 + (this.height / 2));
bonusType = _arg1;
addEventListener("enterFrame", bonusMove);
}
private function bonusMove(_arg1:Event):void{
if (x < (0 + (this.width / 2))){
x = (0 + (this.width / 2));
xspd = -(xspd);
} else {
if (x > (500 - (this.width / 2))){
x = (500 - (this.width / 2));
xspd = -(xspd);
};
};
if (y < (0 - this.height)){
removeSelf();
} else {
if (y > (550 + this.height)){
removeSelf();
};
};
rotation = (rotation + xspd);
x = (x + xspd);
y = (y + yspd);
}
public function unPause():void{
addEventListener("enterFrame", bonusMove);
}
public function pause():void{
removeEventListener("enterFrame", bonusMove);
}
public function removeSelf():void{
parent.removeChild(this);
removeEventListener("enterFrame", bonusMove);
}
}
}//package
Section 41
//enemy (enemy)
package {
import flash.display.*;
public class enemy extends MovieClip {
public var xSpd:int;// = 0
public var shoot:int;// = 1
public var eye:MovieClip;
public var count:int;// = 5
public var shields:MovieClip;
public var health:int;// = 1
public var rotated:Boolean;// = false
public var ySpd:int;// = 10
public var spawn:MovieClip;
public var film:MovieClip;
public var acc:Number;// = 0
public var leftBool:Boolean;// = false
public var worth:int;// = 1
public var movementType:String;
public var asteroidType:int;// = 1
public var maxSpd:Number;// = 5
public var charge:Boolean;// = false
public var enemyType:String;// = "speed"
public function enemy(_arg1:String, _arg2:String):void{
var _local3:int;
enemyType = "speed";
health = 1;
worth = 1;
shoot = 1;
acc = 0;
maxSpd = 5;
ySpd = 10;
xSpd = 0;
leftBool = false;
charge = false;
rotated = false;
count = 5;
asteroidType = 1;
super();
movementType = _arg2;
scaleX = (scaleY = 0.5);
enemyType = _arg1;
if ((((((((_arg1 == "asteroid")) || ((_arg1 == "asteroidBlue")))) || ((_arg1 == "asteroidRed")))) || ((_arg1 == "asteroidBig")))){
ySpd = 7;
scaleX = (scaleY = ((50 + (Math.ceil((Math.random() * 5)) * 10)) / 200));
_local3 = Math.ceil((Math.random() * 2));
asteroidType = _local3;
gotoAndStop(String((_arg1 + _local3)));
} else {
this.gotoAndStop(_arg1);
};
if (_arg1 == "critter"){
x = ((Math.random() * 450) + 25);
y = -50;
health = 1;
worth = 50;
ySpd = 10;
} else {
if (_arg1 == "type1"){
shoot = 1;
x = ((Math.random() * 450) + 25);
y = -50;
health = 1;
worth = 75;
ySpd = 10;
} else {
if (_arg1 == "type2"){
shoot = 2;
x = ((Math.random() * 450) + 25);
y = -50;
health = 4;
worth = 100;
ySpd = 7;
} else {
if (_arg1 == "asteroid"){
x = ((Math.random() * 450) + 25);
y = -50;
health = 1;
worth = 10;
} else {
if (_arg1 == "asteroidBlue"){
x = ((Math.random() * 450) + 25);
y = -50;
health = 2;
worth = 20;
} else {
if (_arg1 == "asteroidRed"){
x = ((Math.random() * 450) + 25);
y = -50;
health = 3;
worth = 30;
} else {
if (_arg1 == "asteroidBig"){
x = ((Math.random() * 450) + 25);
y = -50;
scaleX = (scaleY = 1.7);
health = 6;
worth = 30;
ySpd = 5;
} else {
if (_arg1 == "miniBoss"){
x = 250;
y = -100;
health = 70;
worth = 2000;
ySpd = 0;
xSpd = 3;
} else {
if (_arg1 == "turret"){
x = ((Math.random() * 450) + 25);
y = -50;
health = 5;
worth = 70;
} else {
if (_arg1 == "bigBoss"){
x = 250;
y = -50;
health = 150;
worth = 2000;
} else {
if (_arg1 == "bigBossPart1"){
x = 100;
y = -50;
health = 100;
worth = 70;
count = 500;
} else {
if (_arg1 == "bigBossPart2"){
x = 400;
y = -50;
health = 100;
worth = 500;
};
};
};
};
};
};
};
};
};
};
};
};
}
}
}//package
Section 42
//Explosion (Explosion)
package {
import flash.display.*;
public dynamic class Explosion extends MovieClip {
public var explosionHolder:MovieClip;
}
}//package
Section 43
//explosion1Sound (explosion1Sound)
package {
import flash.media.*;
public dynamic class explosion1Sound extends Sound {
}
}//package
Section 44
//explosion2Sound (explosion2Sound)
package {
import flash.media.*;
public dynamic class explosion2Sound extends Sound {
}
}//package
Section 45
//explosion3Sound (explosion3Sound)
package {
import flash.media.*;
public dynamic class explosion3Sound extends Sound {
}
}//package
Section 46
//fire1Sound (fire1Sound)
package {
import flash.media.*;
public dynamic class fire1Sound extends Sound {
}
}//package
Section 47
//fire2Sound (fire2Sound)
package {
import flash.media.*;
public dynamic class fire2Sound extends Sound {
}
}//package
Section 48
//fire3Sound (fire3Sound)
package {
import flash.media.*;
public dynamic class fire3Sound extends Sound {
}
}//package
Section 49
//missile (missile)
package {
import flash.display.*;
public dynamic class missile extends MovieClip {
}
}//package
Section 50
//missile1Sound (missile1Sound)
package {
import flash.media.*;
public dynamic class missile1Sound extends Sound {
}
}//package
Section 51
//missile2Sound (missile2Sound)
package {
import flash.media.*;
public dynamic class missile2Sound extends Sound {
}
}//package
Section 52
//missile3Sound (missile3Sound)
package {
import flash.media.*;
public dynamic class missile3Sound extends Sound {
}
}//package
Section 53
//planets (planets)
package {
import flash.display.*;
public dynamic class planets extends MovieClip {
public var planetGlow:MovieClip;
public var planet:MovieClip;
}
}//package
Section 54
//Points (Points)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class Points extends MovieClip {
private var wait:int;// = 10
public var acc:Number;// = 0
public var myTextfield:TextField;
public function Points():void{
acc = 0;
wait = 10;
super();
addEventListener("enterFrame", animate);
}
public function unPause():void{
addEventListener("enterFrame", animate);
}
private function animate(_arg1:Event):void{
if (wait <= 0){
acc = (acc + 0.005);
scaleX = (scaleX - acc);
scaleY = scaleX;
if (scaleX <= 0){
removeEventListener("enterFrame", animate);
parent.removeChild(this);
};
} else {
wait--;
};
}
public function pause():void{
removeEventListener("enterFrame", animate);
}
}
}//package
Section 55
//scoreSound (scoreSound)
package {
import flash.media.*;
public dynamic class scoreSound extends Sound {
}
}//package
Section 56
//shield1Sound (shield1Sound)
package {
import flash.media.*;
public dynamic class shield1Sound extends Sound {
}
}//package
Section 57
//shield2Sound (shield2Sound)
package {
import flash.media.*;
public dynamic class shield2Sound extends Sound {
}
}//package
Section 58
//shield3Sound (shield3Sound)
package {
import flash.media.*;
public dynamic class shield3Sound extends Sound {
}
}//package
Section 59
//SpaceMusic (SpaceMusic)
package {
import flash.media.*;
public dynamic class SpaceMusic extends Sound {
}
}//package
Section 60
//SpecialExplosion (SpecialExplosion)
package {
import flash.display.*;
public dynamic class SpecialExplosion extends MovieClip {
public var explosionHolder:MovieClip;
}
}//package