Frame 1
stop();
Frame 2
stop();
Frame 3
Stage.showMenu = false;
stop();
Frame 4
function rotateWorld() {
if (w_grabbed) {
if (_root._xmouse < world._x) {
yw_speed = w_oldY - _root._ymouse;
} else if (_root._xmouse > world._x) {
yw_speed = _root._ymouse - w_oldY;
}
if (_root._ymouse > world._y) {
xw_speed = w_oldX - _root._xmouse;
} else if (_root._ymouse < world._y) {
xw_speed = _root._xmouse - w_oldX;
}
w_speed = (yw_speed + xw_speed) / (11 - w_vy);
w_oldY = _root._ymouse;
w_oldX = _root._xmouse;
} else {
w_speed = w_speed - (w_speed / 12);
}
if (_global.worlddefense.data.motionblur) {
var _local3 = new flash.filters.BlurFilter(Math.abs(w_speed / 4), Math.abs(w_speed / 4), 1);
if (_global.worlddefense.data.levelofdetail == 100) {
_root.worldfilters[2] = _local3;
} else {
_root.worldfilters[0] = _local3;
}
_root.world.filters = _root.worldfilters;
}
if ((Math.abs(w_speed) > 30) && (_root.djmode != 4)) {
_root.djplay.stop();
_root.djplay = new Sound("s_dj");
_root.djplay.attachSound("scratch_intense_loop");
_root.djplay.start(0, 9999);
_root.djplay.setVolume(_global.worlddefense.data.sound_dj);
_root.djmode = 4;
} else if (((Math.abs(w_speed) > 15) && (Math.abs(w_speed) <= 30)) && (_root.djmode != 3)) {
_root.djplay.stop();
_root.djplay = new Sound("s_dj");
_root.djplay.attachSound("scratch_hi_loop");
_root.djplay.start(0, 9999);
_root.djplay.setVolume(_global.worlddefense.data.sound_dj);
_root.djmode = 3;
} else if (((Math.abs(w_speed) > 5) && (Math.abs(w_speed) <= 15)) && (_root.djmode != 2)) {
_root.djplay.stop();
_root.djplay = new Sound("s_dj");
_root.djplay.attachSound("scratch_med_loop");
_root.djplay.start(0, 9999);
_root.djplay.setVolume(_global.worlddefense.data.sound_dj);
_root.djmode = 2;
} else if (((Math.abs(w_speed) > 0.2) && (Math.abs(w_speed) <= 5)) && (_root.djmode != 1)) {
_root.djplay.stop();
_root.djplay = new Sound("s_dj");
_root.djplay.attachSound("scratch_low_loop");
_root.djplay.start(0, 9999);
_root.djplay.setVolume(_global.worlddefense.data.sound_dj);
_root.djmode = 1;
} else if ((Math.abs(w_speed) <= 0.2) && (_root.djmode != 0)) {
_root.djplay.stop();
_root.djplay = new Sound("s_dj");
_root.djplay.attachSound("wind");
_root.djplay.start(0, 9999);
_root.djplay.setVolume(_global.worlddefense.data.sound_dj / 2);
_root.djmode = 0;
}
_global.worlddefense.data.sound_dj;
world._rotation = world._rotation + w_speed;
}
function randomMeteor() {
if (((clevel.meteors_small > 0) && (clevel.meteors_medium > 0)) && (clevel.meteors_big > 0)) {
random_meteor = random(3);
} else if (((clevel.meteors_small > 0) && (clevel.meteors_medium > 0)) && (clevel.meteors_big <= 0)) {
random_meteor = random(2);
} else if (((clevel.meteors_small > 0) && (clevel.meteors_medium <= 0)) && (clevel.meteors_big <= 0)) {
random_meteor = 0;
} else if (((clevel.meteors_small <= 0) && (clevel.meteors_medium > 0)) && (clevel.meteors_big > 0)) {
random_meteor = 1 + random(2);
} else if (((clevel.meteors_small <= 0) && (clevel.meteors_medium <= 0)) && (clevel.meteors_big > 0)) {
random_meteor = 2;
} else if (((clevel.meteors_small <= 0) && (clevel.meteors_medium > 0)) && (clevel.meteors_big <= 0)) {
random_meteor = 1;
} else if ((((clevel.meteors_small <= 0) && (clevel.meteors_medium <= 0)) && (clevel.meteors_big <= 0)) && (clevel.meteors_bigbang > 0)) {
random_meteor = 3;
}
}
function calcPan(minx, maxx, curx) {
nowPan = ((200 * (curx - minx)) / (maxx - minx)) - 100;
return(nowPan);
}
function shakeAll(power) {
_root.shakePow = power;
_root.shakeEverything = true;
}
function slideScreen() {
var _local3 = new flash.display.BitmapData(700, 500);
_local3.draw(_root);
var _local2 = _root.getNextHighestDepth();
_root.attachMovie("slider_mc", "slider_" + _local2, _local2);
_root["slider_" + _local2].um.sshot.attachBitmap(_local3, 1);
_root["slider_" + _local2].lm.sshot.attachBitmap(_local3, 1);
}
function atenuator_menu() {
menuSound.setVolume(_global.worlddefense.data.sound_music * 0.5);
}
function NOatenuator_menu() {
menuSound.setVolume(_global.worlddefense.data.sound_music);
}
_global.menuOn = false;
_global.gamelevels = new Array();
z = new Object();
z.name = "Falling Stars";
z.minspeed = 0.6;
z.maxspeed = 1.2;
z.meteors_small = 7;
z.meteors_medium = 1;
z.meteors_big = 0;
z.meteors_bigbang = 0;
z.mindelay = 1;
z.maxdelay = 2;
_global.gamelevels.push(z);
z = new Object();
z.name = "Meteor Dance";
z.minspeed = 0.7;
z.maxspeed = 1.5;
z.meteors_small = 8;
z.meteors_medium = 5;
z.meteors_big = 0;
z.meteors_bigbang = 0;
z.mindelay = 0.8;
z.maxdelay = 2;
_global.gamelevels.push(z);
z = new Object();
z.name = "OMG Meteors";
z.minspeed = 1.2;
z.maxspeed = 2;
z.meteors_small = 10;
z.meteors_medium = 5;
z.meteors_big = 2;
z.meteors_bigbang = 0;
z.mindelay = 0.7;
z.maxdelay = 2;
_global.gamelevels.push(z);
z = new Object();
z.name = "Playing with Fire";
z.minspeed = 1.3;
z.maxspeed = 2.5;
z.meteors_small = 15;
z.meteors_medium = 8;
z.meteors_big = 5;
z.meteors_bigbang = 0;
z.mindelay = 0.7;
z.maxdelay = 2;
_global.gamelevels.push(z);
z = new Object();
z.name = "Burn";
z.minspeed = 1.5;
z.maxspeed = 2.5;
z.meteors_small = 18;
z.meteors_medium = 10;
z.meteors_big = 6;
z.meteors_bigbang = 0;
z.mindelay = 0.7;
z.maxdelay = 2;
_global.gamelevels.push(z);
z = new Object();
z.name = "Workd Killa";
z.minspeed = 1.61;
z.maxspeed = 2.8;
z.meteors_small = 20;
z.meteors_medium = 16;
z.meteors_big = 8;
z.meteors_bigbang = 0;
z.mindelay = 0.6;
z.maxdelay = 2;
_global.gamelevels.push(z);
z = new Object();
z.name = "Punkd Earth";
z.minspeed = 1.8;
z.maxspeed = 3;
z.meteors_small = 22;
z.meteors_medium = 10;
z.meteors_big = 16;
z.meteors_bigbang = 0;
z.mindelay = 0.6;
z.maxdelay = 2;
_global.gamelevels.push(z);
z = new Object();
z.name = "BIG BANG!!!";
z.minspeed = 2;
z.maxspeed = 4;
z.meteors_small = 35;
z.meteors_medium = 10;
z.meteors_big = 12;
z.meteors_bigbang = 1;
z.mindelay = 0.5;
z.maxdelay = 1.8;
_global.gamelevels.push(z);
z = new Object();
z.name = "Tod";
z.minspeed = 2;
z.maxspeed = 4;
z.meteors_small = 16;
z.meteors_medium = 20;
z.meteors_big = 13;
z.meteors_bigbang = 1;
z.mindelay = 0.6;
z.maxdelay = 1.4;
_global.gamelevels.push(z);
z = new Object();
z.name = "la mort";
z.minspeed = 3;
z.maxspeed = 5;
z.meteors_small = 10;
z.meteors_medium = 35;
z.meteors_big = 20;
z.meteors_bigbang = 0;
z.mindelay = 0.5;
z.maxdelay = 1;
_global.gamelevels.push(z);
z = new Object();
z.name = "OverStrike";
z.minspeed = 3.2;
z.maxspeed = 6;
z.meteors_small = 10;
z.meteors_medium = 30;
z.meteors_big = 25;
z.meteors_bigbang = 1;
z.mindelay = 0.5;
z.maxdelay = 0.9;
_global.gamelevels.push(z);
z = new Object();
z.name = "OverHelm";
z.minspeed = 3.5;
z.maxspeed = 6;
z.meteors_small = 10;
z.meteors_medium = 33;
z.meteors_big = 30;
z.meteors_bigbang = 1;
z.mindelay = 0.4;
z.maxdelay = 0.8;
_global.gamelevels.push(z);
z = new Object();
z.name = "Supernova";
z.minspeed = 3.6;
z.maxspeed = 6.2;
z.meteors_small = 13;
z.meteors_medium = 37;
z.meteors_big = 33;
z.meteors_bigbang = 1;
z.mindelay = 0.3;
z.maxdelay = 0.8;
_global.gamelevels.push(z);
z = new Object();
z.name = "Doomsday";
z.minspeed = 3.6;
z.maxspeed = 6.2;
z.meteors_small = 10;
z.meteors_medium = 20;
z.meteors_big = 50;
z.meteors_bigbang = 1;
z.mindelay = 0.3;
z.maxdelay = 0.8;
_global.gamelevels.push(z);
z = new Object();
z.name = "Milkshake";
z.minspeed = 3.6;
z.maxspeed = 6.5;
z.meteors_small = 10;
z.meteors_medium = 15;
z.meteors_big = 55;
z.meteors_bigbang = 1;
z.mindelay = 0.25;
z.maxdelay = 0.7;
_global.gamelevels.push(z);
z = new Object();
z.name = "Roll me fast";
z.minspeed = 3.6;
z.maxspeed = 6.5;
z.meteors_small = 5;
z.meteors_medium = 10;
z.meteors_big = 65;
z.meteors_bigbang = 0;
z.mindelay = 0.25;
z.maxdelay = 0.7;
_global.gamelevels.push(z);
z = new Object();
z.name = "Roll me faster";
z.minspeed = 4;
z.maxspeed = 8;
z.meteors_small = 0;
z.meteors_medium = 10;
z.meteors_big = 70;
z.meteors_bigbang = 1;
z.mindelay = 0.25;
z.maxdelay = 0.7;
_global.gamelevels.push(z);
z = new Object();
z.name = "Madness";
z.minspeed = 4;
z.maxspeed = 8;
z.meteors_small = 1;
z.meteors_medium = 15;
z.meteors_big = 80;
z.meteors_bigbang = 1;
z.mindelay = 0.25;
z.maxdelay = 0.7;
_global.gamelevels.push(z);
z = new Object();
z.name = "Renevolations";
z.minspeed = 4.5;
z.maxspeed = 9;
z.meteors_small = 1;
z.meteors_medium = 15;
z.meteors_big = 80;
z.meteors_bigbang = 1;
z.mindelay = 0.2;
z.maxdelay = 0.7;
_global.gamelevels.push(z);
z = new Object();
z.name = "GUN";
z.minspeed = 4.9;
z.maxspeed = 9;
z.meteors_small = 10;
z.meteors_medium = 10;
z.meteors_big = 100;
z.meteors_bigbang = 1;
z.mindelay = 0.15;
z.maxdelay = 0.6;
_global.gamelevels.push(z);
z = new Object();
z.name = "Armaggedom";
z.minspeed = 6;
z.maxspeed = 8;
z.meteors_small = 14;
z.meteors_medium = 20;
z.meteors_big = 115;
z.meteors_bigbang = 1;
z.mindelay = 0.15;
z.maxdelay = 0.5;
_global.gamelevels.push(z);
var gameData = SharedObject.getLocal("wdefense_armorstudios", "/");
var gameversion = 0.9138;
if ((gameData.data.profile == undefined) || (gameData.data.version != gameversion)) {
gameData.data.profile = new Array();
gameData.data.profile[0] = "";
gameData.data.profile[1] = new Object();
gameData.data.profile[1].name = "empty1";
gameData.data.profile[1].score = 0;
gameData.data.profile[1].currentlevel = 0;
gameData.data.profile[1].layer = false;
gameData.data.profile[1].layerdots = new Array();
gameData.data.profile[1].bomb = false;
gameData.data.profile[1].radar = false;
gameData.data.profile[2] = new Object();
gameData.data.profile[2].name = "empty2";
gameData.data.profile[2].score = 0;
gameData.data.profile[2].currentlevel = 0;
gameData.data.profile[2].layer = false;
gameData.data.profile[2].layerdots = new Array();
gameData.data.profile[2].bomb = false;
gameData.data.profile[2].radar = false;
gameData.data.profile[3] = new Object();
gameData.data.profile[3].name = "empty3";
gameData.data.profile[3].score = 0;
gameData.data.profile[3].currentlevel = 0;
gameData.data.profile[3].layer = false;
gameData.data.profile[3].layerdots = new Array();
gameData.data.profile[3].bomb = false;
gameData.data.profile[3].radar = false;
}
if (gameData.data.sound_efx == undefined) {
gameData.data.sound_efx = 100;
}
if (gameData.data.sound_music == undefined) {
gameData.data.sound_music = 75;
}
if (gameData.data.sound_dj == undefined) {
gameData.data.sound_dj = 100;
}
if (gameData.data.quality == undefined) {
gameData.data.quality = "HIGH";
}
if (gameData.data.levelofdetail == undefined) {
gameData.data.levelofdetail = 100;
}
if (gameData.data.motionblur == undefined) {
gameData.data.motionblur = true;
}
if (gameData.data.version != gameversion) {
gameData.data.version = gameversion;
}
_global.sound_efx = gameData.data.sound_efx;
_global.sound_music = gameData.data.sound_music;
gameData.flush();
_global.worlddefense = gameData;
Frame 5
stopAllSounds();
Frame 6
stopAllSounds();
Frame 7
stopAllSounds();
Frame 8
stopAllSounds();
Frame 9
stopAllSounds();
Frame 10
stop();
if (!_global.menuOn) {
var menuSound = new Sound("sounds_music");
menuSound.attachSound("NG1749.wav");
menuSound.start(0, 9999);
menuSound.setVolume(_global.worlddefense.data.sound_music);
_global.menuOn = true;
var noiseSound = new Sound("sounds_efx");
noiseSound.attachSound("startNoise");
noiseSound.start(0, 0);
noiseSound.setVolume(_global.worlddefense.data.sound_efx);
}
var clickbuttons = true;
_global.menuframe = this._currentframe;
_root._quality = "HIGH";
Instance of Symbol 69 MovieClip in Frame 10
onClipEvent (enterFrame) {
_rotation = (_rotation + 1);
}
Instance of Symbol 47 MovieClip in Frame 10
onClipEvent (enterFrame) {
this.onPress = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Frame 11
stop();
var gameData = SharedObject.getLocal("wdefense_armorstudios", "/");
_root.atenuator_menu();
i = 1;
while (i < 4) {
trace(i);
trace(gameData.data.profile[i].name);
this["n" + i].text = gameData.data.profile[i].name;
this["l" + i].text = (gameData.data.profile[i].currentlevel + "/") + _global.gamelevels.length;
this["s" + i].text = gameData.data.profile[i].score;
i++;
}
Instance of Symbol 291 MovieClip in Frame 11
onClipEvent (load) {
_visible = false;
}
Frame 12
stop();
var gameData = SharedObject.getLocal("wdefense_armorstudios", "/");
Frame 13
stop();
var gameData = SharedObject.getLocal("wdefense_armorstudios", "/");
trace("profile = " + _global.profile);
gameData.data.profile[_global.profile].name = "noname";
gameData.data.profile[_global.profile].score = 0;
gameData.data.profile[_global.profile].currentlevel = 1;
gameData.flush();
nname.restrict = "a-z A-Z 0-9";
Frame 14
stop();
_root.atenuator_menu();
i = 1;
while (i < 4) {
this["n" + i].text = _global.worlddefense.data.profile[i].name;
this["l" + i].text = (_global.worlddefense.data.profile[i].currentlevel + "/") + _global.gamelevels.length;
this["s" + i].text = _global.worlddefense.data.profile[i].score;
i++;
}
Instance of Symbol 291 MovieClip in Frame 14
onClipEvent (load) {
_visible = false;
}
Frame 15
function settings_update() {
switch (_global.worlddefense.data.levelofdetail) {
case 100 :
r1._x = dt2._x;
r1._y = dt2._y;
break;
case 50 :
r1._x = dt1._x;
r1._y = dt1._y;
break;
}
switch (_global.worlddefense.data.motionblur) {
case true :
r6._x = blur2._x;
r6._y = blur2._y;
break;
case false :
r6._x = blur1._x;
r6._y = blur1._y;
break;
}
switch (_global.worlddefense.data.quality) {
case "HIGH" :
r2._x = qt3._x;
r2._y = qt3._y;
break;
case "MEDIUM" :
r2._x = qt2._x;
r2._y = qt2._y;
break;
case "LOW" :
r2._x = qt1._x;
r2._y = qt1._y;
break;
}
switch (_global.worlddefense.data.sound_music) {
case 100 :
r3._x = mm5._x;
r3._y = mm5._y;
break;
case 75 :
r3._x = mm4._x;
r3._y = mm4._y;
break;
case 50 :
r3._x = mm3._x;
r3._y = mm3._y;
break;
case 25 :
r3._x = mm2._x;
r3._y = mm2._y;
break;
case 0 :
r3._x = mm1._x;
r3._y = mm1._y;
break;
}
switch (_global.worlddefense.data.sound_dj) {
case 100 :
r4._x = mv5._x;
r4._y = mv5._y;
break;
case 75 :
r4._x = mv4._x;
r4._y = mv4._y;
break;
case 50 :
r4._x = mv3._x;
r4._y = mv3._y;
break;
case 25 :
r4._x = mv2._x;
r4._y = mv2._y;
break;
case 0 :
r4._x = mv1._x;
r4._y = mv1._y;
break;
}
switch (_global.worlddefense.data.sound_efx) {
case 100 :
r5._x = me5._x;
r5._y = me5._y;
break;
case 75 :
r5._x = me4._x;
r5._y = me4._y;
break;
case 50 :
r5._x = me3._x;
r5._y = me3._y;
break;
case 25 :
r5._x = me2._x;
r5._y = me2._y;
break;
case 0 :
r5._x = me1._x;
r5._y = me1._y;
break;
}
}
stop();
settings_update();
trace(menuSound.type);
stop();
Frame 16
stop();
Frame 17
stop();
_global.menuOn = false;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 1) {
_global.currentlevel = _global.worlddefense.data.profile[_global.profile].currentlevel;
_global.currentscore = _global.worlddefense.data.profile[_global.profile].score;
gotoAndPlay (20);
} else {
_root._quality = "HIGH";
cvol = 0;
maxvol = _global.worlddefense.data.sound_music;
var tutSong = new Sound("sounds_music");
tutSong.attachSound("tut1");
tutSong.setVolume(cvol);
tutSong.start(0, 9999);
}
var yuframe = _root._currentframe;
_root.onEnterFrame = function () {
if (_root.yuframe == _root._currentframe) {
if (cvol < maxvol) {
cvol = cvol + 0.5;
tutSong.setVolume(cvol);
}
}
};
Frame 18
stop();
Frame 19
stop();
_global.currentlevel = _global.worlddefense.data.profile[_global.profile].currentlevel;
_global.currentscore = _global.worlddefense.data.profile[_global.profile].score;
tutSong.stop();
gotoAndPlay (20);
Frame 20
var randsong = 1;
var gameSong = new Sound("s_music");
if (_global.gamelevels.length >= (_global.currentlevel + 1)) {
gameSong.attachSound("music" + randsong);
} else {
gameSong.attachSound("dishwasher");
}
gameSong.setVolume(_global.worlddefense.data.sound_music);
gameSong.start(0, 9999);
_root._quality = _global.worlddefense.data.quality;
var worldfilters = new Array();
if (_global.worlddefense.data.levelofdetail == 100) {
var filter_shadow = (new flash.filters.DropShadowFilter(2, 45, 0, 0.3, 2, 2, 1, 3, false, false, false));
var filter_border = (new flash.filters.GlowFilter(16777215, 1, 2, 2, 10, 3, false, false));
worldfilters.push(filter_border);
worldfilters.push(filter_shadow);
world.filters = worldfilters;
}
_root.djmode = 10;
var zframe = _root._currentframe;
stop();
var radius = 420;
var gameStart = true;
var gamePaused = false;
var shakeEverything = false;
var shakesteps = 0;
var wyattonwater = 0;
var w_grabbed = false;
var w_vy = 7;
var gravity = 0.15;
var minSoundX = (world._x - 130);
var maxSoundX = (world._x + 130);
var buildings = 0;
var clevel = _global.gamelevels[_global.currentlevel - 1];
world.buildings.gotoAndStop(100);
world.buildings.gotoAndStop(_global.currentlevel);
clevel.totalmeteors = ((clevel.meteors_small + clevel.meteors_medium) + clevel.meteors_big) + clevel.meteors_bigbang;
var cdelay = (clevel.mindelay * 35);
var delay = cdelay;
var mi = 0;
var maski = 0;
var maski2 = 0;
maski2 = _global.worlddefense.data.profile[_global.profile].layerdots.length;
if (_global.worlddefense.data.profile[_global.profile].layer && (_root.pwups.pwup_layer._x == undefined)) {
_root.pwups.attachMovie("pwup_layer", "pwup_layer", 1, {_x:_root.world._x, _y:_root.world._y});
}
u = 0;
while (u < _global.worlddefense.data.profile[_global.profile].layerdots.length) {
_root.pwups.pwup_layer.inside.mask.attachMovie(_global.worlddefense.data.profile[_global.profile].layerdots[u][2], "msk" + (u + 1), u + 1, {_x:_global.worlddefense.data.profile[_global.profile].layerdots[u][0], _y:_global.worlddefense.data.profile[_global.profile].layerdots[u][1]});
u++;
}
leveldisplay.text = (("LEVEL " + _global.currentlevel) + "/") + _global.gamelevels.length;
var maxmeteors = clevel.totalmeteors;
var metcount = 0;
var mets_scaleround = 0;
var mets_scale = ((metcount / maxmeteors) * 100);
levelscale._xscale = mets_scaleround;
_root.currentscore = _global.currentscore;
if (_global.gamelevels.length >= (_global.currentlevel + 1)) {
bgbg.gotoAndStop(1);
} else {
bgbg.gotoAndStop(2);
}
if (_global.worlddefense.data.profile[_global.profile].radar && (_root.pwups2.radar._x == undefined)) {
_root.pwups2.attachMovie("radar", "radar", 2, {_x:20, _y:20});
}
var pkeyd = false;
_root.onEnterFrame = function () {
if (mets_scaleround < mets_scale) {
mets_scaleround = mets_scaleround + 0.25;
}
mets_scale = (metcount / maxmeteors) * 100;
levelscale._xscale = mets_scaleround;
if (((!gamePaused) && (Key.isDown(80))) && (!pkeyd)) {
_root.pwups2.attachMovie("pausepause", "pause", 3);
gamePaused = true;
pkeyd = true;
} else if ((gamePaused && (Key.isDown(80))) && (!pkeyd)) {
_root.pwups2.pause.removeMovieClip();
gamePaused = false;
pkeyd = true;
} else if (!Key.isDown(80)) {
pkeyd = false;
}
if (((_root._currentframe == zframe) && (!gamePaused)) && (gameStart)) {
rotateWorld();
if (Key.isDown(32) && (_global.worlddefense.data.profile[_global.profile].bomb)) {
novaS = new Sound(_root.s_efx);
novaS.attachSound("supernova");
novaS.setVolume(_global.worlddefense.data.sound_efx);
novaS.setPan(0);
novaS.start(0, 0);
_root.pwups2.attachMovie("pwup_flash", "bomb", 1);
_global.worlddefense.data.profile[_global.profile].bomb = false;
_global.worlddefense.flush();
}
delay--;
if ((delay <= 0) && (clevel.totalmeteors > 0)) {
randomMeteor();
mi++;
randAng = 1 + random(360);
meteorX = (Math.cos((randAng * Math.PI) / 180) * radius) + world._x;
meteorY = (Math.sin((randAng * Math.PI) / 180) * radius) + world._y;
offsetN = random(13) - random(13);
targAng = Math.atan2(world._y - meteorY, world._x - meteorX) + ((offsetN * Math.PI) / 180);
meteorspeed = clevel.minspeed + (Math.random() * (clevel.maxspeed - clevel.minspeed));
mt_speedX = meteorspeed * Math.cos(targAng);
mt_speedY = meteorspeed * Math.sin(targAng);
randRot = (Math.random() * 2) - (Math.random() * 2);
if (random_meteor == 0) {
if (_global.worlddefense.data.levelofdetail == 100) {
meteorname = "meteor_small";
} else {
meteorname = "meteor_small2";
}
meteordestroy_shape = "meteor_small2";
meteordamage = 22;
meteor_s_vol = 0.3;
shakepower = 0.8;
clevel.meteors_small--;
meteorscore = 19;
explosionscale = 100;
if (_global.worlddefense.data.profile[_global.profile].radar) {
rddddp = _root.pwups2.radar.dplacer.getNextHighestDepth();
_root.pwups2.radar.dplacer.attachMovie("radar_small", "m" + rddddp, rddddp, {_x:Math.cos((randAng * Math.PI) / 180) * 40, _y:Math.sin((randAng * Math.PI) / 180) * 40});
}
} else if (random_meteor == 1) {
if (_global.worlddefense.data.levelofdetail == 100) {
meteorname = "meteor_medium";
} else {
meteorname = "meteor_medium2";
}
meteordestroy_shape = "meteor_medium2";
meteordamage = 100;
meteor_s_vol = 0.55;
shakepower = 2.1;
clevel.meteors_medium--;
meteorscore = 67;
explosionscale = 200;
if (_global.worlddefense.data.profile[_global.profile].radar) {
rddddp = _root.pwups2.radar.dplacer.getNextHighestDepth();
_root.pwups2.radar.dplacer.attachMovie("radar_medium", "m" + rddddp, rddddp, {_x:Math.cos((randAng * Math.PI) / 180) * 40, _y:Math.sin((randAng * Math.PI) / 180) * 40});
}
} else if (random_meteor == 2) {
if (_global.worlddefense.data.levelofdetail == 100) {
meteorname = "meteor_big";
} else {
meteorname = "meteor_big2";
}
meteordestroy_shape = "meteor_big2";
meteordamage = 350;
meteor_s_vol = 1;
shakepower = 4.6;
clevel.meteors_big--;
meteorscore = 240;
explosionscale = 300;
if (_global.worlddefense.data.profile[_global.profile].radar) {
rddddp = _root.pwups2.radar.dplacer.getNextHighestDepth();
_root.pwups2.radar.dplacer.attachMovie("radar_big", "m" + rddddp, rddddp, {_x:Math.cos((randAng * Math.PI) / 180) * 40, _y:Math.sin((randAng * Math.PI) / 180) * 40});
}
} else if (random_meteor == 3) {
if (_global.worlddefense.data.levelofdetail == 100) {
meteorname = "meteor_bigbang";
} else {
meteorname = "meteor_bigbang2";
}
meteordestroy_shape = "meteor_bigbang2";
meteordamage = 1000;
meteor_s_vol = 1.1;
shakepower = 8;
clevel.meteors_bigbang--;
meteorscore = 987;
explosionscale = 700;
if (_global.worlddefense.data.profile[_global.profile].radar) {
rddddp = _root.pwups2.radar.dplacer.getNextHighestDepth();
_root.pwups2.radar.dplacer.attachMovie("radar_big", "m" + rddddp, rddddp, {_x:Math.cos((randAng * Math.PI) / 180) * 40, _y:Math.sin((randAng * Math.PI) / 180) * 40, _xscale:150, _yscale:150});
}
}
_root.meteors.attachMovie(meteorname, "m" + mi, mi, {_x:meteorX, _y:meteorY, speedX:mt_speedX, speedY:mt_speedY, rot:randRot, dshape:meteordestroy_shape, damage:meteordamage, dly:5, walkon:false, svol:meteor_s_vol, shaker:shakepower, givescore:meteorscore, explscale:explosionscale});
wyattonwater++;
_root.meteors["m" + mi].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.speedX;
this._y = this._y + this.speedY;
this._rotation = this._rotation + this.rot;
this.dly--;
if (this.dly <= 0) {
this.ndist = Math.sqrt(((this._x - _root.world._x) * (this._x - _root.world._x)) + ((this._y - _root.world._y) * (this._y - _root.world._y)));
if (this.ndist < 250) {
this.walkon = true;
} else {
this.walkon = false;
}
this.dly = 15;
}
if (this.walkon) {
this.ntA = Math.atan2(world._y - this._y, world._x - this._x);
this.ntA2 = Math.atan2(this._y - world._y, this._x - world._x);
this.speedX = this.speedX + (_root.gravity * Math.cos(this.ntA));
this.speedY = this.speedY + (_root.gravity * Math.sin(this.ntA));
if (_root.world.buildings.hitTest(this._x, this._y, true)) {
this.i = 1;
while (this.i < 6) {
if (_root.world.buildings["b" + this.i].gfx.hitTest(this._x, this._y, true)) {
_root.world.buildings["b" + this.i].health = _root.world.buildings["b" + this.i].health - this.damage;
_root.world.buildings["b" + this.i].hbar._alpha = 100;
this.tS = new Sound(_root.s_efx);
this.tS.attachSound("boom" + (1 + random(3)));
this.tS.setVolume(this.svol * _global.worlddefense.data.sound_efx);
this.tS.setPan(calcPan(_root.minSoundX, _root.maxSoundX, this._x));
this.tS.start(0, 0);
_root.mi++;
_root.meteors.attachMovie("EXPLOSION", "expl" + _root.mi, _root.mi, {_xscale:this.explscale, _yscale:this.explscale, _x:this._x, _y:this._y});
shakeAll(this.shaker);
delete this.tS;
_root.metcount++;
_root.wyattonwater--;
this.cary = random(5);
if ((this.cary == 5) && (_root.messenger.delay <= 0)) {
_root.messenger.delay = 130;
_root.messenger.delay.gotoAndStop(3 + random(10));
}
this.removeMovieClip();
}
this.i++;
}
} else if (_root.world.ground.hitTest(this._x, this._y, true) && (!_root.world.ground.inside.hitTest(this._x, this._y, true))) {
this.tS = new Sound(_root.s_efx);
this.tS.attachSound("boom" + (1 + random(3)));
this.tS.setVolume(this.svol * _global.worlddefense.data.sound_efx);
this.tS.setPan(calcPan(_root.minSoundX, _root.maxSoundX, this._x));
this.tS.start(0, 0);
this.maskX = this._x - _root.world._x;
this.maskY = this._y - _root.world._y;
this.gripmask = Math.sqrt((this.maskX * this.maskX) + (this.maskY * this.maskY));
this.maskX = this.gripmask * Math.cos(this.ntA2 - ((_root.world._rotation * Math.PI) / 180));
this.maskY = this.gripmask * Math.sin(this.ntA2 - ((_root.world._rotation * Math.PI) / 180));
_root.maski++;
_root.world.ground.inside.mask.attachMovie(this.dshape, "msk" + _root.maski, _root.maski, {_x:this.maskX, _y:this.maskY, _rotation:this._rotation});
_root.mi++;
_root.meteors.attachMovie("EXPLOSION", "expl" + _root.mi, _root.mi, {_xscale:this.explscale, _yscale:this.explscale, _x:this._x, _y:this._y});
shakeAll(this.shaker);
delete this.tS;
_root.wyattonwater--;
_root.metcount++;
_root.currentscore = _root.currentscore + this.givescore;
this.cary = random(5);
if ((this.cary == 5) && (_root.messenger.delay <= 0)) {
_root.messenger.delay = 130;
_root.messenger.delay.gotoAndStop(3 + random(10));
}
this.removeMovieClip();
} else if (_root.pwups.pwup_layer.valve.hitTest(this._x, this._y, true) && (!_root.pwups.pwup_layer.inside.mask.hitTest(this._x, this._y, true))) {
this.tS = new Sound(_root.s_efx);
this.tS.attachSound("sboom");
this.tS.setVolume(this.svol * _global.worlddefense.data.sound_efx);
this.tS.setPan(calcPan(_root.minSoundX, _root.maxSoundX, this._x));
this.tS.start(0, 0);
this.maskX = this._x - _root.pwups.pwup_layer._x;
this.maskY = this._y - _root.pwups.pwup_layer._y;
this.gripmask = Math.sqrt((this.maskX * this.maskX) + (this.maskY * this.maskY));
this.maskX = this.gripmask * Math.cos(this.ntA2 - ((_root.pwups.pwup_layer._rotation * Math.PI) / 180));
this.maskY = this.gripmask * Math.sin(this.ntA2 - ((_root.pwups.pwup_layer._rotation * Math.PI) / 180));
_root.maski2++;
_root.pwups.pwup_layer.inside.mask.attachMovie(this.dshape, "msk" + _root.maski2, _root.maski2, {_x:this.maskX, _y:this.maskY, _rotation:this._rotation});
this.mkkar = [this.maskX, this.maskY, this.dshape];
_global.worlddefense.data.profile[_global.profile].layerdots.push(this.mkkar);
if (_root.maski2 > 35) {
_global.worlddefense.data.profile[_global.profile].layer = false;
_global.worlddefense.data.profile[_global.profile].layerdots = new Array();
_global.worlddefense.flush();
_root.maski2 = 0;
_root.mi++;
_root.meteors.attachMovie("pwup_layerNEON", "dieneon", _root.mi, {_x:_root.pwups.pwup_layer._x, _y:_root.pwups.pwup_layer._y});
_root.pwups.pwup_layer.removeMovieClip();
_root.meteors.dieneon.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
} else {
this.removeMovieClip();
}
};
}
_root.mi++;
_root.meteors.attachMovie("EXPLOSION", "expl" + _root.mi, _root.mi, {_xscale:this.explscale, _yscale:this.explscale, _x:this._x, _y:this._y});
shakeAll(this.shaker);
delete this.tS;
_root.wyattonwater--;
_root.metcount++;
_root.currentscore = _root.currentscore + this.givescore;
this.removeMovieClip();
} else if (_root.pwups2.bomb.mesh.hitTest(this._x, this._y, true)) {
_root.mi++;
_root.meteors.attachMovie("EXPLOSION", "expl" + _root.mi, _root.mi, {_xscale:this.explscale, _yscale:this.explscale, _x:this._x, _y:this._y});
delete this.tS;
_root.wyattonwater--;
_root.metcount++;
_root.currentscore = _root.currentscore + this.givescore;
this.removeMovieClip();
}
} else if (_root.pwups2.bomb.mesh.hitTest(this._x, this._y, true)) {
_root.mi++;
_root.meteors.attachMovie("EXPLOSION", "expl" + _root.mi, _root.mi, {_xscale:this.explscale, _yscale:this.explscale, _x:this._x, _y:this._y});
delete this.tS;
_root.wyattonwater--;
_root.metcount++;
_root.currentscore = _root.currentscore + this.givescore;
this.removeMovieClip();
} else if ((((this._x < -300) || (this._x > 1000)) || (this._y > 1000)) || (this._y < -300)) {
_root.wyattonwater--;
_root.metcount++;
_root.currentscore = _root.currentscore + this.givescore;
this.removeMovieClip();
}
}
};
clevel.totalmeteors--;
delay = (clevel.mindelay + (Math.random() * (clevel.maxdelay - clevel.mindelay))) * 35;
}
if ((buildings <= 0) && (gameStart)) {
gameStart = false;
lastview = new flash.display.BitmapData(700, 500);
lastview.draw(_root);
_global.lastmemory = lastview;
for (d in _root) {
_root[d].removeMovieClip();
}
_global.lastscore = Math.round(_root.currentscore + (_root.currentscore * 0.2));
_global.continuescore = Math.round(_global.lastscore * 0.6);
_global.worlddefense.data.profile[_global.profile].score = _global.continuescore;
_global.worlddefense.flush();
gotoAndPlay (106);
}
if (((clevel.totalmeteors <= 0) && (wyattonwater <= 0)) && (gameStart)) {
gameStart = false;
_root.attachMovie("propwindow", "propwindow", 10, {_x:350, _y:250});
_root.propwindow.gotoAndStop("won");
_root.propwindow._alpha = 0;
_root.propwindow.lvtitle.text = ("Level \"" + clevel.name) + "\" COMPLETED!";
if (_global.gamelevels.length >= (_global.currentlevel + 1)) {
_global.currentlevel++;
} else {
stopAllSounds();
for (d in _root) {
_root[d].removeMovieClip();
}
_global.lastscore = Math.round(_root.currentscore + (_root.currentscore * 0.2));
_global.continuescore = Math.round(_global.lastscore * 0.6);
_global.worlddefense.data.profile[_global.profile].score = _global.lastscore;
_global.worlddefense.flush();
gotoAndPlay (21);
}
_global.currentscore = _root.currentscore;
_global.worlddefense.data.profile[_global.profile].currentlevel = _global.currentlevel;
_global.worlddefense.data.profile[_global.profile].score = _global.currentscore;
_global.worlddefense.flush();
}
}
if ((_root._currentframe == zframe) && (!gamePaused)) {
if (shakeEverything) {
_root.shakesteps = 10;
shakeEverything = false;
}
if (shakesteps > 0) {
_root._x = _root._x + ((_root.shakePow * Math.random()) - (_root.shakePow * Math.random()));
_root._y = _root._y + ((_root.shakePow * Math.random()) - (_root.shakePow * Math.random()));
if (_root._x > 5) {
_root._x--;
}
if (_root._y > 5) {
_root._y--;
}
if (_root._x < -5) {
_root._x++;
}
if (_root._y < -5) {
_root._y++;
}
shakesteps--;
} else if ((shakesteps <= 0) && ((_root._x != 0) || (_root._y != 0))) {
if (_root._x < 0) {
_root._x = _root._x + 0.1;
}
if (_root._x > 0) {
_root._x = _root._x - 0.1;
}
if (_root._y < 0) {
_root._y = _root._y + 0.1;
}
if (_root._y > 0) {
_root._y = _root._y - 0.1;
}
if (Math.abs(_root._x) < 0.2) {
_root._x = 0;
}
if (Math.abs(_root._y) < 0.2) {
_root._y = 0;
}
}
}
};
world.onPress = function () {
if (((_root._currentframe == _root.zframe) && (!_root.gamePaused)) && (_root.gameStart)) {
_root.w_grabbed = true;
_root.w_oldY = _root._ymouse;
_root.w_oldX = _root._xmouse;
}
};
world.onMouseUp = function () {
if (((_root._currentframe == _root.zframe) && (!_root.gamePaused)) && (_root.gameStart)) {
_root.w_grabbed = false;
}
};
Frame 21
stopAllSounds();
mem_.attachBitmap(_global.lastmemory, 1);
stop();
_root._quality = "HIGH";
var gwonSound = new Sound("s_music");
gwonSound.attachSound("wongamesound");
gwonSound.setVolume(_global.worlddefense.data.sound_music);
gwonSound.start(0, 9999);
var gamescore = _global.lastscore;
var totalscore2 = _global.continuescore;
var gamelevel = (_global.worlddefense.data.profile[_global.profile].currentlevel + 2);
var totalscore1 = (gamescore * gamelevel);
mem_.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha--;
}
};
Frame 22
ab20_09 = new LoadVars();
ab20_09.z = _global.worlddefense.data.profile[_global.profile].name;
ab20_09.x = totalscore1;
ab20_09.c = 320;
ab20_09.v = "ZSYNLQ";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
_global.worlddefense.data.profile[_global.profile].name = "empty1";
_global.worlddefense.data.profile[_global.profile].score = 0;
_global.worlddefense.data.profile[_global.profile].currentlevel = 0;
_global.worlddefense.data.profile[_global.profile].layer = false;
_global.worlddefense.data.profile[_global.profile].layerdots = new Array();
_global.worlddefense.flush();
Frame 105
stopAllSounds();
gotoAndPlay (10);
Frame 106
stopAllSounds();
mem_.attachBitmap(_global.lastmemory, 1);
stop();
_root._quality = "HIGH";
var goverSound = new Sound("s_music");
goverSound.attachSound("gameover");
goverSound.setVolume(_global.worlddefense.data.sound_music);
goverSound.start(0, 0);
var gamescore = _global.lastscore;
var totalscore2 = _global.continuescore;
var gamelevel = _global.worlddefense.data.profile[_global.profile].currentlevel;
var totalscore1 = (gamescore * gamelevel);
Frame 107
ab20_09 = new LoadVars();
ab20_09.z = _global.worlddefense.data.profile[_global.profile].name;
ab20_09.x = totalscore1;
ab20_09.c = 320;
ab20_09.v = "ZSYNLQ";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
_global.worlddefense.data.profile[_global.profile].name = "empty1";
_global.worlddefense.data.profile[_global.profile].score = 0;
_global.worlddefense.data.profile[_global.profile].currentlevel = 0;
_global.worlddefense.data.profile[_global.profile].layer = false;
_global.worlddefense.data.profile[_global.profile].layerdots = new Array();
_global.worlddefense.flush();
Frame 195
stopAllSounds();
gotoAndPlay (10);
Symbol 35 Button
on (press) {
getURL ("http://www.armorstudios.com", "_blank");
}
Symbol 41 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 41 MovieClip Frame 2
gotoAndPlay (1);
Symbol 41 MovieClip Frame 3
stop();
_root.nextFrame();
Symbol 54 MovieClip Frame 345
_root.play();
Symbol 59 Button
on (release) {
play();
}
Symbol 72 MovieClip Frame 185
_root.play();
Symbol 87 MovieClip [EXPLOSION] Frame 17
stop();
this.removeMovieClip();
Symbol 99 Button
on (release) {
if (_root.currentscore >= 15000) {
_root.pwups.attachMovie("pwup_layer", "pwup_layer", 1, {_x:_root.world._x, _y:_root.world._y});
_root.currentscore = _root.currentscore - 15000;
_global.currentscore = _global.currentscore - 15000;
_global.worlddefense.data.profile[_global.profile].score = _root.currentscore;
_global.worlddefense.data.profile[_global.profile].layer = true;
_global.worlddefense.data.profile[_global.profile].layerdots = new Array();
_global.worlddefense.flush();
buybt._visible = false;
}
}
Symbol 103 Button
on (release) {
if (_root.currentscore >= 15000) {
_root.pwups.attachMovie("pwup_layer", "pwup_layer", 1, {_x:_root.world._x, _y:_root.world._y});
_root.currentscore = _root.currentscore - 15000;
_global.currentscore = _global.currentscore - 15000;
_global.worlddefense.data.profile[_global.profile].score = _root.currentscore;
_global.worlddefense.data.profile[_global.profile].layer = true;
_global.worlddefense.data.profile[_global.profile].layerdots = new Array();
_global.worlddefense.flush();
buybt._visible = false;
}
}
Symbol 105 MovieClip Frame 1
stop();
if (_root.currentscore < 15000) {
gotoAndStop (3);
}
if (_root.pwups.pwup_layer._x != undefined) {
gotoAndStop (2);
}
Symbol 109 Button
on (release) {
with (_root) {
var zframe = _root._currentframe;
stop();
var radius = 420;
var gameStart = true;
var gamePaused = false;
var shakeEverything = false;
var shakesteps = 0;
var wyattonwater = 0;
var w_grabbed = false;
var w_vy = 7;
var gravity = 0.15;
var minSoundX = (world._x - 130);
var maxSoundX = (world._x + 130);
var buildings = 0;
var clevel = _global.gamelevels[_global.currentlevel - 1];
world.buildings.gotoAndStop(100);
world.buildings.gotoAndStop(_global.currentlevel);
clevel.totalmeteors = ((clevel.meteors_small + clevel.meteors_medium) + clevel.meteors_big) + clevel.meteors_bigbang;
var cdelay = (clevel.mindelay * 35);
var delay = cdelay;
var mi = 0;
var maski = 0;
leveldisplay.text = (("LEVEL " + _global.currentlevel) + "/") + _global.gamelevels.length;
if (_global.worlddefense.data.profile[_global.profile].radar && (_root.pwups2.radar._x == undefined)) {
_root.pwups2.attachMovie("radar", "radar", 2, {_x:20, _y:20});
}
var maxmeteors = clevel.totalmeteors;
var metcount = 0;
var mets_scaleround = 0;
var mets_scale = ((metcount / maxmeteors) * 100);
levelscale._xscale = mets_scaleround;
_root.currentscore = _global.currentscore;
if (_global.gamelevels.length >= (_global.currentlevel + 1)) {
bgbg.gotoAndStop(1);
} else {
bgbg.gotoAndStop(2);
gameSong.stop();
stopAllSounds();
_root.gameSong2 = new Sound("s_music");
_root.gameSong2.attachSound("dishwasher");
_root.gameSong2.setVolume(_global.worlddefense.data.sound_music);
_root.gameSong2.start(0, 9999);
}
}
for (d in _root.world.ground.inside.mask) {
_root.world.ground.inside.mask[d].removeMovieClip();
}
this.removeMovieClip();
}
Symbol 110 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay(_global.menuframe);
this.removeMovieClip();
}
Symbol 115 Button
on (release) {
if (_root.currentscore >= 6500) {
_root.currentscore = _root.currentscore - 6500;
_global.currentscore = _global.currentscore - 6500;
_global.worlddefense.data.profile[_global.profile].score = _root.currentscore;
_global.worlddefense.data.profile[_global.profile].bomb = true;
_global.worlddefense.flush();
buybt._visible = false;
}
}
Symbol 117 MovieClip Frame 1
stop();
if ((_root.currentscore < 6500) && (!_global.worlddefense.data.profile[_global.profile].bomb)) {
gotoAndStop (3);
} else if (_global.worlddefense.data.profile[_global.profile].bomb) {
gotoAndStop (2);
}
Instance of Symbol 122 MovieClip in Symbol 124 MovieClip [radar] Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 1);
}
Symbol 126 Button
on (release) {
if (_root.currentscore >= 2000) {
_root.currentscore = _root.currentscore - 2000;
_global.currentscore = _global.currentscore - 2000;
_global.worlddefense.data.profile[_global.profile].score = _root.currentscore;
_global.worlddefense.data.profile[_global.profile].radar = true;
_global.worlddefense.flush();
buybt._visible = false;
}
}
Symbol 127 MovieClip Frame 1
stop();
if ((_root.currentscore < 2000) && (!_global.worlddefense.data.profile[_global.profile].radar)) {
gotoAndStop (3);
} else if (_global.worlddefense.data.profile[_global.profile].radar) {
gotoAndStop (2);
}
Symbol 129 MovieClip [propwindow] Frame 1
stop();
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 2;
}
};
Symbol 139 MovieClip Frame 1
this.setMask(mask);
i = 0;
Symbol 163 MovieClip [pwup_flash] Frame 60
stop();
this.removeMovieClip();
Symbol 167 MovieClip [radar_big] Frame 65
this.removeMovieClip();
Symbol 170 MovieClip [radar_medium] Frame 60
this.removeMovieClip();
Symbol 172 MovieClip [radar_small] Frame 50
this.removeMovieClip();
Symbol 180 MovieClip Frame 45
stop();
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Instance of Symbol 189 MovieClip in Symbol 190 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
Symbol 196 MovieClip Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 0.3);
};
Instance of Symbol 195 MovieClip in Symbol 196 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
onClipEvent (load) {
this.name = "KENNEY";
}
Instance of Symbol 195 MovieClip in Symbol 196 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
onClipEvent (load) {
this.name = "GABRIEL";
}
Instance of Symbol 195 MovieClip in Symbol 196 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
onClipEvent (load) {
this.name = "WYATT";
}
Instance of Symbol 195 MovieClip in Symbol 196 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
onClipEvent (load) {
this.name = "TYLER GLAIEL";
}
Instance of Symbol 195 MovieClip in Symbol 196 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - 0.3);
}
onClipEvent (load) {
this.name = "NICOLAY EDIN";
}
Symbol 201 Button
on (press) {
gotoAndStop ("startgame");
}
Symbol 202 Button
on (press) {
gotoAndStop ("loadgame");
}
Symbol 203 Button
on (press) {
gotoAndStop ("settings");
}
Symbol 204 Button
on (press) {
gotoAndStop ("credits");
}
Symbol 205 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 206 Button
on (press) {
getURL ("http://www.armorbot.com/mytable/?id=320", "_blank");
}
Symbol 214 MovieClip Frame 20
stop();
Symbol 223 Button
on (release) {
_root.clickbuttons = true;
_root.menuSound.setVolume(_global.sound_music);
gotoAndStop (1);
}
Symbol 238 Button
on (release) {
_global.profile = 1;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
gotoAndPlay (3);
} else {
gotoAndPlay (4);
}
}
Symbol 242 Button
on (release) {
_global.profile = 2;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
gotoAndPlay (3);
} else {
gotoAndPlay (4);
}
}
Symbol 246 Button
on (release) {
_global.profile = 3;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
gotoAndPlay (3);
} else {
gotoAndPlay (4);
}
}
Symbol 250 Button
on (release) {
gotoAndPlay (4);
}
Symbol 252 Button
on (release) {
gotoAndPlay (2);
}
Symbol 257 MovieClip Frame 21
stop();
Symbol 260 Button
on (release) {
if (nname.text != "") {
gameData.data.profile[_global.profile].name = nname.text;
gameData.flush();
trace(_global.profile);
_root.clickbuttons = true;
_root.menuSound.stop();
stopAllSounds();
_root.slideScreen();
_root.gotoAndPlay(5);
}
}
Symbol 261 MovieClip Frame 1
stop();
_root.NOatenuator_menu();
Symbol 261 MovieClip Frame 2
stop();
var gameData = SharedObject.getLocal("wdefense_armorstudios", "/");
_root.atenuator_menu();
i = 1;
while (i < 4) {
trace(i);
trace(gameData.data.profile[i].name);
this["n" + i].text = gameData.data.profile[i].name;
this["l" + i].text = (gameData.data.profile[i].currentlevel + "/") + _global.gamelevels.length;
this["s" + i].text = gameData.data.profile[i].score;
i++;
}
Symbol 261 MovieClip Frame 3
stop();
var gameData = SharedObject.getLocal("wdefense_armorstudios", "/");
Symbol 261 MovieClip Frame 4
stop();
var gameData = SharedObject.getLocal("wdefense_armorstudios", "/");
trace("profile = " + _global.profile);
gameData.data.profile[_global.profile].name = "noname";
gameData.data.profile[_global.profile].score = 0;
gameData.data.profile[_global.profile].currentlevel = 1;
gameData.flush();
nname.restrict = "a-z A-Z 0-9";
Symbol 267 Button
on (release) {
_root.clickbuttons = true;
_root.NOatenuator_menu();
gotoAndStop (1);
}
Symbol 272 Button
on (release) {
_global.profile = 1;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
_root.clickbuttons = true;
_root.menuSound.stop();
stopAllSounds();
_root.slideScreen();
_root.gotoAndPlay(5);
}
}
Symbol 275 Button
on (release) {
_global.profile = 2;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
_root.clickbuttons = true;
_root.menuSound.stop();
stopAllSounds();
_root.slideScreen();
_root.gotoAndPlay(5);
}
}
Symbol 278 Button
on (release) {
_global.profile = 3;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
_root.clickbuttons = true;
_root.menuSound.stop();
stopAllSounds();
_root.slideScreen();
_root.gotoAndPlay(5);
}
}
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 2
stop();
_root.atenuator_menu();
i = 1;
while (i < 4) {
this["n" + i].text = _global.worlddefense.data.profile[i].name;
this["l" + i].text = (_global.worlddefense.data.profile[i].currentlevel + "/") + _global.gamelevels.length;
this["s" + i].text = _global.worlddefense.data.profile[i].score;
i++;
}
Symbol 283 Button
on (release) {
_root.clickbuttons = true;
_root.NOatenuator_menu();
gotoAndStop (1);
}
Symbol 284 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 2
stop();
_root.atenuator_menu();
trace(_global.sound_music * 0.5);
with (_root) {
trace(menuSound.getVolume());
}
Symbol 288 Button
on (press) {
gotoAndStop ("menu");
}
Symbol 300 Button
on (release) {
_global.profile = 1;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
gotoAndPlay (12);
} else {
gotoAndPlay (13);
}
}
Symbol 303 Button
on (release) {
_global.profile = 2;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
gotoAndPlay (12);
} else {
gotoAndPlay (13);
}
}
Symbol 306 Button
on (release) {
_global.profile = 3;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
gotoAndPlay (12);
} else {
gotoAndPlay (13);
}
}
Symbol 315 Button
on (release) {
gotoAndPlay (13);
}
Symbol 316 Button
on (release) {
gotoAndPlay (11);
}
Symbol 318 Button
on (release) {
if (nname.text != "") {
gameData.data.profile[_global.profile].name = nname.text;
gameData.flush();
trace(_global.profile);
_root.clickbuttons = true;
_root.menuSound.stop();
stopAllSounds();
_root.slideScreen();
gotoAndPlay (17);
}
}
Symbol 325 Button
on (release) {
_global.profile = 1;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
_root.clickbuttons = true;
_root.menuSound.stop();
stopAllSounds();
_root.slideScreen();
gotoAndPlay (17);
}
}
Symbol 328 Button
on (release) {
_global.profile = 2;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
_root.clickbuttons = true;
_root.menuSound.stop();
stopAllSounds();
_root.slideScreen();
gotoAndPlay (17);
}
}
Symbol 331 Button
on (release) {
_global.profile = 3;
if (_global.worlddefense.data.profile[_global.profile].currentlevel > 0) {
_root.clickbuttons = true;
_root.menuSound.stop();
stopAllSounds();
_root.slideScreen();
gotoAndPlay (17);
}
}
Symbol 351 Button
on (release) {
_global.worlddefense.data.levelofdetail = 50;
_global.worlddefense.flush();
settings_update();
}
Symbol 352 Button
on (release) {
_global.worlddefense.data.levelofdetail = 100;
_global.worlddefense.flush();
settings_update();
}
Symbol 353 Button
on (release) {
_global.worlddefense.data.quality = "LOW";
_global.worlddefense.flush();
settings_update();
}
Symbol 354 Button
on (release) {
_global.worlddefense.data.quality = "MEDIUM";
_global.worlddefense.flush();
settings_update();
}
Symbol 355 Button
on (release) {
_global.worlddefense.data.quality = "HIGH";
_global.worlddefense.flush();
settings_update();
}
Symbol 356 Button
on (release) {
_global.worlddefense.data.sound_music = 25;
_global.worlddefense.flush();
settings_update();
menuSound.setVolume(_global.worlddefense.data.sound_music);
}
Symbol 357 Button
on (release) {
_global.worlddefense.data.sound_music = 50;
_global.worlddefense.flush();
settings_update();
menuSound.setVolume(_global.worlddefense.data.sound_music);
}
Symbol 358 Button
on (release) {
_global.worlddefense.data.sound_music = 100;
_global.worlddefense.flush();
settings_update();
menuSound.setVolume(_global.worlddefense.data.sound_music);
}
Symbol 359 Button
on (release) {
_global.worlddefense.data.sound_music = 75;
_global.worlddefense.flush();
settings_update();
menuSound.setVolume(_global.worlddefense.data.sound_music);
}
Symbol 360 Button
on (release) {
_global.worlddefense.data.sound_music = 0;
_global.worlddefense.flush();
settings_update();
menuSound.setVolume(_global.worlddefense.data.sound_music);
}
Symbol 361 Button
on (release) {
_global.worlddefense.data.sound_efx = 25;
_global.worlddefense.flush();
settings_update();
}
Symbol 362 Button
on (release) {
_global.worlddefense.data.sound_efx = 50;
_global.worlddefense.flush();
settings_update();
}
Symbol 363 Button
on (release) {
_global.worlddefense.data.sound_efx = 100;
_global.worlddefense.flush();
settings_update();
}
Symbol 364 Button
on (release) {
_global.worlddefense.data.sound_efx = 75;
_global.worlddefense.flush();
settings_update();
}
Symbol 365 Button
on (release) {
_global.worlddefense.data.sound_efx = 0;
_global.worlddefense.flush();
settings_update();
}
Symbol 366 Button
on (release) {
_global.worlddefense.data.sound_dj = 25;
_global.worlddefense.flush();
settings_update();
}
Symbol 367 Button
on (release) {
_global.worlddefense.data.sound_dj = 50;
_global.worlddefense.flush();
settings_update();
}
Symbol 368 Button
on (release) {
_global.worlddefense.data.sound_dj = 100;
_global.worlddefense.flush();
settings_update();
}
Symbol 369 Button
on (release) {
_global.worlddefense.data.sound_dj = 75;
_global.worlddefense.flush();
settings_update();
}
Symbol 370 Button
on (release) {
_global.worlddefense.data.sound_dj = 0;
_global.worlddefense.flush();
settings_update();
}
Symbol 373 Button
on (release) {
_global.worlddefense.data.motionblur = false;
_global.worlddefense.flush();
settings_update();
}
Symbol 374 Button
on (release) {
_global.worlddefense.data.motionblur = true;
_global.worlddefense.flush();
settings_update();
}
Symbol 379 Button
on (release) {
_global.currentlevel = _global.worlddefense.data.profile[_global.profile].currentlevel;
_global.currentscore = _global.worlddefense.data.profile[_global.profile].score;
tutSong.stop();
gotoAndPlay (20);
}
Symbol 380 Button
on (release) {
gotoAndPlay (18);
}
Symbol 401 Button
on (press) {
nextFrame();
}
Symbol 404 Button
on (press) {
prevFrame();
}
Symbol 416 MovieClip Frame 25
stop();
Symbol 437 Button
on (release) {
_root.play();
}
Symbol 438 MovieClip Frame 1
stop();
Symbol 438 MovieClip Frame 2
stop();
Symbol 438 MovieClip Frame 3
stop();
Symbol 438 MovieClip Frame 4
stop();
Symbol 438 MovieClip Frame 5
stop();
Symbol 438 MovieClip Frame 6
stop();
Symbol 438 MovieClip Frame 7
stop();
Symbol 438 MovieClip Frame 8
stop();
Symbol 438 MovieClip Frame 9
stop();
Symbol 438 MovieClip Frame 10
stop();
Symbol 440 Button
on (release) {
_global.currentlevel = _global.worlddefense.data.profile[_global.profile].currentlevel;
_global.currentscore = _global.worlddefense.data.profile[_global.profile].score;
tutSong.stop();
gotoAndPlay (20);
}
Symbol 441 Button
on (release) {
stopAllSounds();
gotoAndPlay (10);
}
Symbol 444 MovieClip Frame 1
stop();
Symbol 448 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 1
this.onEnterFrame = function () {
this.nscale = (_parent.health / _parent.healthmax) * 100;
if (this.nscale < 0) {
this.nscale = 0;
}
this.mesh._xscale = this.nscale;
};
Symbol 454 MovieClip Frame 1
this.health = 250;
this.healthmax = 250;
_root.buildings++;
this.dead = false;
this.hbar._alpha = 0;
this.onEnterFrame = function () {
if (!this.dead) {
if (this.health < (this.healthmax / 4)) {
this.gfx.gotoAndStop(3);
} else if (this.health < (this.healthmax / 2)) {
this.gfx.gotoAndStop(2);
} else {
this.gfx.gotoAndStop(1);
}
if (this.health <= 0) {
_root.buildings--;
this.gfx.gotoAndStop(4);
_root.currentscore = Math.round(_root.currentscore * 0.8);
this.dead = true;
}
}
if (this.hbar._alpha > 0) {
this.hbar._alpha = this.hbar._alpha - 1;
}
};
Symbol 460 MovieClip Frame 1
stop();
Symbol 461 MovieClip Frame 1
this.health = 300;
this.healthmax = 300;
_root.buildings++;
this.dead = false;
this.hbar._alpha = 0;
this.onEnterFrame = function () {
if (!this.dead) {
if (this.health < (this.healthmax / 4)) {
this.gfx.gotoAndStop(3);
} else if (this.health < (this.healthmax / 2)) {
this.gfx.gotoAndStop(2);
} else {
this.gfx.gotoAndStop(1);
}
if (this.health <= 0) {
_root.buildings--;
this.gfx.gotoAndStop(4);
_root.currentscore = Math.round(_root.currentscore * 0.8);
this.dead = true;
}
}
if (this.hbar._alpha > 0) {
this.hbar._alpha = this.hbar._alpha - 1;
}
};
Symbol 466 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 1
this.health = 310;
this.healthmax = 310;
_root.buildings++;
this.dead = false;
this.hbar._alpha = 0;
this.onEnterFrame = function () {
if (!this.dead) {
if (this.health < (this.healthmax / 4)) {
this.gfx.gotoAndStop(3);
} else if (this.health < (this.healthmax / 2)) {
this.gfx.gotoAndStop(2);
} else {
this.gfx.gotoAndStop(1);
}
if (this.health <= 0) {
_root.buildings--;
this.gfx.gotoAndStop(4);
_root.currentscore = Math.round(_root.currentscore * 0.8);
this.dead = true;
}
}
if (this.hbar._alpha > 0) {
this.hbar._alpha = this.hbar._alpha - 1;
}
};
Symbol 470 MovieClip Frame 1
stop();
Symbol 471 MovieClip Frame 1
this.health = 310;
this.healthmax = 310;
_root.buildings++;
this.dead = false;
this.hbar._alpha = 0;
this.onEnterFrame = function () {
if (!this.dead) {
if (this.health < (this.healthmax / 4)) {
this.gfx.gotoAndStop(3);
} else if (this.health < (this.healthmax / 2)) {
this.gfx.gotoAndStop(2);
} else {
this.gfx.gotoAndStop(1);
}
if (this.health <= 0) {
_root.buildings--;
this.gfx.gotoAndStop(4);
_root.currentscore = Math.round(_root.currentscore * 0.8);
this.dead = true;
}
}
if (this.hbar._alpha > 0) {
this.hbar._alpha = this.hbar._alpha - 1;
}
};
Symbol 475 MovieClip Frame 1
stop();
Symbol 476 MovieClip Frame 1
this.health = 400;
this.healthmax = 400;
_root.buildings++;
this.dead = false;
this.hbar._alpha = 0;
this.onEnterFrame = function () {
if (!this.dead) {
if (this.health < (this.healthmax / 4)) {
this.gfx.gotoAndStop(3);
} else if (this.health < (this.healthmax / 2)) {
this.gfx.gotoAndStop(2);
} else {
this.gfx.gotoAndStop(1);
}
if (this.health <= 0) {
_root.buildings--;
this.gfx.gotoAndStop(4);
_root.currentscore = Math.round(_root.currentscore * 0.8);
this.dead = true;
}
}
if (this.hbar._alpha > 0) {
this.hbar._alpha = this.hbar._alpha - 1;
}
};
Symbol 480 MovieClip Frame 1
stop();
Symbol 481 MovieClip Frame 1
this.health = 700;
this.healthmax = 700;
_root.buildings++;
this.dead = false;
this.hbar._alpha = 0;
this.onEnterFrame = function () {
if (!this.dead) {
if (this.health < (this.healthmax / 4)) {
this.gfx.gotoAndStop(3);
} else if (this.health < (this.healthmax / 2)) {
this.gfx.gotoAndStop(2);
} else {
this.gfx.gotoAndStop(1);
}
if (this.health <= 0) {
_root.buildings--;
this.gfx.gotoAndStop(4);
_root.currentscore = Math.round(_root.currentscore * 0.8);
this.dead = true;
}
}
if (this.hbar._alpha > 0) {
this.hbar._alpha = this.hbar._alpha - 1;
}
};
Symbol 485 MovieClip Frame 1
stop();
Symbol 486 MovieClip Frame 1
this.health = 750;
this.healthmax = 750;
_root.buildings++;
this.dead = false;
this.hbar._alpha = 0;
this.onEnterFrame = function () {
if (!this.dead) {
if (this.health < (this.healthmax / 4)) {
this.gfx.gotoAndStop(3);
} else if (this.health < (this.healthmax / 2)) {
this.gfx.gotoAndStop(2);
} else {
this.gfx.gotoAndStop(1);
}
if (this.health <= 0) {
_root.buildings--;
this.gfx.gotoAndStop(4);
_root.currentscore = Math.round(_root.currentscore * 0.8);
this.dead = true;
}
}
if (this.hbar._alpha > 0) {
this.hbar._alpha = this.hbar._alpha - 1;
}
};
Symbol 490 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 1
this.health = 1000;
this.healthmax = 1000;
_root.buildings++;
this.dead = false;
this.hbar._alpha = 0;
this.onEnterFrame = function () {
if (!this.dead) {
if (this.health < (this.healthmax / 4)) {
this.gfx.gotoAndStop(3);
} else if (this.health < (this.healthmax / 2)) {
this.gfx.gotoAndStop(2);
} else {
this.gfx.gotoAndStop(1);
}
if (this.health <= 0) {
_root.buildings--;
this.gfx.gotoAndStop(4);
_root.currentscore = Math.round(_root.currentscore * 0.8);
this.dead = true;
}
}
if (this.hbar._alpha > 0) {
this.hbar._alpha = this.hbar._alpha - 1;
}
};
Symbol 492 MovieClip Frame 1
stop();
Symbol 503 MovieClip Frame 1
this.setMask(mask);
i = 0;
Symbol 519 MovieClip Frame 1
this.onEnterFrame = function () {
if (_global.worlddefense.data.profile[_global.profile].bomb) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
};
Symbol 544 MovieClip Frame 1
delay = 0;
maxdelay = 135;
stop();
this.onEnterFrame = function () {
if (delay <= 0) {
this.gotoAndStop(2);
}
if (this._currentframe > 2) {
if (splat.text != mytext) {
if (tstart < tarray.length) {
splat.text = splat.text + tarray[tstart];
tstart++;
}
}
}
};
Symbol 544 MovieClip Frame 2
stop();
Symbol 544 MovieClip Frame 3
mytext = "I pity the fool that's destroying my earth!";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 4
mytext = "Arrrr, who tries to bomb my ship?";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 5
mytext = "Yoyoyo whut's goin' on in da hood brovas?!";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 6
mytext = "Those meteors are disturbing my donutbreak...";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 7
mytext = "I hear boom...Americans coming? Everyone hide! AMERICANS!";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 8
mytext = "Who disturbes my roundhouse-kick training?!";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 9
mytext = "*Phew* Am I lucky I'm dead!";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 10
mytext = "D'oh!";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 11
mytext = "Ping ping ping pong pong ping ping ping pong!";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 544 MovieClip Frame 12
mytext = "Ha! My nuclear bombs work! W-what? Meteors? Oh...";
splat.text = "";
tarray = mytext.split("");
tstart = 0;
Symbol 545 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 565 Button
on (release) {
gotoAndPlay (22);
}
Symbol 572 MovieClip Frame 35
stop();
Symbol 587 Button
on (release) {
gotoAndPlay (107);
}