Frame 1
function deadClick() {
}
function gotoMySite() {
getURL ("http://www.jexica.com", "_top");
}
stop();
var playnow = false;
clicked = new Sound(this);
clicked.attachSound("click");
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var copyrightNotice = new ContextMenuItem("\u00A9 2007 Jexica.com", deadClick);
var mySiteLink = new ContextMenuItem("Jexica.com", gotoMySite);
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
Frame 2
stop();
turret1shot = new Sound(this);
turret1shot.attachSound("t1shot");
turret2shot = new Sound(this);
turret2shot.attachSound("t2shot");
turret3shot = new Sound(this);
turret3shot.attachSound("t3shot");
turret4shot = new Sound(this);
turret4shot.attachSound("t4shot");
turret5shot = new Sound(this);
turret5shot.attachSound("t5shot");
music1 = new Sound(this);
music1.attachSound("music");
turretplace = new Sound(this);
turretplace.attachSound("turretbuild");
var unlock1 = false;
var un1text = "Locked";
var response1 = "";
stopAllSounds();
Frame 3
stop();
var C = 2500;
var tp = 0;
var ton = 0;
var tt = 0;
var er = 50;
var ec = 1;
var ti = 0;
var bn = 1000;
var wait = 0;
var s = 5;
var ex = 20;
var nw = 25;
var cash = 50;
var ec = 10;
var ts = 0;
var lc = 0;
var lives = 30;
var score = 0;
var go = false;
var type = 1;
var lev = 0;
var tss = false;
var cl = 0;
var cd = 0;
var cuc = 0;
var cud = 0;
var nexttype = "Ground";
var deadenemies = 10;
_root.music1.start(0, 999);
onEnterFrame = function () {
if ((((lev % 5) == 4) && (lev != 34)) && (lev != 49)) {
nexttype = "Flying";
} else if (((lev % 7) == 6) || (lev == 49)) {
nexttype = "Boss";
} else {
nexttype = "Ground";
}
if (((lev % 7) == 0) || (lev == 50)) {
type = 3;
} else if ((lev % 5) == 0) {
type = 2;
} else {
type = 1;
}
if (_root.ec <= 9) {
ti++;
}
if ((ti == 20) && (ec <= 9)) {
if (type == 1) {
duplicateMovieClip ("e", "en" + er, er);
} else if (type == 2) {
duplicateMovieClip ("pl", "en" + er, er);
} else if (type == 3) {
duplicateMovieClip ("boss", "en" + er, er);
}
_root.ti = 0;
er++;
if (er == 61) {
er == 0;
}
ec++;
}
if (tss == true) {
cl = _root["t" + _root.ts].levels;
cd = _root["t" + _root.ts].dmg;
cuc = _root["t" + _root.ts].uc;
csv = _root["t" + _root.ts].uc * 0.75;
cud = int(_root["t" + _root.ts].dmg * 1.8);
} else if (tss == false) {
cl = 0;
cd = 0;
cuc = 0;
cud = 0;
}
};
Instance of Symbol 114 MovieClip "ft" in Frame 3
onClipEvent (enterFrame) {
if (_root.ton == 3) {
if (Key.isDown(37)) {
_rotation = (_rotation - 4);
}
if (Key.isDown(39)) {
_rotation = (_rotation + 4);
}
}
for (i in _root) {
if (_root[i]._name.indexOf("t") != -1) {
if (_root[i].bu.hitTest(ftb)) {
_root.tp = 0;
_root.tt = 1;
}
}
}
if (_root.ta.hitTest(_x, _y, true)) {
_root.tp = 0;
} else if ((_root.ton == 1) && (_root.tt == 0)) {
_root.tp = 1;
} else if ((_root.ton == 2) && (_root.tt == 0)) {
_root.tp = 2;
} else if ((_root.ton == 3) && (_root.tt == 0)) {
_root.tp = 3;
} else if ((_root.ton == 4) && (_root.tt == 0)) {
_root.tp = 4;
} else if ((_root.ton == 5) && (_root.tt == 0)) {
_root.tp = 5;
} else {
(_root.tp = 0);
(_root.tt = 0);
}
_x = _root._xmouse;
_y = _root._ymouse;
}
Instance of Symbol 131 MovieClip "menuoption" in Frame 3
onClipEvent (enterFrame) {
if (_root.go == true) {
this.removeMovieClip();
}
}
Instance of Symbol 138 MovieClip "b" in Frame 3
onClipEvent (load) {
var spd = 20;
if (_name == "b") {
_x = -1000;
}
if (sound == false) {
_root.turret1shot.start();
sound = true;
}
xspeed = spd * Math.sin((Math.PI/180) * _rotation);
yspeed = spd * Math.cos((Math.PI/180) * _rotation);
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
_y = (_y - yspeed);
_x = (_x + xspeed);
if (_root.en50.hitTest(this) && (_root.en50.typ == 1)) {
_root.en50.el = _root.en50.el - dmg;
removeMovieClip(this);
} else if (_root.en51.hitTest(this) && (_root.en51.typ == 1)) {
_root.en51.el = _root.en51.el - dmg;
removeMovieClip(this);
} else if (_root.en52.hitTest(this) && (_root.en52.typ == 1)) {
_root.en52.el = _root.en52.el - dmg;
removeMovieClip(this);
} else if (_root.en53.hitTest(this) && (_root.en53.typ == 1)) {
_root.en53.el = _root.en53.el - dmg;
removeMovieClip(this);
} else if (_root.en54.hitTest(this) && (_root.en54.typ == 1)) {
_root.en54.el = _root.en54.el - dmg;
removeMovieClip(this);
} else if (_root.en55.hitTest(this) && (_root.en55.typ == 1)) {
_root.en55.el = _root.en55.el - dmg;
removeMovieClip(this);
} else if (_root.en56.hitTest(this) && (_root.en56.typ == 1)) {
_root.en56.el = _root.en56.el - dmg;
removeMovieClip(this);
} else if (_root.en57.hitTest(this) && (_root.en57.typ == 1)) {
_root.en57.el = _root.en57.el - dmg;
removeMovieClip(this);
} else if (_root.en58.hitTest(this) && (_root.en58.typ == 1)) {
_root.en58.el = _root.en58.el - dmg;
removeMovieClip(this);
} else if (_root.en59.hitTest(this) && (_root.en59.typ == 1)) {
_root.en59.el = _root.en59.el - dmg;
removeMovieClip(this);
}
}
Instance of Symbol 149 MovieClip "t2" in Frame 3
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 45;
var uc = 50;
var ri = 30;
_root.ts = number;
if (_name == "t2") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t2");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.m, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = ba._rotation;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 15) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 156 MovieClip "m" in Frame 3
onClipEvent (load) {
var spd = 5;
var xs = 0;
var ys = 0;
if (sound == false) {
_root.turret2shot.start();
sound = true;
}
if (_name == "m") {
_x = -1000;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
ys = ys + (spd * Math.cos((Math.PI/180) * _rotation));
xs = xs + (spd * Math.sin((Math.PI/180) * _rotation));
if (_rotation > 180) {
_y = (_y + ys);
_x = (_x - xs);
} else {
_y = (_y - ys);
_x = (_x + xs);
}
if (_root.en50.hitTest(this) && (_root.en50.typ == 2)) {
_root.en50.el = _root.en50.el - dmg;
removeMovieClip(this);
} else if (_root.en51.hitTest(this) && (_root.en51.typ == 2)) {
_root.en51.el = _root.en51.el - dmg;
removeMovieClip(this);
} else if (_root.en52.hitTest(this) && (_root.en52.typ == 2)) {
_root.en52.el = _root.en52.el - dmg;
removeMovieClip(this);
} else if (_root.en53.hitTest(this) && (_root.en53.typ == 2)) {
_root.en53.el = _root.en53.el - dmg;
removeMovieClip(this);
} else if (_root.en54.hitTest(this) && (_root.en54.typ == 2)) {
_root.en54.el = _root.en54.el - dmg;
removeMovieClip(this);
} else if (_root.en55.hitTest(this) && (_root.en55.typ == 2)) {
_root.en55.el = _root.en55.el - dmg;
removeMovieClip(this);
} else if (_root.en56.hitTest(this) && (_root.en56.typ == 2)) {
_root.en56.el = _root.en56.el - dmg;
removeMovieClip(this);
} else if (_root.en57.hitTest(this) && (_root.en57.typ == 2)) {
_root.en57.el = _root.en57.el - dmg;
removeMovieClip(this);
} else if (_root.en58.hitTest(this) && (_root.en58.typ == 2)) {
_root.en58.el = _root.en58.el - dmg;
removeMovieClip(this);
} else if (_root.en59.hitTest(this) && (_root.en59.typ == 2)) {
_root.en59.el = _root.en59.el - dmg;
removeMovieClip(this);
}
}
Instance of Symbol 164 MovieClip "t3" in Frame 3
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
_rotation = _root.ft._rotation;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 15;
var ri = 20;
var uc = 100;
_root.ts = number;
if (_name == "t3") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t3");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
i = 50;
while (i < 60) {
if (ra.hitTest(_root["en" + i]._x, _root["en" + i]._y, true)) {
inrange = true;
}
i++;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.r, "r" + _root.bn, _root.bn);
_root["r" + _root.bn]._x = _x;
_root["r" + _root.bn]._y = _y;
_root["r" + _root.bn].sound = false;
_root["r" + _root.bn].dmg = dmg;
_root["r" + _root.bn]._width = this.ra._width;
_root["r" + _root.bn]._height = this.ra._height;
_root["r" + _root.bn]._rotation = _rotation;
_root["r" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 15) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 168 MovieClip "r" in Frame 3
onClipEvent (load) {
var rt = 0;
if (_name == "r") {
_x = -1000;
}
if (sound == false) {
_root.turret3shot.start();
sound = true;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (rt >= 1) {
this.removeMovieClip();
} else {
rt++;
}
if (_x < 0) {
this.removeMovieClip();
}
i = 50;
while (i < 60) {
if (_root["en" + i].hitTest(this)) {
_root["en" + i].el = _root["en" + i].el - dmg;
}
i++;
}
}
Instance of Symbol 179 MovieClip "t4" in Frame 3
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 10;
var uc = 100;
var ri = 15;
var stm = 20;
_root.ts = number;
if (_name == "t4") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t4");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.ic, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = ba._rotation;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
_root["b" + _root.bn].stm = stm;
}
if (shotready == false) {
tic++;
}
if (tic >= 20) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 181 MovieClip "ic" in Frame 3
onClipEvent (load) {
var spd = 20;
if (_name == "ic") {
_x = -1000;
}
if (sound == false) {
_root.turret4shot.start();
sound = true;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
if (_rotation > 180) {
_y = (_y + (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (spd * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (spd * Math.sin((Math.PI/180) * _rotation)));
}
i = 50;
while (i < 60) {
if (_root["en" + i].hitTest(this) && (_root["en" + i].slow == false)) {
_root["en" + i].el = _root["en" + i].el - dmg;
_root["en" + i].slow = true;
_root["en" + i].sc = 0;
_root["en" + i].stm = stm;
removeMovieClip(this);
}
i++;
}
}
Instance of Symbol 192 MovieClip "t" in Frame 3
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 10;
var uc = 20;
var ri = 20;
_root.ts = number;
if (_name == "t") {
_x = -1000;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip("t");
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.b, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = 270 - angle;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 15) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 230 MovieClip "tstats" in Frame 3
onClipEvent (enterFrame) {
if (_root.ttype == 1) {
this.gotoAndStop(2);
} else if (_root.ttype == 2) {
this.gotoAndStop(3);
} else if (_root.ttype == 3) {
this.gotoAndStop(4);
} else if (_root.ttype == 4) {
this.gotoAndStop(5);
} else if (_root.tss == true) {
this.gotoAndStop(6);
} else if (_root.ttype == 6) {
this.gotoAndStop(7);
} else if (_root.ttype == 7) {
this.gotoAndStop(8);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 245 MovieClip "e" in Frame 3
onClipEvent (load) {
_x = 437;
_y = 33.5;
var s = 3;
var xs = (-s);
var ys = 0;
var ex = ((el = _root.ex));
var paid = false;
eb.gotoAndStop(random(10));
var slow = false;
var sc = 0;
var stm = 0;
var typ = 1;
if (_name == "e") {
_x = 2000;
s = (xs = 0);
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
this.removeMovieClip();
}
elb._width = (el / ex) * 34;
sc++;
if (sc >= stm) {
slow = false;
}
if (slow == true) {
_x = (_x + (xs / 6));
_y = (_y + (ys / 6));
}
if (slow == false) {
_x = (_x + xs);
_y = (_y + ys);
}
if ((_x < -20) && (paid == false)) {
paid = true;
_root.deadenemies++;
_root.lives = _root.lives - 1;
this.removeMovieClip();
}
if (_root.lives <= 0) {
_root.go = true;
_root.gotoAndStop(6);
}
if ((el <= 0) && (paid == false)) {
_root.cash = _root.cash + _root.lc;
_root.score = _root.score + ex;
_root.deadenemies++;
paid = true;
}
if ((el <= 0) && (paid == true)) {
this.removeMovieClip();
}
if (_root.goleft.hitTest(_x, _y, true)) {
eb._rotation = 0;
xs = -s;
ys = 0;
}
if (_root.goright.hitTest(_x, _y, true)) {
eb._rotation = 180;
xs = s;
ys = 0;
}
if (_root.goup.hitTest(_x, _y, true)) {
eb._rotation = 90;
xs = 0;
ys = -s;
}
if (_root.godown.hitTest(_x, _y, true)) {
eb._rotation = 270;
xs = 0;
ys = s;
}
}
Instance of Symbol 248 MovieClip "pl" in Frame 3
onClipEvent (load) {
_x = 437;
_y = 33.5;
var s = 4;
var xs = (-s);
var ys = 0;
var ex = ((el = _root.ex));
var paid = false;
eb.gotoAndStop(random(10));
var slow = false;
var sc = 0;
var stm = 0;
var typ = 2;
if (_name == "pl") {
_x = 2000;
s = (xs = 0);
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
this.removeMovieClip();
}
elb._width = (el / ex) * 34;
sc++;
if (sc >= stm) {
slow = false;
}
if (slow == true) {
_x = (_x + (xs / 6));
_y = (_y + (ys / 6));
}
if (slow == false) {
_x = (_x + xs);
_y = (_y + ys);
}
if ((_x < -20) && (paid == false)) {
paid = true;
_root.deadenemies++;
_root.lives = _root.lives - 1;
this.removeMovieClip();
}
if (_root.lives <= 0) {
_root.go = true;
_root.gotoAndStop(6);
}
if ((el <= 0) && (paid == false)) {
_root.cash = _root.cash + _root.lc;
_root.score = _root.score + ex;
_root.deadenemies++;
paid = true;
}
if ((el <= 0) && (paid == true)) {
this.removeMovieClip();
}
if (_root.goleft.hitTest(_x, _y, true)) {
eb._rotation = 0;
xs = -s;
ys = 0;
}
if (_root.goright.hitTest(_x, _y, true)) {
eb._rotation = 180;
xs = s;
ys = 0;
}
if (_root.goup.hitTest(_x, _y, true)) {
eb._rotation = 90;
xs = 0;
ys = -s;
}
if (_root.godown.hitTest(_x, _y, true)) {
eb._rotation = 270;
xs = 0;
ys = s;
}
}
Instance of Symbol 251 MovieClip "boss" in Frame 3
onClipEvent (load) {
_x = 437;
_y = 33.5;
var s = 2;
var xs = (-s);
var ys = 0;
var ex = ((el = _root.ex * 6));
var paid = false;
eb.gotoAndStop(random(10));
var slow = false;
var sc = 0;
var stm = 0;
var typ = 1;
_root.ec = 10;
if (_root.lev == 50) {
end = true;
} else {
end = false;
}
if (_name == "boss") {
_x = 2000;
s = (xs = 0);
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
this.removeMovieClip();
}
elb._width = (el / ex) * 34;
sc++;
if (sc >= stm) {
slow = false;
}
if (slow == true) {
_x = (_x + (xs / 6));
_y = (_y + (ys / 6));
}
if (slow == false) {
_x = (_x + xs);
_y = (_y + ys);
}
if ((end == true) && (el <= 0)) {
_root.go = true;
_root.gotoAndStop(7);
}
if (((end == true) && (_x < -10)) && (_root.lives >= 1)) {
_root.go = true;
_root.gotoAndStop(7);
}
if ((_x < -20) && (paid == false)) {
paid = true;
_root.deadenemies = _root.deadenemies + 10;
_root.lives = _root.lives - 1;
this.removeMovieClip();
}
if (_root.lives <= 0) {
_root.go = true;
_root.gotoAndStop(6);
}
if ((el <= 0) && (paid == false)) {
_root.cash = _root.cash + (_root.lc * 10);
_root.score = _root.score + ex;
_root.deadenemies = _root.deadenemies + 10;
paid = true;
}
if ((el <= 0) && (paid == true)) {
this.removeMovieClip();
}
if (_root.goleft.hitTest(_x, _y, true)) {
eb._rotation = 0;
xs = -s;
ys = 0;
}
if (_root.goright.hitTest(_x, _y, true)) {
eb._rotation = 180;
xs = s;
ys = 0;
}
if (_root.goup.hitTest(_x, _y, true)) {
eb._rotation = 90;
xs = 0;
ys = -s;
}
if (_root.godown.hitTest(_x, _y, true)) {
eb._rotation = 270;
xs = 0;
ys = s;
}
}
Instance of Symbol 257 MovieClip "t5" in Frame 3
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 5;
var uc = 150;
var ri = 15;
_root.ts = number;
if (_name == "t5") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t5");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.t4s, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = ba._rotation;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 2) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 259 MovieClip "t4s" in Frame 3
onClipEvent (load) {
var spd = 30;
var xs = 0;
var ys = 0;
if (sound == false) {
_root.turret5shot.start();
sound = true;
}
if (_name == "t4s") {
_x = -1000;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
ys = spd * Math.cos((Math.PI/180) * _rotation);
xs = spd * Math.sin((Math.PI/180) * _rotation);
if (_rotation > 180) {
_y = (_y + ys);
_x = (_x - xs);
} else {
_y = (_y - ys);
_x = (_x + xs);
}
if (_root.en50.hitTest(this)) {
_root.en50.el = _root.en50.el - dmg;
removeMovieClip(this);
} else if (_root.en51.hitTest(this)) {
_root.en51.el = _root.en51.el - dmg;
removeMovieClip(this);
} else if (_root.en52.hitTest(this)) {
_root.en52.el = _root.en52.el - dmg;
removeMovieClip(this);
} else if (_root.en53.hitTest(this)) {
_root.en53.el = _root.en53.el - dmg;
removeMovieClip(this);
} else if (_root.en54.hitTest(this)) {
_root.en54.el = _root.en54.el - dmg;
removeMovieClip(this);
} else if (_root.en55.hitTest(this)) {
_root.en55.el = _root.en55.el - dmg;
removeMovieClip(this);
} else if (_root.en56.hitTest(this)) {
_root.en56.el = _root.en56.el - dmg;
removeMovieClip(this);
} else if (_root.en57.hitTest(this)) {
_root.en57.el = _root.en57.el - dmg;
removeMovieClip(this);
} else if (_root.en58.hitTest(this)) {
_root.en58.el = _root.en58.el - dmg;
removeMovieClip(this);
} else if (_root.en59.hitTest(this)) {
_root.en59.el = _root.en59.el - dmg;
removeMovieClip(this);
}
}
Frame 4
stop();
var ton = 0;
var tt = 0;
var er = 50;
var ec = 1;
var ti = 0;
var bn = 1000;
var wait = 0;
var s = 5;
var ex = 20;
var nw = 25;
var cash = 50;
var ec = 10;
var ts = 0;
var lc = 0;
var lives = 30;
var score = 0;
var go = false;
var type = 1;
var lev = 0;
var tss = false;
var cl = 0;
var cd = 0;
var cuc = 0;
var cud = 0;
var nexttype = "Ground";
var deadenemies = 10;
_root.music1.start(0, 999);
onEnterFrame = function () {
if ((((lev % 5) == 4) && (lev != 34)) && (lev != 49)) {
nexttype = "Flying";
} else if (((lev % 7) == 6) || (lev == 49)) {
nexttype = "Boss";
} else {
nexttype = "Ground";
}
if (((lev % 7) == 0) || (lev == 50)) {
type = 3;
} else if ((lev % 5) == 0) {
type = 2;
} else {
type = 1;
}
if (_root.ec <= 9) {
ti++;
}
if ((ti == 20) && (ec <= 9)) {
if (type == 1) {
duplicateMovieClip ("e", "en" + er, er);
} else if (type == 2) {
duplicateMovieClip ("pl", "en" + er, er);
} else if (type == 3) {
duplicateMovieClip ("boss", "en" + er, er);
}
_root.ti = 0;
er++;
if (er == 61) {
er == 0;
}
ec++;
}
if (tss == true) {
cl = _root["t" + _root.ts].levels;
cd = _root["t" + _root.ts].dmg;
cuc = _root["t" + _root.ts].uc;
csv = _root["t" + _root.ts].uc * 0.75;
cud = int(_root["t" + _root.ts].dmg * 1.8);
} else if (tss == false) {
cl = 0;
cd = 0;
cuc = 0;
cud = 0;
}
};
Instance of Symbol 131 MovieClip "menuoption" in Frame 4
onClipEvent (enterFrame) {
if (_root.go == true) {
this.removeMovieClip();
}
}
Instance of Symbol 138 MovieClip "b" in Frame 4
onClipEvent (load) {
var spd = 20;
if (_name == "b") {
_x = -1000;
}
if (sound == false) {
_root.turretshot.start();
sound = true;
}
xspeed = spd * Math.sin((Math.PI/180) * _rotation);
yspeed = spd * Math.cos((Math.PI/180) * _rotation);
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
_y = (_y - yspeed);
_x = (_x + xspeed);
if (_root.en50.hitTest(this) && (_root.en50.typ == 1)) {
_root.en50.el = _root.en50.el - dmg;
removeMovieClip(this);
} else if (_root.en51.hitTest(this) && (_root.en51.typ == 1)) {
_root.en51.el = _root.en51.el - dmg;
removeMovieClip(this);
} else if (_root.en52.hitTest(this) && (_root.en52.typ == 1)) {
_root.en52.el = _root.en52.el - dmg;
removeMovieClip(this);
} else if (_root.en53.hitTest(this) && (_root.en53.typ == 1)) {
_root.en53.el = _root.en53.el - dmg;
removeMovieClip(this);
} else if (_root.en54.hitTest(this) && (_root.en54.typ == 1)) {
_root.en54.el = _root.en54.el - dmg;
removeMovieClip(this);
} else if (_root.en55.hitTest(this) && (_root.en55.typ == 1)) {
_root.en55.el = _root.en55.el - dmg;
removeMovieClip(this);
} else if (_root.en56.hitTest(this) && (_root.en56.typ == 1)) {
_root.en56.el = _root.en56.el - dmg;
removeMovieClip(this);
} else if (_root.en57.hitTest(this) && (_root.en57.typ == 1)) {
_root.en57.el = _root.en57.el - dmg;
removeMovieClip(this);
} else if (_root.en58.hitTest(this) && (_root.en58.typ == 1)) {
_root.en58.el = _root.en58.el - dmg;
removeMovieClip(this);
} else if (_root.en59.hitTest(this) && (_root.en59.typ == 1)) {
_root.en59.el = _root.en59.el - dmg;
removeMovieClip(this);
}
}
Instance of Symbol 149 MovieClip "t2" in Frame 4
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 45;
var uc = 50;
var ri = 30;
_root.ts = number;
if (_name == "t2") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t2");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.m, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = ba._rotation;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 15) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 156 MovieClip "m" in Frame 4
onClipEvent (load) {
var spd = 5;
var xs = 0;
var ys = 0;
if (sound == false) {
turretshot.start();
sound = true;
}
if (_name == "m") {
_x = -1000;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
ys = ys + (spd * Math.cos((Math.PI/180) * _rotation));
xs = xs + (spd * Math.sin((Math.PI/180) * _rotation));
if (_rotation > 180) {
_y = (_y + ys);
_x = (_x - xs);
} else {
_y = (_y - ys);
_x = (_x + xs);
}
if (_root.en50.hitTest(this) && (_root.en50.typ == 2)) {
_root.en50.el = _root.en50.el - dmg;
removeMovieClip(this);
} else if (_root.en51.hitTest(this) && (_root.en51.typ == 2)) {
_root.en51.el = _root.en51.el - dmg;
removeMovieClip(this);
} else if (_root.en52.hitTest(this) && (_root.en52.typ == 2)) {
_root.en52.el = _root.en52.el - dmg;
removeMovieClip(this);
} else if (_root.en53.hitTest(this) && (_root.en53.typ == 2)) {
_root.en53.el = _root.en53.el - dmg;
removeMovieClip(this);
} else if (_root.en54.hitTest(this) && (_root.en54.typ == 2)) {
_root.en54.el = _root.en54.el - dmg;
removeMovieClip(this);
} else if (_root.en55.hitTest(this) && (_root.en55.typ == 2)) {
_root.en55.el = _root.en55.el - dmg;
removeMovieClip(this);
} else if (_root.en56.hitTest(this) && (_root.en56.typ == 2)) {
_root.en56.el = _root.en56.el - dmg;
removeMovieClip(this);
} else if (_root.en57.hitTest(this) && (_root.en57.typ == 2)) {
_root.en57.el = _root.en57.el - dmg;
removeMovieClip(this);
} else if (_root.en58.hitTest(this) && (_root.en58.typ == 2)) {
_root.en58.el = _root.en58.el - dmg;
removeMovieClip(this);
} else if (_root.en59.hitTest(this) && (_root.en59.typ == 2)) {
_root.en59.el = _root.en59.el - dmg;
removeMovieClip(this);
}
}
Instance of Symbol 168 MovieClip "r" in Frame 4
onClipEvent (load) {
var rt = 0;
if (_name == "r") {
_x = -1000;
}
if (sound == false) {
turretshot.start();
sound = true;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (rt >= 1) {
this.removeMovieClip();
} else {
rt++;
}
if (_x < 0) {
this.removeMovieClip();
}
i = 50;
while (i < 60) {
if (_root["en" + i].hitTest(this)) {
_root["en" + i].el = _root["en" + i].el - dmg;
}
i++;
}
}
Instance of Symbol 179 MovieClip "t4" in Frame 4
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 5;
var uc = 100;
var ri = 15;
var stm = 20;
_root.ts = number;
if (_name == "t4") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t4");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.ic, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = ba._rotation;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
_root["b" + _root.bn].stm = stm;
}
if (shotready == false) {
tic++;
}
if (tic >= 20) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 181 MovieClip "ic" in Frame 4
onClipEvent (load) {
var spd = 20;
if (_name == "ic") {
_x = -1000;
}
if (sound == false) {
_root.turretshot.start();
sound = true;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
if (_rotation > 180) {
_y = (_y + (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (spd * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (spd * Math.sin((Math.PI/180) * _rotation)));
}
i = 50;
while (i < 60) {
if (_root["en" + i].hitTest(this) && (_root["en" + i].slow == false)) {
_root["en" + i].el = _root["en" + i].el - dmg;
_root["en" + i].slow = true;
_root["en" + i].sc = 0;
_root["en" + i].stm = stm;
removeMovieClip(this);
}
i++;
}
}
Instance of Symbol 192 MovieClip "t" in Frame 4
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 10;
var uc = 20;
var ri = 20;
_root.ts = number;
if (_name == "t") {
_x = -1000;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip("t");
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.b, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = 270 - angle;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 15) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 164 MovieClip "t3" in Frame 4
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
_rotation = _root.ft._rotation;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 15;
var ri = 20;
var uc = 100;
_root.ts = number;
if (_name == "t3") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t3");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
i = 50;
while (i < 60) {
if (ra.hitTest(_root["en" + i]._x, _root["en" + i]._y, true)) {
inrange = true;
}
i++;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.r, "r" + _root.bn, _root.bn);
_root["r" + _root.bn]._x = _x;
_root["r" + _root.bn]._y = _y;
_root["r" + _root.bn].sound = false;
_root["r" + _root.bn].dmg = dmg;
_root["r" + _root.bn]._width = this.ra._width;
_root["r" + _root.bn]._height = this.ra._height;
_root["r" + _root.bn]._rotation = _rotation;
_root["r" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 15) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 230 MovieClip "tstats" in Frame 4
onClipEvent (enterFrame) {
if (_root.ttype == 1) {
this.gotoAndStop(2);
} else if (_root.ttype == 2) {
this.gotoAndStop(3);
} else if (_root.ttype == 3) {
this.gotoAndStop(4);
} else if (_root.ttype == 4) {
this.gotoAndStop(5);
} else if (_root.tss == true) {
this.gotoAndStop(6);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 257 MovieClip "t5" in Frame 4
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 7;
var uc = 150;
var ri = 15;
_root.ts = number;
if (_name == "t5") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t5");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.t4s, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = ba._rotation;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 2) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 259 MovieClip "t4s" in Frame 4
onClipEvent (load) {
var spd = 30;
var xs = 0;
var ys = 0;
if (sound == false) {
_root.turret5shot.start();
sound = true;
}
if (_name == "t4s") {
_x = -1000;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
ys = spd * Math.cos((Math.PI/180) * _rotation);
xs = spd * Math.sin((Math.PI/180) * _rotation);
if (_rotation > 180) {
_y = (_y + ys);
_x = (_x - xs);
} else {
_y = (_y - ys);
_x = (_x + xs);
}
if (_root.en50.hitTest(this)) {
_root.en50.el = _root.en50.el - dmg;
removeMovieClip(this);
} else if (_root.en51.hitTest(this)) {
_root.en51.el = _root.en51.el - dmg;
removeMovieClip(this);
} else if (_root.en52.hitTest(this)) {
_root.en52.el = _root.en52.el - dmg;
removeMovieClip(this);
} else if (_root.en53.hitTest(this)) {
_root.en53.el = _root.en53.el - dmg;
removeMovieClip(this);
} else if (_root.en54.hitTest(this)) {
_root.en54.el = _root.en54.el - dmg;
removeMovieClip(this);
} else if (_root.en55.hitTest(this)) {
_root.en55.el = _root.en55.el - dmg;
removeMovieClip(this);
} else if (_root.en56.hitTest(this)) {
_root.en56.el = _root.en56.el - dmg;
removeMovieClip(this);
} else if (_root.en57.hitTest(this)) {
_root.en57.el = _root.en57.el - dmg;
removeMovieClip(this);
} else if (_root.en58.hitTest(this)) {
_root.en58.el = _root.en58.el - dmg;
removeMovieClip(this);
} else if (_root.en59.hitTest(this)) {
_root.en59.el = _root.en59.el - dmg;
removeMovieClip(this);
}
}
Instance of Symbol 251 MovieClip "boss" in Frame 4
onClipEvent (load) {
_x = 437;
_y = 33.5;
var s = 2;
var xs = (-s);
var ys = 0;
var ex = ((el = _root.ex * 6));
var paid = false;
eb.gotoAndStop(random(10));
var slow = false;
var sc = 0;
var stm = 0;
var typ = 1;
_root.ec = 10;
if (_root.lev == 50) {
end = true;
} else {
end = false;
}
if (_name == "boss") {
_x = 2000;
s = (xs = 0);
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
this.removeMovieClip();
}
elb._width = (el / ex) * 34;
sc++;
if (sc >= stm) {
slow = false;
}
if (slow == true) {
_x = (_x + (xs / 6));
_y = (_y + (ys / 6));
}
if (slow == false) {
_x = (_x + xs);
_y = (_y + ys);
}
if ((end == true) && (el <= 0)) {
_root.go = true;
_root.gotoAndStop(7);
}
if (((end == true) && (_x < -10)) && (_root.lives >= 2)) {
_root.go = true;
_root.gotoAndStop(7);
}
if ((_x < -20) && (paid == false)) {
paid = true;
_root.deadenemies = _root.deadenemies + 10;
_root.lives = _root.lives - 1;
this.removeMovieClip();
}
if (_root.lives <= 0) {
_root.go = true;
_root.gotoAndStop(6);
}
if ((el <= 0) && (paid == false)) {
_root.cash = _root.cash + (_root.lc * 10);
_root.score = _root.score + ex;
_root.deadenemies = _root.deadenemies + 10;
paid = true;
}
if ((el <= 0) && (paid == true)) {
this.removeMovieClip();
}
if (_root.goleft.hitTest(_x, _y, true)) {
eb._rotation = 0;
xs = -s;
ys = 0;
}
if (_root.goright.hitTest(_x, _y, true)) {
eb._rotation = 180;
xs = s;
ys = 0;
}
if (_root.goup.hitTest(_x, _y, true)) {
eb._rotation = 90;
xs = 0;
ys = -s;
}
if (_root.godown.hitTest(_x, _y, true)) {
eb._rotation = 270;
xs = 0;
ys = s;
}
}
Frame 5
stop();
var ton = 0;
var tt = 0;
var er = 50;
var ec = 1;
var ti = 0;
var bn = 1000;
var wait = 0;
var s = 5;
var ex = 20;
var nw = 25;
var cash = 50;
var ec = 10;
var ts = 0;
var lc = 0;
var lives = 30;
var score = 0;
var go = false;
var type = 1;
var lev = 0;
var tss = false;
var cl = 0;
var cd = 0;
var cuc = 0;
var cud = 0;
var nexttype = "Ground";
var deadenemies = 10;
_root.music1.start(0, 999);
onEnterFrame = function () {
if ((((lev % 5) == 4) && (lev != 34)) && (lev != 49)) {
nexttype = "Flying";
} else if (((lev % 7) == 6) || (lev == 49)) {
nexttype = "Boss";
} else {
nexttype = "Ground";
}
if (((lev % 7) == 0) || (lev == 50)) {
type = 3;
} else if ((lev % 5) == 0) {
type = 2;
} else {
type = 1;
}
if (_root.ec <= 9) {
ti++;
}
if ((ti == 20) && (ec <= 9)) {
if (type == 1) {
duplicateMovieClip ("e", "en" + er, er);
} else if (type == 2) {
duplicateMovieClip ("pl", "en" + er, er);
} else if (type == 3) {
duplicateMovieClip ("boss", "en" + er, er);
}
_root.ti = 0;
er++;
if (er == 61) {
er == 0;
}
ec++;
}
if (tss == true) {
cl = _root["t" + _root.ts].levels;
cd = _root["t" + _root.ts].dmg;
cuc = _root["t" + _root.ts].uc;
csv = _root["t" + _root.ts].uc * 0.75;
cud = int(_root["t" + _root.ts].dmg * 1.8);
} else if (tss == false) {
cl = 0;
cd = 0;
cuc = 0;
cud = 0;
}
};
Instance of Symbol 138 MovieClip "b" in Frame 5
onClipEvent (load) {
var spd = 20;
if (_name == "b") {
_x = -1000;
}
if (sound == false) {
_root.turretshot.start();
sound = true;
}
xspeed = spd * Math.sin((Math.PI/180) * _rotation);
yspeed = spd * Math.cos((Math.PI/180) * _rotation);
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
_y = (_y - yspeed);
_x = (_x + xspeed);
if (_root.en50.hitTest(this) && (_root.en50.typ == 1)) {
_root.en50.el = _root.en50.el - dmg;
removeMovieClip(this);
} else if (_root.en51.hitTest(this) && (_root.en51.typ == 1)) {
_root.en51.el = _root.en51.el - dmg;
removeMovieClip(this);
} else if (_root.en52.hitTest(this) && (_root.en52.typ == 1)) {
_root.en52.el = _root.en52.el - dmg;
removeMovieClip(this);
} else if (_root.en53.hitTest(this) && (_root.en53.typ == 1)) {
_root.en53.el = _root.en53.el - dmg;
removeMovieClip(this);
} else if (_root.en54.hitTest(this) && (_root.en54.typ == 1)) {
_root.en54.el = _root.en54.el - dmg;
removeMovieClip(this);
} else if (_root.en55.hitTest(this) && (_root.en55.typ == 1)) {
_root.en55.el = _root.en55.el - dmg;
removeMovieClip(this);
} else if (_root.en56.hitTest(this) && (_root.en56.typ == 1)) {
_root.en56.el = _root.en56.el - dmg;
removeMovieClip(this);
} else if (_root.en57.hitTest(this) && (_root.en57.typ == 1)) {
_root.en57.el = _root.en57.el - dmg;
removeMovieClip(this);
} else if (_root.en58.hitTest(this) && (_root.en58.typ == 1)) {
_root.en58.el = _root.en58.el - dmg;
removeMovieClip(this);
} else if (_root.en59.hitTest(this) && (_root.en59.typ == 1)) {
_root.en59.el = _root.en59.el - dmg;
removeMovieClip(this);
}
}
Instance of Symbol 149 MovieClip "t2" in Frame 5
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 45;
var uc = 50;
var ri = 30;
_root.ts = number;
if (_name == "t2") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t2");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.typ == 2)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.m, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = ba._rotation;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 15) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 156 MovieClip "m" in Frame 5
onClipEvent (load) {
var spd = 5;
var xs = 0;
var ys = 0;
if (sound == false) {
turretshot.start();
sound = true;
}
if (_name == "m") {
_x = -1000;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
ys = ys + (spd * Math.cos((Math.PI/180) * _rotation));
xs = xs + (spd * Math.sin((Math.PI/180) * _rotation));
if (_rotation > 180) {
_y = (_y + ys);
_x = (_x - xs);
} else {
_y = (_y - ys);
_x = (_x + xs);
}
if (_root.en50.hitTest(this) && (_root.en50.typ == 2)) {
_root.en50.el = _root.en50.el - dmg;
removeMovieClip(this);
} else if (_root.en51.hitTest(this) && (_root.en51.typ == 2)) {
_root.en51.el = _root.en51.el - dmg;
removeMovieClip(this);
} else if (_root.en52.hitTest(this) && (_root.en52.typ == 2)) {
_root.en52.el = _root.en52.el - dmg;
removeMovieClip(this);
} else if (_root.en53.hitTest(this) && (_root.en53.typ == 2)) {
_root.en53.el = _root.en53.el - dmg;
removeMovieClip(this);
} else if (_root.en54.hitTest(this) && (_root.en54.typ == 2)) {
_root.en54.el = _root.en54.el - dmg;
removeMovieClip(this);
} else if (_root.en55.hitTest(this) && (_root.en55.typ == 2)) {
_root.en55.el = _root.en55.el - dmg;
removeMovieClip(this);
} else if (_root.en56.hitTest(this) && (_root.en56.typ == 2)) {
_root.en56.el = _root.en56.el - dmg;
removeMovieClip(this);
} else if (_root.en57.hitTest(this) && (_root.en57.typ == 2)) {
_root.en57.el = _root.en57.el - dmg;
removeMovieClip(this);
} else if (_root.en58.hitTest(this) && (_root.en58.typ == 2)) {
_root.en58.el = _root.en58.el - dmg;
removeMovieClip(this);
} else if (_root.en59.hitTest(this) && (_root.en59.typ == 2)) {
_root.en59.el = _root.en59.el - dmg;
removeMovieClip(this);
}
}
Instance of Symbol 168 MovieClip "r" in Frame 5
onClipEvent (load) {
var rt = 0;
if (_name == "r") {
_x = -1000;
}
if (sound == false) {
turretshot.start();
sound = true;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (rt >= 1) {
this.removeMovieClip();
} else {
rt++;
}
if (_x < 0) {
this.removeMovieClip();
}
i = 50;
while (i < 60) {
if (_root["en" + i].hitTest(this)) {
_root["en" + i].el = _root["en" + i].el - dmg;
}
i++;
}
}
Instance of Symbol 179 MovieClip "t4" in Frame 5
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 5;
var uc = 100;
var ri = 15;
var stm = 20;
_root.ts = number;
if (_name == "t4") {
_x = -1000;
}
if (_x < -500) {
removeMovieClip("t4");
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.slow == false)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.ic, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = ba._rotation;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
_root["b" + _root.bn].stm = stm;
}
if (shotready == false) {
tic++;
}
if (tic >= 20) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Instance of Symbol 181 MovieClip "ic" in Frame 5
onClipEvent (load) {
var spd = 20;
if (_name == "ic") {
_x = -1000;
}
if (sound == false) {
_root.turretshot.start();
sound = true;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if ((((_x > 450) || (_x < 0)) || (_y < 0)) || (_y > 400)) {
this.removeMovieClip();
}
if (_rotation > 180) {
_y = (_y + (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (spd * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (spd * Math.sin((Math.PI/180) * _rotation)));
}
i = 50;
while (i < 60) {
if (_root["en" + i].hitTest(this) && (_root["en" + i].slow == false)) {
_root["en" + i].el = _root["en" + i].el - dmg;
_root["en" + i].slow = true;
_root["en" + i].sc = 0;
_root["en" + i].stm = stm;
removeMovieClip(this);
}
i++;
}
}
Instance of Symbol 230 MovieClip "tstats" in Frame 5
onClipEvent (enterFrame) {
if (_root.ttype == 1) {
this.gotoAndStop(2);
} else if (_root.ttype == 2) {
this.gotoAndStop(3);
} else if (_root.ttype == 3) {
this.gotoAndStop(4);
} else if (_root.ttype == 4) {
this.gotoAndStop(5);
} else if (_root.tss == true) {
this.gotoAndStop(6);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 192 MovieClip "t" in Frame 5
onClipEvent (load) {
_x = _root._xmouse;
_y = _root._ymouse;
var tic = 0;
var shotready = false;
var levels = 1;
var inrange = false;
var dmg = 10;
var uc = 20;
var ri = 20;
_root.ts = number;
if (_name == "t") {
_x = -1000;
}
}
onClipEvent (enterFrame) {
if (_root.go == true) {
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip("t");
}
if (ra.hitTest(_root.en50._x, _root.en50._y, true) && (_root.en50.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en50._x;
oppside = (_y + ba._y) - _root.en50._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en51._x, _root.en51._y, true) && (_root.en51.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en51._x;
oppside = (_y + ba._y) - _root.en51._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en52._x, _root.en52._y, true) && (_root.en52.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en52._x;
oppside = (_y + ba._y) - _root.en52._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en53._x, _root.en53._y, true) && (_root.en53.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en53._x;
oppside = (_y + ba._y) - _root.en53._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en54._x, _root.en54._y, true) && (_root.en54.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en54._x;
oppside = (_y + ba._y) - _root.en54._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en55._x, _root.en55._y, true) && (_root.en55.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en55._x;
oppside = (_y + ba._y) - _root.en55._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en56._x, _root.en56._y, true) && (_root.en56.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en56._x;
oppside = (_y + ba._y) - _root.en56._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en57._x, _root.en57._y, true) && (_root.en57.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en57._x;
oppside = (_y + ba._y) - _root.en57._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en58._x, _root.en58._y, true) && (_root.en58.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en58._x;
oppside = (_y + ba._y) - _root.en58._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
} else if (ra.hitTest(_root.en59._x, _root.en59._y, true) && (_root.en59.typ == 1)) {
inrange = true;
adjside = (_x + ba._x) - _root.en59._x;
oppside = (_y + ba._y) - _root.en59._y;
angle = Math.atan2(-oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
ba._rotation = 270 - angle;
}
if ((shotready == true) && (inrange == true)) {
_root.bn++;
if (_root.bn >= 2000) {
_root.bn = 1000;
}
shotready = false;
inrange = false;
duplicateMovieClip (_root.b, "b" + _root.bn, _root.bn);
_root["b" + _root.bn]._x = _x;
_root["b" + _root.bn]._y = _y;
_root["b" + _root.bn]._rotation = 270 - angle;
_root["b" + _root.bn].sound = false;
_root["b" + _root.bn].dmg = dmg;
_root["b" + _root.bn].gotoAndStop(levels);
}
if (shotready == false) {
tic++;
}
if (tic >= 15) {
tic = 0;
shotready = true;
}
if (bu.overunit == true) {
ra.gotoAndStop(1);
} else if (((_root.ts != number) && (bu.overunit == false)) || (_root.tss == false)) {
ra.gotoAndStop(2);
}
if (bu.clickunit == true) {
_root.ts = number;
_root.tss = true;
bu.clickunit = false;
}
}
Frame 6
stop();
Frame 7
stop();
Symbol 15 Button
on (press) {
getURL ("http://www.jexica.com", _blank);
}
Symbol 19 Button
on (release) {
_root.clicked.start();
_root.gotoAndPlay(2);
}
Symbol 23 Button
on (press) {
_root.clicked.start();
}
on (release) {
_root.gotoAndPlay(3);
}
Symbol 26 Button
on (press) {
_root.clicked.start();
}
on (release) {
_root.gotoAndPlay(4);
}
Symbol 29 Button
on (press) {
_root.clicked.start();
}
on (release) {
_root.gotoAndPlay(5);
}
Symbol 40 Button
on (press) {
if (ulcode eq "fire away") {
_root.unlock1 = true;
_root.un1text = "";
_root.response1 = "Machine Gun Unlocked";
} else {
_root.response1 = "Try Again";
}
}
Symbol 54 Button
on (press) {
_root.tss = false;
}
on (release) {
if (_root.tp == 1) {
_root.C++;
ft.gotoAndStop(1);
duplicateMovieClip ("t", "t" + C, C);
_root.turretplace.start();
_root.tss = true;
_root["t" + C].number = _root.C;
_root.cash = _root.cash - 20;
_root.ton = 0;
} else {
if (_root.tp == 2) {
_root.C++;
ft.gotoAndStop(1);
duplicateMovieClip ("t2", "t" + C, C);
_root.turretplace.start();
_root.tss = true;
_root["t" + C].number = _root.C;
_root.cash = _root.cash - 50;
_root.ton = 0;
}
if (_root.tp == 3) {
_root.C++;
ft.gotoAndStop(1);
duplicateMovieClip ("t3", "t" + C, C);
_root.turretplace.start();
_root.tss = true;
_root["t" + C].number = _root.C;
_root.cash = _root.cash - 100;
_root.ton = 0;
}
if (_root.tp == 4) {
_root.C++;
ft.gotoAndStop(1);
duplicateMovieClip ("t4", "t" + C, C);
_root.turretplace.start();
_root.tss = true;
_root["t" + C].number = _root.C;
_root.cash = _root.cash - 100;
_root.ton = 0;
}
}
if (_root.tp == 5) {
_root.C++;
ft.gotoAndStop(1);
duplicateMovieClip ("t5", "t" + C, C);
_root.turretplace.start();
_root.tss = true;
_root["t" + C].number = _root.C;
_root.cash = _root.cash - 150;
_root.ton = 0;
}
}
on (rollOver) {
_root.ttype = 0;
}
Symbol 61 Button
on (press) {
_root.tss = false;
}
on (rollOver) {
_root.ttype = 0;
}
Symbol 66 Button
on (press) {
if (_root.cash >= 100) {
_root.clicked.start();
}
}
on (release) {
if (_root.cash >= 100) {
duplicateMovieClip (_root.ft, "ft", _root.bn);
_root.ft.gotoAndStop(4);
_root.ft._rotation = 0;
_root.ton = 3;
}
}
on (rollOver) {
_root.ttype = 3;
}
Symbol 71 Button
on (press) {
if (_root.cash >= 100) {
_root.clicked.start();
}
}
on (release) {
if (_root.cash >= 100) {
duplicateMovieClip (_root.ft, "ft", _root.bn);
_root.ft.gotoAndStop(5);
_root.ft._rotation = 0;
_root.ton = 4;
}
}
on (rollOver) {
_root.ttype = 4;
}
Symbol 77 Button
on (press) {
if (_root.cash >= 50) {
_root.clicked.start();
}
}
on (release) {
if (_root.cash >= 50) {
duplicateMovieClip (_root.ft, "ft", _root.bn);
_root.ft.gotoAndStop(3);
_root.ft._rotation = 0;
_root.ton = 2;
}
}
on (rollOver) {
_root.ttype = 2;
}
Symbol 80 Button
on (press) {
if (_root.cash >= 20) {
_root.clicked.start();
}
}
on (release) {
if (_root.cash >= 20) {
duplicateMovieClip (_root.ft, "ft", _root.bn);
_root.ft.gotoAndStop(2);
_root.ft._rotation = 0;
_root.ton = 1;
}
}
on (rollOver) {
_root.ttype = 1;
}
Symbol 83 Button
on (press) {
duplicateMovieClip (_root.menuoption, "menus", 8000);
_root.menus._x = 100;
_root.menus._y = 150;
_root.menus.gotoAndStop(2);
}
Symbol 87 Button
on (release) {
if (((_root.ec == 10) && (_root.lev != 50)) && (_root.deadenemies == 10)) {
_root.lc++;
_root.lev++;
_root.er = 50;
_root.deadenemies = 0;
_root.ti = 0;
_root.ec = 0;
_root.cash = int(_root.cash * 1.05);
_root.ex = _root.nw;
_root.nw = int((_root.ex * (1 + (random(26) / 100))) + 5);
}
}
Symbol 96 Button
on (press) {
if (_root.unlock1 == true) {
if (_root.cash >= 150) {
_root.clicked.start();
}
}
}
on (release) {
if (_root.unlock1 == true) {
if (_root.cash >= 150) {
duplicateMovieClip (_root.ft, "ft", _root.bn);
_root.ft.gotoAndStop(6);
_root.ft._rotation = 0;
_root.ton = 5;
}
}
}
on (rollOver) {
if (_root.unlock1 == true) {
_root.ttype = 6;
} else {
_root.ttype = 7;
}
}
Symbol 114 MovieClip Frame 1
_alpha = 0;
stop();
Symbol 114 MovieClip Frame 2
_alpha = 100;
stop();
Symbol 114 MovieClip Frame 3
_alpha = 100;
stop();
Symbol 114 MovieClip Frame 4
_alpha = 100;
stop();
Symbol 114 MovieClip Frame 5
_alpha = 100;
stop();
Symbol 114 MovieClip Frame 6
_alpha = 100;
stop();
Symbol 127 Button
on (press) {
_root.clicked.start();
_root.go = true;
_root.gotoAndStop(2);
}
Symbol 130 Button
on (press) {
_root.clicked.start();
_root.menus.gotoAndStop(1);
}
Symbol 131 MovieClip Frame 1
_alpha = 0;
stop();
Symbol 131 MovieClip Frame 2
_alpha = 100;
_level(10000);
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 2
stop();
Symbol 138 MovieClip Frame 3
stop();
Symbol 138 MovieClip Frame 4
stop();
Symbol 138 MovieClip Frame 5
stop();
Symbol 138 MovieClip Frame 6
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 3
stop();
Symbol 148 MovieClip Frame 4
stop();
Symbol 148 MovieClip Frame 5
stop();
Symbol 148 MovieClip Frame 6
stop();
Instance of Symbol 142 MovieClip "bu" in Symbol 149 MovieClip Frame 1
onClipEvent (load) {
function __f_load(eventObj) {
var _local2 = false;
var _local1 = false;
}
this.addEventListener("load", __f_load);
}
on (rollOver) {
overunit = true;
}
on (rollOut) {
overunit = false;
}
on (press) {
clickunit = true;
_root.ft.gotoAndStop(1);
_root.ton = 0;
}
Symbol 156 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 2
stop();
Symbol 156 MovieClip Frame 3
stop();
Symbol 156 MovieClip Frame 4
stop();
Symbol 156 MovieClip Frame 5
stop();
Symbol 156 MovieClip Frame 6
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 2
stop();
Symbol 163 MovieClip Frame 1
stop();
Symbol 163 MovieClip Frame 2
stop();
Symbol 163 MovieClip Frame 3
stop();
Symbol 163 MovieClip Frame 4
stop();
Symbol 163 MovieClip Frame 5
stop();
Symbol 163 MovieClip Frame 6
stop();
Instance of Symbol 157 MovieClip "bu" in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
function __f_load(eventObj) {
var _local2 = false;
var _local1 = false;
}
this.addEventListener("load", __f_load);
}
on (rollOver) {
overunit = true;
}
on (rollOut) {
overunit = false;
}
on (press) {
clickunit = true;
_root.ft.gotoAndStop(1);
_root.ton = 0;
}
Symbol 168 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 2
stop();
Symbol 168 MovieClip Frame 3
stop();
Symbol 171 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 2
stop();
Symbol 178 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 2
stop();
Symbol 178 MovieClip Frame 3
stop();
Symbol 178 MovieClip Frame 4
stop();
Symbol 178 MovieClip Frame 5
stop();
Symbol 178 MovieClip Frame 6
stop();
Instance of Symbol 172 MovieClip "bu" in Symbol 179 MovieClip Frame 1
onClipEvent (load) {
function __f_load(eventObj) {
var _local2 = false;
var _local1 = false;
}
this.addEventListener("load", __f_load);
}
on (rollOver) {
overunit = true;
}
on (rollOut) {
overunit = false;
}
on (press) {
clickunit = true;
_root.ft.gotoAndStop(1);
_root.ton = 0;
}
Symbol 184 MovieClip Frame 1
stop();
Symbol 184 MovieClip Frame 2
stop();
Symbol 191 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 2
stop();
Symbol 191 MovieClip Frame 3
stop();
Symbol 191 MovieClip Frame 4
stop();
Symbol 191 MovieClip Frame 5
stop();
Symbol 191 MovieClip Frame 6
stop();
Instance of Symbol 185 MovieClip "bu" in Symbol 192 MovieClip Frame 1
onClipEvent (load) {
function __f_load(eventObj) {
var _local2 = false;
var _local1 = false;
}
this.addEventListener("load", __f_load);
}
on (rollOver) {
overunit = true;
}
on (rollOut) {
overunit = false;
}
on (press) {
clickunit = true;
_root.ft.gotoAndStop(1);
_root.ton = 0;
}
Symbol 217 Button
on (press) {
_root.clicked.start();
if (_root.tss == true) {
_root.cash = _root.cash + (_root["t" + _root.ts].uc * 0.75);
removeMovieClip(_root["t" + _root.ts]);
_root.tss = false;
}
}
Symbol 221 Button
on (press) {
_root.clicked.start();
if ((_root.cash >= _root["t" + _root.ts].uc) && (_root.tss == true)) {
_root.cash = _root.cash - _root["t" + _root.ts].uc;
_root["t" + _root.ts].levels++;
_root["t" + _root.ts].ba.gotoAndStop(_root["t" + _root.ts].levels);
_root["t" + _root.ts].dmg = int(_root["t" + _root.ts].dmg * 1.8);
_root["t" + _root.ts].ra._width = _root["t" + _root.ts].ra._width + _root["t" + _root.ts].ri;
_root["t" + _root.ts].ra._height = _root["t" + _root.ts].ra._height + _root["t" + _root.ts].ri;
_root["t" + _root.ts].stm = _root["t" + _root.ts].stm + 10;
_root["t" + _root.ts].uc = _root["t" + _root.ts].uc * 2;
}
}
Symbol 230 MovieClip Frame 1
_alpha = 0;
stop();
Symbol 230 MovieClip Frame 2
_alpha = 100;
stop();
Symbol 230 MovieClip Frame 3
_alpha = 100;
stop();
Symbol 230 MovieClip Frame 4
_alpha = 100;
stop();
Symbol 230 MovieClip Frame 5
_alpha = 100;
stop();
Symbol 230 MovieClip Frame 6
_alpha = 100;
stop();
Symbol 230 MovieClip Frame 7
_alpha = 100;
stop();
Symbol 230 MovieClip Frame 8
_alpha = 100;
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 2
stop();
Symbol 240 MovieClip Frame 3
stop();
Symbol 240 MovieClip Frame 4
stop();
Symbol 240 MovieClip Frame 5
stop();
Symbol 240 MovieClip Frame 6
stop();
Symbol 240 MovieClip Frame 7
stop();
Symbol 240 MovieClip Frame 8
stop();
Symbol 240 MovieClip Frame 9
stop();
Symbol 254 MovieClip Frame 1
stop();
Symbol 254 MovieClip Frame 2
stop();
Instance of Symbol 255 MovieClip "bu" in Symbol 257 MovieClip Frame 1
onClipEvent (load) {
function __f_load(eventObj) {
var _local2 = false;
var _local1 = false;
}
this.addEventListener("load", __f_load);
}
on (rollOver) {
overunit = true;
}
on (rollOut) {
overunit = false;
}
on (press) {
clickunit = true;
_root.ft.gotoAndStop(1);
_root.ton = 0;
}
Symbol 282 Button
on (release) {
_root.gotoAndPlay(2);
}