Frame 1
function startinitiate() {
removeMovieClip(_root.starfield);
createEmptyMovieClip("starfield", 0);
y = 0;
with (starfield) {
lineStyle(1, 16777215, 50);
while (y < ((Math.random() * 400) + 300)) {
curx = Math.random() * 800;
cury = Math.random() * 600;
moveTo(curx, cury);
lineTo(curx + 0.5, cury + 0.5);
y++;
}
}
y = 0;
while (y < initbase.length) {
if (initbase[y] != "_carrier") {
_root.newship(initbase[y], initteam[y], Math.random() * 800, Math.random() * 600, initface[y]);
} else {
_root.addnewcarrier(initteam[y], Math.random() * 800, Math.random() * 600, initface[y]);
}
y++;
}
if (_root.cheater.text == "omnipotence") {
_root.addnewomni("black", Math.random() * 800, Math.random() * 600, (Math.random() * Math.PI) * 2);
}
_root.cheater.text = "";
timeto = 0;
}
function newship(icon, team, xpos, ypos, facing) {
buildship(_root[icon][0], team);
healthbar(_root["dot" + x]);
geninfo(_root["dot" + x], xpos, ypos, facing, team);
_root["dot" + x].hitpoints = _root[icon][2];
_root["dot" + x].shipclass = _root[icon][1];
_root["dot" + x].rotspeed = _root[icon][4];
_root["dot" + x].icon = icon;
_root["dot" + x].totalweapons = (_root[icon].length - 5) / 7;
tinkle = 0;
while (tinkle <= _root["dot" + x].totalweapons) {
_root["dot" + x]["wt" + tinkle] = _root[icon][(tinkle * 7) + 11];
tinkle++;
}
if ((_root[icon][1] == "frigate") || (_root[icon][1] == "bomber")) {
_root["dot" + x].onEnterFrame = function () {
this.y = 0;
while (this.y < this.totalweapons) {
this["wt" + this.y] = this["wt" + this.y] - 1;
this.y++;
}
if (this.timer == _root.time) {
angleroutine(this, shipclass);
this.wfy = 0;
while (this.wfy < this.totalweapons) {
if (this["wt" + this.wfy] < 0) {
this.fired = basefire(this, _root[this.icon][(this.wfy * 7) + 5], _root[this.icon][(this.wfy * 7) + 6], _root[this.icon][(this.wfy * 7) + 7], _root[this.icon][(this.wfy * 7) + 8], _root[this.icon][(this.wfy * 7) + 9], _root[this.icon][(this.wfy * 7) + 10]);
if (this.fired == true) {
this["wt" + this.wfy] = _root[this.icon][(this.wfy * 7) + 11];
}
}
this.wfy++;
}
this._rotation = (this.angle * 180) / Math.PI;
}
this._x = this._x + (Math.cos(this.angle) * _root[icon][3]);
this._y = this._y + (Math.sin(this.angle) * _root[icon][3]);
_root.checkxy(this);
};
} else if (_root[icon][1] == "fighter") {
_root["dot" + x].onEnterFrame = function () {
this.y = 0;
while (this.y < this.totalweapons) {
this["wt" + this.y] = this["wt" + this.y] - 1;
this.y++;
}
if (this.timer == _root.time) {
fighterangle(this, shipclass);
this.wfy = 0;
while (this.wfy < this.totalweapons) {
if (this["wt" + this.wfy] < 0) {
this.fired = basefire(this, _root[this.icon][(this.wfy * 7) + 5], _root[this.icon][(this.wfy * 7) + 6], _root[this.icon][(this.wfy * 7) + 7], _root[this.icon][(this.wfy * 7) + 8], _root[this.icon][(this.wfy * 7) + 9], _root[this.icon][(this.wfy * 7) + 10]);
if (this.fired == true) {
this["wt" + this.wfy] = _root[this.icon][(this.wfy * 7) + 11];
}
}
this.wfy++;
}
this._rotation = (this.angle * 180) / Math.PI;
}
this._x = this._x + (Math.cos(this.angle) * _root[icon][3]);
this._y = this._y + (Math.sin(this.angle) * _root[icon][3]);
_root.checkxy(this);
};
}
x++;
}
function playership(team, xpos, ypos, facing) {
icon = "_player";
buildship(_root[icon][0], team);
healthbar(_root["dot" + x]);
geninfo(_root["dot" + x], xpos, ypos, facing, team);
_root["dot" + x].hitpoints = _root[icon][2];
_root["dot" + x].shipclass = _root[icon][1];
_root["dot" + x].rotspeed = _root[icon][4];
_root["dot" + x].icon = icon;
_root["dot" + x].totalweapons = (_root[icon].length - 4) / 7;
tinkle = 0;
while (tinkle < _root["dot" + x].totalweapons) {
_root["dot" + x]["wt" + tinkle] = 0;
tinkle++;
}
_root["dot" + x].onEnterFrame = function () {
this.y = 0;
while (this.y < this.totalweapons) {
this["wt" + this.y] = this["wt" + this.y] - 1;
this.y++;
}
if (this.timer == _root.time) {
if (Key.isDown(37)) {
this.angle = this.angle - this.rotspeed;
}
if (Key.isDown(39)) {
this.angle = this.angle + this.rotspeed;
}
this.wfy = 0;
while (this.wfy < this.totalweapons) {
if (this["wt" + this.wfy] < 0) {
if ((_root[this.icon][(this.wfy * 7) + 7] != "facing") || (Key.isDown(17))) {
this.fired = basefire(this, _root[this.icon][(this.wfy * 7) + 5], _root[this.icon][(this.wfy * 7) + 6], _root[this.icon][(this.wfy * 7) + 7], _root[this.icon][(this.wfy * 7) + 8], _root[this.icon][(this.wfy * 7) + 9], _root[this.icon][(this.wfy * 7) + 10]);
if (this.fired == true) {
this["wt" + this.wfy] = _root[this.icon][(this.wfy * 7) + 11];
}
}
}
this.wfy++;
}
this._rotation = (this.angle * 180) / Math.PI;
}
if (Key.isDown(38)) {
this._x = this._x + (Math.cos(this.angle) * _root[icon][3]);
this._y = this._y + (Math.sin(this.angle) * _root[icon][3]);
}
if (Key.isDown(40)) {
this._x = this._x - (Math.cos(this.angle) * _root[icon][3]);
this._y = this._y - (Math.sin(this.angle) * _root[icon][3]);
}
_root.checkxy(this);
};
x++;
}
function addnewlightfighter(team, xpos, ypos, facing) {
_root.newship("light_fighter", team, xpos, ypos, facing);
}
function addnewlightfighterwing(team, xpos, ypos, facing) {
_root.addnewlightfighter(team, (Math.cos(facing) * 5) + xpos, (Math.sin(facing) * 5) + ypos, facing);
_root.addnewlightfighter(team, (Math.cos(facing + (Math.PI/4)) * 5) + xpos, (Math.sin(facing + (Math.PI/4)) * 5) + ypos, facing);
_root.addnewlightfighter(team, (Math.cos(facing - (Math.PI/4)) * 5) + xpos, (Math.sin(facing - (Math.PI/4)) * 5) + ypos, facing);
_root.addnewlightfighter(team, (Math.cos(facing + (Math.PI/2)) * 5) + xpos, (Math.sin(facing + (Math.PI/2)) * 5) + ypos, facing);
_root.addnewlightfighter(team, (Math.cos(facing - (Math.PI/2)) * 5) + xpos, (Math.sin(facing - (Math.PI/2)) * 5) + ypos, facing);
}
function addnewheavyfighter(team, xpos, ypos, facing) {
_root.newship("heavy_fighter", team, xpos, ypos, facing);
}
function addnewheavyfighterwing(team, xpos, ypos, facing) {
_root.addnewheavyfighter(team, (Math.cos(facing) * 5) + xpos, (Math.sin(facing) * 5) + ypos, facing);
_root.addnewheavyfighter(team, (Math.cos(facing + (Math.PI/4)) * 5) + xpos, (Math.sin(facing + (Math.PI/4)) * 5) + ypos, facing);
_root.addnewheavyfighter(team, (Math.cos(facing - (Math.PI/4)) * 5) + xpos, (Math.sin(facing - (Math.PI/4)) * 5) + ypos, facing);
}
function addnewbomber(team, xpos, ypos, facing) {
_root.newship("_bomber", team, xpos, ypos, facing);
}
function addnewbomberwing(team, xpos, ypos, facing) {
_root.addnewbomber(team, (Math.cos(facing + (Math.PI/4)) * 5) + xpos, (Math.sin(facing + (Math.PI/4)) * 5) + ypos, facing);
_root.addnewbomber(team, (Math.cos(facing - (Math.PI/4)) * 5) + xpos, (Math.sin(facing - (Math.PI/4)) * 5) + ypos, facing);
}
function addnewheavybomber(team, xpos, ypos, facing) {
_root.newship("heavy_bomber", team, xpos, ypos, facing);
}
function addnewheavybomberwing(team, xpos, ypos, facing) {
_root.addnewheavybomber(team, (Math.cos(facing + (Math.PI/4)) * 5) + xpos, (Math.sin(facing + (Math.PI/4)) * 5) + ypos, facing);
_root.addnewheavybomber(team, (Math.cos(facing - (Math.PI/4)) * 5) + xpos, (Math.sin(facing - (Math.PI/4)) * 5) + ypos, facing);
}
function addnewlightfrigate(team, xpos, ypos, facing) {
_root.newship("light_frigate", team, xpos, ypos, facing);
}
function addnewheavyfrigate(team, xpos, ypos, facing) {
_root.newship("heavy_frigate", team, xpos, ypos, facing);
}
function addnewlightcruiser(team, xpos, ypos, facing) {
_root.newship("light_cruiser", team, xpos, ypos, facing);
}
function addnewdestroyer(team, xpos, ypos, facing) {
_root.newship("_destroyer", team, xpos, ypos, facing);
}
function addnewheavycruiser(team, xpos, ypos, facing) {
_root.newship("heavy_cruiser", team, xpos, ypos, facing);
}
function addnewdreadnought(team, xpos, ypos, facing) {
_root.newship("_dreadnought", team, xpos, ypos, facing);
}
function addnewcarrier(team, xpos, ypos, facing) {
buildship("carrier", team);
healthbar(_root["dot" + x]);
geninfo(_root["dot" + x], xpos, ypos, facing, team);
_root["dot" + x].hitpoints = 160;
_root["dot" + x].shipclass = "frigate";
_root["dot" + x].maintime = 30;
_root["dot" + x].rotspeed = 0.0523598775598299;
_root["dot" + x].waves = 0;
_root["dot" + x].onEnterFrame = function () {
this.maintime--;
if (this.timer == _root.time) {
if (this.maintime <= 20) {
if ((this.maintime <= 20) && (this.maintime > 10)) {
_root.addnewlightfighter(this.team, (Math.cos(this.angle - (Math.PI/4)) * 30) + this._x, (Math.sin(this.angle - (Math.PI/4)) * 30) + this._y, this.angle);
_root.addnewlightfighter(this.team, (Math.cos(this.angle + (Math.PI/4)) * 30) + this._x, (Math.sin(this.angle + (Math.PI/4)) * 30) + this._y, this.angle);
} else if ((this.maintime <= 10) && (this.maintime >= 5)) {
_root.addnewheavyfighter(this.team, (Math.cos(this.angle - (Math.PI/4)) * 30) + this._x, (Math.sin(this.angle - (Math.PI/4)) * 30) + this._y, this.angle);
_root.addnewheavyfighter(this.team, (Math.cos(this.angle + (Math.PI/4)) * 30) + this._x, (Math.sin(this.angle + (Math.PI/4)) * 30) + this._y, this.angle);
} else if (this.maintime <= 2) {
_root.addnewbomber(this.team, (Math.cos(this.angle - (Math.PI/4)) * 30) + this._x, (Math.sin(this.angle - (Math.PI/4)) * 30) + this._y, this.angle);
_root.addnewbomber(this.team, (Math.cos(this.angle + (Math.PI/4)) * 30) + this._x, (Math.sin(this.angle + (Math.PI/4)) * 30) + this._y, this.angle);
this.waves++;
this.maintime = 200 * this.waves;
}
}
_root.firelas(this, (Math.cos(this.angle + angle(-3.5, 10.5, 0, 0)) * distance(-3.5, 10.5, 0, 0)) + this._x, (Math.sin(this.angle + angle(-3.5, 10.5, 0, 0)) * distance(-3.5, 10.5, 0, 0)) + this._y, turretcheckfire(this.team, (Math.cos(this.angle + angle(-3.5, 10.5, 0, 0)) * distance(-3.5, 10.5, 0, 0)) + this._x, (Math.sin(this.angle + angle(-3.5, 10.5, 0, 0)) * distance(-3.5, 10.5, 0, 0)) + this._y, 100), "0xbb0000", 1, 100);
_root.firelas(this, (Math.cos(this.angle + angle(-3.5, -10.5, 0, 0)) * distance(-3.5, -10.5, 0, 0)) + this._x, (Math.sin(this.angle + angle(-3.5, -10.5, 0, 0)) * distance(-3.5, -10.5, 0, 0)) + this._y, turretcheckfire(this.team, (Math.cos(this.angle + angle(-3.5, -10.5, 0, 0)) * distance(-3.5, -10.5, 0, 0)) + this._x, (Math.sin(this.angle + angle(-3.5, -10.5, 0, 0)) * distance(-3.5, -10.5, 0, 0)) + this._y, 100), "0xbb0000", 1, 100);
this._rotation = (this.angle * 180) / Math.PI;
}
this._x = this._x + (Math.cos(this.angle) * 0.7);
this._y = this._y + (Math.sin(this.angle) * 0.7);
_root.checkxy(this);
};
x++;
}
function addnewomni(team, xpos, ypos, facing) {
_root.newship("_omni", team, xpos, ypos, facing);
}
function distance(dx1, dy1, dx2, dy2) {
return(Math.sqrt(Math.pow(dx1 - dx2, 2) + Math.pow(dy1 - dy2, 2)));
}
function angle(x1, y1, x2, y2) {
xangle = 0;
xdis = _root.distance(x1, y1, x2, y2);
if (xdis != 0) {
if (y1 == y2) {
xymult = 1;
} else {
xymult = (y1 - y2) / Math.abs(y1 - y2);
}
xangle = Math.acos((x1 - x2) / xdis) * xymult;
}
return(xangle);
}
function removethis(item, explosion) {
rty = 0;
found = false;
while ((rty < dots.length) && (found == false)) {
if (dots[rty] == item) {
dots.splice(rty, 1);
found = true;
}
rty++;
}
if (explosion != false) {
_root.createEmptyMovieClip("bozo" + x, x);
_root["bozo" + x]._x = item._x;
_root["bozo" + x]._y = item._y;
y = 0;
with (_root["bozo" + x]) {
rad = distance(0, 0, item._width, item._height);
moveTo(Math.cos((Math.PI * y) / 10) * distance(0, 0, item._width, item._height), Math.sin((Math.PI * y) / 10) * distance(0, 0, item._width, item._height));
lineStyle(0, 0, 0);
colors = [16777215, 16776960, 16711680];
alphas = [100, 70, 0];
ratios = [0, 180, 255];
matrix = {matrixType:"box", x:-rad, y:-rad, w:rad * 2, h:rad * 2, r:(Math.PI/2)};
beginGradientFill("radial", colors, alphas, ratios, matrix);
while (y <= 20) {
lineTo(Math.cos((Math.PI * y) / 10) * distance(0, 0, item._width, item._height), Math.sin((Math.PI * y) / 10) * distance(0, 0, item._width, item._height));
y++;
}
endFill();
}
_root["bozo" + x].bleh = false;
_root["bozo" + x].onEnterFrame = function () {
this._alpha = this._alpha - 10;
this._width = this._width - (this._width / 4);
this._height = this._width;
if (this._alpha <= 0) {
removeMovieClip(this);
}
};
}
removeMovieClip(item);
x++;
}
function capfindtarget(targeter, preferedclass) {
y = 0;
found = false;
while (y < dots.length) {
if ((((_root.distance(targeter._x, targeter._y, dots[y]._x, dots[y]._y) < _root.distance(targeter._x, targeter._y, dots[found]._x, dots[found]._y)) || (found == false)) && (dots[y].team != targeter.team)) && ((dots[y].shipclass == preferedclass) || (preferedclass == undefined))) {
found = y;
}
y++;
}
if ((found == false) && (preferedclass != undefined)) {
found = capfindtarget(targeter, undefined);
}
return(found);
}
function findtarget(targeter, angled) {
y = 0;
found = false;
while (y < dots.length) {
thisangle = _root.angle(targeter._x, targeter._y, dots[y]._x, dots[y]._y);
if (((Math.PI/4) > Math.abs(thisangle - angled)) || (((Math.PI/4) > Math.abs(thisangle + angled)) && (angled > 2.35619449019234))) {
if (dots[y].team != targeter.team) {
if (_root.distance(targeter._x, targeter._y, dots[y]._x, dots[y]._y) < _root.distance(targeter._x, targeter._y, dots[found]._x, dots[found]._y)) {
found = y;
}
}
}
y++;
}
return(found);
}
function findangle(dotty, team) {
y = 0;
totalangle = 0;
totalangles = 0;
while (y < dots.length) {
dotsdis = _root.distance(dotty._x, dotty._y, dots[y]._x, dots[y]._y);
if (((dotsdis < _root.mindis) && (dotty != dots[y])) && (dots[y].team == team)) {
totalangle = totalangle + (dots[y].angle * Math.round((dotsdis / _root.mindis) * 100));
totalangles = totalangles + (1 * Math.round((dotsdis / _root.mindis) * 100));
}
y++;
}
if (totalangles != 0) {
newanglething = totalangle / totalangles;
if (((((dotty.angle > (-3.14159265358979 + dotty.rotspeed)) && (dotty.angle < (Math.PI - dotty.rotspeed))) && ((newanglething < (dotty.angle + dotty.rotspeed)) && (newanglething > (dotty.angle - dotty.rotspeed)))) || ((dotty.angle > (Math.PI - dotty.rotspeed)) && ((newanglething > (dotty.angle - dotty.rotspeed)) || (newanglething < ((dotty.angle - (Math.PI*2)) + dotty.rotspeed))))) || ((dotty.angle < (-3.14159265358979 + dotty.rotspeed)) && ((newanglething < (dotty.angle + dotty.rotspeed)) || (newanglething > ((dotty.angle + (Math.PI*2)) - dotty.rotspeed))))) {
newanglething = newanglething - dotty.angle;
} else if ((((dotty.angle > 0) && ((newanglething > dotty.angle) || (newanglething < (dotty.angle - Math.PI)))) || ((dotty.angle < 0) && ((newanglething > dotty.angle) && (newanglething < (dotty.angle + Math.PI))))) || ((dotty.angle == 0) && (newanglething > dotty.angle))) {
newanglething = dotty.rotspeed;
} else {
newanglething = -dotty.rotspeed;
}
} else {
newanglething = 0;
}
return(newanglething);
}
function turretcheckfire(team, xpos, ypos, dis) {
y = 0;
found = false;
while (y < dots.length) {
if ((((_root.distance(xpos, ypos, dots[y]._x, dots[y]._y) < dis) && (_root.distance(xpos, ypos, dots[y]._x, dots[y]._y) < _root.distance(xpos, ypos, dots[found]._x, dots[found]._y))) && (dots[y].team != team)) && (dots[y] != undefined)) {
found = dots[y];
}
y++;
}
return(found);
}
function checkfire(team, xpos, ypos, dis, angle, tol) {
found = false;
y = 0;
while ((y < dots.length) && (found == false)) {
if ((dots[y].team != team) && (dots[y] != undefined)) {
dist = _root.distance(xpos, ypos, dots[y]._x, dots[y]._y);
if ((dist < dis) && (dist != 0)) {
if (ypos == dots[y]._y) {
ymult = 1;
} else {
ymult = (dots[y]._y - ypos) / Math.abs(dots[y]._y - ypos);
}
angle2 = Math.acos((dots[y]._x - xpos) / dist) * ymult;
if (((((angle > (-3.14159265358979 + tol)) && (angle < (Math.PI - tol))) && ((angle2 < (angle + tol)) && (angle2 > (angle - tol)))) || ((angle > (Math.PI - tol)) && ((angle2 > (angle - tol)) || (angle2 < ((angle - (Math.PI*2)) + tol))))) || ((angle < (-3.14159265358979 + tol)) && ((angle2 < (angle + tol)) || (angle2 > ((angle + (Math.PI*2)) - tol))))) {
found = dots[y];
}
}
}
y++;
}
if (dis >= 300) {
}
return(found);
}
function geninfo(ship, xpos, ypos, facing, team, hitpoints, shipclass) {
ship._x = xpos;
ship._y = ypos;
ship.angle = facing;
ship._rotation = (facing * 180) / Math.PI;
ship.team = team;
ship.hitpoints = hitpoints;
ship.shipclass = shipclass;
ship.timer = Math.round(Math.random());
}
function checkxy(thing) {
if (thing._x < 0) {
thing._x = 800;
}
if (thing._x > 800) {
thing._x = 0;
}
if (thing._y < 0) {
thing._y = 600;
}
if (thing._y > 600) {
thing._y = 0;
}
}
function buildship(build, team) {
_root.attachMovie(build, "dot" + x, x);
dots.push(_root["dot" + x]);
_root["dot" + x].attachMovie(build + "mask", "mask", 1);
_root["dot" + x].mask._alpha = 20;
thiscolor = new Color(_root["dot" + x].mask);
thiscolor.setRGB(_root[team]);
}
function angleroutine(thing, shipclass) {
if (shipclass == "bomber") {
shipclass = "frigate";
}
thing.curtarg = _root.capfindtarget(thing, shipclass);
thing.targangle = _root.angle(dots[thing.curtarg]._x, dots[thing.curtarg]._y, thing._x, thing._y);
if (((((thing.angle > (-3.14159265358979 + thing.rotspeed)) && (thing.angle < (Math.PI - thing.rotspeed))) && ((thing.targangle < (thing.angle + thing.rotspeed)) && (thing.targangle > (thing.angle - thing.rotspeed)))) || ((thing.angle > (Math.PI - thing.rotspeed)) && ((thing.targangle > (thing.angle - thing.rotspeed)) || (thing.targangle < ((thing.angle - (Math.PI*2)) + thing.rotspeed))))) || ((thing.angle < (-3.14159265358979 + thing.rotspeed)) && ((thing.targangle < (thing.angle + thing.rotspeed)) || (thing.targangle > ((thing.angle + (Math.PI*2)) - thing.rotspeed))))) {
thing.angle = thing.targangle;
} else if ((((thing.angle > 0) && ((thing.targangle > thing.angle) || (thing.targangle < (thing.angle - Math.PI)))) || ((thing.angle < 0) && ((thing.targangle > thing.angle) && (thing.targangle < (thing.angle + Math.PI))))) || ((thing.angle == 0) && (thing.targangle > thing.angle))) {
thing.angle = thing.angle + thing.rotspeed;
} else {
thing.angle = thing.angle - thing.rotspeed;
}
}
function fighterangle(thing) {
thing.targ = _root.capfindtarget(thing, "fighter");
thing.targangle = _root.angle(dots[thing.targ]._x, dots[thing.targ]._y, thing._x, thing._y);
if (((((thing.angle > (-3.14159265358979 + thing.rotspeed)) && (thing.angle < (Math.PI - thing.rotspeed))) && ((thing.targangle < (thing.angle + thing.rotspeed)) && (thing.targangle > (thing.angle - thing.rotspeed)))) || ((thing.angle > (Math.PI - thing.rotspeed)) && ((thing.targangle > (thing.angle - thing.rotspeed)) || (thing.targangle < ((thing.angle - (Math.PI*2)) + thing.rotspeed))))) || ((thing.angle < (-3.14159265358979 + thing.rotspeed)) && ((thing.targangle < (thing.angle + thing.rotspeed)) || (thing.targangle > ((thing.angle + (Math.PI*2)) - thing.rotspeed))))) {
if ((thing.angle > thing.targangle) && (thing.angle < (thing.targangle + Math.PI))) {
thing.totarg = thing.targangle - thing.angle;
} else if ((thing.angle < thing.targangle) && (thing.angle > (thing.targangle + Math.PI))) {
thing.totarg = thing.angle - thing.targangle;
} else {
thing.totarg = 0;
}
} else if ((((thing.angle > 0) && ((thing.targangle > thing.angle) || (thing.targangle < (thing.angle - Math.PI)))) || ((thing.angle < 0) && ((thing.targangle > thing.angle) && (thing.targangle < (thing.angle + Math.PI))))) || ((thing.angle == 0) && (thing.targangle > thing.angle))) {
thing.totarg = thing.rotspeed;
} else {
thing.totarg = -thing.rotspeed;
}
thing.friendangle = _root.findangle(thing, thing.team);
if ((_root.distance(dots[thing.targ]._x, dots[thing.targ]._y, thing._x, thing._y) < 150) || (thing.totarg == 0)) {
thing.totarg = thing.friendangle;
}
if (thing.friendangle == 0) {
thing.friendangle = thing.totarg;
}
thing.angle = ((((thing.friendangle + thing.totarg) / 2) + thing.angle) + ((Math.random() * Math.PI) / 4)) - 0.392699081698724;
if (thing.angle > Math.PI) {
thing.angle = thing.angle - (Math.PI*2);
} else if (thing.angle < -3.14159265358979) {
thing.angle = thing.angle + (Math.PI*2);
}
}
function healthbar(ship) {
_root.createEmptyMovieClip("health" + x, wf);
_root["health" + x].onEnterFrame = function () {
removeMovie(this.bar);
this.createEmptyMovieClip("bar", 0);
with (this.bar) {
lineStyle(0, 0, 0);
beginFill(16711680, 50);
moveTo(ship.hitpoints / 10, 1);
lineTo((-ship.hitpoints) / 10, 1);
lineTo((-ship.hitpoints) / 10, -1);
lineTo(ship.hitpoints / 10, -1);
lineTo(ship.hitpoints / 10, 1);
}
this._x = ship._x;
this._y = ship._y - 20;
};
wf++;
}
function guidlas(xpos, ypos, angle, dis, colored) {
_root.createEmptyMovieClip("laser" + wf, wf);
_root["laser" + wf]._x = xpos;
_root["laser" + wf]._y = ypos;
with (_root["laser" + wf]) {
lineStyle(0, colored, 20);
moveTo(0, 0);
lineTo(Math.cos(angle) * dis, Math.sin(angle) * dis);
}
_root["laser" + wf].onEnterFrame = function () {
this.removeMovieClip();
};
wf++;
}
function firelas(firer, xpos, ypos, firee, colored, damage, range) {
fired = false;
if ((firee != false) && (firee._x != undefined)) {
_root.timeto = 50;
_root.createEmptyMovieClip("laser" + wf, wf);
_root["laser" + wf]._x = xpos;
_root["laser" + wf]._y = ypos;
with (_root["laser" + wf]) {
lineStyle(Math.ceil(damage / 5) / 4, colored, 50);
moveTo(0, 0);
lineTo(((firee._x - xpos) + ((Math.random() * firee._width) / 2)) - (firee._width / 4), ((firee._y - ypos) + ((Math.random() * firee._width) / 2)) - (firee._width / 4));
}
_root["laser" + wf].onEnterFrame = function () {
this.removeMovieClip();
};
wf++;
hitchance = 1 - (_root.distance(xpos, ypos, firee._x, firee._y) / (range * 2));
if (hitchance > Math.random()) {
firee.hitpoints = firee.hitpoints - Math.round(damage * ((Math.random() * 0.5) + 0.5));
if (firee.hitpoints < 0) {
_root.removethis(firee);
}
}
fired = true;
}
return(fired);
}
function basefire(thing, xpos, ypos, firetype, col, damage, range) {
if (firetype == "turret") {
fired = _root.firelas(thing, (Math.cos(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._x, (Math.sin(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._y, turretcheckfire(thing.team, (Math.cos(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._x, (Math.sin(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._y, range), col, damage, range);
} else if (firetype == "target") {
if (range >= _root.distance(dots[thing.curtarg]._x, dots[thing.curtarg]._y, thing._x, thing._y)) {
fired = _root.firelas(thing, (Math.cos(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._x, (Math.sin(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._y, dots[thing.curtarg], col, damage, range);
}
} else if (firetype == "facing") {
fired = _root.firelas(thing, (Math.cos(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._x, (Math.sin(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._y, checkfire(thing.team, (Math.cos(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._x, (Math.sin(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._y, range, thing.angle, 0.10471975511966), col, damage, range);
} else {
fired = _root.firelas(thing, (Math.cos(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._x, (Math.sin(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._y, checkfire(this.team, (Math.cos(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._x, (Math.sin(thing.angle + angle(xpos, ypos, 0, 0)) * distance(xpos, ypos, 0, 0)) + thing._y, range, firetype, 0.10471975511966), col, damage, range);
}
return(fired);
}
function inittest() {
y = 1;
isfinished = true;
while ((y < dots.length) && (isfinished == true)) {
if (dots[y].team == dots[y - 1].team) {
y++;
} else {
isfinished = false;
}
}
if (isfinished == true) {
while (dots.length > 0) {
removethis(dots[0], false);
}
dots = new Array();
_root.attachMovie("menuplus", "menu", 1);
initbase = new Array();
initteam = new Array();
initface = new Array();
timeto = 5000000 /* 0x4C4B40 */;
}
}
function initrestart() {
while (dots.length > 0) {
removethis(dots[0], false);
}
dots = new Array();
_root.attachMovie("menuplus", "menu", 1);
initbase = new Array();
initteam = new Array();
initface = new Array();
timeto = 5000000 /* 0x4C4B40 */;
}
x = 1;
dots = new Array();
mindis = 60;
time = 0;
wf = 100000 /* 0x0186A0 */;
timeto = 500000 /* 0x07A120 */;
purple = "0xff00ff";
blue = "0x0000ff";
green = "0x00ff00";
yellow = "0xffff00";
red = "0xff0000";
_root.onEnterFrame = function () {
if (time == 0) {
time = 1;
} else {
time = 0;
}
if (timeto < 0) {
timeto = 50;
inittest();
} else {
timeto--;
}
if (Key.isDown(32)) {
initrestart();
}
};
_root.attachMovie("menuplus", "menu", 1);
initbase = new Array();
initteam = new Array();
initface = new Array();
_player = new Array("lightfrigate", "frigate", 80, 2, 0.10471975511966, 0, 5, "facing", "0xbbbb00", 15, 250, 10, 0, -5, "facing", "0xbbbb00", 15, 250, 10, 0, 6, "turret", "0xbb0000", 1, 100, 0, 0, -6, "turret", "0xbb0000", 1, 100, 0, 5, 7, "turret", "0xbb0000", 1, 100, 0, 5, -6, "turret", "0xbb0000", 1, 100, 0);
light_fighter = new Array("lightfighter", "fighter", 10, 10, (Math.PI/4), 0, 0, "facing", "0xbb0000", 1.5, 200, 0);
heavy_fighter = new Array("heavyfighter", "fighter", 15, 7, (Math.PI/4), 0, 2, "facing", "0xbb0000", 1.5, 200, 0, 0, -2, "facing", "0xbb0000", 1.5, 200, 0);
_bomber = new Array("bomber", "bomber", 40, 5, 0.314159265358979, 2.5, 2.5, "facing", "0xbbbb00", 5, 250, 20, 2.5, -2.5, "facing", "0xbbbb00", 5, 250, 20, 0, -3, "turret", "0xbb0000", 1, 100, 0);
heavy_bomber = new Array("heavybomber", "bomber", 40, 3, 0.20943951023932, 2.5, 2.5, "facing", "0x00bbbb", 10, 250, 20, 2.5, -2.5, "facing", "0x00bbbb", 10, 250, 20, 0, -3, "turret", "0xbb0000", 1, 100, 0);
light_frigate = new Array("lightfrigate", "frigate", 60, 2, 0.10471975511966, 0, 5, "facing", "0xbbbb00", 10, 250, 10, 0, -5, "facing", "0xbbbb00", 10, 250, 10, 0, 6, "turret", "0xbb0000", 1, 100, 0, 0, -6, "turret", "0xbb0000", 1, 100, 0, 5, 7, "turret", "0xbb0000", 1, 100, 0, 5, -6, "turret", "0xbb0000", 1, 100, 0);
heavy_frigate = new Array("heavyfrigate", "frigate", 90, 1.5, 0.0628318530717959, 13, 0, "facing", "0x0000bb", 20, 250, 80, -7, 0, "turret", "0xbbbb00", 10, 250, 10, -10.5, 3, "turret", "0xbb0000", 1, 100, 0, -10.5, -3, "turret", "0xbb0000", 1, 100, 0);
light_cruiser = new Array("lightcruiser", "frigate", 200, 0.5, 0.0523598775598299, 10, 6, "turret", "0x00bbbb", 10, 150, 40, 4, 7, "turret", "0x00bbbb", 10, 150, 40, -7, 5, "turret", "0x00bbbb", 10, 150, 40, 10, -6, "turret", "0x00bbbb", 10, 150, 40, 4, -7, "turret", "0x00bbbb", 10, 150, 40, -7, -5, "turret", "0x00bbbb", 10, 150, 40, 3, 7.5, "turret", "0xbb0000", 1, 100, 0, 3, -7.5, "turret", "0xbb0000", 1, 100, 0);
_destroyer = new Array("destroyer", "frigate", 200, 0.7, 0.0523598775598299, 7, 0, "target", "0x0000bb", 25, 250, 80, 0, 0, "target", "0x0000bb", 25, 250, 80, -7, 0, "target", "0x0000bb", 25, 250, 80, 3, 7.5, "turret", "0xff0000", 3, 100, 0, 3, -7.5, "turret", "0xff0000", 3, 100, 0);
heavy_cruiser = new Array("heavycruiser", "frigate", 260, 0.5, (Math.PI/90), -15, 0, "target", "0xff00ff", 40, 250, 180, 0, 0, "turret", "0x0000bb", 25, 250, 80, 15, 0, "turret", "0x0000bb", 25, 250, 80, -28, -2.5, "turret", "0x00bbbb", 10, 150, 40, -28, 2.5, "turret", "0x00bbbb", 10, 150, 40, -7.5, -5.5, "turret", "0xbb0000", 1, 100, 0, 7.5, -3, "turret", "0xbb0000", 1, 100, 0, -7.5, 5.5, "turret", "0xbb0000", 1, 100, 0, 7.5, 3, "turret", "0xbb0000", 1, 100, 0);
_dreadnought = new Array("dreadnought", "frigate", 360, 0.3, 0.00872664625997165, 12, 8.5, "facing", "0xffffff", 60, 500, 300, -8.5, 14.5, "turret", "0xff00ff", 40, 250, 180, 16, 19.5, "turret", "0xff00ff", 40, 250, 180, 1.5, 18.5, "turret", "0x0000bb", 25, 250, 80, 28.5, 16.5, "turret", "0x0000bb", 25, 250, 80, 3.5, 13, "turret", "0xbbbb00", 10, 250, 10, -18, 9, "turret", "0xbbbb00", 10, 250, 10, 12, -8.5, "facing", "0xffffff", 60, 500, 300, -8.5, -14.5, "turret", "0xff00ff", 40, 250, 180, 16, -19.5, "turret", "0xff00ff", 40, 250, 180, 1.5, -18.5, "turret", "0x0000bb", 25, 250, 80, 28.5, -16.5, "turret", "0x0000bb", 25, 250, 80, 3.5, -13, "turret", "0xbbbb00", 10, 250, 10, -18, -9, "turret", "0xbbbb00", 10, 250, 10);
_omni = new Array("omni", "frigate", 400, 5, 0.20943951023932, 0, 0, "turret", "0xffffff", 60, 500, 0, 0, 0, "turret", "0xffffff", 60, 500, 0, 0, 0, "turret", "0xffffff", 60, 500, 0);
_carrier = new Array("carrier", "frigate", 160, 0.7, 0.0523598775598299, -3.5, 10.5, "turret", "0xbb0000", 1, 100, 0, -3.5, -10.5, "turret", "0xbb0000", 1, 100, 0);
Symbol 33 MovieClip [menuplus] Frame 1
function clearcur() {
y = 0;
while (y < descs.length) {
removeMovieClip(descs[y]);
y++;
}
descs.splice(0, descs.length);
_root.initbase = new Array();
_root.initteam = new Array();
_root.initface = new Array();
descs = new Array();
}
function newbutton(shiptyp, shiptit, colnum) {
this.createEmptyMovieClip("button" + x, x);
thisbut = this["button" + x];
thisbut.shiptyp = shiptyp;
thisbut.shiptit = shiptit;
thisbut.team = team;
thisbut.attachMovie("buttonbase", "base", 0);
thisbut.base._height = 50;
thisbut.base._alpha = 50;
thisbut.attachMovie("buttonmask", "mask", 1);
thisbut.mask._height = 50;
thisbut.mask._alpha = 50;
this["coler" + colnum] = new Color(thisbut.mask);
this["coler" + colnum].setRGB(_root[col]);
thisbut.attachMovie("textbox", "textbox", 3);
thisbut.textbox._y = 7;
thisbut.textbox._textbox.text = shiptit;
if (shiptyp != "carrier") {
thisbut.attachMovie(_root[shiptyp][0], "icon", 2);
} else {
thisbut.attachMovie(shiptyp, "icon", 2);
}
if (thisbut.icon._width > thisbut.icon._height) {
scale = 50 / thisbut.icon._width;
} else {
scale = 50 / thisbut.icon._height;
}
thisbut.icon._xscale = scale * 100;
thisbut.icon._yscale = scale * 100;
thisbut.icon._x = 0;
thisbut.icon._y = -10;
x++;
thisbut.onRollOver = function () {
this._parent.infoscrn.resetships(this.shiptyp, this.shiptit);
timeout = 360;
};
thisbut.onRelease = function () {
timeout = 360;
_root.initbase.push(this.shiptyp);
_root.initteam.push(this._parent.col);
_root.initface.push((Math.random() * Math.PI) * 2);
adddesc(shiptit);
};
return(thisbut);
}
function adddesc(tit) {
this.attachMovie("textbox", "text" + x, x);
thisthing = this["text" + x];
thiscolor = new Color(thisthing);
thiscolor.setRGB(_root[col]);
thisthing._x = 750;
thisthing._y = (descs.length * 20) + 10;
thisthing._textbox.text = tit;
descs.push(thisthing);
x++;
}
function newteambutton(team) {
this.createEmptyMovieClip("button" + x, x);
thisbut = this["button" + x];
thisbut.team = team;
thisbut.attachMovie("buttonbase", "base", 0);
thisbut.base._height = 50;
thisbut.base._alpha = 50;
thisbut.attachMovie("buttonmask", "mask", 1);
thisbut.mask._height = 50;
thisbut.mask._alpha = 50;
thisbut.colored = new Color(thisbut.mask);
thisbut.colored.setRGB(_root[team]);
thisbut.attachMovie("textbox", "textbox", 3);
thisbut.textbox._y = 7;
thisbut.textbox._textbox.text = team;
x++;
thisbut.onRelease = function () {
timeout = 100;
col = this.team;
y = 0;
this._parent.infoscrn.newcol(this.team);
while (y < shiptypes.length) {
this._parent["coler" + y].setRGB(_root[this.team]);
y++;
}
};
return(thisbut);
}
shiptypes = new Array("light_fighter", "heavy_fighter", "_bomber", "heavy_bomber", "light_frigate", "heavy_frigate", "light_cruiser", "_destroyer", "heavy_cruiser", "_carrier", "_dreadnought");
shiptitles = new Array("Light Fighter", "Heavy Fighter", "Bomber", "Heavy Bomber", "Light Frigate", "Heavy Frigate", "Light Cruiser", "Destroyer", "Heavy Cruiser", "Carrier", "Dreadnought");
teams = new Array("red", "yellow", "green", "blue", "purple");
descs = new Array();
col = "purple";
truetrue = 0;
timeout = 100;
this.onEnterFrame = function () {
if (timeout > 0) {
timeout = timeout - 1;
} else {
teehee = 0;
while (teehee < Math.floor(Math.random() * 10)) {
_root.initbase.push(shiptypes[Math.floor(Math.random() * shiptypes.length)]);
_root.initteam.push(teams[Math.floor(Math.random() * teams.length)]);
_root.initface.push((Math.random() * Math.PI) * 2);
teehee++;
}
_root.startinitiate();
removeMovieClip(this);
}
};
x = 1;
y = 0;
while (y < teams.length) {
currbut = this.newteambutton(teams[y]);
currbut._x = 60;
currbut._y = (y * 60) + 75;
y++;
}
y = 0;
truetrue = 0;
thinger = 0;
while (y < shiptypes.length) {
currbut = this.newbutton(shiptypes[y], shiptitles[y], y);
currbut._x = (truetrue * 110) + 200;
currbut._y = (thinger * 60) + 75;
thinger++;
if (thinger > 7) {
truetrue++;
thinger = 0;
}
y++;
}
this.createEmptyMovieClip("button" + x, x);
donebutton = this["button" + x];
donebutton.attachMovie("buttonbase", "base", 0);
donebutton.base._height = 50;
donebutton.base._alpha = 50;
donebutton._x = 750;
donebutton._y = 575;
donebutton.attachMovie("textbox", "textbox", 3);
donebuttontexcol = new Color(donebutton.textbox);
donebuttontexcol.setRGB(16711680);
donebutton.textbox._y = 0;
donebutton.textbox._textbox.text = "DONE";
donebutton.onRelease = function () {
_root.startinitiate();
removeMovieClip(this._parent);
};
x++;
this.createEmptyMovieClip("button" + x, x);
clearbutton = this["button" + x];
clearbutton.attachMovie("buttonbase", "base", 0);
clearbutton.base._height = 50;
clearbutton.base._alpha = 50;
clearbutton._x = 640;
clearbutton._y = 575;
clearbutton.attachMovie("textbox", "textbox", 3);
clearbuttontexcol = new Color(clearbutton.textbox);
clearbuttontexcol.setRGB(16711680);
clearbutton.textbox._y = 0;
clearbutton.textbox._textbox.text = "CLEAR";
clearbutton.onRelease = function () {
timeout = 100;
clearcur();
};
x++;
this.attachMovie("shipinfo", "infoscrn", x);
this.infoscrn._x = 500;
this.infoscrn._y = 100;
x++;
Symbol 84 MovieClip [shipinfo] Frame 1
function resetships(newship, title) {
this.w0num.text = "";
this.w0des.text = "";
this.w1num.text = "";
this.w1des.text = "";
this.w2num.text = "";
this.w2des.text = "";
this.w3num.text = "";
this.w3des.text = "";
this.shipdes.text = this[newship];
removeMovieClip("shipicon.ship");
shipicon.attachMovie(_root[newship][0], "ship", 0);
this.shiptitle.text = title;
this.speed.text = _root[newship][3] * 10;
this.hitpoints.text = _root[newship][2];
tfirepower = 0;
totalweapons = (_root[newship].length - 5) / 7;
y = 0;
while (y < totalweapons) {
if (_root[newship][11 + (7 * y)] != 0) {
tfirepower = tfirepower + (Math.pow(_root[newship][9 + (7 * y)], 2) * Math.ceil(100 / _root[newship][11 + (7 * y)]));
} else {
tfirepower = tfirepower + (Math.pow(_root[newship][9 + (7 * y)], 2) * 100);
}
y++;
}
this.firepower.text = Math.round(tfirepower * (_root[newship][2] / 100));
thisnum = 0;
y = 0;
while (y < totalweapons) {
found = false;
i = 0;
while (i < thisnum) {
if ((((this["weapontype" + i][0] == _root[newship][7 + (7 * y)]) && (this["weapontype" + i][1] == _root[newship][8 + (7 * y)])) && (this["weapontype" + i][2] == _root[newship][9 + (7 * y)])) && (this["weapontype" + i][3] == _root[newship][11 + (7 * y)])) {
found = true;
this["weaponnums" + i] = this["weaponnums" + i] + 1;
}
i++;
}
if (found == false) {
this["weapontype" + thisnum] = new Array();
this["weapontype" + thisnum][0] = _root[newship][7 + (7 * y)];
this["weapontype" + thisnum][1] = _root[newship][8 + (7 * y)];
this["weapontype" + thisnum][2] = _root[newship][9 + (7 * y)];
this["weapontype" + thisnum][3] = _root[newship][11 + (7 * y)];
this["weaponnums" + thisnum] = 1;
thisnum++;
}
y++;
}
i = 0;
while (i < thisnum) {
wtype = this["weapontype" + i].toString();
if ((((this["weapontype" + i][0] == "facing") && (this["weapontype" + i][1] == "0xbb0000")) && (this["weapontype" + i][2] == 1.5)) && (this["weapontype" + i][3] == 0)) {
wtype = "fighter laser";
} else if (((this["weapontype" + i][0] == "turret") && (this["weapontype" + i][2] <= 5)) && (this["weapontype" + i][3] == 0)) {
wtype = "antifighter turret";
} else if ((((this["weapontype" + i][0] == "facing") && (this["weapontype" + i][1] == "0xbbbb00")) && (this["weapontype" + i][2] == 5)) && (this["weapontype" + i][3] == 20)) {
wtype = "bomber laser";
} else if ((((this["weapontype" + i][0] == "facing") && (this["weapontype" + i][1] == "0x00bbbb")) && (this["weapontype" + i][2] == 10)) && (this["weapontype" + i][3] == 20)) {
wtype = "heavy bomber laser";
} else if ((((this["weapontype" + i][0] == "facing") && (this["weapontype" + i][1] == "0xbbbb00")) && (this["weapontype" + i][2] == 10)) && (this["weapontype" + i][3] == 10)) {
wtype = "laser cannon";
} else if ((((this["weapontype" + i][0] == "turret") && (this["weapontype" + i][1] == "0xbbbb00")) && (this["weapontype" + i][2] == 10)) && (this["weapontype" + i][3] == 10)) {
wtype = "laser cannon turret";
} else if ((((this["weapontype" + i][0] == "turret") && (this["weapontype" + i][1] == "0x00bbbb")) && (this["weapontype" + i][2] == 10)) && (this["weapontype" + i][3] == 40)) {
wtype = "heavy laser cannon turret";
} else if ((((this["weapontype" + i][0] == "facing") && (this["weapontype" + i][1] == "0x0000bb")) && (this["weapontype" + i][2] == 20)) && (this["weapontype" + i][3] == 80)) {
wtype = "ion cannon";
} else if (((((this["weapontype" + i][0] == "turret") || (this["weapontype" + i][0] == "target")) && (this["weapontype" + i][1] == "0x0000bb")) && (this["weapontype" + i][2] == 25)) && (this["weapontype" + i][3] == 80)) {
wtype = "ion cannon turret";
} else if (((((this["weapontype" + i][0] == "turret") || (this["weapontype" + i][0] == "target")) && (this["weapontype" + i][1] == "0xff00ff")) && (this["weapontype" + i][2] == 40)) && (this["weapontype" + i][3] == 180)) {
wtype = "particle cannon turret";
} else if ((((this["weapontype" + i][0] == "facing") && (this["weapontype" + i][1] == "0xffffff")) && (this["weapontype" + i][2] == 60)) && (this["weapontype" + i][3] == 300)) {
wtype = "antimatter cannon";
} else {
wtype = "unknown weapon";
}
if (this["weaponnums" + i] == 1) {
this[("w" + i) + "num"].text = this["weaponnums" + i];
this[("w" + i) + "des"].text = wtype;
} else {
this[("w" + i) + "num"].text = this["weaponnums" + i];
this[("w" + i) + "des"].text = wtype + "s";
}
i++;
}
}
function newcol(newcoler) {
backcol.setRGB(_root[newcoler]);
}
backcol = new Color(this.infoback);
backcol.setRGB(16711935);
createEmptyMovieClip("shipicon", 1);
this.shipicon._x = 100;
this.shipicon._y = 50;
light_fighter = "a light fighter, usefull for harassing enemy fighters";
heavy_fighter = "a heavy fighter, usefull for harassing enemy fighters and bombers";
_bomber = "standard bomber, useful in anticapital ship roles, when no capital ships are available";
heavy_bomber = "heavier than the standard bomber, even more useful in anticapital ship roles";
light_frigate = "lightest capital ship, mainly used to take out enemy fighters and bombers";
heavy_frigate = "first ship designed to take on other capital ships, best used in large numbers";
light_cruiser = "light cruiser, designed to tear apart enemy bombers, and peck away at capital ships";
_destroyer = "premier vessel in any armada . . . able to take out enemy capital ships with ease";
heavy_cruiser = "heavy ship best used in anti-capital roles";
_carrier = "a haven for fighters and bombers, launches waves of two heavy and light fighter wings and one bomber wings as frequently as it can";
_dreadnought = "the most powerful ship ever built, capable of destroying entire fleets single handedly";
this.onEnterFrame = function () {
this.shipicon._rotation = this.shipicon._rotation + 5;
};