Frame 1
function clickThrough(urlStr, linkName) {
logMileStone("Clicked_" + linkName, urlStr);
}
function logMileStone(mileStoneString, urlStr) {
postLogURL = urlStr;
var _local2 = new LoadVars();
var _local1 = new LoadVars();
_local1.mileStone = (sponsoredGameTitle + "_") + mileStoneString;
_local1.embedURL = _url;
_local1.sendAndLoad("http://70.86.68.18/tracker.php", _local2, "POST");
trace("Submitting milestone data:" + _local1.mileStone);
pingTimeoutIntervalID = setInterval(executePostLogGetURL, 2000);
_local2.onLoad = function (success) {
trace("Successfully submitted milestone data!");
executePostLogGetURL();
};
}
function executePostLogGetURL() {
if (postLogURL != null) {
getURL (postLogURL, "_new");
postLogURL = null;
gotoFrame = "deadEnd";
msgText = "\r\r\rYou are being directed to www.StickArena.com - A new window will open with the full, still free, version of Stick Arena shortly.\r\r\r\r\r(Click HERE if you are not redirected within a few seconds...)";
}
}
function frameFunction() {
blurAmount = blurAmount + blurVel;
if (blurAmount <= blurReverse) {
blurVel = blurVel2;
}
if ((blurAmount > 0) && (blurVel > 0)) {
blurVel = blurVel * 1.8;
XGSIntroMC._xscale = (XGSIntroMC._yscale = Math.max(1, XGSIntroMC._yscale - (blurVel * 1.3)));
XGSIntroMC.XGenStudiosComMC._alpha = XGSIntroMC.XGenStudiosComMC._alpha - 25;
} else {
XGSIntroMC._xscale = (XGSIntroMC._yscale = Math.min(100, XGSIntroMC._yscale * 1.7));
}
bl.blurX = blurAmount;
bl.blurY = blurAmount;
this.filters = [bl];
}
var sponsoredGameTitle = "Fluxion";
logMileStone("startedLoadingSWF");
var postLogURL = null;
var destinationURL = "http://www.XGenStudios.com/";
XGSIntroMC.cacheAsBitmap = true;
XGSIntroMC._xscale = (XGSIntroMC._yscale = 0.01);
var bl = (new flash.filters.BlurFilter());
bl.quality = 1;
var blurAmount = 180;
var blurVel = -10;
var blurVel2 = 1;
var blurReverse = -171;
XGSIntroMC.onEnterFrame = frameFunction;
percentageDone = 0;
_quality = "high";
audioState = 1;
Frame 2
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
load_info = percentDone + "%";
if (_root._framesloaded >= _root._totalframes) {
logMileStone("completedLoadingSWF");
gotoAndPlay ("started");
}
Frame 4
gotoAndPlay ("preloader");
Frame 5
function xgenIntroComplete() {
gotoAndPlay ("started");
}
function frameFunction() {
blurAmount = blurAmount + blurVel;
if (blurAmount <= blurReverse) {
blurVel = blurVel2;
}
if ((blurAmount > 0) && (blurVel > 0)) {
blurVel = blurVel * 1.8;
XGSIntroMC._xscale = (XGSIntroMC._yscale = Math.max(1, XGSIntroMC._yscale - (blurVel * 1.3)));
XGSIntroMC.XGenStudiosComMC._alpha = XGSIntroMC.XGenStudiosComMC._alpha - 25;
} else {
XGSIntroMC._xscale = (XGSIntroMC._yscale = Math.min(100, XGSIntroMC._yscale * 1.7));
}
bl.blurX = blurAmount;
bl.blurY = blurAmount;
this.filters = [bl];
}
fader_done = false;
XGSIntroMC.cacheAsBitmap = true;
XGSIntroMC._xscale = (XGSIntroMC._yscale = 0.01);
var bl = (new flash.filters.BlurFilter());
bl.quality = 1;
var blurAmount = 180;
var blurVel = -10;
var blurVel2 = 1;
var blurReverse = -171;
XGSIntroMC.onEnterFrame = frameFunction;
stop();
Instance of Symbol 70 MovieClip in Frame 6
onClipEvent (load) {
if (_root.fader_done == false) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
onClipEvent (enterFrame) {
_root.fader_done = true;
if (this._alpha > 0) {
this._alpha = this._alpha - 2;
}
}
Frame 7
_quality = "high";
totalObjects = 2000;
energy_reduction = 1;
energy_restore = 0.5;
enemyBulletVal = 0;
energyVal = 100;
player_lives = 3;
game_level = 1;
levelNum = "Level " + game_level;
score = 0;
swapped = 0;
smokeVal = 0;
missileVal = 0;
particleVal = 300;
minParticles = 30;
extraParticles = 20;
gameMusic = new Sound();
gameMusic.attachSound("Demonloop");
gun = new Sound();
gun.attachSound("gun");
photon = new Sound();
photon.attachSound("photon");
laser = new Sound();
laser.attachSound("laser");
appear = new Sound();
appear.attachSound("appear");
appear2 = new Sound();
appear2.attachSound("appear2");
appear3 = new Sound();
appear3.attachSound("appear3");
boom1 = new Sound();
boom1.attachSound("boom1");
boom2 = new Sound();
boom2.attachSound("boom2");
boom3 = new Sound();
boom3.attachSound("boom3");
boom4 = new Sound();
boom4.attachSound("boom4");
blip1 = new Sound();
blip1.attachSound("blip1");
missilefire = new Sound();
missilefire.attachSound("missilefire");
energy3 = new Sound();
energy3.attachSound("energy2");
energy2 = new Sound();
energy2.attachSound("energy3");
error1 = new Sound();
error1.attachSound("error1");
score_mc.swapDepths(1048502);
removeMovieClip(_root.play_again_mc);
ship1_purchased = false;
ship2_purchased = false;
ship3_purchased = false;
proj1_purchased = false;
proj2_purchased = false;
proj3_purchased = false;
photon1_purchased = false;
photon2_purchased = false;
photon3_purchased = false;
laser1_purchased = false;
laser2_purchased = false;
laser3_purchased = false;
thruster1_purchased = false;
thruster2_purchased = false;
thruster3_purchased = false;
core1_purchased = false;
core2_purchased = false;
core3_purchased = false;
player_win = false;
ship_selected = 0;
main_turrets = 1;
thrusters = 0;
core = 0;
credits = 5000;
shipSpeedVal = 25;
mouseControl = true;
mouseState = "Mouse control on";
shotDelay = 300;
total_reduction = 0;
smokeState = "Smoke trails on";
smokeTrails = true;
bgState = "Scrolling BG on";
bg = true;
rearCannonState = "Rear cannon unmounted";
rearCannon = false;
leftCannonState = "Left side cannon unmounted";
leftCannon = false;
rightCannonState = "Right side cannon unmounted";
rightCannon = false;
optimizeState = "Optimization off";
optimizeOn = true;
MovieClip.prototype.placeInSpace = function (id) {
var _local3 = this.focaldistance / Math.sqrt(this[id].z * this[id].z);
this[id]._x = this[id].x * _local3;
this[id]._y = this[id].y * _local3;
this[id]._xscale = (this[id]._yscale = 1000 / this[id].z);
};
MovieClip.prototype.randomPlace = function (id) {
var _local3 = this.rmin + ((this.rmax - this.rmin) * Math.random());
var _local2 = (Math.PI*2) * Math.random();
this[id].x = _local3 * Math.cos(_local2);
this[id].y = _local3 * Math.sin(_local2);
this[id].z = this.zmin + ((this.zmax - this.zmin) * Math.random());
};
stop();
Instance of Symbol 72 MovieClip "field" in Frame 7
onClipEvent (load) {
this.count = 200;
this.speed = 5;
this.focaldistance = 25;
this.rmin = 50;
this.rmax = 1000;
this.zmin = 10;
this.zmax = 300;
var i = 0;
while (i < this.count) {
this.attachMovie("dot", i, i);
i++;
}
}
onClipEvent (enterFrame) {
var i = 0;
while (i < this.count) {
if (((this[i].z = this[i].z - this.speed)) <= 0) {
this.randomPlace(i);
}
this.placeInSpace(i);
i++;
}
}
Instance of Symbol 85 MovieClip "planets" in Frame 7
onClipEvent (load) {
planetTimer = getTimer();
makePlanet = 1000;
planetSpawn = random(makePlanet);
animatePlanet = 0;
initialY = this._y;
planetSize = random(2) + 1;
planetScale = random(3);
if (planetScale == 0) {
planetSize = 1;
this._width = this._width * planetSize;
this._height = this._height * planetSize;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
onClipEvent (enterFrame) {
if (_root.bg == true) {
if (((getTimer() - planetTimer) > planetSpawn) && (this._x > 0)) {
animatePlanet = 1;
}
if (animatePlanet == 1) {
this._y = this._y + 0.5;
}
if ((animatePlanet == 1) && (this._y > 2000)) {
planetTimer = getTimer();
animatePlanet = 0;
planetSpawn = random(makePlanet);
this._y = initialY;
this._x = random(Stage.width);
planetScale = random(3);
if (planetScale == 0) {
planetSize = random(2) + 1;
this._width = this._width * planetSize;
this._height = this._height * planetSize;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
}
}
Instance of Symbol 88 MovieClip "enemy_bullets" in Frame 7
onClipEvent (load) {
slowDown = 3;
ship_x = _root.player._x;
ship_y = _root.player._y;
myRadians = Math.atan2(ship_y - this._y, ship_x - this._x);
myDegrees = Math.round((myRadians * 180) / Math.PI);
yChange = Math.round(ship_y - this._y);
xChange = Math.round(ship_x - this._x);
yMove = Math.round(yChange / 10);
xMove = Math.round(xChange / 10);
yMove = yMove / this.slowDown;
xMove = xMove / this.slowDown;
visibleTimer = getTimer();
this._visible = false;
}
onClipEvent (enterFrame) {
if ((getTimer() - visibleTimer) > 100) {
this._visible = true;
}
if (this._name != "enemy_bullets") {
this._y = this._y + yMove;
this._x = this._x + xMove;
}
if (this.hitTest(_root.player)) {
_root.player.dead = 1;
}
if ((_root.player.dead == 1) || ((this._name != "enemy_bullets") && ((((this._x < 0) || (this._x > Stage.width)) || (this._y < 0)) || (this._y > Stage.height)))) {
removeMovieClip(this);
}
}
Instance of Symbol 91 MovieClip "star" in Frame 7
onClipEvent (load) {
speed = (random(5) + 1) * 2.5;
}
onClipEvent (enterFrame) {
if (_root.bg == true) {
if (this._x >= 0) {
this._y = this._y + speed;
}
if (this._y > (Stage.height + 50)) {
this._x = random(Stage.width);
this._y = random(200) * -1;
}
}
}
Frame 10
totalObjects = 2000;
score = 0;
swapped = 0;
smokeVal = 0;
missileVal = 0;
photon = new Sound();
photon.attachSound("photon");
photon.setVolume(50);
boom = new Sound();
boom.attachSound("boom");
score_mc.swapDepths(1048502);
removeMovieClip(_root.play_again_mc);
if (bg == true) {
t = 0;
while (t < 25) {
_root.star.duplicateMovieClip("star" + t, t);
_root["star" + t]._x = random(Stage.width);
_root["star" + t]._y = random(Stage.height);
t++;
}
t = 26;
_root.planets.duplicateMovieClip("planet" + t, t);
_root["planet" + t]._x = random(Stage.width);
}
gotoAndStop ("game");
Instance of Symbol 91 MovieClip "star" in Frame 10
onClipEvent (load) {
speed = (random(2) + 1) * 2.5;
}
onClipEvent (enterFrame) {
if (_root.bg == true) {
if (this._x >= 0) {
this._y = this._y + speed;
}
if (this._y > (Stage.height + 50)) {
this._x = random(Stage.width);
this._y = random(200) * -1;
}
}
}
Instance of Symbol 145 MovieClip "fader" in Frame 10
onClipEvent (load) {
_alpha = 0;
startFade = false;
swapped = false;
volumeDown = 100;
}
onClipEvent (enterFrame) {
if ((startFade == true) && (swapped == false)) {
swapped = true;
this.swapDepths(_root.energy_container);
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
delete _root.energy_container;
delete _root.energy_bar;
}
if ((startFade == true) && (_alpha < 100)) {
_alpha = (_alpha + 2);
if (_root.audioState == 1) {
volumeDown = volumeDown - 2;
if (volumeDown > 2) {
_root.gameMusic.setVolume(volumeDown);
}
}
}
if (_alpha >= 100) {
_alpha = 0;
startFade = false;
swapped = false;
_root.gotoAndStop("level_complete");
}
}
Frame 11
credits_earned = 0;
playerTemp.duplicateMovieClip("player", 1048501);
crossHair.duplicateMovieClip("aimer", planet26);
player._x = playerTemp._x;
player._y = playerTemp._y;
if (bg == true) {
playerTemp.swapDepths(star1);
} else {
playerTemp.swapDepths(0);
}
removeMovieClip("playerTemp");
if (((_root.proj1_purchased == true) || (_root.proj2_purchased == true)) || (_root.proj3_purchased == true)) {
gunType = 1;
} else if (((_root.photon1_purchased == true) || (_root.photon2_purchased == true)) || (_root.photon3_purchased == true)) {
gunType = 2;
} else if (((_root.laser1_purchased == true) || (_root.laser2_purchased == true)) || (_root.laser3_purchased == true)) {
gunType = 3;
} else {
gunType = 1;
}
Instance of Symbol 85 MovieClip "planets" in Frame 11
onClipEvent (load) {
planetTimer = getTimer();
makePlanet = 1000;
planetSpawn = random(makePlanet);
animatePlanet = 0;
initialY = this._y;
planetSize = random(2) + 1;
planetScale = random(3);
if (planetScale == 0) {
planetSize = random(2) + 1;
this._width = this._width * 1.5;
this._height = this._height * 1.5;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
onClipEvent (enterFrame) {
if (((getTimer() - planetTimer) > planetSpawn) && (this._x > 0)) {
animatePlanet = 1;
}
if (animatePlanet == 1) {
this._y = this._y + 0.5;
}
if ((animatePlanet == 1) && (this._y > 2000)) {
planetTimer = getTimer();
animatePlanet = 0;
planetSpawn = random(makePlanet);
this._y = initialY;
this._x = random(Stage.width);
planetScale = random(3);
if (planetScale == 0) {
planetSize = random(2) + 1;
this._width = this._width * planetSize;
this._height = this._height * planetSize;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
}
Instance of Symbol 150 MovieClip "bullets" in Frame 11
onClipEvent (load) {
shotDown = false;
thrust = 10;
speedRefStatic = _root.speedRef;
initialAngle = _root.player._rotation * (Math.PI/180);
rotationVal = _root.player._rotation + 90;
bulletTimer = getTimer();
showBullet = getTimer();
xSpeed = 0;
ySpeed = 0;
_visible = false;
myColor = 0;
rename = 0;
enemyWasHit = false;
removeTime = 3000;
enemyThatWasHit = -1;
i = 0;
p = 0;
explosionVal = 0;
this._rotation = _root.player._rotation;
if (((_root.proj1_purchased == true) || (_root.proj2_purchased == true)) || (_root.proj3_purchased == true)) {
this.gotoAndStop(1);
} else if (((_root.photon1_purchased == true) || (_root.photon2_purchased == true)) || (_root.photon3_purchased == true)) {
this.gotoAndStop(2);
} else if (((_root.laser1_purchased == true) || (_root.laser2_purchased == true)) || (_root.laser3_purchased == true)) {
this.gotoAndStop(3);
}
}
onClipEvent (enterFrame) {
i = 0;
while (i < _root.enemyManager.enemyArray.length) {
if ((_root.enemyManager.enemyArray[i].teleport_done == true) && (this.hitTest(_root.enemyManager.enemyArray[i]))) {
shotDown = true;
_root.enemyManager.enemyArray[i].health--;
if (_root.enemyManager.enemyArray[i].health <= 0) {
kill_it = true;
} else {
_root.player.explosionVal++;
_root.totalObjects++;
_root.explosion.duplicateMovieClip("explosion" + _root.player.explosionVal, _root.totalObjects);
_root["explosion" + _root.player.explosionVal]._width = _root["explosion" + _root.player.explosionVal]._width + 5;
_root["explosion" + _root.player.explosionVal]._height = _root["explosion" + _root.player.explosionVal]._height + 5;
_root["explosion" + _root.player.explosionVal]._x = _x;
_root["explosion" + _root.player.explosionVal]._y = _y;
removeMovieClip(this);
}
}
if ((((_root.enemyManager.enemyArray[i]._y > (Stage.height + 50)) || (_root.enemyManager.enemyArray[i]._y < -50)) || (_root.enemyManager.enemyArray[i]._x > (Stage.width + 50))) || (_root.enemyManager.enemyArray[i]._x < -50)) {
kill_it = true;
shotDown = false;
}
if (kill_it == true) {
kill_it = false;
if (shotDown == true) {
_root.credits_earned = _root.credits_earned + _root.enemyManager.enemyArray[i].score;
_root.credits = _root.credits + _root.enemyManager.enemyArray[i].score;
_root.player.explosionVal++;
_root.totalObjects++;
_root.score_scroll.duplicateMovieClip("scoreScroll" + _root.player.explosionVal, _root.totalObjects);
_root["scoreScroll" + _root.player.explosionVal]._x = _x;
_root["scoreScroll" + _root.player.explosionVal]._y = _y - 15;
_root["scoreScroll" + _root.player.explosionVal].theScore = _root.enemyManager.enemyArray[i].score;
}
enemyWasHit = true;
enemyThatWasHit = _root.enemyManager.enemyArray[i];
u = 0;
while (u < _root.enemyManager.enemyArray.length) {
if (_root.enemyManager.enemyArray[u] == enemyThatWasHit) {
_root.enemyManager.enemyArray[u] = "blank";
}
u++;
}
break;
}
i++;
}
if (enemyWasHit == true) {
enemyWasHit = false;
p = 0;
while (p < (_root.enemyManager.enemyArray.length - 1)) {
match = typeof(_root.enemyManager.enemyArray[p]) == typeof(_root.player);
if (!match) {
q = p;
while (q < _root.enemyManager.enemyArray.length) {
_root.enemyManager.enemyArray[q] = _root.enemyManager.enemyArray[q + 1];
q++;
}
tempArray = new Array();
z = 0;
while (z < (_root.enemyManager.enemyArray.length - 1)) {
tempArray[z] = _root.enemyManager.enemyArray[z];
z++;
}
_root.enemyManager.enemyArray = tempArray;
delete tempArray;
}
p++;
}
_root.enemyManager.enemyNum--;
enemyThatWasHit.dead = 1;
if (shotDown == true) {
enemyThatWasHit.gotoAndPlay("explode");
enemyThatWasHit.explodeX = this._x;
enemyThatWasHit.explodeY = this._y;
} else {
enemyThatWasHit.removeMovieClip();
}
enemyThatWasHit = -1;
removeMovieClip(this);
}
if ((getTimer() - showBullet) > 100) {
_visible = true;
}
if ((_root.player.dead == 1) || ((this._name != "bullets") && ((((this._x < 0) || (this._x > Stage.width)) || (this._y < 0)) || (this._y > Stage.height)))) {
removeMovieClip(this);
} else {
if (bulletType == 0) {
fireAngle = 0;
}
if (bulletType == 1) {
fireAngle = 0.07;
}
if (bulletType == 2) {
fireAngle = -0.07;
}
if (bulletType == 3) {
fireAngle = 3.17;
}
if (bulletType == 4) {
fireAngle = 1.5;
_rotation = rotationVal;
}
if (bulletType == 5) {
fireAngle = -1.5;
_rotation = rotationVal;
}
_x = (_x + ((thrust + speedRefStatic) * Math.sin(initialAngle - fireAngle)));
_y = (_y - ((thrust + speedRefStatic) * Math.cos(initialAngle - fireAngle)));
}
}
Instance of Symbol 152 MovieClip "player_center" in Frame 11
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
this._x = _root.player._x;
this._y = _root.player._y;
}
Instance of Symbol 154 MovieClip "enemyManager" in Frame 11
onClipEvent (load) {
enemyNum = 0;
enemyVal = 0;
enemy_refresh = 3000;
end_of_level = false;
starVal = 0;
enemyTimer = getTimer();
enemyArray = new Array();
level_array = new Array();
spawn_counter = 0;
spawnType = 1000;
newSpawn = true;
enemySpawn = 0;
respawnTimer = getTimer();
if (_root.game_level == 1) {
level_array = [0, 0, 0, 0, 1, 1, 0, 1];
maxEnemies = 2;
total_enemies = 8;
enemy_refresh = 3000;
}
if (_root.game_level == 2) {
level_array = [1, 1, 0, 0, 2, 1, 2, 0, 0];
maxEnemies = 3;
total_enemies = 9;
enemy_refresh = 3000;
}
if (_root.game_level == 3) {
level_array = [1, 2, 1, 2, 2, 1, 1, 2, 2, 0, 0, 1];
maxEnemies = 3;
total_enemies = 12;
enemy_refresh = 3000;
}
if (_root.game_level == 4) {
level_array = [0, 0, 1, 0, 0, 2, 1, 1, 1, 2, 2, 2];
maxEnemies = 3;
total_enemies = 12;
enemy_refresh = 3000;
}
if (_root.game_level == 5) {
level_array = [1, 0, 1, 0, 2, 1, 2, 1, 0, 0, 0, 0];
maxEnemies = 4;
total_enemies = 12;
enemy_refresh = 2500;
}
if (_root.game_level == 6) {
level_array = [2, 0, 2, 1, 0, 0, 2, 2, 6, 2, 6, 0];
maxEnemies = 4;
total_enemies = 12;
enemy_refresh = 2500;
}
if (_root.game_level == 7) {
level_array = [1, 0, 1, 3, 6, 1, 3, 6, 0, 1, 2, 2];
maxEnemies = 4;
total_enemies = 12;
enemy_refresh = 2500;
}
if (_root.game_level == 8) {
level_array = [0, 6, 1, 1, 2, 2, 3, 0, 3, 2, 3, 2, 6, 6, 6, 6];
maxEnemies = 4;
total_enemies = 16;
enemy_refresh = 2250;
}
if (_root.game_level == 9) {
level_array = [0, 1, 0, 2, 6, 6, 6, 6, 6, 3, 3, 2, 3, 3, 1, 3, 4, 0, 2, 2];
maxEnemies = 5;
total_enemies = 20;
enemy_refresh = 2000;
}
if (_root.game_level == 10) {
level_array = [4, 0, 0, 6, 6, 1, 1, 1, 1, 2, 2, 3, 4, 2, 0, 6, 6, 2, 1, 6, 0, 1, 2, 3, 4, 0, 6, 6, 4, 4];
maxEnemies = 5;
total_enemies = 30;
enemy_refresh = 1500;
}
if (_root.game_level == 11) {
level_array = [3, 3, 3, 1, 1, 6, 6, 4, 2, 2, 0, 0, 2, 4, 6, 4, 4, 4, 6, 6, 2, 2, 2, 4, 6, 2, 2, 4, 4, 0];
maxEnemies = 5;
total_enemies = 30;
enemy_refresh = 1000;
}
if (_root.game_level == 12) {
level_array = [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 4, 4, 0, 1, 4, 4, 4, 4, 1, 1, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 0, 1, 2, 3, 4, 4];
maxEnemies = 6;
total_enemies = 42;
enemy_refresh = 1000;
}
if (_root.game_level == 13) {
level_array = [4, 2, 4, 2, 0, 0, 3, 3, 6, 6, 2, 2, 1, 1, 1, 4, 4, 6, 2, 2, 2, 3, 3, 3, 4, 4, 0, 0, 1, 3, 6, 6, 6, 2, 2, 2, 0, 0, 0, 0, 6, 6, 3, 3, 2, 4, 6, 1];
maxEnemies = 6;
total_enemies = 48;
enemy_refresh = 500;
}
if (_root.game_level == 14) {
level_array = [0, 4, 3, 3, 1, 1, 6, 2, 2, 2, 4, 4, 3, 3, 3, 1, 0, 0, 2, 3, 2, 4, 1, 6, 6, 6, 6, 6, 3, 4, 4, 4, 3, 2, 0, 1, 0, 2, 3, 6, 2, 1, 0, 4, 3, 4, 4, 4];
maxEnemies = 6;
total_enemies = 48;
enemy_refresh = 200;
}
if (_root.game_level == 15) {
level_array = [0, 0, 1, 1, 2, 2, 4, 4, 4, 0, 0, 0, 3, 3, 3, 1, 1, 1, 6, 6, 6, 3, 2, 1, 6, 2, 2, 1, 4, 3, 4, 4, 4, 6, 6, 0, 1, 1, 1, 1, 1, 1, 4, 1, 0, 4, 6, 6];
maxEnemies = 6;
total_enemies = 48;
enemy_refresh = 200;
}
if (_root.game_level == 16) {
level_array = [6, 6, 6, 6, 3, 4, 1, 2, 3, 4, 6, 0, 3, 3, 3, 0, 1, 1, 4, 4, 2, 2, 6, 2, 2, 2, 2, 4, 4, 6, 6, 6, 6, 6, 6, 0, 2, 0, 2, 0, 2, 1, 2, 6, 4, 3, 2, 2];
maxEnemies = 6;
total_enemies = 48;
enemy_refresh = 200;
}
if (_root.game_level == 17) {
level_array = [1, 2, 3, 4, 0, 2, 4, 6, 4, 4, 6, 3, 2, 3, 2, 2, 2, 3, 3, 3, 6, 1, 1, 1, 0, 0, 0, 6, 4, 4, 4, 4, 0, 1, 2, 3, 3, 3, 2, 2, 1, 2, 4, 4, 6, 6, 4, 1, 3];
maxEnemies = 7;
total_enemies = 49;
enemy_refresh = 0;
}
if (_root.game_level == 18) {
level_array = [0, 0, 0, 1, 1, 1, 2, 3, 3, 4, 4, 4, 6, 6, 2, 3, 1, 6, 4, 3, 4, 3, 4, 6, 6, 2, 2, 1, 0, 0, 0, 0, 1, 1, 4, 3, 2, 3, 4, 3, 4, 2, 6, 6, 6, 6, 6, 6, 6];
maxEnemies = 7;
total_enemies = 49;
enemy_refresh = 0;
}
if (_root.game_level == 19) {
level_array = [4, 4, 4, 2, 3, 3, 3, 1, 1, 1, 1, 1, 4, 3, 6, 3, 2, 2, 3, 0, 0, 3, 4, 2, 0, 6, 6, 1, 4, 2, 2, 2, 4, 1, 4, 6, 6, 6, 3, 2, 0, 0, 0, 0, 0, 4, 2, 2, 1];
maxEnemies = 7;
total_enemies = 49;
enemy_refresh = 0;
}
if (_root.game_level == 20) {
level_array = [4, 4, 4, 2, 2, 2, 2, 0, 0, 0, 1, 1, 2, 2, 3, 3, 3, 4, 2, 1, 0, 6, 6, 2, 2, 3, 3, 4, 0, 0, 6, 6, 6, 4, 4, 2, 2, 2, 2, 4, 3, 3, 1, 4, 0, 2, 3, 3, 4];
maxEnemies = 7;
total_enemies = 49;
enemy_refresh = 0;
}
}
onClipEvent (enterFrame) {
if (_root.totalObjects > 1048500) {
_root.totalObjects = 2000;
}
if ((newSpawn == false) && (enemyNum == 0)) {
newSpawn = true;
respawnTimer = getTimer();
}
if (_root.smokeState == "Smoke trails on") {
if ((enemyNum >= 10) && (_root.optimizeOn == true)) {
_root.smokeTrails = false;
}
if ((enemyNum < 10) && (_root.optimizeOn == true)) {
_root.smokeTrails = true;
}
}
if ((newSpawn == true) && ((getTimer() - respawnTimer) > enemy_refresh)) {
if (enemyNum >= (maxEnemies - 1)) {
newSpawn = false;
}
if ((getTimer() - enemyTimer) > 0) {
addedInArray = false;
enemyTimer = getTimer();
if (spawn_counter >= total_enemies) {
enemyChoice = -1;
end_of_level = true;
} else {
enemyChoice = level_array[spawn_counter];
}
if (end_of_level == true) {
_root.fader.startFade = true;
}
if ((enemyChoice == 0) && (end_of_level == false)) {
_root.enemy_01.duplicateMovieClip("enemy" + enemyVal, _root.totalObjects);
_root["enemy" + enemyVal].slowDown = (random(400) + 100) / 100;
_root["enemy" + enemyVal]._x = random(Stage.width);
_root["enemy" + enemyVal]._y = random(Stage.height);
} else if ((enemyChoice == 1) && (end_of_level == false)) {
_root.enemy_02.duplicateMovieClip("enemy" + enemyVal, _root.totalObjects);
_root["enemy" + enemyVal].slowDown = (random(200) + 200) / 100;
_root["enemy" + enemyVal]._x = random(Stage.width);
_root["enemy" + enemyVal]._y = random(Stage.height);
_root["enemy" + enemyVal].pathing_ID = enemyVal;
_root.totalObjects++;
_root.random_path.duplicateMovieClip("random_path" + enemyVal, 20000 + _root.totalObjects);
_root["random_path" + enemyVal]._x = random(Stage.width);
_root["random_path" + enemyVal]._y = random(Stage.height);
} else if ((enemyChoice == 2) && (end_of_level == false)) {
_root.enemy_03.duplicateMovieClip("enemy" + enemyVal, _root.totalObjects);
_root["enemy" + enemyVal].slowDown = (random(300) + 100) / 100;
_root["enemy" + enemyVal]._x = -40;
_root["enemy" + enemyVal]._y = random(Stage.height);
} else if ((enemyChoice == 3) && (end_of_level == false)) {
_root.enemy_04.duplicateMovieClip("enemy" + enemyVal, _root.totalObjects);
_root["enemy" + enemyVal].slowDown = (random(300) + 200) / 100;
_root["enemy" + enemyVal]._x = random(Stage.width);
_root["enemy" + enemyVal]._y = random(Stage.height);
} else if ((enemyChoice == 4) && (end_of_level == false)) {
_root.enemy_05.duplicateMovieClip("enemy" + enemyVal, _root.totalObjects);
_root["enemy" + enemyVal].slowDown = (random(400) + 100) / 100;
_root["enemy" + enemyVal]._x = 845;
_root["enemy" + enemyVal]._y = random(Stage.height);
} else if ((enemyChoice == 6) && (end_of_level == false)) {
_root.big_rock.duplicateMovieClip("enemy" + enemyVal, _root.totalObjects);
rock_dir = random(4);
_root["enemy" + enemyVal].dest = rock_dir;
if (rock_dir == 0) {
_root["enemy" + enemyVal]._x = -25;
_root["enemy" + enemyVal]._y = random(Stage.height);
} else if (rock_dir == 1) {
_root["enemy" + enemyVal]._x = Stage.width + 25;
_root["enemy" + enemyVal]._y = random(Stage.height);
} else if (rock_dir == 2) {
_root["enemy" + enemyVal]._x = random(Stage.width);
_root["enemy" + enemyVal]._y = -25;
} else if (rock_dir == 3) {
_root["enemy" + enemyVal]._x = random(Stage.width);
_root["enemy" + enemyVal]._y = Stage.height + 25;
}
}
if ((enemyChoice != -1) && (end_of_level == false)) {
enemyArray.push(_root["enemy" + enemyVal]);
enemyVal++;
enemyNum++;
_root.totalObjects++;
spawn_counter++;
}
}
}
}
Instance of Symbol 167 MovieClip "smoke" in Frame 11
onClipEvent (load) {
_visible = false;
_alpha = 100;
showSmoke = getTimer();
}
onClipEvent (enterFrame) {
if ((getTimer() - showSmoke) > 200) {
_visible = true;
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
}
this._x = initialX;
this._y = initialY;
if ((getTimer() - showSmoke) > 1000) {
removeMovieClip(this);
}
}
Instance of Symbol 91 MovieClip "star" in Frame 11
onClipEvent (load) {
speed = (random(2) + 1) * 2.5;
}
onClipEvent (enterFrame) {
if (_root.bg == true) {
if (this._x >= 0) {
this._y = this._y + speed;
}
if (this._y > (Stage.height + 50)) {
this._x = random(Stage.width);
this._y = random(200) * -1;
}
}
}
Instance of Symbol 169 MovieClip "crosshair" in Frame 11
onClipEvent (load) {
Mouse.hide();
this.swapDepths(1048502);
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
if (((this._alpha > 20) && (this.hitTest(_root.player))) && (_root.optimizeOn == false)) {
this._alpha = this._alpha - 2;
} else if ((this._alpha < 100) && (_root.optimizeOn == false)) {
this._alpha = this._alpha + 2;
}
}
Instance of Symbol 174 MovieClip "enemy_03" in Frame 11
onClipEvent (load) {
score = 150;
ship_x = random(400) + Stage.width;
topOrBottom = random(2);
if (topOrBottom == 0) {
ship_y = -500;
} else {
ship_y = Stage.height + 500;
}
health = 3;
smokeTimer = getTimer();
_alpha = 20;
teleport_done = false;
dead = 0;
fire_missiles = Math.random(Stage.width / 2) + 150;
missiles_fired = false;
isAsteroid = false;
this.gotoAndStop("missiles");
}
onClipEvent (enterFrame) {
if (_root.enemyManager.end_of_level == true) {
removeMovieClip(this);
}
if ((this._y > -50) && (this._y < -40)) {
health = 0;
}
if ((this._x < (Stage.height + 50)) && (this._x > (Stage.height + 40))) {
health = 0;
}
if (((this._x >= fire_missiles) && (missiles_fired == false)) && (dead == 0)) {
score = 25;
this.gotoAndStop("no_missiles");
missiles_fired = true;
missile_fire = 0;
while (missile_fire < 2) {
_root.missilefire.start(0.5);
_root.missiles.duplicateMovieClip("enemy" + _root.enemyManager.enemyVal, 20000 + _root.totalObjects);
_root["enemy" + _root.enemyManager.enemyVal]._x = this._x + 5;
if (missile_fire == 0) {
_root["enemy" + _root.enemyManager.enemyVal]._y = this._y + 10;
}
if (missile_fire == 1) {
_root["enemy" + _root.enemyManager.enemyVal]._y = this._y - 10;
}
_root.enemyManager.enemyArray.push(_root["enemy" + _root.enemyManager.enemyVal]);
_root.enemyManager.enemyVal++;
_root.enemyManager.enemyNum++;
_root.totalObjects++;
missile_fire++;
}
}
if (_alpha >= 100) {
if (missiles_fired == false) {
if (this._x > -150) {
teleport_done = true;
this._x = this._x + this.slowDown;
}
} else if (missiles_fired == true) {
angle = Math.atan2(ship_y - this._y, ship_x - this._x);
myDegrees = Math.round((angle * 180) / Math.PI);
this._x = this._x + (Math.cos(angle) * slowDown);
this._y = this._y + (Math.sin(angle) * slowDown);
if (this._rotation != myDegrees) {
if (topOrBottom == 0) {
if (this._rotation > myDegrees) {
this._rotation--;
}
}
if (topOrBottom == 1) {
if (this._rotation < myDegrees) {
this._rotation++;
}
}
}
}
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
if ((((getTimer() - smokeTimer) > 150) && (this._x > 0)) && (dead == 0)) {
if (_root.smokeTrails == true) {
smokeTimer = getTimer();
_root.totalObjects++;
_root.smokeVal++;
_root.smoke.duplicateMovieClip("smoke" + _root.smokeVal, 20000 + _root.totalObjects);
_root["smoke" + _root.smokeVal].initialX = this._x;
_root["smoke" + _root.smokeVal].initialY = this._y;
}
}
} else {
_alpha = (_alpha + 2);
}
}
Instance of Symbol 187 MovieClip "playerTemp" in Frame 11
onClipEvent (load) {
thrust = 0.5;
warning_on = false;
decay = 0.98;
level_done = false;
explosionVal = 0;
maxSpeed = 6;
rotVal = 7;
xSpeed = 0;
ySpeed = 0;
slowDown = 1;
fireOn = false;
bulletVal = 0;
shotTimer = getTimer();
dead = 0;
if (_root.ship_selected == 0) {
this.gotoAndStop("default_ship");
}
if (_root.ship_selected == 1) {
this.gotoAndStop("ship1");
}
if (_root.ship_selected == 3) {
this.gotoAndStop("ship3");
}
if (_root.thrusters == 0) {
_root.shipSpeedVal = 30;
}
if (_root.thrusters == 1) {
_root.shipSpeedVal = 26;
}
if (_root.thrusters == 2) {
_root.shipSpeedVal = 22;
}
if (_root.thrusters == 3) {
_root.shipSpeedVal = 18;
}
if (_root.core == 0) {
_root.energy_reduction = 1 - _root.total_reduction;
_root.energy_restore = 1;
}
if (_root.core == 1) {
_root.energy_reduction = 0.7 - _root.total_reduction;
_root.energy_restore = 1;
}
if (_root.core == 2) {
_root.energy_reduction = 0.5 - _root.total_reduction;
_root.energy_restore = 1;
}
if (_root.core == 3) {
_root.energy_reduction = 0.3 - _root.total_reduction;
_root.energy_restore = 1;
}
}
onClipEvent (mouseDown) {
fireOn = true;
}
onClipEvent (mouseUp) {
fireOn = false;
}
onClipEvent (enterFrame) {
if ((_root.energyVal <= 10) && (warning_on == false)) {
warning_on = true;
_root.energy3.start();
_root.energy_container.gotoAndPlay(2);
} else if (_root.energyVal > 10) {
_root.energy_container.gotoAndStop(1);
warning_on = false;
}
if (this._name == "player") {
if (dead == 1) {
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
arrayLength = _root.enemyManager.enemyArray.length;
u = 0;
while (u < arrayLength) {
removeMovieClip(_root.enemyManager.enemyArray[u]);
u++;
}
explosionVal++;
_root.totalObjects++;
_root.explosion.duplicateMovieClip("explosion" + explosionVal, _root.totalObjects);
_root["explosion" + explosionVal]._width = _root["explosion" + explosionVal]._width + 25;
_root["explosion" + explosionVal]._height = _root["explosion" + explosionVal]._height + 25;
_root["explosion" + explosionVal]._x = _x;
_root["explosion" + explosionVal]._y = _y;
dead = 2;
}
if (dead == 2) {
_root.boom1.start();
_root.player_lives--;
if (_root.player_lives == 0) {
_root.gotoAndStop("dead");
} else {
_root.gotoAndStop("pregame");
}
}
if (fireOn == false) {
if (_root.energyVal < 100) {
_root.energyVal = _root.energyVal + (_root.energy_restore / 2);
_root.energy_bar._width = _root.energy_bar._width + (_root.energy_restore / 2);
_root.energy_bar._x = _root.energy_bar._x + ((_root.energy_restore / 2) / 2);
}
}
if ((fireOn == true) && (_root.enemyManager.end_of_level == false)) {
if (_root.energyVal > 0) {
_root.energyVal = _root.energyVal - _root.energy_reduction;
_root.energy_bar._width = _root.energy_bar._width - _root.energy_reduction;
_root.energy_bar._x = _root.energy_bar._x - (_root.energy_reduction / 2);
}
if (((getTimer() - shotTimer) > _root.shotDelay) && (_root.energyVal > 0)) {
shotTimer = getTimer();
if (_root.gunType == 1) {
_root.gun.start();
} else if (_root.gunType == 2) {
_root.photon.start();
} else if (_root.gunType == 3) {
_root.laser.start();
} else {
_root.gun.start();
}
if (_root.main_turrets == 1) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 0;
if (_root.rearCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 3;
}
if (_root.leftCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 4;
}
if (_root.rightCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 5;
}
} else if (_root.main_turrets == 3) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 1;
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 2;
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 0;
if (_root.rearCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 3;
}
if (_root.leftCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 4;
}
if (_root.rightCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 5;
}
} else if (_root.main_turrets == 2) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 1;
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 0;
if (_root.rearCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 3;
}
if (_root.leftCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 4;
}
if (_root.rightCannon == true) {
bulletVal++;
_root.totalObjects++;
_root.bullets.duplicateMovieClip("bullets" + bulletVal, 5000 + _root.totalObjects);
_root["bullets" + bulletVal]._x = _x;
_root["bullets" + bulletVal]._y = _y;
_root["bullets" + bulletVal].bulletType = 5;
}
}
}
}
myRadians = Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x);
myDegrees = Math.round((myRadians * 180) / Math.PI);
yChange = Math.round(_root._ymouse - this._y);
xChange = Math.round(_root._xmouse - this._x);
yMove = Math.round(yChange / _root.shipSpeedVal);
xMove = Math.round(xChange / _root.shipSpeedVal);
this._y = this._y + (yMove / this.slowDown);
this._x = this._x + (xMove / this.slowDown);
this._rotation = myDegrees + 90;
speed = Math.sqrt((xMove * xMove) + (yMove * yMove));
_root.speedRef = speed;
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_y < 0) {
_y = 0;
xSpeed = 0;
ySpeed = 0;
}
if (_y > Stage.height) {
_y = Stage.height;
xSpeed = 0;
ySpeed = 0;
}
if (_x < 0) {
_x = 0;
xSpeed = 0;
ySpeed = 0;
}
if (_x > Stage.width) {
_x = Stage.width;
xSpeed = 0;
ySpeed = 0;
}
}
}
Instance of Symbol 193 MovieClip "enemy_01" in Frame 11
onClipEvent (load) {
score = 50;
enemyID = 1;
health = 2;
smokeTimer = getTimer();
_alpha = 0;
dead = 0;
slowRot = 50;
teleport_done = false;
started_teleport = false;
isAsteroid = false;
}
onClipEvent (enterFrame) {
if (_root.enemyManager.end_of_level == true) {
removeMovieClip(this);
}
if (((teleport_done == false) && (started_teleport == false)) && (this._name != "enemy_01")) {
started_teleport = true;
this.gotoAndPlay("teleport");
}
if ((teleport_done == false) && (this._name != "enemy_01")) {
this._rotation = this._rotation + 25;
} else if (teleport_done == true) {
if (((getTimer() - smokeTimer) > 150) && (dead == 0)) {
if ((_root.smokeTrails == true) && ((Math.abs(xChange) > 10) && (Math.abs(yChange) > 10))) {
smokeTimer = getTimer();
_root.totalObjects++;
_root.smokeVal++;
_root.smoke.duplicateMovieClip("smoke" + _root.smokeVal, 20000 + _root.totalObjects);
_root["smoke" + _root.smokeVal].initialX = this._x;
_root["smoke" + _root.smokeVal].initialY = this._y;
}
}
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
if (((this._x > -50) && (this._y > -50)) && (dead == 0)) {
angle = Math.atan2(_root.player._y - this._y, _root.player._x - this._x);
myDegrees = Math.round((angle * 180) / Math.PI);
this._x = this._x + (Math.cos(angle) * slowDown);
this._y = this._y + (Math.sin(angle) * slowDown);
this._rotation = myDegrees + 90;
} else {
this._rotation = 0;
}
}
}
Instance of Symbol 199 MovieClip "enemy_02" in Frame 11
onClipEvent (load) {
score = 50;
deltaX = 0;
deltaY = 0;
hyp = 0;
angle = 0;
health = 1;
posTimer = getTimer();
enemyID = 2;
_alpha = 0;
dead = 0;
slowRot = 50;
teleport_done = false;
started_teleport = false;
isAsteroid = false;
}
onClipEvent (enterFrame) {
if (_root.enemyManager.end_of_level == true) {
removeMovieClip(this);
}
if (((teleport_done == false) && (started_teleport == false)) && (this._name != "enemy_02")) {
started_teleport = true;
this.gotoAndPlay("teleport");
}
if (teleport_done == false) {
this._rotation = this._rotation + 25;
} else if (teleport_done == true) {
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
if ((this._x > -50) && (this._y > -50)) {
ship_x = _root["random_path" + pathing_ID]._x;
ship_y = _root["random_path" + pathing_ID]._y;
angle = Math.atan2(ship_y - this._y, ship_x - this._x);
myDegrees = Math.round((angle * 180) / Math.PI);
this._x = this._x + (Math.cos(angle) * slowDown);
this._y = this._y + (Math.sin(angle) * slowDown);
this._rotation = myDegrees + 90;
}
} else {
_alpha = (_alpha + 2);
_rotation = (_rotation + slowRot);
slowRot = slowRot - 1;
if (slowRot <= 0) {
slowRot = 0;
}
}
}
Instance of Symbol 201 MovieClip "particle" in Frame 11
onClipEvent (load) {
thrust = random(5) + 10;
decay_timer = getTimer();
selectedAngle = false;
}
onClipEvent (enterFrame) {
if (this._name != "particle") {
if (selectedAngle == false) {
randomAngle = random(360);
selectedAngle = true;
}
if ((getTimer() - decay_timer) < 1000) {
_x = (_x + (thrust * Math.sin(randomAngle)));
_y = (_y - (thrust * Math.cos(randomAngle)));
if (thrust > 0) {
thrust = thrust - 0.25;
}
if (this._width > 0.5) {
this._width = this._width - 0.25;
this._height = this._height - 0.25;
}
} else {
removeMovieClip(this);
}
}
}
Instance of Symbol 203 MovieClip "missiles" in Frame 11
onClipEvent (load) {
score = 25;
slowDown = (random(400) + 100) / 100;
teleport_done = true;
dead = 0;
seekTime = getTimer();
offSetValX = 0;
offSetValY = 0;
health = 1;
_alpha = 100;
isAsteroid = false;
}
onClipEvent (enterFrame) {
if (_root.enemyManager.end_of_level == true) {
removeMovieClip(this);
}
if (this._alpha != 100) {
trace("missile " + this._name);
}
if ((this._x > -50) && (this._y > -50)) {
angle = Math.atan2(_root.player._y - this._y, _root.player._x - this._x);
myDegrees = Math.round((angle * 180) / Math.PI);
this._x = this._x + (Math.cos(angle) * slowDown);
this._y = this._y + (Math.sin(angle) * slowDown);
this._rotation = myDegrees;
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
}
}
Instance of Symbol 218 MovieClip "enemy_04" in Frame 11
onClipEvent (load) {
score = 100;
xPos = random(2);
slowDown = 5;
health = 3;
this.stop();
shotTimer = getTimer();
if (xPos == 0) {
ship_x = -250;
} else if (xPos == 1) {
ship_x = Stage.width + 250;
}
ship_y = random(Stage.height);
smokeTimer = getTimer();
_alpha = 0;
dead = 0;
slowRot = 50;
count = 0;
teleport_done = false;
started_teleport = false;
isAsteroid = false;
}
onClipEvent (enterFrame) {
if (_root.enemyManager.end_of_level == true) {
removeMovieClip(this);
}
if (((teleport_done == false) && (started_teleport == false)) && (this._name != "enemy_04")) {
started_teleport = true;
this.gotoAndPlay("teleport");
}
if (teleport_done == false) {
this._rotation = this._rotation + 25;
} else if (teleport_done == true) {
if (((getTimer() - smokeTimer) > 300) && (dead == 0)) {
if ((_root.smokeTrails == true) && ((Math.abs(xChange) > 40) && (Math.abs(yChange) > 40))) {
smokeTimer = getTimer();
_root.totalObjects++;
_root.smokeVal++;
_root.smoke.duplicateMovieClip("smoke" + _root.smokeVal, 20000 + _root.totalObjects);
_root["smoke" + _root.smokeVal].initialX = this._x;
_root["smoke" + _root.smokeVal].initialY = this._y;
}
}
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
if ((this._x > -50) && (this._y > -50)) {
if (((xPos == 0) && (this._x <= 0)) && (dead == 0)) {
xPos = 1;
okayToFire = true;
ship_x = Stage.width + 250;
ship_y = _root.player._y;
} else if (((xPos == 1) && (this._x >= Stage.width)) && (dead == 0)) {
xPos = 0;
okayToFire = true;
ship_x = -250;
ship_y = _root.player._y;
}
if ((okayToFire == true) && (dead == 0)) {
if ((((getTimer() - shotTimer) > 150) && (count < 5)) && (dead == 0)) {
_root.enemyBulletVal++;
count++;
shotTimer = getTimer();
if (Math.abs(this._x - _root.player._x) > 250) {
this.play();
_root.laser.start();
_root.totalObjects++;
_root.enemy_bullets.duplicateMovieClip("enemyBullets" + _root.enemyBulletVal, 5000 + _root.totalObjects);
_root["enemyBullets" + _root.enemyBulletVal]._x = _x;
_root["enemyBullets" + _root.enemyBulletVal]._y = _y;
} else {
this.stop();
}
}
if (count >= 5) {
count = 0;
okayToFire = false;
this.stop();
}
}
myRadians = Math.atan2(ship_y - this._y, ship_x - this._x);
myDegrees = Math.round((myRadians * 180) / Math.PI);
yChange = Math.round(ship_y - this._y);
xChange = Math.round(ship_x - this._x);
yMove = Math.round(yChange / 30);
xMove = Math.round(xChange / 30);
yMove = yMove / this.slowDown;
xMove = xMove / this.slowDown;
this._y = this._y + yMove;
this._x = this._x + xMove;
this._rotation = myDegrees + 90;
}
}
}
Instance of Symbol 221 MovieClip "enemy_05" in Frame 11
onClipEvent (load) {
score = 250;
smokeTimer = getTimer();
_alpha = 0;
teleport_done = false;
health = 5;
dead = 0;
deployed = false;
deploy_mark = random(300) + 200;
deploy_timer = getTimer();
deployNum = random(3) + 2;
count = 0;
isCarrier = true;
isAsteroid = false;
}
onClipEvent (enterFrame) {
if (_root.enemyManager.end_of_level == true) {
removeMovieClip(this);
}
if (_alpha >= 100) {
if ((this._x > -50) && (this._x < -40)) {
health = 0;
}
if (this._x < 900) {
teleport_done = true;
this._x = this._x - this.slowDown;
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
if (((this._x < deploy_mark) && (deployed == false)) && ((getTimer() - deploy_timer) > 300)) {
score = 100;
deploy_timer = getTimer();
if (count > deployNum) {
deployed = true;
}
_root.enemy_06.duplicateMovieClip("enemy" + _root.enemyManager.enemyVal, 20000 + _root.totalObjects);
_root["enemy" + _root.enemyManager.enemyVal]._x = _x;
_root["enemy" + _root.enemyManager.enemyVal]._y = _y;
_root["enemy" + _root.enemyManager.enemyVal].slowDown = (random(400) + 100) / 100;
_root.enemyManager.enemyArray.push(_root["enemy" + _root.enemyManager.enemyVal]);
_root.enemyManager.enemyVal++;
_root.enemyManager.enemyNum++;
_root.totalObjects++;
count++;
}
}
} else {
_alpha = (_alpha + 2);
}
}
Instance of Symbol 224 MovieClip "enemy_06" in Frame 11
onClipEvent (load) {
score = 25;
health = 1;
if (this._y <= _root.player._y) {
ship_x = random(Stage.width);
ship_y = (random(250) + Stage.height) + 100;
}
if (this._y > _root.player._y) {
ship_x = random(Stage.width);
ship_y = (random(250) + Stage.height) + 100;
ship_y = ship_y * -1;
}
_alpha = 100;
dead = 0;
slowRot = 50;
teleport_done = true;
isAsteroid = false;
}
onClipEvent (enterFrame) {
if (_root.enemyManager.end_of_level == true) {
removeMovieClip(this);
}
if ((teleport_done == true) && (this._name != "enemy_06")) {
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
if (this._name != "enemy_06") {
angle = Math.atan2(_root.player._y - this._y, _root.player._x - this._x);
myDegrees = Math.round((angle * 180) / Math.PI);
this._x = this._x + (Math.cos(angle) * slowDown);
this._y = this._y + (Math.sin(angle) * slowDown);
this._rotation = myDegrees + 90;
}
}
}
Instance of Symbol 230 MovieClip "big_rock" in Frame 11
onClipEvent (load) {
score = 25;
ship_x = 0;
ship_y = 0;
if (dest == 0) {
ship_x = Stage.width + 100;
ship_y = (random(100) + Stage.height) + 50;
theDir = random(2);
if (theDir == 0) {
ship_y = ship_y * -1;
}
} else if (dest == 1) {
ship_x = -100;
ship_y = (random(100) + Stage.height) + 50;
theDir = random(2);
if (theDir == 0) {
ship_y = ship_y * -1;
}
}
if (dest == 2) {
ship_x = (random(100) + Stage.width) + 50;
theDir = random(2);
if (theDir == 0) {
ship_x = ship_x * -1;
}
ship_y = Stage.height + 100;
}
if (dest == 3) {
ship_x = (random(100) + Stage.width) + 50;
theDir = random(2);
if (theDir == 0) {
ship_x = ship_x * -1;
}
ship_y = -100;
}
dead = 0;
health = 3;
teleport_done = true;
thrust = random(5) + 1;
_alpha = 100;
rotVal = random(3) + 1;
rotDir = random(2);
if (rotDir == 0) {
rotVal = rotVal * -1;
}
isAsteroid = true;
slowDown = 4;
}
onClipEvent (enterFrame) {
if ((_root.enemyManager.end_of_level == true) && (this._name != "big_rock")) {
this.gotoAndPlay("explode");
}
if (this._name != "big_rock") {
if ((this._y > -50) && (this._y < -40)) {
health = 0;
}
if ((this._y < (Stage.height + 50)) && (this._y > (Stage.height + 40))) {
health = 0;
}
if ((this._x > -50) && (this._x < -40)) {
health = 0;
}
if ((this._x < (Stage.height + 50)) && (this._x > (Stage.height + 40))) {
health = 0;
}
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
myRadians = Math.atan2(ship_y - this._y, ship_x - this._x);
myDegrees = Math.round((myRadians * 180) / Math.PI);
yChange = ship_y - this._y;
xChange = ship_x - this._x;
if (yChange < 0) {
yMove = -thrust;
} else if (yChange >= 0) {
yMove = thrust;
}
if (xChange < 0) {
xMove = -thrust;
} else if (xChange >= 0) {
xMove = thrust;
}
this._y = this._y + yMove;
this._x = this._x + xMove;
this._rotation = this._rotation + rotVal;
}
}
Instance of Symbol 233 MovieClip "small_rock" in Frame 11
onClipEvent (load) {
score = 10;
initialAngle = random(361);
thrust = random(7) + 1;
dead = 0;
health = 1;
teleport_done = true;
_alpha = 100;
rotVal = random(5) + 1;
rotDir = random(2);
if (rotDir == 0) {
rotVal = rotVal * -1;
}
isAsteroid = true;
theType = "small asteroid";
}
onClipEvent (enterFrame) {
if (_root.enemyManager.end_of_level == true) {
removeMovieClip(this);
}
if (this._name != "small_rock") {
if ((this._y > -50) && (this._y < -40)) {
health = 0;
}
if ((this._y < (Stage.height + 50)) && (this._y > (Stage.height + 40))) {
health = 0;
}
if ((this._x > -50) && (this._x < -40)) {
health = 0;
}
if ((this._x < (Stage.height + 50)) && (this._x > (Stage.height + 40))) {
health = 0;
}
if (this.hitTest(_root.player.player_hit_zone) && (dead == 0)) {
_root.player.dead = 1;
}
_rotation = (_rotation + rotVal);
_x = (_x + (thrust * Math.sin(initialAngle)));
_y = (_y - (thrust * Math.cos(initialAngle)));
}
}
Instance of Symbol 237 MovieClip "score_scroll" in Frame 11
onClipEvent (load) {
if (this._name == "score_scroll") {
stop();
}
}
Instance of Symbol 247 MovieClip "random_path" in Frame 11
onClipEvent (load) {
slowDown = 5;
travelX = 1;
travelY = 1;
angle = random(360);
newDir = getTimer();
_visible = false;
}
onClipEvent (enterFrame) {
if (this._name != "random_path") {
if ((((!this.hitTest(_root.rightWall)) && (!this.hitTest(_root.leftWall))) && (!this.hitTest(_root.ceiling))) && (!this.hitTest(_root.ground))) {
hitAlready = false;
}
if (this.hitTest(_root.rightWall) || (this.hitTest(_root.leftWall) && (hitAlready == false))) {
hitAlready = true;
travelX = travelX * -1;
}
if (this.hitTest(_root.ceiling) || (this.hitTest(_root.ground) && (hitAlready == false))) {
hitAlready = true;
travelY = travelY * -1;
}
if (((getTimer() - newDir) > 3000) && (hitAlready == false)) {
newDir = getTimer();
changeTravelX = random(2);
if (changeTravelX == 0) {
travelX = travelX * -1;
}
changeTravelY = random(2);
if (changeTravelY == 0) {
travelY = travelY * -1;
}
}
this._x = this._x + (slowDown * travelX);
this._y = this._y + (slowDown * travelY);
}
}
Instance of Symbol 265 MovieClip "energy_container" in Frame 11
onClipEvent (load) {
this.swapDepths(1048503);
local_score = _root.credits;
}
onClipEvent (enterFrame) {
if (local_score < _root.credits) {
local_score = local_score + 5;
}
_root.scoreText = local_score + " CR";
}
Instance of Symbol 267 MovieClip "energy_bar" in Frame 11
onClipEvent (load) {
_root.energyVal = 100;
this.swapDepths(1048504);
}
Frame 12
score_text.text = score;
removeMovieClip("player");
t = 0;
while (t < 25) {
_root["star" + t].removeMovieClip();
t++;
}
t = 26;
_root["planet" + t].removeMovieClip();
stop();
Instance of Symbol 150 MovieClip "bullets" in Frame 12
onClipEvent (load) {
thrust = 10;
initialAngle = _root.player._rotation * (Math.PI/180);
bulletTimer = getTimer();
xSpeed = 0;
ySpeed = 0;
radius = 1;
_width = 2;
_height = 2;
myColor = 0;
rename = 0;
enemyWasHit = false;
removeTime = 3000;
enemyThatWasHit = -1;
i = 0;
p = 0;
}
onClipEvent (enterFrame) {
i = 0;
while (i < _root.enemyManager.enemyArray.length) {
if (this.hitTest(_root.enemyManager.enemyArray[i])) {
_root.score = _root.score + 100;
_root.boom.start();
enemyWasHit = true;
enemyThatWasHit = _root.enemyManager.enemyArray[i];
u = 0;
while (u < _root.enemyManager.enemyArray.length) {
if (_root.enemyManager.enemyArray[u] == enemyThatWasHit) {
_root.enemyManager.enemyArray[u] = "blank";
}
u++;
}
break;
}
i++;
}
if (enemyWasHit == true) {
enemyWasHit = false;
p = 0;
while (p < _root.enemyManager.enemyArray.length) {
match = typeof(_root.enemyManager.enemyArray[p]) == typeof(_root.player);
if (!match) {
q = p;
while (q < _root.enemyManager.enemyArray.length) {
_root.enemyManager.enemyArray[q] = _root.enemyManager.enemyArray[q + 1];
q++;
}
tempArray = new Array();
z = 0;
while (z < (_root.enemyManager.enemyArray.length - 1)) {
tempArray[z] = _root.enemyManager.enemyArray[z];
z++;
}
_root.enemyManager.enemyArray = tempArray;
delete tempArray;
}
p++;
}
_root.enemyManager.enemyNum--;
removeMovieClip(enemyThatWasHit);
enemyThatWasHit = -1;
removeMovieClip(this);
}
if ((getTimer() - bulletTimer) < removeTime) {
if (radius < 5) {
radius = radius + 2;
_width = (_width + 2);
_height = (_height + 2);
}
_x = (_x + ((thrust + _root.player.speed) * Math.sin(initialAngle)));
_y = (_y - ((thrust + _root.player.speed) * Math.cos(initialAngle)));
} else {
removeMovieClip(this);
}
}
Instance of Symbol 279 MovieClip "death_options" in Frame 12
onClipEvent (load) {
this._alpha = 0;
if (_root.player_win == true) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
_root.gameMusic.stop();
if (this._alpha < 100) {
this._alpha = this._alpha + 2;
}
}
Frame 13
removeMovieClip("player");
t = 0;
while (t < 25) {
_root["star" + t].removeMovieClip();
t++;
}
t = 26;
_root["planet" + t].removeMovieClip();
stop();
Instance of Symbol 85 MovieClip "planets" in Frame 13
onClipEvent (load) {
planetTimer = getTimer();
makePlanet = 1000;
planetSpawn = random(makePlanet);
animatePlanet = 0;
initialY = this._y;
planetSize = random(2) + 1;
planetScale = random(3);
if (planetScale == 0) {
planetSize = 1;
this._width = this._width * planetSize;
this._height = this._height * planetSize;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
onClipEvent (enterFrame) {
if (_root.bg == true) {
if (((getTimer() - planetTimer) > planetSpawn) && (this._x > 0)) {
animatePlanet = 1;
}
if (animatePlanet == 1) {
this._y = this._y + 0.5;
}
if ((animatePlanet == 1) && (this._y > 2000)) {
planetTimer = getTimer();
animatePlanet = 0;
planetSpawn = random(makePlanet);
this._y = initialY;
this._x = random(Stage.width);
planetScale = random(3);
if (planetScale == 0) {
planetSize = random(2) + 1;
this._width = this._width * planetSize;
this._height = this._height * planetSize;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
}
}
Instance of Symbol 91 MovieClip "star" in Frame 13
onClipEvent (load) {
speed = (random(5) + 1) * 2.5;
}
onClipEvent (enterFrame) {
if (_root.bg == true) {
if (this._x >= 0) {
this._y = this._y + speed;
}
if (this._y > (Stage.height + 50)) {
this._x = random(Stage.width);
this._y = random(200) * -1;
}
}
}
Instance of Symbol 290 MovieClip "level_panel_mc" in Frame 13
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = (_alpha + 2);
}
}
Instance of Symbol 292 MovieClip "level_number_mc" in Frame 13
onClipEvent (load) {
original_height = this._height;
this._height = 1;
rolledOver = false;
}
onClipEvent (enterFrame) {
if (rolledOver == true) {
if (this._height < original_height) {
this._height = this._height + 5;
}
} else if ((rolledOver == false) && (this._height > 1)) {
this._height = this._height - 5;
}
}
Frame 14
logMileStone("completedLevel_" + game_level);
if ((game_level + 1) == 10) {
player_lives++;
}
if ((game_level + 1) == 15) {
player_lives++;
}
if ((game_level + 1) == 21) {
player_win = true;
_root.gotoAndStop("dead");
}
score_text.text = score;
t = 0;
while (t < 25) {
_root["star" + t].removeMovieClip();
t++;
}
t = 26;
_root["planet" + t].removeMovieClip();
removeMovieClip("player");
game_level++;
levelNum = "Level " + game_level;
i = 0;
while (i < _root.enemyManager.enemyArray.length) {
removeMovieClip(_root.enemyManager.enemyArray[i]);
i++;
}
delete _root.enemyManager.enemyArray;
if (_root.player_win == false) {
gotoAndStop ("shop_screen");
}
Instance of Symbol 85 MovieClip "planets" in Frame 14
onClipEvent (load) {
planetTimer = getTimer();
makePlanet = 1000;
planetSpawn = random(makePlanet);
animatePlanet = 0;
initialY = this._y;
planetSize = random(2) + 1;
planetScale = random(3);
if (planetScale == 0) {
planetSize = random(2) + 1;
this._width = this._width * 1.5;
this._height = this._height * 1.5;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
onClipEvent (enterFrame) {
if (((getTimer() - planetTimer) > planetSpawn) && (this._x > 0)) {
animatePlanet = 1;
}
if (animatePlanet == 1) {
this._y = this._y + 0.5;
}
if ((animatePlanet == 1) && (this._y > 2000)) {
planetTimer = getTimer();
animatePlanet = 0;
planetSpawn = random(makePlanet);
this._y = initialY;
this._x = random(Stage.width);
planetScale = random(3);
if (planetScale == 0) {
planetSize = random(2) + 1;
this._width = this._width * planetSize;
this._height = this._height * planetSize;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
}
Instance of Symbol 88 MovieClip "enemy_bullets" in Frame 14
onClipEvent (load) {
slowDown = 3;
ship_x = _root.player._x;
ship_y = _root.player._y;
myRadians = Math.atan2(ship_y - this._y, ship_x - this._x);
myDegrees = Math.round((myRadians * 180) / Math.PI);
yChange = Math.round(ship_y - this._y);
xChange = Math.round(ship_x - this._x);
yMove = Math.round(yChange / 10);
xMove = Math.round(xChange / 10);
yMove = yMove / this.slowDown;
xMove = xMove / this.slowDown;
visibleTimer = getTimer();
this._visible = false;
}
onClipEvent (enterFrame) {
if ((getTimer() - visibleTimer) > 100) {
this._visible = true;
}
if (this._name != "enemy_bullets") {
this._y = this._y + yMove;
this._x = this._x + xMove;
}
if (this.hitTest(_root.player)) {
_root.player.dead = 1;
}
if ((_root.player.dead == 1) || ((this._name != "enemy_bullets") && ((((this._x < 0) || (this._x > Stage.width)) || (this._y < 0)) || (this._y > Stage.height)))) {
removeMovieClip(this);
}
}
Instance of Symbol 150 MovieClip "bullets" in Frame 14
onClipEvent (load) {
thrust = 10;
initialAngle = _root.player._rotation * (Math.PI/180);
bulletTimer = getTimer();
xSpeed = 0;
ySpeed = 0;
radius = 1;
_width = 2;
_height = 2;
myColor = 0;
rename = 0;
enemyWasHit = false;
removeTime = 3000;
enemyThatWasHit = -1;
i = 0;
p = 0;
}
onClipEvent (enterFrame) {
i = 0;
while (i < _root.enemyManager.enemyArray.length) {
if (this.hitTest(_root.enemyManager.enemyArray[i])) {
_root.score = _root.score + 100;
_root.boom.start();
enemyWasHit = true;
enemyThatWasHit = _root.enemyManager.enemyArray[i];
u = 0;
while (u < _root.enemyManager.enemyArray.length) {
if (_root.enemyManager.enemyArray[u] == enemyThatWasHit) {
_root.enemyManager.enemyArray[u] = "blank";
}
u++;
}
break;
}
i++;
}
if (enemyWasHit == true) {
enemyWasHit = false;
p = 0;
while (p < _root.enemyManager.enemyArray.length) {
match = typeof(_root.enemyManager.enemyArray[p]) == typeof(_root.player);
if (!match) {
q = p;
while (q < _root.enemyManager.enemyArray.length) {
_root.enemyManager.enemyArray[q] = _root.enemyManager.enemyArray[q + 1];
q++;
}
tempArray = new Array();
z = 0;
while (z < (_root.enemyManager.enemyArray.length - 1)) {
tempArray[z] = _root.enemyManager.enemyArray[z];
z++;
}
_root.enemyManager.enemyArray = tempArray;
delete tempArray;
}
p++;
}
_root.enemyManager.enemyNum--;
removeMovieClip(enemyThatWasHit);
enemyThatWasHit = -1;
removeMovieClip(this);
}
if ((getTimer() - bulletTimer) < removeTime) {
if (radius < 5) {
radius = radius + 2;
_width = (_width + 2);
_height = (_height + 2);
}
_x = (_x + ((thrust + _root.player.speed) * Math.sin(initialAngle)));
_y = (_y - ((thrust + _root.player.speed) * Math.cos(initialAngle)));
} else {
removeMovieClip(this);
}
}
Frame 15
score_text.text = score;
if (_root.audioState == 1) {
_root.gameMusic.stop();
_root.gameMusic.setVolume(100);
}
removeMovieClip("player");
t = 0;
while (t < 25) {
_root["star" + t].removeMovieClip();
t++;
}
t = 26;
_root["planet" + t].removeMovieClip();
view_ship = 0;
view_upgrade = 0;
cost = 0;
description = "Select an upgrade to view or purchase it.";
purchase_panel._visible = false;
original_y = _root.p1_3D._y;
shifted_y = _root.p1_3D._y + 20;
stop();
Instance of Symbol 85 MovieClip "planets" in Frame 15
onClipEvent (load) {
planetTimer = getTimer();
makePlanet = 1000;
planetSpawn = random(makePlanet);
animatePlanet = 0;
initialY = this._y;
planetSize = random(2) + 1;
planetScale = random(3);
if (planetScale == 0) {
planetSize = 1;
this._width = this._width * planetSize;
this._height = this._height * planetSize;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
onClipEvent (enterFrame) {
if (_root.bg == true) {
if (((getTimer() - planetTimer) > planetSpawn) && (this._x > 0)) {
animatePlanet = 1;
}
if (animatePlanet == 1) {
this._y = this._y + 0.5;
}
if ((animatePlanet == 1) && (this._y > 2000)) {
planetTimer = getTimer();
animatePlanet = 0;
planetSpawn = random(makePlanet);
this._y = initialY;
this._x = random(Stage.width);
planetScale = random(3);
if (planetScale == 0) {
planetSize = random(2) + 1;
this._width = this._width * planetSize;
this._height = this._height * planetSize;
} else if (planetScale == 1) {
planetSize = random(4) + 1;
this._width = this._width / planetSize;
this._height = this._height / planetSize;
}
goFrame = random(6) + 1;
gotoAndStop(goFrame);
}
}
}
Instance of Symbol 88 MovieClip "enemy_bullets" in Frame 15
onClipEvent (load) {
slowDown = 3;
ship_x = _root.player._x;
ship_y = _root.player._y;
myRadians = Math.atan2(ship_y - this._y, ship_x - this._x);
myDegrees = Math.round((myRadians * 180) / Math.PI);
yChange = Math.round(ship_y - this._y);
xChange = Math.round(ship_x - this._x);
yMove = Math.round(yChange / 10);
xMove = Math.round(xChange / 10);
yMove = yMove / this.slowDown;
xMove = xMove / this.slowDown;
visibleTimer = getTimer();
this._visible = false;
}
onClipEvent (enterFrame) {
if ((getTimer() - visibleTimer) > 100) {
this._visible = true;
}
if (this._name != "enemy_bullets") {
this._y = this._y + yMove;
this._x = this._x + xMove;
}
if (this.hitTest(_root.player)) {
_root.player.dead = 1;
}
if ((_root.player.dead == 1) || ((this._name != "enemy_bullets") && ((((this._x < 0) || (this._x > Stage.width)) || (this._y < 0)) || (this._y > Stage.height)))) {
removeMovieClip(this);
}
}
Instance of Symbol 72 MovieClip "field" in Frame 15
onClipEvent (load) {
this.count = 50;
this.speed = 5;
this.focaldistance = 25;
this.rmin = 50;
this.rmax = 1000;
this.zmin = 10;
this.zmax = 300;
var i = 0;
while (i < this.count) {
this.attachMovie("dot", i, i);
i++;
}
}
onClipEvent (enterFrame) {
var i = 0;
while (i < this.count) {
if (((this[i].z = this[i].z - this.speed)) <= 0) {
this.randomPlace(i);
}
this.placeInSpace(i);
i++;
}
}
Instance of Symbol 91 MovieClip "star" in Frame 15
onClipEvent (load) {
speed = (random(5) + 1) * 2.5;
}
onClipEvent (enterFrame) {
if (_root.bg == true) {
if (this._x >= 0) {
this._y = this._y + speed;
}
if (this._y > (Stage.height + 50)) {
this._x = random(Stage.width);
this._y = random(200) * -1;
}
}
}
Instance of Symbol 309 MovieClip "level1_weapon" in Frame 15
onClipEvent (enterFrame) {
if (_root.view_upgrade == 0) {
_root.level1_weapon._visible = false;
_root.level2_weapon._visible = false;
_root.level3_weapon._visible = false;
_root.level1_weapon_btn.enabled = false;
_root.level2_weapon_btn.enabled = false;
_root.level3_weapon_btn.enabled = false;
} else {
_root.level1_weapon._visible = true;
_root.level2_weapon._visible = true;
_root.level3_weapon._visible = true;
_root.level1_weapon_btn.enabled = true;
_root.level2_weapon_btn.enabled = true;
_root.level3_weapon_btn.enabled = true;
}
if (_root.view_upgrade == 1) {
this.gotoAndStop("projectile1");
}
if (_root.view_upgrade == 2) {
this.gotoAndStop("photon1");
}
if (_root.view_upgrade == 3) {
this.gotoAndStop("laser1");
}
if (_root.view_upgrade == 5) {
this.gotoAndStop("thruster1");
}
if (_root.view_upgrade == 6) {
this.gotoAndStop("power_core1");
}
}
Instance of Symbol 325 MovieClip "level2_weapon" in Frame 15
onClipEvent (enterFrame) {
if (_root.view_upgrade == 1) {
this.gotoAndStop("projectile2");
}
if (_root.view_upgrade == 2) {
this.gotoAndStop("photon2");
}
if (_root.view_upgrade == 3) {
this.gotoAndStop("laser2");
}
if (_root.view_upgrade == 5) {
this.gotoAndStop("thruster2");
}
if (_root.view_upgrade == 6) {
this.gotoAndStop("power_core2");
}
}
Instance of Symbol 341 MovieClip "level3_weapon" in Frame 15
onClipEvent (enterFrame) {
if (_root.view_upgrade == 1) {
this.gotoAndStop("projectile3");
}
if (_root.view_upgrade == 2) {
this.gotoAndStop("photon3");
}
if (_root.view_upgrade == 3) {
this.gotoAndStop("laser3");
}
if (_root.view_upgrade == 5) {
this.gotoAndStop("thruster3");
}
if (_root.view_upgrade == 6) {
this.gotoAndStop("power_core3");
}
}
Symbol 27 MovieClip Frame 25
stop();
Symbol 28 MovieClip Frame 9
stop();
Symbol 36 MovieClip Frame 45
gotoAndPlay (35);
Symbol 37 MovieClip Frame 38
gotoAndPlay ("start");
Symbol 39 Button
on (press) {
clickThrough(destinationURL, "LoadScreenLogo");
}
Symbol 42 Button
on (press) {
_parent.clickThrough(_parent.destinationURL, "IntroAnimation");
}
Symbol 49 MovieClip Frame 29
stop();
Symbol 64 MovieClip Frame 137
stop();
Symbol 68 MovieClip Frame 229
stop();
_parent.xgenIntroComplete();
Symbol 85 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 2
stop();
Symbol 97 MovieClip Frame 180
gotoAndPlay (1);
Symbol 103 Button
on (release) {
_root.blip1.start();
logMileStone("startedGame");
_root.gotoAndStop("ship_select");
}
Symbol 107 Button
on (release) {
_root.blip1.start();
_root.gotoAndStop("instructions");
}
Symbol 117 Button
on (release) {
if (_root.audioState == 0) {
_root.audioState = 1;
_root.audioStateText = "ON";
_root.gameMusic.setVolume(100);
} else if (_root.audioState == 1) {
_root.audioState = 0;
_root.audioStateText = "OFF";
_root.gameMusic.setVolume(0);
}
}
Symbol 119 Button
on (press) {
clickThrough(destinationURL, "TitleScreenLogo");
}
Symbol 125 Button
on (release) {
_root.blip1.start();
_root.gotoAndStop("start");
}
Symbol 134 Button
on (release) {
_root.blip1.start();
_root.ship_selected = 1;
_root.stopAllSounds();
_root.gameMusic.start(0, 99999);
_root.gotoAndStop("pregame");
}
Symbol 139 Button
on (release) {
_root.blip1.start();
_root.ship_selected = 3;
_root.gameMusic.start(0, 99999);
_root.stopAllSounds();
_root.gotoAndStop("pregame");
}
Symbol 143 Button
on (release) {
_root.blip1.start();
_root.ship_selected = 0;
_root.stopAllSounds();
_root.gameMusic.start(0, 99999);
_root.gotoAndStop("pregame");
}
Symbol 150 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 2
stop();
Symbol 150 MovieClip Frame 3
stop();
Symbol 165 MovieClip Frame 11
removeMovieClip(this);
stop();
Symbol 174 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 3
myColor = 2945333 /* 0x2CF135 */;
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
if (_root.enemyManager.end_of_level == false) {
_root.boom4.start();
}
Symbol 174 MovieClip Frame 13
removeMovieClip(this);
stop();
Symbol 187 MovieClip Frame 1
stop();
Instance of Symbol 178 MovieClip "flame" in Symbol 187 MovieClip Frame 1
onClipEvent (load) {
this._height = 1;
}
onClipEvent (enterFrame) {
this._height = _root.player.speed * 4;
}
Instance of Symbol 180 MovieClip "player_hit_zone" in Symbol 187 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 187 MovieClip Frame 2
stop();
Symbol 187 MovieClip Frame 3
stop();
Instance of Symbol 180 MovieClip "player_hit_zone" in Symbol 187 MovieClip Frame 3
onClipEvent (load) {
_visible = false;
}
Symbol 193 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 2
myColor = 15741856 /* 0xF033A0 */;
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
if (_root.enemyManager.end_of_level == false) {
_root.boom1.start();
}
Symbol 193 MovieClip Frame 12
if (_root.player.dead == 3) {
_root.player.dead = -1;
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
_root.gotoAndStop("level_complete");
}
removeMovieClip(this);
stop();
Symbol 193 MovieClip Frame 13
this._alpha = 100;
_root.appear.start();
Symbol 193 MovieClip Frame 51
this.teleport_done = true;
this._alpha = 100;
this.gotoAndStop("start_flight");
Symbol 199 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 2
myColor = 16056107 /* 0xF4FF2B */;
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
if (_root.enemyManager.end_of_level == false) {
_root.boom2.start();
}
Symbol 199 MovieClip Frame 12
if (_root.player.dead == 3) {
_root.player.dead = -1;
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
_root.gotoAndStop("level_complete");
}
removeMovieClip(_root["random_path" + this.pathing_ID]);
removeMovieClip(this);
stop();
Symbol 199 MovieClip Frame 13
this._alpha = 100;
_root.appear2.start();
Symbol 199 MovieClip Frame 51
this.teleport_done = true;
this._alpha = 100;
this.gotoAndStop("start_flight");
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 2
_root.player.explosionVal++;
_root.totalObjects++;
_root.explosion.duplicateMovieClip("explosion" + _root.player.explosionVal, _root.totalObjects);
_root["explosion" + _root.player.explosionVal]._width = _root["explosion" + _root.player.explosionVal]._width + 5;
_root["explosion" + _root.player.explosionVal]._height = _root["explosion" + _root.player.explosionVal]._height + 5;
_root["explosion" + _root.player.explosionVal]._x = _x;
_root["explosion" + _root.player.explosionVal]._y = _y;
if (_root.enemyManager.end_of_level == false) {
_root.boom2.start();
}
Symbol 203 MovieClip Frame 12
if (_root.player.dead == 3) {
_root.player.dead = -1;
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
_root.gotoAndStop("level_complete");
}
removeMovieClip(this);
stop();
Symbol 218 MovieClip Frame 7
if (this.dead == 0) {
gotoAndPlay ("start_flight");
}
Symbol 218 MovieClip Frame 8
myColor = 1016304 /* 0x0F81F0 */;
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
if (_root.enemyManager.end_of_level == false) {
_root.boom3.start();
}
Symbol 218 MovieClip Frame 18
if (_root.player.dead == 3) {
_root.player.dead = -1;
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
_root.gotoAndStop("level_complete");
}
removeMovieClip(this);
stop();
Symbol 218 MovieClip Frame 19
this._alpha = 100;
_root.appear3.start();
Symbol 218 MovieClip Frame 57
this.teleport_done = true;
this._alpha = 100;
this.gotoAndStop("start_flight");
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 2
myColor = 2729942 /* 0x29A7D6 */;
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
if (_root.enemyManager.end_of_level == false) {
_root.boom4.start();
}
Symbol 221 MovieClip Frame 12
if (_root.player.dead == 3) {
_root.player.dead = -1;
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
_root.gotoAndStop("level_complete");
}
removeMovieClip(this);
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 2
myColor = 15542571 /* 0xED292B */;
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
if (_root.enemyManager.end_of_level == false) {
_root.boom1.start();
}
Symbol 224 MovieClip Frame 12
if (_root.player.dead == 3) {
_root.player.dead = -1;
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
_root.gotoAndStop("level_complete");
}
removeMovieClip(this);
stop();
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 2
myColor = random(4);
if (myColor == 0) {
myColor = 16382026 /* 0xF9F84A */;
}
if (myColor == 1) {
myColor = 15166939 /* 0xE76DDB */;
}
if (myColor == 2) {
myColor = 16720418 /* 0xFF2222 */;
}
if (myColor == 3) {
myColor = 10412529 /* 0x9EE1F1 */;
}
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
Symbol 227 MovieClip Frame 12
if (_root.player.dead == 3) {
_root.player.dead = -1;
_root.energy_container.removeMovieClip();
_root.energy_bar.removeMovieClip();
_root.gotoAndStop("level_complete");
}
removeMovieClip(this);
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 2
if ((((this._x > 0) && (this._x < Stage.width)) && (this._y > 0)) && (this._y < Stage.height)) {
myColor = 14342874 /* 0xDADADA */;
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
i = 0;
while (i < 3) {
_root.small_rock.duplicateMovieClip("enemy" + _root.enemyManager.enemyVal, 20000 + _root.totalObjects);
_root["enemy" + _root.enemyManager.enemyVal]._x = this._x;
_root["enemy" + _root.enemyManager.enemyVal]._y = this._y;
_root.enemyManager.enemyArray.push(_root["enemy" + _root.enemyManager.enemyVal]);
_root.enemyManager.enemyVal++;
_root.enemyManager.enemyNum++;
_root.totalObjects++;
i++;
}
}
if (_root.enemyManager.end_of_level == false) {
_root.boom3.start();
}
Symbol 230 MovieClip Frame 12
removeMovieClip(this);
stop();
Symbol 233 MovieClip Frame 1
stop();
Symbol 233 MovieClip Frame 2
myColor = 14342874 /* 0xDADADA */;
xy = 0;
while (xy < (random(_root.extraParticles) + _root.minParticles)) {
_root.particleVal++;
_root.totalObjects++;
_root.particle.duplicateMovieClip("particle" + _root.particleVal, _root.totalObjects);
theExplosion = new Color(_root["particle" + _root.particleVal]);
theExplosion.setRGB(myColor);
_root["particle" + _root.particleVal]._x = explodeX;
_root["particle" + _root.particleVal]._y = explodeY;
if (_root.particleVal > 450) {
_root.particleVal = 300;
}
xy++;
}
if (_root.enemyManager.end_of_level == false) {
_root.boom2.start();
}
Symbol 233 MovieClip Frame 12
removeMovieClip(this);
stop();
Symbol 237 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 256 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 2
stop();
Symbol 256 MovieClip Frame 3
stop();
Symbol 257 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 2
stop();
Instance of Symbol 256 MovieClip in Symbol 257 MovieClip Frame 2
onClipEvent (load) {
if (_root.ship_selected == 0) {
this.gotoAndStop(2);
}
if (_root.ship_selected == 1) {
this.gotoAndStop(1);
}
if (_root.ship_selected == 3) {
this.gotoAndStop(3);
}
}
Symbol 257 MovieClip Frame 3
stop();
Instance of Symbol 256 MovieClip in Symbol 257 MovieClip Frame 3
onClipEvent (load) {
if (_root.ship_selected == 0) {
this.gotoAndStop(2);
}
if (_root.ship_selected == 1) {
this.gotoAndStop(1);
}
if (_root.ship_selected == 3) {
this.gotoAndStop(3);
}
}
Symbol 257 MovieClip Frame 4
stop();
Instance of Symbol 256 MovieClip in Symbol 257 MovieClip Frame 4
onClipEvent (load) {
if (_root.ship_selected == 0) {
this.gotoAndStop(2);
}
if (_root.ship_selected == 1) {
this.gotoAndStop(1);
}
if (_root.ship_selected == 3) {
this.gotoAndStop(3);
}
}
Symbol 257 MovieClip Frame 5
stop();
Instance of Symbol 256 MovieClip in Symbol 257 MovieClip Frame 5
onClipEvent (load) {
if (_root.ship_selected == 0) {
this.gotoAndStop(2);
}
if (_root.ship_selected == 1) {
this.gotoAndStop(1);
}
if (_root.ship_selected == 3) {
this.gotoAndStop(3);
}
}
Symbol 265 MovieClip Frame 1
stop();
Instance of Symbol 257 MovieClip "lives_display" in Symbol 265 MovieClip Frame 1
onClipEvent (load) {
if (_root.player_lives > 0) {
this.gotoAndStop(_root.player_lives);
}
}
Symbol 265 MovieClip Frame 8
gotoAndPlay (2);
Symbol 272 Button
on (release) {
_root.player_lives = 3;
_root.gotoAndStop("start");
}
Symbol 278 Button
on (release) {
_root.player_lives = 3;
_root.gotoAndStop("start");
}
Symbol 279 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 2
stop();
Symbol 285 MovieClip Frame 20
gotoAndPlay (1);
Symbol 289 Button
on (rollOver) {
_root.level_number_mc.rolledOver = true;
}
on (rollOut) {
_root.level_number_mc.rolledOver = false;
}
on (release) {
if (_root.bg == true) {
t = 0;
while (t < 25) {
_root.star.duplicateMovieClip("star" + t, t);
_root["star" + t]._x = random(Stage.width);
_root["star" + t]._y = random(Stage.height);
t++;
}
t = 26;
_root.planets.duplicateMovieClip("planet" + t, t);
_root["planet" + t]._x = random(Stage.width);
}
_root.gotoAndStop("game");
}
Symbol 309 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 2
stop();
Symbol 309 MovieClip Frame 3
stop();
Symbol 309 MovieClip Frame 4
stop();
Symbol 309 MovieClip Frame 5
stop();
Symbol 309 MovieClip Frame 6
stop();
Symbol 325 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 2
stop();
Symbol 325 MovieClip Frame 3
stop();
Symbol 325 MovieClip Frame 4
stop();
Symbol 325 MovieClip Frame 6
stop();
Symbol 341 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 2
stop();
Symbol 341 MovieClip Frame 3
stop();
Symbol 341 MovieClip Frame 4
stop();
Symbol 341 MovieClip Frame 5
stop();
Symbol 341 MovieClip Frame 6
stop();
Symbol 343 Button
on (release) {
if (_root.view_upgrade == 1) {
_root.p1_3D.gotoAndPlay("proj_spin1");
_root.p1_3D._y = _root.original_y;
_root.description = "An early model, single turret flak cannon designed for slightly smaller energy consumption and a minor reduction in cooldown than the stock cannon.";
_root.cost = 2500;
_root.purchase_panel._visible = true;
_root.item_chosen = "proj1";
if (_root.proj1_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 2) {
_root.p1_3D.gotoAndPlay("photon_spin1");
_root.description = "Similar to the single turret flak cannon, this photon cannon fires quicker bursts with a slightly higher energy cost.";
_root.cost = 4500;
_root.purchase_panel._visible = true;
_root.item_chosen = "photon1";
if (_root.photon1_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 3) {
_root.p1_3D.gotoAndPlay("laser_spin1");
_root.p1_3D._y = shifted_y;
_root.description = "The most advanced single turret weapon available, this laser weapon packs a punch with a slightly lower energy consumption to the level 1 photon cannon.";
_root.cost = 7000;
_root.purchase_panel._visible = true;
_root.item_chosen = "laser1";
if (_root.laser1_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 5) {
_root.p1_3D.gotoAndPlay("thruster_spin1");
_root.p1_3D._y = shifted_y;
_root.description = "A single turbine thruster gives your ship a little extra push above the stock thruster.";
_root.cost = 2000;
_root.purchase_panel._visible = true;
_root.item_chosen = "thruster1";
if (_root.thruster1_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 6) {
_root.p1_3D.gotoAndPlay("core_spin1");
_root.p1_3D._y = shifted_y;
_root.description = "A fluid based power core that gives your ship's weapons system a slightly longer output life.";
_root.cost = 2500;
_root.purchase_panel._visible = true;
_root.item_chosen = "core1";
if (_root.core1_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
}
Symbol 344 Button
on (release) {
if (_root.view_upgrade == 1) {
_root.p1_3D.gotoAndPlay("proj_spin2");
_root.p1_3D._y = _root.original_y;
_root.description = "Two turrets are available on this level 2 flak cannon, which was designed with a slightly better cooldown than the level 1 photon cannon, but requires more energy.";
_root.cost = 7500;
_root.purchase_panel._visible = true;
_root.item_chosen = "proj2";
if (_root.proj2_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 2) {
_root.p1_3D.gotoAndPlay("photon_spin2");
_root.description = "This photon cannon has a higher cooldown rate but a lower energy requirement than the level 2 flak cannon.";
_root.cost = 9000;
_root.purchase_panel._visible = true;
_root.item_chosen = "photon2";
if (_root.photon2_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 3) {
_root.p1_3D.gotoAndPlay("laser_spin2");
_root.p1_3D._y = shifted_y;
_root.description = "A twin laser weapon with a low cooldown and moderate energy consumption level - it gives your ship a bang for its buck.";
_root.cost = 11500;
_root.purchase_panel._visible = true;
_root.item_chosen = "laser2";
if (_root.laser2_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 5) {
_root.p1_3D.gotoAndPlay("thruster_spin2");
_root.p1_3D._y = shifted_y;
_root.description = "This twin turbine system gives your ship that extra little oomph.";
_root.cost = 5000;
_root.purchase_panel._visible = true;
_root.item_chosen = "thruster2";
if (_root.thruster2_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 6) {
_root.p1_3D.gotoAndPlay("core_spin2");
_root.p1_3D._y = shifted_y;
_root.description = "This cell-based system offers a better energy model than earlier power cores, helping to balance out slightly more powerful weapons.";
_root.cost = 5500;
_root.purchase_panel._visible = true;
_root.item_chosen = "core2";
if (_root.core2_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
}
Symbol 345 Button
on (release) {
if (_root.view_upgrade == 1) {
_root.p1_3D.gotoAndPlay("proj_spin3");
_root.p1_3D._y = _root.original_y;
_root.description = "The most advanced flak cannon model available, with three turrets, this weapon is ideal for heavy ships with more energy to burn.";
_root.cost = 15000;
_root.purchase_panel._visible = true;
_root.item_chosen = "proj3";
if (_root.proj3_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 2) {
_root.p1_3D.gotoAndPlay("photon_spin3");
_root.description = "The fastest weapon you can mount, this three turret photon cannon is quick, but places a lot of stress on your power core.";
_root.cost = 18000;
_root.purchase_panel._visible = true;
_root.item_chosen = "photon3";
if (_root.photon3_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 3) {
_root.p1_3D.gotoAndPlay("laser_spin3");
_root.p1_3D._y = shifted_y;
_root.description = "22,000 credits equals three lasers. Three lasers equals massive damage. Massive damage equals tons of energy needed. 'Nuff said.";
_root.cost = 22000;
_root.purchase_panel._visible = true;
_root.item_chosen = "laser3";
if (_root.laser3_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 5) {
_root.p1_3D.gotoAndPlay("thruster_spin3");
_root.p1_3D._y = shifted_y;
_root.description = "The Grand Daddy of jet propulsion systems, this thruster gives you two turbines and two compact rocket thrusters. Recommended for advanced pilots only.";
_root.cost = 11000;
_root.purchase_panel._visible = true;
_root.item_chosen = "thruster3";
if (_root.thruster3_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
if (_root.view_upgrade == 6) {
_root.p1_3D.gotoAndPlay("core_spin3");
_root.p1_3D._y = shifted_y;
_root.description = "This highly advanced power core uses a fission-based reactor, giving your ship a large energy pool to work with.";
_root.cost = 11000;
_root.purchase_panel._visible = true;
_root.item_chosen = "core3";
if (_root.core3_purchased == true) {
_root.purchase_panel.gotoAndStop(2);
} else {
_root.purchase_panel.gotoAndStop(1);
}
}
}
Symbol 1115 MovieClip Frame 1
stop();
Symbol 1115 MovieClip Frame 62
gotoAndPlay ("proj_spin1");
Symbol 1115 MovieClip Frame 123
gotoAndPlay ("proj_spin2");
Symbol 1115 MovieClip Frame 184
gotoAndPlay ("proj_spin3");
Symbol 1115 MovieClip Frame 245
gotoAndPlay ("laser_spin1");
Symbol 1115 MovieClip Frame 306
gotoAndPlay ("laser_spin2");
Symbol 1115 MovieClip Frame 367
gotoAndPlay ("laser_spin3");
Symbol 1115 MovieClip Frame 428
gotoAndPlay ("photon_spin1");
Symbol 1115 MovieClip Frame 489
gotoAndPlay ("photon_spin2");
Symbol 1115 MovieClip Frame 550
gotoAndPlay ("photon_spin3");
Symbol 1115 MovieClip Frame 611
gotoAndPlay ("thruster_spin1");
Symbol 1115 MovieClip Frame 672
gotoAndPlay ("thruster_spin2");
Symbol 1115 MovieClip Frame 733
gotoAndPlay ("thruster_spin3");
Symbol 1115 MovieClip Frame 794
gotoAndPlay ("core_spin1");
Symbol 1115 MovieClip Frame 855
gotoAndPlay ("core_spin2");
Symbol 1115 MovieClip Frame 916
gotoAndPlay ("core_spin3");
Symbol 1121 Button
on (release) {
if (_root.credits < _root.cost) {
_root.error1.start();
} else {
_root.energy2.start();
}
if ((_root.item_chosen == "ship1") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.ship_selected = 1;
_root.ship1_purchased = true;
_root.ship2_purchased = false;
_root.ship3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "ship2") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.ship_selected = 2;
_root.ship1_purchased = false;
_root.ship2_purchased = true;
_root.ship3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "ship3") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.ship_selected = 3;
_root.ship1_purchased = false;
_root.ship2_purchased = false;
_root.ship3_purchased = true;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "proj1") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 1;
_root.shotDelay = 250;
_root.total_reduction = 0.1;
_root.proj1_purchased = true;
_root.proj2_purchased = false;
_root.proj3_purchased = false;
_root.photon1_purchased = false;
_root.photon2_purchased = false;
_root.photon3_purchased = false;
_root.laser1_purchased = false;
_root.laser2_purchased = false;
_root.laser3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "proj2") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 2;
_root.shotDelay = 200;
_root.total_reduction = -0.3;
_root.proj2_purchased = true;
_root.proj1_purchased = false;
_root.proj3_purchased = false;
_root.photon1_purchased = false;
_root.photon2_purchased = false;
_root.photon3_purchased = false;
_root.laser1_purchased = false;
_root.laser2_purchased = false;
_root.laser3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "proj3") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 3;
_root.shotDelay = 175;
_root.total_reduction = -0.8;
_root.proj3_purchased = true;
_root.proj1_purchased = false;
_root.proj2_purchased = false;
_root.photon1_purchased = false;
_root.photon2_purchased = false;
_root.photon3_purchased = false;
_root.laser1_purchased = false;
_root.laser2_purchased = false;
_root.laser3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "photon1") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 1;
_root.shotDelay = 180;
_root.total_reduction = -0.5;
_root.photon1_purchased = true;
_root.proj1_purchased = false;
_root.proj2_purchased = false;
_root.proj3_purchased = false;
_root.photon2_purchased = false;
_root.photon3_purchased = false;
_root.laser1_purchased = false;
_root.laser2_purchased = false;
_root.laser3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "photon2") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 2;
_root.shotDelay = 250;
_root.total_reduction = -0.05;
_root.photon2_purchased = true;
_root.proj1_purchased = false;
_root.proj2_purchased = false;
_root.proj3_purchased = false;
_root.photon1_purchased = false;
_root.photon3_purchased = false;
_root.laser1_purchased = false;
_root.laser2_purchased = false;
_root.laser3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "photon3") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 3;
_root.shotDelay = 150;
_root.total_reduction = -1;
_root.photon3_purchased = true;
_root.proj1_purchased = false;
_root.proj2_purchased = false;
_root.proj3_purchased = false;
_root.photon1_purchased = false;
_root.photon2_purchased = false;
_root.laser1_purchased = false;
_root.laser2_purchased = false;
_root.laser3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "laser1") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 1;
_root.shotDelay = 165;
_root.total_reduction = -0.4;
_root.laser1_purchased = true;
_root.proj1_purchased = false;
_root.proj2_purchased = false;
_root.proj3_purchased = false;
_root.photon1_purchased = false;
_root.photon2_purchased = false;
_root.photon3_purchased = false;
_root.laser2_purchased = false;
_root.laser3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "laser2") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 2;
_root.shotDelay = 175;
_root.total_reduction = -0.7;
_root.laser2_purchased = true;
_root.proj1_purchased = false;
_root.proj2_purchased = false;
_root.proj3_purchased = false;
_root.photon1_purchased = false;
_root.photon2_purchased = false;
_root.photon3_purchased = false;
_root.laser1_purchased = false;
_root.laser3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "laser3") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.main_turrets = 3;
_root.shotDelay = 165;
_root.total_reduction = -1.5;
_root.laser3_purchased = true;
_root.proj1_purchased = false;
_root.proj2_purchased = false;
_root.proj3_purchased = false;
_root.photon1_purchased = false;
_root.photon2_purchased = false;
_root.photon3_purchased = false;
_root.laser1_purchased = false;
_root.laser2_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "thruster1") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.thrusters = 1;
_root.thruster1_purchased = true;
_root.thruster2_purchased = false;
_root.thruster3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "thruster2") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.thrusters = 2;
_root.thruster1_purchased = false;
_root.thruster2_purchased = true;
_root.thruster3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "thruster3") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.thrusters = 3;
_root.thruster1_purchased = false;
_root.thruster2_purchased = false;
_root.thruster3_purchased = true;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "core1") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.core = 1;
_root.core1_purchased = true;
_root.core2_purchased = false;
_root.core3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "core2") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.core = 2;
_root.core1_purchased = false;
_root.core2_purchased = true;
_root.core3_purchased = false;
_root.purchase_panel.gotoAndStop(2);
}
if ((_root.item_chosen == "core3") && (_root.credits >= _root.cost)) {
_root.credits = _root.credits - _root.cost;
_root.core = 3;
_root.core1_purchased = false;
_root.core2_purchased = false;
_root.core3_purchased = true;
_root.purchase_panel.gotoAndStop(2);
}
}
Symbol 1125 MovieClip Frame 1
stop();
Symbol 1125 MovieClip Frame 2
stop();
Symbol 1131 Button
on (release) {
if (audioState == 1) {
_root.gameMusic.start(0, 99999);
_root.gameMusic.setVolume(100);
} else {
_root.gameMusic.setVolume(0);
}
if (_root.bg == true) {
t = 0;
while (t < 25) {
_root.star.duplicateMovieClip("star" + t, t);
_root["star" + t]._x = random(Stage.width);
_root["star" + t]._y = random(Stage.height);
t++;
}
t = 26;
_root.planets.duplicateMovieClip("planet" + t, t);
_root["planet" + t]._x = random(Stage.width);
}
_root.blip1.start();
_root.gotoAndStop("pregame");
}
Symbol 1137 Button
on (release) {
_root.p1_3D.gotoAndStop("no_spin");
_root.description = "Select an upgrade to view or purchase it.";
cost = 0;
_root.purchase_panel._visible = false;
_root.view_upgrade = 1;
_root.blip1.start();
}
Symbol 1142 Button
on (release) {
_root.p1_3D.gotoAndStop("no_spin");
_root.description = "Select an upgrade to view or purchase it.";
_root.view_upgrade = 2;
_root.purchase_panel._visible = false;
_root.blip1.start();
}
Symbol 1147 Button
on (release) {
_root.p1_3D.gotoAndStop("no_spin");
_root.description = "Select an upgrade to view or purchase it.";
_root.view_upgrade = 3;
_root.purchase_panel._visible = false;
_root.blip1.start();
}
Symbol 1152 Button
on (release) {
_root.p1_3D.gotoAndStop("no_spin");
_root.description = "Select an upgrade to view or purchase it.";
_root.view_upgrade = 5;
_root.purchase_panel._visible = false;
_root.blip1.start();
}
Symbol 1157 Button
on (release) {
_root.p1_3D.gotoAndStop("no_spin");
_root.description = "Select an upgrade to view or purchase it.";
_root.view_upgrade = 6;
_root.purchase_panel._visible = false;
_root.blip1.start();
}