Frame 1
copyright = "Copyright (c) 2005-2006 by Yaroslav Yanovsky, Enkord Ltd.";
var plLoaded = false;
var plLoadState = (int((this.getBytesLoaded() / this.getBytesTotal()) * 100) + "%");
fscommand ("showmenu", false);
fscommand ("allowscale", false);
fscommand ("wmode", "opaque");
Frame 2
if (this.getBytesLoaded() < this.getBytesTotal()) {
gotoAndPlay ("load");
} else {
stop();
preloaderlogos._visible = false;
preloader._visible = false;
agame.gotoAndPlay("play");
}
Frame 3
function adjustScore(value) {
var _local1 = _root;
_local1.score = _local1.score + value;
if (_local1.score < 0) {
_local1.score = 0;
}
}
function togglePause() {
if (paused) {
message.gotoAndPlay("unpaused");
} else {
message.gotoAndPlay("paused");
}
togglePauseSilent();
}
function togglePauseSilent() {
paused = !paused;
}
function getEncodedValue(v, key) {
var _local3 = key;
var _local1 = (v ^ _local3).toString();
var a = new Array();
a.push(_local3);
var _local2 = new Array();
i = 0;
while (i < _local1.length) {
_local2.push(_local1.charCodeAt(i) ^ _local3);
i++;
}
a.push(_local2.length ^ _local3);
a = a.concat(_local2);
return(a.join(","));
}
function getScoreEncoded() {
var key1 = random(16777215);
var _local3 = random(16777215);
while (_local3 == key1) {
_local3 = random(16777215);
}
var _local2 = random(16777215);
while ((_local2 == key1) || (_local2 == _local3)) {
_local2 = random(16777215);
}
var _local1 = random(16777215);
while (((_local1 == key1) || (_local1 == _local3)) || (_local1 == _local2)) {
_local1 = random(16777215);
}
var lev = (_root.level + (6 * _root.difficulty));
return(new Array(getEncodedValue(_root.score, key1), getEncodedValue(lev, _local3), getEncodedValue(_root.score, _local2), getEncodedValue(lev, _local1)));
}
function updateMouse() {
var _local2 = _root._xmouse;
var _local1 = _root._ymouse;
var _local3 = (((_local2 > 0) && (_local2 < 480)) && (_local1 > 0)) && (_local1 < 360);
if (_local3 != mouseInRect) {
if ((mouseInRect = _local3)) {
Mouse.hide();
cursor._visible = true;
} else {
Mouse.show();
cursor._visible = false;
}
}
cursor._x = _local2;
cursor._y = _local1;
}
function updateTitle() {
updateMouse();
}
function hideOffscreenStuff() {
ufo.gotoAndStop("dead");
ufo2.gotoAndStop("dead");
terran.gotoAndStop("dead");
terran3.gotoAndStop("dead");
fidbus.gotoAndStop("dead");
mine.gotoAndStop("dead");
mine2.gotoAndStop("dead");
boss.gotoAndStop("dead");
child.gotoAndStop("dead");
caskorange.gotoAndStop("dead");
caskred.gotoAndStop("dead");
caskyellow.gotoAndStop("dead");
caskblue.gotoAndStop("dead");
caskgreen.gotoAndStop("dead");
box.gotoAndStop("dead");
bullet1.gotoAndStop("dead");
bullet2.gotoAndStop("dead");
bullet3.gotoAndStop("dead");
bullet4.gotoAndStop("dead");
bulletcover.gotoAndStop("dead");
plasma.gotoAndStop("dead");
aimsrc.gotoAndStop("dead");
shiphpsrc.gotoAndStop("dead");
shipxpsrc.gotoAndStop("dead");
planethpsrc.gotoAndStop("dead");
weaponsrc.gotoAndStop("dead");
playersrc.gotoAndStop("dead");
asteroid.gotoAndStop("dead");
caskwhite.gotoAndStop("dead");
asteroid_sm.gotoAndStop("dead");
asteroid_tiny.gotoAndStop("dead");
}
function upgradeNumberToName(num) {
switch (num) {
case 1 :
return("armor");
case 2 :
return("bulletspeed");
case 3 :
return("clipsize");
case 4 :
return("experience");
case 5 :
return("explosion");
case 6 :
return("reload");
case 7 :
return("repair");
case 8 :
return("shipspeed");
case 9 :
return("shotspeed");
}
}
function buildingNumberToName(num) {
switch (Number(num)) {
case 1 :
return("upgrade1");
case 2 :
return("upgrade2");
case 3 :
return("upgrade3");
case 4 :
return("upgrade4");
case 5 :
return("upgrade5");
}
}
function playSound(snd) {
if (_root.soundEnabled) {
_root.sound.gotoAndPlay(snd);
}
}
function playMusic(snd) {
if (_root.musicEnabled) {
stopAllSounds();
_root.sound.gotoAndPlay(snd);
}
}
increasing = function (nm, steps, time, dir, size1, x1, y1, size2, x2, y2) {
var _local1 = size1;
var _local3 = time;
function process() {
nm._width = nm._width + dwidth;
nm._height = nm._height + dheight;
nm._x = (x1 + ((x2 - x1) / step)) + (((-nm._width) + width0) / 2);
nm._y = (y1 + ((y2 - y1) / step)) + (((-nm._height) + height0) / 2);
step++;
if (step == steps) {
clearInterval(interval);
_root.nextplay();
}
}
if (steps == undefined) {
steps = 10;
}
if (_local3 == undefined) {
_local3 = 1000;
}
if (_local1 == undefined) {
_local1 = 0;
}
if (x1 == undefined) {
x1 = nm._x;
}
if (y1 == undefined) {
y1 = nm._y;
}
if (size2 == undefined) {
size2 = 100;
}
if (x2 == undefined) {
x2 = nm._x;
}
if (y2 == undefined) {
y2 = nm._y;
}
if (dir == undefined) {
dir = "normal";
}
var step = 0;
var dwidth;
var dheight;
var width0 = nm._width;
var height0 = nm._height;
var _local2 = (size2 - _local1) / steps;
var step = 0;
nm._visible = true;
switch (dir) {
case "normal" :
dwidth = (_local2 * width0) / 100;
dheight = (_local2 * height0) / 100;
nm._width = nm._width * (_local1 / 100);
nm._height = nm._height * (_local1 / 100);
break;
case "toRight" :
break;
case "toLeft" :
break;
case "horisontal" :
dwidth = (_local2 * width0) / 100;
dheight = 0;
nm._width = nm._width * (_local1 / 100);
break;
case "toTop" :
break;
case "toBottom" :
break;
case "vertical" :
dwidth = 0;
dheight = (_local2 * height0) / 100;
nm._height = nm._height * (_local1 / 100);
}
nm._x = x1 + (((-nm._width) + width0) / 2);
nm._y = y1 + (((-nm._height) + height0) / 2);
var interval = setInterval(process, _local3 / steps);
};
var rootURL = "http://www.enkord.com/";
if (moreGamesURL == undefined) {
moreGamesURL = rootURL;
}
if (downloadURL == undefined) {
downloadURL = rootURL + "games/clashnslashworldsaway/download/";
}
if (orderURL == undefined) {
orderURL = rootURL + "product.php?action=order&product=clashnslashworldsaway&from=webversion";
}
if (hiscoreURL == undefined) {
hiscoreURL = rootURL + "games/clashnslashworldsaway/web/hiscore.php";
}
var _r;
var paused = false;
var curscreen = "none";
var curweapon = 0;
aimsrc.duplicateMovieClip("cursor", 15000);
var mouseState = false;
var prevMouseState = false;
var gameInit = true;
var score = 0;
var difficulty = 0;
var musicEnabled = true;
var soundEnabled = true;
var mouseInRect = ((((x > 0) && (x < 480)) && (y > 0)) && (y < 360));
if (mouseInRect) {
Mouse.hide();
}
hideOffscreenStuff();
cursor.gotoAndPlay("arrow");
_root.bg.gotoAndStop("space2");
Frame 4
playMusic("menumusic");
Frame 5
_quality = "high";
updateTitle();
_root.bg.gotoAndStop("space2");
play();
Frame 6
updateTitle();
gotoAndPlay ("titlerepeat");
Frame 7
function doInitLevel1() {
var _local1 = weapons[currentWeapon];
game.weapon = new WeaponClass(_local1.clp, _local1.cd, _local1.imc);
game.maxspawn = 20;
_root.curweapon = 0;
game.shipupgrades = true;
game.shipupgradeshint = true;
game.planetupgrades = false;
game.unlockedweapons = 1;
_root.bg.gotoAndStop("space1");
}
function doSpawnLevel1(count) {
var _local2 = count;
if (_local2 < 20) {
if (_local2 > 17) {
var _local1 = 0;
while (_local1 <= 1) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_SPREAD;
}
game.spawnOnscreen(0.2, mine, "entity", bonus);
_local1++;
}
}
var _local1 = 0;
while (_local1 < (((_local2 % 2) == 0) ? 1 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_SPREAD;
}
game.spawnOffscreen(0.2, ufo, bonus);
_local1++;
}
}
}
function doInitLevel2() {
var _local1 = weapons[currentWeapon];
game.weapon = new WeaponClass(_local1.clp, _local1.cd, _local1.imc);
game.maxspawn = 60;
_root.curweapon = 1;
game.shipupgrades = true;
game.planetupgradeshint = true;
game.unlockedweapons = 1;
_root.bg.gotoAndStop("space1");
}
function doSpawnLevel2(count) {
var _local1 = count;
if (_local1 == 0) {
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
}
if (_local1 < 20) {
if (_local1 > 17) {
var _local2 = 0;
while (_local2 <= (((_local1 % 2) == 0) ? 1 : 0)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_NUKE;
}
game.spawnOnscreen(0.2, mine, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 1 : 0)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_SLIME;
} else if (roll == 7) {
bonus = BONUS_ROCKET;
}
game.spawnOffscreen(0.25, terran, bonus, true);
_local2++;
}
} else if (_local1 < 40) {
if (_local1 > 37) {
var _local2 = 0;
while (_local2 <= (((_local1 % 2) == 0) ? 1 : 0)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
}
game.spawnOnscreen(0.2, mine, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll <= 9) {
bonus = BONUS_SLIME;
} else if (roll == 10) {
bonus = BONUS_ROCKET;
}
game.spawnOffscreen(0.2, ufo2, bonus);
_local2++;
}
} else if (_local1 < 60) {
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 1 : 0)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll == 8) {
bonus = BONUS_SLIME;
} else if (roll == 9) {
bonus = BONUS_ROCKET;
}
game.spawnOffscreen(0.3, ufo2, bonus);
_local2++;
}
game.spawnOffscreen(0.2, ufo, 0);
}
}
function doInitLevel3() {
var _local1 = weapons[currentWeapon];
game.weapon = new WeaponClass(_local1.clp, _local1.cd, _local1.imc);
_root.curweapon = 2;
game.maxspawn = 60;
game.shipupgrades = true;
game.unlockedweapons = 2;
_root.bg.gotoAndStop("space1");
}
function doSpawnLevel3(count) {
var _local2 = count;
if (_local2 < 20) {
if (_local2 == 0) {
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
}
game.spawnOnscreen(0.3, mine, "entity", 0);
if (_local2 > 10) {
game.spawnOnscreen(0.2, mine, "entity", 0);
}
} else if (_local2 < 40) {
var _local1 = 0;
while (_local1 < (((_local2 % 3) == 0) ? 3 : 2)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_SPREAD;
} else if (roll == 6) {
bonus = BONUS_ICE;
}
game.spawnOffscreen(0.2, ufo, bonus);
_local1++;
}
} else if (_local2 < 60) {
var _local1 = 0;
while (_local1 < (((_local2 % 3) == 0) ? 3 : 2)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_SPREAD;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll <= 10) {
bonus = BONUS_ICE;
} else if (roll <= 12) {
bonus = BONUS_ROCKET;
}
game.spawnOffscreen(0.3, ufo2, bonus);
_local1++;
}
}
}
function doInitLevel4() {
var _local1 = weapons[currentWeapon];
game.weapon = new WeaponClass(_local1.clp, _local1.cd, _local1.imc);
_root.curweapon = 2;
game.maxspawn = 60;
game.shipupgrades = true;
game.unlockedweapons = 3;
_root.bg.gotoAndStop("space2");
}
function doSpawnLevel4(count) {
var _local2 = count;
if (_local2 < 20) {
if (_local2 < 10) {
game.spawnOffscreen(0.6, asteroid_sm, 0);
}
if (_local2 > 15) {
var _local1 = 0;
while (_local1 <= 3) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_ICE;
}
game.spawnOnscreen(0.3, mine, "entity", bonus);
_local1++;
}
}
var _local1 = 0;
while (_local1 < (((_local2 % 2) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_SLIME;
}
game.spawnOffscreen(0.25, terran, bonus, true);
_local1++;
}
} else if (_local2 < 40) {
var _local1 = 0;
while (_local1 < (((_local2 % 2) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_EXPLOSION;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll <= 10) {
bonus = BONUS_ICE;
} else if (roll <= 12) {
bonus = BONUS_ROCKET;
}
game.spawnOffscreen(0.3, ufo2, bonus);
_local1++;
}
} else if (_local2 < 60) {
var _local1 = 0;
while (_local1 < (((_local2 % 3) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_EXPLOSION;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll <= 10) {
bonus = BONUS_SLIME;
} else if (roll <= 12) {
bonus = BONUS_ROCKET;
}
game.spawnOnscreen(0.3, mine2, bonus);
_local1++;
}
game.spawnOffscreen(0.3, ufo2, 0);
}
}
function doInitLevel5() {
var _local1 = weapons[currentWeapon];
game.weapon = new WeaponClass(_local1.clp, _local1.cd, _local1.imc);
game.weapon.isRocket = true;
_root.curweapon = 3;
game.maxspawn = 80;
game.unlockedweapons = 3;
_root.bg.gotoAndStop("space2");
}
function doSpawnLevel5(count) {
var _local1 = count;
if (_local1 == 0) {
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
game.spawnOnscreen(0.4, asteroid, "orbit");
}
if (_local1 < 20) {
if (_local1 < 5) {
game.spawnOnscreen(0.2, mine2, "entity", bonus);
}
if (_local1 > 17) {
var _local2 = 0;
while (_local2 <= 2) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_NUKE;
}
game.spawnOnscreen(0.2, mine, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 1 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_SPREAD;
}
game.spawnOffscreen(0.25, fidbus, bonus, true);
_local2++;
}
_local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 1 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_SPREAD;
}
game.spawnOffscreen(0.25, ufo, bonus);
_local2++;
}
} else if (_local1 < 40) {
if (_local1 > 37) {
var _local2 = 0;
while (_local2 <= (((_local1 % 3) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
}
game.spawnOnscreen(0.2, mine, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_EXPLOSION;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll <= 9) {
bonus = BONUS_ICE;
} else if (roll <= 12) {
bonus = BONUS_ROCKET;
}
game.spawnOffscreen(0.3, fidbus, bonus, true);
_local2++;
}
} else if (_local1 < 60) {
if (_local1 > 55) {
var _local2 = 0;
while (_local2 <= (((_local1 % 3) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
}
game.spawnOnscreen(0.3, mine2, bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 3) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_EXPLOSION;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll == 8) {
bonus = BONUS_SLIME;
}
game.spawnOffscreen(0.35, terran3, bonus, true);
_local2++;
}
game.spawnOffscreen(0.2, ufo, 0);
} else if (_local1 < 80) {
if (_local1 > 75) {
var _local2 = 0;
while (_local2 <= (((_local1 % 2) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_NUKE;
} else if (roll == 6) {
bonus = BONUS_SLIME;
}
game.spawnOnscreen(0.3, mine2, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_EXPLOSION;
} else if (roll == 7) {
bonus = BONUS_NUKE;
}
game.spawnOffscreen(0.3, ufo2, bonus);
_local2++;
}
game.spawnOffscreen(0.35, terran3, 0, true);
}
}
function doInitLevel6() {
var _local2 = _root;
var _local1 = weapons[currentWeapon];
game.weapon = new WeaponClass(_local1.clp, _local1.cd, _local1.imc);
_local2.curweapon = 0;
_local2.bossCounter = 55;
game.maxspawn = 60;
game.unlockedweapons = 3;
_local2.bg.gotoAndStop("space2");
}
function doSpawnLevel6(count) {
var _local1 = count;
if (_local1 < 20) {
if (_local1 > 17) {
var _local2 = 0;
while (_local2 <= 2) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_NUKE;
}
game.spawnOnscreen(0.2, mine, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 1 : 2)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_SPREAD;
}
game.spawnOffscreen(0.25, terran, bonus, true);
_local2++;
}
_local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 1 : 2)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
} else if (roll == 6) {
bonus = BONUS_SPREAD;
}
game.spawnOffscreen(0.25, fidbus, bonus, true);
_local2++;
}
} else if (_local1 < 40) {
if (_local1 > 37) {
var _local2 = 0;
while (_local2 <= (((_local1 % 3) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
}
game.spawnOnscreen(0.3, mine2, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 3 : 2)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_EXPLOSION;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll <= 9) {
bonus = BONUS_ICE;
} else if (roll <= 12) {
bonus = BONUS_ROCKET;
}
game.spawnOffscreen(0.3, ufo2, bonus);
_local2++;
}
} else if (_local1 < 60) {
if (_local1 == _root.bossCounter) {
game.spawnOnscreen(0.6, boss, "boss");
message.gotoAndPlay("killboss");
}
if (_local1 > 55) {
var _local2 = 0;
while (_local2 <= (((_local1 % 3) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_EXPLOSION;
}
game.spawnOnscreen(0.3, mine2, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 3) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_EXPLOSION;
} else if (roll == 7) {
bonus = BONUS_NUKE;
} else if (roll == 8) {
bonus = BONUS_SLIME;
}
_local2++;
}
game.spawnOffscreen(0.2, fidbus, 0, true);
} else if (_local1 < 200) {
if (_local1 > 75) {
var _local2 = 0;
while (_local2 <= (((_local1 % 2) == 0) ? 1 : 0)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll == 5) {
bonus = BONUS_NUKE;
} else if (roll == 6) {
bonus = BONUS_SLIME;
}
game.spawnOnscreen(0.3, mine2, "entity", bonus);
_local2++;
}
}
var _local2 = 0;
while (_local2 < (((_local1 % 2) == 0) ? 2 : 1)) {
bonus = 0;
roll = random(20);
if (roll < 5) {
bonus = BONUS_SCORE;
} else if (roll < 7) {
bonus = BONUS_EXPLOSION;
} else if (roll == 7) {
bonus = BONUS_NUKE;
}
_local2++;
}
game.spawnOffscreen(0.35, terran3, 0, true);
}
}
var level = 1;
levelNumber = 6;
score = 0;
noshoot = false;
upgrades = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
buildings = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
points = 0;
bossCounter = 0;
GUN = 0;
CANNON = 1;
SHRAPNEL = 2;
ROCKET = 3;
wPLASMA = 4;
gunWeapon = new Object();
gunWeapon.clp = 10;
gunWeapon.cd = 40;
gunWeapon.wName = "gun";
gunWeapon.wEnable = true;
gunWeapon.imc = bullet1;
cannonWeapon = new Object();
cannonWeapon.clp = 25;
cannonWeapon.cd = 12;
cannonWeapon.wName = "cannon";
cannonWeapon.wEnable = false;
cannonWeapon.imc = bullet2;
shrapnelWeapon = new Object();
shrapnelWeapon.clp = 8;
shrapnelWeapon.cd = 30;
shrapnelWeapon.wName = "shrapnel";
shrapnelWeapon.wEnable = false;
shrapnelWeapon.imc = bullet3;
rocketWeapon = new Object();
rocketWeapon.clp = 6;
rocketWeapon.cd = 40;
rocketWeapon.wName = "rocket";
rocketWeapon.wEnable = false;
rocketWeapon.imc = bullet4;
plasmaWeapon = new Object();
plasmaWeapon.clp = 10;
plasmaWeapon.cd = 50;
plasmaWeapon.wName = "plasma";
plasmaWeapon.wEnable = false;
plasmaWeapon.imc = plasma;
weapons = new Array();
weapons[GUN] = gunWeapon;
weapons[CANNON] = cannonWeapon;
weapons[SHRAPNEL] = shrapnelWeapon;
weapons[ROCKET] = rocketWeapon;
weapons[wPLASMA] = plasmaWeapon;
currentWeapon = GUN;
LisWords = [];
LisWords[1] = "I will help to manage things on the planet and improve it's defense capabilities. We have built Restoration Facilities that will improve planet self-repair";
LisWords[2] = "We have managed to build Defense Department that will improve planet defense";
LisWords[3] = "We have managed to build Support Facilities that will improve planet self-repair";
LisWords[4] = "We have managed to build Aircraft Carrier that will decrease respawn time of your ship";
LisWords[5] = "We have managed to build Starport that will decrease respawn time of your ship";
Instance of Symbol 594 MovieClip "message" in Frame 7
/* no clip actions */
Frame 8
function deg2rad(fVal) {
return((fVal * Math.PI) / 180);
}
function rad2deg(fVal) {
return(fVal * 57.2957795130823);
}
function getLength(x, y) {
return(Math.sqrt((x * x) + (y * y)));
}
function setLength(x, y, len) {
var _local2 = y;
var _local3 = x;
var _local1 = getLength(_local3, _local2);
if (_local1 < 1E-5) {
} else {
if (len > 1E-5) {
_local1 = _local1 / len;
_local3 = _local3 / _local1;
_local2 = _local2 / _local1;
} else {
_local3 = 0;
_local2 = 0;
}
return([_local3, _local2]);
}
return(undefined);
}
function EntityClass(x, y, imc) {
var _local1 = this;
imc.duplicateMovieClip("entity" + entityCounter, entityCounter);
_local1.mc = _root["entity" + entityCounter];
entityCounter++;
_local1.mc._x = x;
_local1.mc._y = y;
_local1.velocityX = 0;
_local1.velocityY = 0;
_local1.alive = true;
_local1.status = STATUS_NORMAL;
_local1.TYPE = "";
_local1.laststatus = 0;
_local1.bonus = 0;
}
function OrbitClass(x, y, imc) {
var _local1 = this;
imc.duplicateMovieClip("orbit" + entityCounter, entityCounter);
_local1.mc = _root["orbit" + entityCounter];
entityCounter++;
_local1.mc._x = x;
_local1.mc._y = y;
_local1.velocityX = 0;
_local1.velocityY = 0;
_local1.alive = true;
}
function BonusClass(x, y, fx, imc) {
super(x, y, imc);
this.effect = fx;
}
function PlayerClass(imc) {
var _local1 = this;
_local1.velocityX = 0;
_local1.velocityY = 0;
if (player) {
_local1.mc = player;
} else {
imc.duplicateMovieClip("player", guiDepth++);
_local1.mc = player;
}
_local1.maxhp = 18;
_local1.hp = _local1.maxhp;
_local1.lastdamage = 0;
_local1.lastrepair = 0;
_local1.damagepause = 40;
_local1.repairpause = 150;
_local1.respawnpause = respawnTime * 2;
}
function PlanetClass(imc) {
this.mc = imc;
this.velocityX = 0;
this.velocityY = 0;
this.maxhp = 200;
this.hp = this.maxhp;
this.lastregen = 0;
for (var i in game.buildings) {
var nm = eval ((this.mc._name + "/planet.upgrade") + i);
if (game.buildings[i]) {
nm.gotoAndStop("on");
}
}
}
function WeaponClass(clp, cd, imc) {
i = 1;
while (i <= 40) {
var obj = eval ("bulletcover" + i);
if (typeof(obj) == "movieclip") {
obj.removeMovieClip();
}
i++;
}
this.maxclip = clp;
this.clip = this.maxclip;
this.cooldown = cd;
this.lastshot = 0;
gui.clip.gotoAndPlay(this.clip + 2);
this.reloaded = 0;
this.mc = imc;
this.isShrapnel = false;
this.isRocket = false;
this.isPlasma = false;
if (_root.currentWeapon == SHRAPNEL) {
this.isShrapnel = true;
}
if (_root.currentWeapon == ROCKET) {
this.isRocket = true;
}
if (_root.currentWeapon == wPLASMA) {
this.isPlasma = true;
this.isShrapnel = true;
}
i = 1;
while (i <= 40) {
bulletcover.duplicateMovieClip("bulletcover" + i, 8000 + i);
var obj = _root["bulletcover" + i];
obj._x = 25 + (i * 12);
obj._y = 12;
obj._visible = i <= this.maxclip;
i++;
}
}
function GameClass() {
var _local1 = this;
_local1.objects = new Array();
_local1.bullets = new Array();
_local1.bonuses = new Array();
_local1.player = new PlayerClass(playersrc);
_local1.player.mc.swapDepths(8000);
_local1.frames = 0;
_local1.spawnCounter = 0;
_local1.upgrades = _root.upgrades;
_local1.shipupgrades = true;
_local1.shipupgradeshint = false;
_local1.planetupgrades = true;
_local1.planetupgradeshint = false;
_local1.buildings = buildings;
_local1.unlockedweapons = 3;
_local1.boss = null;
_local1.bossKilled = false;
}
var entityCounter = 100;
var tinyCounter = 0;
var orbitCounter = 0;
var orbitLength = 80;
var reloadTime = aimsrc.reload;
var reloadTimeUpgraded = aimsrc.reloadupgraded;
var respawnTime = aimsrc.respawn;
var guiDepth = 10000;
var levelCompleteMessageDisplayed = false;
var gameOverState = false;
var enemiesKilled = 0;
var bonusTaken = 0;
var shotsMade = 0;
CLEAN_PAUSE = 100;
SPAWN_PAUSE = 100;
_quality = "low";
_root.playMusic("gamemusic");
weaponsrc.duplicateMovieClip("weapon", guiDepth++);
weapon._x = 14;
weapon._y = 14;
message.currentleveltext = "LEVEL " + level;
i = 0;
while (i < difficulty) {
message.currentleveltext = message.currentleveltext + "*";
i++;
}
message.gotoAndPlay("level");
cursor.gotoAndStop("aim");
BONUS_EXPLOSION = 1;
BONUS_NUKE = 2;
BONUS_SPREAD = 3;
BONUS_ROCKET = 4;
BONUS_SCORE = 5;
BONUS_SLIME = 6;
BONUS_ICE = 7;
STATUS_NORMAL = 0;
STATUS_SLIME = 1;
STATUS_ICE = 2;
STATUS_PERIOD = 200;
var bonusmc = new Array();
bonusmc[BONUS_EXPLOSION] = caskorange;
bonusmc[BONUS_NUKE] = caskred;
bonusmc[BONUS_SPREAD] = caskyellow;
bonusmc[BONUS_ROCKET] = caskwhite;
bonusmc[BONUS_SCORE] = box;
bonusmc[BONUS_SLIME] = caskgreen;
bonusmc[BONUS_ICE] = caskblue;
SCORE_PLAYER_HIT_PENALTY = -500;
SCORE_PLAYER_DEATH_PENALTY = -5000;
SCORE_PLANET_HIT_PENALTY = -1000;
SCORE_SHOT_MISS_PENALTY = -50;
SCORE_SLIME_CATCH = 200;
SCORE_ICE_CATCH = 500;
SCORE_EXPLOSION_FACTOR = 8;
SCORE_NUKE_FACTOR = 4;
SCORE_SLIME_DEATH_FACTOR = 5;
SCORE_ICE_DEATH_FACTOR = 10;
SCORE_UPGRADE_FACTOR = 1.3;
shiphpsrc.duplicateMovieClip("shiphp", guiDepth++);
shiphp._x = 60;
shiphp._y = 344;
planethpsrc.duplicateMovieClip("planethp", guiDepth++);
planethp._x = 420;
planethp._y = 344;
setTiny = function (x, y, imc) {
imc.duplicateMovieClip("tiny" + entityCounter, entityCounter);
var _local1 = _root["tiny" + entityCounter];
entityCounter++;
_local1._x = x;
_local1._y = y;
};
mouseListener = new Object();
mouseListener.onMouseDown = function () {
mouseState = true;
};
mouseListener.onMouseUp = function () {
mouseState = false;
};
Mouse.addListener(mouseListener);
EntityClass.prototype.setMovement = function (x, y, vel) {
var _local2 = this;
var _local1 = setLength(x - _local2.mc._x, y - _local2.mc._y, vel);
_local2.velocityX = _local1[0];
_local2.velocityY = _local1[1];
};
EntityClass.prototype.update = function () {
var _local1 = this;
if (_local1.status != STATUS_NORMAL) {
if ((_local1.laststatus + STATUS_PERIOD) < game.frames) {
_local1.setStatus(STATUS_NORMAL);
}
if (_local1.status == STATUS_SLIME) {
_local1.mc._x = _local1.mc._x + (_local1.velocityX / 2);
_local1.mc._y = _local1.mc._y + (_local1.velocityY / 2);
}
} else {
_local1.mc._x = _local1.mc._x + _local1.velocityX;
_local1.mc._y = _local1.mc._y + _local1.velocityY;
}
};
EntityClass.prototype.die = function () {
var _local1 = this;
if (_local1.alive) {
var _local3 = _local1.mc.score;
if (_local1.status == STATUS_SLIME) {
_local3 = _local3 * SCORE_SLIME_DEATH_FACTOR;
} else if (_local1.status == STATUS_SLIME) {
_local3 = _local3 * SCORE_ICE_DEATH_FACTOR;
}
if (game.upgrades[4]) {
_local3 = _local3 * SCORE_UPGRADE_FACTOR;
}
adjustScore(Math.round(_local3));
_local1.mc.gotoAndPlay("decay");
} else {
_local1.mc.gotoAndPlay("dead");
}
_local1.alive = false;
if (_local1.bonus != 0) {
var obj = new BonusClass(_local1.mc._x, _local1.mc._y, _local1.bonus, bonusmc[_local1.bonus]);
game.addBonus(obj);
}
if (_local1.TYPE == "asteroid") {
var _local2 = 10;
setTiny(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_tiny);
setTiny(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_tiny);
setTiny(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_tiny);
}
};
EntityClass.prototype.dieSilent = function () {
this.alive = false;
this.mc.gotoAndPlay("dead");
};
EntityClass.prototype.setStatus = function (newstatus) {
var _local1 = this;
var _local2 = newstatus;
if (_local2 == STATUS_NORMAL) {
_local1.mc.gotoAndPlay("alive");
_local1.status = _local2;
_local1.laststatus = game.frames;
} else if (_local1.mc._currentframe == 1) {
_local1.status = _local2;
if (_local2 == STATUS_SLIME) {
_local1.mc.gotoAndPlay("slime");
} else {
_local1.mc.gotoAndPlay("ice");
}
_local1.laststatus = game.frames;
}
};
OrbitClass.prototype.setMovement = function (x, y, vel) {
var _local1 = this;
_local1.velocity = vel;
var _local3 = _local1.mc._x - planetsrc._x;
var _local2 = _local1.mc._y - planetsrc._y;
_local1.radius = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local1.w = _local1.velocity / _local1.radius;
_local1.fi = Math.asin(_local3 / _local1.radius);
if (_local2 < 0) {
_local1.fi = Math.PI - _local1.fi;
}
};
OrbitClass.prototype.update = function () {
var _local1 = this;
_local1.fi = _local1.fi + _local1.w;
var _local3 = planetsrc._x + (_local1.radius * Math.sin(_local1.fi));
var _local2 = planetsrc._y + (_local1.radius * Math.cos(_local1.fi));
_local1.mc._x = _local3;
_local1.mc._y = _local2;
};
OrbitClass.prototype.die = function () {
var _local1 = this;
if (_local1.alive) {
var _local3 = _local1.mc.score;
if (game.upgrades[4]) {
_local3 = _local3 * SCORE_UPGRADE_FACTOR;
}
adjustScore(Math.round(_local3));
_local1.mc.gotoAndPlay("decay");
var _local2 = 15;
setTiny(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_tiny);
setTiny(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_tiny);
setTiny(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_tiny);
obj = new EntityClass(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_sm);
obj.setMovement(_local1.mc._x, _local1.mc._y - _local2, _local1.velocity * (1 + (0.5 * difficulty)));
obj.mc._rotation = 0;
obj.TYPE = "asteroid";
game.addObject(obj);
obj = new EntityClass(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_sm);
obj.setMovement(_local1.mc._x - _local2, _local1.mc._y + _local2, _local1.velocity * (1 + (0.5 * difficulty)));
obj.mc._rotation = 225;
obj.TYPE = "asteroid";
game.addObject(obj);
obj = new EntityClass(_local1.mc._x + (((0.5 - Math.random()) * _local2) * 2), _local1.mc._y + (((0.5 - Math.random()) * _local2) * 2), asteroid_sm);
obj.setMovement(_local1.mc._x + _local2, _local1.mc._y + _local2, _local1.velocity * (1 + (0.5 * difficulty)));
obj.mc._rotation = 135;
obj.TYPE = "asteroid";
game.addObject(obj);
} else {
_local1.mc.gotoAndPlay("dead");
}
_local1.alive = false;
};
OrbitClass.prototype.dieSilent = function () {
this.alive = false;
this.mc.gotoAndPlay("dead");
};
BossClass = function (x, y, imc) {
var _local1 = this;
super(x, y, imc);
_local1.childmc = child;
_local1.PERIOD = 200;
_local1.lastBorn = game.frames;
_local1.hp = 200;
_local1.status = "normal";
};
BossClass.prototype = new OrbitClass();
BossClass.prototype.update = function () {
var _local1 = this;
super.update();
var x = (planetsrc._x + (_local1.radius * Math.sin(_local1.fi)));
var y = (planetsrc._y + (_local1.radius * Math.cos(_local1.fi)));
if ((_local1.lastBorn + _local1.PERIOD) < game.frames) {
_local1.lastBorn = game.frames;
var _local3 = 30;
var _local2 = new EntityClass(x + _local3, y + _local3, _local1.childmc);
_local2.setMovement(240, 180, 0.2 * (1 + (0.5 * difficulty)));
game.addObject(_local2);
}
};
BossClass.prototype.damage = function () {
var _local1 = this;
_local1.hp = _local1.hp - 1;
if ((_local1.hp <= 50) && (_local1.status != "damage2")) {
_local1.mc.explosion.play();
_local1.status = "damage2";
_local1.mc.ship.gotoAndStop("damage2");
} else if (((_local1.hp <= 100) && (_local1.status != "damage1")) && (_local1.status != "damage2")) {
_local1.mc.explosion.play();
_local1.status = "damage1";
_local1.mc.ship.gotoAndStop("damage1");
}
if (_local1.hp <= 0) {
_local1.die();
}
};
BossClass.prototype.die = function () {
var _local1 = this;
if (_local1.alive) {
var _local2 = _local1.mc.score;
if (game.upgrades[4]) {
_local2 = _local2 * SCORE_UPGRADE_FACTOR;
}
adjustScore(Math.round(_local2));
_local1.mc.gotoAndPlay("decay");
} else {
_local1.mc.gotoAndPlay("dead");
}
_local1.alive = false;
game.bossKilled = true;
};
BonusClass.prototype = new EntityClass();
BonusClass.prototype.die = function () {
var _local1 = this;
super.die();
if (_local1.effect == BONUS_EXPLOSION) {
for (i in game.bonuses) {
var _local2 = game.bonuses[i];
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 60))) && (_local2.mc._x < (_local1.mc._x + 60))) && (_local2.mc._y > (_local1.mc._y - 60))) && (_local2.mc._y < (_local1.mc._y + 60))) {
_local2.die();
}
if (_local1.mc.TYPE == "bonus") {
adjustScore(_local2.mc.score * SCORE_EXPLOSION_FACTOR);
}
}
for (i in game.objects) {
var _local2 = game.objects[i];
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 70))) && (_local2.mc._x < (_local1.mc._x + 70))) && (_local2.mc._y > (_local1.mc._y - 70))) && (_local2.mc._y < (_local1.mc._y + 70))) {
_local2.die();
}
if (_local1.mc.TYPE == "bonus") {
adjustScore(_local2.mc.score * SCORE_EXPLOSION_FACTOR);
}
}
var _local2 = game.boss;
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 70))) && (_local2.mc._x < (_local1.mc._x + 70))) && (_local2.mc._y > (_local1.mc._y - 70))) && (_local2.mc._y < (_local1.mc._y + 70))) {
_local2.damage();
}
if (_local1.mc.TYPE == "bonus") {
adjustScore(_local2.mc.score * SCORE_EXPLOSION_FACTOR);
}
} else if (_local1.effect == BONUS_NUKE) {
for (i in game.bonuses) {
var _local2 = game.bonuses[i];
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 90))) && (_local2.mc._x < (_local1.mc._x + 90))) && (_local2.mc._y > (_local1.mc._y - 90))) && (_local2.mc._y < (_local1.mc._y + 90))) {
_local2.die();
}
adjustScore(_local2.mc.score * SCORE_NUKE_FACTOR);
}
for (i in game.objects) {
var _local2 = game.objects[i];
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 100))) && (_local2.mc._x < (_local1.mc._x + 100))) && (_local2.mc._y > (_local1.mc._y - 100))) && (_local2.mc._y < (_local1.mc._y + 100))) {
_local2.die();
}
adjustScore(_local2.mc.score * SCORE_NUKE_FACTOR);
}
var _local2 = game.boss;
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 100))) && (_local2.mc._x < (_local1.mc._x + 100))) && (_local2.mc._y > (_local1.mc._y - 100))) && (_local2.mc._y < (_local1.mc._y + 100))) {
_local2.damage();
}
adjustScore(_local2.mc.score * SCORE_NUKE_FACTOR);
} else if (_local1.effect == BONUS_SPREAD) {
var _local2 = new EntityClass(_local1.mc._x, _local1.mc._y, plasma);
_local2.setMovement(_local1.mc._x - 10, _local1.mc._y, 7);
_local2.mc._rotation = 270;
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, plasma);
_local2.setMovement(_local1.mc._x + 10, _local1.mc._y, 7);
_local2.mc._rotation = 90;
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, plasma);
_local2.setMovement(_local1.mc._x, _local1.mc._y - 10, 7);
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, plasma);
_local2.setMovement(_local1.mc._x, _local1.mc._y + 10, 7);
_local2.mc._rotation = 180;
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, plasma);
_local2.setMovement(_local1.mc._x - 10, _local1.mc._y - 10, 7);
_local2.mc._rotation = -45;
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, plasma);
_local2.setMovement(_local1.mc._x + 10, _local1.mc._y - 10, 7);
_local2.mc._rotation = 45;
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, plasma);
_local2.setMovement(_local1.mc._x - 10, _local1.mc._y + 10, 7);
_local2.mc._rotation = 225;
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, plasma);
_local2.setMovement(_local1.mc._x + 10, _local1.mc._y + 10, 7);
_local2.mc._rotation = 135;
game.addBullet(_local2);
} else if (_local1.effect == BONUS_ROCKET) {
var _local2 = new EntityClass(_local1.mc._x, _local1.mc._y, bullet4);
_local2.setMovement(_local1.mc._x - 10, _local1.mc._y - 10, 7);
_local2.mc._rotation = -45;
_local2.effect = BONUS_EXPLOSION;
_local2.dieLikeBonus = BonusClass.prototype.die;
_local2.dieOld = EntityClass.prototype.die;
_local2.die = function () {
this.dieOld();
this.dieLikeBonus();
};
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, bullet4);
_local2.setMovement(_local1.mc._x + 10, _local1.mc._y - 10, 7);
_local2.mc._rotation = 45;
_local2.effect = BONUS_EXPLOSION;
_local2.dieLikeBonus = BonusClass.prototype.die;
_local2.dieOld = EntityClass.prototype.die;
_local2.die = function () {
this.dieOld();
this.dieLikeBonus();
};
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, bullet4);
_local2.setMovement(_local1.mc._x - 10, _local1.mc._y + 10, 7);
_local2.mc._rotation = 225;
_local2.effect = BONUS_EXPLOSION;
_local2.dieLikeBonus = BonusClass.prototype.die;
_local2.dieOld = EntityClass.prototype.die;
_local2.die = function () {
this.dieOld();
this.dieLikeBonus();
};
game.addBullet(_local2);
_local2 = new EntityClass(_local1.mc._x, _local1.mc._y, bullet4);
_local2.setMovement(_local1.mc._x + 10, _local1.mc._y + 10, 7);
_local2.mc._rotation = 135;
_local2.effect = BONUS_EXPLOSION;
_local2.dieLikeBonus = BonusClass.prototype.die;
_local2.dieOld = EntityClass.prototype.die;
_local2.die = function () {
this.dieOld();
this.dieLikeBonus();
};
game.addBullet(_local2);
} else if (_local1.effect == BONUS_SLIME) {
for (i in game.objects) {
var _local2 = game.objects[i];
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 90))) && (_local2.mc._x < (_local1.mc._x + 90))) && (_local2.mc._y > (_local1.mc._y - 90))) && (_local2.mc._y < (_local1.mc._y + 90))) {
_local2.setStatus(STATUS_SLIME);
}
adjustScore(SCORE_SLIME_CATCH);
}
} else if (_local1.effect == BONUS_ICE) {
for (i in game.objects) {
var _local2 = game.objects[i];
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 90))) && (_local2.mc._x < (_local1.mc._x + 90))) && (_local2.mc._y > (_local1.mc._y - 90))) && (_local2.mc._y < (_local1.mc._y + 90))) {
_local2.setStatus(STATUS_ICE);
}
adjustScore(SCORE_ICE_CATCH);
}
}
};
PlayerClass.prototype = new EntityClass();
PlayerClass.prototype.update = function () {
var _local1 = this;
if (_local1.hp <= 0) {
var resp = _local1.respawnpause;
if (game.buildings[4]) {
if (game.buildings[5]) {
resp = resp * 0.5;
} else {
resp = resp * 0.75;
}
}
if ((_local1.lastdamage + resp) < game.frames) {
_local1.hp = _local1.maxhp;
_local1.mc.gotoAndPlay("respawn");
shiphp.bar._xscale = 100;
}
} else {
if (game.upgrades[7] && ((_local1.lastrepair + _local1.repairpause) < game.frames)) {
_local1.hp++;
if (_local1.hp > _local1.maxhp) {
_local1.hp = _local1.maxhp;
}
shiphp.bar._xscale = (_local1.hp / _local1.maxhp) * 100;
_local1.lastrepair = game.frames;
}
var _local2 = _xmouse - _local1.mc._x;
var _local3 = _ymouse - _local1.mc._y;
var distance = getLength(_local2, _local3);
var vel;
if (distance > 100) {
var fvel = ((distance - 100) / 20);
if (fvel > 2) {
fvel = 2;
}
if (game.upgrades[8]) {
fvel = fvel * 2;
}
vel = setLength(_local2, _local3, fvel);
} else {
vel = [0, 0];
}
_local1.velocityX = vel[0];
_local1.velocityY = vel[1];
super.update();
_local2 = _local1.mc._x - planetsrc._x;
_local3 = _local1.mc._y - planetsrc._y;
var len = setLength(_local2, _local3, orbitLength);
_local2 = len[0] + planetsrc._x;
_local3 = len[1] + planetsrc._y;
_local1.mc._x = _local2;
_local1.mc._y = _local3;
if (distance > 5) {
_local2 = _root._xmouse - _local2;
_local3 = _root._ymouse - _local3;
if (_local2 > 0.01) {
var deg = Math.atan(_local3 / _local2);
_local1.mc._rotation = (deg * 180) / Math.PI;
} else if (_local2 < -0.01) {
var deg = Math.atan(_local3 / _local2);
_local1.mc._rotation = 180 + ((deg * 180) / Math.PI);
} else if (_local3 > 0) {
_local1.mc._rotation = 90;
} else {
_local1.mc._rotation = -90;
}
}
}
};
PlayerClass.prototype.damage = function () {
var _local1 = this;
if ((_local1.hp <= 0) || ((_local1.lastdamage + _local1.damagepause) > game.frames)) {
} else {
_local1.mc.gotoAndPlay("damage");
_local1.lastdamage = game.frames;
if (game.upgrades[1]) {
_local1.hp = _local1.hp - 2;
} else {
_local1.hp = _local1.hp - 3;
}
shiphp.bar._xscale = (_local1.hp / _local1.maxhp) * 100;
if (_local1.hp <= 0) {
_local1.mc.gotoAndPlay("decay");
if (game.buildings[4]) {
if (game.buildings[5]) {
cursor.gotoAndPlay("respawn2");
} else {
cursor.gotoAndPlay("respawn1");
}
} else {
cursor.gotoAndPlay("respawn");
}
adjustScore(SCORE_PLAYER_DEATH_PENALTY);
if (game.upgrades[5]) {
for (i in game.bonuses) {
var _local2 = game.bonuses[i];
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 100))) && (_local2.mc._x < (_local1.mc._x + 100))) && (_local2.mc._y > (_local1.mc._y - 100))) && (_local2.mc._y < (_local1.mc._y + 100))) {
_local2.die();
}
adjustScore(_local2.mc.score * SCORE_NUKE_FACTOR);
}
for (i in game.objects) {
var _local2 = game.objects[i];
if ((((_local2.alive && (_local2.mc._x > (_local1.mc._x - 100))) && (_local2.mc._x < (_local1.mc._x + 100))) && (_local2.mc._y > (_local1.mc._y - 100))) && (_local2.mc._y < (_local1.mc._y + 100))) {
_local2.die();
}
adjustScore(_local2.mc.score * SCORE_NUKE_FACTOR);
}
}
} else {
adjustScore(SCORE_PLAYER_HIT_PENALTY);
}
}
};
PlanetClass.prototype = new EntityClass();
PlanetClass.prototype.update = function () {
var _local1 = this;
if ((_local1.lastregen + 100) < game.frames) {
_local1.lastregen = game.frames;
var _local2 = 0;
if (game.buildings[1]) {
_local2 = _local2 + 1;
}
if (game.buildings[3]) {
_local2 = _local2 + 3;
}
if (game.buildings[8]) {
_local2 = _local2 + 3;
}
if (game.buildings[9]) {
_local2 = _local2 + 2;
}
_local1.hp = _local1.hp + _local2;
if (_local1.hp > _local1.maxhp) {
_local1.hp = _local1.maxhp;
}
planethp.bar._xscale = (_local1.hp / _local1.maxhp) * 100;
}
};
PlanetClass.prototype.damage = function () {
var _local1 = this;
if ((_local1.hp <= 0) || ((_local1.lastdamage + _local1.damagepause) > game.frames)) {
} else {
var _local2 = 20;
if (game.buildings[1]) {
_local2 = _local2 - 2;
}
if (game.buildings[2]) {
_local2 = _local2 - 3;
}
if (game.buildings[7]) {
_local2 = _local2 - 3;
}
if (game.buildings[9]) {
_local2 = _local2 - 1;
}
_local1.hp = _local1.hp - _local2;
planethp.bar._xscale = (_local1.hp / _local1.maxhp) * 100;
if (_local1.hp <= 0) {
_local1.mc.gotoAndPlay("decay");
}
adjustScore(SCORE_PLANET_HIT_PENALTY);
}
};
WeaponClass.prototype.shoot = function () {
var _local1 = this;
var _local2 = _local1.cooldown;
if (game.upgrades[9]) {
_local2 = _local2 * 0.75;
}
if ((_local1.lastshot + _local2) > game.frames) {
return(false);
}
if (_local1.clip > 0) {
_root["bulletcover" + _local1.clip]._visible = false;
_local1.clip--;
if (_local1.clip <= 0) {
_local1.reload();
}
_local1.lastshot = game.frames;
return(true);
}
return(false);
};
WeaponClass.prototype.reload = function () {
if (game.upgrades[6]) {
this.reloaded = game.frames + (reloadTimeUpgraded * 2);
cursor.gotoAndPlay("reloadupgraded");
_root.playSound("reload");
} else {
this.reloaded = game.frames + (reloadTime * 2);
cursor.gotoAndPlay("reload");
_root.playSound("reload");
}
};
WeaponClass.prototype.update = function () {
var _local1 = this;
var _local2 = _root;
if ((_local1.clip <= 0) && (_local1.reloaded <= game.frames)) {
_local1.clip = Math.round(_local1.maxclip * (game.upgrades[3] ? 1.3 : 1));
i = 1;
while (i <= _local1.clip) {
_local2["bulletcover" + i]._visible = true;
i++;
}
}
};
WeaponClass.prototype.remove = function () {
var _local1 = this;
var _local2 = _root;
i = 1;
while (i <= _local1.clip) {
_local2["bulletcover" + i].removeMovieClip();
i++;
}
};
GameClass.prototype.init = function () {
_root["doInitLevel" + level]();
this.planet = new PlanetClass(planetsrc);
};
GameClass.prototype.addObject = function (obj) {
this.objects.push(obj);
};
GameClass.prototype.addBullet = function (bul) {
this.bullets.push(bul);
};
GameClass.prototype.addBonus = function (bon) {
this.bonuses.push(bon);
};
GameClass.prototype.isGameOver = function () {
var _local1 = this;
return((_local1.objects.length > 0) && (_local1.planet.mc._currentframe == _local1.planet.mc._totalframes));
};
GameClass.prototype.cleanUp = function () {
var _local1 = this;
for (i in _local1.objects) {
_local1.objects[i].dieSilent();
}
for (i in _local1.bonuses) {
_local1.bonuses[i].dieSilent();
}
for (i in _local1.bullets) {
_local1.bullets[i].dieSilent();
}
planethp.removeMovieClip();
shiphp.removeMovieClip();
_root.weapon.removeMovieClip();
_local1.weapon.remove();
_local1.clean();
_local1.boss.dieSilent();
};
GameClass.prototype.gameOver = function () {
this.cleanUp();
cursor.gotoAndPlay("arrow");
gameOverState = true;
this.player.mc.removeMovieClip();
};
GameClass.prototype.levelComplete = function () {
this.cleanUp();
level++;
if ((!difficulty) || ((difficulty == 1) && (level <= 4))) {
points++;
}
};
GameClass.prototype.update = function () {
var _local1 = this;
updateMouse();
if (_root.paused) {
} else {
_local1.player.update();
_local1.weapon.update();
_local1.planet.update();
for (i in _local1.objects) {
var _local3 = _local1.objects[i];
_local3.update();
if (_local3.alive) {
if (_local3.mc.hit.hitTest(_local1.player.mc.hit)) {
_local1.player.damage();
} else if (_local3.mc.hit.hitTest(_local1.planet.mc.hit)) {
_local1.planet.damage();
_local3.die();
}
}
}
for (i in _local1.bonuses) {
_local1.bonuses[i].update();
}
for (i in _local1.bullets) {
var _local2 = _local1.bullets[i];
if (_local2.alive) {
_local2.update();
if ((((_local2.mc._x < -20) || (_local2.mc._x > 500)) || (_local2.mc._y < -20)) || (_local2.mc._y > 380)) {
_local2.dieSilent();
var penalty = SCORE_SHOT_MISS_PENALTY;
if (_local1.weapon.isPlasma) {
penalty = penalty / 5;
} else if (_local1.weapon.isShrapnel) {
penalty = penalty / 3;
}
adjustScore(Math.round(penalty));
} else if ((game.frames % 5) == 0) {
for (j in _local1.bonuses) {
var bon = _local1.bonuses[j];
if (bon.alive && (bon.mc.hit.hitTest(_local2.mc._x, _local2.mc._y, false))) {
bon.die();
bonusTaken++;
_local2.die();
break;
}
}
for (j in _local1.objects) {
var _local3 = _local1.objects[j];
if (_local3.alive && (_local3.mc.hit.hitTest(_local2.mc._x, _local2.mc._y, false))) {
_local3.die();
enemiesKilled++;
_local2.die();
break;
}
}
if (_local1.boss != null) {
var _local3 = _local1.boss;
if (_local3.alive && (_local3.mc.hit.hitTest(_local2.mc._x, _local2.mc._y, false))) {
_local3.damage();
_local2.die();
break;
}
}
}
}
}
if (_local1.boss != null) {
_local1.boss.update();
}
if (_local1.isGameOver()) {
_local1.gameOver();
}
_local1.frames++;
if ((_local1.frames % CLEAN_PAUSE) == 0) {
_local1.clean();
}
if ((_local1.frames % SPAWN_PAUSE) == 1) {
_root["doSpawnLevel" + level](_local1.spawnCounter++);
}
}
};
GameClass.prototype.clean = function () {
var _local2 = this;
var obj = new Array();
for (i in _local2.objects) {
var _local1 = _local2.objects[i];
if ((_local1.alive || ((_local1.mc._currentframe != _local1.mc._totalframes) && (_local1.mc._currentframe != 1))) && ((((_local1.mc._x > -50) && (_local1.mc._x < 530)) && (_local1.mc._y > -50)) && (_local1.mc._y < 410))) {
obj.push(_local1);
} else {
_local1.mc.removeMovieClip();
}
}
_local2.objects = obj;
var bon = new Array();
for (i in _local2.bonuses) {
var _local3 = _local2.bonuses[i];
if (_local3.alive || (_local3.mc._currentframe < _local3.mc._totalframes)) {
bon.push(_local3);
} else {
_local3.mc.removeMovieClip();
}
}
_local2.bonuses = bon;
var bul = new Array();
for (i in _local2.bullets) {
var _local3 = _local2.bullets[i];
if (_local3.alive || (_local3.mc._currentframe < _local3.mc._totalframes)) {
bul.push(_local3);
} else {
_local3.mc.removeMovieClip();
}
}
_local2.bullets = bul;
if ((!_local2.boss.alive) && (_local2.boss.mc._currentframe == _local2.boss.mc._totalframes)) {
_local2.boss.mc.removeMovieClip();
_local2.boss = null;
}
};
GameClass.prototype.shootAt = function (x, y) {
var _local1 = this;
if ((_local1.player.hp <= 0) || (!_local1.weapon.shoot())) {
} else {
shotsMade++;
_local1.player.mc.gotoAndPlay("shot");
var _local3 = x - _local1.player.mc._x;
var _local2 = y - _local1.player.mc._y;
var dr = 10;
var angle = 0;
var s = Math.sin(angle);
var c = Math.cos(angle);
var nx = ((_local3 * c) + (_local2 * s));
var obj = new EntityClass(_local1.player.mc._x + (nx / dr), _local1.player.mc._y + ((((-_local3) * s) + (_local2 * c)) / dr), _local1.weapon.mc);
var bulletspeed = 5;
if (_local1.upgrades[2]) {
bulletspeed = bulletspeed + 2;
}
obj.setMovement(x, y, bulletspeed);
game.addBullet(obj);
if (_local1.weapon.isShrapnel) {
var angle = 0.2;
if (_local1.weapon.isPlasma) {
var angle = 0.1;
}
var s = Math.sin(angle);
var c = Math.cos(angle);
var nx = ((_local3 * c) + (_local2 * s));
var obj = new EntityClass(_local1.player.mc._x + (nx / dr), _local1.player.mc._y + ((((-_local3) * s) + (_local2 * c)) / dr), _local1.weapon.mc);
obj.setMovement(nx + _local1.player.mc._x, (((-_local3) * s) + (_local2 * c)) + _local1.player.mc._y, bulletspeed);
obj.mc._xscale = 80;
obj.mc._yscale = 80;
game.addBullet(obj);
var angle = -0.2;
if (_local1.weapon.isPlasma) {
var angle = -0.1;
}
var s = Math.sin(angle);
var c = Math.cos(angle);
var nx = ((_local3 * c) + (_local2 * s));
var obj = new EntityClass(_local1.player.mc._x + (nx / dr), _local1.player.mc._y + ((((-_local3) * s) + (_local2 * c)) / dr), _local1.weapon.mc);
obj.setMovement(nx + _local1.player.mc._x, (((-_local3) * s) + (_local2 * c)) + _local1.player.mc._y, bulletspeed);
obj.mc._xscale = 80;
obj.mc._yscale = 80;
game.addBullet(obj);
if (_local1.weapon.isPlasma) {
var angle = 0.05;
var s = Math.sin(angle);
var c = Math.cos(angle);
var nx = ((_local3 * c) + (_local2 * s));
var obj = new EntityClass(_local1.player.mc._x, _local1.player.mc._y, _local1.weapon.mc);
obj.setMovement(nx + _local1.player.mc._x, (((-_local3) * s) + (_local2 * c)) + _local1.player.mc._y, bulletspeed);
obj.mc._xsscale = 80;
obj.mc._yscale = 80;
game.addBullet(obj);
var angle = -0.05;
var s = Math.sin(angle);
var c = Math.cos(angle);
var nx = ((_local3 * c) + (_local2 * s));
var obj = new EntityClass(_local1.player.mc._x, _local1.player.mc._y, _local1.weapon.mc);
obj.setMovement(nx + _local1.player.mc._x, (((-_local3) * s) + (_local2 * c)) + _local1.player.mc._y, bulletspeed);
obj.mc._xscale = 80;
obj.mc._yscale = 80;
game.addBullet(obj);
}
} else if (_local1.weapon.isRocket) {
obj.mc._rotation = rad2deg(Math.atan2(y - _local1.player.mc._y, x - _local1.player.mc._x)) + 90;
obj.effect = BONUS_EXPLOSION;
obj.dieLikeBonus = BonusClass.prototype.die;
obj.dieOld = EntityClass.prototype.die;
obj.die = function () {
this.dieOld();
this.dieLikeBonus();
};
}
}
};
GameClass.prototype.spawnOffscreen = function (vel, mc, bonus, orient) {
var _local3 = 0;
var _local2 = 0;
switch (Math.floor(Math.random() * 4)) {
case 0 :
_local3 = -20;
_local2 = Math.random() * 360;
break;
case 1 :
_local3 = 500;
_local2 = Math.random() * 360;
break;
case 2 :
_local3 = Math.random() * 480;
_local2 = -20;
break;
case 3 :
_local3 = Math.random() * 480;
_local2 = 380;
}
if ((_local3 < 50) && (_local2 < 50)) {
_local3 = Math.random() * 480;
_local2 = 380;
}
var _local1 = new EntityClass(_local3, _local2, mc);
_local1.bonus = bonus;
if (mc == asteroid_sm) {
_local1.TYPE = "asteroid";
}
_local1.setMovement(240, 180, vel * (1 + (0.5 * difficulty)));
if ((orient != undefined) && (orient)) {
_local1.mc._rotation = rad2deg(Math.atan2(180 - _local1.mc._y, 240 - _local1.mc._x)) + 90;
}
this.addObject(_local1);
};
GameClass.prototype.spawnOnscreen = function (vel, mc, type, bonus) {
var _local2 = 0;
var _local1 = 0;
switch (Math.floor(Math.random() * 4)) {
case 0 :
_local2 = 20 + (Math.random() * 110);
_local1 = 20 + (Math.random() * 320);
break;
case 1 :
_local2 = 460 - (Math.random() * 110);
_local1 = 20 + (Math.random() * 320);
break;
case 2 :
_local2 = 20 + (Math.random() * 440);
_local1 = 20 + (Math.random() * 50);
break;
case 3 :
_local2 = 20 + (Math.random() * 440);
_local1 = 340 - (Math.random() * 50);
}
if ((_local2 < 50) && (_local1 < 50)) {
_local2 = Math.random() * 480;
_local1 = 380;
}
switch (type) {
case "entity" :
var _local3 = new EntityClass(_local2, _local1, mc);
_local3.bonus = bonus;
this.addObject(_local3);
break;
case "boss" :
_local3 = new BossClass(_local2, _local1, mc);
this.boss = _local3;
break;
case "orbit" :
_local3 = new OrbitClass(_local2, _local1, mc);
this.addObject(_local3);
}
_local3.setMovement(240, 180, vel * (1 + (0.5 * difficulty)));
_local3.mc.gotoAndPlay("zoom");
};
var game = new GameClass();
game.init();
if (gameInit) {
gameInit = false;
} else {
hideOffscreenStuff();
}
Frame 9
game.update();
if ((!Key.isDown(32)) && (prevSpace)) {
if (_root.curscreen == "none") {
togglePause();
}
}
prevSpace = Key.isDown(32);
if (mouseState && (!paused)) {
canshoot = true;
if (canshoot) {
game.shootAt(_root._xmouse, _root._ymouse);
}
}
prevMouseState = mouseState;
if (!paused) {
_quality = "low";
var nextlevel = false;
if (gameOverState) {
game.planet.mc.gotoAndPlay("normal");
_root.playMusic("menumusic");
gotoAndPlay ("gameover");
} else {
if (((game.objects.length == 0) || (game.bossKilled)) && (game.frames > (game.maxspawn * SPAWN_PAUSE))) {
if (levelCompleteMessageDisplayed) {
if (message._currentframe == 1) {
game.levelComplete();
nextlevel = true;
}
} else {
levelCompleteMessageDisplayed = true;
message.gotoAndPlay("complete");
}
}
if (nextlevel) {
_root.playMusic("menumusic");
game.player.mc.removeMovieClip();
cursor.gotoAndStop("arrow");
gotoAndPlay ("finishlevel");
} else {
play();
}
}
}
Frame 10
game.update();
gotoAndPlay ("game");
Frame 11
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space2");
qenemies = enemiesKilled;
qbonuses = bonusTaken;
qshots = shotsMade;
buildings[level - 1] = true;
wordsofLiz.words.gotoAndStop("none");
var i = 0;
while (i < (level - 1)) {
planetsrc.planet[buildingNumberToName(i)].gotoAndStop("on");
i++;
}
play();
toPause = function () {
switch (level) {
case 2 :
gotoAndPlay ("levelpause1");
return;
case 3 :
gotoAndPlay ("levelpause2");
return;
case 4 :
gotoAndPlay ("levelpause3");
return;
case 5 :
gotoAndPlay ("levelpause4");
return;
case 6 :
gotoAndPlay ("levelpause5");
return;
case 7 :
gotoAndPlay ("complete");
}
};
words = upgradeTexts[level - 1];
max = 4;
nextplay = function () {
if (i <= max) {
nm = eval ("m" + i);
increasing(nm, 10, 200);
} else if ((!difficulty) && (level <= levelNumber)) {
LizSpeaking();
planetsrc.planet[buildingNumberToName(level - 1)].gotoAndPlay("turn");
}
i++;
};
i = 1;
while (i <= max) {
nm = eval ("m" + i);
nm._visible = false;
i++;
}
LizSpeaking = function () {
if (!difficulty) {
var _local1 = level - 1;
var _local2 = "upg" + _local1;
wordsofLiz.gotoAndPlay("on");
wordsofLiz.words.gotoAndPlay(_local2);
}
if (level <= 6) {
lizface.gotoAndPlay("on");
}
};
i = 1;
nextplay();
Frame 12
updateMouse();
play();
Frame 13
updateMouse();
gotoAndPlay ("flrepeat");
Frame 14
_quality = "high";
updateMouse();
cursor.gotoAndStop("arrow");
_root.bg.gotoAndStop("space2");
play();
setUpgrades = function () {
for (var i in _root.weapons) {
var nm = eval ("weapon" + i);
nm.active._visible = false;
if (weapons[i].wEnable) {
nm.enabled = true;
nm.gotoAndStop("enable");
} else {
nm.enabled = false;
nm.gotoAndStop("disable");
}
}
var nm = eval ("weapon" + currentWeapon);
nm.active._visible = true;
for (var i in _root.upgrades) {
var nm = eval ("upgrade" + i);
nm.gotoAndStop("enable");
nm.active._visible = _root.upgrades[i];
if (_root.points) {
if (!_root.upgrades[i]) {
nm.enabled = true;
nm.gotoAndStop("enable");
}
} else if (!_root.upgrades[i]) {
nm.enabled = false;
nm.gotoAndStop("disable");
}
}
freepoints = points;
};
setUpgrades();
if (!difficulty) {
if (level < 5) {
upgrade1._visible = false;
upgrade2._visible = false;
upgrade3._visible = false;
upgrade4._visible = false;
upgrade5._visible = false;
upgrade6._visible = false;
upgrade7._visible = false;
upgrade8._visible = false;
upgrade9._visible = false;
upgrade10._visible = false;
}
if (level == 2) {
weapons[CANNON].wEnable = true;
var nm = eval ("weapon" + CANNON);
nm.gotoAndPlay("open");
nm.enabled = true;
currentWeapon = CANNON;
upgrade2._visible = true;
upgrade3._visible = true;
upgrade4._visible = true;
upgrade2.gotoAndPlay("open");
upgrade3.gotoAndPlay("open");
upgrade4.gotoAndPlay("open");
upgrade2.enabled = true;
upgrade3.enabled = true;
upgrade4.enabled = true;
}
if (level == 3) {
weapons[SHRAPNEL].wEnable = true;
var nm = eval ("weapon" + SHRAPNEL);
nm.gotoAndPlay("open");
nm.enabled = true;
upgrade1._visible = true;
upgrade2._visible = true;
upgrade3._visible = true;
upgrade4._visible = true;
upgrade5._visible = true;
upgrade1.gotoAndPlay("open");
upgrade5.gotoAndPlay("open");
upgrade1.enabled = true;
upgrade5.enabled = true;
}
if (level == 4) {
weapons[ROCKET].wEnable = true;
var nm = eval ("weapon" + ROCKET);
nm.gotoAndPlay("open");
nm.enabled = true;
upgrade1._visible = true;
upgrade2._visible = true;
upgrade3._visible = true;
upgrade4._visible = true;
upgrade5._visible = true;
upgrade6._visible = true;
upgrade8._visible = true;
upgrade6.gotoAndPlay("open");
upgrade8.gotoAndPlay("open");
upgrade6.enabled = true;
upgrade8.enabled = true;
}
if (level == 5) {
weapons[wPLASMA].wEnable = true;
var nm = eval ("weapon" + wPLASMA);
nm.gotoAndPlay("open");
nm.enabled = true;
}
}
for (var i in _root.upgrades) {
var nm = eval ("upgrade" + i);
nm.light._visible = false;
}
for (var i in _root.weapons) {
var nm = eval ("weapon" + i);
nm.light._visible = false;
}
Instance of Symbol 645 MovieClip "upgrade1" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint1.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 648 MovieClip "upgrade2" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint2.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 651 MovieClip "upgrade3" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint3.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 654 MovieClip "upgrade4" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint4.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 657 MovieClip "upgrade5" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint5.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 660 MovieClip "upgrade6" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint6.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 663 MovieClip "upgrade7" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint7.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 666 MovieClip "upgrade8" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint8.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 669 MovieClip "upgrade9" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hint9.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.upgrades[_name.charAt(7)] = !_root.upgrades[_name.charAt(7)];
if (_root.upgrades[_name.charAt(7)]) {
_root.points--;
} else {
_root.points++;
}
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 673 MovieClip "weapon4" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hintw4.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.currentWeapon = this._name.charAt(6);
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 676 MovieClip "weapon3" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hintw3.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.currentWeapon = this._name.charAt(6);
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 679 MovieClip "weapon2" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hintw2.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.currentWeapon = this._name.charAt(6);
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Instance of Symbol 682 MovieClip "weapon1" in Frame 14
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
light._visible = true;
_root.hintw1.duplicateMovieClip("hint", _root.getNextHighestDepth());
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
_root.hint.removeMovieClip();
}
on (release) {
_root.playSound("mouseclick");
_root.currentWeapon = this._name.charAt(6);
_root.setUpgrades();
}
on (releaseOutside) {
_root.cursor.gotoAndPlay("arrow");
light._visible = false;
}
Frame 15
updateMouse();
hint._x = _xmouse + 20;
hint._y = _ymouse + 20;
play();
Frame 16
updateMouse();
gotoAndPlay ("shoprepeat");
Frame 17
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space1");
play();
Frame 18
nameinput.onSetFocus = function (oldFocus) {
if (this.text == "Your name here") {
this.text = "";
}
};
updateMouse();
gotoAndPlay ("complete");
Frame 19
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space2");
play();
Frame 20
nameinput.onSetFocus = function (oldFocus) {
if (this.text == "Your name here") {
this.text = "";
}
};
updateMouse();
gotoAndPlay ("gameover");
Frame 21
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space1");
play();
Frame 22
nameinput.onSetFocus = function (oldFocus) {
if (this.text == "Your name here") {
this.text = "";
}
};
updateMouse();
gotoAndPlay ("levelpause");
Frame 23
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space1");
play();
Frame 24
updateMouse();
gotoAndPlay ("levelpause2");
Frame 25
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space1");
play();
Frame 26
updateMouse();
gotoAndPlay ("levelpause1");
Frame 27
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space1");
play();
Frame 28
updateMouse();
gotoAndPlay ("levelpause4");
Frame 29
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space1");
play();
Frame 30
updateMouse();
gotoAndPlay ("levelpause3");
Frame 31
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space1");
play();
Frame 32
updateMouse();
gotoAndPlay ("levelpause5");
Frame 33
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space2");
max = 8;
nextflag = false;
nextplay = function () {
if (nextflag) {
gotoAndPlay ("comix2");
}
if ((i <= max) && (!nextflag)) {
nm = eval ("m" + i);
increasing(nm, 10, 200);
} else {
nextflag = true;
}
i++;
};
i = 0;
while (i <= max) {
nm = eval ("m" + i);
nm._visible = false;
i++;
}
i = 0;
nextplay();
Frame 34
updateMouse();
Frame 35
updateMouse();
gotoAndPlay ("comix1repeat");
Frame 36
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space2");
max = 7;
nextflag = false;
nextplay = function () {
if (nextflag) {
gotoAndPlay ("comix3");
}
if ((i <= max) && (!nextflag)) {
nm = eval ("m" + i);
increasing(nm, 10, 200);
} else {
nextflag = true;
}
i++;
};
i = 0;
while (i <= max) {
nm = eval ("m" + i);
nm._visible = false;
i++;
}
i = 0;
nextplay();
Frame 37
updateMouse();
Frame 38
updateMouse();
gotoAndPlay ("comix2repeat");
Frame 39
_quality = "high";
updateMouse();
_root.bg.gotoAndStop("space2");
max = 3;
nextflag = false;
nextplay = function () {
if (nextflag) {
gotoAndPlay ("play");
}
if ((i <= max) && (!nextflag)) {
nm = eval ("m" + i);
increasing(nm, 10, 200);
} else {
nextflag = true;
}
i++;
};
i = 0;
while (i <= max) {
nm = eval ("m" + i);
nm._visible = false;
i++;
}
i = 0;
nextplay();
Frame 40
updateMouse();
Frame 41
updateMouse();
gotoAndPlay ("comix3repeat");
Symbol 19 Button
on (release) {
_root.playSound("click");
getURL ("http://www.agame.com/", "_blank");
}
Symbol 40 MovieClip Frame 20
stop();
Symbol 41 MovieClip Frame 27
stop();
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
function clipInterval(fpSecond) {
fRate = 1000 / fpSecond;
frameRate = new Object();
frameRate.interval = function () {
nextFrame();
};
newRate = setInterval(frameRate, "interval", fRate);
}
clipInterval(30);
Symbol 70 MovieClip Frame 177
_root.nextFrame();
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 2
stop();
Symbol 97 MovieClip Frame 14
stop();
Symbol 98 MovieClip Frame 1
var score = 50;
stop();
Symbol 98 MovieClip Frame 2
stop();
Symbol 98 MovieClip Frame 3
stop();
Symbol 98 MovieClip Frame 4
_root.playSound("explosion");
play();
Symbol 98 MovieClip Frame 18
stop();
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
_root.playSound("hitbullet");
play();
Symbol 106 MovieClip Frame 28
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
_root.playSound("hitplasma");
play();
Symbol 110 MovieClip Frame 28
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
_root.playSound("hitbullet");
play();
Symbol 112 MovieClip Frame 28
stop();
Symbol 121 MovieClip Frame 1
var score = 100;
stop();
Symbol 121 MovieClip Frame 2
stop();
Symbol 121 MovieClip Frame 3
stop();
Symbol 121 MovieClip Frame 4
_root.playSound("explosion");
play();
Symbol 121 MovieClip Frame 18
gotoAndPlay ("dead");
Symbol 121 MovieClip Frame 19
_root.playSound("appear");
play();
Symbol 121 MovieClip Frame 33
gotoAndPlay ("alive");
Symbol 121 MovieClip Frame 34
stop();
Symbol 129 MovieClip Frame 1
var score = 75;
stop();
Symbol 129 MovieClip Frame 2
stop();
Symbol 129 MovieClip Frame 3
stop();
Symbol 129 MovieClip Frame 4
_root.playSound("explosion");
play();
Symbol 129 MovieClip Frame 18
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 2
_root.playSound("hitbullet");
play();
Symbol 131 MovieClip Frame 28
stop();
Symbol 138 MovieClip Frame 1
var score = 125;
stop();
Symbol 138 MovieClip Frame 2
stop();
Symbol 138 MovieClip Frame 3
stop();
Symbol 138 MovieClip Frame 4
_root.playSound("explosion");
play();
Symbol 138 MovieClip Frame 18
stop();
Symbol 144 MovieClip Frame 1
var score = 150;
stop();
Symbol 144 MovieClip Frame 2
stop();
Symbol 144 MovieClip Frame 3
stop();
Symbol 144 MovieClip Frame 4
_root.playSound("explosion");
play();
Symbol 144 MovieClip Frame 17
gotoAndPlay ("dead");
Symbol 144 MovieClip Frame 18
_root.playSound("appear");
play();
Symbol 144 MovieClip Frame 32
gotoAndPlay ("alive");
Symbol 144 MovieClip Frame 33
stop();
Symbol 150 MovieClip Frame 1
var score = 175;
stop();
Symbol 150 MovieClip Frame 2
stop();
Symbol 150 MovieClip Frame 3
stop();
Symbol 150 MovieClip Frame 4
_root.playSound("explosion");
play();
Symbol 150 MovieClip Frame 18
stop();
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 2
stop();
Symbol 222 MovieClip Frame 1
var score = 25;
var TYPE = "bonus";
stop();
Symbol 222 MovieClip Frame 2
_root.playSound("explosionbig");
play();
Symbol 222 MovieClip Frame 16
stop();
Symbol 227 MovieClip Frame 1
var score = 50;
var TYPE = "bonus";
stop();
Symbol 227 MovieClip Frame 2
_root.playSound("explosionbig");
play();
Symbol 227 MovieClip Frame 16
stop();
Symbol 232 MovieClip Frame 1
var score = 210;
stop();
Symbol 232 MovieClip Frame 2
play();
_root.playSound("shotplasma");
Symbol 232 MovieClip Frame 16
stop();
Symbol 302 MovieClip Frame 1
var score = 100;
stop();
Symbol 302 MovieClip Frame 2
play();
_root.playSound("bonus");
Symbol 302 MovieClip Frame 25
stop();
Symbol 312 MovieClip Frame 1
var score = 75;
stop();
Symbol 312 MovieClip Frame 2
play();
_root.playSound("slime");
Symbol 312 MovieClip Frame 16
stop();
Symbol 322 MovieClip Frame 1
var score = 100;
stop();
Symbol 322 MovieClip Frame 2
play();
_root.playSound("ice");
Symbol 322 MovieClip Frame 16
stop();
Symbol 325 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 2
_root.playSound("explosionbigshort");
play();
Symbol 325 MovieClip Frame 28
stop();
Symbol 387 MovieClip Frame 1
var score = 100;
stop();
Symbol 387 MovieClip Frame 2
play();
Symbol 387 MovieClip Frame 7
stop();
Symbol 392 MovieClip Frame 1
var score = 50;
stop();
Symbol 392 MovieClip Frame 2
_root.playSound("explosionbig");
play();
Symbol 392 MovieClip Frame 16
stop();
Symbol 454 MovieClip Frame 1
var score = 50;
stop();
Symbol 454 MovieClip Frame 2
play();
Symbol 454 MovieClip Frame 7
stop();
Symbol 458 MovieClip Frame 1
lifeTime = 50;
vilocityX = (0.5 - Math.random()) * 5;
vilocityY = (0.5 - Math.random()) * 5;
Symbol 458 MovieClip Frame 2
mc._x = mc._x + vilocityX;
mc._y = mc._y + vilocityY;
Symbol 458 MovieClip Frame 3
timer++;
if (timer < lifeTime) {
gotoAndPlay (2);
} else {
removeMovieClip(this);
}
Symbol 458 MovieClip Frame 4
stop();
Symbol 465 MovieClip Frame 1
stop();
Symbol 465 MovieClip Frame 2
stop();
Symbol 465 MovieClip Frame 3
stop();
Symbol 466 MovieClip Frame 1
stop();
Symbol 466 MovieClip Frame 2
_root.playSound("explosion");
Symbol 467 MovieClip Frame 1
ship.gotoAndStop("damage2");
Symbol 467 MovieClip Frame 50
stop();
Symbol 468 MovieClip Frame 1
var score = 10000;
stop();
Symbol 468 MovieClip Frame 2
_root.playSound("explosion");
play();
Symbol 468 MovieClip Frame 6
_root.playSound("explosion");
Symbol 468 MovieClip Frame 10
_root.playSound("explosion");
Symbol 468 MovieClip Frame 12
_root.playSound("explosion");
Symbol 468 MovieClip Frame 16
_root.playSound("explosion");
Symbol 468 MovieClip Frame 21
_root.playSound("explosion");
Symbol 468 MovieClip Frame 24
_root.playSound("explosion");
Symbol 468 MovieClip Frame 29
_root.playSound("explosion");
Symbol 468 MovieClip Frame 32
_root.playSound("explosion");
Symbol 468 MovieClip Frame 36
_root.playSound("explosion");
Symbol 468 MovieClip Frame 40
_root.playSound("explosionbig");
Symbol 468 MovieClip Frame 53
gotoAndPlay ("dead");
Symbol 468 MovieClip Frame 54
play();
Symbol 468 MovieClip Frame 69
gotoAndPlay ("alive");
Symbol 468 MovieClip Frame 70
stop();
Symbol 477 MovieClip Frame 1
var score = 50;
stop();
Symbol 477 MovieClip Frame 2
stop();
Symbol 477 MovieClip Frame 3
stop();
Symbol 477 MovieClip Frame 4
_root.playSound("explosion");
play();
Symbol 477 MovieClip Frame 18
stop();
Symbol 487 MovieClip Frame 1
var reload = 60;
var reloadupgraded = 30;
var respawn = 120;
stop();
Symbol 487 MovieClip Frame 2
stop();
Symbol 487 MovieClip Frame 3
stop();
Symbol 487 MovieClip Frame 4
play();
Symbol 487 MovieClip Frame 63
gotoAndStop ("aim");
Symbol 487 MovieClip Frame 64
play();
Symbol 487 MovieClip Frame 183
gotoAndStop ("aim");
Symbol 487 MovieClip Frame 184
play();
Symbol 487 MovieClip Frame 216
gotoAndStop ("aim");
Symbol 487 MovieClip Frame 217
play();
Symbol 487 MovieClip Frame 306
gotoAndStop ("aim");
Symbol 487 MovieClip Frame 307
play();
Symbol 487 MovieClip Frame 366
gotoAndStop ("aim");
Symbol 487 MovieClip Frame 367
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 2
if (_root.currentWeapon == _root.ROCKET) {
_root.playSound("shotrocket");
} else if (_root.currentWeapon == _root.wPLASMA) {
_root.playSound("shotplasma");
} else {
_root.playSound("shotcannon");
}
play();
Symbol 498 MovieClip Frame 4
gotoAndStop ("normal");
Symbol 498 MovieClip Frame 5
_root.playSound("hitbullet");
play();
Symbol 498 MovieClip Frame 15
gotoAndStop ("normal");
Symbol 498 MovieClip Frame 16
_root.playSound("explosion");
play();
Symbol 498 MovieClip Frame 30
stop();
Symbol 498 MovieClip Frame 31
play();
Symbol 498 MovieClip Frame 50
gotoAndStop ("normal");
Symbol 501 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 2
stop();
Symbol 506 MovieClip Frame 1
function showWeaponPanel(w1, w2, w3) {
var _local1 = _root;
_local1.w1 = w1;
_local1.w2 = w2;
_local1.w3 = w3;
wpn.gotoAndPlay("in");
if (_local1.curweapon) {
upg.gotoAndPlay("in");
}
setUpgrades(4);
}
function hideWeaponPanel(wsel) {
wpn.gotoAndPlay("out");
if ((upg._currentframe != upg._totalframes) && (upg._currentframe != 1)) {
upg.gotoAndPlay("out");
}
}
function setUpgrades(num) {
var _local2 = _root;
numinstalled = 0;
for (i in _local2.game.upgrades) {
if (_local2.game.upgrades[i]) {
numinstalled++;
}
}
num = 9 - numinstalled;
if (num > 4) {
num = 4;
}
i = 1;
while (i <= 4) {
_local2["u" + i] = 0;
i++;
}
var _local3 = new Array();
i = 1;
while (i <= num) {
var _local1;
do {
_local1 = random(9) + 1;
} while (_local2.game.upgrades[_local1] || (_local3[_local1]));
_local2["u" + i] = _local1;
_local3[_local1] = true;
i++;
}
}
play();
Symbol 506 MovieClip Frame 2
stop();
Symbol 506 MovieClip Frame 3
stop();
Symbol 511 MovieClip Frame 1
function showPanel() {
preparePanel();
upg.gotoAndPlay("in");
ins.gotoAndPlay("in");
}
function hidePanel(wsel) {
wpn.gotoAndPlay("out");
ins.gotoAndPlay("out");
if ((upg._currentframe != upg._totalframes) && (upg._currentframe != 1)) {
upg.gotoAndPlay("out");
}
}
function preparePanel() {
var _local1 = new Array();
i = 1;
while (i <= 9) {
if (_local1[i] == undefined) {
_local1[i] = _root.game.buildings[i];
}
if ((!_local1[i]) || (_local1[i] == undefined)) {
switch (i) {
case 1 :
_local1[2] = true;
break;
case 3 :
_local1[4] = true;
_local1[5] = true;
break;
case 4 :
_local1[5] = true;
break;
case 6 :
_local1[7] = true;
}
}
i++;
}
numinstalled = 0;
for (i in _local1) {
if (_local1[i]) {
numinstalled++;
}
}
num = 9 - numinstalled;
if (num > 4) {
num = 4;
}
i = 1;
while (i <= 4) {
_root["b" + i] = 0;
i++;
}
var _local3 = new Array();
i = 1;
while (i <= num) {
var _local2;
do {
_local2 = random(9) + 1;
} while (_local1[_local2] || (_local3[_local2]));
_root["b" + i] = _local2;
_local3[_local2] = true;
i++;
}
}
play();
Symbol 511 MovieClip Frame 2
stop();
Symbol 511 MovieClip Frame 3
stop();
Symbol 529 MovieClip Frame 1
stop();
Symbol 529 MovieClip Frame 3
play();
Symbol 529 MovieClip Frame 4
stop();
Symbol 529 MovieClip Frame 5
play();
Symbol 529 MovieClip Frame 6
stop();
Symbol 529 MovieClip Frame 7
play();
Symbol 529 MovieClip Frame 8
stop();
Symbol 529 MovieClip Frame 9
play();
Symbol 529 MovieClip Frame 10
stop();
Symbol 529 MovieClip Frame 11
play();
Symbol 529 MovieClip Frame 12
stop();
Symbol 529 MovieClip Frame 13
play();
Symbol 529 MovieClip Frame 14
stop();
Symbol 529 MovieClip Frame 15
play();
Symbol 529 MovieClip Frame 16
stop();
Symbol 529 MovieClip Frame 17
play();
Symbol 529 MovieClip Frame 18
stop();
Symbol 529 MovieClip Frame 19
play();
Symbol 529 MovieClip Frame 20
stop();
Symbol 529 MovieClip Frame 21
play();
Symbol 529 MovieClip Frame 22
stop();
Symbol 529 MovieClip Frame 23
play();
Symbol 529 MovieClip Frame 24
stop();
Symbol 529 MovieClip Frame 25
play();
Symbol 529 MovieClip Frame 26
stop();
Symbol 529 MovieClip Frame 27
play();
Symbol 529 MovieClip Frame 28
stop();
Symbol 529 MovieClip Frame 29
play();
Symbol 529 MovieClip Frame 30
stop();
Symbol 529 MovieClip Frame 31
play();
Symbol 529 MovieClip Frame 32
stop();
Symbol 529 MovieClip Frame 33
play();
Symbol 529 MovieClip Frame 34
stop();
Symbol 529 MovieClip Frame 35
play();
Symbol 529 MovieClip Frame 38
stop();
Symbol 529 MovieClip Frame 39
play();
Symbol 529 MovieClip Frame 42
stop();
Symbol 532 Button
on (rollOver) {
button2.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
getURL (_root.downloadURL, "_blank");
}
Symbol 536 MovieClip Frame 1
stop();
Symbol 536 MovieClip Frame 2
play();
Symbol 537 Button
on (rollOver) {
button.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
cursor.gotoAndStop("arrow");
_root.gotoAndPlay("comix1");
}
Symbol 539 MovieClip Frame 1
stop();
Symbol 539 MovieClip Frame 2
play();
Symbol 547 MovieClip Frame 1
stop();
Symbol 547 MovieClip Frame 2
stop();
Symbol 549 Button
on (rollOver) {
cursor.gotoAndPlay("hand");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
if ((_root.musicEnabled = !_root.musicEnabled)) {
playMusic("menumusic");
signmusic.gotoAndPlay("on");
} else {
stopAllSounds();
signmusic.gotoAndPlay("off");
}
}
Symbol 552 MovieClip Frame 1
stop();
Symbol 552 MovieClip Frame 2
stop();
Symbol 553 Button
on (rollOver) {
cursor.gotoAndPlay("hand");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
if ((_root.soundEnabled = !_root.soundEnabled)) {
signsound.gotoAndPlay("on");
} else {
signsound.gotoAndPlay("off");
}
}
Symbol 556 Button
on (release) {
getURL ("http://www.agame.com", "_blank");
}
Symbol 558 Button
on (rollOver) {
cursor.gotoAndPlay("hand");
greatgames.gotoAndPlay("zoom");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
getURL ("http://www.agame.com/", "_blank");
}
Symbol 566 MovieClip Frame 1
stop();
Symbol 566 MovieClip Frame 2
play();
Symbol 566 MovieClip Frame 60
gotoAndStop ("on");
Symbol 566 MovieClip Frame 61
stop();
Symbol 570 MovieClip Frame 1
stop();
Symbol 570 MovieClip Frame 2
play();
Symbol 570 MovieClip Frame 60
gotoAndStop ("on");
Symbol 570 MovieClip Frame 61
stop();
Symbol 574 MovieClip Frame 1
stop();
Symbol 574 MovieClip Frame 2
play();
Symbol 574 MovieClip Frame 60
gotoAndStop ("on");
Symbol 574 MovieClip Frame 61
stop();
Symbol 578 MovieClip Frame 1
stop();
Symbol 578 MovieClip Frame 2
play();
Symbol 578 MovieClip Frame 60
gotoAndStop ("on");
Symbol 578 MovieClip Frame 61
stop();
Symbol 582 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 2
play();
Symbol 582 MovieClip Frame 60
gotoAndStop ("on");
Symbol 582 MovieClip Frame 61
stop();
Symbol 584 MovieClip Frame 1
planet.airport.gotoAndPlay("off");
planet.starport.gotoAndPlay("off");
planet.support1.gotoAndPlay("off");
planet.support2.gotoAndPlay("off");
planet.support3.gotoAndPlay("off");
planet.powerplant.gotoAndPlay("off");
planet.mine.gotoAndPlay("off");
planet.ship.gotoAndPlay("off");
planet.squadron.gotoAndPlay("off");
Symbol 584 MovieClip Frame 71
stop();
Symbol 585 MovieClip Frame 1
planet.upgrade1.gotoAndStop("off");
planet.upgrade2.gotoAndStop("off");
planet.upgrade3.gotoAndStop("off");
planet.upgrade4.gotoAndStop("off");
planet.upgrade5.gotoAndStop("off");
stop();
Symbol 585 MovieClip Frame 2
play();
Symbol 585 MovieClip Frame 5
_root.playSound("explosion");
Symbol 585 MovieClip Frame 10
_root.playSound("explosion");
Symbol 585 MovieClip Frame 14
_root.playSound("explosion");
Symbol 585 MovieClip Frame 18
_root.playSound("explosion");
Symbol 585 MovieClip Frame 20
_root.playSound("explosion");
Symbol 585 MovieClip Frame 24
_root.playSound("explosion");
Symbol 585 MovieClip Frame 28
_root.playSound("explosion");
Symbol 585 MovieClip Frame 30
_root.playSound("explosion");
Symbol 585 MovieClip Frame 34
_root.playSound("explosion");
Symbol 585 MovieClip Frame 39
_root.playSound("explosion");
Symbol 585 MovieClip Frame 42
_root.playSound("explosion");
Symbol 585 MovieClip Frame 47
_root.playSound("explosion");
Symbol 585 MovieClip Frame 50
_root.playSound("explosion");
Symbol 585 MovieClip Frame 54
_root.playSound("explosion");
Symbol 585 MovieClip Frame 58
_root.playSound("explosion");
Symbol 585 MovieClip Frame 62
_root.playSound("explosion");
Symbol 585 MovieClip Frame 66
_root.playSound("explosionbig");
Symbol 585 MovieClip Frame 95
stop();
Symbol 594 MovieClip Frame 1
stop();
Symbol 594 MovieClip Frame 2
play();
Symbol 594 MovieClip Frame 80
gotoAndStop ("none");
Symbol 594 MovieClip Frame 81
play();
Symbol 594 MovieClip Frame 161
gotoAndStop ("none");
Symbol 594 MovieClip Frame 162
play();
Symbol 594 MovieClip Frame 311
gotoAndStop ("none");
Symbol 594 MovieClip Frame 312
play();
Symbol 594 MovieClip Frame 370
gotoAndStop ("none");
Symbol 594 MovieClip Frame 371
play();
Symbol 594 MovieClip Frame 429
gotoAndStop ("none");
Symbol 594 MovieClip Frame 430
play();
Symbol 594 MovieClip Frame 488
gotoAndStop ("none");
Symbol 600 Button
on (rollOver) {
buttoncontinue.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
switch (level) {
case 2 :
gotoAndPlay ("levelpause1");
break;
case 3 :
gotoAndPlay ("levelpause2");
break;
case 4 :
gotoAndPlay ("levelpause3");
break;
case 5 :
gotoAndPlay ("levelpause4");
break;
case 6 :
gotoAndPlay ("levelpause5");
break;
case 7 :
gotoAndPlay ("complete");
}
}
Symbol 611 MovieClip Frame 1
stop();
Symbol 611 MovieClip Frame 2
play();
Symbol 611 MovieClip Frame 5
stop();
Symbol 623 MovieClip Frame 1
stop();
Symbol 623 MovieClip Frame 2
stop();
Symbol 623 MovieClip Frame 3
stop();
Symbol 623 MovieClip Frame 4
stop();
Symbol 623 MovieClip Frame 5
stop();
Symbol 623 MovieClip Frame 6
stop();
Symbol 624 MovieClip Frame 1
stop();
Symbol 624 MovieClip Frame 2
play();
Symbol 624 MovieClip Frame 15
stop();
Symbol 628 MovieClip Frame 1
stop();
Symbol 628 MovieClip Frame 2
play();
Symbol 629 Button
on (rollOver) {
buttoncontinue.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
_root.gotoAndPlay("level");
}
Symbol 645 MovieClip Frame 1
stop();
Symbol 645 MovieClip Frame 2
stop();
Symbol 645 MovieClip Frame 3
play();
light._visible = true;
Symbol 645 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 648 MovieClip Frame 1
stop();
Symbol 648 MovieClip Frame 2
stop();
Symbol 648 MovieClip Frame 3
play();
light._visible = true;
Symbol 648 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 651 MovieClip Frame 1
stop();
Symbol 651 MovieClip Frame 2
stop();
Symbol 651 MovieClip Frame 3
play();
light._visible = true;
Symbol 651 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 654 MovieClip Frame 1
stop();
Symbol 654 MovieClip Frame 2
stop();
Symbol 654 MovieClip Frame 3
play();
light._visible = true;
Symbol 654 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 657 MovieClip Frame 1
stop();
Symbol 657 MovieClip Frame 2
stop();
Symbol 657 MovieClip Frame 3
play();
light._visible = true;
Symbol 657 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 660 MovieClip Frame 1
stop();
Symbol 660 MovieClip Frame 2
stop();
Symbol 660 MovieClip Frame 3
play();
light._visible = true;
Symbol 660 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 663 MovieClip Frame 1
stop();
Symbol 663 MovieClip Frame 2
stop();
Symbol 663 MovieClip Frame 3
play();
light._visible = true;
Symbol 663 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 666 MovieClip Frame 1
stop();
Symbol 666 MovieClip Frame 2
stop();
Symbol 666 MovieClip Frame 3
play();
light._visible = true;
Symbol 666 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 669 MovieClip Frame 1
stop();
Symbol 669 MovieClip Frame 2
stop();
Symbol 669 MovieClip Frame 3
play();
light._visible = true;
Symbol 669 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 673 MovieClip Frame 1
stop();
Symbol 673 MovieClip Frame 2
stop();
Symbol 673 MovieClip Frame 3
play();
light._visible = true;
Symbol 673 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 676 MovieClip Frame 1
stop();
Symbol 676 MovieClip Frame 2
stop();
Symbol 676 MovieClip Frame 3
play();
light._visible = true;
Symbol 676 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 679 MovieClip Frame 1
stop();
Symbol 679 MovieClip Frame 2
stop();
Symbol 679 MovieClip Frame 3
play();
light._visible = true;
Symbol 679 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 682 MovieClip Frame 1
stop();
Symbol 682 MovieClip Frame 2
stop();
Symbol 682 MovieClip Frame 3
play();
light._visible = true;
Symbol 682 MovieClip Frame 20
gotoAndStop ("enable");
light._visible = false;
Symbol 734 Button
on (rollOver) {
_root.cursor.gotoAndPlay("hand");
}
on (rollOut) {
_root.cursor.gotoAndPlay("arrow");
}
on (release) {
if (_root.level > 6) {
_root.level = 6;
}
_root._r = _root.getScoreEncoded();
var name = _root.playername;
var d1;
var d2;
var d3;
var d4;
d1 = _root._r[0].toString();
d2 = _root._r[1].toString();
d3 = _root._r[2].toString();
d4 = _root._r[3].toString();
getURL (_root.hiscoreURL, "_blank", "POST");
}
Symbol 738 Button
on (rollOver) {
buttongetfull.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
getURL (_root.orderURL, "_blank");
}
Symbol 740 MovieClip Frame 1
stop();
Symbol 740 MovieClip Frame 2
play();
Symbol 741 Button
on (rollOver) {
buttonstartover.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
level = 1;
difficulty++;
_root.gotoAndPlay("level");
}
Symbol 743 MovieClip Frame 1
stop();
Symbol 743 MovieClip Frame 2
play();
Symbol 749 Button
on (rollOver) {
button2.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
getURL (downloadURL, "_blank");
}
Symbol 752 Button
on (rollOver) {
buttonagain.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
score = 0;
difficulty = 0;
_root.gotoAndPlay("level");
}
Symbol 753 MovieClip Frame 1
stop();
Symbol 753 MovieClip Frame 2
play();
Symbol 755 Button
on (rollOver) {
buttoncontinue.gotoAndPlay("flash");
cursor.gotoAndPlay("hand");
_root.playSound("mouseover");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (release) {
_root.playSound("mouseclick");
_root.gotoAndPlay("shop");
}
Symbol 757 MovieClip Frame 1
stop();
Symbol 757 MovieClip Frame 2
play();
Symbol 763 MovieClip Frame 1
stop();
Symbol 766 MovieClip Frame 1
stop();
Symbol 769 MovieClip Frame 1
stop();
Symbol 772 MovieClip Frame 1
stop();
Symbol 775 MovieClip Frame 1
stop();
Symbol 799 Button
on (rollOver) {
cursor.gotoAndStop("hand");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (press) {
cursor.gotoAndStop("arrow");
if (!nextflag) {
nextflag = true;
} else {
gotoAndPlay ("comix2");
}
}
Symbol 829 Button
on (rollOver) {
cursor.gotoAndStop("hand");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (press) {
cursor.gotoAndStop("arrow");
if (!nextflag) {
nextflag = true;
} else {
gotoAndPlay ("comix3");
}
}
Symbol 854 Button
on (rollOver) {
cursor.gotoAndStop("hand");
}
on (rollOut) {
cursor.gotoAndPlay("arrow");
}
on (press) {
cursor.gotoAndStop("arrow");
if (!nextflag) {
nextflag = true;
} else {
gotoAndPlay ("play");
}
}