Frame 1
function GiveMoney() {
_root.money = _root.money + Math.round(_root.income);
}
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
_root.menu = newMenu;
stop();
ATK_DELAY = 5;
GRD_TWR_DMG = 20;
AIR_TWR_DMG = 20;
BTH_TWR_DMG = 10;
FIR_1 = 60;
WTR_1 = 50;
NTR_1 = 40;
FIR_2 = 110;
WTR_2 = 100;
NTR_2 = 80;
FIR_3 = 150;
WTR_3 = 130;
NTR_3 = 110;
FIR_4 = 220;
WTR_4 = 200;
NTR_4 = 180;
FIR_4 = 280;
WTR_4 = 300;
NTR_4 = 300;
FIR_5 = 310;
WTR_5 = 390;
NTR_6 = 430;
NTR_7 = 600;
MODE = 0;
SEL = 0;
lives = 10;
wave = 0;
timerem = 19;
money = 1705032704 /* 0x65A0BC00 */;
health = 5;
speed = 3;
numtowers = 0;
hit = false;
num = 1;
income = 1;
Frame 2
_root.attachMovie("arrow", "selArrow", 1000);
stop();
Instance of Symbol 96 MovieClip in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.guide_rect.hitTest(this)) {
_root.hit1 = true;
} else {
_root.hit1 = false;
}
}
Instance of Symbol 98 MovieClip in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.guide_rect.hitTest(this)) {
_root.hit2 = true;
} else {
_root.hit2 = false;
}
}
Instance of Symbol 100 MovieClip "p3" in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.guide_rect.hitTest(this)) {
_root.hit3 = true;
} else {
_root.hit3 = false;
}
}
Instance of Symbol 102 MovieClip in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.guide_rect.hitTest(this)) {
_root.hit4 = true;
} else {
_root.hit4 = false;
}
}
Instance of Symbol 104 MovieClip in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.guide_rect.hitTest(this)) {
_root.hit5 = true;
} else {
_root.hit5 = false;
}
}
Instance of Symbol 106 MovieClip in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.guide_rect.hitTest(this)) {
_root.hit6 = true;
} else {
_root.hit6 = false;
}
}
Instance of Symbol 108 MovieClip in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.guide_rect.hitTest(this)) {
_root.hit7 = true;
} else {
_root.hit7 = false;
}
}
Instance of Symbol 110 MovieClip in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.guide_rect.hitTest(this)) {
_root.hit8 = true;
} else {
_root.hit8 = false;
}
}
Instance of Symbol 116 MovieClip "main" in Frame 2
onClipEvent (load) {
function BuildTwr() {
}
function MakeTower(typ, x_, y_) {
_root.attachMovie("tower", "TWR_" + _root.numtowers, _ymouse + _xmouse);
_root["TWR_" + _root.numtowers]._x = x_;
_root["TWR_" + _root.numtowers]._y = y_;
_root["TWR_" + _root.numtowers].tur.bulspawned = false;
if (typ == 1) {
if (_root.money >= 18) {
_root.money = _root.money - 18;
_root["TWR_" + _root.numtowers].gotoAndStop(5);
}
} else if (typ == 2) {
if (_root.money >= 10) {
_root.money = _root.money - 10;
_root["TWR_" + _root.numtowers].gotoAndStop(13);
}
} else if (typ == 3) {
if (_root.money >= 15) {
_root.money = _root.money - 15;
_root["TWR_" + _root.numtowers].gotoAndStop(23);
}
} else if (typ == 4) {
if (_root.money >= 2000) {
_root.money = _root.money - 2000;
_root["TWR_" + _root.numtowers].gotoAndStop(32);
}
} else if (typ == 5) {
if (_root.money >= 40) {
_root.money = _root.money - 40;
_root["TWR_" + _root.numtowers].gotoAndStop(36);
}
}
_root.numtowers++;
}
var allow = true;
i = 0;
m = 0;
k = 0;
}
onClipEvent (enterFrame) {
i++;
if (i > 30) {
i = 0;
_root.timerem--;
if (_root.messtim >= 0) {
_root.messtim--;
}
}
if (_root.timerem <= 0) {
_root.timerem = 20;
_root.wave++;
_root.spawner.spawnCreature(2);
_root.health = (_root.health * 1.1) + (_root.wave * 8.6);
_root.income = (_root.income * 0.02) + (_root.wave * 1.1);
}
if (_root.messtim <= 0) {
_root.mess.text = "";
}
if (_root.lives <= 0) {
_root.gotoAndStop(3);
}
if (_root.MODE == 1) {
_root.guide_rect._x = _root._xmouse;
_root.guide_rect._y = _root._ymouse;
}
if (m <= _root.numtowers) {
if ((((((_root["TWR_" + m]._x - _root._xmouse) > 25) | ((_root["TWR_" + m]._x - _root._xmouse) < -25)) | (((_root["TWR_" + m]._y - _root._ymouse) > 25) | ((_root["TWR_" + m]._y - _root._ymouse) < -25))) & (_root._ymouse < 400)) & ((((((((!_root.hit1) & (!_root.hit2)) & (!_root.hit3)) & (!_root.hit4)) & (!_root.hit5)) & (!_root.hit6)) & (!_root.hit7)) & (!_root.hit8))) {
allow = true;
_root.guide_rect.gotoAndStop(1);
} else {
allow = false;
_root.guide_rect.gotoAndStop(2);
}
m++;
if (m >= _root.numtowers) {
m = 0;
}
}
}
onClipEvent (mouseDown) {
if (_root.MODE == 1) {
if (_root.numtowers > 0) {
k = 0;
while (k < _root.numtowers) {
if ((((((_root["TWR_" + k]._x - _root._xmouse) > 25) | ((_root["TWR_" + k]._x - _root._xmouse) < -25)) | (((_root["TWR_" + k]._y - _root._ymouse) > 25) | ((_root["TWR_" + k]._y - _root._ymouse) < -25))) & (_root._ymouse < 400)) & ((((((((!_root.hit1) & (!_root.hit2)) & (!_root.hit3)) & (!_root.hit4)) & (!_root.hit5)) & (!_root.hit6)) & (!_root.hit7)) & (!_root.hit8))) {
allow = true;
_root.guide_rect.gotoAndStop(1);
} else {
allow = false;
_root.guide_rect.gotoAndStop(2);
_root.mess.text = "Not Enough Space to Build There!";
_root.messtim = 3;
}
k++;
}
} else if ((_root._ymouse < 400) & ((((((((!_root.hit1) & (!_root.hit2)) & (!_root.hit3)) & (!_root.hit4)) & (!_root.hit5)) & (!_root.hit6)) & (!_root.hit7)) & (!_root.hit8))) {
allow = true;
_root.guide_rect.gotoAndStop(1);
} else {
allow = false;
_root.guide_rect.gotoAndStop(2);
_root.mess.text = "Please Build on the Grass.";
_root.messtim = 3;
}
if (allow) {
MakeTower(_root.SEL, _root.guide_rect._x, _root.guide_rect._y);
_root.MODE = 0;
_root.SEL = 0;
_root.guide_rect._x = -100;
_root.guide_rect._y = -100;
} else {
}
}
}
Instance of Symbol 79 MovieClip [guide] "d1" in Frame 2
/* no clip actions */
Instance of Symbol 79 MovieClip [guide] "d8" in Frame 2
/* no clip actions */
Instance of Symbol 77 MovieClip [creature] "c1" in Frame 2
onClipEvent (load) {
function damage(num) {
this.health = this.health - num;
}
var xspeed;
var yspeed;
var active;
var active = false;
var startx = _x;
var starty = _y;
this.targ = 1;
}
onClipEvent (enterFrame) {
if ((_root.timerem == 20) & (active == false)) {
active = true;
this.health = _root.health;
targ = 1;
}
if (active) {
if ((this.health <= 0) & (active == true)) {
this._x = startx;
this._y = starty;
active = false;
this._alpha = 100;
_root.GiveMoney();
} else if ((((this._x - _root["d" + targ]._x) < (_root.speed + 1)) & ((this._x - _root["d" + targ]._x) > (-(_root.speed + 1)))) & (((this._y - _root["d" + targ]._y) < (_root.speed + 1)) & ((this._y - _root["d" + targ]._y) > (-(_root.speed + 1))))) {
this._x = _root["d" + targ]._x;
this._y = _root["d" + targ]._y;
targ++;
if (targ > 8) {
targ = 1;
this._x = startx;
this._y = starty;
_root.lives--;
active = false;
}
} else if (this._x > (_root["d" + targ]._x + _root.speed)) {
this._x = this._x - _root.speed;
xspeed = -_root.speed;
} else if (this._x < (_root["d" + targ]._x - _root.speed)) {
this._x = this._x + _root.speed;
xspeed = _root.speed;
} else if (this._y > (_root["d" + targ]._y + _root.speed)) {
this._y = this._y - _root.speed;
yspeed = -_root.speed;
} else if (this._y < (_root["d" + targ]._y - _root.speed)) {
this._y = this._y + _root.speed;
yspeed = _root.speed;
}
}
}
Instance of Symbol 77 MovieClip [creature] "c2" in Frame 2
onClipEvent (load) {
function damage(num) {
this.health = this.health - num;
}
var xspeed;
var yspeed;
var active;
var active = false;
var startx = _x;
var starty = _y;
this.targ = 1;
}
onClipEvent (enterFrame) {
if ((_root.timerem == 20) & (active == false)) {
active = true;
this.health = _root.health;
targ = 1;
}
if (active) {
if ((this.health <= 0) & (active == true)) {
this._x = startx;
this._y = starty;
this._alpha = 100;
active = false;
_root.GiveMoney();
} else if ((((this._x - _root["d" + targ]._x) < (_root.speed + 1)) & ((this._x - _root["d" + targ]._x) > (-(_root.speed + 1)))) & (((this._y - _root["d" + targ]._y) < (_root.speed + 1)) & ((this._y - _root["d" + targ]._y) > (-(_root.speed + 1))))) {
this._x = _root["d" + targ]._x;
this._y = _root["d" + targ]._y;
targ++;
if (targ > 8) {
targ = 1;
this._x = startx;
this._y = starty;
_root.lives--;
active = false;
}
} else if (this._x > (_root["d" + targ]._x + _root.speed)) {
this._x = this._x - _root.speed;
xspeed = -_root.speed;
} else if (this._x < (_root["d" + targ]._x - _root.speed)) {
this._x = this._x + _root.speed;
xspeed = _root.speed;
} else if (this._y > (_root["d" + targ]._y + _root.speed)) {
this._y = this._y - _root.speed;
yspeed = -_root.speed;
} else if (this._y < (_root["d" + targ]._y - _root.speed)) {
this._y = this._y + _root.speed;
yspeed = _root.speed;
}
}
}
Instance of Symbol 77 MovieClip [creature] "c3" in Frame 2
onClipEvent (load) {
function damage(num) {
this.health = this.health - num;
}
var xspeed;
var yspeed;
var active;
var active = false;
var startx = _x;
var starty = _y;
this.targ = 1;
}
onClipEvent (enterFrame) {
if ((_root.timerem == 20) & (active == false)) {
active = true;
this.health = _root.health;
targ = 1;
}
if (active) {
if ((this.health <= 0) & (active == true)) {
this._x = startx;
this._y = starty;
this._alpha = 100;
active = false;
_root.GiveMoney();
} else if ((((this._x - _root["d" + targ]._x) < (_root.speed + 1)) & ((this._x - _root["d" + targ]._x) > (-(_root.speed + 1)))) & (((this._y - _root["d" + targ]._y) < (_root.speed + 1)) & ((this._y - _root["d" + targ]._y) > (-(_root.speed + 1))))) {
this._x = _root["d" + targ]._x;
this._y = _root["d" + targ]._y;
targ++;
if (targ > 8) {
targ = 1;
this._x = startx;
this._y = starty;
_root.lives--;
active = false;
}
} else if (this._x > (_root["d" + targ]._x + _root.speed)) {
this._x = this._x - _root.speed;
xspeed = -_root.speed;
} else if (this._x < (_root["d" + targ]._x - _root.speed)) {
this._x = this._x + _root.speed;
xspeed = _root.speed;
} else if (this._y > (_root["d" + targ]._y + _root.speed)) {
this._y = this._y - _root.speed;
yspeed = -_root.speed;
} else if (this._y < (_root["d" + targ]._y - _root.speed)) {
this._y = this._y + _root.speed;
yspeed = _root.speed;
}
}
}
Instance of Symbol 77 MovieClip [creature] "c4" in Frame 2
onClipEvent (load) {
function damage(num) {
this.health = this.health - num;
}
var xspeed;
var yspeed;
var active;
var active = false;
var startx = _x;
var starty = _y;
this.targ = 1;
}
onClipEvent (enterFrame) {
if ((_root.timerem == 20) & (active == false)) {
active = true;
this.health = _root.health;
targ = 1;
}
if (active) {
if ((this.health <= 0) & (active == true)) {
this._x = startx;
this._y = starty;
this._alpha = 100;
active = false;
_root.GiveMoney();
} else if ((((this._x - _root["d" + targ]._x) < (_root.speed + 1)) & ((this._x - _root["d" + targ]._x) > (-(_root.speed + 1)))) & (((this._y - _root["d" + targ]._y) < (_root.speed + 1)) & ((this._y - _root["d" + targ]._y) > (-(_root.speed + 1))))) {
this._x = _root["d" + targ]._x;
this._y = _root["d" + targ]._y;
targ++;
if (targ > 8) {
targ = 1;
this._x = startx;
this._y = starty;
_root.lives--;
active = false;
}
} else if (this._x > (_root["d" + targ]._x + _root.speed)) {
this._x = this._x - _root.speed;
xspeed = -_root.speed;
} else if (this._x < (_root["d" + targ]._x - _root.speed)) {
this._x = this._x + _root.speed;
xspeed = _root.speed;
} else if (this._y > (_root["d" + targ]._y + _root.speed)) {
this._y = this._y - _root.speed;
yspeed = -_root.speed;
} else if (this._y < (_root["d" + targ]._y - _root.speed)) {
this._y = this._y + _root.speed;
yspeed = _root.speed;
}
}
}
Instance of Symbol 77 MovieClip [creature] "c5" in Frame 2
onClipEvent (load) {
function damage(num) {
this.health = this.health - num;
}
var xspeed;
var yspeed;
var active;
var active = false;
var startx = _x;
var starty = _y;
this.targ = 1;
}
onClipEvent (enterFrame) {
if ((_root.timerem == 20) & (active == false)) {
active = true;
this.health = _root.health;
targ = 1;
}
if (active) {
if ((this.health <= 0) & (active == true)) {
this._x = startx;
this._y = starty;
this._alpha = 100;
active = false;
_root.GiveMoney();
} else if ((((this._x - _root["d" + targ]._x) < (_root.speed + 1)) & ((this._x - _root["d" + targ]._x) > (-(_root.speed + 1)))) & (((this._y - _root["d" + targ]._y) < (_root.speed + 1)) & ((this._y - _root["d" + targ]._y) > (-(_root.speed + 1))))) {
this._x = _root["d" + targ]._x;
this._y = _root["d" + targ]._y;
targ++;
if (targ > 8) {
targ = 1;
this._x = startx;
this._y = starty;
_root.lives--;
active = false;
}
} else if (this._x > (_root["d" + targ]._x + _root.speed)) {
this._x = this._x - _root.speed;
xspeed = -_root.speed;
} else if (this._x < (_root["d" + targ]._x - _root.speed)) {
this._x = this._x + _root.speed;
xspeed = _root.speed;
} else if (this._y > (_root["d" + targ]._y + _root.speed)) {
this._y = this._y - _root.speed;
yspeed = -_root.speed;
} else if (this._y < (_root["d" + targ]._y - _root.speed)) {
this._y = this._y + _root.speed;
yspeed = _root.speed;
}
}
}
Instance of Symbol 77 MovieClip [creature] "c6" in Frame 2
onClipEvent (load) {
function damage(num) {
this.health = this.health - num;
}
var xspeed;
var yspeed;
var active;
var active = false;
var startx = _x;
var starty = _y;
this.targ = 1;
}
onClipEvent (enterFrame) {
if ((_root.timerem == 20) & (active == false)) {
active = true;
this.health = _root.health;
targ = 1;
}
if (active) {
if ((this.health <= 0) & (active == true)) {
this._x = startx;
this._y = starty;
this._alpha = 100;
active = false;
_root.GiveMoney();
} else if ((((this._x - _root["d" + targ]._x) < (_root.speed + 1)) & ((this._x - _root["d" + targ]._x) > (-(_root.speed + 1)))) & (((this._y - _root["d" + targ]._y) < (_root.speed + 1)) & ((this._y - _root["d" + targ]._y) > (-(_root.speed + 1))))) {
this._x = _root["d" + targ]._x;
this._y = _root["d" + targ]._y;
targ++;
if (targ > 8) {
targ = 1;
this._x = startx;
this._y = starty;
_root.lives--;
active = false;
}
} else if (this._x > (_root["d" + targ]._x + _root.speed)) {
this._x = this._x - _root.speed;
xspeed = -_root.speed;
} else if (this._x < (_root["d" + targ]._x - _root.speed)) {
this._x = this._x + _root.speed;
xspeed = _root.speed;
} else if (this._y > (_root["d" + targ]._y + _root.speed)) {
this._y = this._y - _root.speed;
yspeed = -_root.speed;
} else if (this._y < (_root["d" + targ]._y - _root.speed)) {
this._y = this._y + _root.speed;
yspeed = _root.speed;
}
}
}
Instance of Symbol 77 MovieClip [creature] "c7" in Frame 2
onClipEvent (load) {
function damage(num) {
this.health = this.health - num;
}
var xspeed;
var yspeed;
var active;
var active = false;
var startx = _x;
var starty = _y;
this.targ = 1;
}
onClipEvent (enterFrame) {
if ((_root.timerem == 20) & (active == false)) {
active = true;
this.health = _root.health;
targ = 1;
}
if (active) {
if ((this.health <= 0) & (active == true)) {
this._x = startx;
this._y = starty;
this._alpha = 100;
active = false;
_root.GiveMoney();
} else if ((((this._x - _root["d" + targ]._x) < (_root.speed + 1)) & ((this._x - _root["d" + targ]._x) > (-(_root.speed + 1)))) & (((this._y - _root["d" + targ]._y) < (_root.speed + 1)) & ((this._y - _root["d" + targ]._y) > (-(_root.speed + 1))))) {
this._x = _root["d" + targ]._x;
this._y = _root["d" + targ]._y;
targ++;
if (targ > 8) {
targ = 1;
this._x = startx;
this._y = starty;
_root.lives--;
active = false;
}
} else if (this._x > (_root["d" + targ]._x + _root.speed)) {
this._x = this._x - _root.speed;
xspeed = -_root.speed;
} else if (this._x < (_root["d" + targ]._x - _root.speed)) {
this._x = this._x + _root.speed;
xspeed = _root.speed;
} else if (this._y > (_root["d" + targ]._y + _root.speed)) {
this._y = this._y - _root.speed;
yspeed = -_root.speed;
} else if (this._y < (_root["d" + targ]._y - _root.speed)) {
this._y = this._y + _root.speed;
yspeed = _root.speed;
}
}
}
Instance of Symbol 77 MovieClip [creature] "c8" in Frame 2
onClipEvent (load) {
function damage(num) {
this.health = this.health - num;
}
var xspeed;
var yspeed;
var active;
var active = false;
var startx = _x;
var starty = _y;
this.targ = 1;
}
onClipEvent (enterFrame) {
if ((_root.timerem == 20) & (active == false)) {
active = true;
this.health = _root.health;
targ = 1;
}
if (active) {
if ((this.health <= 0) & (active == true)) {
this._x = startx;
this._y = starty;
this._alpha = 100;
active = false;
_root.GiveMoney();
} else if ((((this._x - _root["d" + targ]._x) < (_root.speed + 1)) & ((this._x - _root["d" + targ]._x) > (-(_root.speed + 1)))) & (((this._y - _root["d" + targ]._y) < (_root.speed + 1)) & ((this._y - _root["d" + targ]._y) > (-(_root.speed + 1))))) {
this._x = _root["d" + targ]._x;
this._y = _root["d" + targ]._y;
targ++;
if (targ > 8) {
targ = 1;
this._x = startx;
this._y = starty;
_root.lives--;
active = false;
}
} else if (this._x > (_root["d" + targ]._x + _root.speed)) {
this._x = this._x - _root.speed;
xspeed = -_root.speed;
} else if (this._x < (_root["d" + targ]._x - _root.speed)) {
this._x = this._x + _root.speed;
xspeed = _root.speed;
} else if (this._y > (_root["d" + targ]._y + _root.speed)) {
this._y = this._y - _root.speed;
yspeed = -_root.speed;
} else if (this._y < (_root["d" + targ]._y - _root.speed)) {
this._y = this._y + _root.speed;
yspeed = _root.speed;
}
}
}
Instance of Symbol 124 MovieClip in Frame 2
on (release) {
if (_root._quality != "HIGH") {
_root._quality = "HIGH";
} else {
_root._quality = "LOW";
}
}
Instance of Symbol 204 MovieClip in Frame 2
on (keyPress "<Space>") {
if ((((((((_root.c1.active == false) & (_root.c2.active == false)) & (_root.c3.active == false)) & (_root.c4.active == false)) & (_root.c5.active == false)) & (_root.c6.active == false)) & (_root.c7.active == false)) & (_root.c8.active == false)) {
_root.timerem = 0;
}
}
Frame 3
stop();
Frame 5
gotoAndStop (4);
Symbol 7 Button
on (release) {
_root.MODE = 2;
_root.selArrow._visible = true;
_root.selArrow._x = _x;
_root.selArrow._y = _y;
_root.SEL = _name;
_root.console.gotoAndStop(2);
_root.console.nxt_dmg = turret.nxtdmg;
_root.console.upg_price = nxtprice;
_root.console.upgradable = upgradeable;
_root.console.dmgtxt.text = turret.dmg;
_root.console.namtxt.text = nam;
_root.console.rngtxt.text = turret.range;
_root.console.nxt_rng = nextrange;
}
Symbol 10 MovieClip [turret] Frame 10
stop();
Symbol 70 MovieClip [tower] Frame 1
stop();
Symbol 70 MovieClip [tower] Frame 5
turret.dmg = 4;
turret.range = 100;
nextrange = 100;
turret.nxtdmg = 12;
nxtprice = 20;
turret._y = -7.5;
stop();
upgradeable = true;
nam = "Small Fire Tower";
stop();
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 5
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > 150)) | (distancex < -150)) | (distancey > 150)) | (distancey < -150)) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
mindist = new Number(0);
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
if (bulspawned == false) {
_root.attachMovie("bullet", "BUL_" + _parent._name, 700 + _root.num);
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["BUL_" + _parent._name].blendMode = "add";
_root["BUL_" + _parent._name].gotoAndStop(1);
_root.num++;
bulspawned = true;
}
}
Symbol 70 MovieClip [tower] Frame 6
turret.dmg = 12;
turret.range = 100;
nextrange = 100;
turret.nxtdmg = 36;
nxtprice = 30;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Large Fire Tower";
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 6
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
mindist = new Number(0);
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 7
turret.dmg = 36;
turret.range = 100;
nextrange = 100;
turret.nxtdmg = 108;
nxtprice = 50;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Advanced Fire Tower";
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 7
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
_root["BUL_" + _parent._name]._xscale = 150;
_root["BUL_" + _parent._name]._yscale = 150;
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
mindist = new Number(0);
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 8
turret.dmg = 108;
turret.range = 100;
nextrange = 100;
turret.nxtdmg = 300;
nxtprice = 80;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Great Fire Tower";
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 8
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
mindist = new Number(0);
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 9
turret.dmg = 300;
turret.range = 100;
turret.nxtdmg = 2056;
nextrange = 110;
nxtprice = 600;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Super Fire Tower";
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 9
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
_root["BUL_" + _parent._name]._xscale = 200;
_root["BUL_" + _parent._name]._yscale = 200;
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 10
turret.dmg = 2056;
turret.range = 110;
turret.nxtdmg = 7021;
nxtprice = 1500;
nextrange = 120;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Century Inferno Tower";
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 10
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 11
turret.dmg = 7021;
turret.range = 120;
turret.nxtdmg = "n/a";
nxtprice = "n/a";
nextrange = "n/a";
turret._y = -12.5;
stop();
upgradeable = false;
nam = "FireLord Elemental Tower";
Symbol 70 MovieClip [tower] Frame 12
gotoAndStop (8);
Symbol 70 MovieClip [tower] Frame 13
turret.dmg = 5;
turret.nxtdmg = 15;
nxtprice = 20;
turret._y = -7.5;
stop();
upgradeable = true;
nam = "Water Tower";
turret.range = 100;
nextrange = 150;
stop();
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 13
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
this.play();
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
if (bulspawned == false) {
_root.attachMovie("bullet", "BUL_" + _parent._name, 700 + _root.num);
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["BUL_" + _parent._name].blendMode = "add";
_root["BUL_" + _parent._name].gotoAndStop(2);
_root.num++;
bulspawned = true;
}
}
Symbol 70 MovieClip [tower] Frame 14
turret.dmg = 15;
turret.nxtdmg = 45;
nxtprice = 40;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Cold Water Tower";
turret.range = 150;
nextrange = 150;
stop();
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 14
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 15
turret.dmg = 45;
turret.nxtdmg = 136;
nxtprice = 80;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Ice Tower";
turret.range = 150;
nextrange = 180;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 15
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
_root["BUL_" + _parent._name]._xscale = 150;
_root["BUL_" + _parent._name]._yscale = 150;
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
mindist = new Number(0);
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 16
turret.dmg = 135;
turret.nxtdmg = 405;
nxtprice = 160;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Frost Tower";
turret.range = 180;
nextrange = 200;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 16
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 17
turret.dmg = 405;
turret.nxtdmg = 1215;
nxtprice = 320;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Master Ice Tower";
turret.range = 200;
nextrange = 200;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 17
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
_root["BUL_" + _parent._name]._xscale = 200;
_root["BUL_" + _parent._name]._yscale = 200;
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 18
turret.dmg = 1215;
turret.nxtdmg = 3342;
nxtprice = 730;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Termination Tower";
turret.range = 200;
nextrange = 200;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 18
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 19
turret.dmg = 3342;
turret.nxtdmg = 6684;
nxtprice = 1000;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Ultimate Ice Tower";
turret.range = 200;
nextrange = 215;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 19
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 20
turret.dmg = 6684;
turret.nxtdmg = 7335;
nxtprice = 1000;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Ultimate Ice Tower";
turret.range = 215;
nextrange = 300;
Symbol 70 MovieClip [tower] Frame 21
turret.dmg = 7335;
turret.nxtdmg = "n/a";
nxtprice = "n/a";
turret._y = -32.5;
stop();
upgradeable = false;
nam = "Ultimate Ice Tower";
turret.range = 300;
nextrange = "n/a";
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 21
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 22
gotoAndStop (13);
Symbol 70 MovieClip [tower] Frame 23
turret.dmg = 5;
turret.nxtdmg = 15;
nxtprice = 20;
turret._y = -7.5;
stop();
upgradeable = true;
nam = "Small Nature Tower";
turret.range = 100;
nextrange = 100;
stop();
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 23
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
if (bulspawned == false) {
_root.attachMovie("bullet", "BUL_" + _parent._name, 700 + _root.num);
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["BUL_" + _parent._name].blendMode = "normal";
_root["BUL_" + _parent._name].gotoAndStop(3);
_root.num++;
bulspawned = true;
}
}
Symbol 70 MovieClip [tower] Frame 24
turret.dmg = 10;
turret.nxtdmg = 45;
nxtprice = 40;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Large Nature Tower";
turret.range = 100;
nextrange = 110;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 24
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
_root["BUL_" + _parent._name]._xscale = 150;
_root["BUL_" + _parent._name]._yscale = 150;
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 25
turret.dmg = 20;
turret.nxtdmg = 136;
nxtprice = 80;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Great Nature Tower";
turret.range = 110;
nextrange = 150;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 25
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 26
turret.dmg = 90;
turret.nxtdmg = 405;
nxtprice = 160;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Master Nature Tower";
turret.range = 150;
nextrange = 170;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 26
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
_root["BUL_" + _parent._name]._xscale = 200;
_root["BUL_" + _parent._name]._yscale = 200;
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 27
turret.dmg = 300;
turret.nxtdmg = 1215;
nxtprice = 320;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Master Nature Tower";
turret.range = 170;
nextrange = 190;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 27
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 28
turret.dmg = 1013;
turret.nxtdmg = 3645;
nxtprice = 640;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Enchanted Nature Tower";
turret.range = 190;
nextrange = 200;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 28
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
_root["BUL_" + _parent._name]._xscale = 250;
_root["BUL_" + _parent._name]._yscale = 250;
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 29
turret.dmg = 1458;
turret.nxtdmg = 9000;
nxtprice = 1100;
turret._y = -12.5;
stop();
upgradeable = true;
nam = "Supernatural Tower";
turret.range = 200;
nextrange = 215;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 29
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 2);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 2);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 30
turret.dmg = 9000;
turret.nxtdmg = "n/a";
nxtprice = "n/a";
turret._y = -12.5;
stop();
upgradeable = false;
nam = "Living Tower";
turret.range = 215;
nextrange = "n/a";
Symbol 70 MovieClip [tower] Frame 31
gotoAndStop (18);
Symbol 70 MovieClip [tower] Frame 32
turret.dmg = 9090;
turret.range = 150;
nextrange = 100;
turret.nxtdmg = 15050;
nxtprice = 5000;
turret._y = -7.5;
stop();
upgradeable = true;
nam = "Ultimate Armed Tower";
stop();
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 32
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 4);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 4);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
this.play();
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
if (bulspawned == false) {
_root.attachMovie("bullet", "BUL_" + _parent._name, 700 + _root.num);
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["BUL_" + _parent._name].blendMode = "invert";
_root["BUL_" + _parent._name].gotoAndStop(4);
_root.num++;
bulspawned = true;
}
}
Symbol 70 MovieClip [tower] Frame 33
turret.dmg = 15050;
turret.nxtdmg = 909090 /* 0x0DDF22 */;
nxtprice = 15000;
turret._y = -7.5;
stop();
upgradeable = true;
nam = "Flower Power Tower";
turret.range = 100;
nextrange = 90;
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 33
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 4);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 4);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 34
turret.dmg = 909090 /* 0x0DDF22 */;
turret.nxtdmg = "n/a";
nxtprice = "n/a";
turret._y = -12.5;
stop();
upgradeable = false;
nam = "TTHHE ULLTTIMMATTE TTOWWERR";
turret.range = 90;
nextrange = "n/a";
Instance of Symbol 10 MovieClip [turret] "turret" in Symbol 70 MovieClip [tower] Frame 34
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
_root["BUL_" + _parent._name]._xscale = 150;
_root["BUL_" + _parent._name]._yscale = 150;
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 5);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 5);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
x = _root["c" + target]._x - _parent._x;
y = (_root["c" + target]._y - _parent._y) * -1;
angle = Math.atan(y / x) / 0.0174532925199433 /* Math.PI/180 */;
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
this._rotation = angle * -1;
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
}
Symbol 70 MovieClip [tower] Frame 36
turret.dmg = 40;
turret.nxtdmg = "n/a";
nxtprice = "n/a";
turret._y = -12.5;
stop();
upgradeable = false;
nam = "Storm Tower";
turret.range = 100;
nextrange = "n/a";
stop();
Instance of Symbol 69 MovieClip "turret" in Symbol 70 MovieClip [tower] Frame 36
onClipEvent (load) {
function getDist(x1, y1, x2, y2) {
distancex = x2 - x1;
distancey = y2 - y1;
}
function moveBullet() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
pickTarget();
} else if ((target > 0) & (_root["c" + target].active == true)) {
_root["BUL_" + _parent._name]._visible = true;
_root["BUL_" + _parent._name]._x = _root["BUL_" + _parent._name]._x + ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) / 4);
_root["BUL_" + _parent._name]._y = _root["BUL_" + _parent._name]._y + ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) / 4);
if ((((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) < 1) & ((_root["c" + target]._x - _root["BUL_" + _parent._name]._x) > -1)) | (((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) < 1) & ((_root["c" + target]._y - _root["BUL_" + _parent._name]._y) > -1))) {
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["c" + target].health = _root["c" + target].health - (random(dmg * 0.3) + (dmg * 0.7));
_root["c" + target]._alpha = 100 * (_root["c" + target].health / _root.health);
pickTarget();
}
if (((((_root["c" + i]._x - _parent._x) > 150) | ((_root["c" + i]._x - _parent._x) < -150)) | ((_root["c" + i]._y - _parent._y) > 150)) | ((_root["c" + i]._y - _parent._y) < -150)) {
target = 0;
pickTarget();
}
} else {
pickTarget();
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
}
}
function pickTarget() {
if ((((((target == 0) | (distancex > this.range)) | (distancex < (-this.range))) | (distancey > this.range)) | (distancey < (-this.range))) | (_root["c" + target].active == false)) {
target++;
} else if (target > 8) {
target = 0;
pickTarget();
}
}
pickTarget();
bulspawned = new Boolean(false);
target = new Number(0);
distancex = new Number(0);
distancey = new Number(0);
}
onClipEvent (enterFrame) {
if (target == 0) {
this._rotation = this._rotation + 5;
pickTarget();
} else {
getDist(_parent._x, _parent._y, _root["c" + target]._x, _root["c" + target]._y);
moveBullet();
}
if (bulspawned == false) {
_root.attachMovie("bullet", "BUL_" + _parent._name, 700 + _root.num);
_root["BUL_" + _parent._name]._x = _parent._x;
_root["BUL_" + _parent._name]._y = _parent._y;
_root["BUL_" + _parent._name]._visible = false;
_root["BUL_" + _parent._name].blendMode = normal;
_root["BUL_" + _parent._name].gotoAndStop(5);
_root.num++;
bulspawned = true;
}
}
Symbol 75 MovieClip [bullet] Frame 1
stop();
Symbol 75 MovieClip [bullet] Frame 2
stop();
Symbol 75 MovieClip [bullet] Frame 3
stop();
Symbol 75 MovieClip [bullet] Frame 4
stop();
Symbol 79 MovieClip [guide] Frame 1
this._visible = false;
Symbol 85 Button
on (release) {
play();
}
Symbol 94 MovieClip Frame 1
_root.stop();
_root.start._visible = false;
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
_root.start._visible = true;
this._visible = false;
}
Symbol 94 MovieClip Frame 2
gotoAndPlay (1);
Symbol 129 MovieClip Frame 1
stop();
Symbol 152 Button
on (release) {
if (_root.money >= 18) {
_root.MODE = 1;
_root.SEL = 1;
}
}
Symbol 155 Button
on (release) {
if (_root.money >= 10) {
_root.MODE = 1;
_root.SEL = 2;
}
}
Symbol 158 Button
on (release) {
if (_root.money >= 15) {
_root.MODE = 1;
_root.SEL = 3;
}
}
Symbol 167 Button
on (release) {
if (_root.money >= 3000) {
_root.MODE = 1;
_root.SEL = 4;
}
}
Symbol 173 Button
on (release) {
if (_root.money >= 40) {
_root.MODE = 1;
_root.SEL = 5;
}
}
Symbol 179 Button
on (release) {
if (upgradable) {
if (_root.money >= upg_price) {
_root[_root.SEL].nextFrame();
_root[_root.SEL].turret.active = false;
_root.money = _root.money - upg_price;
_root.selArrow._visible = false;
gotoAndStop (1);
} else {
_root.mess.text = "Insufficient Funds to Upgrade Selected Tower.";
_root.messtim = 3;
}
} else {
_root.mess.text = "This Tower Cannot be Upgraded Any Further.";
_root.messtim = 3;
}
}
Symbol 185 Button
on (release) {
_root.MODE = 0;
_root.SEL = 0;
_root.selArrow._visible = false;
gotoAndStop (1);
}
Symbol 195 MovieClip Frame 1
_root.ex._visible = true;
stop();
Symbol 195 MovieClip Frame 2
var upg_price;
var nxt_dmg;
var upgadable;
_root.ex._visible = false;
Symbol 201 Button
on (rollOver) {
if (MODE == 1) {
_root.MODE = 0;
_root.SEL = 0;
}
_root.guide_rect._x = -100;
_root.guide_rect._y = -100;
}