Frame 1
Instance of Symbol 59 MovieClip "splash" in Frame 1
onClipEvent (load) {
startbutton._visible = false;
}
Frame 3
trace("frame4");
a = _root.getBytesLoaded();
b = _root.getBytesTotal();
_root.splash.progressbar._width = (260 / b) * a;
if ((a == b) && (a > 1000)) {
_root.splash.progressbar._width = 260;
_root.splash.startbutton._visible = true;
stop();
} else {
gotoAndPlay (2);
}
Instance of Symbol 68 MovieClip in Frame 4
on (press) {
_root.ui.gotoAndStop(1);
_root.selectedTower = "";
_root.glow._x = 650;
_root.ranger._x = 650;
_root.ranger._width = 10;
_root.ranger._height = 10;
}
Instance of Symbol 170 MovieClip "ui" in Frame 4
onClipEvent (load) {
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
swapDepths(4000);
wait = 1;
}
onClipEvent (enterFrame) {
if (_root.creepArray.length > 1) {
wait = 0;
}
if ((wait == 0) && (_root.lives > 0)) {
allGone = 1;
i = 0;
while (i < _root.creepArray.length) {
if (("" + _root.creepArray[i]) != "") {
allGone = 0;
}
i++;
}
if (allGone == 1) {
trace("All Gone");
_root.cash = int((_root.gold / 100) * _root.interest);
_root.statusText(((((("<font color='#000099'><b>Interest earned:</b> " + _root.gold) + "g x ") + _root.interest) + "% = ") + (_root.gold + _root.cash)) + "g</font>");
_root.gold = _root.gold + _root.cash;
if ((((_root.level == 7) || (_root.level == 14)) || (_root.level == 21)) || (_root.level == 28)) {
_root.wood++;
_root.statusText(("<font color='#009900'><b>Wood earned:</b> You now have " + _root.wood) + " wood, use it to upgrade.</font>");
}
wait = 1;
_root.creepArray = [];
if (_root.level == _root.levels.length) {
_root.gameOver();
}
nextButton.gotoAndStop(3);
}
}
}
Instance of Symbol 173 MovieClip "marker" in Frame 4
onClipEvent (load) {
active = 0;
}
onClipEvent (enterFrame) {
if (active == 1) {
_x = ((int((_root._xmouse - 5) / 10) * 10) + 10);
_y = ((int((_root._ymouse - 5) / 10) * 10) + 10);
if (_root.grass.build.hitTest(_x, _y, 1)) {
gotoAndStop (1);
} else {
_x = (_x + (Math.cos(getTimer() / 150) * 2));
_y = (_y + (Math.sin(getTimer() / 150) * 2));
gotoAndStop (2);
}
if (Key.isDown(27)) {
active = 0;
_x = 620;
_y = 140;
}
_root.ranger._x = _x;
_root.ranger._y = _y;
_root.ranger.rate = _root["tower-" + tower].rate;
_root.ranger._width = _root["tower-" + tower].range * 2;
_root.ranger._height = _root["tower-" + tower].range * 2;
}
}
on (press) {
if (_root.grass.build.hitTest(_x, _y, 1)) {
_root.towerCount++;
_root["tower-" + tower].duplicateMovieClip("t" + _root.towerCount, 500 + _root.towerCount);
a = _root["t" + _root.towerCount];
a._x = _x;
a._y = _y;
a.active = 1;
a.cost = cost;
active = 0;
_root.gold = _root.gold - cost;
_x = 650;
_root.ranger._x = 650;
_root.ranger._width = 10;
_root.ranger._height = 10;
}
}
Instance of Symbol 176 MovieClip "glow" in Frame 4
onClipEvent (load) {
swapDepths(10000);
}
Instance of Symbol 179 MovieClip "ranger" in Frame 4
onClipEvent (load) {
rate = 1000;
r = 0;
}
onClipEvent (enterFrame) {
if (r > rate) {
r = 0;
gotoAndPlay (2);
}
r++;
}
Instance of Symbol 188 MovieClip in Frame 4
onClipEvent (load) {
this.swapDepths(9999999);
if (_root.stolen == 0) {
_visible = false;
} else if (_root.expired == 1) {
gotoAndStop (2);
}
}
Instance of Symbol 239 MovieClip "tower-water" in Frame 4
onClipEvent (load) {
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
towerTitle = "Water [50 gold]";
towerDescription = "Medium damage with a high fire rate, slows, can be upgraded to splash.";
towerNotes = "Land + Air";
range = 75;
rate = 15;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
lvl = 1;
speed = 10;
acc = 0;
maxspeed = 10;
projectile = "shot-water";
dmg = 25;
slow = 1;
splash = 0;
air = 1;
immune = 1;
upgrades = [["Adds a small splash to the slow, no more damage.", 25, 30, 75, 15, 25, 1], ["Adds a larger splash, still no more damage.", 25, 35, 75, 15, 45, 1], ["Adds a huge splash, but still no more damage. (this is a slow tower)", 25, 40, 75, 15, 55, 1]];
if (active == 1) {
}
}
on (press) {
_root.passInfo(this);
}
onClipEvent (enterFrame) {
if (active == 1) {
lastChecked++;
lastFire++;
if (lastChecked >= 10) {
lastChecked = 0;
if ((target == 0) && (_root.creepArray.length > 0)) {
i = 0;
while (i <= _root.creepArray.length) {
if (target == 0) {
if (("" + _root.creepArray[i]) != "undefined") {
i = 0;
while (i <= _root.creepArray.length) {
if ((_root.creepArray[i]._y > 20) && (_root.creepArray[i].RIP == 0)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
if ((((_root.creepArray[i].air == 0) || (air == 1)) && ((_root.creepArray[i].immune == 0) || (immune == 1))) && (_root.creepArray[i].RIP == 0)) {
target = 1;
creep = _root.creepArray[i];
lastFire = 999;
}
}
}
i++;
}
}
}
i++;
}
}
}
if (target != 0) {
if (lastFire > rate) {
if (("" + creep) == "") {
target = 0;
lastChecked = 999;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
lastChecked = 18;
_root.fire(this, creep, speed, acc, maxspeed, projectile, dmg, slow, splash);
lastFire = 0;
}
}
}
}
}
}
Instance of Symbol 246 MovieClip "tower-arrow" in Frame 4
onClipEvent (load) {
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
towerTitle = "Arrow [7 gold]";
towerDescription = "Low damage but very fast fire rate";
towerNotes = "Land + Air";
range = 100;
rate = 20;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
lvl = 1;
speed = 15;
acc = 0.5;
maxspeed = 20;
projectile = "shot-arrow";
dmg = 6;
slow = 0;
splash = 0;
air = 1;
immune = 1;
upgrades = [["Increase the damage to 16 and a small increase in range", 13, 16, 110, 20, 0], ["Increase the damage to 39 and a small increase in range", 32, 39, 125, 20, 0]];
if (active == 1) {
}
}
on (press) {
_root.passInfo(this);
}
onClipEvent (enterFrame) {
if (active == 1) {
lastChecked++;
lastFire++;
if (lastChecked >= 10) {
lastChecked = 0;
if ((target == 0) && (_root.creepArray.length > 0)) {
i = 0;
while (i <= _root.creepArray.length) {
if (target == 0) {
if (("" + _root.creepArray[i]) != "undefined") {
if ((_root.creepArray[i]._y > 20) && (_root.creepArray[i].RIP == 0)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
if ((((_root.creepArray[i].air == 0) || (air == 1)) && ((_root.creepArray[i].immune == 0) || (immune == 1))) && (_root.creepArray[i].RIP == 0)) {
target = 1;
lastFire = 999;
creep = _root.creepArray[i];
}
}
}
}
}
i++;
}
}
}
if (target != 0) {
if (lastFire > rate) {
if (("" + creep) == "") {
target = 0;
lastChecked = 999;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
lastChecked = 18;
_root.fire(this, creep, speed, acc, maxspeed, projectile, dmg, slow, splash);
lastFire = 0;
}
}
}
}
}
}
Instance of Symbol 253 MovieClip "tower-cannon" in Frame 4
onClipEvent (load) {
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
towerTitle = "Cannon [9 gold]";
towerDescription = "Slow but with good damage and splash";
towerNotes = "Land ONLY";
range = 70;
rate = 25;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
lvl = 1;
speed = 5;
acc = 0.1;
maxspeed = 8;
projectile = "shot-cannon";
dmg = 9;
slow = 0;
splash = 40;
air = 0;
immune = 1;
upgrades = [["Increase the damage to 24", 15, 24, 70, 25, 40], ["Increase the damage to 50 and the splash to 60", 26, 50, 70, 25, 60]];
if (active == 1) {
}
}
on (press) {
_root.passInfo(this);
}
onClipEvent (enterFrame) {
if (active == 1) {
lastChecked++;
lastFire++;
if (lastChecked >= 10) {
lastChecked = 0;
if ((target == 0) && (_root.creepArray.length > 0)) {
i = 0;
while (i <= _root.creepArray.length) {
if (target == 0) {
if (("" + _root.creepArray[i]) != "undefined") {
if ((_root.creepArray[i]._y > 20) && (_root.creepArray[i].RIP == 0)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
if ((((_root.creepArray[i].air == 0) || (air == 1)) && ((_root.creepArray[i].immune == 0) || (immune == 1))) && (_root.creepArray[i].RIP == 0)) {
target = 1;
lastFire = 999;
creep = _root.creepArray[i];
}
}
}
}
}
i++;
}
}
}
if (target != 0) {
if (lastFire > rate) {
if (("" + creep) == "") {
target = 0;
lastChecked = 999;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
lastChecked = 18;
top._rotation = (Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593;
_root.fire(this, creep, speed, acc, maxspeed, projectile, dmg, slow, splash);
lastFire = 0;
}
}
}
}
}
}
Instance of Symbol 266 MovieClip "tower-earth" in Frame 4
onClipEvent (load) {
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
towerTitle = "Earth [50 gold]";
towerDescription = "Huge damage, slow fire rate.";
towerNotes = "Land ONLY";
range = 100;
rate = 100;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
lvl = 1;
speed = 7;
acc = 0.5;
maxspeed = 15;
projectile = "shot-earth";
dmg = 120;
slow = 0;
splash = 0;
air = 0;
immune = 1;
upgrades = [["Double the damage with a larger range", 75, 240, 110, 100, 0, 0], ["Double the damage again and upgrade the range", 100, 480, 120, 100, 0, 0], ["Double the damage yet again!! and upgrade the range", 150, 960, 130, 100, 0, 0]];
if (active == 1) {
}
}
on (press) {
_root.passInfo(this);
}
onClipEvent (enterFrame) {
if (active == 1) {
lastChecked++;
lastFire++;
if (lastChecked >= 10) {
lastChecked = 0;
if ((target == 0) && (_root.creepArray.length > 0)) {
i = 0;
while (i <= _root.creepArray.length) {
if (target == 0) {
if (("" + _root.creepArray[i]) != "undefined") {
if ((_root.creepArray[i]._y > 20) && (_root.creepArray[i].RIP == 0)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
if ((((_root.creepArray[i].air == 0) || (air == 1)) && ((_root.creepArray[i].immune == 0) || (immune == 1))) && (_root.creepArray[i].RIP == 0)) {
target = 1;
creep = _root.creepArray[i];
lastFire = 999;
}
}
}
}
}
i++;
}
}
}
if (target != 0) {
if (lastFire > rate) {
if (("" + creep) == "") {
target = 0;
lastChecked = 999;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
lastChecked = 18;
this.gotoAndPlay(2);
_root.fire(this, creep, speed, acc, maxspeed, projectile, dmg, slow, splash);
lastFire = 0;
}
}
}
}
}
}
Instance of Symbol 274 MovieClip "tower-fire" in Frame 4
onClipEvent (load) {
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
towerTitle = "Fire [50 gold]";
towerDescription = "Large damage, slow fire rate, splash.";
towerNotes = "Land + Air";
range = 100;
rate = 40;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
lvl = 1;
speed = 8;
acc = 0.5;
maxspeed = 20;
projectile = "shot-fire";
dmg = 75;
slow = 0;
splash = 75;
air = 1;
immune = 1;
upgrades = [["175 damage with a larger splash", 75, 175, 100, 40, 85, 0], ["300 damage with a larger splash", 100, 300, 100, 40, 95, 0], ["400 damage with a larger splash", 150, 400, 100, 40, 105, 0]];
if (active == 1) {
}
}
on (press) {
_root.passInfo(this);
}
onClipEvent (enterFrame) {
if (active == 1) {
lastChecked++;
lastFire++;
if (lastChecked >= 10) {
lastChecked = 0;
if ((target == 0) && (_root.creepArray.length > 0)) {
i = 0;
while (i <= _root.creepArray.length) {
if (target == 0) {
if (("" + _root.creepArray[i]) != "undefined") {
if ((_root.creepArray[i]._y > 20) && (_root.creepArray[i].RIP == 0)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
if ((((_root.creepArray[i].air == 0) || (air == 1)) && ((_root.creepArray[i].immune == 0) || (immune == 1))) && (_root.creepArray[i].RIP == 0)) {
target = 1;
creep = _root.creepArray[i];
lastFire = 999;
}
}
}
}
}
i++;
}
}
}
if (target != 0) {
if (lastFire > rate) {
if (("" + creep) == "") {
target = 0;
lastChecked = 999;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
lastChecked = 18;
this.gotoAndPlay(2);
_root.fire(this, creep, speed, acc, maxspeed, projectile, dmg, slow, splash);
lastFire = 0;
}
}
}
}
}
}
Instance of Symbol 283 MovieClip "tower-rocket" in Frame 4
onClipEvent (load) {
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
towerTitle = "Rocket [200 gold]";
towerDescription = "Fire + Earth + Water\rHUGE range and damage";
towerNotes = "Land + Air";
range = 170;
rate = 65;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
lvl = 1;
speed = 1;
acc = 0.2;
maxspeed = 12;
projectile = "shot-rocket";
dmg = 2000;
slow = 0;
splash = 0;
air = 1;
immune = 1;
upgrades = [["Same damage but twice as fast!!", 190, 2000, 170, 32, 0, 0]];
if (active == 1) {
}
}
on (press) {
_root.passInfo(this);
}
onClipEvent (enterFrame) {
if (active == 1) {
lastChecked++;
lastFire++;
if (lastChecked >= 10) {
lastChecked = 0;
if ((target == 0) && (_root.creepArray.length > 0)) {
i = 0;
while (i <= _root.creepArray.length) {
if (target == 0) {
if (("" + _root.creepArray[i]) != "undefined") {
if ((_root.creepArray[i]._y > 20) && (_root.creepArray[i].RIP == 0)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
if ((((_root.creepArray[i].air == 0) || (air == 1)) && ((_root.creepArray[i].immune == 0) || (immune == 1))) && (_root.creepArray[i].RIP == 0)) {
target = 1;
lastFire = 999;
creep = _root.creepArray[i];
}
}
}
}
}
i++;
}
}
}
if (target != 0) {
if (lastFire > rate) {
if (("" + creep) == "") {
target = 0;
lastChecked = 999;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
lastChecked = 18;
top._rotation = (Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593;
_root.fire(this, creep, speed, acc, maxspeed, projectile, dmg, slow, splash);
lastFire = 0;
}
}
}
}
}
}
Instance of Symbol 288 MovieClip "tower-air" in Frame 4
onClipEvent (load) {
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
towerTitle = "Air [12 gold]";
towerDescription = "Good damage and rate and range";
towerNotes = "Air ONLY";
range = 120;
rate = 18;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
lvl = 1;
speed = 15;
acc = 0.5;
maxspeed = 20;
projectile = "shot-arrow";
dmg = 15;
slow = 0;
splash = 0;
air = 1;
immune = 1;
upgrades = [["Increase the damage to 29 and fires much faster", 20, 29, 120, 13, 0], ["Increase the damage to 48 and fires much faster", 30, 65, 120, 11, 0]];
if (active == 1) {
}
}
on (press) {
_root.passInfo(this);
}
onClipEvent (enterFrame) {
if (active == 1) {
lastChecked++;
lastFire++;
if (lastChecked >= 10) {
lastChecked = 0;
if ((target == 0) && (_root.creepArray.length > 0)) {
i = 0;
while (i <= _root.creepArray.length) {
if (target == 0) {
if (("" + _root.creepArray[i]) != "undefined") {
if ((_root.creepArray[i]._y > 20) && (_root.creepArray[i].RIP == 0)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
if (((_root.creepArray[i].air == 1) && ((_root.creepArray[i].immune == 0) || (immune == 1))) && (_root.creepArray[i].RIP == 0)) {
target = 1;
lastFire = 999;
creep = _root.creepArray[i];
}
}
}
}
}
i++;
}
}
}
if (target != 0) {
if (lastFire > rate) {
if (("" + creep) == "") {
target = 0;
lastChecked = 999;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
lastChecked = 18;
_root.fire(this, creep, speed, acc, maxspeed, projectile, dmg, slow, splash);
lastFire = 0;
}
}
}
}
}
}
Frame 5
function FXgold(x, y, v) {
_root.FXlayer++;
duplicateMovieClip (_root.coin, "coin" + _root.FXlayer, 4900 + _root.FXlayer);
a = _root["coin" + _root.FXlayer];
a._x = x;
a._y = y;
a.R = random(30);
a.X = (-5 + random(10)) / 5;
a.Y = (-(2 + random(10))) / 5;
a.onEnterFrame = function () {
this._x = this._x + this.X;
this._y = this._y + this.Y;
this.Y = this.Y + 0.2;
this._rotation = this._rotation + this.R;
if (this.Y > 2) {
this.removeMovieClip();
}
};
if (_root.FXlayer > 100) {
_root.FXlayer = 0;
}
}
function FXexp(type, x, y) {
i = 1;
while (i <= 10) {
_root.FXlayer++;
duplicateMovieClip (_root[type + "-exp"], "exp" + _root.FXlayer, 4900 + _root.FXlayer);
a = _root["exp" + _root.FXlayer];
a._x = x;
a._y = y;
a.rads = random(360);
a.speed = (5 + random(20)) / 5;
a._rotation = a.rads;
a.onEnterFrame = function () {
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
this._alpha = this._alpha - 5;
if (this.speed > 0.5) {
this.speed = this.speed - 0.5;
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
i++;
}
if (_root.FXlayer > 100) {
_root.FXlayer = 0;
}
}
function playSound(s, v) {
if (mute == 0) {
_root.sfx++;
_root["snd" + _root.sfx] = new Sound();
_root["snd" + _root.sfx].attachSound(s);
_root["snd" + _root.sfx].setVolume(v);
_root["snd" + _root.sfx].start();
if (_root.sfx == 50) {
_root.sfx = 0;
}
}
}
trace("frame5");
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
_root.levels = [["<b>LvL 1:</b> Sheep", 20, 20, 10, 1, 1.5, 0.5, 0, 0, "sheep"], ["<b>LvL 2:</b> Rabid Dogs", 20, 20, 42, 1, 1.5, 0.5, 0, 0, "woolf"], ["<b>LvL 3:</b> Small Boys", 20, 20, 65, 1, 1.5, 0.5, 0, 0, "kid"], ["<b>LvL 4:</b> Pesants", 20, 20, 75, 1, 1.5, 0.5, 0, 0, "human"], ["<b>LvL 5:</b> Firework Throwers", 20, 20, 101, 1, 1.5, 0.5, 0, 0, "tinker"], ["<b>LvL 6:</b> Drug Runners <font color='#FF0000'>[FAST]</font>", 20, 20, 87, 1, 2.5, 0.5, 0, 0, "spider"], ["<b>LvL 7:</b> Greedy Pigs", 20, 20, 136, 2, 1.7, 0.5, 0, 0, "pig"], ["<b>LvL 8:</b> Flying Machines <font color='#FF0000'>[AIR]</font>", 20, 20, 158, 1, 1.2, 0.7, 1, 0, "zep"], ["<b>LvL 9:</b> Stags", 20, 20, 189, 1, 1.5, 0.5, 0, 0, "bear"], ["<b>LvL 10:</b> Trolls <font color='#FF0000'>[IMMUNE]</font>", 20, 20, 212, 2, 1.5, 0.5, 0, 1, "troll"], ["<b>LvL 11:</b> Water Elementals", 20, 20, 246, 2, 1.5, 0.5, 0, 0, "bear"], ["<b>LvL 12:</b> Drug Runners <font color='#FF0000'>[FAST]</font>", 20, 20, 212, 2, 2.5, 0.5, 0, 0, "spider"], ["<b>LvL 13:</b> Lizards", 20, 20, 331, 2, 1.5, 0.5, 0, 0, "bear"], ["<b>LvL 14:</b> Battle Golems", 20, 20, 384, 2, 1.5, 0.5, 0, 0, "ogre"], ["<b>LvL 15:</b> Harpey Rogue", 20, 20, 445, 2, 1.5, 0.5, 0, 0, "harpy"], ["<b>LvL 16:</b> Albatros <font color='#FF0000'>[AIR]</font>", 20, 20, 580, 2, 1.5, 0.5, 1, 0, "bird"], ["<b>LvL 17:</b> Fat pigs", 20, 20, 695, 2, 1.5, 0.5, 0, 0, "pig"], ["<b>LvL 18:</b> Drug Runners <font color='#FF0000'>[FAST]</font>", 20, 20, 599, 2, 2.5, 0.5, 0, 0, "spider"], ["<b>LvL 19:</b> Goblins again", 20, 20, 806, 3, 1.5, 0.5, 0, 0, "goblin"], ["<b>LvL 20:</b> Trolls <font color='#FF0000'>[IMMUNE]</font>", 20, 20, 925, 2, 1.5, 0.5, 0, 1, "troll"], ["<b>LvL 21:</b> Goblins Again?!", 20, 20, 1075, 3, 1.5, 0.5, 0, 0, "goblin"], ["<b>LvL 22:</b> Dark Minions", 20, 20, 1265, 4, 1.5, 0.5, 0, 0, "ogre"], ["<b>LvL 23:</b> Cannons", 20, 20, 1468, 4, 1.5, 0.5, 0, 0, "human"], ["<b>LvL 24:</b> Drug Runners <font color='#FF0000'>[FAST]</font>", 20, 20, 1265, 4, 2.5, 0.5, 0, 0, "spider"], ["<b>LvL 25:</b> Albatros <font color='#FF0000'>[AIR]</font>", 20, 20, 1615, 4, 1.5, 0.5, 1, 0, "bird"], ["<b>LvL 26:</b> Cryptic Fiends", 20, 20, 1935, 4, 1.5, 0.5, 0, 0, "spider"], ["<b>LvL 27:</b> Sludge Monstrosity", 20, 20, 2165, 5, 1.5, 0.5, 0, 0, "trollB"], ["<b>LvL 28:</b> Ghools", 20, 20, 2405, 5, 1.5, 0.5, 0, 0, "bear"], ["<b>LvL 29:</b> Goblins (for the last time)", 20, 20, 2655, 5, 1.5, 0.5, 0, 0, "goblin"], ["<b>LvL 30:</b> Trolls <font color='#FF0000'>[IMMUNE]</font> riding Drug Runners <font color='#FF0000'>[FAST]</font>", 20, 20, 2500, 2, 2.5, 0.5, 0, 1, "spider"], ["<b>BONUS 1:</b> 5 gold, damn hard", 20, 40, 5000, 5, 1.5, 0.5, 0, 0, "troll"], ["<b>BONUS 2:</b> OMG, so hard!", 20, 40, 7000, 5, 1.6, 0.5, 0, 0, "troll"], ["<b>BONUS 3:</b> gg", 20, 40, 10000, 5, 1.7, 0.5, 0, 0, "troll"], ["<b>HOW ARE YOU STILL ALIVE?!</b> ", 20, 40, 20000, 5, 1.7, 0.5, 0, 0, "troll"], ["<b>THE LAST LEVEL</b>", 20, 40, 30000, 5, 1.7, 0.5, 0, 0, "troll"]];
_root.level = 0;
_root.gold = 40;
_root.wood = 0;
_root.lives = 20;
_root.score = gold;
_root.interest = 10;
_root.particleCount = 0;
_root.creepCount = 0;
_root.creepArray = [];
_root.kills = 0;
_root.leaks = 0;
_root.towerCount = 0;
_root.mute = 0;
_root.waterLVL = 0;
_root.earthLVL = 0;
_root.fireLVL = 0;
_root.FXlayer = 0;
_root.sfx = 0;
Frame 7
function fire(from, to, speed, acc, maxspeed, projectile, dmg, slow, splash) {
_root.particleCount++;
_root[projectile].duplicateMovieClip("p" + _root.particleCount, 2000 + _root.particleCount);
r = _root["p" + _root.particleCount];
r._x = from._x;
r._y = from._y;
r.targ = to;
r.speed = speed;
r.acc = acc;
r.maxspeed = maxspeed;
r.dmg = dmg;
r.splash = splash;
r.slow = slow;
r.projectile = projectile;
if ((to.health - dmg) <= 0) {
to.RIP = 1;
}
playSound(projectile + "1", 50);
r.onEnterFrame = function () {
if (("" + this.targ) != "") {
this.targX = this.targ._x;
this.targY = this.targ._y;
}
this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593;
this._rotation = this.dir + 90;
this.rads = (this.dir * 3.141593) / 180;
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
if (this.speed < this.maxspeed) {
this.speed = this.speed + this.acc;
}
d = Math.sqrt(Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2));
if (d < 10) {
_root.playSound(this.projectile + "2", 50);
FXexp(projectile, this._x, this._y);
if (("" + this.targ) != "") {
this.targ.health = this.targ.health - this.dmg;
if ((this.slow > 0) && (this.targ.immune == 0)) {
this.targ.speed = (this.targ.maxspeed / 100) * 66;
}
}
i = 0;
while (i <= _root.creepArray.length) {
if (("" + _root.creepArray[i]) != "") {
if ((this.splash > 0) && (_root.creepArray[i] != this.targ)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < this.splash) {
_root.creepArray[i].health = _root.creepArray[i].health - ((this.dmg / this.splash) * (this.splash - d));
if ((this.slow > 0) && (_root.creepArray[i].immune == 0)) {
_root.creepArray[i].speed = (_root.creepArray[i].maxspeed / 100) * 66;
}
}
}
}
i++;
}
this.removeMovieClip();
}
if (_root.particleCount > 50) {
_root.particleCount = 0;
}
};
}
function levelUp() {
clearInterval(_root.levelInterval);
if (_root.lives > 0) {
trace("LEVELUP()");
if ((level - 1) < levels.length) {
_root.creepCount = 0;
_root.creepArray = [];
_root.level++;
trace(levels[level - 1][9]);
_root.playSound(_root.levels[_root.level - 1][9] + "1", 100);
_root.statusText(((((_root.levels[_root.level - 1][0] + " - ") + _root.levels[_root.level - 1][3]) + " hp, worth ") + _root.levels[_root.level - 1][4]) + "g each.");
_root["spawnInterval" + _root.level] = setInterval(_root, "spawn", _root.levels[_root.level - 1][6] * 1000, _root.level, "creep1", _root.levels[_root.level - 1][3], _root.levels[_root.level - 1][5], _root.levels[_root.level - 1][4], _root.levels[_root.level - 1][7], _root.levels[_root.level - 1][8], _root.levels[_root.level - 1][9]);
_root["spawned" + _root.level] = _root.levels[_root.level - 1][2];
} else {
_root.statusText("<font color='#0000FF'><b>GAME OVER:</b> You have completed all 30 levels!</font>");
_root.gameOver();
}
_root.calcScore();
}
}
function spawn(level, creep, health, speed, worth, air, immune, sfx) {
if ((_root["spawned" + _root.level] == 0) || (_root.lives == 0)) {
clearInterval(_root["spawnInterval" + _root.level]);
} else {
_root["spawned" + _root.level]--;
_root.creepCount++;
_root[creep].duplicateMovieClip("c" + _root.creepCount, 1000 + _root.creepCount);
c = _root["c" + _root.creepCount];
_root.creepArray[_root.creepArray.length] = c;
c.creep.gotoAndStop(_root.level);
c._x = marker1._x;
c._y = marker1._y;
c.health = health;
c.maxhp = health;
c.speed = speed;
c.maxspeed = speed;
c.targ = 2;
c.rnd = random(10);
c.worth = worth;
c.air = air;
c.immune = immune;
c.sfx = sfx;
c.RIP = 0;
c.onEnterFrame = function () {
if (this.health <= 0) {
_root.kill(this);
}
if (this.speed < this.maxspeed) {
this.speed = this.speed + 0.01;
}
this.targX = (_root["marker" + this.targ]._x - 5) + this.rnd;
this.targY = (_root["marker" + this.targ]._y - 5) + this.rnd;
this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593;
this.r = this.dir + (Math.sin((getTimer() + (this.rnd * 100)) / 100) * 7);
if ((this.creep._rotation + 10) < this.r) {
this.creep._rotation = this.creep._rotation + 10;
} else if ((this.creep._rotation - 10) > this.r) {
this.creep._rotation = this.creep._rotation - 10;
} else {
this.creep._rotation = r;
}
this.rads = (this.dir * 3.141593) / 180;
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
d = Math.sqrt(Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2));
if (d < 5) {
this.targ++;
if (this.targ > 14) {
_root.leak(this);
}
}
this.hpbar.bar._width = (30 / this.maxhp) * this.health;
if (Key.isDown(32)) {
this.hpbar._visible = true;
} else {
this.hpbar._visible = false;
}
};
if (_root.creepCount > 1000) {
_root.creepCount = 0;
}
}
_root.ui.wait = 0;
}
function leak(creep) {
_root.leaks++;
_root.infoT();
creep._x = _root.marker0._x;
creep._y = _root.marker0._y;
_root.gold = _root.gold - creep.worth;
creep.targ = 1;
_root.lives--;
if (_root.lives <= 0) {
_root.statusText("<font color='#ff0000'><b>GAME OVER:</b> you have 0 lives left.</font>");
creep.removeMovieClip();
_root.gameOver();
}
_root.statusText(((("<font color='#ff0000'><b>Creep leaked:</b> you have " + _root.lives) + " lives and ") + _root.gold) + " gold left.</font>");
}
function gameOver() {
trace("gameOver()");
i = 0;
while (i < _root.creepArray.length) {
if (("" + _root.creepArray[i]) != "") {
trace("Remove: " + _root.creepArray[i]);
_root.creepArray[i].removeMovieClip();
}
i++;
}
i = 1;
while (i <= _root.towerCount) {
_root["t" + i].removeMovieClip();
i++;
}
if (_root.lives <= 0) {
_root.gotoAndStop("over");
} else {
_root.gotoAndStop("win");
}
}
function calcScore() {
a = _root.gold;
i = 1;
while (i <= _root.towerCount) {
b = _root["t" + i];
trace(b);
if (("" + b) != "undefined") {
a = a + b.cost;
}
i++;
}
score = a;
}
function kill(creep) {
trace("KILL()");
kills++;
_root.gold = _root.gold + creep.worth;
_root.FXgold(creep._x, creep._y, 0);
creep.onEnterFrame = function () {
_root.playSound(this.sfx + "2", 50);
this.removeMovieClip();
};
_root.calcScore();
}
function passInfo(what) {
trace(("passInfo(" + what) + ")");
_root.selectedTower = what;
_root.ui.gotoAndStop(2);
_root.ui.towerInfo.a.text = (("lvl " + what.lvl) + " ") + what.towerTitle;
_root.ui.towerInfo.b.text = what.towerDescription;
_root.ui.towerInfo.c.text = what.dmg;
_root.ui.towerInfo.d.text = what.range;
if (int(what.rate) >= 80) {
r = "Very slow";
}
if (int(what.rate) < 80) {
r = "Slow";
}
if (int(what.rate) <= 60) {
r = "Average";
}
if (int(what.rate) <= 40) {
r = "Fast";
}
if (int(what.rate) <= 10) {
r = "Very fast";
}
_root.ui.towerInfo.e.text = r;
if (what.upgrades.length >= what.lvl) {
_root.ui.towerInfo.f.text = what.upgrades[what.lvl - 1][0];
_root.ui.towerInfo.h.text = "Upgrade Info";
_root.ui.towerInfo.upg.g.text = ("Upgrade [" + what.upgrades[what.lvl - 1][1]) + "g]";
_root.ui.towerInfo.upg._visible = true;
} else {
_root.ui.towerInfo.f.text = "";
_root.ui.towerInfo.upg._visible = false;
_root.ui.towerInfo.h.text = "";
}
_root.ui.sell.g.text = ("Sell for 75% [" + int((what.cost / 100) * 75)) + "g]";
_root.glow._x = what._x;
_root.glow._y = what._y;
_root.ranger._x = what._x;
_root.ranger._y = what._y;
_root.ranger._width = what.range * 2;
_root.ranger._height = what.range * 2;
_root.ranger.rate = what.rate;
}
function upgrade() {
a = _root.selectedTower;
b = a.lvl - 1;
if (int(a.upgrades[b][1]) <= _root.gold) {
a.dmg = int(a.upgrades[b][2]);
a.range = a.upgrades[b][3];
a.rate = a.upgrades[b][4];
trace("Rate: " + a.rate);
a.splash = a.upgrades[b][5];
a.slow = a.upgrades[b][6];
a.cost = a.cost + int(a.upgrades[b][1]);
a.lvl++;
_root.passInfo(_root.selectedTower);
_root.gold = _root.gold - int(a.upgrades[b][1]);
}
_root.calcScore();
}
function sell() {
a = _root.selectedTower;
_root.gold = _root.gold + int((a.cost / 100) * 75);
a.removeMovieClip();
ui.gotoAndStop(1);
_root.glow._x = 620;
_root.ranger._x = 620;
_root.ranger._width = 10;
_root.ranger._height = 10;
_root.calcScore();
}
function statusText(n) {
_root.ui.log.htmlText = (n + "<br>") + _root.ui.log.htmlText;
_root.ui.log.vPosition = _root.ui.log.maxVPosition;
}
trace("frame7");
((user2 >= undefined) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
_root.calcScore();
_root.ui.log.text = "";
trace("-------------");
_root.statusText("Welcome to <b>FLASH TD<b>");
stop();
Frame 9
trace("frame9");
Instance of Symbol 307 MovieClip in Frame 9
onClipEvent (load) {
this.swapDepths(6000);
}
Frame 10
trace("frame10");
Instance of Symbol 312 MovieClip in Frame 10
onClipEvent (load) {
this.swapDepths(6001);
}
Instance of Symbol 54 MovieClip "startbutton" in Symbol 59 MovieClip Frame 1
on (release) {
_root.gotoAndPlay(5);
}
Symbol 61 MovieClip Frame 2
stop();
Symbol 83 MovieClip Frame 1
stop();
Instance of Symbol 77 MovieClip in Symbol 83 MovieClip Frame 1
on (release) {
_root.levelUp();
_parent.gotoAndStop(5);
}
Instance of Symbol 80 MovieClip in Symbol 83 MovieClip Frame 3
on (release) {
_root.levelUp();
_parent.gotoAndStop(5);
}
Symbol 101 MovieClip Frame 1
stop();
Instance of Symbol 165 MovieClip "upg" in Symbol 166 MovieClip Frame 1
on (press) {
_root.upgrade();
}
Symbol 170 MovieClip Frame 1
stop();
Instance of Symbol 101 MovieClip in Symbol 170 MovieClip Frame 1
on (release) {
if (_root.mute == 0) {
_root.mute = 1;
gotoAndStop (2);
i = 0;
while (i <= 50) {
_root["snd" + i].stop();
i++;
}
} else {
_root.mute = 0;
gotoAndStop (1);
}
}
Instance of Symbol 111 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if (_root.gold >= 15) {
_root.marker.active = 1;
_root.marker.tower = "frost";
_root.marker.cost = 15;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-frost"].towerTitle;
_parent.tooltip.b.text = _root["tower-frost"].towerDescription;
_parent.tooltip.f.text = _root["tower-frost"].towerNotes;
_parent.tooltip.c.text = _root["tower-frost"].dmg;
_parent.tooltip.d.text = _root["tower-frost"].range;
_parent.tooltip.e.text = "Slow";
_parent.tooltip._visible = true;
}
on (rollOut) {
_parent.tooltip._visible = false;
}
Instance of Symbol 114 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if (_root.gold >= 7) {
_root.marker.active = 1;
_root.marker.tower = "arrow";
_root.marker.cost = 7;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-arrow"].towerTitle;
_parent.tooltip.b.text = _root["tower-arrow"].towerDescription;
_parent.tooltip.f.text = _root["tower-arrow"].towerNotes;
_parent.tooltip._visible = true;
if (_root.gold < 7) {
_parent.tooltip.requires.txt.text = "You need 7 gold";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 117 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if (_root.gold >= 9) {
_root.marker.active = 1;
_root.marker.tower = "cannon";
_root.marker.cost = 9;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-cannon"].towerTitle;
_parent.tooltip.b.text = _root["tower-cannon"].towerDescription;
_parent.tooltip.f.text = _root["tower-cannon"].towerNotes;
_parent.tooltip._visible = true;
if (_root.gold < 9) {
_parent.tooltip.requires.txt.text = "You need 9 gold";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 120 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if ((_root.gold >= 50) && (_root.waterLVL > 0)) {
_root.marker.active = 1;
_root.marker.tower = "water";
_root.marker.cost = 50;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-water"].towerTitle;
_parent.tooltip.b.text = _root["tower-water"].towerDescription;
_parent.tooltip.f.text = _root["tower-water"].towerNotes;
_parent.tooltip._visible = true;
if (_root.waterLVL == 0) {
_parent.tooltip.requires.txt.text = "Research Water to build";
_parent.tooltip.requires._visible = true;
} else if (_root.gold < 50) {
_parent.tooltip.requires.txt.text = "You need 50 gold";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 123 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if ((_root.gold >= 50) && (_root.earthLVL > 0)) {
_root.marker.active = 1;
_root.marker.tower = "earth";
_root.marker.cost = 50;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-earth"].towerTitle;
_parent.tooltip.b.text = _root["tower-earth"].towerDescription;
_parent.tooltip.f.text = _root["tower-earth"].towerNotes;
_parent.tooltip._visible = true;
if (_root.earthLVL == 0) {
_parent.tooltip.requires.txt.text = "Research Earth to build";
_parent.tooltip.requires._visible = true;
} else if (_root.gold < 50) {
_parent.tooltip.requires.txt.text = "You need 50 gold";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 126 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if ((_root.gold >= 50) && (_root.fireLVL > 0)) {
_root.marker.active = 1;
_root.marker.tower = "fire";
_root.marker.cost = 50;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-fire"].towerTitle;
_parent.tooltip.b.text = _root["tower-fire"].towerDescription;
_parent.tooltip.f.text = _root["tower-fire"].towerNotes;
_parent.tooltip._visible = true;
if (_root.fireLVL == 0) {
_parent.tooltip.requires.txt.text = "Research Fire to build";
_parent.tooltip.requires._visible = true;
} else if (_root.gold < 50) {
_parent.tooltip.requires.txt.text = "You need 50 gold";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 128 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if (_root.gold >= 7) {
_root.marker.active = 1;
_root.marker.tower = "light";
_root.marker.cost = 7;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-light"].towerTitle;
_parent.tooltip.b.text = _root["tower-light"].towerDescription;
_parent.tooltip.f.text = _root["tower-light"].towerNotes;
_parent.tooltip._visible = true;
}
on (rollOut) {
_parent.tooltip._visible = false;
}
Instance of Symbol 130 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if (_root.gold >= 7) {
_root.marker.active = 1;
_root.marker.tower = "dark";
_root.marker.cost = 7;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-dark"].towerTitle;
_parent.tooltip.b.text = _root["tower-dark"].towerDescription;
_parent.tooltip.f.text = _root["tower-dark"].towerNotes;
_parent.tooltip._visible = true;
}
on (rollOut) {
_parent.tooltip._visible = false;
}
Instance of Symbol 132 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if (_root.gold >= 7) {
_root.marker.active = 1;
_root.marker.tower = "nature";
_root.marker.cost = 7;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-nature"].towerTitle;
_parent.tooltip.b.text = _root["tower-nature"].towerDescription;
_parent.tooltip.f.text = _root["tower-nature"].towerNotes;
_parent.tooltip._visible = true;
}
on (rollOut) {
_parent.tooltip._visible = false;
}
Instance of Symbol 120 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if ((_root.wood >= 1) && (_root.waterLVL == 0)) {
_root.wood = _root.wood - 1;
_root.waterLVL++;
}
}
on (rollOver) {
_parent.tooltip.a.text = "Water element lvl " + (_root.waterLVL + 1);
_parent.tooltip.b.text = "Buy to build water towers";
_parent.tooltip.f.text = "Costs 1 wood";
_parent.tooltip._visible = true;
if (_root.wood == 0) {
_parent.tooltip.requires.txt.text = "You need 1 wood";
_parent.tooltip.requires._visible = true;
} else if (_root.waterLVL == 1) {
_parent.tooltip.requires.txt.text = "You have researched this";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 123 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if ((_root.wood >= 1) && (_root.earthLVL == 0)) {
_root.wood = _root.wood - 1;
_root.earthLVL++;
}
}
on (rollOver) {
_parent.tooltip.a.text = "Earth element lvl " + (_root.earthLVL + 1);
_parent.tooltip.b.text = "Buy to build earth towers";
_parent.tooltip.f.text = "Costs 1 wood";
_parent.tooltip._visible = true;
if (_root.wood == 0) {
_parent.tooltip.requires.txt.text = "You need 1 wood";
_parent.tooltip.requires._visible = true;
} else if (_root.earthLVL == 1) {
_parent.tooltip.requires.txt.text = "You have researched this";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 126 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if ((_root.wood >= 1) && (_root.fireLVL == 0)) {
_root.wood = _root.wood - 1;
_root.fireLVL++;
}
}
on (rollOver) {
_parent.tooltip.a.text = "Fire element lvl " + (_root.fireLVL + 1);
_parent.tooltip.b.text = "Buy to build fire towers";
_parent.tooltip.f.text = "Costs 1 wood";
_parent.tooltip._visible = true;
if (_root.wood == 0) {
_parent.tooltip.requires.txt.text = "You need 1 wood";
_parent.tooltip.requires._visible = true;
} else if (_root.fireLVL == 1) {
_parent.tooltip.requires.txt.text = "You have researched this";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 135 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if ((((_root.gold >= 200) && (_root.fireLVL > 0)) && (_root.waterLVL > 0)) && (_root.earthLVL > 0)) {
_root.marker.active = 1;
_root.marker.tower = "rocket";
_root.marker.cost = 200;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-rocket"].towerTitle;
_parent.tooltip.b.text = _root["tower-rocket"].towerDescription;
_parent.tooltip.f.text = _root["tower-rocket"].towerNotes;
_parent.tooltip._visible = true;
if (((_root.fireLVL == 0) || (_root.earthLVL == 0)) || (_root.waterLVL == 0)) {
_parent.tooltip.requires.txt.text = "Research Fire, Earth & Water";
_parent.tooltip.requires._visible = true;
} else if (_root.gold < 200) {
_parent.tooltip.requires.txt.text = "You need 200 gold";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 137 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if (_root.wood >= 1) {
_root.wood = _root.wood - 1;
_root.interest = _root.interest + 5;
}
}
on (rollOver) {
_parent.tooltip.a.text = "+5% interest rate";
_parent.tooltip.b.text = ("Buy to increase your interest rate to " + (_root.interest + 5)) + "%";
_parent.tooltip.f.text = "Costs 1 wood";
_parent.tooltip._visible = true;
if (_root.wood == 0) {
_parent.tooltip.requires.txt.text = "You need 1 wood";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 140 MovieClip in Symbol 170 MovieClip Frame 1
on (press) {
if (_root.gold >= 12) {
_root.marker.active = 1;
_root.marker.tower = "air";
_root.marker.cost = 12;
}
}
on (rollOver) {
_parent.tooltip.a.text = _root["tower-air"].towerTitle;
_parent.tooltip.b.text = _root["tower-air"].towerDescription;
_parent.tooltip.f.text = _root["tower-air"].towerNotes;
_parent.tooltip._visible = true;
if (_root.gold < 9) {
_parent.tooltip.requires.txt.text = "You need 12 gold";
_parent.tooltip.requires._visible = true;
}
}
on (rollOut) {
_parent.tooltip._visible = false;
_parent.tooltip.requires._visible = false;
}
Instance of Symbol 152 MovieClip "tooltip" in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
requires._visible = false;
_visible = false;
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if (_root.gold < 7) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if (_root.gold < 9) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if ((_root.gold < 50) || (_root.waterLVL == 0)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if ((_root.gold < 50) || (_root.earthLVL == 0)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if ((_root.gold < 50) || (_root.fireLVL == 0)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if ((((_root.gold < 200) || (_root.waterLVL == 0)) || (_root.earthLVL == 0)) || (_root.fireLVL == 0)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if ((_root.wood == 0) || (_root.waterLVL == 1)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if ((_root.wood == 0) || (_root.earthLVL == 1)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if ((_root.wood == 0) || (_root.fireLVL == 1)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if (_root.wood == 0) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 154 MovieClip in Symbol 170 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
onClipEvent (enterFrame) {
if (_root.gold < 12) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 168 MovieClip "sell" in Symbol 170 MovieClip Frame 2
on (press) {
_root.sell();
}
Symbol 179 MovieClip Frame 1
stop();
Symbol 188 MovieClip Frame 1
stop();
Instance of Symbol 187 MovieClip in Symbol 188 MovieClip Frame 2
on (release) {
getURL ("http://www.novelconcepts.co.uk/FlashElementTD/");
}
Symbol 226 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 1
stop();
Instance of Symbol 238 MovieClip in Symbol 239 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 7);
}
Symbol 246 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 1
stop();
Instance of Symbol 238 MovieClip in Symbol 283 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 20);
}
Symbol 288 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 1
stop();
Instance of Symbol 290 MovieClip in Symbol 307 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Instance of Symbol 294 MovieClip in Symbol 307 MovieClip Frame 1
on (release) {
_root.ui.wait = 1;
_parent._visible = false;
_root.gotoAndPlay(5);
}
Instance of Symbol 306 MovieClip in Symbol 307 MovieClip Frame 1
on (rollOver) {
if (saving == 0) {
gotoAndStop (2);
}
}
on (rollOut) {
if (saving == 0) {
gotoAndStop (1);
}
}
onClipEvent (load) {
saving = 0;
}
on (release) {
if (saving == 0) {
yourname = _parent.yourname.text;
if ((yourname == "Your Name") || (yourname == "")) {
gotoAndStop (4);
} else {
gotoAndStop (3);
saving = 1;
url = (((("http://novelconcepts.co.uk/FlashElementTD/submitScore.asp?score=" + _root.score) + "&name=") + yourname) + "&c=") + MD5.hex_md5((_root.score + "bestflashtdever") + yourname);
getURL (url);
}
}
}
Instance of Symbol 290 MovieClip in Symbol 312 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Instance of Symbol 294 MovieClip in Symbol 312 MovieClip Frame 1
on (release) {
_root.ui.wait = 1;
_parent._visible = false;
_root.gotoAndPlay(5);
}
Instance of Symbol 306 MovieClip in Symbol 312 MovieClip Frame 1
on (rollOver) {
if (saving == 0) {
gotoAndStop (2);
}
}
on (rollOut) {
if (saving == 0) {
gotoAndStop (1);
}
}
onClipEvent (load) {
saving = 0;
}
on (release) {
if (saving == 0) {
yourname = _parent.yourname.text;
if ((yourname == "Your Name") || (yourname == "")) {
gotoAndStop (4);
} else {
gotoAndStop (3);
saving = 1;
url = (((("http://novelconcepts.co.uk/FlashElementTD/submitScore.asp?score=" + _root.score) + "&name=") + yourname) + "&c=") + MD5.hex_md5((_root.score + "bestflashtdever") + yourname);
getURL (url);
}
}
}