[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 1 (79 B)
fscommand ("showmenu", "false");
Mouse.hide();
startDrag (mainCursor, true);
Frame 2 (95 B)
stop();
logo.onRelease = function () {
getURL ("http://www.newgrounds.com/", "_blank");
};
Frame 3 (8 B)
stop();
Frame 4 (463 B)
var currentMusic = 1;
var musicVolume = 25;
var soundVolume = 400;
var Music1 = new Sound(music1);
var Music2 = new Sound(music2);
var Music3 = new Sound(music3);
_root._quality = "HIGH";
back._alpha = 20;
Music1.attachSound("NG16231.mp3");
Music2.attachSound("NG79138.mp3");
Music3.attachSound("NG79195.mp3");
Music1.setVolume(musicVolume);
Music2.setVolume(0);
Music3.setVolume(0);
Music1.start(0, 10);
Music2.start(0, 10);
Music3.start(0, 10);
Frame 6 (14.59 KiB) ● ●
function reset() {
towerID = 100;
unitID = 1000;
bulletID = 2000;
FXID = 3000;
life = 100;
money = 100;
level = 0;
currentMap = 2;
shiftDown = false;
timeLeft = 20;
frameCount = 0;
monsterCount = 0;
soundCount = 0;
create = false;
rollingOver = false;
pausing = true;
sliding = false;
infoBox.skipButton._visible = false;
infoBox.pausingButton._visible = false;
buildingCursor._visible = false;
towerSelection._visible = false;
maps._visible = false;
var _local1 = 0;
while (_local1 < monsters.length) {
monsters[_local1].kill();
_local1++;
}
_local1 = 0;
while (_local1 < towers.length) {
towers[_local1].kill();
_local1++;
}
_local1 = 0;
while (_local1 < bullets.length) {
bullets[_local1].kill();
_local1++;
}
towers.splice(0, towers.length);
monsters.splice(0, monsters.length);
bullets.splice(0, bullets.length);
moneyBox.text = money;
lifeBox.text = life;
levelBox.text = "Prep";
timeBox.text = "00:20";
infoBox.gotoAndStop("Main");
infoBox.info.gotoAndStop("Empty");
}
function addMoney(m) {
money = money + m;
}
function addLife(l) {
life = life + l;
}
function getTowerName() {
towerID++;
if (towerID >= 999) {
towerID = 100;
}
return("t" + towerID);
}
function getTowerDepth() {
return(towerID);
}
function getUnitName() {
unitID++;
if (unitID >= 1999) {
unitID = 1000;
}
return("u" + unitID);
}
function getUnitDepth() {
return(unitID);
}
function getBulletName() {
bulletID++;
if (bulletID >= 2999) {
bulletID = 2000;
}
return("b" + bulletID);
}
function getBulletDepth() {
return(bulletID);
}
function getFXName() {
FXID++;
if (FXID >= 3999) {
FXID = 3000;
}
return("fx" + FXID);
}
function getFXDepth() {
return(FXID);
}
function getPrice(t, l) {
if (t == 1) {
if (l == 1) {
return(50);
}
if (l == 2) {
return(50);
}
if (l == 3) {
return(100);
}
if (l == 4) {
return(200);
}
if (l == 5) {
return(400);
}
}
if ((t == 2) || (t == 3)) {
if (l == 1) {
return(200);
}
if (l == 2) {
return(200);
}
if (l == 3) {
return(400);
}
if (l == 4) {
return(800);
}
if (l == 5) {
return(1600);
}
}
if ((t == 4) || (t == 5)) {
if (l == 1) {
return(800);
}
if (l == 2) {
return(800);
}
if (l == 3) {
return(1600);
}
if (l == 4) {
return(3200);
}
if (l == 5) {
return(6400);
}
}
if ((t == 6) || (t == 7)) {
if (l == 1) {
return(3200);
}
if (l == 2) {
return(3200);
}
if (l == 3) {
return(6400);
}
if (l == 4) {
return(12800);
}
if (l == 5) {
return(25600);
}
}
return(1000000);
}
function getSale(t, l) {
var _local2;
_local2 = 0;
var _local1 = 1;
while (_local1 <= l) {
_local2 = _local2 + getPrice(t, _local1);
_local1++;
}
return(_local2);
}
function pauseOn() {
pausing = true;
back.enabled = false;
infoBox.skipButton.enabled = false;
infoBox.pausingButton.enabled = false;
towerSelection.stop();
sliding = selecting;
selecting = false;
var _local1 = 0;
while (_local1 < bullets.length) {
bullets[_local1].stopClip();
_local1++;
}
}
function pauseOff() {
pausing = false;
back.enabled = true;
infoBox.skipButton.enabled = true;
infoBox.pausingButton.enabled = true;
selecting = sliding;
towerSelection.play();
var _local1 = 0;
while (_local1 < bullets.length) {
bullets[_local1].startClip();
_local1++;
}
}
function playSound(n, p) {
var _local2 = new Sound(soundFX);
soundCount++;
_local2.attachSound(n);
_local2.setVolume(Math.floor(soundVolume / ((soundCount / 4) + 1)));
_local2.setPan(Math.floor(((p / 550) * 200) - 100));
_local2.start();
_local2.onSoundComplete = function () {
soundCount--;
};
}
function step() {
var _local5;
moneyBox.text = money;
lifeBox.text = life;
if (!rollingOver) {
if (selecting) {
_local5 = (("Tower" + towers[selectNum].getType()) + "-") + towers[selectNum].getLevel();
infoBox.info.gotoAndStop(_local5);
} else {
infoBox.info.gotoAndStop("Empty");
}
}
if (sliding) {
slidingTab._x = _root._xmouse - 106;
if (slidingTab._x < 200) {
slidingTab._x = 200;
}
if (slidingTab._x > 400) {
slidingTab._x = 400;
}
if (selectNum == 1) {
back._alpha = Math.floor(100 - ((slidingTab._x - 200) / 2));
} else if (selectNum == 2) {
soundVolume = Math.floor(slidingTab._x - 200) * 3;
} else {
musicVolume = Math.floor((slidingTab._x - 200) / 2);
if (currentMusic == 1) {
Music1.setVolume(musicVolume);
} else if (currentMusic == 2) {
Music2.setVolume(musicVolume);
} else {
Music3.setVolume(musicVolume);
}
}
}
if (!pausing) {
if (level == 0) {
levelBox.text = "Prep";
} else {
levelBox.text = level;
}
if (timeLeft < 10) {
timeBox.text = "00:0" + timeLeft;
} else {
timeBox.text = "00:" + timeLeft;
}
frameCount++;
if (create) {
if (((frameCount == 8) || (frameCount == 16)) || (frameCount == 24)) {
if (monsterCount < monsterList[level].length) {
monsters.push(new Unit(monsterList[level][monsterCount], currentMap));
monsterCount++;
} else {
monsterCount = 0;
create = false;
infoBox.skipButton._visible = true;
}
}
}
if (frameCount >= 24) {
if (timeLeft > 0) {
timeLeft--;
frameCount = 0;
}
}
if (timeLeft == 0) {
if (level < 51) {
create = true;
timeLeft = 20;
level++;
infoBox.skipButton._visible = false;
}
}
if (selecting) {
towerSelection._visible = true;
towerSelection._x = towers[selectNum].getX();
towerSelection._y = towers[selectNum].getY() + 24;
towerSelection.rangeCircle._xscale = towers[selectNum].getRange();
towerSelection.rangeCircle._yscale = towers[selectNum].getRange();
if (towers[selectNum].getLevel() >= 5) {
infoBox.gotoAndStop("NoUpgrade");
} else {
infoBox.gotoAndStop("Upgrade");
}
} else {
towerSelection._visible = false;
infoBox.gotoAndStop("Basic");
}
if (constructing) {
buildingCursor._visible = true;
if (towerType == 1) {
buildingCursor.rangeCircle._xscale = 75;
buildingCursor.rangeCircle._yscale = 75;
} else if (towerType == 2) {
buildingCursor.rangeCircle._xscale = 150;
buildingCursor.rangeCircle._yscale = 150;
} else if (towerType == 3) {
buildingCursor.rangeCircle._xscale = 100;
buildingCursor.rangeCircle._yscale = 100;
} else if (towerType == 4) {
buildingCursor.rangeCircle._xscale = 120;
buildingCursor.rangeCircle._yscale = 120;
} else if (towerType == 5) {
buildingCursor.rangeCircle._xscale = 80;
buildingCursor.rangeCircle._yscale = 80;
} else if (towerType == 6) {
buildingCursor.rangeCircle._xscale = 200;
buildingCursor.rangeCircle._yscale = 200;
} else {
buildingCursor.rangeCircle._xscale = 150;
buildingCursor.rangeCircle._yscale = 150;
}
cursorRow = Math.floor(this._ymouse / 24);
cursorColumn = Math.floor(this._xmouse / 24);
buildingCursor._x = (cursorColumn * 24) + 12;
buildingCursor._y = (cursorRow * 24) + 12;
if (map[cursorRow - 1][cursorColumn] == 0) {
buildingCursor.gotoAndStop(1);
} else {
buildingCursor.gotoAndStop(2);
}
} else {
buildingCursor._visible = false;
}
var _local3 = 0;
while (_local3 < monsters.length) {
if (!monsters[_local3].step()) {
var _local4;
if (this._ymouse < 336) {
rollingOver = false;
}
monsters.splice(_local3, 1);
}
_local3++;
}
_local3 = 0;
while (_local3 < towers.length) {
towers[_local3].step();
_local3++;
}
_local3 = 0;
while (_local3 < bullets.length) {
if (!bullets[_local3].step()) {
bullets.splice(_local3, 1);
}
_local3++;
}
if (life <= 0) {
lifeBox.text = 0;
pauseOn();
infoBox.gotoAndStop("Lose");
}
if ((((level == 51) && (monsters.length == 0)) && (life > 0)) && (!create)) {
pauseOn();
infoBox.gotoAndStop("Win");
}
}
}
var life;
var money;
var level;
var currentMap;
var towerType;
var constructing;
var cost;
var unitID;
var towerID;
var bulletID;
var FXID;
var soundCount;
var slidingTab;
var cursorRow;
var cursorColumn;
var timeLeft;
var frameCount;
var monsterCount;
var soundCount;
var create;
var rollingOver;
var pausing;
var sliding;
var monsters = new Array();
var towers = new Array();
var bullets = new Array();
var map = new Array();
var monsterList = new Array();
this.stop();
this.reset();
monsterList[1] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
monsterList[2] = new Array(2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1);
monsterList[3] = new Array(3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1);
monsterList[4] = new Array(3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3);
monsterList[5] = new Array(4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3);
monsterList[6] = new Array(4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3);
monsterList[7] = new Array(5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
monsterList[8] = new Array(5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1);
monsterList[9] = new Array(6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5);
monsterList[10] = new Array(6, 6, 6, 6, 6, 6, 6, 6, 6, 6);
monsterList[11] = new Array(7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7);
monsterList[12] = new Array(8, 8, 8, 7, 7, 7, 7, 7, 7, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8);
monsterList[13] = new Array(8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7);
monsterList[14] = new Array(9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7);
monsterList[15] = new Array(9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8);
monsterList[16] = new Array(10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9);
monsterList[17] = new Array(11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
monsterList[18] = new Array(11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10);
monsterList[19] = new Array(12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11);
monsterList[20] = new Array(12, 12, 12, 12, 12, 12, 12, 12, 12, 12);
monsterList[21] = new Array(13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13);
monsterList[22] = new Array(14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13);
monsterList[23] = new Array(14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 13, 13, 13, 13, 13, 13, 13, 13, 13);
monsterList[24] = new Array(15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15);
monsterList[25] = new Array(16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15);
monsterList[26] = new Array(17, 16, 15, 16, 15, 14, 15, 14, 13, 13, 14, 15, 14, 15, 16, 15, 16, 17, 16, 15);
monsterList[27] = new Array(15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17);
monsterList[28] = new Array(17, 17, 17, 17, 17, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 16, 16, 16, 16, 16);
monsterList[29] = new Array(18, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 17, 17, 17, 17, 17, 17, 17, 17);
monsterList[30] = new Array(18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18);
monsterList[31] = new Array(19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19);
monsterList[32] = new Array(20, 20, 20, 19, 19, 19, 19, 19, 19, 20, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19);
monsterList[33] = new Array(21, 20, 20, 20, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20);
monsterList[34] = new Array(21, 21, 21, 21, 20, 20, 20, 20, 21, 21, 21, 21, 20, 20, 20, 20, 19, 19, 19, 19);
monsterList[35] = new Array(22, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 21, 21, 21, 21, 21, 21, 21, 21, 21);
monsterList[36] = new Array(22, 21, 22, 22, 21, 21, 22, 22, 22, 21, 21, 21, 22, 22, 22, 22, 21, 21, 21, 21);
monsterList[37] = new Array(23, 22, 21, 20, 19, 23, 22, 21, 20, 19, 23, 22, 21, 20, 19, 23, 22, 21, 20, 19);
monsterList[38] = new Array(23, 23, 23, 23, 22, 23, 23, 23, 22, 22, 23, 23, 22, 22, 22, 23, 22, 22, 22, 22);
monsterList[39] = new Array(24, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 23, 23, 23, 23, 23, 23, 23, 23, 23);
monsterList[40] = new Array(24, 24, 24, 24, 24, 24, 24, 24, 24, 24);
monsterList[41] = new Array(25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25);
monsterList[42] = new Array(26, 25, 25, 25, 25, 25, 25, 26, 25, 25, 25, 25, 25, 25, 26, 25, 25, 25, 25, 25);
monsterList[43] = new Array(26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25);
monsterList[44] = new Array(27, 26, 26, 26, 26, 26, 25, 25, 25, 25, 27, 26, 26, 26, 26, 26, 25, 25, 25, 25);
monsterList[45] = new Array(27, 27, 27, 27, 27, 26, 26, 26, 26, 26, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27);
monsterList[46] = new Array(28, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 27, 27, 27, 27, 27, 27, 27, 27, 27);
monsterList[47] = new Array(28, 28, 28, 28, 27, 26, 25, 26, 27, 28, 28, 28, 28, 27, 26, 25, 26, 27, 28, 29);
monsterList[48] = new Array(25, 26, 27, 28, 28, 28, 29, 29, 29, 28, 28, 28, 29, 29, 29, 28, 28, 29, 29, 29);
monsterList[49] = new Array(30, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 29, 29, 29, 29, 29, 29, 29, 29, 29);
monsterList[50] = new Array(30, 30, 30, 30, 30, 30, 30, 30, 30, 30);
monsterList[51] = new Array(6, 6, 6, 6, 0, 12, 12, 12, 12, 0, 18, 18, 18, 18, 0, 24, 24, 24, 24, 0, 30, 30, 30, 30, 0, 0, 31);
back.onRelease = function () {
var temp = 0;
with (_root) {
selecting = false;
if (constructing) {
if ((buildingCursor._currentframe == 1) && (money >= cost)) {
towers.push(new Tower(buildingCursor._x, buildingCursor._y - 24, towerType, 1));
map[cursorRow - 1][cursorColumn] = 1;
money = money - cost;
if ((!Key.isDown(16)) || (money < cost)) {
constructing = false;
}
playSound("Click.wav", buildingCursor._x);
temp++;
} else {
constructing = false;
}
}
if (selectNum != undefined) {
towers[selectNum].selectOff();
}
var i = 0;
while (i < towers.length) {
var c;
c = towers[i].getClip();
if (c.hitTest(this._xmouse, this._ymouse + 24)) {
selecting = true;
selectNum = i;
playSound("Click.wav", buildingCursor._x);
temp++;
}
i++;
}
}
if (temp <= 0) {
playSound("Thud.wav", buildingCursor._x);
}
};
Symbol 1 MovieClip [Game] Frame 2 (14 B)
_root.step();
Symbol 1 MovieClip [Game] Frame 3 (21 B)
this.gotoAndPlay(2);
Symbol 49 MovieClip Frame 1 (1.15 KiB) ●
_root.stop();
var percent;
var angle;
var count = 0;
var currentFrame = 1;
this.Letters.text = "loading...";
this.PlayButton._visible = false;
this.PlayButton.onRelease = function () {
_root.play();
};
this.onEnterFrame = function () {
percent = _root.getBytesLoaded() / _root.getBytesTotal();
angle = 270 * percent;
this.Cover1._rotation = angle;
this.Cover2._rotation = angle + 90;
this.Cover3._rotation = angle + 180;
if (percent < 0.3333) {
count = count + (percent * 3);
} else if (percent < 0.6666) {
count = count + (percent * 1.5);
} else {
count = count + (percent * 1);
}
if (count >= 1) {
count--;
currentFrame++;
if (percent >= 0.3333) {
currentFrame++;
}
if (percent >= 0.6666) {
currentFrame++;
}
}
if (currentFrame > 36) {
currentFrame = 1;
}
this.weasel.gotoAndStop(currentFrame);
if (angle > 90) {
this.Cover3._visible = false;
}
if (angle > 180) {
this.Cover2._visible = false;
}
if (percent == 1) {
this.Cover1._visible = false;
this.Letters.text = "play";
this.PlayButton._visible = true;
this.weasel.gotoAndStop("end");
}
};
Symbol 692 MovieClip [__Packages.Unit] Frame 0 (4.6 KiB) ●
class Unit
{
var stunCount, clip, reward, lifeMax, armor, damage, life;
function Unit (type, map) {
stunCount = 0;
clip = _root.screen.attachMovie("Units" + map, _root.getUnitName(), _root.getUnitDepth());
clip.unit.gotoAndStop(type);
clip.onRollOver = function () {
if (_root.back.enabled) {
_root.infoBox.info.gotoAndStop("Unit" + type);
_root.rollingOver = true;
}
};
clip.onRollOut = function () {
_root.rollingOver = false;
};
reward = Math.ceil((type * type) / 1.5);
if (type == 0) {
lifeMax = 0;
armor = 0;
reward = 0;
damage = 1;
} else if (type == 1) {
lifeMax = 9;
armor = 20;
damage = 1;
} else if (type == 2) {
lifeMax = 18;
armor = 20;
damage = 1;
} else if (type == 3) {
lifeMax = 35;
armor = 20;
damage = 1;
} else if (type == 4) {
lifeMax = 60;
armor = 20;
damage = 1;
} else if (type == 5) {
lifeMax = 100;
armor = 20;
damage = 1;
} else if (type == 6) {
lifeMax = 500;
armor = 20;
reward = 50;
damage = 5;
} else if (type == 7) {
lifeMax = 350;
armor = 40;
damage = 2;
} else if (type == 8) {
lifeMax = 500;
armor = 40;
damage = 2;
} else if (type == 9) {
lifeMax = 730;
armor = 40;
damage = 2;
} else if (type == 10) {
lifeMax = 1000;
armor = 40;
damage = 2;
} else if (type == 11) {
lifeMax = 1300;
armor = 40;
damage = 2;
} else if (type == 12) {
lifeMax = 3200;
armor = 40;
reward = 150;
damage = 10;
} else if (type == 13) {
lifeMax = 2200;
armor = 60;
damage = 3;
} else if (type == 14) {
lifeMax = 2700;
armor = 60;
damage = 3;
} else if (type == 15) {
lifeMax = 3500;
armor = 60;
damage = 3;
} else if (type == 16) {
lifeMax = 4000;
armor = 60;
damage = 3;
} else if (type == 17) {
lifeMax = 5000;
armor = 60;
damage = 3;
} else if (type == 18) {
lifeMax = 9000;
armor = 60;
reward = 325;
damage = 15;
} else if (type == 19) {
lifeMax = 6900;
armor = 80;
damage = 4;
} else if (type == 20) {
lifeMax = 8100;
armor = 80;
damage = 4;
} else if (type == 21) {
lifeMax = 9200;
armor = 80;
damage = 4;
} else if (type == 22) {
lifeMax = 10000;
armor = 80;
damage = 4;
} else if (type == 23) {
lifeMax = 12000;
armor = 80;
damage = 4;
} else if (type == 24) {
lifeMax = 20000;
armor = 80;
reward = 600;
damage = 20;
} else if (type == 25) {
lifeMax = 16000;
armor = 100;
damage = 5;
} else if (type == 26) {
lifeMax = 18000;
armor = 100;
damage = 5;
} else if (type == 27) {
lifeMax = 20000;
armor = 100;
damage = 5;
} else if (type == 28) {
lifeMax = 22000;
armor = 100;
damage = 5;
} else if (type == 29) {
lifeMax = 25000;
armor = 100;
damage = 5;
} else if (type == 30) {
lifeMax = 50000;
armor = 100;
reward = 1000;
damage = 25;
} else if (type == 31) {
lifeMax = 100000 /* 0x0186A0 */;
armor = 120;
reward = 10000;
damage = 50;
}
life = lifeMax;
clip._x = 0;
clip._y = 0;
}
function getX() {
return(clip.unit._x);
}
function getY() {
return(clip.unit._y);
}
function hitCheck(c) {
return(clip.unit.hitTest(c));
}
function addLife(l, ap) {
var _local2;
_local2 = 0.01 * (ap - armor);
if (_local2 < -1) {
_local2 = -1;
}
life = life + Math.floor(l + (l * _local2));
}
function setStun(s) {
if (s > stunCount) {
stunCount = s;
}
}
function kill() {
clip.removeMovieClip();
}
function step() {
var _local5;
var _local3;
clip.lifeBar._visible = false;
if (stunCount > 0) {
stunCount--;
}
if (life <= 0) {
_root.addMoney(reward);
_local3 = _root.screen.attachMovie("Die", _root.getFXName(), _root.getFXDepth());
_local3._x = getX() - 4;
_local3._y = getY();
clip.removeMovieClip();
return(false);
}
if (stunCount <= 0) {
clip.nextFrame();
}
if (clip.unit._x >= 504) {
_root.addLife(-damage);
clip.removeMovieClip();
_local3 = _root.screen.attachMovie("Crash", _root.getFXName(), _root.getFXDepth());
_local3._x = 504;
_local3._y = 156;
return(false);
}
if (clip.unit.hitTest(_root._xmouse, _root._ymouse) || (Key.isDown(32))) {
var _local4;
_local4 = Math.ceil((life / lifeMax) * 20);
clip.lifeBar._visible = true;
clip.lifeBar.gotoAndStop(_local4);
} else {
clip.lifeBar._visible = false;
}
return(true);
}
}
Symbol 693 MovieClip [__Packages.Bullet] Frame 0 (8.17 KiB) ● ●
class Bullet
{
var target, type, oldX, oldY, currentX, currentY, longevity, speed, stun, blastRadius, AP, clip, damage, fx, xSpeed, ySpeed, angle;
function Bullet (t, cx, cy, ty, level) {
var _local4;
var _local5;
target = t;
type = ty;
oldX = target.getX();
oldY = target.getY();
currentX = cx;
currentY = cy;
_local4 = oldX - currentX;
_local5 = oldY - currentY;
if (type == 1) {
longevity = 5;
speed = 20;
stun = 0;
blastRadius = 0;
AP = 30 * level;
if ((level == 3) || (level == 5)) {
clip = _root.screen.attachMovie("Bullet1-2", _root.getBulletName(), _root.getBulletDepth());
damage = 4 + Math.round(Math.random() * 6);
fx = "HitFX1-2";
} else {
clip = _root.screen.attachMovie("Bullet1-1", _root.getBulletName(), _root.getBulletDepth());
damage = 2 + Math.round(Math.random() * 5);
fx = "HitFX1-1";
}
}
if (type == 2) {
clip = _root.screen.attachMovie("Bullet2-" + level, _root.getBulletName(), _root.getBulletDepth());
longevity = 16;
speed = 8;
stun = 0;
blastRadius = 0;
AP = 20;
if (level == 1) {
damage = Math.round(Math.random() * 1);
}
if (level == 2) {
damage = Math.round(Math.random() * 2);
}
if (level == 3) {
damage = Math.round(Math.random() * 4);
}
if (level == 4) {
damage = Math.round(Math.random() * 8);
}
if (level == 5) {
damage = Math.round(Math.random() * 16);
}
}
if (type == 3) {
clip = _root.screen.attachMovie("Bullet3", _root.getBulletName(), _root.getBulletDepth());
clip._xscale = 50 * level;
clip._yscale = 50 * level;
longevity = 6;
speed = 16;
stun = level;
blastRadius = 50;
AP = 40;
fx = "HitFX3-1";
if (level == 1) {
damage = 4 + Math.round(Math.random() * 2);
}
if (level == 2) {
damage = 8 + Math.round(Math.random() * 4);
}
if (level == 3) {
damage = 16 + Math.round(Math.random() * 8);
}
if (level == 4) {
damage = 32 + Math.round(Math.random() * 16);
}
if (level == 5) {
damage = 64 + Math.round(Math.random() * 32);
}
}
if (type == 4) {
clip = _root.screen.attachMovie("Bullet4", _root.getBulletName(), _root.getBulletDepth());
clip._xscale = (25 * level) + 25;
clip._yscale = (25 * level) + 25;
longevity = 10;
speed = 16;
stun = 0;
blastRadius = 0;
AP = 80;
fx = "HitFX4-1";
if (level == 1) {
damage = 20 + Math.round(Math.random() * 45);
if ((Math.random() * 100) <= 10) {
stun = 48;
fx = "HitFX4-2";
}
longevity = 12;
}
if (level == 2) {
damage = 40 + Math.round(Math.random() * 90);
if ((Math.random() * 100) <= 20) {
stun = 48;
fx = "HitFX4-2";
}
longevity = 14;
}
if (level == 3) {
damage = 80 + Math.round(Math.random() * 180);
if ((Math.random() * 100) <= 30) {
stun = 48;
fx = "HitFX4-2";
}
longevity = 15;
}
if (level == 4) {
damage = 160 + Math.round(Math.random() * 360);
if ((Math.random() * 100) <= 40) {
stun = 48;
fx = "HitFX4-2";
}
longevity = 17;
}
if (level == 5) {
damage = 320 + Math.round(Math.random() * 720);
if ((Math.random() * 100) <= 50) {
stun = 48;
fx = "HitFX4-2";
}
longevity = 18;
}
}
if (type == 5) {
clip = _root.screen.attachMovie("Bullet5", _root.getBulletName(), _root.getBulletDepth());
clip._xscale = 50 * level;
clip._yscale = 50 * level;
longevity = 6;
speed = 12;
stun = 0;
AP = 60;
fx = "HitFX5-1";
if (level == 1) {
damage = 25 + Math.round(Math.random() * 10);
blastRadius = 30;
}
if (level == 2) {
damage = 50 + Math.round(Math.random() * 20);
blastRadius = 40;
}
if (level == 3) {
damage = 100 + Math.round(Math.random() * 40);
blastRadius = 50;
}
if (level == 4) {
damage = 200 + Math.round(Math.random() * 80);
blastRadius = 60;
}
if (level == 5) {
damage = 400 + Math.round(Math.random() * 160);
blastRadius = 70;
}
}
if (type == 6) {
clip = _root.screen.attachMovie("Bullet6", _root.getBulletName(), _root.getBulletDepth());
clip._xscale = 50 * level;
clip._yscale = 50 * level;
longevity = 6;
speed = 30;
stun = 0;
blastRadius = 0;
AP = 100;
fx = "HitFX6-1";
if (level == 1) {
damage = 256;
}
if (level == 2) {
damage = 512;
}
if (level == 3) {
damage = 1024;
}
if (level == 4) {
damage = 2048;
}
if (level == 5) {
damage = 4096;
}
}
if (type == 7) {
clip = _root.screen.attachMovie("Bullet7", _root.getBulletName(), _root.getBulletDepth());
clip._xscale = 30 * level;
clip._yscale = 30 * level;
longevity = 10;
speed = 14;
stun = 0;
AP = 40;
fx = "HitFX7-1";
if (level == 1) {
damage = 50 + Math.round(Math.random() * 150);
blastRadius = 60;
}
if (level == 2) {
damage = 100 + Math.round(Math.random() * 300);
blastRadius = 70;
}
if (level == 3) {
damage = 200 + Math.round(Math.random() * 600);
blastRadius = 80;
}
if (level == 4) {
damage = 400 + Math.round(Math.random() * 1200);
blastRadius = 90;
}
if (level == 5) {
damage = 800 + Math.round(Math.random() * 2400);
blastRadius = 100;
}
}
if (_local4 == 0) {
xSpeed = 0;
if (_local5 < 0) {
ySpeed = -speed;
angle = 4.71238898038469;
} else {
ySpeed = speed;
angle = (Math.PI/2);
}
} else if (_local4 < 0) {
angle = Math.atan(_local5 / _local4) + Math.PI;
xSpeed = speed * Math.cos(angle);
ySpeed = speed * Math.sin(angle);
} else {
angle = Math.atan(_local5 / _local4);
xSpeed = speed * Math.cos(angle);
ySpeed = speed * Math.sin(angle);
}
clip._x = currentX;
clip._y = currentY;
clip._rotation = angle * 57.2957795130823;
}
function kill() {
clip.removeMovieClip();
}
function stopClip() {
clip.stop();
}
function startClip() {
clip.play();
}
function step() {
var _local6;
var _local5;
var _local4;
var _local7;
if (type == 2) {
longevity--;
currentX = currentX + xSpeed;
currentY = currentY + ySpeed;
clip._x = currentX;
clip._y = currentY;
var _local3 = 0;
while (_local3 < _root.monsters.length) {
if (_root.monsters[_local3].hitCheck(clip)) {
_root.monsters[_local3].addLife(-damage, AP);
}
_local3++;
}
if (longevity <= 0) {
clip.removeMovieClip();
return(false);
}
} else {
if (target.getX() == undefined) {
currentX = currentX + xSpeed;
currentY = currentY + ySpeed;
} else {
currentX = currentX + (xSpeed - (oldX - target.getX()));
currentY = currentY + (ySpeed - (oldY - target.getY()));
oldX = target.getX();
oldY = target.getY();
}
clip._x = currentX;
clip._y = currentY;
longevity--;
if (longevity < 0) {
clip._alpha = Math.floor(100 + (20 * longevity));
}
if (longevity <= -5) {
clip.removeMovieClip();
return(false);
}
if ((currentY >= 306) || (currentY <= 54)) {
clip.removeMovieClip();
return(false);
}
if (target.hitCheck(clip)) {
_local7 = _root.screen.attachMovie(fx, _root.getFXName(), _root.getFXDepth());
_local7._x = target.getX();
_local7._y = target.getY();
_local7._rotation = clip._rotation;
if (blastRadius == 0) {
target.addLife(-damage, AP);
target.setStun(stun);
} else {
_local7._xscale = blastRadius;
_local7._yscale = blastRadius;
var _local3 = 0;
while (_local3 < _root.monsters.length) {
_local5 = currentX - _root.monsters[_local3].getX();
_local4 = currentY - _root.monsters[_local3].getY();
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 <= (blastRadius / 2)) {
_root.monsters[_local3].addLife(-damage, AP);
_root.monsters[_local3].setStun(stun);
}
_local3++;
}
}
clip.removeMovieClip();
return(false);
}
}
return(true);
}
}
Symbol 694 MovieClip [__Packages.Tower] Frame 0 (4.28 KiB) ●
class Tower
{
var currentX, currentY, type, level, fireCount, fireRate, clip, range, fx, target, heading;
function Tower (cx, cy, t, l) {
currentX = cx;
currentY = cy;
type = t;
level = l;
fireCount = 0;
fireRate = 12;
if (type == 1) {
clip = _root.screen.attachMovie("Tower1-" + level, _root.getTowerName(), _root.getTowerDepth());
if (level == 1) {
fireRate = 8;
range = 75;
fx = "fireFX1-1";
} else if (level == 2) {
fireRate = 6;
range = 100;
fx = "fireFX1-2";
} else if (level == 3) {
fireRate = 6;
range = 100;
fx = "fireFX1-3";
} else if (level == 4) {
fireRate = 2;
range = 125;
fx = "fireFX1-2";
} else if (level == 5) {
fireRate = 2;
range = 125;
fx = "fireFX1-3";
}
}
if (type == 2) {
clip = _root.screen.attachMovie("Tower2-" + level, _root.getTowerName(), _root.getTowerDepth());
range = 150;
fireRate = 1;
fx = "null";
}
if (type == 3) {
clip = _root.screen.attachMovie("Tower3-" + level, _root.getTowerName(), _root.getTowerDepth());
range = 100;
fx = "FireFX3-1";
}
if (type == 4) {
clip = _root.screen.attachMovie("Tower4-" + level, _root.getTowerName(), _root.getTowerDepth());
fireRate = 8;
fx = "FireFX4-1";
if (level == 1) {
range = 120;
} else if (level == 2) {
range = 140;
} else if (level == 3) {
range = 160;
} else if (level == 4) {
range = 180;
} else if (level == 5) {
range = 200;
}
}
if (type == 5) {
clip = _root.screen.attachMovie("Tower5-" + level, _root.getTowerName(), _root.getTowerDepth());
range = 80;
fx = "FireFX5-1";
}
if (type == 6) {
clip = _root.screen.attachMovie("Tower6-" + level, _root.getTowerName(), _root.getTowerDepth());
range = 200;
fx = "FireFX6-1";
}
if (type == 7) {
clip = _root.screen.attachMovie("Tower7-" + level, _root.getTowerName(), _root.getTowerDepth());
range = 150;
fx = "FireFX7-" + level;
}
clip._x = currentX;
clip._y = currentY;
}
function getClip() {
return(clip);
}
function getType() {
return(type);
}
function getLevel() {
return(level);
}
function getX() {
return(currentX);
}
function getY() {
return(currentY);
}
function getRange() {
return(range);
}
function kill() {
clip.removeMovieClip();
}
function step() {
var _local6;
var _local8;
var _local9;
var _local3;
var _local4;
var _local7;
if (fireCount > 0) {
fireCount--;
}
if (_root.monsters.length > 0) {
target = _root.monsters[0];
_local3 = target.getX() - currentX;
_local4 = target.getY() - currentY;
_local7 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
if (_local7 > range) {
if (_root.monsters.length > 1) {
var _local5 = 0;
while (_local5 < _root.monsters.length) {
_local6 = _root.monsters[_local5];
_local3 = _local6.getX() - currentX;
_local4 = _local6.getY() - currentY;
if (_local7 > Math.sqrt((_local3 * _local3) + (_local4 * _local4))) {
target = _local6;
_local7 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
}
_local5++;
}
}
}
_local3 = target.getX() - currentX;
_local4 = target.getY() - currentY;
if (_local4 == 0) {
if (_local3 > 0) {
heading = 180;
} else {
heading = 0;
}
}
if (_local3 == 0) {
if (_local4 > 0) {
heading = 90;
} else {
heading = 270;
}
} else if (_local3 < 0) {
heading = (57.2957795130823 * Math.atan(_local4 / _local3)) + 180;
} else {
heading = 57.2957795130823 * Math.atan(_local4 / _local3);
}
clip.turret._rotation = heading;
if (_local7 <= range) {
if (fireCount <= 0) {
_root.bullets.push(new Bullet(target, currentX, currentY, type, level));
if (fx != "null") {
_local8 = _root.screen.attachMovie(fx, _root.getFXName(), _root.getFXDepth());
_local8._x = currentX;
_local8._y = currentY;
_local8._rotation = heading;
} else {
_local9 = ("Fire2-" + Math.ceil(Math.random() * 4)) + ".wav";
_root.playSound(_local9, clip._x);
}
fireCount = fireRate;
}
}
}
}
}
Symbol 59 MovieClip Frame 64 (14 B)
_root.play();
Symbol 64 Button (64 B)
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 71 MovieClip Frame 81 (30 B)
_root.play();
_root.play();
Symbol 74 MovieClip Frame 1 (15 B)
var count = 0;
Symbol 74 MovieClip Frame 2 (121 B)
this.count--;
if (this.count < -18) {
this._x--;
this.count = 0;
}
if (this._x < -1706) {
this._x = 0;
}
Symbol 74 MovieClip Frame 3 (21 B)
this.gotoAndPlay(2);
Symbol 112 MovieClip [Units1] Frame 1 (13 B)
this.stop();
Symbol 112 MovieClip [Units1] Frame 552 (13 B)
this.stop();
Symbol 113 MovieClip [Units2] Frame 1 (13 B)
this.stop();
Symbol 113 MovieClip [Units2] Frame 376 (13 B)
this.stop();
Symbol 114 MovieClip [Units3] Frame 1 (13 B)
this.stop();
Symbol 114 MovieClip [Units3] Frame 296 (13 B)
this.stop();
Symbol 115 MovieClip [Units4] Frame 1 (13 B)
this.stop();
Symbol 115 MovieClip [Units4] Frame 168 (13 B)
this.stop();
Symbol 300 MovieClip [FireFX1-1] Frame 1 (41 B)
_root.playSound("Fire1-1.wav", this._x);
Symbol 300 MovieClip [FireFX1-1] Frame 2 (24 B)
this.removeMovieClip();
Symbol 301 MovieClip [FireFX1-2] Frame 1 (41 B)
_root.playSound("Fire1-1.wav", this._x);
Symbol 301 MovieClip [FireFX1-2] Frame 2 (24 B)
this.removeMovieClip();
Symbol 302 MovieClip [FireFX1-3] Frame 1 (41 B)
_root.playSound("Fire1-1.wav", this._x);
Symbol 302 MovieClip [FireFX1-3] Frame 2 (41 B)
_root.playSound("Fire1-1.wav", this._x);
Symbol 302 MovieClip [FireFX1-3] Frame 3 (24 B)
this.removeMovieClip();
Symbol 305 MovieClip [FireFX2-1] Frame 1 (103 B)
var temp;
temp = ("Fire2-" + Math.ceil(Math.random() * 4)) + ".wav";
_root.playSound(temp, this._x);
Symbol 305 MovieClip [FireFX2-1] Frame 2 (115 B)
this._x = this._x + Math.floor((3 * Math.random()) + 3);
this._y = this._y - Math.floor((3 * Math.random()) + 3);
Symbol 305 MovieClip [FireFX2-1] Frame 3 (115 B)
this._x = this._x + Math.floor((3 * Math.random()) + 3);
this._y = this._y - Math.floor((3 * Math.random()) + 3);
Symbol 305 MovieClip [FireFX2-1] Frame 4 (115 B)
this._x = this._x + Math.floor((3 * Math.random()) + 3);
this._y = this._y - Math.floor((3 * Math.random()) + 3);
Symbol 305 MovieClip [FireFX2-1] Frame 5 (115 B)
this._x = this._x + Math.floor((3 * Math.random()) + 3);
this._y = this._y - Math.floor((3 * Math.random()) + 3);
Symbol 305 MovieClip [FireFX2-1] Frame 6 (24 B)
this.removeMovieClip();
Symbol 307 MovieClip [FireFX3-1] Frame 1 (41 B)
_root.playSound("Fire3-1.wav", this._x);
Symbol 307 MovieClip [FireFX3-1] Frame 4 (24 B)
this.removeMovieClip();
Symbol 310 MovieClip [FireFX4-1] Frame 1 (41 B)
_root.playSound("Fire4-1.wav", this._x);
Symbol 310 MovieClip [FireFX4-1] Frame 9 (24 B)
this.removeMovieClip();
Symbol 312 MovieClip [FireFX5-1] Frame 1 (41 B)
_root.playSound("Fire5-1.wav", this._x);
Symbol 312 MovieClip [FireFX5-1] Frame 5 (24 B)
this.removeMovieClip();
Symbol 314 MovieClip [FireFX6-1] Frame 1 (63 B)
_root.playSound("Fire6-1.wav", this._x);
this._rotation = 0;
Symbol 314 MovieClip [FireFX6-1] Frame 3 (24 B)
this.removeMovieClip();
Symbol 316 MovieClip [FireFX7-1] Frame 1 (41 B)
_root.playSound("Fire7-1.wav", this._x);
Symbol 316 MovieClip [FireFX7-1] Frame 4 (24 B)
this.removeMovieClip();
Symbol 318 MovieClip [FireFX7-2] Frame 1 (41 B)
_root.playSound("Fire7-1.wav", this._x);
Symbol 318 MovieClip [FireFX7-2] Frame 4 (24 B)
this.removeMovieClip();
Symbol 320 MovieClip [FireFX7-3] Frame 1 (41 B)
_root.playSound("Fire7-1.wav", this._x);
Symbol 320 MovieClip [FireFX7-3] Frame 4 (24 B)
this.removeMovieClip();
Symbol 322 MovieClip [FireFX7-4] Frame 1 (41 B)
_root.playSound("Fire7-1.wav", this._x);
Symbol 322 MovieClip [FireFX7-4] Frame 4 (24 B)
this.removeMovieClip();
Symbol 324 MovieClip [FireFX7-5] Frame 1 (41 B)
_root.playSound("Fire7-1.wav", this._x);
Symbol 324 MovieClip [FireFX7-5] Frame 4 (24 B)
this.removeMovieClip();
Symbol 328 MovieClip [HitFX1-1] Frame 4 (24 B)
this.removeMovieClip();
Symbol 332 MovieClip [HitFX1-2] Frame 5 (24 B)
this.removeMovieClip();
Symbol 336 MovieClip [HitFX3-1] Frame 1 (40 B)
_root.playSound("Hit3-1.wav", this._x);
Symbol 336 MovieClip [HitFX3-1] Frame 9 (24 B)
this.removeMovieClip();
Symbol 340 MovieClip [HitFX4-2] Frame 3 (91 B)
_root.playSound("Hit4-2.wav", this._x);
this._rotation = Math.floor(360 * Math.random());
Symbol 340 MovieClip [HitFX4-2] Frame 17 (91 B)
_root.playSound("Hit4-2.wav", this._x);
this._rotation = Math.floor(360 * Math.random());
Symbol 340 MovieClip [HitFX4-2] Frame 28 (91 B)
_root.playSound("Hit4-2.wav", this._x);
this._rotation = Math.floor(360 * Math.random());
Symbol 340 MovieClip [HitFX4-2] Frame 40 (91 B)
_root.playSound("Hit4-2.wav", this._x);
this._rotation = Math.floor(360 * Math.random());
Symbol 340 MovieClip [HitFX4-2] Frame 48 (24 B)
this.removeMovieClip();
Symbol 341 MovieClip [HitFX4-1] Frame 3 (24 B)
this.removeMovieClip();
Symbol 346 MovieClip [HitFX5-1] Frame 1 (40 B)
_root.playSound("Hit5-1.wav", this._x);
Symbol 346 MovieClip [HitFX5-1] Frame 10 (24 B)
this.removeMovieClip();
Symbol 348 MovieClip [HitFX6-1] Frame 3 (24 B)
this.removeMovieClip();
Symbol 351 MovieClip [HitFX7-1] Frame 1 (40 B)
_root.playSound("Hit7-1.wav", this._x);
Symbol 351 MovieClip [HitFX7-1] Frame 6 (24 B)
this.removeMovieClip();
Symbol 354 MovieClip [Crash] Frame 1 (39 B)
_root.playSound("Boing.wav", this._x);
Symbol 354 MovieClip [Crash] Frame 9 (24 B)
this.removeMovieClip();
Symbol 376 MovieClip Frame 1 (13 B)
this.stop();
Symbol 378 MovieClip [Die] Frame 1 (37 B)
_root.playSound("Pop.wav", this._x);
Symbol 378 MovieClip [Die] Frame 2 (115 B)
this._x = this._x + Math.floor((3 * Math.random()) + 3);
this._y = this._y - Math.floor((3 * Math.random()) + 3);
Symbol 378 MovieClip [Die] Frame 3 (115 B)
this._x = this._x + Math.floor((3 * Math.random()) + 3);
this._y = this._y - Math.floor((3 * Math.random()) + 3);
Symbol 378 MovieClip [Die] Frame 4 (115 B)
this._x = this._x + Math.floor((3 * Math.random()) + 3);
this._y = this._y - Math.floor((3 * Math.random()) + 3);
Symbol 378 MovieClip [Die] Frame 5 (115 B)
this._x = this._x + Math.floor((3 * Math.random()) + 3);
this._y = this._y - Math.floor((3 * Math.random()) + 3);
Symbol 378 MovieClip [Die] Frame 6 (24 B)
this.removeMovieClip();
Symbol 386 MovieClip Frame 1 (1.14 KiB) ●
_root.map[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[2] = new Array(0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0);
_root.map[3] = new Array(0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0);
_root.map[4] = new Array(0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0);
_root.map[5] = new Array(0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0);
_root.map[6] = new Array(1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1);
_root.map[7] = new Array(0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0);
_root.map[8] = new Array(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0);
_root.map[9] = new Array(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0);
_root.map[10] = new Array(0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0);
_root.map[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Symbol 386 MovieClip Frame 2 (1.14 KiB) ●
_root.map[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[2] = new Array(0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0);
_root.map[3] = new Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0);
_root.map[4] = new Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0);
_root.map[5] = new Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0);
_root.map[6] = new Array(1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1);
_root.map[7] = new Array(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0);
_root.map[8] = new Array(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0);
_root.map[9] = new Array(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0);
_root.map[10] = new Array(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0);
_root.map[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Symbol 386 MovieClip Frame 3 (1.14 KiB) ●
_root.map[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[2] = new Array(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[3] = new Array(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[4] = new Array(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[5] = new Array(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[6] = new Array(1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1);
_root.map[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0);
_root.map[8] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0);
_root.map[9] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0);
_root.map[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0);
_root.map[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Symbol 386 MovieClip Frame 4 (1.14 KiB) ●
_root.map[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[4] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[5] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[6] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
_root.map[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[8] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[9] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
_root.map[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Symbol 387 MovieClip Frame 1 (13 B)
this.stop();
Symbol 685 MovieClip Frame 1 (1.5 KiB) ●
startGameButton.onRollOver = function () {
info.gotoAndStop("StartGame");
_root.rollingOver = true;
};
instructionsButton.onRollOver = function () {
info.gotoAndStop("Instructions");
_root.rollingOver = true;
};
optionsButton.onRollOver = function () {
info.gotoAndStop("Options");
_root.rollingOver = true;
};
creditsButton.onRollOver = function () {
info.gotoAndStop("Credits");
_root.rollingOver = true;
};
startGameButton.onRollOut = function () {
_root.rollingOver = false;
};
instructionsButton.onRollOut = function () {
_root.rollingOver = false;
};
optionsButton.onRollOut = function () {
_root.rollingOver = false;
};
creditsButton.onRollOut = function () {
_root.rollingOver = false;
};
startGameButton.onRelease = function () {
_root.maps._visible = true;
_root.maps.gotoAndStop(_root.currentMap);
_root.infoBox.gotoAndStop("Start");
_root.playSound("Click.wav", this._x);
_root.rollingOver = false;
};
instructionsButton.onRelease = function () {
_root.infoBox.gotoAndStop("Instructions");
_root.playSound("Click.wav", this._x);
_root.rollingOver = false;
};
optionsButton.onRelease = function () {
_root.infoBox.gotoAndStop("Options");
_root.playSound("Click.wav", this._x);
_root.rollingOver = false;
};
creditsButton.onRelease = function () {
_root.infoBox.gotoAndStop("Credits");
_root.playSound("Click.wav", this._x);
_root.rollingOver = false;
};
armorButton.onRelease = function () {
getURL ("http://www.armorgames.com/", "_blank");
};
Symbol 685 MovieClip Frame 2 (318 B)
menuButton.onRollOver = function () {
info.gotoAndStop("Menu");
_root.rollingOver = true;
};
menuButton.onRollOut = function () {
_root.rollingOver = false;
};
menuButton.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.infoBox.gotoAndStop("Main");
_root.rollingOver = false;
};
Symbol 685 MovieClip Frame 3 (4.39 KiB) ●
brightnessTab._x = 200 + ((100 - _root.back._alpha) * 2);
soundTab._x = 200 + (_root.soundVolume / 3);
musicTab._x = 200 + (_root.musicVolume * 2);
if (_root.currentMusic == 1) {
musicArrow._x = 219;
} else if (_root.currentMusic == 2) {
musicArrow._x = 253;
} else {
musicArrow._x = 287;
}
if (_root._quality == "LOW") {
qualityArrow._x = 219;
} else if (_root._quality == "MEDIUM") {
qualityArrow._x = 253;
} else {
qualityArrow._x = 287;
}
menuButton.onRollOver = function () {
info.gotoAndStop("Menu");
_root.rollingOver = true;
};
brightnessBar.onRollOver = function () {
info.gotoAndStop("Brightness");
_root.rollingOver = true;
};
soundBar.onRollOver = function () {
info.gotoAndStop("Sound");
_root.rollingOver = true;
};
musicBar.onRollOver = function () {
info.gotoAndStop("Music");
_root.rollingOver = true;
};
music1Button.onRollOver = function () {
info.gotoAndStop("Music1");
_root.rollingOver = true;
};
music2Button.onRollOver = function () {
info.gotoAndStop("Music2");
_root.rollingOver = true;
};
music3Button.onRollOver = function () {
info.gotoAndStop("Music3");
_root.rollingOver = true;
};
quality1Button.onRollOver = function () {
info.gotoAndStop("Quality1");
_root.rollingOver = true;
};
quality2Button.onRollOver = function () {
info.gotoAndStop("Quality2");
_root.rollingOver = true;
};
quality3Button.onRollOver = function () {
info.gotoAndStop("Quality3");
_root.rollingOver = true;
};
menuButton.onRollOut = function () {
_root.rollingOver = false;
};
brightnessBar.onRollOut = function () {
_root.rollingOver = false;
};
soundBar.onRollOut = function () {
_root.rollingOver = false;
};
musicBar.onRollOut = function () {
_root.rollingOver = false;
};
music1Button.onRollOut = function () {
_root.rollingOver = false;
};
music2Button.onRollOut = function () {
_root.rollingOver = false;
};
music3Button.onRollOut = function () {
_root.rollingOver = false;
};
quality1Button.onRollOut = function () {
_root.rollingOver = false;
};
quality2Button.onRollOut = function () {
_root.rollingOver = false;
};
quality3Button.onRollOut = function () {
_root.rollingOver = false;
};
brightnessBar.onPress = function () {
_root.sliding = true;
_root.slidingTab = _root.infoBox.brightnessTab;
_root.selectNum = 1;
};
soundBar.onPress = function () {
_root.sliding = true;
_root.slidingTab = _root.infoBox.soundTab;
_root.selectNum = 2;
};
musicBar.onPress = function () {
_root.sliding = true;
_root.slidingTab = _root.infoBox.musicTab;
_root.selectNum = 3;
};
menuButton.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.infoBox.gotoAndStop("Main");
_root.rollingOver = false;
};
brightnessBar.onRelease = function () {
_root.sliding = false;
};
soundBar.onRelease = function () {
_root.sliding = false;
};
musicBar.onRelease = function () {
_root.sliding = false;
};
music1Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.currentMusic = 1;
_root.infoBox.musicArrow._x = 219;
_root.Music1.setVolume(_root.musicVolume);
_root.Music2.setVolume(0);
_root.Music3.setVolume(0);
};
music2Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.currentMusic = 2;
_root.infoBox.musicArrow._x = 253;
_root.Music1.setVolume(0);
_root.Music2.setVolume(_root.musicVolume);
_root.Music3.setVolume(0);
};
music3Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.currentMusic = 3;
_root.infoBox.musicArrow._x = 287;
_root.Music1.setVolume(0);
_root.Music2.setVolume(0);
_root.Music3.setVolume(_root.musicVolume);
};
quality1Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root._quality = "LOW";
_root.infoBox.qualityArrow._x = 219;
};
quality2Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root._quality = "MEDIUM";
_root.infoBox.qualityArrow._x = 253;
};
quality3Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root._quality = "HIGH";
_root.infoBox.qualityArrow._x = 287;
};
brightnessBar.onReleaseOutside = function () {
_root.sliding = false;
_root.rollingOver = false;
};
soundBar.onReleaseOutside = function () {
_root.sliding = false;
_root.rollingOver = false;
};
musicBar.onReleaseOutside = function () {
_root.sliding = false;
_root.rollingOver = false;
};
Symbol 685 MovieClip Frame 4 (998 B)
menuButton.onRollOver = function () {
info.gotoAndStop("Menu");
_root.rollingOver = true;
};
menuButton.onRollOut = function () {
_root.rollingOver = false;
};
menuButton.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.infoBox.gotoAndStop("Main");
_root.rollingOver = false;
};
music1Link.onRelease = function () {
getURL ("http://www.newgrounds.com/audio/view.php?id=814931&sub=16231", "_blank");
};
music2Link.onRelease = function () {
getURL ("http://www.newgrounds.com/audio/view.php?id=1840528&sub=79138", "_blank");
};
music3Link.onRelease = function () {
getURL ("http://www.newgrounds.com/audio/view.php?id=1866498&sub=79195", "_blank");
};
imageLink.onRelease = function () {
getURL ("http://hubblesite.org/gallery/", "_blank");
};
newgroundsLink.onRelease = function () {
getURL ("http://www.newgrounds.com/", "_blank");
};
armorLink.onRelease = function () {
getURL ("http://www.armorgames.com/", "_blank");
};
Symbol 685 MovieClip Frame 5 (1.29 KiB) ●
startButton.onRelease = function () {
gotoAndStop ("Basic");
_root.selecting = false;
_root.constructing = false;
_root.skipButton._visible = true;
_root.pausingButton._visible = true;
_root.game.gotoAndPlay(2);
_root.pausing = false;
_root.playSound("Click.wav", this._x);
};
upButton.onRelease = function () {
with (_root) {
if (currentMap < 4) {
currentMap++;
maps.gotoAndStop(currentMap);
} else {
currentMap = 1;
maps.gotoAndStop(currentMap);
}
if (currentMap == 1) {
infoBox.mapInfo.text = "Easy";
} else if (currentMap == 2) {
infoBox.mapInfo.text = "Hard";
} else if (currentMap == 3) {
infoBox.mapInfo.text = "Really Hard";
} else {
infoBox.mapInfo.text = "Impossible";
}
}
_root.playSound("Click.wav", this._x);
};
downButton.onRelease = function () {
with (_root) {
if (currentMap > 1) {
currentMap--;
maps.gotoAndStop(currentMap);
} else {
currentMap = 4;
maps.gotoAndStop(currentMap);
}
if (currentMap == 1) {
infoBox.mapInfo.text = "Easy";
} else if (currentMap == 2) {
infoBox.mapInfo.text = "Hard";
} else if (currentMap == 3) {
infoBox.mapInfo.text = "Really Hard";
} else {
infoBox.mapInfo.text = "Impossible";
}
}
_root.playSound("Click.wav", this._x);
};
Symbol 685 MovieClip Frame 6 (4.64 KiB) ●
brightnessTab._x = 200 + ((100 - _root.back._alpha) * 2);
soundTab._x = 200 + (_root.soundVolume / 3);
musicTab._x = 200 + (_root.musicVolume * 2);
if (_root.currentMusic == 1) {
musicArrow._x = 219;
} else if (_root.currentMusic == 2) {
musicArrow._x = 253;
} else {
musicArrow._x = 287;
}
if (_root._quality == "LOW") {
qualityArrow._x = 219;
} else if (_root._quality == "MEDIUM") {
qualityArrow._x = 253;
} else {
qualityArrow._x = 287;
}
resumeButton.onRollOver = function () {
info.gotoAndStop("Resume");
_root.rollingOver = true;
};
menuButton.onRollOver = function () {
info.gotoAndStop("Menu");
_root.rollingOver = true;
};
brightnessBar.onRollOver = function () {
info.gotoAndStop("Brightness");
_root.rollingOver = true;
};
soundBar.onRollOver = function () {
info.gotoAndStop("Sound");
_root.rollingOver = true;
};
musicBar.onRollOver = function () {
info.gotoAndStop("Music");
_root.rollingOver = true;
};
music1Button.onRollOver = function () {
info.gotoAndStop("Music1");
_root.rollingOver = true;
};
music2Button.onRollOver = function () {
info.gotoAndStop("Music2");
_root.rollingOver = true;
};
music3Button.onRollOver = function () {
info.gotoAndStop("Music3");
_root.rollingOver = true;
};
quality1Button.onRollOver = function () {
info.gotoAndStop("Quality1");
_root.rollingOver = true;
};
quality2Button.onRollOver = function () {
info.gotoAndStop("Quality2");
_root.rollingOver = true;
};
quality3Button.onRollOver = function () {
info.gotoAndStop("Quality3");
_root.rollingOver = true;
};
resumeButton.onRollOut = function () {
_root.rollingOver = false;
};
menuButton.onRollOut = function () {
_root.rollingOver = false;
};
brightnessBar.onRollOut = function () {
_root.rollingOver = false;
};
soundBar.onRollOut = function () {
_root.rollingOver = false;
};
musicBar.onRollOut = function () {
_root.rollingOver = false;
};
music1Button.onRollOut = function () {
_root.rollingOver = false;
};
music2Button.onRollOut = function () {
_root.rollingOver = false;
};
music3Button.onRollOut = function () {
_root.rollingOver = false;
};
quality1Button.onRollOut = function () {
_root.rollingOver = false;
};
quality2Button.onRollOut = function () {
_root.rollingOver = false;
};
quality3Button.onRollOut = function () {
_root.rollingOver = false;
};
brightnessBar.onPress = function () {
_root.sliding = true;
_root.slidingTab = _root.infoBox.brightnessTab;
_root.selectNum = 1;
};
soundBar.onPress = function () {
_root.sliding = true;
_root.slidingTab = _root.infoBox.soundTab;
_root.selectNum = 2;
};
musicBar.onPress = function () {
_root.sliding = true;
_root.slidingTab = _root.infoBox.musicTab;
_root.selectNum = 3;
};
resumeButton.onRelease = function () {
_root.pauseOff();
_root.playSound("Click.wav", this._x);
};
menuButton.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.pauseOff();
_root.gotoAndPlay(5);
};
brightnessBar.onRelease = function () {
_root.sliding = false;
};
soundBar.onRelease = function () {
_root.sliding = false;
};
musicBar.onRelease = function () {
_root.sliding = false;
};
music1Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.currentMusic = 1;
_root.infoBox.musicArrow._x = 219;
_root.Music1.setVolume(_root.musicVolume);
_root.Music2.setVolume(0);
_root.Music3.setVolume(0);
};
music2Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.currentMusic = 2;
_root.infoBox.musicArrow._x = 253;
_root.Music1.setVolume(0);
_root.Music2.setVolume(_root.musicVolume);
_root.Music3.setVolume(0);
};
music3Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.currentMusic = 3;
_root.infoBox.musicArrow._x = 287;
_root.Music1.setVolume(0);
_root.Music2.setVolume(0);
_root.Music3.setVolume(_root.musicVolume);
};
quality1Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root._quality = "LOW";
_root.infoBox.qualityArrow._x = 219;
};
quality2Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root._quality = "MEDIUM";
_root.infoBox.qualityArrow._x = 253;
};
quality3Button.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root._quality = "HIGH";
_root.infoBox.qualityArrow._x = 287;
};
brightnessBar.onReleaseOutside = function () {
_root.sliding = false;
_root.rollingOver = false;
};
soundBar.onReleaseOutside = function () {
_root.sliding = false;
_root.rollingOver = false;
};
musicBar.onReleaseOutside = function () {
_root.sliding = false;
_root.rollingOver = false;
};
Symbol 685 MovieClip Frame 7 (419 B)
menuButton.onRollOver = function () {
info.gotoAndStop("Menu");
_root.rollingOver = true;
};
menuButton.onRollOut = function () {
info.gotoAndStop("Empty");
_root.rollingOver = false;
};
menuButton.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.pauseOff();
_root.gotoAndPlay(5);
};
armorButton.onRelease = function () {
getURL ("http://www.armorgames.com/", "_blank");
};
Symbol 685 MovieClip Frame 8 (419 B)
menuButton.onRollOver = function () {
info.gotoAndStop("Menu");
_root.rollingOver = true;
};
menuButton.onRollOut = function () {
info.gotoAndStop("Empty");
_root.rollingOver = false;
};
menuButton.onRelease = function () {
_root.playSound("Click.wav", this._x);
_root.pauseOff();
_root.gotoAndPlay(5);
};
armorButton.onRelease = function () {
getURL ("http://www.armorgames.com/", "_blank");
};
Symbol 685 MovieClip Frame 9 (3.97 KiB) ●
skipButton.onRollOver = function () {
info.gotoAndStop("Skip");
_root.rollingOver = true;
};
pausingButton.onRollOver = function () {
info.gotoAndStop("Pause");
_root.rollingOver = true;
};
cancelButton.onRollOver = function () {
info.gotoAndStop("Cancel");
_root.rollingOver = true;
};
tower1Button.onRollOver = function () {
info.gotoAndStop("OverTower1");
_root.rollingOver = true;
};
tower2Button.onRollOver = function () {
info.gotoAndStop("OverTower2");
_root.rollingOver = true;
};
tower3Button.onRollOver = function () {
info.gotoAndStop("OverTower3");
_root.rollingOver = true;
};
tower4Button.onRollOver = function () {
info.gotoAndStop("OverTower4");
_root.rollingOver = true;
};
tower5Button.onRollOver = function () {
info.gotoAndStop("OverTower5");
_root.rollingOver = true;
};
tower6Button.onRollOver = function () {
info.gotoAndStop("OverTower6");
_root.rollingOver = true;
};
tower7Button.onRollOver = function () {
info.gotoAndStop("OverTower7");
_root.rollingOver = true;
};
skipButton.onRollOut = function () {
_root.rollingOver = false;
};
pausingButton.onRollOut = function () {
_root.rollingOver = false;
};
cancelButton.onRollOut = function () {
_root.rollingOver = false;
};
tower1Button.onRollOut = function () {
_root.rollingOver = false;
};
tower2Button.onRollOut = function () {
_root.rollingOver = false;
};
tower3Button.onRollOut = function () {
_root.rollingOver = false;
};
tower4Button.onRollOut = function () {
_root.rollingOver = false;
};
tower5Button.onRollOut = function () {
_root.rollingOver = false;
};
tower6Button.onRollOut = function () {
_root.rollingOver = false;
};
tower7Button.onRollOut = function () {
_root.rollingOver = false;
};
skipButton.onRelease = function () {
_root.timeLeft = 0;
_root.frameCount = 0;
_root.playSound("Click.wav", this._x);
};
pausingButton.onRelease = function () {
_root.infoBox.gotoAndStop("Pause");
_root.rollingOver = false;
_root.pauseOn();
_root.playSound("Click.wav", this._x);
};
cancelButton.onRelease = function () {
_root.constructing = false;
_root.selecting = false;
_root.playSound("Click.wav", this._x);
};
tower1Button.onRelease = function () {
with (_root) {
if (money >= getPrice(1, 1)) {
constructing = true;
towerType = 1;
cost = getPrice(1, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower2Button.onRelease = function () {
with (_root) {
if (money >= getPrice(2, 1)) {
constructing = true;
towerType = 2;
cost = getPrice(2, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower3Button.onRelease = function () {
with (_root) {
if (money >= getPrice(3, 1)) {
constructing = true;
towerType = 3;
cost = getPrice(3, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower4Button.onRelease = function () {
with (_root) {
if (money >= getPrice(4, 1)) {
constructing = true;
towerType = 4;
cost = getPrice(4, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower5Button.onRelease = function () {
with (_root) {
if (money >= getPrice(5, 1)) {
constructing = true;
towerType = 5;
cost = getPrice(5, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower6Button.onRelease = function () {
with (_root) {
if (money >= getPrice(6, 1)) {
constructing = true;
towerType = 6;
cost = getPrice(6, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower7Button.onRelease = function () {
with (_root) {
if (money >= getPrice(7, 1)) {
constructing = true;
towerType = 7;
cost = getPrice(7, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
Symbol 685 MovieClip Frame 10 (5.66 KiB) ● ●
skipButton.onRollOver = function () {
info.gotoAndStop("Skip");
_root.rollingOver = true;
};
pausingButton.onRollOver = function () {
info.gotoAndStop("Pause");
_root.rollingOver = true;
};
sellButton.onRollOver = function () {
info.gotoAndStop("Sell");
_root.rollingOver = true;
};
upgradeButton.onRollOver = function () {
var _local2;
_local2 = (("UpgradeTower" + _root.towers[_root.selectNum].getType()) + "-") + _root.towers[_root.selectNum].getLevel();
info.gotoAndStop(_local2);
_root.rollingOver = true;
};
cancelButton.onRollOver = function () {
info.gotoAndStop("Cancel");
_root.rollingOver = true;
};
tower1Button.onRollOver = function () {
info.gotoAndStop("OverTower1");
_root.rollingOver = true;
};
tower2Button.onRollOver = function () {
info.gotoAndStop("OverTower2");
_root.rollingOver = true;
};
tower3Button.onRollOver = function () {
info.gotoAndStop("OverTower3");
_root.rollingOver = true;
};
tower4Button.onRollOver = function () {
info.gotoAndStop("OverTower4");
_root.rollingOver = true;
};
tower5Button.onRollOver = function () {
info.gotoAndStop("OverTower5");
_root.rollingOver = true;
};
tower6Button.onRollOver = function () {
info.gotoAndStop("OverTower6");
_root.rollingOver = true;
};
tower7Button.onRollOver = function () {
info.gotoAndStop("OverTower7");
_root.rollingOver = true;
};
skipButton.onRollOut = function () {
_root.rollingOver = false;
};
pausingButton.onRollOut = function () {
_root.rollingOver = false;
};
sellButton.onRollOut = function () {
_root.rollingOver = false;
};
upgradeButton.onRollOut = function () {
_root.rollingOver = false;
};
cancelButton.onRollOut = function () {
_root.rollingOver = false;
};
tower1Button.onRollOut = function () {
_root.rollingOver = false;
};
tower2Button.onRollOut = function () {
_root.rollingOver = false;
};
tower3Button.onRollOut = function () {
_root.rollingOver = false;
};
tower4Button.onRollOut = function () {
_root.rollingOver = false;
};
tower5Button.onRollOut = function () {
_root.rollingOver = false;
};
tower6Button.onRollOut = function () {
_root.rollingOver = false;
};
tower7Button.onRollOut = function () {
_root.rollingOver = false;
};
skipButton.onRelease = function () {
_root.timeLeft = 0;
_root.frameCount = 0;
_root.playSound("Click.wav", this._x);
};
pausingButton.onRelease = function () {
_root.infoBox.gotoAndStop("Pause");
_root.pauseOn();
_root.playSound("Click.wav", this._x);
};
sellButton.onRelease = function () {
var tempX;
var tempY;
with (_root) {
money = money + Math.floor(getSale(towers[selectNum].getType(), towers[selectNum].getLevel()) * 0.7);
tempX = Math.floor(towers[selectNum].getX() / 24);
tempY = Math.floor(towers[selectNum].getY() / 24);
map[tempY][tempX] = 0;
towers[selectNum].kill();
towers.splice(selectNum, 1);
selecting = false;
}
_root.playSound("Click.wav", this._x);
};
upgradeButton.onRelease = function () {
var temp;
with (_root) {
if (money >= getPrice(towers[selectNum].getType(), towers[selectNum].getLevel() + 1)) {
money = money - getPrice(towers[selectNum].getType(), towers[selectNum].getLevel() + 1);
towers.push(new Tower(towers[selectNum].getX(), towers[selectNum].getY(), towers[selectNum].getType(), towers[selectNum].getLevel() + 1));
towers[selectNum].kill();
towers.splice(selectNum, 1);
selectNum = towers.length - 1;
if (towers[selectNum].getLevel() == 5) {
_root.rollingOver = false;
} else {
temp = (("UpgradeTower" + towers[selectNum].getType()) + "-") + towers[selectNum].getLevel();
info.gotoAndStop(temp);
}
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
cancelButton.onRelease = function () {
_root.constructing = false;
_root.selecting = false;
_root.playSound("Click.wav", this._x);
};
tower1Button.onRelease = function () {
with (_root) {
if (money >= getPrice(1, 1)) {
constructing = true;
towerType = 1;
cost = getPrice(1, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower2Button.onRelease = function () {
with (_root) {
if (money >= getPrice(2, 1)) {
constructing = true;
towerType = 2;
cost = getPrice(2, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower3Button.onRelease = function () {
with (_root) {
if (money >= getPrice(3, 1)) {
constructing = true;
towerType = 3;
cost = getPrice(3, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower4Button.onRelease = function () {
with (_root) {
if (money >= getPrice(4, 1)) {
constructing = true;
towerType = 4;
cost = getPrice(4, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower5Button.onRelease = function () {
with (_root) {
if (money >= getPrice(5, 1)) {
constructing = true;
towerType = 5;
cost = getPrice(5, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower6Button.onRelease = function () {
with (_root) {
if (money >= getPrice(6, 1)) {
constructing = true;
towerType = 6;
cost = getPrice(6, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower7Button.onRelease = function () {
with (_root) {
if (money >= getPrice(7, 1)) {
constructing = true;
towerType = 7;
cost = getPrice(7, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
Symbol 685 MovieClip Frame 11 (4.55 KiB) ●
skipButton.onRollOver = function () {
info.gotoAndStop("Skip");
_root.rollingOver = true;
};
pausingButton.onRollOver = function () {
info.gotoAndStop("Pause");
_root.rollingOver = true;
};
sellButton.onRollOver = function () {
info.gotoAndStop("Sell");
_root.rollingOver = true;
};
cancelButton.onRollOver = function () {
info.gotoAndStop("Cancel");
_root.rollingOver = true;
};
tower1Button.onRollOver = function () {
info.gotoAndStop("OverTower1");
_root.rollingOver = true;
};
tower2Button.onRollOver = function () {
info.gotoAndStop("OverTower2");
_root.rollingOver = true;
};
tower3Button.onRollOver = function () {
info.gotoAndStop("OverTower3");
_root.rollingOver = true;
};
tower4Button.onRollOver = function () {
info.gotoAndStop("OverTower4");
_root.rollingOver = true;
};
tower5Button.onRollOver = function () {
info.gotoAndStop("OverTower5");
_root.rollingOver = true;
};
tower6Button.onRollOver = function () {
info.gotoAndStop("OverTower6");
_root.rollingOver = true;
};
tower7Button.onRollOver = function () {
info.gotoAndStop("OverTower7");
_root.rollingOver = true;
};
skipButton.onRollOut = function () {
_root.rollingOver = false;
};
pausingButton.onRollOut = function () {
_root.rollingOver = false;
};
sellButton.onRollOut = function () {
_root.rollingOver = false;
};
cancelButton.onRollOut = function () {
_root.rollingOver = false;
};
tower1Button.onRollOut = function () {
_root.rollingOver = false;
};
tower2Button.onRollOut = function () {
_root.rollingOver = false;
};
tower3Button.onRollOut = function () {
_root.rollingOver = false;
};
tower4Button.onRollOut = function () {
_root.rollingOver = false;
};
tower5Button.onRollOut = function () {
_root.rollingOver = false;
};
tower6Button.onRollOut = function () {
_root.rollingOver = false;
};
tower7Button.onRollOut = function () {
_root.rollingOver = false;
};
skipButton.onRelease = function () {
_root.timeLeft = 0;
_root.frameCount = 0;
_root.playSound("Click.wav", this._x);
};
pausingButton.onRelease = function () {
_root.infoBox.gotoAndStop("Pause");
_root.pauseOn();
_root.playSound("Click.wav", this._x);
};
sellButton.onRelease = function () {
var tempX;
var tempY;
with (_root) {
money = money + Math.floor(getSale(towers[selectNum].getType(), towers[selectNum].getLevel()) * 0.7);
tempX = Math.floor(towers[selectNum].getX() / 24);
tempY = Math.floor(towers[selectNum].getY() / 24);
map[tempY][tempX] = 0;
towers[selectNum].kill();
towers.splice(selectNum, 1);
selecting = false;
}
_root.playSound("Click.wav", this._x);
};
cancelButton.onRelease = function () {
_root.constructing = false;
_root.selecting = false;
_root.playSound("Click.wav", this._x);
};
tower1Button.onRelease = function () {
with (_root) {
if (money >= getPrice(1, 1)) {
constructing = true;
towerType = 1;
cost = getPrice(1, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower2Button.onRelease = function () {
with (_root) {
if (money >= getPrice(2, 1)) {
constructing = true;
towerType = 2;
cost = getPrice(2, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower3Button.onRelease = function () {
with (_root) {
if (money >= getPrice(3, 1)) {
constructing = true;
towerType = 3;
cost = getPrice(3, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower4Button.onRelease = function () {
with (_root) {
if (money >= getPrice(4, 1)) {
constructing = true;
towerType = 4;
cost = getPrice(4, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower5Button.onRelease = function () {
with (_root) {
if (money >= getPrice(5, 1)) {
constructing = true;
towerType = 5;
cost = getPrice(5, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower6Button.onRelease = function () {
with (_root) {
if (money >= getPrice(6, 1)) {
constructing = true;
towerType = 6;
cost = getPrice(6, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};
tower7Button.onRelease = function () {
with (_root) {
if (money >= getPrice(7, 1)) {
constructing = true;
towerType = 7;
cost = getPrice(7, 1);
playSound("Click.wav", this._x);
} else {
playSound("Thud.wav", this._x);
}
}
};