Frame 1
function emailHandler3() {
_root.gotoAndStop("victree");
}
_global.teamtype = function (named, people, maxlength) {
_root[named] = new Object();
_root[named].namet = named;
_root[named].timer = 0;
_root.ai.teamslist.push(named);
_root[named].maxlength = maxlength;
_root[named].members = people.concat();
trace("maxlength");
if (people == undefined) {
_root[named].members = [];
}
_root[named].targets = undefined;
_root[named].attack = function (what, occupied) {
trace("attacking" + what);
this.targets = what;
var _local4 = this.members.length - 1;
while (_local4 > -1) {
var _local3 = this.members[_local4];
if (_root[_local3].damage != undefined) {
if ((occupied === true) && (_root[_local3].fireing || (_root[_local3].walking))) {
} else {
_root[_local3].aiattack(what);
}
}
_local4--;
}
};
_root[named].goto = function (wherex, wherey, waypoint, occupied) {
this.targets = undefined;
var _local6 = wherex;
var _local5 = wherey;
if (_root[waypoint]._x != undefined) {
_local6 = _root[waypoint]._x;
_local5 = _root[waypoint]._y;
}
var _local4 = this.members.length - 1;
while (_local4 > -1) {
var _local3 = this.members[_local4];
if ((occupied === true) && (_root[_local3].fireing || (_root[_local3].walking))) {
} else {
_root[_local3].aigoto(_local6, _local5, false);
}
_local4--;
}
};
_root[named].checks = function () {
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
if ((_root[_local4].life <= 0) || (_root[_local4].life == undefined)) {
this.members.splice(_local3, 1);
}
_local3--;
}
};
_root[named].command = function (whats, values) {
trace(("upgrade" + whats) + values);
if ((whats != undefined) && (values != undefined)) {
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
if (_root[_local4][whats] != undefined) {
_root[_local4][whats] = values;
}
_local3--;
}
}
};
_root[named].upgrade = function (attribute, magnitude) {
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
_root[_local4][attribute] = _root[_local4][attribute] * magnitude;
_local3--;
}
};
_root[named].istargetdestroyed = function () {
if ((_root[this.targets].life <= 0) || (_root[this.targets].life == undefined)) {
return(true);
}
return(false);
};
_root[named].isfree = function () {
var _local5 = true;
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
if (_root[_local4].walking || (_root[_local4].fireing)) {
_local5 = false;
break;
}
_local3--;
}
return(_local5);
};
_root[named].iswithindistance = function (targeted, ranger) {
var _local7 = true;
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
var _local5 = Math.sqrt(Math.pow(_root[_local4]._x - _root[targeted]._x, 2) + Math.pow(_root[_local4]._y - _root[targeted]._y, 2));
if ((_local5 > ranger) && (_local5 != undefined)) {
_local7 = false;
break;
}
_local3--;
}
return(_local7);
};
_root[named].iswithindistance2 = function (targeted, ranger) {
var _local7 = false;
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
var _local5 = Math.sqrt(Math.pow(_root[_local4]._x - _root[targeted]._x, 2) + Math.pow(_root[_local4]._y - _root[targeted]._y, 2));
if (_local5 < ranger) {
_local7 = true;
break;
}
_local3--;
}
return(_local7);
};
return(_root[named]);
};
py = teamtype("3a", [], 4);
trace(py.maxlength);
var my_cm = new ContextMenu();
var menuItem_cmi3 = new ContextMenuItem("Win", emailHandler3);
my_cm.customItems.push(menuItem_cmi3);
_root.menu = my_cm;
_root.fog = false;
stop();
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Frame 2
function emailHandler() {
_root.attachMovie("lasertank", "elite1", 1);
_root.elite1._x = _root.lock1._x;
_root.elite1._y = _root.lock1._y;
}
function emailHandler2() {
_root.elite1.life = 100000 /* 0x0186A0 */;
_root.elite1.fulllife = 100000 /* 0x0186A0 */;
_root.elite1.damage = 1000;
_root.elite1.speed = 10;
_root.elite1.firerate = 1;
}
_root.soundon = false;
_root.smartai = true;
_root.screen = false;
_root.owmmap5 = false;
_root.setsoundon = true;
_root.ais = 5;
_root.musicn = 1;
_root._quality = "MEDIUM";
_root.attachMovie("bar", "bar", 11000);
_root.bar._x = _root.flagn._x;
_root.bar._y = _root.flagn._y;
fscommand ("showmenu", false);
_global.x1 = 624;
_global.y1 = 420;
_global.x2 = 772.2;
_global.y2 = 420;
_global.x3 = 616.2;
_global.y3 = 576;
_global.x4 = 772.2;
_global.y4 = 537;
_root.loadings = undefined;
_root.n = 0;
var my_cm = new ContextMenu();
var menuItem_cmi = new ContextMenuItem("cheat", emailHandler);
my_cm.customItems.push(menuItem_cmi);
_root.menu = my_cm;
var menuItem_cmi2 = new ContextMenuItem("cheat2", emailHandler2);
my_cm.customItems.push(menuItem_cmi2);
_root.menu = my_cm;
_root.n = 0;
_root.guyzarray = [];
_root.setsoundon = true;
_root.musicon = true;
stop();
_root.friendlylist = [];
_root.unitsarray = [];
_root.turretarray = [];
_root.enemyarray = [];
_root.objarray = [];
_root.shellarray = [];
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.monet = 30000;
Mouse.show();
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
_global.createobj = function () {
a = Math.random();
if ((a > 0) && (a < 0.3)) {
unittype = "light";
}
if ((a > 0.3) && (a < 0.5)) {
unittype = "rocket";
}
if ((a > 0.5) && (a < 0.6)) {
unittype = "heavy";
}
if ((a > 0.6) && (a < 0.8)) {
unittype = "humvee";
}
if ((a > 0.9) && (a < 1)) {
unittype = "artillery";
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
var _local2 = Math.ceil(Math.random() * 5);
_root[unittype + _root.n]._x = _root["reinforcement" + _local2]._x + (a * 100);
_root[unittype + _root.n]._y = _root["reinforcement" + _local2]._y;
_root[unittype + _root.n].ally = true;
_root.guyzarray.push(unittype + _root.n);
unittype = undefined;
_root.n++;
if (_root.n > 10000) {
_root.n = 1;
}
};
_global.createobj2 = function () {
a = Math.random();
if ((a > 0) && (a < 0.3)) {
unittype = "enemylight";
}
if ((a > 0.3) && (a < 0.5)) {
unittype = "enemyrocket";
}
if ((a > 0.5) && (a < 0.6)) {
unittype = "enemyheavy";
}
if ((a > 0.6) && (a < 0.9)) {
unittype = "enemyhumvee";
}
if ((a > 0.9) && (a < 1)) {
unittype = "enemyartillery";
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
var _local2 = 5 + Math.ceil(Math.random() * 5);
_root[unittype + _root.n]._x = _root["reinforcement" + _local2]._x + (a * 100);
_root[unittype + _root.n]._y = _root["reinforcement" + _local2]._y;
_root[unittype + _root.n]._rotation = 0;
_root.guyzarray.push(unittype + _root.n);
unittype = undefined;
_root.n++;
};
_global.applyobj = function () {
var _local4 = _root.guyzarray.length - 1;
while (_local4 > -1) {
current = _root.guyzarray[_local4];
_root.guyzarray.splice(_local4, 1);
var _local3 = ["auto", "avoid", "laser", "seeker", "accurate", "gatling", "crush", "missile", "emp", "nuke", "blast", "shell2", "hitonly"];
var _local2 = _local3.length - 1;
while (_local2 > -1) {
currents = _local3[_local2];
if (Math.random() > 0.5) {
_root[current][currents] = !_root[current][currents];
}
_local2--;
}
_root[current].miss = Math.ceil(Math.random() * 3);
if (_root[current]._y < _root.centre._y) {
_root[current].aigoto(_root[current]._x, _root.centre1._y);
}
if (_root[current]._y > _root.centre._y) {
_root[current].aigoto(_root[current]._x, _root.centre2._y);
}
_local4--;
}
};
Instance of Symbol 1063 MovieClip "comcentre1" in Frame 2
onClipEvent (load) {
ranges = 1;
life = 0;
}
Instance of Symbol 1082 MovieClip in Frame 2
onClipEvent (load) {
_root.musicn = 1;
_root.music = new Sound();
_root.music.attachSound("music1");
_root.music.stop();
_root.music.start(0, 1000);
}
Frame 3
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.soundon = _root.setsoundon;
gotoAndPlay (6);
Frame 4
_root.soundon = _root.setsoundon;
gotoAndPlay (51);
_root.bar.removeMovieClip();
Frame 5
_root.soundon = _root.setsoundon;
gotoAndPlay (70);
_root.bar.removeMovieClip();
Frame 6
array1 = [];
enemymines = 0;
_root.scrolla = true;
_root.soundon = _root.setsoundon;
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
con = new ContextMenu();
con.hideBuiltInItems();
Instance of Symbol 1082 MovieClip in Frame 6
onClipEvent (load) {
_root.music.start();
}
Frame 7
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = 30000;
_root.enemymoney = 30000;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Frame 8
Mouse.hide();
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 8
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 8
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 8
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 8
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1150 MovieClip "rig6" in Frame 8
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 8
onClipEvent (load) {
oilfield = "oil3";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 8
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 8
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1194 MovieClip "box" in Frame 8
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 9
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 249 MovieClip in Frame 9
/* no clip actions */
Instance of Symbol 1199 MovieClip "ai" in Frame 9
onClipEvent (mouseUp) {
_root.gotoAndPlay("tut3");
}
Frame 42
_root.victory._visible = false;
_root.tutorial.swapDepths(-2);
Frame 43
array1 = [];
enemymines = 0;
_root.shroudarray = [];
play();
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
con = new ContextMenu();
con.hideBuiltInItems();
Frame 44
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = 30000;
_root.enemymoney = 30000;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Frame 45
Mouse.hide();
stop();
this.sidebar.mapp.gotoAndStop("map2");
stop();
Instance of Symbol 1135 MovieClip in Frame 45
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 45
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 45
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 45
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 45
onClipEvent (load) {
oilfield = "oil3";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 45
onClipEvent (load) {
oilfield = "oil2";
_root.objarray.push(this._name);
}
Instance of Symbol 1063 MovieClip in Frame 45
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
_root[current]._visible = false;
break;
}
}
i--;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 45
onClipEvent (load) {
timer = 0;
_root.array2 = [];
build = true;
rounds = 0;
_root.enemyoiltrucks = 0;
}
onClipEvent (enterFrame) {
ppp = _root.enemyarray.toString();
Mouse.hide();
timer++;
if ((Math.round(timer / 30) * 30) == timer) {
if (_root.enemyarray.length <= 0) {
_root.gotoAndStop("victory2e");
}
if (_root.friendlylist.length <= 0) {
_root.gotoAndStop("defeat2e");
}
n = _root.enemystructurearray.length - 1;
while (n > -1) {
current2 = _root.enemystructurearray[n];
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if (_root[current].build || (_root[current].walking)) {
} else {
dx = _root[current]._x - _root[current2]._x;
dy = _root[current]._y - _root[current2]._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 1500) {
ant = 0;
if (((_root[current2].life < _root[current2].fulllife) && (_root[current2].percent == undefined)) && (_root[current2].auto._currentframe == 1)) {
if (!_root[current].hitTest(_root[current2])) {
_root[current].aigoto(_root[current2]._x, _root[current2]._y, false);
}
_root[current2].auto.play();
h = array1.length - 1;
while (h > -1) {
currents = _root.array1[h];
if ((((_root[currents].natack == undefined) && (!_root[currents].walking)) && (!_root[currents].fireing)) && (ant < 5)) {
ant++;
_root[currents].aigoto(_root[current2]._x, _root[current2]._y, false);
if (_root[current2].targetobj != undefined) {
targetobj = _root[current2].targetobj;
_root[currents].aiattack(targetobj);
}
}
h--;
}
}
}
break;
}
i--;
}
n--;
}
}
if ((Math.round(timer / 70) * 70) == timer) {
if ((_root.enemymoney > 50000) && (!build)) {
build = true;
rounds++;
}
if ((_root.enemymoney < 20000) && (build)) {
build = false;
}
i = 0;
while (i < _root.array2.length) {
current = _root.array2[i];
if (_root[current].life == undefined) {
_root.array2.splice(i, 1);
} else if ((!_root[current].fireing) && (!_root[current].walking)) {
lo = Math.floor(Math.random() * (_root.friendlylist.length - 1));
unit = _root.friendlylist[lo];
_root[current].aiattack(unit);
}
i++;
}
arrayone = _root.array1.toString();
if (_root.enemywarfactory1.life > 0) {
if ((_root.enemyoiltrucks < 1) && (_root.enemymoney >= 2000)) {
_root.enemymoney = _root.enemymoney - 1500;
_root.attachMovie("enemyoiltruck", "enemyoiltruck" + _root.n, _root.n);
_root["enemyoiltruck" + _root.n]._x = _root.enemywarfactory1._x;
_root["enemyoiltruck" + _root.n]._y = _root.enemywarfactory1._y;
_root["enemyoiltruck" + _root.n]._rotation = 0;
_root.n++;
}
if ((_root.enemyarray.length < 15) && (_root.enemymoney > 0)) {
unittype = "enemyhumvee";
_root.enemymoney = _root.enemymoney - 500;
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.enemywarfactory1._x;
_root[unittype + _root.n]._y = _root.enemywarfactory1._y + 100;
_root[unittype + _root.n]._rotation = 0;
unittype = undefined;
_root.n++;
}
}
}
}
Instance of Symbol 1152 MovieClip "burton" in Frame 45
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1237 MovieClip "tutorial" in Frame 45
onClipEvent (load) {
this.swapDepths(30000);
}
Instance of Symbol 1150 MovieClip "rig122" in Frame 45
onClipEvent (load) {
oilfield = "oil5";
_root.objarray.push(this._name);
}
Instance of Symbol 1194 MovieClip "box" in Frame 45
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
if (this._width < 20) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 46
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 249 MovieClip in Frame 46
/* no clip actions */
Instance of Symbol 1199 MovieClip "ai" in Frame 46
onClipEvent (mouseUp) {
_root.gotoAndPlay("meow");
}
Frame 48
_root.gotoAndStop("meow");
Frame 49
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.tutorial._visible = false;
gotoAndStop (2);
Frame 50
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.tutorial._visible = false;
gotoAndStop (2);
Frame 51
array1 = [];
enemymines = 0;
_root.obsarray = [];
_root.shroudarray = [];
_root.scrolla = true;
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.kills = 0;
_root.losses = 0;
_root.built = 0;
_root.enemyminearray = [];
_root.upgradelevel = 0.9 / _root.difficulty;
if (_root.ais == 4) {
_root.upgradelevel = _root.upgradelevel * 2;
}
Instance of Symbol 1082 MovieClip in Frame 51
onClipEvent (load) {
_root.music.start();
}
Frame 52
_root.gotoAndStop("skirmish" + currento);
trace("skirmish" + currento);
Frame 53
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
trace("skir0");
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
nextFrame();
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.monet;
_root.enemymoney = _root.money;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Instance of Symbol 608 MovieClip [invul] in Frame 53
onClipEvent (load) {
this.object = "enemyheavy1";
}
Instance of Symbol 600 MovieClip [frenzy] in Frame 53
onClipEvent (load) {
object = "crap1";
}
Frame 54
Mouse.hide();
stop();
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 54
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 54
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 54
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 54
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1150 MovieClip "rig6" in Frame 54
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 54
onClipEvent (load) {
oilfield = "oil3";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 54
onClipEvent (load) {
oilfield = "oil2";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig12" in Frame 54
onClipEvent (load) {
oilfield = "oil4";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 54
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig122" in Frame 54
onClipEvent (load) {
oilfield = "oil5";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 54
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 54
/* no clip actions */
Instance of Symbol 1248 MovieClip "ai" in Frame 54
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.smartai) {
aicheck();
} else {
stupidai();
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 54
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
hitunit = false;
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
_root.sidebar.cacheAsBitmap = true;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Instance of Symbol 1063 MovieClip in Frame 54
onClipEvent (enterFrame) {
po++;
if (po == _root.obsarray.length) {
po = 0;
}
current = _root.obsarray[po];
i = _root.unitsarray.length - 1;
while (i > -1) {
current2 = _root.unitsarray[i];
if (_root[current2].walking || (_root[current2].fireing)) {
if (_root.back[current].hitTest(_root[current2])) {
if (_root[current2].dummy.obstacle == undefined) {
_root[current2].dummy.obstacle = false;
}
if ((!_root[current2].dummy.obstacle) || (_root[current2].dummy.obstacle == undefined)) {
_root[current2].dummy.obstacle = true;
if (_root.back[current].pos == "hoz") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "hoz");
if ((_root[current2].dummy._rotation >= -90) && (_root[current2].dummy._rotation < 90)) {
_root[current2].dummy.flag2 = _root.back[current].rights;
}
if ((_root[current2].dummy._rotation >= 90) && (_root[current2].dummy._rotation < 360)) {
_root[current2].dummy.flag2 = _root.back[current].lefts;
}
}
if (_root.back[current].pos == "ver") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "ver");
if ((_root[current2].dummy._rotation <= 0) && (_root[current2].dummy._rotation > -180)) {
_root[current2].dummy.flag2 = _root.back[current].tops;
}
if ((_root[current2].dummy._rotation > 0) && (_root[current2].dummy._rotation < 180)) {
_root[current2].dummy.flag2 = _root.back[current].bottoms;
}
}
}
}
}
i--;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 700 MovieClip in Frame 54
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
Frame 55
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1063 MovieClip in Frame 55
onClipEvent (keyDown) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.tutorial._visible = false;
_root.gotoAndStop("end2");
}
onClipEvent (load) {
_root.score = (_root.kills * _root.kills) + ((656 * (_root.kills * (_root.built + 1))) / (_root.losses * _root.losses));
_root.buil = 0;
_root.kill = 0;
_root.loss = 0;
_root.scores = 0;
trace(_root.score + "score");
}
onClipEvent (enterFrame) {
if (_root.buil < _root.built) {
_root.buil++;
}
if (_root.kill < _root.kills) {
_root.kill++;
}
if (_root.loss < _root.losses) {
_root.loss++;
}
if (_root.scores < _root.score) {
_root.scores = _root.scores + 158;
}
}
Frame 56
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Frame 57
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
trace("skir2");
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
nextFrame();
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.monet;
_root.enemymoney = _root.money;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Instance of Symbol 1274 MovieClip "back" in Frame 57
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 58
_root.sidebar.mapp.gotoAndStop(6);
Mouse.hide();
stop();
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 58
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 58
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 58
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 58
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1274 MovieClip "back" in Frame 58
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1143 MovieClip "oil3" in Frame 58
onClipEvent (load) {
this.oilspill._xscale = 100;
this.oilspill._yscale = 100;
}
Instance of Symbol 1143 MovieClip "oil2" in Frame 58
onClipEvent (load) {
this.oilspill._xscale = 100;
this.oilspill._yscale = 100;
}
Instance of Symbol 1152 MovieClip "burton" in Frame 58
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 700 MovieClip in Frame 58
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 58
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1063 MovieClip in Frame 58
/* no clip actions */
Instance of Symbol 1194 MovieClip "box" in Frame 58
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Instance of Symbol 1063 MovieClip in Frame 58
onClipEvent (enterFrame) {
po++;
if (po == _root.obsarray.length) {
po = 0;
}
current = _root.obsarray[po];
i = _root.unitsarray.length - 1;
while (i > -1) {
current2 = _root.unitsarray[i];
if (_root[current2].walking || (_root[current2].fireing)) {
if (_root.back[current].hitTest(_root[current2])) {
if (_root[current2].dummy.obstacle == undefined) {
_root[current2].dummy.obstacle = false;
}
if ((!_root[current2].dummy.obstacle) || (_root[current2].dummy.obstacle == undefined)) {
_root[current2].dummy.obstacle = true;
if (_root.back[current].pos == "hoz") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "hoz");
if ((_root[current2].dummy._rotation >= -90) && (_root[current2].dummy._rotation < 90)) {
_root[current2].dummy.flag2 = _root.back[current].rights;
}
if ((_root[current2].dummy._rotation >= 90) && (_root[current2].dummy._rotation < 360)) {
_root[current2].dummy.flag2 = _root.back[current].lefts;
}
}
if (_root.back[current].pos == "ver") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "ver");
if ((_root[current2].dummy._rotation <= 0) && (_root[current2].dummy._rotation > -180)) {
_root[current2].dummy.flag2 = _root.back[current].tops;
}
if ((_root[current2].dummy._rotation > 0) && (_root[current2].dummy._rotation < 180)) {
_root[current2].dummy.flag2 = _root.back[current].bottoms;
}
}
}
}
}
i--;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1248 MovieClip "ai" in Frame 58
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.smartai) {
aicheck();
} else {
stupidai();
}
}
Frame 59
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
trace("skir2");
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
nextFrame();
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
gotoAndStop ("bo");
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.monet;
_root.enemymoney = _root.money;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Instance of Symbol 1279 MovieClip "back" in Frame 59
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 60
Mouse.hide();
_root.sidebar.mapp.gotoAndStop(8);
trace("bull");
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 60
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 60
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 60
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 60
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1279 MovieClip "back" in Frame 60
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 60
onClipEvent (load) {
oilfield = "oil3";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 60
onClipEvent (load) {
oilfield = "oil2";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 60
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig1" in Frame 60
onClipEvent (load) {
oilfield = "oil122";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 60
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 60
/* no clip actions */
Instance of Symbol 700 MovieClip in Frame 60
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1248 MovieClip "ai" in Frame 60
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.smartai) {
aicheck();
} else {
stupidai();
}
}
Instance of Symbol 1063 MovieClip in Frame 60
onClipEvent (enterFrame) {
po++;
if (po == _root.obsarray.length) {
po = 0;
}
current = _root.obsarray[po];
i = _root.unitsarray.length - 1;
while (i > -1) {
current2 = _root.unitsarray[i];
if (_root[current2].walking || (_root[current2].fireing)) {
if (_root.back[current].hitTest(_root[current2])) {
if (_root[current2].dummy.obstacle == undefined) {
_root[current2].dummy.obstacle = false;
}
if ((!_root[current2].dummy.obstacle) || (_root[current2].dummy.obstacle == undefined)) {
_root[current2].dummy.obstacle = true;
if (_root.back[current].pos == "hoz") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "hoz");
if ((_root[current2].dummy._rotation >= -90) && (_root[current2].dummy._rotation < 90)) {
_root[current2].dummy.flag2 = _root.back[current].rights;
}
if ((_root[current2].dummy._rotation >= 90) && (_root[current2].dummy._rotation < 360)) {
_root[current2].dummy.flag2 = _root.back[current].lefts;
}
}
if (_root.back[current].pos == "ver") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "ver");
if ((_root[current2].dummy._rotation <= 0) && (_root[current2].dummy._rotation > -180)) {
_root[current2].dummy.flag2 = _root.back[current].tops;
}
if ((_root[current2].dummy._rotation > 0) && (_root[current2].dummy._rotation < 180)) {
_root[current2].dummy.flag2 = _root.back[current].bottoms;
}
}
}
}
}
i--;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1194 MovieClip "box" in Frame 60
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 61
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
trace("skir3");
trace(_root.currento);
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
nextFrame();
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.monet;
_root.enemymoney = _root.money;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Frame 62
Mouse.hide();
_root.sidebar.mapp.gotoAndStop(2);
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 62
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 62
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 62
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 62
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 62
onClipEvent (load) {
oilfield = "oil3";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 62
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 62
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 62
/* no clip actions */
Instance of Symbol 700 MovieClip in Frame 62
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1063 MovieClip in Frame 62
onClipEvent (enterFrame) {
po++;
if (po == _root.obsarray.length) {
po = 0;
}
current = _root.obsarray[po];
i = _root.unitsarray.length - 1;
while (i > -1) {
current2 = _root.unitsarray[i];
if (_root[current2].walking || (_root[current2].fireing)) {
if (_root.back[current].hitTest(_root[current2])) {
if (_root[current2].dummy.obstacle == undefined) {
_root[current2].dummy.obstacle = false;
}
if ((!_root[current2].dummy.obstacle) || (_root[current2].dummy.obstacle == undefined)) {
_root[current2].dummy.obstacle = true;
if (_root.back[current].pos == "hoz") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "hoz");
if ((_root[current2].dummy._rotation >= -90) && (_root[current2].dummy._rotation < 90)) {
_root[current2].dummy.flag2 = _root.back[current].rights;
}
if ((_root[current2].dummy._rotation >= 90) && (_root[current2].dummy._rotation < 360)) {
_root[current2].dummy.flag2 = _root.back[current].lefts;
}
}
if (_root.back[current].pos == "ver") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "ver");
if ((_root[current2].dummy._rotation <= 0) && (_root[current2].dummy._rotation > -180)) {
_root[current2].dummy.flag2 = _root.back[current].tops;
}
if ((_root[current2].dummy._rotation > 0) && (_root[current2].dummy._rotation < 180)) {
_root[current2].dummy.flag2 = _root.back[current].bottoms;
}
}
}
}
}
i--;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1248 MovieClip "ai" in Frame 62
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.smartai) {
aicheck();
} else {
stupidai();
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 62
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 63
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
nextFrame();
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.monet;
_root.enemymoney = _root.money;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Instance of Symbol 1286 MovieClip "back" in Frame 63
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 64
Mouse.hide();
_root.sidebar.mapp.gotoAndStop(10);
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 64
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 64
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 64
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 64
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1286 MovieClip "back" in Frame 64
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1143 MovieClip "oil4" in Frame 64
onClipEvent (load) {
this.oilspill._xscale = 100;
this.oilspill._yscale = 100;
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 64
onClipEvent (load) {
oilfield = "oil4";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 64
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 64
onClipEvent (load) {
oilfield = "oil4";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig12" in Frame 64
onClipEvent (load) {
oilfield = "oil4";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig20" in Frame 64
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig21" in Frame 64
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 64
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 64
/* no clip actions */
Instance of Symbol 700 MovieClip in Frame 64
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1063 MovieClip in Frame 64
onClipEvent (enterFrame) {
po++;
if (po == _root.obsarray.length) {
po = 0;
}
current = _root.obsarray[po];
i = _root.unitsarray.length - 1;
while (i > -1) {
current2 = _root.unitsarray[i];
if (_root[current2].walking || (_root[current2].fireing)) {
if (_root.back[current].hitTest(_root[current2])) {
if (_root[current2].dummy.obstacle == undefined) {
_root[current2].dummy.obstacle = false;
}
if ((!_root[current2].dummy.obstacle) || (_root[current2].dummy.obstacle == undefined)) {
_root[current2].dummy.obstacle = true;
if (_root.back[current].pos == "hoz") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "hoz");
if ((_root[current2].dummy._rotation >= -90) && (_root[current2].dummy._rotation < 90)) {
_root[current2].dummy.flag2 = _root.back[current].rights;
}
if ((_root[current2].dummy._rotation >= 90) && (_root[current2].dummy._rotation < 360)) {
_root[current2].dummy.flag2 = _root.back[current].lefts;
}
}
if (_root.back[current].pos == "ver") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "ver");
if ((_root[current2].dummy._rotation <= 0) && (_root[current2].dummy._rotation > -180)) {
_root[current2].dummy.flag2 = _root.back[current].tops;
}
if ((_root[current2].dummy._rotation > 0) && (_root[current2].dummy._rotation < 180)) {
_root[current2].dummy.flag2 = _root.back[current].bottoms;
}
}
}
}
}
i--;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1248 MovieClip "ai" in Frame 64
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.smartai) {
aicheck();
} else {
stupidai();
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 64
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 65
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
nextFrame();
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.monet;
_root.enemymoney = _root.money;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Instance of Symbol 1288 MovieClip "back" in Frame 65
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 66
Mouse.hide();
_root.sidebar.mapp.gotoAndStop(4);
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 66
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 66
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 66
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 66
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1288 MovieClip "back" in Frame 66
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1143 MovieClip "oil9" in Frame 66
onClipEvent (load) {
this.oilspill._xscale = 100;
this.oilspill._yscale = 100;
}
Instance of Symbol 1150 MovieClip "rig12" in Frame 66
onClipEvent (load) {
oilfield = "oil9";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 66
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1143 MovieClip "oil33" in Frame 66
onClipEvent (load) {
this.oilspill._xscale = 100;
this.oilspill._yscale = 100;
}
Instance of Symbol 1143 MovieClip "oil8" in Frame 66
onClipEvent (load) {
this.oilspill._xscale = 100;
this.oilspill._yscale = 100;
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 66
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig31" in Frame 66
onClipEvent (load) {
oilfield = "oil34";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig20" in Frame 66
onClipEvent (load) {
oilfield = "oil0";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 66
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 66
/* no clip actions */
Instance of Symbol 700 MovieClip in Frame 66
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1063 MovieClip in Frame 66
onClipEvent (enterFrame) {
po++;
if (po == _root.obsarray.length) {
po = 0;
}
current = _root.obsarray[po];
i = _root.unitsarray.length - 1;
while (i > -1) {
current2 = _root.unitsarray[i];
if (_root[current2].walking || (_root[current2].fireing)) {
if (_root.back[current].hitTest(_root[current2])) {
if (_root[current2].dummy.obstacle == undefined) {
_root[current2].dummy.obstacle = false;
}
if ((!_root[current2].dummy.obstacle) || (_root[current2].dummy.obstacle == undefined)) {
_root[current2].dummy.obstacle = true;
if (_root.back[current].pos == "hoz") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "hoz");
if ((_root[current2].dummy._rotation >= -90) && (_root[current2].dummy._rotation < 90)) {
_root[current2].dummy.flag2 = _root.back[current].rights;
}
if ((_root[current2].dummy._rotation >= 90) && (_root[current2].dummy._rotation < 360)) {
_root[current2].dummy.flag2 = _root.back[current].lefts;
}
}
if (_root.back[current].pos == "ver") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "ver");
if ((_root[current2].dummy._rotation <= 0) && (_root[current2].dummy._rotation > -180)) {
_root[current2].dummy.flag2 = _root.back[current].tops;
}
if ((_root[current2].dummy._rotation > 0) && (_root[current2].dummy._rotation < 180)) {
_root[current2].dummy.flag2 = _root.back[current].bottoms;
}
}
}
}
}
i--;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1248 MovieClip "ai" in Frame 66
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.smartai) {
aicheck();
} else {
stupidai();
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 66
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 67
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
trace(this.length);
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
trace(_root[elementsearched].unittype + elementsearched);
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
trace(this.length);
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
nextFrame();
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.monet;
_root.enemymoney = _root.money;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
Instance of Symbol 818 MovieClip "back" in Frame 67
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 68
Mouse.hide();
_root.sidebar.mapp.gotoAndStop(9);
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 68
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 68
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 68
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 68
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 818 MovieClip "back" in Frame 68
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1143 MovieClip "oil9" in Frame 68
onClipEvent (load) {
this.oilspill._xscale = 100;
this.oilspill._yscale = 100;
}
Instance of Symbol 1150 MovieClip "rig12" in Frame 68
onClipEvent (load) {
oilfield = "oil9";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 68
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig19" in Frame 68
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig31" in Frame 68
onClipEvent (load) {
oilfield = "oil34";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig20" in Frame 68
onClipEvent (load) {
oilfield = "oil0";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 68
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 68
/* no clip actions */
Instance of Symbol 700 MovieClip in Frame 68
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1063 MovieClip in Frame 68
onClipEvent (enterFrame) {
po++;
if (po == _root.obsarray.length) {
po = 0;
}
current = _root.obsarray[po];
i = _root.unitsarray.length - 1;
while (i > -1) {
current2 = _root.unitsarray[i];
if (_root[current2].walking || (_root[current2].fireing)) {
if (_root.back[current].hitTest(_root[current2])) {
if (_root[current2].dummy.obstacle == undefined) {
_root[current2].dummy.obstacle = false;
}
if ((!_root[current2].dummy.obstacle) || (_root[current2].dummy.obstacle == undefined)) {
_root[current2].dummy.obstacle = true;
if (_root.back[current].pos == "hoz") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "hoz");
if ((_root[current2].dummy._rotation >= -90) && (_root[current2].dummy._rotation < 90)) {
_root[current2].dummy.flag2 = _root.back[current].rights;
}
if ((_root[current2].dummy._rotation >= 90) && (_root[current2].dummy._rotation < 360)) {
_root[current2].dummy.flag2 = _root.back[current].lefts;
}
}
if (_root.back[current].pos == "ver") {
roattion = _root[current2].dummy._rotation;
trace(roattion + "ver");
if ((_root[current2].dummy._rotation <= 0) && (_root[current2].dummy._rotation > -180)) {
_root[current2].dummy.flag2 = _root.back[current].tops;
}
if ((_root[current2].dummy._rotation > 0) && (_root[current2].dummy._rotation < 180)) {
_root[current2].dummy.flag2 = _root.back[current].bottoms;
}
}
}
}
}
i--;
}
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1248 MovieClip "ai" in Frame 68
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.smartai) {
aicheck();
} else {
stupidai();
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 68
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 69
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.tutorial._visible = false;
gotoAndStop (2);
Frame 70
_global.x1 = 624;
_global.y1 = 420;
_global.x2 = 772.2;
_global.y2 = 420;
_global.x3 = 616.2;
_global.y3 = 576;
_global.x4 = 772.2;
_global.y4 = 537;
_root.upgradelevel = _root.difficulty / 5;
_root.mission = true;
function emailHandler3() {
_root.gotoAndStop("victree");
}
array1 = [];
stop();
enemymines = 0;
_root.shroudarray = [];
_root.build = 0;
_root.kills = 0;
_root.losses = 0;
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
_global.teamtype = function (named, people, maxlength) {
_root[named] = new Object();
_root[named].namet = named;
_root.ai.teamslist.push(named);
_root[named].maxlength = maxlength;
_root[named].members = people.concat();
trace("maxlength");
if (people == undefined) {
_root[named].members = [];
}
_root[named].targets = undefined;
_root[named].attack = function (what, occupied) {
trace("attacking" + what);
this.targets = what;
var _local4 = this.members.length - 1;
while (_local4 > -1) {
var _local3 = this.members[_local4];
if (_root[_local3].damage != undefined) {
if ((occupied === true) && (_root[_local3].fireing || (_root[_local3].walking))) {
} else {
_root[_local3].aiattack(what);
}
}
_local4--;
}
};
_root[named].goto = function (wherex, wherey, waypoint, occupied) {
this.targets = undefined;
var _local6 = wherex;
var _local5 = wherey;
if (_root[waypoint]._x != undefined) {
_local6 = _root[waypoint]._x;
_local5 = _root[waypoint]._y;
}
var _local4 = this.members.length - 1;
while (_local4 > -1) {
var _local3 = this.members[_local4];
if ((occupied === true) && (_root[_local3].fireing || (_root[_local3].walking))) {
} else {
_root[_local3].aigoto(_local6, _local5, false);
}
_local4--;
}
};
_root[named].checks = function () {
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
if ((_root[_local4].life <= 0) || (_root[_local4].life == undefined)) {
this.members.splice(_local3, 1);
}
_local3--;
}
};
_root[named].command = function (whats, values) {
trace(("upgrade" + whats) + values);
if ((whats != undefined) && (values != undefined)) {
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
if (_root[_local4][whats] != undefined) {
_root[_local4][whats] = values;
}
_local3--;
}
}
};
_root[named].upgrade = function (attribute, magnitude) {
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
_root[_local4][attribute] = _root[_local4][attribute] * magnitude;
_local3--;
}
};
_root[named].istargetdestroyed = function () {
if ((_root[this.targets].life <= 0) || (_root[this.targets].life == undefined)) {
return(true);
}
return(false);
};
_root[named].isfree = function () {
var _local5 = true;
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
_root[_local4]._alpha = 100;
if (_root[_local4].walking === true) {
_local5 = false;
break;
}
_local3--;
}
return(_local5);
};
_root[named].iswithindistance = function (targeted, ranger) {
var _local7 = true;
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
var _local5 = Math.sqrt(Math.pow(_root[_local4]._x - _root[targeted]._x, 2) + Math.pow(_root[_local4]._y - _root[targeted]._y, 2));
if ((_local5 > ranger) && (_local5 != undefined)) {
_local7 = false;
break;
}
_local3--;
}
return(_local7);
};
_root[named].iswithindistance2 = function (targeted, ranger) {
var _local7 = false;
var _local3 = this.members.length - 1;
while (_local3 > -1) {
var _local4 = this.members[_local3];
var _local5 = Math.sqrt(Math.pow(_root[_local4]._x - _root[targeted]._x, 2) + Math.pow(_root[_local4]._y - _root[targeted]._y, 2));
if (_local5 < ranger) {
_local7 = true;
break;
}
_local3--;
}
return(_local7);
};
return(_root[named]);
};
py = teamtype("3a", [], 4);
trace(py.maxlength);
var my_cm = new ContextMenu();
var menuItem_cmi3 = new ContextMenuItem("Win", emailHandler3);
my_cm.customItems.push(menuItem_cmi3);
_root.menu = my_cm;
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
if (loadings === true) {
share.sharedObject.getLocal("save");
currentframe = share.data.currentframe;
_root.gotoAndStop(currentframe);
}
stop();
stopAllSounds();
_root.missions = 0;
buildary = ["turrets", "refinery", "warfactory", "comcentre", "laser", "patriotmissile", "servicedepot", "techcentre", "weaponsilo", "mine"];
buildray = ["light", "dozer", "oiltruck", "humvee", "heavy", "rocket", "lasertank", "artillery"];
Frame 71
_root.patrols1 = undefined;
_root.patrols2 = undefined;
_root.patrols3 = undefined;
if (_root.difficulty == undefined) {
_root.difficulty = 2;
}
stop();
Instance of Symbol 1323 MovieClip in Frame 71
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
_root.shader2.play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 71
onClipEvent (load) {
info = "French and Spanish Border. Population N/A. \n Control : Enemy.\n Economy: Global Financial Hub";
words = "Our forces are trapped in our own base after a rebellion following a failed negotiation attempt with the European Union. Now the Union members are deteermined to get us US forces out of Europe.An escape plan is suggested where we regroup in Friendly Spain.Lead your forces out of the base and into safety.";
map = "map0";
}
Instance of Symbol 1443 MovieClip "dialogue" in Frame 71
onClipEvent (load) {
this.swapDepths(300000);
}
Frame 72
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
if (_root.loadings === true) {
share = SharedObject.getLocal("save");
p = 9;
while (p > 1) {
_root["ownmap" + p] = share.data["ownmap" + p];
_root.missions = share.data.missions;
_root[("map" + p) + "array"] = share.data[("map" + p) + "array"].concat();
i = share.data[("map" + p) + "array"].length - 1;
while (i > -1) {
current = share.data[("map" + p) + "array"][i];
trace(current + "blackcurrane");
trace(share.data[current].fulllife + current);
if (share.data[current + "obj"] == undefined) {
current2 = current;
current = current + ("map" + p);
trace(current + "current");
trace(current2 + "current2");
}
_root[current + "obj"] = share.data[current + "obj"];
trace(_root[current + "obj"].fulllife + current);
_root.enemypower = share.data.enemypower;
_root.money = share.data.money;
trace(_root.money + "mummy");
_root.difficulty = share.data.difficulty;
_root.loadings = undefined;
_root.gotoAndStop("mapbar");
i--;
}
p--;
}
}
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
_global.movetozero = function () {
var _local4 = _root.back._x;
var _local5 = _root.back._y;
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
var _local3 = _root[current]._x;
var _local2 = _root[current]._y;
_root[current]._x = _local3 - _local4;
_root[current]._y = _local2 - _local5;
i--;
}
_root.back._x = 0;
_root.back._y = 0;
};
_global.movetoloc = function (x, y) {
xb = _root.back._x;
yb = _root.back._y;
_root.box6._x = x1 + (constantx * (x - xb));
_root.box6._y = y1 + (constanty * (y - yb));
_root.back._x = _root.back._x - (x - xb);
_root.back._y = _root.back._y - (y - yb);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x - xb);
_root[current]._y = _root[current]._y - (y - yb);
i--;
}
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = 0;
_root.enemypower = 0;
_root.enemymoney = 30000;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_root.attackarray = [];
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
_root.ownmap4 = false;
Instance of Symbol 1288 MovieClip "back" in Frame 72
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1082 MovieClip in Frame 72
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 72
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 73
_root.attachMovie("mission0", "tutoriall", 100000);
_root.tutoriall._x = 46.8;
_root.tutoriall._y = 10.9;
_root.sidebar.mapp.gotoAndStop(4);
_root.sidebar._visible = false;
_root.scrolla = true;
Mouse.hide();
_root.enemymoney = 10000000000;
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 73
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 73
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 73
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 15;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 73
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 15;
i--;
}
}
}
}
Instance of Symbol 1288 MovieClip "back" in Frame 73
onClipEvent (load) {
}
Instance of Symbol 1063 MovieClip in Frame 73
onClipEvent (load) {
ranges = 0.5;
baseunder = 0;
}
Instance of Symbol 501 MovieClip in Frame 73
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 73
onClipEvent (load) {
timer = 0;
_root.refinery1e = 1;
_root.comcentre1e = 1;
_root.warfactory1e = 1;
_root.pat1e = 1;
_root.pat2e = 1;
_root.array2 = [];
build = true;
rounds = 0;
_root.enemyoiltrucks = 0;
timer5 = 0;
timergo = false;
}
onClipEvent (enterFrame) {
timer++;
if (timergo) {
timer5++;
}
if (timer5 == (300 / _root.difficulty)) {
_root.dialogue.play();
}
if (timer == 5) {
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].walking || (_root[current].fireing)) {
x = _root[current]._x;
y = _root[current]._y;
p = 10;
while (p > -1) {
current2 = "wall" + p;
if (_root[current2].hitTest(x, y, false)) {
rads = (_root[current].dummy._rotation * (Math.PI*2)) / 360;
_root[current]._x = _root[current]._x - ((Math.cos(rads) * _root[current].speed) * 7);
_root[current]._y = _root[current]._y - ((Math.sin(rads) * _root[current].speed) * 7);
_root[current].movesym();
_root[current].walking = false;
break;
}
p--;
}
}
i--;
}
timer = 0;
}
i = 4;
while (i > 0) {
if (_root.apc.hitTest(_root["flag" + i])) {
_root.gotoAndStop("victory0");
}
i--;
}
if (_root.apc.life <= 0) {
_root.gotoAndStop("defeat0");
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 73
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 74
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.missions++;
_root.tutoriall.removeMovieClip();
_root.box6.removeMovieClip();
stop();
Instance of Symbol 249 MovieClip in Frame 74
/* no clip actions */
Instance of Symbol 1199 MovieClip "ai" in Frame 74
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss2");
}
Frame 75
_root.enemies = undefined;
_root.friendly = undefined;
stop();
Instance of Symbol 1323 MovieClip in Frame 75
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 75
onClipEvent (load) {
info = "Southern France. Population 33 million. \n Control : Enemy.\n Economy: Global Financial Hub \n Battlefield statistics:Sandy and Grassy, with mostly light armour.Beware of mines.";
words = "Having retreated to a more comfortable position in Spain, our forces are now ready to launch an invasion to retake France. This is one of two possible positions where we can effectively enter our forces.Commander,Take a squad of our best tanks and liberate whats left of our main base. Do not fail, the lives of our remaining elites count on it.Good luck commander!";
map = "map1";
}
Instance of Symbol 1332 MovieClip "shader1" in Frame 75
onClipEvent (load) {
info = "Northern France. Population 33 million. \n Control : Enemy.\n Economy: Global Financial Hub. \n Battlefield statistics: Contains many heavily armoured tanks as well as enemy artillery.Well fortified with turrets.";
words = "Having retreated to a more comfortable position in Spain, our forces are now ready to launch an invasion to retake France.This is one of two possible positions where we can effectively enter our forces. Commander,Take a squad of our best tanks and liberate whats left of our main base. Do not fail, the lives of our remaining elites count on it.Good luck commander!";
map = "map1b";
}
Frame 76
_root.soundon = _root.setsoundon;
_root.soundon = true;
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.missions++;
_root.tutoriall.removeMovieClip();
stop();
Instance of Symbol 1288 MovieClip "back" in Frame 76
onClipEvent (load) {
}
Instance of Symbol 249 MovieClip in Frame 76
/* no clip actions */
Instance of Symbol 1199 MovieClip "ai" in Frame 76
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss1");
}
Instance of Symbol 1082 MovieClip in Frame 76
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 76
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 77
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
if (_root.loadings === true) {
share = SharedObject.getLocal("save");
p = 9;
while (p > 1) {
_root["ownmap" + p] = share.data["ownmap" + p];
_root.missions = share.data.missions;
_root[("map" + p) + "array"] = share.data[("map" + p) + "array"].concat();
i = share.data[("map" + p) + "array"].length - 1;
while (i > -1) {
current = share.data[("map" + p) + "array"][i];
trace(current + "blackcurrane");
trace(share.data[current].fulllife + current);
if (share.data[current + "obj"] == undefined) {
current2 = current;
current = current + ("map" + p);
trace(current + "current");
trace(current2 + "current2");
}
_root[current + "obj"] = share.data[current + "obj"];
trace(_root[current + "obj"].fulllife + current);
_root.enemypower = share.data.enemypower;
_root.money = share.data.money;
trace(_root.money + "mummy");
_root.difficulty = share.data.difficulty;
_root.loadings = undefined;
_root.gotoAndStop("mapbar");
i--;
}
p--;
}
}
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
_global.movetozero = function () {
var _local4 = _root.back._x;
var _local5 = _root.back._y;
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
var _local3 = _root[current]._x;
var _local2 = _root[current]._y;
_root[current]._x = _local3 - _local4;
_root[current]._y = _local2 - _local5;
i--;
}
_root.back._x = 0;
_root.back._y = 0;
};
_global.movetoloc = function (x, y) {
xb = _root.back._x;
yb = _root.back._y;
_root.box6._x = x1 + (constantx * (x - xb));
_root.box6._y = y1 + (constanty * (y - yb));
_root.back._x = _root.back._x - (x - xb);
_root.back._y = _root.back._y - (y - yb);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x - xb);
_root[current]._y = _root[current]._y - (y - yb);
i--;
}
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = 0;
_root.enemypower = 0;
_root.enemymoney = 30000;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_root.attackarray = [];
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
_root.ownmap4 = false;
Instance of Symbol 806 MovieClip "back" in Frame 77
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 78
_root.sidebar.mapp.gotoAndStop(3);
_root.attachMovie("mission", "tutoriall", 1000900);
_root.tutoriall._x = 46.8;
_root.tutoriall._y = 10.9;
_root.dialogue.gotoAndStop(6);
Mouse.hide();
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 78
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 78
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 78
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 15;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 78
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 15;
i--;
}
}
}
}
Instance of Symbol 806 MovieClip "back" in Frame 78
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1448 MovieClip "wall1" in Frame 78
onClipEvent (load) {
_root.objarray.push(this._name);
_root.unitsarray.push(this._name);
this.life = 500;
this.fulllife = 500;
this.unittype = "wall";
}
Instance of Symbol 1448 MovieClip "wall2" in Frame 78
onClipEvent (load) {
_root.objarray.push(this._name);
_root.unitsarray.push(this._name);
this.life = 500;
this.fulllife = 500;
this.unittype = "wall";
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 78
onClipEvent (load) {
oilfield = "oil3";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 78
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 78
onClipEvent (load) {
ranges = 1;
baseunder = 0;
}
Instance of Symbol 501 MovieClip in Frame 78
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 78
onClipEvent (load) {
timer = 0;
_root.refinery1e = 1;
_root.comcentre1e = 1;
_root.warfactory1e = 1;
_root.pat1e = 1;
_root.pat2e = 1;
_root.array2 = [];
build = true;
rounds = 0;
_root.enemyoiltrucks = 0;
timer5 = 0;
}
onClipEvent (enterFrame) {
_root.sidebar.build.light.gotoAndStop(1);
_root.sidebar.build.oiltruck.gotoAndStop(1);
_root.sidebar.build.heavy.gotoAndStop(1);
_root.sidebar.build.dozer.gotoAndStop(1);
_root.sidebar.build.humvee.gotoAndStop(1);
_root.sidebar.build.artillery.gotoAndStop(1);
_root.sidebar.build.weaponsilo.gotoAndStop(1);
_root.sidebar.build.lasertank.gotoAndStop(1);
_root.sidebar.build.rocket.gotoAndStop(1);
timer++;
if (timer == 100) {
_root.enemypower = _root.enemypower + _root.difficulty;
timer5++;
if (_root.refinery1.life <= 0) {
_root.refinery1e = 0;
}
if (_root.comcentre1.life <= 0) {
_root.comcentre1e = 0;
}
if (_root.warfactorey1._currentframe > 2) {
_root.warfactory1e = 0;
}
if (_root.pat1.life <= 0) {
_root.pat1e = 0;
}
if (_root.pat2.life <= 0) {
_root.pat2e = 0;
}
if ((_root.enemyarray.length <= 0) || (Key.isDown(16))) {
var i = 10;
while (i > 0) {
_root["elite" + i]._visible = false;
i--;
}
_root.gotoAndStop("victory1");
}
if (_root.structurearray.length <= 0) {
_root.gotoAndStop("defeat1");
}
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if ((_root[current].unittype == "artillery") && (_root[current].turret._currentframe == 1)) {
_root[current].deploy();
}
if ((((_root[current].speed != undefined) && (!_root[current].fireing)) && ((_root[current]._y < _root.wall1._y) || (timer5 > 50))) && (_root[current].dummy._currentframe == 1)) {
pat = _root.structurearray[Math.floor(Math.random() * _root.structurearray.length)];
_root[current].aiattack(pat);
pat2 = _root.structurearray[0];
if ((_root[pat2].life <= 0) || (_root[pat2]._x == undefined)) {
_root.gotoAndStop("defeat");
break;
}
}
i--;
}
timer = 0;
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 78
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 79
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.missions++;
_root.tutoriall.removeMovieClip();
_root.box6.removeMovieClip();
stop();
Instance of Symbol 249 MovieClip in Frame 79
/* no clip actions */
Instance of Symbol 1199 MovieClip "ai" in Frame 79
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss3");
}
Frame 80
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 80
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss2");
}
Frame 81
stop();
Instance of Symbol 1323 MovieClip in Frame 81
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
gotoAndStop (85);
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 81
onClipEvent (load) {
info = "Country: France. \nPopulation 33 million. \n Control : US.\n Economy: Global Financial Hub";
words = "We have regained our main base. However our German and Italian counterparts aren't content with their loss of France. They intend to reinvade our main base. Commander, take control of our base and ward off their invading hordes.";
map = "map2";
}
Frame 82
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (50000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 1288 MovieClip "back" in Frame 82
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1082 MovieClip in Frame 82
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 82
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 83
_root.waves = 0;
_root.timert = 0;
_root.dialogue.gotoAndStop(9);
_root.attachMovie("mission2", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
var i = (buildary.length - 1);
while (i > -1) {
_root.sidebar.build[buildary[i]].buildrate = _root.sidebar.build[buildary[i]].buildrate * 0.5;
i--;
}
var i = (buildray.length - 1);
while (i > -1) {
_root.sidebar.build[buildray[i]].rates = _root.sidebar.build[buildray[i]].rates * 1.5;
i--;
}
Mouse.hide();
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 83
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 83
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 83
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 83
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1288 MovieClip "back" in Frame 83
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 562 MovieClip [warfactory] "warfactory1" in Frame 83
onClipEvent (load) {
if (_root.warfactoryle == 0) {
gotoAndStop (80);
}
}
Instance of Symbol 566 MovieClip [comcentre] "comcentre1" in Frame 83
onClipEvent (load) {
if (_root.comcentre1e == 0) {
gotoAndStop (80);
}
}
Instance of Symbol 928 MovieClip [patriotmiss] in Frame 83
onClipEvent (load) {
if (_root.pat1e == 0) {
gotoAndStop (80);
}
}
Instance of Symbol 928 MovieClip [patriotmiss] in Frame 83
onClipEvent (load) {
if (_root.pat2e == 0) {
gotoAndStop (80);
}
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 83
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig5" in Frame 83
onClipEvent (load) {
oilfield = "oil4";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 83
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 83
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 83
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1194 MovieClip "box" in Frame 83
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Instance of Symbol 1199 MovieClip "ai" in Frame 83
onClipEvent (load) {
timer = 0;
gather = [];
_root.waves = 7 * _root.difficulty;
attack = [];
refinery = false;
warfactory = false;
comcentrequeue = 0;
warfactoryqueue = 0;
currentrepairunit = undefined;
dozers = ["enemydozer1"];
oiltrucks = [];
attacktimer = 0;
_root.timert = 20 * (7 / _root.difficulty);
warfactorybuildteam4 = ["enemyrocket", "enemyrocket", "enemyrocket", "enemyrocket", "enemylight"];
warfactorybuildteam3 = ["enemyartillery", "enemyartillery", "enemyartillery", "enemyartillery", "enemylight"];
warfactorybuildteam2 = ["enemyhumvee", "enemyhumvee", "enemyhumvee", "enemyhumvee", "enemylight"];
warfactorybuildteam = ["enemylight", "enemylight", "enemylight", "enemylight", "enemyrocket"];
}
onClipEvent (enterFrame) {
if (!(_root.ownmap6 === true)) {
_root.sidebar.build.lasertank.gotoAndStop(1);
}
_root.timert = _root.timert - 0.05;
timer++;
warfactoryqueue++;
attacktimer++;
if ((_root.timert < 0) && (_root.waves > 0)) {
_root.timert = 20 * (4 / _root.difficulty);
_root.waves--;
i = 5;
while (i > 0) {
current = warfactorybuildteam2[0];
_root.attachMovie(current, current + _root.n, _root.n);
_root[current + _root.n]._x = _root.enemywarfactory1._x + _root.linex[i];
_root[current + _root.n]._y = _root.enemywarfactory1._y + _root.liney[i];
_root[current + _root.n]._rotation = 0;
_root[current + _root.n].attacks = true;
this.attack.push(current + _root.n);
_root.n++;
warfactorybuildteam2.splice(0, 1);
if (warfactorybuildteam2.length <= 0) {
warfactorybuildteam2 = ["enemyhumvee", "enemyhumvee", "enemyrocket", "enemylight", "enemyartillery"];
}
i--;
}
i = 5;
while (i > 0) {
current = warfactorybuildteam[0];
_root.attachMovie(current, current + _root.n, _root.n);
_root[current + _root.n]._x = _root.enemywarfactory2._x + _root.linex[i];
_root[current + _root.n]._y = _root.enemywarfactory2._y + _root.liney[i];
_root[current + _root.n]._rotation = 0;
_root[current + _root.n].attacks = true;
this.attack.push(current + _root.n);
_root.n++;
warfactorybuildteam.splice(0, 1);
if (warfactorybuildteam.length <= 0) {
warfactorybuildteam = ["enemylight", "enemyrocket", "enemyartillery", "enemyheavy", "enemyheavy"];
}
i--;
}
i = 5;
while (i > 0) {
current = warfactorybuildteam3[0];
_root.attachMovie(current, current + _root.n, _root.n);
_root[current + _root.n]._x = _root.enemywarfactory3._x + _root.linex[i];
_root[current + _root.n]._y = _root.enemywarfactory3._y + _root.liney[i];
_root[current + _root.n]._rotation = 0;
_root[current + _root.n].attacks = true;
this.attack.push(current + _root.n);
_root.n++;
warfactorybuildteam3.splice(0, 1);
if (warfactorybuildteam3.length <= 0) {
warfactorybuildteam3 = ["enemyrocket", "enemyrocket", "enemyhumvee", "enemylight", "enemyheavy"];
}
i--;
}
i = 5;
while (i > 0) {
current = warfactorybuildteam4[0];
_root.attachMovie(current, current + _root.n, _root.n);
_root[current + _root.n]._x = _root.enemywarfactory4._x + _root.linex[i];
_root[current + _root.n]._y = _root.enemywarfactory4._y + _root.liney[i];
_root[current + _root.n]._rotation = 0;
_root[current + _root.n].attacks = true;
this.attack.push(current + _root.n);
_root.n++;
warfactorybuildteam4.splice(0, 1);
if (warfactorybuildteam4.length <= 0) {
warfactorybuildteam4 = ["enemyrocket", "enemyrocket", "enemylight", "enemyheavy", "enemyheavy"];
}
i--;
}
warfactoryqueue = 0;
_root.waves--;
}
if (warfactoryqueue == 50) {
_root.enemypower = _root.enemypower + 10;
timer = 0;
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if ((_root[current].life <= 0) || (_root[current].life == undefined)) {
_root.enemyarray.splice(i, 1);
} else {
attackunit = "friendlylist";
units = _root[attackunit][Math.floor(Math.random() * _root.friendlylist.length)];
_root[current].aiattack(units);
}
i--;
}
}
if (_root.friendlylist.length <= 4) {
_root.gotoAndStop("defeat2");
}
if ((_root.waves == 0) && (_root.enemyarray.length <= 0)) {
_root.gotoAndStop("victory2");
}
}
Frame 84
movetozero();
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.warfactory1e = 0;
_root.refinery1e = 0;
_root.pat1e = 0;
_root.pat2e = 0;
_root.comcentre1e = 0;
_root.enemypower = _root.enemypower - 70;
_root.enemyattack = 0;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 84
onClipEvent (mouseUp) {
_root.gotoAndStop("miss4");
}
Instance of Symbol 249 MovieClip in Frame 84
/* no clip actions */
Frame 85
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 85
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss3");
}
Frame 86
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
if (_root.loadings === true) {
share = SharedObject.getLocal("save");
p = 9;
while (p > 1) {
_root["ownmap" + p] = share.data["ownmap" + p];
_root.missions = share.data.missions;
_root[("map" + p) + "array"] = share.data[("map" + p) + "array"].concat();
i = share.data[("map" + p) + "array"].length - 1;
while (i > -1) {
current = share.data[("map" + p) + "array"][i];
trace(current + "blackcurrane");
trace(share.data[current].fulllife + current);
if (share.data[current + "obj"] == undefined) {
current2 = current;
current = current + ("map" + p);
trace(current + "current");
trace(current2 + "current2");
}
_root[current + "obj"] = share.data[current + "obj"];
trace(_root[current + "obj"].fulllife + current);
_root.enemypower = share.data.enemypower;
_root.money = share.data.money;
trace(_root.money + "mummy");
_root.difficulty = share.data.difficulty;
_root.loadings = undefined;
_root.gotoAndStop("mapbar");
i--;
}
p--;
}
}
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
_global.movetozero = function () {
var _local4 = _root.back._x;
var _local5 = _root.back._y;
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
var _local3 = _root[current]._x;
var _local2 = _root[current]._y;
_root[current]._x = _local3 - _local4;
_root[current]._y = _local2 - _local5;
i--;
}
_root.back._x = 0;
_root.back._y = 0;
};
_global.movetoloc = function (x, y) {
xb = _root.back._x;
yb = _root.back._y;
_root.box6._x = x1 + (constantx * (x - xb));
_root.box6._y = y1 + (constanty * (y - yb));
_root.back._x = _root.back._x - (x - xb);
_root.back._y = _root.back._y - (y - yb);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x - xb);
_root[current]._y = _root[current]._y - (y - yb);
i--;
}
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = 0;
_root.enemypower = 0;
_root.enemymoney = 30000;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_root.attackarray = [];
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
_root.ownmap4 = false;
Instance of Symbol 811 MovieClip "back" in Frame 86
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 87
_root.sidebar.mapp.gotoAndStop(5);
_root.dialogue.gotoAndStop(6);
_root.attachMovie("mission", "tutoriall", 1000900);
_root.tutoriall._x = 46.8;
_root.tutoriall._y = 10.9;
Mouse.hide();
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 87
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 87
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 87
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 15;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 87
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 15;
i--;
}
}
}
}
Instance of Symbol 811 MovieClip "back" in Frame 87
onClipEvent (load) {
}
Instance of Symbol 1152 MovieClip "burton" in Frame 87
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 87
onClipEvent (load) {
ranges = 2;
baseunder = 0;
}
Instance of Symbol 501 MovieClip in Frame 87
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 87
onClipEvent (load) {
timer = 0;
build = true;
rounds = 0;
_root.enemyoiltrucks = 0;
timer5 = 0;
}
onClipEvent (enterFrame) {
_root.sidebar.build.light.gotoAndStop(1);
_root.sidebar.build.oiltruck.gotoAndStop(1);
_root.sidebar.build.heavy.gotoAndStop(1);
_root.sidebar.build.dozer.gotoAndStop(1);
_root.sidebar.build.humvee.gotoAndStop(1);
_root.sidebar.build.artillery.gotoAndStop(1);
_root.sidebar.build.weaponsilo.gotoAndStop(1);
_root.sidebar.build.lasertank.gotoAndStop(1);
_root.sidebar.build.rocket.gotoAndStop(1);
timer++;
if (timer == 100) {
_root.enemypower = _root.enemypower + _root.difficulty;
timer5++;
if (_root.refinery1.life <= 0) {
_root.refinery1e = 0;
}
if (_root.comcentre1.life <= 0) {
_root.comcentre1e = 0;
}
if (_root.warfactorey1._currentframe > 2) {
_root.warfactory1e = 0;
}
if (_root.pat1.life <= 0) {
_root.pat1e = 0;
}
if (_root.pat2.life <= 0) {
_root.pat2e = 0;
}
if ((_root.enemyarray.length <= 0) || (Key.isDown(16))) {
var i = 10;
while (i > 0) {
_root["elite" + i]._visible = false;
i--;
}
_root.gotoAndStop("victory1b");
}
if (_root.structurearray.length <= 0) {
_root.gotoAndStop("defeat1b");
}
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if ((_root[current].unittype == "artillery") && (_root[current].turret._currentframe == 1)) {
_root[current].deploy();
}
if ((((_root[current].speed != undefined) && (!_root[current].fireing)) && ((_root[current]._y < _root.wall1._y) || (timer5 > 50))) && (_root[current].dummy._currentframe == 1)) {
pat = _root.structurearray[Math.floor(Math.random() * _root.structurearray.length)];
_root[current].aiattack(pat);
pat2 = _root.structurearray[0];
if ((_root[pat2].life <= 0) || (_root[pat2]._x == undefined)) {
_root.gotoAndStop("defeat1b");
break;
}
}
i--;
}
timer = 0;
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 87
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 88
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.missions++;
_root.tutoriall.removeMovieClip();
_root.box6.removeMovieClip();
stop();
Instance of Symbol 249 MovieClip in Frame 88
/* no clip actions */
Instance of Symbol 1199 MovieClip "ai" in Frame 88
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss3");
}
Frame 89
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 89
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss2");
}
Frame 90
stop();
Instance of Symbol 1323 MovieClip in Frame 90
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
gotoAndStop ("miss4");
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 90
onClipEvent (load) {
info = "Country: West Germany. \nPopulation 54 million. \n Control : Enemy.\n Economy: Major Education Centre";
words = "Sources say that the Germans and Italians are cooperating to channel oil, dozers and units via a convoy on a major highway in this sector. They plan to launch an attack on Britain with these resources. This convoy must not be allowed to reach Dunkirk or the Germans will have the upper hand in conquering Britain. Commander, take a team of dozers and build a base near the highway. We will ambush the convoy when the time is ripe and destroy it.Britain is counting on you, commander!";
map = "map4";
if (_root.map4bcomplete == undefined) {
_root.map4bcomplete = false;
}
}
Instance of Symbol 1332 MovieClip "shader1" in Frame 90
onClipEvent (load) {
info = "Country: Austria/Italy. \nPopulation N/A. \n Control : Enemy.\n Economy: Business Sector. Battlefield Coditions : Small bases with structures scattered about the region.";
words = "Sources say that Germany and Italy are planning to destroy our bases in Britain.We must not let this happen. A convoy is passing through this supply base carrying resources to support their war effort. Commander, take a small force and attempt to capture the supply base. If sucessful, we can drastically reduce the size of their convoy which will make it easier for us to destroy it in the next mission.";
map = "map4b";
if (_root.map4bcomplete) {
gotoAndStop ("complete");
this._visible = false;
}
}
Frame 91
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
_global.movetozero = function () {
var _local4 = _root.back._x;
var _local5 = _root.back._y;
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
var _local3 = _root[current]._x;
var _local2 = _root[current]._y;
_root[current]._x = _local3 - _local4;
_root[current]._y = _local2 - _local5;
i--;
}
_root.back._x = 0;
_root.back._y = 0;
};
_global.movetoloc = function (x, y) {
xb = _root.back._x;
yb = _root.back._y;
_root.box6._x = x1 + (constantx * (x - xb));
_root.box6._y = y1 + (constanty * (y - yb));
_root.back._x = _root.back._x - (x - xb);
_root.back._y = _root.back._y - (y - yb);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x - xb);
_root[current]._y = _root[current]._y - (y - yb);
i--;
}
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = ["rallypoint"];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = 0;
_root.enemypower = 0;
_root.enemymoney = 30000;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_root.attackarray = [];
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
_root.ownmap4 = false;
Instance of Symbol 815 MovieClip "back" in Frame 91
onClipEvent (load) {
}
Instance of Symbol 1082 MovieClip in Frame 91
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 91
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 92
_root.sidebar.mapp.gotoAndStop(7);
_root.dialogue.gotoAndStop(11);
_root.dialogue._visible = true;
_root.attachMovie("mission3", "tutoriall", 1000900);
_root.tutoriall._x = 46.8;
_root.tutoriall._y = 10.9;
Mouse.hide();
_root.money = 100000 / _root.difficulty;
_root.scrolla = true;
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 92
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 92
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 92
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 15;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 92
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 15;
i--;
}
}
}
}
Instance of Symbol 815 MovieClip "back" in Frame 92
onClipEvent (load) {
}
Instance of Symbol 1152 MovieClip "burton" in Frame 92
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 92
onClipEvent (load) {
ranges = 2;
baseunder = 0;
}
Instance of Symbol 501 MovieClip in Frame 92
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 92
onClipEvent (load) {
oilfield = "oil5";
_root.objarray.push(this._name);
}
Instance of Symbol 1199 MovieClip "ai" in Frame 92
onClipEvent (load) {
_root.guyzarray = [];
timer = 200;
numberleft = 50 * _root.difficulty;
if (_root.map4bcomplete === true) {
numberleft = numberleft * 0.5;
timer = timer - 70;
}
passed = 0;
attacktimer = 0;
numberlimit = 20 / _root.difficulty;
numbergo = 0;
timert = 100 / _root.difficulty;
this.createobj2 = function () {
a = Math.random() * 1.5;
if ((a > 0) && (a < 0.3)) {
unittype = "enemylight";
}
if ((a > 0.3) && (a < 0.5)) {
unittype = "enemyrocket";
}
if ((a > 0.5) && (a < 0.6)) {
unittype = "enemyheavy";
}
if ((a > 0.6) && (a < 0.9)) {
unittype = "enemyhumvee";
}
if ((a > 0.9) && (a < 1.5)) {
unittype = "enemyoiltruck";
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
var _local2 = Math.ceil(Math.random() * 5);
_root[unittype + _root.n].walking = true;
_root[unittype + _root.n]._x = _root["reinforcement" + _local2]._x;
_root[unittype + _root.n]._y = _root["reinforcement" + _local2]._y;
_root[unittype + _root.n]._rotation = 0;
_root.guyzarray.push(unittype + _root.n);
unittype = undefined;
_root.n++;
numberleft--;
};
this.applyobj = function () {
var _local2 = _root.guyzarray.length - 1;
while (_local2 > -1) {
current = _root.guyzarray[_local2];
if (!_root[current].walking) {
_root[current].aigoto(_root[current]._x, _root.centre2._y);
}
if (_root[current].life == undefined) {
_root.guyzarray.splice(_local2, 1);
}
if (_root[current]._y < (_root.centre2._y + 50)) {
_root[current]._visible = false;
_root[current].life = 0;
_root.guyzarray.splice(_local2, 1);
numbergo++;
}
_local2--;
}
};
}
onClipEvent (enterFrame) {
timer = timer - 0.05;
_root.dialogue.seconds = timer;
if (Math.round(timer) == 0) {
_root.dialogue.gotoAndStop(12);
}
if (timer < 0) {
attacktimer++;
if (attacktimer == Math.round(timert)) {
if (numberleft > 0) {
createobj2();
}
}
if (attacktimer == (Math.round(timert) + 1)) {
applyobj();
attacktimer = 0;
}
}
if (!(_root.ownmap6 === true)) {
_root.sidebar.build.lasertank.gotoAndStop(1);
}
if (numbergo > numberlimit) {
_root.gotoAndStop("defeat4");
}
if (numbergo == Math.round(numberlimit * 0.666666666666667)) {
_root.dialogue.gotoAndStop("sir");
}
if ((numberleft <= 0) && (_root.enemyarray.length <= 0)) {
_root.gotoAndStop("victory4");
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 92
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 93
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if (_root[name]._visible) {
_root[name].removeMovieClip();
}
}
}
_root.missions++;
_root.tutoriall.removeMovieClip();
_root.box6.removeMovieClip();
stop();
Instance of Symbol 249 MovieClip in Frame 93
/* no clip actions */
Instance of Symbol 1199 MovieClip "ai" in Frame 93
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss5");
}
Frame 94
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 94
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss4");
}
Frame 95
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.array1 = [];
_root.rallylist = [];
_root.enemyrallylist = [];
MovieClip.prototype.aiattack = function (what) {
current2 = what;
if (_root[current2]._x != undefined) {
current = this._name;
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = _root[current2]._x;
_root["flag" + current]._y = _root[current2]._y;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
};
MovieClip.prototype.aigoto = function (x1, y1, lock) {
current = this._name;
_root[current].attack = false;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
if ((!lock) || (lock == undefined)) {
_root["flag" + current]._x = x1;
_root["flag" + current]._y = y1;
}
if (lock) {
_root["flag" + current]._x = x1 + _root.back._x;
_root["flag" + current]._y = y1 + _root.back._y;
}
_root["flag" + current].vsisible = false;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
};
Array.prototype.arrayfind = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched = this[_local3];
if (_root[elementsearched].unittype == element) {
_local4 = true;
break;
}
_local3--;
}
return(_local4);
};
Array.prototype.arrayfindfirst = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findsfirst = function (element) {
var _local4 = false;
var _local3 = this.length - 1;
while (_local3 > -1) {
elementsearched2 = this[_local3];
if (_root[elementsearched2].unittype == element) {
_local4 = elementsearched2;
break;
}
_local3--;
}
return(_local4);
};
MovieClip.prototype.movesym = function () {
_root[this._name + "symbols"]._x = (x1 + ((this._x - _root.back._x) * constantx)) - 10;
_root[this._name + "symbols"]._y = (y1 + ((this._y - _root.back._y) * constanty)) - 10;
};
_root.timer = 6999;
_root.limit = 1200;
Array.prototype.countduplicate = function (element) {
var _local3 = 0;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3++;
}
_local2--;
}
return(_local3);
};
_global.movetozero = function () {
var _local4 = _root.back._x;
var _local5 = _root.back._y;
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
var _local3 = _root[current]._x;
var _local2 = _root[current]._y;
_root[current]._x = _local3 - _local4;
_root[current]._y = _local2 - _local5;
i--;
}
_root.back._x = 0;
_root.back._y = 0;
};
_global.movetoloc = function (x, y) {
xb = _root.back._x;
yb = _root.back._y;
_root.box6._x = x1 + (constantx * (x - xb));
_root.box6._y = y1 + (constanty * (y - yb));
_root.back._x = _root.back._x - (x - xb);
_root.back._y = _root.back._y - (y - yb);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x - xb);
_root[current]._y = _root[current]._y - (y - yb);
i--;
}
};
Array.prototype.arrayfind = function (element) {
var _local3 = false;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = true;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.finds = function (element) {
var _local3 = -1;
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
_local3 = _local2;
break;
}
_local2--;
}
return(_local3);
};
Array.prototype.findandsplice = function (element) {
var _local2 = this.length - 1;
while (_local2 > -1) {
elementsearched = this[_local2];
if (elementsearched == element) {
this.splice(_local2, 1);
break;
}
_local2--;
}
};
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = 0;
_root.enemypower = 0;
_root.enemymoney = 30000;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_root.attackarray = [];
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
_root.enemyturret1 = false;
_root.enemyturret2 = false;
_root.enemyturret3 = false;
_root.enemyturret4 = false;
_root.enemyturret5 = false;
_root.n = 1000;
_root.ownmap4 = false;
Instance of Symbol 1471 MovieClip "back" in Frame 95
onClipEvent (load) {
}
Frame 96
_root.sidebar.mapp.gotoAndStop(5);
_root.dialogue.gotoAndStop(16);
_root.attachMovie("mission5", "tutoriall", 1000900);
_root.tutoriall._x = 46.8;
_root.tutoriall._y = 10.9;
_root.oilarray.push("enemyservicedepot1");
Mouse.hide();
_root.money = 1000;
stop();
_root.scrolla = true;
stop();
Instance of Symbol 1135 MovieClip in Frame 96
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 96
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 15;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 96
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 15;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 15;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 96
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 15;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 15;
i--;
}
}
}
}
Instance of Symbol 1471 MovieClip "back" in Frame 96
onClipEvent (load) {
}
Instance of Symbol 1152 MovieClip "burton" in Frame 96
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 96
onClipEvent (load) {
ranges = 2;
baseunder = 0;
}
Instance of Symbol 501 MovieClip in Frame 96
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1194 MovieClip "box" in Frame 96
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if ((((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) && (_root.scrolla)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
hitunit = false;
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if ((((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) && (_root[current].speed != undefined)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Instance of Symbol 1199 MovieClip "ai" in Frame 96
onClipEvent (load) {
timer = 0;
build = true;
_root.guyzarray = [];
mines = false;
hitten = false;
rounds = 0;
gd = false;
_root.enemyoiltrucks = 0;
timer5 = 0;
this.createobj2 = function () {
a = Math.random() * 1.5;
if ((a > 0) && (a < 0.3)) {
unittype = "enemylight";
}
if ((a > 0.3) && (a < 0.5)) {
unittype = "enemyrocket";
}
if ((a > 0.5) && (a < 0.6)) {
unittype = "enemydozer";
}
if ((a > 0.6) && (a < 0.9)) {
unittype = "enemyhumvee";
}
if ((a > 0.9) && (a < 1.5)) {
unittype = "enemyoiltruck";
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
var _local2 = Math.ceil(Math.random() * 3);
_root[unittype + _root.n].walking = true;
_root[unittype + _root.n]._x = _root["reinforcement" + _local2]._x + (a * 100);
_root[unittype + _root.n]._y = _root["reinforcement" + _local2]._y;
_root[unittype + _root.n].convoy = true;
_root.guyzarray.push(unittype + _root.n);
unittype = undefined;
_root.n++;
};
this.applyobj = function () {
var _local2 = _root.enemyarray.length - 1;
while (_local2 > -1) {
current = _root.enemyarray[_local2];
if (_root[current].convoy && (!_root[current].walking)) {
_root[current].aggressive = false;
_root[current].aigoto(_root[current]._x, _root.enemyservicedepot1._y);
}
_local2--;
}
};
}
onClipEvent (enterFrame) {
timer++;
timer5++;
if (timer == 300) {
timer = 0;
i = _root.enemyturretarray.length - 1;
while (i > -1) {
current = _root.enemyturretarray[i];
trace(current);
trace(_root[current].turret._currentframe + "currentframe");
if ((_root[current].turret._currentframe > 3) && (_root[current].turret._currentframe != undefined)) {
_root.dialogue.gotoAndPlay("hey");
break;
}
i--;
}
}
if ((timer5 > (4000 / _root.difficulty)) && (!gd)) {
_root.dialogue.gotoAndStop("coming");
gd = true;
}
if (!hitten) {
n = _root.minearray.length - 1;
while (n > -1) {
current = _root.minearray[n];
_root[current].gotoAndStop(2);
n--;
}
if ((_root.minearray.length > 0) && (!mines)) {
_root.dialogue.gotoAndPlay("mines");
mines = true;
}
}
if (timer == 20) {
trace(_root.enemies.isfree() + "free");
if (_root.enemies.isfree() === true) {
hitten = true;
n = _root.minearray.length - 1;
while (n > -1) {
current = _root.minearray[n];
if (_root[current].hitTest(_root.enemyservicedepot1)) {
_root[current].play();
}
n--;
}
}
}
if (hitten) {
n = _root.minearray.length - 1;
if (n > -1) {
current = _root.minearray[n];
if (_root[current]._currentframe > 30) {
c = _root.enemies.members.length - 1;
while (c > -1) {
current2 = _root.enemies.members[c];
_root[current2].life = 0;
_root.gotoAndStop("victory4b");
c--;
}
}
}
}
}
Frame 97
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.missions++;
_root.map4bcomplete = true;
_root.tutoriall.removeMovieClip();
_root.box6.removeMovieClip();
stop();
Instance of Symbol 249 MovieClip in Frame 97
/* no clip actions */
Instance of Symbol 1199 MovieClip "ai" in Frame 97
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss4");
}
Frame 98
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Frame 99
stop();
Instance of Symbol 1323 MovieClip in Frame 99
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
gotoAndStop ("miss5");
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 99
onClipEvent (load) {
info = "Country: Scotland. \nPopulation 20 million. \n Control : US.\n Economy: Tourist Attraction";
words = "Even without the convoy, the Germans have managed to further their conquest of Britain. As a result, our forces are retreating to the north of Scotland where they are trapped. Commander, we have managed to capture a port in nearby Norway.Defend the base from enemy invasions until amphibious APCs can arrive from the coast and evacuate what troops we have left. We're counting on you commander!";
map = "map5";
}
Frame 100
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = ["rallypoint"];
_root.num = 0;
_root.apcarray = [];
_root.allyarray = [];
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (10000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 822 MovieClip "back" in Frame 100
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1082 MovieClip in Frame 100
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 100
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 101
_root.sidebar.mapp.gotoAndStop(11);
_root.dialogue._visible = true;
_root.dialogue.gotoAndStop(24);
_root.attachMovie("mission6", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
var i = (buildary.length - 1);
while (i > -1) {
_root.sidebar.build[buildary[i]].buildrate = _root.sidebar.build[buildary[i]].buildrate * 0.5;
i--;
}
var i = (buildray.length - 1);
while (i > -1) {
_root.sidebar.build[buildray[i]].rates = _root.sidebar.build[buildray[i]].rates * 1.5;
i--;
}
Mouse.hide();
_root.scrolla = true;
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 101
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 101
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 101
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 101
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 822 MovieClip "back" in Frame 101
/* no clip actions */
Instance of Symbol 1150 MovieClip "rig11" in Frame 101
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig5" in Frame 101
onClipEvent (load) {
oilfield = "oil4";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 101
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 101
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 101
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 101
onClipEvent (load) {
timer = 0;
oiltrucks = [];
timert = 100 / _root.difficulty;
timert2 = 1000 * _root.difficulty;
numbersaved = 0;
timer2 = 0;
this.createobj2 = function () {
trace("createobj");
a = Math.random();
if ((a > 0) && (a < 0.3)) {
unittype = "enemylight";
}
if ((a > 0.3) && (a < 0.5)) {
unittype = "enemyrocket";
}
if ((a > 0.5) && (a < 0.6)) {
unittype = "enemyheavy";
}
if ((a > 0.6) && (a < 0.8)) {
unittype = "enemyhumvee";
}
if ((a > 0.8) && (a < 1)) {
unittype = "enemyartillery";
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
var _local2 = Math.ceil(Math.random() * 5);
_root[unittype + _root.n]._x = _root["point" + _local2]._x;
_root[unittype + _root.n]._y = _root["point" + _local2]._y;
_root[unittype + _root.n].point = _local2;
_root.n++;
};
this.applyobj = function () {
var _local2 = _root.enemyarray.length - 1;
while (_local2 > -1) {
current = _root.enemyarray[_local2];
_root[current].point = Math.ceil(Math.random() * 5);
trace(_root[current].point + "point2");
if (_root[current].point == 3) {
trace("attackcom");
_root[current].aiattack("comcentre1");
}
if (_root[current].point == 2) {
nop = Math.floor(Math.random() * _root.friendlylist.length);
toattack = _root.friendlylist[nop];
if (_root[toattack]._x != undefined) {
_root[current].aiattack(toattack);
}
}
if (_root[current].point == 1) {
nop = Math.floor(Math.random() * _root.apcarray.length);
toattack = _root.apcarray[nop];
x = _root[toattack]._x;
y = _root[toattack]._y;
if (!_root.back.water.hitTest(x, y, true)) {
_root[current].aiattack(toattack);
} else {
_root[current].point = 4;
}
}
if (_root[current].point == 4) {
nop = Math.floor(Math.random() * _root.friendlylist.length);
toattack = _root.friendlylist[nop];
if (_root[toattack]._x != undefined) {
_root[current].aiattack(toattack);
}
}
if (_root[current].point == 5) {
nop = Math.floor(Math.random() * _root.allyarray.length);
toattack = _root.allyarray[nop];
if (_root[toattack]._x != undefined) {
_root[current].aiattack(toattack);
}
}
_local2--;
}
};
}
onClipEvent (enterFrame) {
if (!(_root.ownmap6 === true)) {
_root.sidebar.build.lasertank.gotoAndStop(1);
}
timer++;
timer2++;
if (timer == Math.round(timert)) {
n = _root.apcarray.length - 1;
while (n > -1) {
currenty = _root.apcarray[n];
if (_root[currenty].hitTest(_root.dropin)) {
_root[currenty]._visible = false;
_root[currenty].dummy.gotoAndPlay(_root[currenty].dummy._totalframes - 1);
_root[currenty].life = 0;
}
n--;
}
createobj2();
i = _root.allyarray.length - 1;
while (i > 0) {
currenty2 = _root.allyarray[i];
_root[currenty2].aggressive = false;
i--;
}
n = _root.apcarray.length - 1;
while (n > -1) {
currenty = _root.apcarray[n];
if (_root[currenty].hitTest(_root.dropoff)) {
currentapc = currenty;
trace(currentapc + "apc");
break;
}
n--;
}
if ((_root[currentapc].life > 0) && (_root[currentapc].life != undefined)) {
numberon = 0;
i = _root.allyarray.length - 1;
while (i > 0) {
currenty2 = _root.allyarray[i];
if (numberon > 1) {
_root[currentapc].aigoto(_root.dropin._x, _root.dropin._y);
break;
}
if (_root[currenty2].hitTest(_root.dropoff)) {
numberon++;
_root[currenty2]._visible = false;
_root[currenty2].life = 0;
currentapc = undefined;
_root[currenty2].dummy.gotoAndPlay(_root[currenty2].dummy._totalframes - 1);
numbersaved++;
}
i--;
}
}
}
if (timer == (Math.round(timert) + 3)) {
applyobj();
timer = 0;
}
if (timer2 == Math.round(timert2)) {
_root.dialogue.gotoAndStop("inbound");
_root.attachMovie("apc", "apc" + _root.n, _root.n);
_root["apc" + _root.n]._x = _root.transportpoint._x;
_root["apc" + _root.n]._y = _root.transportpoint._y;
_root.n++;
i = numbersaved + 2;
while (i > numbersaved) {
currenty2 = _root.allyarray[i];
_root[currenty2].aggressive = false;
_root[currenty2].aigoto(_root.dropoff._x, _root.dropoff._y);
_root[currenty2].apc = true;
i--;
}
timer2 = 0;
}
trace(_root.comcentre1.life + "length");
if (_root.comcentre1.life <= 0) {
_root.gotoAndStop("defeat5");
}
if (numbersaved > 9) {
_root.gotoAndStop("victory5");
} else if (_root.allyarray.length <= 0) {
_root.gotoAndStop("defeat5");
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 101
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 102
movetozero();
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.warfactory1e = 0;
_root.refinery1e = 0;
_root.pat1e = 0;
_root.pat2e = 0;
_root.comcentre1e = 0;
_root.enemypower = _root.enemypower - 70;
_root.enemyattack = 0;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 102
onClipEvent (mouseUp) {
_root.gotoAndStop("miss6");
}
Instance of Symbol 249 MovieClip in Frame 102
/* no clip actions */
Frame 103
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 103
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss5");
}
Frame 104
_root.sidebar.removeMovieClip();
stop();
Instance of Symbol 1323 MovieClip in Frame 104
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
gotoAndStop ("miss6");
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 104
onClipEvent (load) {
info = "Country: Russia. \nPopulation 150 million. \n Control : Enemy.\n Economy: Nuclear Weapon Supplier";
words = "Commander, Britain has fallen. But the enemy is losing territories as well as their once strong position in the war.Hence, they are resorting to unconventional warfare to achieve their goals. We have heard of a few Russian scientists researching on a new prototype tank which is rumoured almost invincible in warfare.Investigate these claims. You will be provided with a few humvees smuggled into Russian territory for this mission. Infiltrate their technology centre and steal their readouts on the new tank. That is all. ";
map = "map6";
}
Frame 105
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (50000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 1481 MovieClip "back" in Frame 105
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1082 MovieClip in Frame 105
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 105
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 106
_root.dialogue.gotoAndStop(30);
_root.dialogue._visible = true;
_root.waves = 0;
_root.timert = 0;
_root.attachMovie("mission7", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
var i = (buildary.length - 1);
while (i > -1) {
_root.sidebar.build[buildary[i]].buildrate = _root.sidebar.build[buildary[i]].buildrate * 0.5;
i--;
}
var i = (buildray.length - 1);
while (i > -1) {
_root.sidebar.build[buildray[i]].rates = _root.sidebar.build[buildray[i]].rates * 1.5;
i--;
}
Mouse.hide();
_root.scrolla = true;
stop();
stop();
Instance of Symbol 1135 MovieClip in Frame 106
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 106
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 106
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 106
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1481 MovieClip "back" in Frame 106
onClipEvent (load) {
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 106
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 106
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 106
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 106
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 106
onClipEvent (load) {
timert = 1000 / _root.difficulty;
timer = 0;
guyz = [];
refhit = flase;
help = false;
}
onClipEvent (enterFrame) {
if (_root.dialogue._currentframe < 41) {
if (!refhit) {
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(_root.ref)) {
_root.dialogue.gotoAndStop("refinery");
refhit = true;
break;
}
i--;
}
}
if (!help) {
if (_root.enemyrefinery1.life < _root.enemyrefinery1.fulllife) {
_root.dialogue.gotoAndStop("help");
help = true;
}
}
if (help) {
timer++;
if (timer > timert) {
timer = 0;
_root.dialogue.gotoAndStop("no have");
help = false;
}
if (_root.enemyrefinery1.life >= _root.enemyrefinery1.fulllife) {
} else {
_root.enemyrefinery1.auto.play();
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(_root.tech1)) {
_root.dialogue.gotoAndStop("extract");
currenthumvee = current;
break;
}
i--;
}
if (_root.dialogue._currentframe == 40) {
if (!_root[currenthumvee].hitTest(_root.tech1)) {
_root.dialogue.gotoAndStop(31);
}
}
if (_root.friendlylist.length < 8) {
_root.gotoAndStop("defeat6nn");
}
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 106
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 107
movetozero();
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.warfactory1e = 0;
_root.refinery1e = 0;
_root.pat1e = 0;
_root.pat2e = 0;
_root.comcentre1e = 0;
_root.enemypower = _root.enemypower - 70;
_root.enemyattack = 0;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 107
onClipEvent (mouseUp) {
_root.gotoAndStop("miss7");
}
Instance of Symbol 249 MovieClip in Frame 107
/* no clip actions */
Frame 108
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 108
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss6");
}
Frame 109
if ((_root.map7acomplete == undefined) && (_root.map7bcomplete == undefined)) {
_root.map7acomplete = false;
_root.map7bcomplete = false;
}
_root.sidebar.removeMovieClip();
_root.friendlies = undefined;
_root.guards = undefined;
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1323 MovieClip in Frame 109
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
gotoAndStop ("miss7");
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader1" in Frame 109
onClipEvent (load) {
info = "Country: Latvia. \nPopulation 7 million. \n Control : Neutral.\n Economy: Food production";
words = " There is word that the enemy is planning to use their new prototype laser tank to destroy the people in these countries. We have set up temporary protection zones to prevent the enemy's advance into their countries. Unfortunately, our conventional tanks are no match for their new prototype, so desperate measures must be taken to destroy them. Commander, a column of laser tanks is on the rampage destroying buildings in Latvia.Intelligence reports that one way to deal with the tanks is to short circuit their engines via EMP cannons.Take a bunch of EMP artillery and attempt to lure the column to our base. There , will will disable and destroy these behemoths.Good luck commander.";
map = "map7a";
if ((_root.map7acomplete === true) || (_root.map7bcomplete === true)) {
this.gotoAndStop("complete");
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 109
onClipEvent (load) {
info = "Country: Belarus. \nPopulation 26 million. \n Control : Neutral.\n Economy: Russian Support";
words = "Commander,intelligence reports on a laser tank production facility in this region. The facility mass produces the feared laser tanks in the enemy's arsenal. To deal with the threat, the facility must be destroyed. Owing to the facility being guarded by laser tanks, a direct invasion is impossible.Build a Weapons silo. Use the nuclear missiles to destroy the facility. ";
map = "map7";
if (_root.map7acomplete === true) {
words = "Commander,intelligence reports on a laser tank production facility in this region. The facility mass produces the feared laser tanks in the enemy's arsenal. To deal with the threat, the facility must be destroyed. As the column of laser tanks guarding the facility has been destroyed in recent campaigns, it is now possible and necessary to approach the facility directly using our conventional forces. Commander, wipe the facility out, along with all their prototypes";
}
if (_root.map7bcomplete === true) {
words = "Commander,intelligence reports on a laser tank production facility in this region. The facility mass produces the feared laser tanks in the enemy's arsenal. To deal with the threat, the facility must be destroyed. In recent campaigns we have suceeded in capturing their column of laser tanks intended to guard the base. Use these tanks to wreck havoc on their installations and destroy the facility. No further backup is required and enlisted. Good Luck COmmander.";
}
}
Instance of Symbol 1332 MovieClip "shader0" in Frame 109
onClipEvent (load) {
info = "Country: Ukraine. \nPopulation 44 million. \n Control : Neutral.\n Economy: Fishing Industry.";
words = "Espionage activity by the rebels in enemy Ukraine have managed to obtain the control codes for the robotic laser tanks invading Ukraine. If we obtain them and transmit them to the three Laser Tnak control facility, we may be able to gain control of their tanks and sustain a direct attack on their production facility in Belarus.This will greatly aid us in the campaign against the laser tank threats in this region.";
map = "map7b";
if ((_root.map7acomplete === true) || (_root.map7bcomplete === true)) {
this.gotoAndStop("complete");
}
}
Frame 110
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (50000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 1274 MovieClip "back" in Frame 110
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1082 MovieClip in Frame 110
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 110
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 111
_root.dialogue.gotoAndStop(47);
_root.waves = 0;
_root.timert = 0;
_root.attachMovie("mission8", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
var i = (buildary.length - 1);
while (i > -1) {
_root.sidebar.build[buildary[i]].buildrate = _root.sidebar.build[buildary[i]].buildrate * 0.5;
i--;
}
var i = (buildray.length - 1);
while (i > -1) {
_root.sidebar.build[buildray[i]].rates = _root.sidebar.build[buildray[i]].rates * 1.5;
i--;
}
Mouse.hide();
_root.scrolla = true;
stop();
_root.money = 150000 / _root.difficulty;
stop();
Instance of Symbol 1135 MovieClip in Frame 111
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 111
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 111
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 111
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1274 MovieClip "back" in Frame 111
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1152 MovieClip "burton" in Frame 111
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1063 MovieClip in Frame 111
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 111
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 111
onClipEvent (enterFrame) {
if (!(_root.ownmap6 === true)) {
_root.sidebar.build.lasertank.gotoAndStop(1);
}
empdestroyed = false;
i = 5;
while (i > 0) {
if ((_root["laser" + i].life < 7500) && (incoming == undefined)) {
_root.dialogue.gotoAndStop("incoming");
incoming = true;
}
if (_root["em" + i].life > 0) {
empdestroyed = true;
}
i--;
}
if ((_root.friendlylist.length <= 0) || (!empdestroyed)) {
_root.gotoAndStop("defeat7a");
}
if (_root.enemyarray.length <= 0) {
_root.gotoAndStop("victory7a");
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 111
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 112
movetozero();
_root.map7acomplete = true;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 112
onClipEvent (mouseUp) {
_root.gotoAndStop("miss7");
}
Instance of Symbol 249 MovieClip in Frame 112
/* no clip actions */
Frame 113
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 113
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss7");
}
Frame 114
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (50000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 818 MovieClip "back" in Frame 114
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 115
_root.dialogue.gotoAndStop(53);
_root.dialogue._visible = true;
_root.waves = 0;
_root.timert = 0;
_root.attachMovie("mission9", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
var i = (buildary.length - 1);
while (i > -1) {
_root.sidebar.build[buildary[i]].buildrate = _root.sidebar.build[buildary[i]].buildrate * 0.5;
i--;
}
var i = (buildray.length - 1);
while (i > -1) {
_root.sidebar.build[buildray[i]].rates = _root.sidebar.build[buildray[i]].rates * 1.5;
i--;
}
Mouse.hide();
_root.scrolla = true;
stop();
_root.money = 150000 / _root.difficulty;
stop();
Instance of Symbol 1135 MovieClip in Frame 115
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 115
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 115
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 115
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 818 MovieClip "back" in Frame 115
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1152 MovieClip "burton" in Frame 115
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 115
onClipEvent (load) {
oilfield = "oil5";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 115
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1063 MovieClip in Frame 115
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 115
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 115
onClipEvent (load) {
function convert(what, to) {
x = _root[what]._x;
y = _root[what]._y;
life = _root[what].life;
fulllife = _root[what].fulllife;
speed = _root[what].speed;
_root[what]._visible = false;
_root[what].life = 0;
_root.attachMovie("lasertank", "lasertank" + _root.n, _root.n);
_root["lasertank" + _root.n]._x = x;
_root["lasertank" + _root.n]._y = y;
nop = _root.n;
_root.n++;
lasertank = true;
}
timer = 0;
_root.guide.ally = true;
hit = true;
_root.guide.dummy.empulse = -10;
_root.guide.aggressive = false;
_root.guide.life = 1000;
_root.guide.fulllife = 1000;
}
onClipEvent (enterFrame) {
if (lasertank == true) {
_root["lasertank" + nop].life = life;
_root["lasertank" + nop].fulllife = 10000;
_root["lasertank" + nop].speed = speed;
lasertank = false;
}
timer++;
if ((timer == 100) && (_root.enemywarfactory1.life > 0)) {
i = _root.difficulty;
while (i > 0) {
a = Math.random();
if ((a > 0) && (a < 0.2)) {
unittype = "enemylight";
_root.enemymoney = _root.enemymoney - 1000;
}
if ((a > 0.2) && (a < 0.4)) {
unittype = "enemyrocket";
_root.enemymoney = _root.enemymoney - 1500;
}
if ((a > 0.4) && (a < 0.6)) {
unittype = "enemyheavy";
_root.enemymoney = _root.enemymoney - 2500;
}
if ((a > 0.6) && (a < 0.8)) {
unittype = "enemyhumvee";
_root.enemymoney = _root.enemymoney - 500;
}
if ((a > 0.8) && (a < 1)) {
unittype = "enemyartillery";
_root.enemymoney = _root.enemymoney - 2000;
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.enemywarfactory1._x;
_root[unittype + _root.n]._y = _root.enemywarfactory1._y + 100;
_root[unittype + _root.n]._rotation = 0;
_root.n++;
i--;
}
}
if (timer == 51) {
timer = 0;
i = 0;
while (i < _root.enemyarray.length) {
current = _root.enemyarray[i];
if (((!_root[current].fireing) && (!_root[current].walking)) && (_root[current].getDepth() > 0)) {
lo = Math.floor(Math.random() * (_root.friendlylist.length - 1));
unit = _root.friendlylist[lo];
_root[current].aiattack(unit);
}
i++;
}
}
if ((_root.apc.hitTest(_root.comm) && (_root.money > 50000)) && (hit)) {
_root.dialogue.gotoAndStop("come");
hit = false;
}
if (_root.guide.hitTest(_root.techt1)) {
_root.dialogue.gotoAndStop("one");
}
if (_root.guide.hitTest(_root.techt2)) {
_root.dialogue.gotoAndStop("two");
}
if (_root.guide.hitTest(_root.techt3)) {
_root.dialogue.gotoAndStop("three");
}
if (!(_root.ownmap6 === true)) {
_root.sidebar.build.lasertank.gotoAndStop(1);
}
if (_root.apc.life <= 0) {
_root.gotoAndStop("defeat7b");
}
if (_root.guide.life <= 0) {
_root.gotoAndStop("defeat7b");
}
if (_root.enemytechcentre1.life <= 0) {
_root.gotoAndStop("defeat7b");
}
if (_root.enemytechcentre2.life <= 0) {
_root.gotoAndStop("defeat7b");
}
if (_root.enemytechcentre3.life <= 0) {
_root.gotoAndStop("defeat7b");
}
if (_root.enemyarray.length <= 3) {
_root.gotoAndStop("victory7b");
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 115
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 116
movetozero();
_root.map7bcomplete = true;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 116
onClipEvent (mouseUp) {
_root.gotoAndStop("miss7");
}
Instance of Symbol 249 MovieClip in Frame 116
/* no clip actions */
Frame 117
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 117
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss7");
}
Frame 118
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.enemies = undefined;
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (50000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 1286 MovieClip "back" in Frame 118
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 119
_root.waves = 0;
_root.timert = 0;
if (_root.map7bcomplete === true) {
_root.dialogue.gotoAndStop("laser");
} else {
_root.dialogue.gotoAndStop(52);
}
_root.attachMovie("mission10", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
Mouse.hide();
_root.scrolla = true;
_root.sidebar.mapp.gotoAndStop(10);
stop();
_root.money = 150000 / _root.difficulty;
stop();
Instance of Symbol 1135 MovieClip in Frame 119
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 119
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 119
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 119
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1286 MovieClip "back" in Frame 119
/* no clip actions */
Instance of Symbol 1152 MovieClip "burton" in Frame 119
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 119
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1063 MovieClip in Frame 119
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 119
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
stop();
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 119
onClipEvent (load) {
oilfield = "oil5";
_root.objarray.push(this._name);
}
Instance of Symbol 1194 MovieClip "box" in Frame 119
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if ((((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) && (_root.scrolla)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
hitunit = false;
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if ((_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) && (!_root[current].ally)) {
_root[current].selector._visible = true;
if ((((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) && (_root[current].speed != undefined)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Instance of Symbol 1199 MovieClip "ai" in Frame 119
onClipEvent (load) {
timer = 0;
timer2 = 0;
uranium = 0;
lasertank = true;
convoy = false;
if (_root.map7bcomplete != true) {
i = 4;
while (i > 0) {
_root.attachMovie("dozer", "dozer" + i, _root.n);
_root["dozer" + i]._x = _root.pao1._x + (50 * i);
_root["dozer" + i]._y = _root.pao1._y;
_root.n++;
i--;
}
}
}
onClipEvent (enterFrame) {
if (lasertank == true) {
i = 10;
while (i > 0) {
_root["art" + i].emp = true;
_root["art" + i].nuke = true;
_root["art" + i].accurate = true;
_root["art" + i].firerate = _root["art" + i].firerate * 3;
i--;
}
}
if ((lasertank == true) && ((_root.map7acomplete == true) || (_root.map7bcomplete == true))) {
nop = 5;
while (nop > -1) {
_root["laser" + nop]._visible = false;
_root["laser" + nop].life = 0;
nop--;
}
lasertank = false;
}
if ((_root.map7acomplete == false) && (_root.map7bcomplete == false)) {
if (_root.sidebar.nuketimer.percent == 0) {
uranium = 0;
}
_root.sidebar.nuketimer.percent = uranium;
}
timer++;
if ((timer == 900) && (_root.enemywarfactory1.life > 0)) {
timer = 0;
i = _root.difficulty;
while (i > 0) {
a = Math.random();
if ((a > 0) && (a < 0.2)) {
unittype = "enemylight";
_root.enemymoney = _root.enemymoney - 1000;
}
if ((a > 0.2) && (a < 0.4)) {
unittype = "enemyrocket";
_root.enemymoney = _root.enemymoney - 1500;
}
if ((a > 0.4) && (a < 0.6)) {
unittype = "enemyheavy";
_root.enemymoney = _root.enemymoney - 2500;
}
if ((a > 0.6) && (a < 0.8)) {
unittype = "enemyhumvee";
_root.enemymoney = _root.enemymoney - 500;
}
if ((a > 0.8) && (a < 1)) {
unittype = "enemyartillery";
_root.enemymoney = _root.enemymoney - 2000;
}
trace(unittype);
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.enemywarfactory1._x;
_root[unittype + _root.n]._y = _root.enemywarfactory1._y + 100;
_root.n++;
if (Math.random() < (0.1 * _root.difficulty)) {
unittype = "enemylasertank";
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.facility._x;
_root[unittype + _root.n]._y = _root.facility._y;
_root.n++;
}
i--;
}
}
if (timer == 51) {
i = 0;
while (i < _root.enemyarray.length) {
current = _root.enemyarray[i];
if (((!_root[current].fireing) && (!_root[current].walking)) && (_root[current].getDepth() > 0)) {
lo = Math.floor(Math.random() * (_root.friendlylist.length - 1));
unit = _root.friendlylist[lo];
_root[current].aiattack(unit);
}
i++;
}
}
if (_root.facility.life <= 0) {
_root.gotoAndStop("victory7");
}
if (_root.friendlylist.length <= 1) {
_root.gotoAndStop("defeat7");
}
}
Frame 120
movetozero();
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 120
onClipEvent (mouseUp) {
_root.gotoAndStop("miss8");
}
Instance of Symbol 249 MovieClip in Frame 120
/* no clip actions */
Frame 121
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 121
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss7");
}
Frame 122
_root.sidebar.removeMovieClip();
_root.friendlies = undefined;
_root.guards = undefined;
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1323 MovieClip in Frame 122
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
gotoAndStop ("miss8");
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 122
onClipEvent (load) {
info = "Country: Turkey. \nPopulation 33 million. \n Control : Enemy.\n Economy: Oil Industry";
words = "We have become aware of an imprisoned US commander in this region. Due to bribes made by an increasingly desperate European Condeferacy, US officers in Turkey have betrayed Commander Martin and taken him to a secure prison facility.Take a small squad and attempt to free him. Stealth is key. ";
map = "map8";
}
Frame 123
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (50000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 1502 MovieClip "back" in Frame 123
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1082 MovieClip in Frame 123
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 123
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 124
_root.dialogue.gotoAndStop(71);
_root.waves = 0;
_root.timert = 0;
_root.attachMovie("mission11", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
Mouse.hide();
_root.scrolla = true;
stop();
_root.money = 1500;
stop();
Instance of Symbol 1135 MovieClip in Frame 124
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 124
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 124
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 124
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 124
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1152 MovieClip "burton" in Frame 124
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1502 MovieClip "back" in Frame 124
onClipEvent (load) {
}
Instance of Symbol 1063 MovieClip in Frame 124
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 124
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 124
onClipEvent (load) {
oilfield = "oil7";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig10" in Frame 124
onClipEvent (load) {
oilfield = "oil6";
_root.objarray.push(this._name);
}
Instance of Symbol 1199 MovieClip "ai" in Frame 124
onClipEvent (load) {
bombed = false;
patrolwait = 700 / _root.difficulty;
teamtyp = false;
trucktimer = 1446;
go = false;
timer = 0;
rads = 0;
timer3 = 1000000000 /* 0x3B9ACA00 */;
}
onClipEvent (enterFrame) {
patrolwait--;
if (!teamtyp) {
_root.apc.dummy.empulse = -2;
_global.teamtype("patrols1", ["patrol1", "patrol2", "patrol3"], 4);
_global.teamtype("patrols2", ["patrol4", "patrol5", "patrol6", "patrol7"], 4);
_global.teamtype("patrols3", ["patrol8", "patrol9", "patrol10"], 4);
teamtyp = true;
}
if (_root.truck.hitTest(_root.pat1) && (!go)) {
_root.dialogue.gotoAndStop("halt");
}
if (_root.truck.hitTest(_root.enemyservicedepot1) && (_root.truck.mined == false)) {
_root.truck._visible = false;
_root.truck.life = 0;
}
if (_root.truck.hitTest(_root.enemyservicedepot1) && (_root.truck.mined == true)) {
_root.apc.dummy.empulse = 0;
_root.attachMovie("nuke", "radiation" + _root.n, _root.n);
_root["radiation" + _root.n]._x = _root.enemyservicedepot1._x;
_root["radiation" + _root.n]._y = _root.enemyservicedepot1._y;
_root["radiation" + _root.n]._xscale = 50;
_root["radiation" + _root.n]._yscale = 50;
_root.dialogue.gotoAndPlay("check");
_root.n++;
_root.truck.mined = false;
rads = 3;
timer3 = 500;
}
timer3--;
if ((rads > 0) && (timer3 <= 0)) {
_root.attachMovie("nuke", "radiation" + _root.n, _root.n);
_root["radiation" + _root.n]._x = _root.enemyservicedepot1._x;
_root["radiation" + _root.n]._y = _root.enemyservicedepot1._y;
_root["radiation" + _root.n]._xscale = 50;
_root["radiation" + _root.n]._yscale = 50;
_root.n++;
_root.truck.mined = false;
rads--;
timer3 = 500;
}
if ((!bombed) && (_root.enemyrefinery1.life <= 0)) {
trucktimer++;
if (trucktimer == 1550) {
_root.truck.life = 0;
_root.attachMovie("enemyoiltruck", "truck", _root.n);
_root.truck._x = _root.truckspawn._x;
_root.truck._y = _root.truckspawn._y;
_root.truck.mined = false;
_root.n++;
}
if (trucktimer == 1552) {
_root.truck.aigoto(_root.pat1._x, _root.pat1._y);
trucktimer = 0;
}
}
n = _root.minearray.length - 1;
while (n > -1) {
current = _root.minearray[n];
_root[current].gotoAndStop(2);
if (_root[current].hitTest(_root.truck)) {
_root.truck.mined = true;
_root.truck._alpha = 50;
_root[current].removeMovieClip();
break;
}
n--;
}
if (_root.money <= 0) {
_root.money = 1500;
}
if (_root.apc.life < 0) {
_root.gotoAndStop("defeat8y");
}
_root.sidebar.build.mine.gotoAndStop(2);
if (bombed) {
if (_root.apc.hitTest(_root.oiltruckspawn)) {
_root.gotoAndStop("victory8");
}
}
if (_root.enemyrefinery1._currentframe == 3) {
_root.dialogue.gotoAndStop("allah");
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 124
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 125
_root.patrols1 = undefined;
_root.patrols2 = undefined;
_root.patrols3 = undefined;
movetozero();
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.warfactory1e = 0;
_root.refinery1e = 0;
_root.pat1e = 0;
_root.pat2e = 0;
_root.comcentre1e = 0;
_root.enemypower = _root.enemypower - 70;
_root.enemyattack = 0;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 125
onClipEvent (mouseUp) {
_root.gotoAndStop("miss9");
}
Instance of Symbol 249 MovieClip in Frame 125
/* no clip actions */
Frame 126
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 126
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss8");
}
Frame 127
_root.sidebar.removeMovieClip();
_root.friendlies = undefined;
_root.guards = undefined;
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1323 MovieClip in Frame 127
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
gotoAndStop ("miss9");
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 127
onClipEvent (load) {
info = "Country: Sweden. \nPopulation 18 million. \n Control : US.\n Economy:Research Base";
words = "All Major enemy resistance has collapsed.How, the European Confederacy has degraded into an underground terrorist force still determined to destroy US presence in Europe. We are preparing a major assault on their last stronghold in Britain. It is believed that the leader of the organisation, Anton von Traitos is hiding there.Commander,we have amassed a large army of tanks at your disposal. Lead it out of Sweden and into our Norwegian Port. There , we can sail across the North Sea and retake Britain. ";
map = "map9";
}
Frame 128
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (50000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 1520 MovieClip "back" in Frame 128
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 1082 MovieClip in Frame 128
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 128
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 129
_root.dialogue.gotoAndStop(83);
_root.waves = 0;
_root.timert = 0;
_root.attachMovie("mission12", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
var i = (buildary.length - 1);
while (i > -1) {
_root.sidebar.build[buildary[i]].buildrate = _root.sidebar.build[buildary[i]].buildrate * 0.5;
i--;
}
var i = (buildray.length - 1);
while (i > -1) {
_root.sidebar.build[buildray[i]].rates = _root.sidebar.build[buildray[i]].rates * 1.5;
i--;
}
Mouse.hide();
_root.scrolla = true;
_root.enemymoney = 1000000 /* 0x0F4240 */;
stop();
_root.money = 0;
_root.scrolla = true;
stop();
Instance of Symbol 1135 MovieClip in Frame 129
onClipEvent (enterFrame) {
if (this.hitTest(_root.mouse) || (Key.isDown(38))) {
if (this.hitTest(_root.back)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 129
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 129
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 129
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1152 MovieClip "burton" in Frame 129
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1520 MovieClip "back" in Frame 129
onClipEvent (load) {
}
Instance of Symbol 1063 MovieClip in Frame 129
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 129
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 129
onClipEvent (load) {
timer = 0;
lifess = 1500 / _root.difficulty;
timercock = 0;
ambush = false;
upbridge = [];
guyz = [];
dozers = [];
win = false;
troopfreq = 20 / _root.difficulty;
numberevac = 0;
downbridge = [];
timer2 = 0;
_root.box.canselect = false;
timer3 = 0;
coming = false;
sayq = false;
sayh = false;
say3q = false;
saywh = false;
this.createobj2 = function () {
if ((a > 0) && (a < 0.3)) {
unittype = "enemylight";
}
if ((a > 0.3) && (a < 0.5)) {
unittype = "enemyrocket";
}
if ((a > 0.5) && (a < 0.6)) {
unittype = "enemyheavy";
}
if ((a > 0.6) && (a < 0.8)) {
unittype = "enemyhumvee";
}
if ((a > 0.8) && (a < 1)) {
unittype = "enemyartillery";
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
var _local2 = Math.ceil(Math.random() * 6);
_root[unittype + _root.n]._x = _root["point" + _local2]._x;
_root[unittype + _root.n]._y = _root["point" + _local2]._y;
_root[unittype + _root.n].point = _local2;
guyz.push(unittype + _root.n);
_root.n++;
};
this.applyobj = function () {
guyl = guyz.length - 1;
var _local2 = guyl;
while (_local2 > -1) {
current = guyz[_local2];
if (_root[current].life == undefined) {
guyz.splice(_local2, 1);
}
if (((((_root[current].speed != undefined) && (_root[current].damage != undefined)) && (!_root[current].walking)) && (!_root[current].fireing)) && (_root[current].getDepth() > 0)) {
nop = Math.floor(Math.random() * _root.friendlylist.length);
toattack = _root.friendlylist[nop];
if (_root[toattack]._x != undefined) {
_root[current].aiattack(toattack);
}
}
_local2--;
}
};
}
onClipEvent (enterFrame) {
if (win) {
if (numberevac == _root.friendlylist.length) {
_root.gotoAndStop("victory9");
}
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(_root.dropoff) && (_root[current]._visible)) {
_root[current]._visible = false;
_root[current].life = 0;
numberevac++;
}
i--;
}
}
if (timer3 > troopfreq) {
timer3 = 0;
createobj2();
}
if (timer2 == 20) {
applyobj();
timer2 = 0;
}
if ((!coming) && (timercock == 10)) {
_root.dialogue.gotoAndStop("ambush");
coming = true;
}
if (ambush) {
timer++;
timer3++;
timer2++;
if (timer == 50) {
if (coming) {
_root.upbridgelife = _root.upbridgelife + upbridge.length;
_root.downbridgelife = _root.downbridgelife + downbridge.length;
if (((_root.upbridgelife >= (lifess / 4)) && (_root.downbridgelife >= (lifess / 4))) && (!sayq)) {
_root.dialogue.gotoAndStop("quarter");
sayq = true;
}
if (((_root.upbridgelife >= (lifess / 2)) && (_root.downbridgelife >= (lifess / 2))) && (!sayh)) {
_root.dialogue.gotoAndStop("half");
sayh = true;
}
if (((_root.upbridgelife >= (lifess * 0.75)) && (_root.downbridgelife >= (lifess * 0.75))) && (!say3q)) {
_root.dialogue.gotoAndStop("threeq");
say3q = true;
}
if (((_root.upbridgelife >= lifess) && (_root.downbridgelife >= lifess)) && (!saywh)) {
_root.dialogue.gotoAndStop("whole");
win = true;
i = _root.dozerarray.length - 1;
while (i > -1) {
current = _root.dozerarray[i];
_root[current].dummy.empulse = 1;
i--;
}
saywh = true;
}
}
i = upbridge.length - 1;
while (i > -1) {
current = upbridge[i];
if (_root[current].hitTest(_root.repair2)) {
_root[current].dummy.empulse = -3;
_root.back.repair2.auto.play();
}
i--;
}
i = downbridge.length - 1;
while (i > -1) {
current = downbridge[i];
if (_root[current].hitTest(_root.repair1)) {
_root[current].dummy.empulse = -3;
_root.back.repair1.auto.play();
}
i--;
}
timercock++;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
x = _root[current]._x;
y = _root[current]._y;
if (_root.back.water.hitTest(x, y, true)) {
_root[current].life = 0;
}
i--;
}
timer = 0;
}
}
if ((!ambush) && (_root.upbridgelife == undefined)) {
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
_root[current].speed = 3;
_root[current].savespeed = _root[current].speed;
if ((Math.floor(i / 2) * 2) == i) {
_root[current]._x = _root.bridge1._x;
}
if ((Math.floor(i / 2) * 2) != i) {
_root[current]._x = _root.bridge2._x;
}
i--;
}
if (_root.trucker.hitTest(_root.bridge)) {
_root.convoy = undefined;
_root.upbridgelife = 0;
_root.downbridgelife = 0;
_root.back.bridge.play();
_root.dialogue.gotoAndStop("bridge");
_root.box.canselect = true;
_root.convoy = undefined;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
_root[current].speed = _root[current].savespeed;
if (_root[current].hitTest(_root.bridge) || (_root[current].hitTest(_root.bridge2))) {
_root[current].life = 0;
}
ambush = true;
i--;
}
}
}
if (_root.dozerarray.length <= 0) {
_root.gotoAndStop("defeat9");
}
if (_root.dozerarray.length <= 0) {
_root.gotoAndStop("defeat9");
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 129
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 130
movetozero();
_root.map7acomplete = true;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 130
onClipEvent (mouseUp) {
_root.gotoAndStop("miss10");
}
Instance of Symbol 249 MovieClip in Frame 130
/* no clip actions */
Frame 131
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 131
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss9");
}
Frame 132
_root.sidebar.removeMovieClip();
_root.friendlies = undefined;
_root.guards = undefined;
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.upbridge = undefined;
_root.downbridge = undefined;
stop();
Instance of Symbol 1323 MovieClip in Frame 132
onClipEvent (load) {
this._alpha = 0;
_root.starts = false;
played = false;
gotoAndStop ("miss10");
}
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha++;
}
if ((this._alpha == 100) && (!played)) {
played = true;
play();
}
}
Instance of Symbol 1332 MovieClip "shader2" in Frame 132
onClipEvent (load) {
info = "Country: England. \nPopulation 75 million. \n Control : Enemy.\n Economy:Design and Arts";
words = "This is it commander, our final battle. Traitos has holed himself up in his last remaining stronghold in England, where he has constructed a well defended fortress. Our forces have moved into Britain and surrounded the capital of London. Wipe him out, along with all his forces.";
map = "map10";
if (_root.currentmap == "map10") {
gotoAndStop ("complete");
}
}
Instance of Symbol 1332 MovieClip "shader1" in Frame 132
onClipEvent (load) {
info = "Country: Tunisia. \nPopulation 10 million. \n Control : Enemy.\n Economy:None";
words = "Triatos has another major base in Tunisia, where he plans to develop a new superweapon.We have prepared a small but elite stealth crack squad. Commander, destroy the base and wait for Traitos. Once Traitos is ihe vicinity, he will commence inspection. Arrest him immediately. If he detects the trap, capture him before he to flee the sector.";
map = "map10a";
if (_root.currentmap == "map10a") {
gotoAndStop ("complete");
}
}
Frame 133
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = [];
_root.upgradelevel = _root.difficulty;
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (20000 * (10 / _root.difficulty));
_root.enemymoney = 1000000000000;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 825 MovieClip "back" in Frame 133
/* no clip actions */
Instance of Symbol 1082 MovieClip in Frame 133
onClipEvent (load) {
_root.music.start();
}
Instance of Symbol 1152 MovieClip "burton" in Frame 133
onClipEvent (load) {
this.swapDepths(1100100);
}
Frame 134
_root.dialogue.gotoAndStop(97);
_root.waves = 0;
_root.timert = 0;
_root.sidebar.mapp.gotoAndStop(12);
_root.attachMovie("mission13", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
var i = (buildary.length - 1);
while (i > -1) {
_root.sidebar.build[buildary[i]].buildrate = _root.sidebar.build[buildary[i]].buildrate * 0.5;
i--;
}
var i = (buildray.length - 1);
while (i > -1) {
_root.sidebar.build[buildray[i]].rates = _root.sidebar.build[buildray[i]].rates * 1.5;
i--;
}
Mouse.hide();
_root.scrolla = true;
_root.currentm = "map10";
stop();
_root.enemymoney = 1000000000000;
stop();
Instance of Symbol 1135 MovieClip in Frame 134
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 134
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 134
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 134
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 825 MovieClip "back" in Frame 134
/* no clip actions */
Instance of Symbol 1152 MovieClip "burton" in Frame 134
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1150 MovieClip "rig13" in Frame 134
onClipEvent (load) {
oilfield = "oil11";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig14" in Frame 134
onClipEvent (load) {
oilfield = "oil1";
_root.objarray.push(this._name);
}
Instance of Symbol 1063 MovieClip in Frame 134
onClipEvent (load) {
ranges = 1;
}
Instance of Symbol 1063 MovieClip in Frame 134
onClipEvent (enterFrame) {
po++;
if (po == _root.shroudarray.length) {
po = 0;
}
current = _root.shroudarray[po];
var revealed = false;
i = _root.friendlylist.length - 1;
while (i > -1) {
current2 = _root.friendlylist[i];
if (_root[current2].unittype != "construction") {
if (_root[current].hitTest(_root[current2])) {
revealed = true;
break;
}
}
i--;
}
if (revealed) {
_root[current]._visible = false;
}
if ((!revealed) && (_root.fog)) {
_root[current]._visible = true;
}
}
onClipEvent (load) {
po = 0;
}
onClipEvent (load) {
po = 0;
}
Instance of Symbol 1150 MovieClip "rig11" in Frame 134
onClipEvent (load) {
oilfield = "oil2";
_root.objarray.push(this._name);
}
Instance of Symbol 1150 MovieClip "rig12" in Frame 134
onClipEvent (load) {
oilfield = "oil3";
_root.objarray.push(this._name);
}
Instance of Symbol 1199 MovieClip "ai" in Frame 134
onClipEvent (load) {
timert = Math.round(3000 / _root.difficulty);
timer = 0;
timer2 = 0;
shroud = false;
fortress2 = false;
fortresdest = false;
guyz = [];
}
onClipEvent (enterFrame) {
timer2++;
timer++;
if (timer2 == 100) {
if (fortress) {
nop = Math.floor(Math.random() * _root.friendlylist.length);
toattack = _root.friendlylist[nop];
_root.fortress.aiattack(toattack);
}
timer2 = 0;
guyl = guyz.length - 1;
var i = guyl;
while (i > -1) {
current = guyz[i];
if (_root[current].life == undefined) {
guyz.splice(i, 1);
}
if (((((_root[current].speed != undefined) && (_root[current].damage != undefined)) && (!_root[current].walking)) && (!_root[current].fireing)) && (_root[current].getDepth() > 0)) {
nop = Math.floor(Math.random() * _root.friendlylist.length);
toattack = _root.friendlylist[nop];
if (_root[toattack]._x != undefined) {
_root[current].aiattack(toattack);
}
}
i--;
}
}
if (timer > timert) {
if (!fortress2) {
if ((((_root.control1.life <= 0) && (_root.control2.life < 0)) && (_root.control3.life < 0)) && (_root.control4.life < 0)) {
_root.dialogue.gotoAndStop("destroyfortess");
}
}
timer = 0;
i = 4;
while (i > -1) {
if (_root["enemywarfactory" + i].life > 0) {
a = Math.random();
if ((a > 0) && (a < 0.3)) {
unittype = "enemylight";
}
if ((a > 0.3) && (a < 0.5)) {
unittype = "enemyrocket";
}
if ((a > 0.5) && (a < 0.6)) {
unittype = "enemyheavy";
}
if ((a > 0.6) && (a < 0.8)) {
unittype = "enemyhumvee";
}
if ((a > 0.8) && (a < 1)) {
unittype = "enemyartillery";
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root["enemywarfactory" + i]._x;
_root[unittype + _root.n]._y = _root["enemywarfactory" + i]._y;
guyz.push(unittype + _root.n);
_root.n++;
}
i--;
}
}
if (_root.friendlylist.length <= 0) {
_root.gotoAndStop("defeat10");
}
if ((_root.fortress.life <= 0) && (!fortressdest)) {
fortressdest = true;
if (Math.random() > 0.5) {
_root.dialogue.gotoAndStop("decoy");
} else {
_root.dialogue.gotoAndStop("win");
}
}
if (!shroud) {
if (!_root.shroudfortress._visible) {
_root.dialogue.gotoAndStop("fortress");
shroud = true;
}
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 134
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 135
movetozero();
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.warfactory1e = 0;
_root.refinery1e = 0;
_root.pat1e = 0;
_root.pat2e = 0;
_root.comcentre1e = 0;
_root.enemypower = _root.enemypower - 70;
_root.enemyattack = 0;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 135
onClipEvent (mouseUp) {
if (_root.decoy) {
_root.gotoAndStop("miss10");
} else {
_root.gotoAndStop("win");
}
}
Instance of Symbol 249 MovieClip in Frame 135
/* no clip actions */
Frame 136
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 136
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss10");
}
Frame 137
_root.soundon = _root.setsoundon;
_root.soundon = true;
_root.attachMovie("sidebar", "sidebar", 1000000);
_root.attachMovie("mo", "mouse", 1000001);
_root.sidebar._x = 132.6;
_root.sidebar._y = 615;
_root.sidebar._xscale = -58.5;
_root.sidebar._yscale = 49.14;
_root.sidebar._rotation = 90;
_global.orix = _root.back._x;
_global.oriy = _root.back._y;
_root.attachMovie("box5", "box6", 10000004);
_root.box6._x = x1;
_root.box6._y = y1;
_root.box6._height = (_root.box5._height / _root.back._height) * (y4 - y1);
_root.box6._width = (_root.box5._width / _root.back._width) * (x4 - x1);
_global.constanty = (y4 - y1) / _root.back._height;
_global.constantx = (x4 - x1) / _root.back._width;
_global.constantsy = (y4 - y1) / _root.back._height;
_global.constantsx = (x4 - x1) / _root.back._width;
_root.objarray = [];
_root.num = 0;
_root.sparsex = [0, -50, 150, 100, -100, 150, 250, 200, -250, 300, 300, 350, -350, 400, -410, 500, -550];
_root.sparsey = [0, -50, 80, -180, 250, -50, 140, -150, 60, 150, -70, -220, -350, 350, -350, 375, -375];
_root.linex = [0, 0, 50, 50, 100, 100, 150, 150, 200, 200, 350, 350, 400, 400, 450, 450, 500, 500, 550, 550];
_root.liney = [0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50];
_root.unitsarray = [];
_root.flagsarray = [];
_root.selectedarray = [];
_root.enemyarray = [];
_root.shroudarray = [];
_root.friendlylist = [];
_root.shellarray = [];
_root.enemyminearray = [];
_root.minearray = [];
_root.enemyminearray = [];
_root.money = _root.money + (50000 * (10 / _root.difficulty));
_root.enemymoney = 0;
_root.warfactory = 0;
_root.enemywarfactory = 0;
_global.dozers = [];
_root.dozerarray = [];
_root.enemydozerarray = [];
_root.structurearray = [];
_root.enemyservicedepot = 0;
_root.enemystructurearray = [];
_root.comcentre = 0;
_root.enemycomcentre = 0;
_root.oilarray = [];
_root.enemyoiltruckarray = [];
_root.oiltruckarray = [];
_root.refinery = 0;
_root.enemyrefinery = 0;
_root.techcentre = 0;
_root.enemytechcentre = 0;
_root.enemyweaponsilo = 0;
_root.turretarray = [];
_root.enemyturretarray = [];
Instance of Symbol 1530 MovieClip "back" in Frame 137
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Frame 138
_root.waves = 0;
_root.dialogue.gotoAndStop(107);
_root.timert = 0;
_root.attachMovie("mission14", "tutorial", 1000900);
_root.tutorial._x = 46.8;
_root.tutorial._y = 10.9;
Mouse.hide();
_root.scrolla = true;
_root.currentm = "map10a";
stop();
_root.money = 1500;
stop();
Instance of Symbol 1135 MovieClip in Frame 138
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(38))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y + 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 138
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(37))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x + 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x + 20;
i--;
}
}
}
}
Instance of Symbol 1137 MovieClip in Frame 138
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(39))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._x = _root.back._x - 20;
_root.box6._x = x1 - (_root.back._x * constantx);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - 20;
i--;
}
}
}
}
Instance of Symbol 1135 MovieClip in Frame 138
onClipEvent (enterFrame) {
if ((this.hitTest(_root.mouse) || (Key.isDown(40))) && (_root.scrolla)) {
if (this.hitTest(_root.back.centre)) {
_root.back._y = _root.back._y - 20;
_root.box6._y = y1 - (_root.back._y * constanty);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._y = _root[current]._y - 20;
i--;
}
}
}
}
Instance of Symbol 1152 MovieClip "burton" in Frame 138
onClipEvent (load) {
this.swapDepths(1100100);
}
Instance of Symbol 1530 MovieClip "back" in Frame 138
/* no clip actions */
Instance of Symbol 1063 MovieClip in Frame 138
onClipEvent (load) {
ranges = 0.7;
}
Instance of Symbol 1066 MovieClip in Frame 138
onClipEvent (load) {
ranges = 0.5;
}
Instance of Symbol 1199 MovieClip "ai" in Frame 138
onClipEvent (load) {
maxpatrolwait = Math.round(350 / _root.difficulty);
patrolwait = Math.round(700 / _root.difficulty);
timer = 0;
detected = false;
win = false;
_root.apoc._visible = false;
flee = false;
escaped = false;
timer2 = 1099;
}
onClipEvent (enterFrame) {
timer2++;
patrolwait--;
timer++;
if (_root.apoc.hitTest(_root.flee)) {
_root.apco._visible = false;
_root.dialogue.gotoAndStop("fled");
}
if (timer == Math.round(100 / _root.difficulty)) {
if (currentguy != undefined) {
_root[currentguy].aigoto(_root.apoc._x, _root.apoc._y);
if (_root[currentguy].hitTest(_root.apoc) && (!flee)) {
_root.apoc.aigoto(_root.flee._x, _root.flee._y);
_root.apoc.speed = 4;
_root.dialogue.gotoAndStop("flee");
flee = true;
}
if (_root[currentguy].life <= 0) {
currentguy = undefined;
detected = false;
}
}
if (currentguy == undefined) {
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if ((_root[current].speed != undefined) && (_root[current].shellspd != undefined)) {
if (_root[current].turret._currentframe > 3) {
detected = true;
_root.dialogue.gotoAndStop("det");
currentguy = current;
break;
}
}
i--;
}
}
timer = 0;
}
if (!teamtyp) {
_root.apc.dummy.empulse = -2;
_global.teamtype("patrols1", ["h1", "h2"], 4);
_global.teamtype("patrols2", ["p1", "p2", "p3"], 4);
_global.teamtype("patrols3", ["t1", "t2", "t3"], 4);
_global.teamtype("patrols4", ["i1", "i2", "i3"], 4);
teamtyp = true;
}
if ((patrolwait == maxpatrolwait) && (!detected)) {
_root.patrols1.goto(undefined, undefined, "point4");
_root.patrols2.goto(undefined, undefined, "point5");
_root.patrols3.goto(undefined, undefined, "point2");
_root.patrols4.goto(undefined, undefined, "point6");
}
if ((patrolwait == 0) && (!detected)) {
_root.patrols1.goto(undefined, undefined, "point3");
_root.patrols2.goto(undefined, undefined, "point4");
_root.patrols3.goto(undefined, undefined, "point1");
_root.patrols4.goto(undefined, undefined, "point5");
patrolwait = Math.round(700 / _root.difficulty);
}
if (_root.friendlylist.length <= 0) {
_root.gotoAndStop("defeat10a");
}
if ((_root.apoc.life <= 0) && (!win)) {
win = true;
if (Math.random() > 0.5) {
_root.dialogue.gotoAndStop("win");
} else {
_root.dialogue.gotoAndStop("decoy");
}
}
if (timer2 == Math.round(2500 / _root.difficulty)) {
_root.apoc._visible = true;
_root.dialogue.gotoAndStop("arr");
_root.apoc.aigoto(_root.erefinery._x, _root.erefinery._y);
_root.apcc2.aigoto(_root.erefinery._x, _root.erefinery._y);
_root.apcc3.aigoto(_root.erefinery._x, _root.erefinery._y);
}
}
Instance of Symbol 1194 MovieClip "box" in Frame 138
onClipEvent (mouseDown) {
hitunit = false;
x = _root.mouse._x - 10;
y = _root.mouse._y - 10;
if (((_root.sidebar.mapp.hitTest(x, y, true) && (_root.comcentre1.life > 0)) && (_root.comcentre1.life != undefined)) && (_root.sidebar._visible)) {
x1s = x - x1;
y1s = y - y1;
x2s = _root.box6._x - x1;
y2s = _root.box6._y - y1;
_root.box6._x = x;
_root.box6._y = y;
x1s = x1s / constantx;
y1s = y1s / constanty;
x2s = x2s / constantx;
y2s = y2s / constanty;
_root.back._x = _root.back._x - (x1s - x2s);
_root.back._y = _root.back._y - (y1s - y2s);
i = _root.objarray.length - 1;
while (i > -1) {
current = _root.objarray[i];
_root[current]._x = _root[current]._x - (x1s - x2s);
_root[current]._y = _root[current]._y - (y1s - y2s);
i--;
}
}
if ((!_root.sidebar.hitTest(x, y, false)) || (!_root.sidebar._visible)) {
if (Key.isDown(16)) {
_root.rallypoint._x = _root.mouse._x;
_root.rallypoint._y = _root.mouse._y;
}
hits = false;
this._x = _root._xmouse;
this._y = _root._ymouse;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this) && (current != "servicedepot1")) {
hits = true;
break;
}
i--;
}
origx = _root.mouse._x;
origy = _root.mouse._y;
this._visible = true;
array = _root.formation;
_root.formation = undefined;
if (!hits) {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if ((!_root[current].enemy) && (_root[current].speed != undefined)) {
if ((!_root[current].ally) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("o" + numbers);
soundobj.start();
hitunit = true;
}
_root[current].turret._rotation = _root[current].dummy._rotation;
c = _root.enemyarray.length - 1;
while (c > -1) {
current2 = _root.enemyarray[c];
if (_root.mouse.hitTest(_root[current2]) && (_root[current].damage != undefined)) {
_root[current].targetobj = current2;
_root[current].attack = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._x = _root.boxns._x;
_root["flag" + current]._y = _root.boxns._y;
_root[current].locx = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root[current].locy = ((Math.random() - 0.5) * _root[current].range) * 1.5;
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
break;
}
c--;
}
if (!hit) {
origx = _root.mouse._x + _root[array + "x"][i];
origy = _root.mouse._y + _root[array + "y"][i];
if (isNaN(origx)) {
origx = _root.mouse._x;
}
if (isNaN(origy)) {
origy = _root.mouse._y;
}
current = _root.selectedarray[i];
_root[current].destx = origx;
_root[current].desty = origy;
_root[current].attack = false;
_root[current].locx = undefined;
_root[current].locy = undefined;
_root[current].walking = true;
_root[current].dummy.obstacle = false;
_root[current].dummy.flag2 = undefined;
_root["flag" + current].removeMovieClip();
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag", "flag" + current, _root.n);
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
}
if (Key.isDown(17)) {
_root[current].targetobj = "flag" + current;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current].life = 10000;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root.n++;
}
hit = false;
i--;
}
}
}
}
onClipEvent (mouseUp) {
hitunit = false;
x = _root.mouse._x;
y = _root.mouse._y;
_root.mouse.gotoAndStop(2);
if ((!_root.sidebar.hitTest(x, y, true)) || (!_root.sidebar._visible)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
if (((!_root[current].ally) && (!_root[current].enemy)) && (!hitunit)) {
soundobj = new Sound();
numbers = Math.ceil(Math.random() * 4);
soundobj.attachSound("d" + numbers);
soundobj.start();
hitunit = true;
_root.selectedarray = [];
break;
}
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this) && (!_root.selectedarray.arrayfind(current))) {
_root[current].selector._visible = true;
_root[current].selected1 = true;
_root.selectedarray.push(current);
if (this._width < 10) {
break;
}
}
i--;
}
}
origx = undefined;
origy = undefined;
this._visible = false;
_root.sidebar.calccost();
}
onClipEvent (enterFrame) {
if (_root.mouse.hitTest(_root.sidebar)) {
_root.sidebar._alpha = 100;
} else {
_root.sidebar._alpha = 30;
}
_root.timer++;
if (_root.timer == 7000) {
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
if ((_root[name].fulllife != undefined) && ((_root[name].life == undefined) || (_root[name].life <= 0))) {
_root[name].removeMovieClip();
}
}
}
i = _root.friendlylist.length - 1;
while (i > -1) {
currents = _root.friendlylist[i];
if ((_root.friendlylist.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.friendlylist.splice(i, 1);
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
currents = _root.enemyarray[i];
if ((_root.enemyarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.enemyarray.splice(i, 1);
}
i--;
}
i = _root.objarray.length - 1;
while (i > -1) {
currents = _root.objarray[i];
if ((_root.objarray.countduplicate(currents) > 1) || (_root[currents]._x == undefined)) {
_root.objarray.splice(i, 1);
}
i--;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
currents = _root.unitsarray[i];
if (((_root.unitsarray.countduplicate(currents) > 1) || (_root[currents].life == undefined)) || (_root[currents + "symbols"]._x == undefined)) {
_root.unitsarray.splice(i, 1);
}
i--;
}
i = _root.shellarray.length - 1;
while (i > -1) {
currents = _root.shellarray[i];
if (_root.shellarray.countduplicate(currents) > 1) {
_root.shellarray.splice(i, 1);
}
i--;
}
_root.timer = 0;
}
if (Key.isDown(32)) {
_root.mouse.gotoAndStop(1);
_root.selectedarray = [];
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
_root.sidebar.calccost();
i--;
}
}
if (this._visible) {
a = _root._xmouse - origx;
b = _root._ymouse - origy;
this._width = Math.abs(a);
this._height = Math.abs(b);
if (a < 0) {
this._xscale = this._xscale * -1;
}
if (b < 0) {
this._yscale = this._yscale * -1;
}
}
}
Frame 139
_root.patrols1 = undefined;
_root.patrols2 = undefined;
_root.patrols3 = undefined;
movetozero();
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
_root.warfactory1e = 0;
_root.refinery1e = 0;
_root.pat1e = 0;
_root.pat2e = 0;
_root.comcentre1e = 0;
_root.enemypower = _root.enemypower - 70;
_root.enemyattack = 0;
_root.box6.removeMovieClip();
_root.ownmap2 = true;
_root.ownmap3 = false;
_root.missions++;
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 139
onClipEvent (mouseUp) {
if (_root.decoy) {
_root.gotoAndStop("miss10");
} else {
_root.gotoAndStop("win");
}
}
Instance of Symbol 249 MovieClip in Frame 139
/* no clip actions */
Frame 140
for (var name in _root) {
if (typeof(_root[name]) == "movieclip") {
_root[name].removeMovieClip();
}
}
stop();
Instance of Symbol 1199 MovieClip "ai" in Frame 140
onClipEvent (mouseUp) {
_root.gotoAndPlay("miss10");
}
Frame 141
stopAllSounds();
stop();
Frame 142
nextFrame();
Frame 143
gotoAndPlay (1);
Symbol 38 MovieClip [targetlock] Frame 1
timer = 1;
Instance of Symbol 37 MovieClip in Symbol 38 MovieClip [targetlock] Frame 1
onClipEvent (enterFrame) {
_parent._x = _root.mouse._x;
_parent._y = _root.mouse._y;
_parent.timer++;
if (Key.isDown(32)) {
_parent.removeMovieClip();
}
}
onClipEvent (mouseUp) {
if ((_parent.timer > 10) && (hit == undefined)) {
hit = true;
_root.attachMovie("bombardment", "bombardment" + _root.n, _root.n);
_root["bombardment" + _root.n]._x = _root.mouse._x;
_root["bombardment" + _root.n]._y = _root.mouse._y;
_root["bombardment" + _root.n].shells = _parent.shells;
_root.n++;
_parent._visible = false;
_parent.removeMovieClip();
}
}
Instance of Symbol 40 MovieClip in Symbol 41 MovieClip [stealth] Frame 1
onClipEvent (enterFrame) {
_parent.times--;
if (_parent.times == 0) {
if (_root[_parent.object].enemy == true) {
_root[_parent.object]._visible = true;
}
if (_root[_parent.object].enemy != true) {
_root[_parent.object].dummy._alpha = 1000;
}
_root[_parent.object].stealth = undefined;
_parent.removeMovieClip();
}
}
onClipEvent (load) {
this._visible = false;
_parent.times = 600;
if (_root[_parent.object].enemy == true) {
_root[_parent.object]._visible = false;
}
if (_root[_parent.object].enemy != true) {
_root[_parent.object].dummy._alpha = 50;
}
_root[_parent.object].stealth = true;
}
Symbol 48 MovieClip [mission5] Frame 1
pp = 0;
stop();
assignvars();
_root.attackarray = [];
stop();
Instance of Symbol 46 MovieClip in Symbol 48 MovieClip [mission5] Frame 1
/* no clip actions */
Symbol 50 MovieClip [mission6] Frame 1
pp = 0;
stop();
assignvars();
_root.attackarray = [];
stop();
Instance of Symbol 46 MovieClip in Symbol 50 MovieClip [mission6] Frame 1
onClipEvent (enterFrame) {
if (_root.enemytechcentre1.life <= 0) {
_root.gotoAndStop("defeat6");
}
}
Symbol 53 MovieClip [mission8] Frame 1
pp = 0;
stop();
assignvars();
stop();
Instance of Symbol 46 MovieClip in Symbol 53 MovieClip [mission8] Frame 1
onClipEvent (enterFrame) {
if (_root.airport.life <= 0) {
_root.gotoAndStop("defeat8");
}
}
Symbol 55 MovieClip [mission7] Frame 1
pp = 0;
stop();
assignvars();
stop();
Instance of Symbol 46 MovieClip in Symbol 55 MovieClip [mission7] Frame 1
/* no clip actions */
Symbol 59 MovieClip [mission14] Frame 1
stop();
Symbol 61 MovieClip [mission13] Frame 1
stop();
Symbol 64 MovieClip [mission11] Frame 1
stop();
Symbol 66 MovieClip [mission10] Frame 1
pp = 0;
stop();
assignvars();
stop();
Symbol 69 MovieClip [mission9] Frame 1
pp = 0;
stop();
assignvars();
stop();
Symbol 71 MovieClip [mission4] Frame 2
pp = 0;
stop();
assignvars();
_root.attackarray = [];
stop();
Instance of Symbol 46 MovieClip in Symbol 71 MovieClip [mission4] Frame 2
onClipEvent (enterFrame) {
if (_root.production3.life <= 0) {
_root.gotoAndStop("defeat4");
}
if (_root.production1.life <= 0) {
_root.gotoAndStop("defeat4");
}
if (_root.production2.life <= 0) {
_root.gotoAndStop("defeat4");
}
if (_root.production4.life <= 0) {
_root.gotoAndStop("defeat4");
}
}
Symbol 73 MovieClip [mission3] Frame 2
stop();
stop();
Instance of Symbol 46 MovieClip in Symbol 73 MovieClip [mission3] Frame 2
/* no clip actions */
Symbol 81 MovieClip [mission2] Frame 1
_root.sidebar.mapp.gotoAndStop(4);
movetoloc(_root.tartar._x, _root.tartar._y);
_root.scrolla = true;
this._x = this._x * 0.78;
this._y = this._y * 0.78;
var i = 10;
while (i > 0) {
if (_root["elite" + i].life != undefined) {
_root["elite" + i].life = _root["elite" + i].fulllife;
_root["elite" + i]._x = _root.tart5._x + _root.linex[i];
_root["elite" + i]._y = _root.tart5._y + _root.liney[i];
_root["elite" + i]._visible = true;
_root["elite" + i].walking = false;
_root["elite" + i].fireing = false;
_root.friendlylist.push("elite" + i);
_root.unitsarray.push("elite" + i);
_root.objarray.push("elite" + i);
}
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 81 MovieClip [mission2] Frame 1
onClipEvent (enterFrame) {
pp++;
if (pp > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
pp = 0;
}
Symbol 81 MovieClip [mission2] Frame 2
pp = 0;
var i = 10;
while (i > 0) {
_root["elite" + i].swapDepths(i);
_root["elite" + i].aigoto(_root.tart6._x, _root.tart6._y, false);
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 81 MovieClip [mission2] Frame 2
onClipEvent (enterFrame) {
_parent.pp++;
if (_parent.pp > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.pp = 0;
}
Symbol 81 MovieClip [mission2] Frame 3
nextFrame();
Instance of Symbol 46 MovieClip in Symbol 81 MovieClip [mission2] Frame 3
/* no clip actions */
Symbol 81 MovieClip [mission2] Frame 4
stop();
Symbol 83 MovieClip [mission0] Frame 1
this._x = this._x * 0.78;
this._y = this._y * 0.78;
_global.teamtype("friendly", _root.friendlylist, 10000);
_root.friendly.upgrade("fulllife", 5 / _root.difficulty);
_root.friendly.upgrade("life", 5 / _root.difficulty);
_root.friendly.command("hitonly", true);
nextFrame();
stop();
Symbol 83 MovieClip [mission0] Frame 2
pp = 0;
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 16
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Instance of Symbol 93 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.accurate == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.accurate === false) {
this._alpha = 40;
}
if (_parent._parent.accurate === true) {
this._alpha = 100;
}
}
Instance of Symbol 95 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.nuke == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.nuke === false) {
this._alpha = 40;
}
if (_parent._parent.nuke === true) {
this._alpha = 100;
}
}
Instance of Symbol 97 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.emp == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.emp === false) {
this._alpha = 40;
}
if (_parent._parent.emp === true) {
this._alpha = 100;
}
}
Instance of Symbol 99 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.shell2 == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.shell2 === false) {
this._alpha = 40;
}
if (_parent._parent.shell2 === true) {
this._alpha = 100;
}
}
Instance of Symbol 101 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.hitonly == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.hitonly === false) {
this._alpha = 40;
}
if (_parent._parent.hitonly === true) {
this._alpha = 100;
}
}
Instance of Symbol 103 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if ((_parent._parent.auto == undefined) || (_parent._parent.auto._x != undefined)) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.auto === false) {
this._alpha = 40;
}
if (_parent._parent.auto === true) {
this._alpha = 100;
}
}
Instance of Symbol 105 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.gatling == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.gatling === false) {
this._alpha = 40;
}
if (_parent._parent.gatling === true) {
this._alpha = 100;
}
}
Instance of Symbol 107 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.laser == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.laser === false) {
this._alpha = 40;
}
if (_parent._parent.laser === true) {
this._alpha = 100;
}
}
Instance of Symbol 109 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.crush == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.crush === false) {
this._alpha = 40;
}
if (_parent._parent.crush === true) {
this._alpha = 100;
}
}
Instance of Symbol 111 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if ((_parent._parent.miss == undefined) || (_parent._parent.missile != undefined)) {
this._visible = false;
} else {
this._visible = true;
}
if (!(_parent._parent.miss === 3)) {
this._alpha = 40;
}
if (_parent._parent.miss === 3) {
this._alpha = 100;
}
}
Instance of Symbol 113 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.seeker == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.seeker === false) {
this._alpha = 40;
}
if (_parent._parent.seeker === true) {
this._alpha = 100;
}
}
Instance of Symbol 115 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.miss == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if ((!(_parent._parent.miss === 2)) || (_parent._parent.missile === false)) {
this._alpha = 40;
}
if ((_parent._parent.miss === 2) || (_parent._parent.missile === true)) {
this._alpha = 100;
}
}
Instance of Symbol 117 MovieClip in Symbol 123 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.blast == undefined) {
this._visible = false;
} else {
this._visible = true;
}
if (_parent._parent.blast === false) {
this._alpha = 40;
}
if (_parent._parent.blast === true) {
this._alpha = 100;
}
}
Symbol 125 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 2
if (_parent.life < _parent.fulllife) {
_parent.life = _parent.life + 15;
}
Symbol 125 MovieClip Frame 15
if (_parent.life < _parent.fulllife) {
_parent.life = _parent.life + 15;
}
Symbol 125 MovieClip Frame 30
gotoAndStop (1);
Symbol 134 MovieClip [weaponsilo] Frame 1
_root.sidebar.nuketimer.gotoAndPlay(2);
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 134 MovieClip [weaponsilo] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.findandsplice(_parent._name);
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1500;
_parent.fulllife = 1500;
_root.friendlylist.push(_parent._name);
_parent.unittype = "weaponsilo";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 134 MovieClip [weaponsilo] Frame 1
onClipEvent (enterFrame) {
this._xscale = 400 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 134 MovieClip [weaponsilo] Frame 2
_root.enemymoney = _root.enemymoney + 10000;
Symbol 134 MovieClip [weaponsilo] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.sidebar.build.weaponsilo.gotoAndStop(1);
_root.sidebar.nuketimer.gotoAndStop(1);
_root.targeter.removeMovieClip();
_root[_name + "symbols"].removeMovieClip();
this._name = "l";
this.removeMovieClip();
stop();
Symbol 136 MovieClip [mission] Frame 1
_root.sidebar.mapp.gotoAndStop(3);
_root.scrolla = false;
this._x = this._x * 0.78;
this._y = this._y * 0.78;
unitsarray = _root.unitsarray.concat(_root.oilarray);
i = unitsarray.length - 1;
while (i > -1) {
current = unitsarray[i];
_root[current + "symbols"]._visible = false;
i--;
}
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].auto._x != undefined) {
_root[current].life = _root[current].life * 5;
_root[current].fulllife = _root[current].fulllife * 10;
}
if (_root[current].speed != undefined) {
_root[current].life = _root[current].life * 2;
_root[current].fulllife = _root[current].fulllife * 2;
_root[current].laser = true;
_root[current].auto = true;
_root[current].miss = 2;
_root[current].shell2 = true;
}
i--;
}
_root.box6._visible = false;
_root.sidebar._visible = false;
Symbol 136 MovieClip [mission] Frame 2
pp = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 136 MovieClip [mission] Frame 2
onClipEvent (enterFrame) {
_parent.pp++;
if (_parent.pp > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.pp = 0;
}
Symbol 136 MovieClip [mission] Frame 3
_root.scrolla = true;
var i = 4;
while (i > 0) {
_root.attachMovie("light", "elite" + i, _root.n);
_root["elite" + i]._x = _root.tart._x;
_root["elite" + i]._y = _root.tart._y;
_root["elite" + i].life = 500;
_root["elite" + i].fulllife = 500;
_root["elite" + i].shell2 = true;
_root["elite" + i].auto = true;
_root["elite" + i].firerate = 10;
_root.n++;
i--;
}
var i = 6;
while (i > 4) {
_root.attachMovie("rocket", "elite" + i, _root.n);
_root["elite" + i]._x = _root.tart._x;
_root["elite" + i]._y = _root.tart._y;
_root["elite" + i].miss = 2;
_root["elite" + i].damage = 75;
_root["elite" + i].seeker = true;
_root.n++;
i--;
}
var i = 9;
while (i > 6) {
_root.attachMovie("humvee", "elite" + i, _root.n);
_root["elite" + i]._x = _root.tart._x;
_root["elite" + i]._y = _root.tart._y;
_root["elite" + i].laser = true;
_root["elite" + i].speed = 8;
_root.n++;
i--;
}
var i = 10;
while (i > 9) {
_root.attachMovie("artillery", "elite" + i, _root.n);
_root["elite" + i]._x = _root.tart._x;
_root["elite" + i]._y = _root.tart._y;
_root["elite" + i].emp = true;
_root.n++;
i--;
}
nextFrame();
Instance of Symbol 46 MovieClip in Symbol 136 MovieClip [mission] Frame 3
/* no clip actions */
Symbol 136 MovieClip [mission] Frame 4
stop();
var i = 9;
while (i > 0) {
_root["elite" + i].aigoto(_root.tart3._x, _root.tart3._y);
i--;
}
var i = 4;
while (i > 0) {
_root["elite" + i].life = 700;
_root["elite" + i].fulllife = 700;
_root["elite" + i].shell2 = true;
_root["elite" + i].auto = true;
_root["elite" + i].firerate = 10;
i--;
}
var i = 6;
while (i > 4) {
_root["elite" + i].miss = 2;
_root["elite" + i].damage = 105;
_root["elite" + i].life = 500;
_root["elite" + i].fulllife = 500;
_root["elite" + i].seeker = true;
i--;
}
var i = 9;
while (i > 6) {
_root["elite" + i].laser = true;
_root["elite" + i].life = 300;
_root["elite" + i].fulllife = 300;
_root["elite" + i].speed = 8;
i--;
}
var i = 10;
while (i > 9) {
_root["elite" + i].life = 500;
_root["elite" + i].fulllife = 500;
_root["elite" + i].emp = true;
i--;
}
movetoloc(_root.elite1._x + 50, _root.elite1._y + 50);
Symbol 141 MovieClip [rad] Frame 1
timer++;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
this._alpha = this._alpha - 20;
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
_root[current].life = _root[current].life - (20 / timer);
_root[current + "symbols"].play();
}
i--;
}
if (this._alpha < 0) {
this.removeMovieClip();
}
Symbol 141 MovieClip [rad] Frame 19
timer++;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
this._alpha = this._alpha - 20;
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
_root[current].life = _root[current].life - (20 / timer);
_root[current + "symbols"].play();
}
i--;
}
if (this._alpha < 0) {
this.removeMovieClip();
}
Symbol 141 MovieClip [rad] Frame 40
gotoAndPlay (1);
Symbol 144 MovieClip [laser2] Frame 1
Symbol 144 MovieClip [laser2] Frame 2
if (((((this._x < 1000) && (this._y < 768)) && (this._x > 0)) && (this._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("la");
soundobj.start();
}
Symbol 144 MovieClip [laser2] Frame 4
_root.objarray.findandsplice(this._name);
this.removeMovieClip();
Symbol 148 MovieClip [ionbeams] Frame 1
this._alpha = 50;
Symbol 148 MovieClip [ionbeams] Frame 4
Symbol 151 MovieClip [laser] Frame 1
Symbol 151 MovieClip [laser] Frame 2
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("Las");
soundobj.start();
}
Symbol 151 MovieClip [laser] Frame 4
_root.objarray.findandsplice(this._name);
this.removeMovieClip();
Symbol 162 MovieClip Frame 1
stop();
Symbol 163 Button
on (rollOver) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("attacker");
}
}
on (rollOut) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("locator");
}
}
Symbol 170 MovieClip [enemyconstruction] Frame 1
this.cacheAsBitmap = true;
stop();
Instance of Symbol 162 MovieClip "constructor" in Symbol 170 MovieClip [enemyconstruction] Frame 1
onClipEvent (load) {
this._alpha = 50;
trace(_parent.structure + "structure");
this.gotoAndStop(_parent.structure);
}
onClipEvent (enterFrame) {
this._alpha = _parent.percent;
}
Instance of Symbol 123 MovieClip "selector" in Symbol 170 MovieClip [enemyconstruction] Frame 1
onClipEvent (load) {
_parent.constructor._alpha = 0;
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 100;
_parent.fulllife = 1000;
_root.enemyarray.push(_parent._name);
_parent.percent = 0;
_root[_parent.dozer].aigoto(_parent._x, _parent._y, false);
_root[_parent.dozer].targetbuild = _parent._name;
_root[_parent.dozer].build = true;
_root[_parent.structure] = 1;
_parent.drag = false;
_parent.unittype = "construction";
}
onClipEvent (enterFrame) {
_parent.constructor._alpha = _parent.percent;
if ((_root[_parent.dozer].life <= 0) || (_root[_parent.dozer].life == undefined)) {
_parent.gotoAndPlay("explode");
}
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 170 MovieClip [enemyconstruction] Frame 1
onClipEvent (enterFrame) {
this._xscale = 370 * (_parent.life / _parent.fulllife);
if ((_parent.life <= 0) && (!_parent.drag)) {
_parent.gotoAndPlay("explode");
}
}
Symbol 170 MovieClip [enemyconstruction] Frame 2
_root.attachMovie(structure, structure + "1", _root.n - 1000);
_root[structure + "1"]._x = this._x;
_root[structure + "1"]._y = this._y;
_root.n++;
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.sidebar.calccost();
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
Symbol 170 MovieClip [enemyconstruction] Frame 3
Symbol 170 MovieClip [enemyconstruction] Frame 12
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
_root[structure] = 0;
_root.sidebar.calccost();
this.removeMovieClip();
stop();
Symbol 181 MovieClip Frame 1
if (targetobj == undefined) {
stop();
}
dx = _root[targetobj]._x - _parent._x;
dy = _root[targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > _parent.range) {
targetobj = undefined;
stop();
}
Symbol 181 MovieClip Frame 2
_root.attachMovie("shell2", "she3ll" + _root.n, _root.n);
_root["she3ll" + _root.n]._x = _parent._x + 10;
_root["she3ll" + _root.n]._y = _parent._y + 10;
_root["she3ll" + _root.n]._rotation = this._rotation;
_root["she3ll" + _root.n].damage = _parent.damage;
_root["she3ll" + _root.n].shellspd = _parent.shellspd;
_root["she3ll" + _root.n].targetobj = targetobj;
_root["she3ll" + _root.n].hitonly = _parent.hitonly;
_root["she3ll" + _root.n].firerer = _parent._name;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["she3ll" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["she3ll" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.n++;
_root.objarray.push("she3ll" + _root.n);
Symbol 181 MovieClip Frame 4
_root.attachMovie("shell2", "she2ll" + _root.n, _root.n);
_root["she2ll" + _root.n]._x = _parent._x - 10;
_root["she2ll" + _root.n]._y = _parent._y - 10;
_root["she2ll" + _root.n]._rotation = this._rotation;
_root["she2ll" + _root.n].damage = _parent.damage;
_root["she2ll" + _root.n].shellspd = _parent.shellspd;
_root["she2ll" + _root.n].targetobj = targetobj;
_root["she2ll" + _root.n].hitonly = _parent.hitonly;
_root["she2ll" + _root.n].firerer = _parent._name;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["she2ll" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["she2ll" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.n++;
_root.objarray.push("she2ll" + _root.n);
if ((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) {
soundobj = new Sound();
soundobj.attachSound("mac");
soundobj.start();
}
Symbol 181 MovieClip Frame 6
if ((_root[targetobj].life < 0) || (_root[targetobj].life == undefined)) {
targetobj = undefined;
}
if ((!_root[targetobj].fireing) && (!_root[targetobj].walking)) {
if (_root[targetobj].aggressive) {
_root[targetobj].aiattack(_parent._name);
}
}
Symbol 181 MovieClip Frame 7
gotoAndPlay ("normal");
Symbol 186 MovieClip Frame 1
stop();
Instance of Symbol 181 MovieClip "turret" in Symbol 186 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.targetobj == undefined) {
this._rotation++;
}
}
Symbol 189 Button
on (keyPress "<Space>") {
if (_parent.drag) {
_parent.gotoAndPlay(12);
}
}
Symbol 191 MovieClip [construction2] Frame 1
stop();
Instance of Symbol 186 MovieClip "constructor" in Symbol 191 MovieClip [construction2] Frame 1
onClipEvent (load) {
this._alpha = 50;
trace(_parent.structure + "structure");
this.gotoAndStop(_parent.structure);
}
onClipEvent (enterFrame) {
this._alpha = _parent.percent;
}
Instance of Symbol 123 MovieClip "selector" in Symbol 191 MovieClip [construction2] Frame 1
onClipEvent (load) {
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = false;
_parent.life = 100;
_parent.fulllife = 500;
timer = 0;
_parent.unittype = "construction";
}
onClipEvent (enterFrame) {
if (_parent.drag) {
timer++;
_parent._y = _root._ymouse;
_parent._x = _root._xmouse;
if (Key.isDown(32)) {
_root.money = _root.money + _parent.cost;
_parent.gotoAndPlay(12);
}
}
if ((_root[_parent.dozer].life <= 0) || (_root[_parent.dozer].life == undefined)) {
_parent.gotoAndPlay("explode");
}
}
onClipEvent (mouseUp) {
hit = false;
if (_parent.drag) {
c = _root.unitsarray.length - 1;
while (c > -1) {
current2 = _root.unitsarray[c];
if (this.hitTest(_root[current2])) {
break;
}
c--;
}
}
if (((!hit) && (timer > 10)) && (_parent.drag)) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.objarray.push(_parent._name);
_root.friendlylist.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.aggressive = true;
_parent.percent = 0;
_root[_parent.dozer].aigoto(_parent._x, _parent._y, false);
_root[_parent.dozer].targetbuild = _parent._name;
_root[_parent.dozer].build = true;
_parent.drag = false;
_parent.constructor._alpha = 0;
}
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 191 MovieClip [construction2] Frame 1
onClipEvent (enterFrame) {
this._xscale = 60 * (_parent.life / _parent.fulllife);
if ((_parent._currentframe == 1) && (!_parent.drag)) {
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
}
Symbol 191 MovieClip [construction2] Frame 2
_root.attachMovie(structure, structure + _root.n, _root.n - 1000);
_root[structure + _root.n]._x = this._x;
_root[structure + _root.n]._y = this._y;
_root.n++;
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
_root.sidebar.calccost();
this.removeMovieClip();
Symbol 191 MovieClip [construction2] Frame 3
Symbol 191 MovieClip [construction2] Frame 12
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.sidebar.build[structure].gotoAndStop(1);
_root.sidebar.calccost();
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 199 MovieClip Frame 1
stop();
Symbol 202 MovieClip [construction] Frame 1
stop();
Instance of Symbol 199 MovieClip "constructor" in Symbol 202 MovieClip [construction] Frame 1
onClipEvent (load) {
this._alpha = 50;
trace(_parent.structure + "structure");
this.gotoAndStop(_parent.structure);
}
onClipEvent (enterFrame) {
this._alpha = _parent.percent;
}
Instance of Symbol 123 MovieClip "selector" in Symbol 202 MovieClip [construction] Frame 1
onClipEvent (load) {
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = false;
_parent.life = 100;
_parent.fulllife = 1000;
timer = 0;
_parent.unittype = "construction";
}
onClipEvent (enterFrame) {
_parent.constructor._alpha = _parent.percent;
if (_parent.drag) {
timer++;
_parent._y = _root._ymouse;
_parent._x = _root._xmouse;
if (Key.isDown(32)) {
_root.money = _root.money + _parent.cost;
_parent.gotoAndPlay(12);
}
}
if ((_root[_parent.dozer].life <= 0) || (_root[_parent.dozer].life == undefined)) {
_parent.gotoAndPlay("explode");
}
}
onClipEvent (mouseUp) {
hit = false;
if (_parent.drag) {
c = _root.unitsarray.length - 1;
while (c > -1) {
current2 = _root.unitsarray[c];
if (this.hitTest(_root[current2])) {
break;
}
c--;
}
}
if (((!hit) && (timer > 10)) && (_parent.drag)) {
_parent.constructor._alpha = 0;
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_root.friendlylist.push(_parent._name);
_parent.percent = 0;
_root[_parent.dozer].aigoto(_parent._x, _parent._y, false);
_root[_parent.dozer].targetbuild = _parent._name;
_root[_parent.dozer].build = true;
_parent.drag = false;
}
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 202 MovieClip [construction] Frame 1
onClipEvent (enterFrame) {
this._xscale = 370 * (_parent.life / _parent.fulllife);
if ((_parent.life <= 0) && (!_parent.drag)) {
_parent.gotoAndPlay("explode");
}
}
Symbol 202 MovieClip [construction] Frame 2
_root.attachMovie(structure, structure + "1", _root.n - 1000);
_root[structure + "1"]._x = this._x;
_root[structure + "1"]._y = this._y;
_root.n++;
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.sidebar.calccost();
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
Symbol 202 MovieClip [construction] Frame 3
Symbol 202 MovieClip [construction] Frame 12
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.sidebar.build[structure].gotoAndStop(1);
_root[_name + "symbols"].removeMovieClip();
_root.sidebar.calccost();
this.removeMovieClip();
stop();
Symbol 205 MovieClip [bigdot2] Frame 1
if (_root.comcentre1.life == undefined) {
this._visible = false;
}
stop();
Symbol 205 MovieClip [bigdot2] Frame 6
gotoAndStop (1);
Symbol 207 MovieClip [bigdot] Frame 1
if (_root.comcentre1.life == undefined) {
this._visible = false;
}
stop();
Symbol 207 MovieClip [bigdot] Frame 6
gotoAndStop (1);
Symbol 210 MovieClip [dot2] Frame 1
if (_root.comcentre1.life == undefined) {
this._visible = false;
}
stop();
Symbol 210 MovieClip [dot2] Frame 6
gotoAndStop (1);
Symbol 221 MovieClip [nuke] Frame 1
_root.objarray.push(_name);
Symbol 221 MovieClip [nuke] Frame 7
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - (0.75 * _root[current].fulllife);
}
i--;
}
Symbol 221 MovieClip [nuke] Frame 8
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - (0.25 * _root[current].fulllife);
}
i--;
}
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("exp2");
soundobj.start();
}
Symbol 221 MovieClip [nuke] Frame 10
_root.n++;
_root.attachMovie("rad", "rad" + _root.n, _root.n);
_root["rad" + _root.n]._x = this._x;
_root["rad" + _root.n]._y = this._y;
_root["rad" + _root.n]._yscale = 200;
_root["rad" + _root.n]._xscale = 200;
_root["rad" + _root.n].timer = 0;
_root.objarray.push("rad" + _root.n);
_root.n++;
if (_root.soundon) {
soundobj2 = new Sound();
soundobj2.attachSound("crash");
soundobj2.start();
}
Symbol 221 MovieClip [nuke] Frame 12
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - 100;
}
i--;
}
if (_root.soundon) {
soundobj3 = new Sound();
soundobj3.attachSound("exp");
soundobj3.start();
}
Symbol 221 MovieClip [nuke] Frame 16
_root.objarray.findandsplice(_name);
this.removeMovieClip();
stop();
Symbol 222 MovieClip [targeter] Frame 1
timer = 1;
Instance of Symbol 37 MovieClip in Symbol 222 MovieClip [targeter] Frame 1
onClipEvent (enterFrame) {
_parent._x = _root.mouse._x;
_parent._y = _root.mouse._y;
_parent.timer++;
if (Key.isDown(32)) {
_parent.removeMovieClip();
}
}
onClipEvent (mouseUp) {
if ((_parent.timer > 10) && (hit == undefined)) {
_root.attachMovie("flag2", "nuclearstrike", _root.n);
_root.nuclearstrike._x = _root.mouse._x;
_root.nuclearstrike._y = _root.mouse._y;
_root.objarray.push("nuclearstrike");
_root.n++;
hit = true;
_root.attachMovie("nukemiss", "nukemiss", _root.n);
_root.nukemiss._x = _root.weaponsilo1._x;
_root.nukemiss._y = _root.weaponsilo1._y;
_root.n++;
_parent._visible = false;
_parent.removeMovieClip();
}
}
Symbol 226 MovieClip Frame 3
if ((_parent.timer > 12) && (!_parent.hitonly)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(_parent)) {
_parent.hits = current;
_parent.play();
break;
}
i--;
}
}
if ((_parent.timer > 12) && (_parent.hitonly)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(_parent) && (_root[current].enemy == _root[_parent.targetobj].enemy)) {
_parent.hits = current;
_parent.play();
break;
}
i--;
}
}
_parent.movex = _parent.movex * 1.4;
_parent.movey = _parent.movey * 1.4;
_parent.shellspd = _parent.shellspd + 2;
if (_parent.hitTest(_root[_parent.targetobj])) {
_parent.play();
}
if (_parent.timer > 40) {
_parent.play();
}
Symbol 227 MovieClip [nukemiss2] Frame 1
_root.objarray.push(this._name);
Instance of Symbol 226 MovieClip in Symbol 227 MovieClip [nukemiss2] Frame 1
onClipEvent (enterFrame) {
_root.sidebar.enemynuketimer.gotoAndStop(2);
flag = "nuclearstrike2";
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
_parent._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (_parent._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * 10);
_parent._y = _parent._y + (Math.sin(rads) * 10);
if (_parent.hitTest(_root[flag])) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_root[flag].removeMovieClip();
_parent.walking = false;
_root.attachMovie("nuke", "nuke2", _root.n);
_root.nuke2._x = _parent._x;
_root.nuke2._y = _parent._y;
_root.n++;
_root.objarray.findandsplice(_parent._name);
_parent.removeMovieClip();
}
}
Symbol 229 MovieClip [nukemiss] Frame 1
_root.objarray.push(this._name);
_root.weaponsilo1.silodoors.gotoAndStop(1);
Instance of Symbol 226 MovieClip in Symbol 229 MovieClip [nukemiss] Frame 1
onClipEvent (enterFrame) {
_root.sidebar.nuketimer.gotoAndStop(2);
flag = "nuclearstrike";
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
_parent._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (_parent._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * 10);
_parent._y = _parent._y + (Math.sin(rads) * 10);
if (_parent.hitTest(_root[flag])) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_root[flag].removeMovieClip();
_parent.walking = false;
_root.attachMovie("nuke", "nuke", _root.n);
_root.nuke._x = _parent._x;
_root.nuke._y = _parent._y;
_root.n++;
_root.objarray.findandsplice(_parent._name);
_parent.removeMovieClip();
}
}
Symbol 231 MovieClip [padded] Frame 1
if (_root.comcentre1.life == undefined) {
}
stop();
Symbol 246 Button
on (release) {
_parent.gotoAndPlay("skirmish");
}
Symbol 254 Button
on (release) {
_parent.gotoAndPlay("options");
}
Symbol 258 Button
on (release) {
_parent.play();
}
Symbol 262 Button
on (release) {
_root.gotoAndPlay(2);
}
Symbol 266 Button
on (release) {
fscommand ("quit");
}
Instance of Symbol 249 MovieClip in Symbol 267 MovieClip Frame 6
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
if (timer == 10) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].unittype == "artillery") {
if (Math.random() > 0.9) {
_root[current].deploy();
}
}
i--;
}
}
timer++;
if (timer == 18) {
createobj2();
}
if (timer == 20) {
createobj();
}
if (timer == 42) {
_global.applyobj();
timer = 0;
}
}
Instance of Symbol 249 MovieClip in Symbol 267 MovieClip Frame 6
/* no clip actions */
Symbol 267 MovieClip Frame 16
stop();
Symbol 274 Button
on (release) {
gotoAndPlay ("reverse");
}
Symbol 280 Button
on (release) {
_root.difficulty = 2;
_root.gotoAndStop(5);
}
Symbol 285 Button
on (release) {
_root.difficulty = 4;
_root.gotoAndStop(5);
}
Symbol 289 Button
on (release) {
_root.difficulty = 6;
_root.gotoAndStop(5);
}
Symbol 294 Button
on (release) {
_root.gotoAndStop(5);
_root.loadings = true;
}
Symbol 308 Button
on (release) {
_root.screen = !_root.screen;
if (_root.screen) {
sc = "On";
}
if (!_root.screen) {
sc = "Off";
}
fscommand ("fullscreen", _root.screen);
}
Symbol 313 Button
on (release) {
_root.smart = !_root.smart;
if (_root.smart) {
smart = "On";
}
if (!_root.smart) {
smart = "Off";
}
}
Symbol 319 Button
on (release) {
i = 1;
while (i > 0) {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
break;
}
if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
break;
}
if (_root._quality == "HIGH") {
_root._quality = "BEST";
break;
}
if (_root._quality == "BEST") {
_root._quality = "LOW";
break;
}
i--;
}
qual = _root._quality;
qaul.toLowerCase();
}
Symbol 323 Button
on (release) {
_root.musicon = !_root.musicon;
if (_root.musicon) {
mus = "On";
_root.music.setVolume(100);
}
if (!_root.musicon) {
mus = "Off";
_root.music.setVolume(0);
}
}
Symbol 327 Button
on (release) {
_root.setsoundon = !_root.setsoundon;
if (_root.setsoundon) {
mute = "On";
}
if (!_root.setsoundon) {
mute = "Off";
}
}
Symbol 331 Button
on (release) {
_root.fog = !_root.fog;
if (_root.fog) {
foghorn = "On";
}
if (!_root.fog) {
foghorn = "Off";
}
}
Symbol 346 MovieClip Frame 1
this._visible = false;
Symbol 368 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
stop();
Symbol 368 MovieClip Frame 2
stop();
Instance of Symbol 358 MovieClip "back" in Symbol 368 MovieClip Frame 5
/* no clip actions */
Instance of Symbol 362 MovieClip "back" in Symbol 368 MovieClip Frame 6
/* no clip actions */
Symbol 372 Button
on (release) {
_root.currento = current;
_root.gotoAndPlay(4);
}
Symbol 377 Button
on (release) {
if (current > 0) {
current--;
}
mapname = mapsarray[current];
_root.currentlist = mapslist[current];
mapp.gotoAndStop("map" + current);
}
Symbol 378 Button
on (release) {
if (current < (mapsarray.length - 1)) {
current++;
}
mapname = mapsarray[current];
_root.currentlist = mapslist[current];
mapp.gotoAndStop("map" + current);
}
Symbol 381 Button
on (release) {
_root.ownmap5 = !_root.ownmap5;
if (!_root.owmmap5) {
shroud = "On";
}
if (_root.ownmap5) {
shroud = "Off";
}
}
Symbol 388 Button
on (release) {
if (_root.monet < 50000) {
_root.monet = _root.monet + 5000;
}
}
Symbol 389 Button
on (release) {
if (_root.monet > 5000) {
_root.monet = _root.monet - 5000;
}
}
Symbol 397 Button
on (release) {
this.lists._visible = !this.lists._visible;
this.lists2._visible = false;
}
Symbol 401 Button
on (release) {
this.lists2._visible = !this.lists2._visible;
this.lists._visible = false;
}
Symbol 409 Button
on (release) {
_root.difficulty = 3;
_parent.difficulty = "Easy Enemy";
this._visible = false;
}
Symbol 412 Button
on (release) {
_root.difficulty = 2;
_parent.difficulty = "Medium Enemy";
this._visible = false;
}
Symbol 415 Button
on (release) {
_root.difficulty = 1;
_parent.difficulty = "Hard Enemy";
this._visible = false;
}
Symbol 420 Button
on (release) {
_root.difficulty = 0.5;
_parent.difficulty = "Burtal Enemy";
this._visible = false;
}
Symbol 423 Button
on (release) {
_root.difficulty = 4;
_parent.difficulty = "Novice Enemy";
this._visible = false;
}
Symbol 431 Button
on (release) {
_root.aip = "Technology Commander";
_root.ais = 4;
this._visible = false;
}
Symbol 439 Button
on (release) {
_root.aip = "Offensive Commander";
_root.ais = 1;
this._visible = false;
}
Symbol 445 Button
on (release) {
_root.aip = "Defensive Commander";
_root.ais = 2;
this._visible = false;
}
Symbol 450 Button
on (release) {
_root.aip = "Superweapon Commander";
_root.ais = 5;
this._visible = false;
}
Symbol 457 Button
on (release) {
_root.aip = "Economic Commander";
_root.ais = 3;
this._visible = false;
}
Symbol 459 MovieClip [bar] Frame 1
stop();
Instance of Symbol 267 MovieClip in Symbol 459 MovieClip [bar] Frame 1
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
if (timer == 10) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].unittype == "artillery") {
if (Math.random() > 0.9) {
_root[current].deploy();
}
}
i--;
}
}
timer++;
if (timer == 18) {
createobj2();
}
if (timer == 20) {
createobj();
}
if (timer == 42) {
_global.applyobj();
timer = 0;
}
}
Instance of Symbol 249 MovieClip in Symbol 459 MovieClip [bar] Frame 2
onClipEvent (load) {
timer = 0;
this._visible = false;
}
onClipEvent (enterFrame) {
if (timer == 10) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].unittype == "artillery") {
if (Math.random() > 0.9) {
_root[current].deploy();
}
}
i--;
}
}
timer++;
if (timer == 18) {
createobj2();
}
if (timer == 20) {
createobj();
}
if (timer == 42) {
_global.applyobj();
timer = 0;
}
}
Symbol 459 MovieClip [bar] Frame 11
stop();
Symbol 459 MovieClip [bar] Frame 19
gotoAndStop (1);
Symbol 459 MovieClip [bar] Frame 30
stop();
Symbol 459 MovieClip [bar] Frame 41
_root.ais = "Technology Commander";
difficulty = "Medium Enemy";
_root.difficulty = 2;
mapsarray = ["Arena", "Near Oil Far", "No Man's Land", "Warring Factions", "River of Troubles", "Main Base", " Black Winter"];
mapslist = [3, 7, 9, 11, 13, 15, 17];
current = 0;
_root.ownmap5 = false;
stop();
Instance of Symbol 368 MovieClip "mapp" in Symbol 459 MovieClip [bar] Frame 41
/* no clip actions */
Instance of Symbol 424 MovieClip "lists2" in Symbol 459 MovieClip [bar] Frame 41
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 458 MovieClip "lists" in Symbol 459 MovieClip [bar] Frame 41
onClipEvent (load) {
this._visible = false;
}
Symbol 462 MovieClip Frame 1
if (_parent._parent.enemy) {
gotoAndStop ("red");
}
if (_parent._parent.ally === true) {
this._visible = false;
}
stop();
Symbol 462 MovieClip Frame 2
stop();
Symbol 463 Button
on (rollOver) {
if (_parent.enemy) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("attacker");
}
}
}
on (rollOut) {
if (_parent.enemy) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("locator");
}
}
}
on (press) {
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("blip");
soundobj.start();
}
}
Symbol 465 MovieClip Frame 1
if (_root.sidebar.build.lasertank._currentframe == 2) {
_root.sidebar.build.lasertank.gotoAndStop(13);
}
stop();
Symbol 465 MovieClip Frame 2
if (_parent.enemy) {
_root.money = _root.money + 100;
}
if (!_parent.enemy) {
_root.enemymoney = _root.enemymoney + 100;
}
_parent.turret._visible = false;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 465 MovieClip Frame 16
_root.objarray.findandsplice(_parent._name);
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
if (_root.sidebar.build.lasertank._currentframe == 13) {
_root.sidebar.build.lasertank.gotoAndStop(2);
}
_root[_parent._name + "symbols"].removeMovieClip();
_root["flag" + _parent._name].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 470 MovieClip Frame 1
dx = _root[targetobj]._x - _parent._x;
dy = _root[targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > _parent.range) {
targetobj = undefined;
stop();
}
if (targetobj == undefined) {
stop();
}
Symbol 470 MovieClip Frame 5
Symbol 470 MovieClip Frame 6
dx = -(_parent._x - _root[targetobj]._x);
dy = -(_parent._y - _root[targetobj]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
_root.attachMovie("laser2", "laser" + _root.n, _root.n);
_root["laser" + _root.n]._x = _parent._x;
_root["laser" + _root.n]._y = _parent._y;
_root["laser" + _root.n]._width = dist + 10;
_root["laser" + _root.n]._rotation = this._rotation;
_root.n++;
_root[targetobj].life = _root[targetobj].life - _parent.damage;
if (lucky == true) {
_root[targetobj].life = 0;
_parent.aggressive = true;
lucky = false;
_parent.timer = 0;
}
Symbol 470 MovieClip Frame 8
if ((!_root[targetobj].fireing) && (!_root[targetobj].walking)) {
if (_root[targetobj].aggressive) {
_root[targetobj].aiattack(_parent._name);
}
}
if ((_root[targetobj].life < 0) || (_root[targetobj].life == undefined)) {
targetobj = undefined;
}
stop();
Instance of Symbol 469 MovieClip in Symbol 470 MovieClip Frame 8
onClipEvent (enterFrame) {
n++;
if (n > _parent._parent.firerate) {
_parent.gotoAndStop(1);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 470 MovieClip Frame 11
gotoAndStop ("normal");
Symbol 471 MovieClip [lasertank] Frame 1
stop();
Instance of Symbol 465 MovieClip "dummy" in Symbol 471 MovieClip [lasertank] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.auto = false;
_parent.unittype = "lasertank";
_parent.shell2 = false;
_parent.hitonly = false;
_parent.damage = 250;
_parent.avoid = false;
_parent.vet = 0;
_parent.timer = 0;
_parent.aggressive = true;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 800;
nohit = 0;
_parent.fulllife = 800;
_parent.speed = 3;
_parent.firerate = 50;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 200;
empulse = 0;
as = 0;
left = 1;
if (_root.warfactory1._x != undefined) {
_parent.aigoto(_root.rallypoint._x, _root.rallypoint._y, false);
}
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 4)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.speed = _parent.speed * 1.5;
_parent.damage = _parent.damage * 1.6;
_parent.life = _parent.fulllife;
_parent.firerate = _parent.firerate - 7;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (_parent.attack) {
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (this.hitTest(_root[flag])) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
}
if (_parent.fireing) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 50) {
as = 0;
left = -left;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 471 MovieClip [lasertank] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 471 MovieClip [lasertank] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 471 MovieClip [lasertank] Frame 2
stop();
Symbol 473 MovieClip Frame 1
stop();
Symbol 473 MovieClip Frame 2
if (_parent.life < _parent.fulllife) {
_parent.life = _parent.life + 55;
}
Symbol 474 Button
on (rollOver) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("attacker");
}
}
on (rollOut) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("locator");
}
}
Symbol 475 MovieClip [enemyweaponsilo] Frame 1
_root.sidebar.enemynuketimer.gotoAndPlay(2);
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 475 MovieClip [enemyweaponsilo] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1500;
_parent.fulllife = 1500;
_root.enemyarray.push(_parent._name);
_parent.unittype = "weaponsilo";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 475 MovieClip [enemyweaponsilo] Frame 1
onClipEvent (enterFrame) {
this._xscale = 410 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 475 MovieClip [enemyweaponsilo] Frame 2
_root.money = _root.money + 10000;
Symbol 475 MovieClip [enemyweaponsilo] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.enemyweaponsilo = 0;
_root.sidebar.enemynuketimer.gotoAndStop(1);
_root[_name + "symbols"].removeMovieClip();
this._name = "pork";
this.removeMovieClip();
stop();
Symbol 477 Button
on (rollOver) {
if (_parent.enemy) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("attacker");
}
}
}
on (rollOut) {
if (_parent.enemy) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("locator");
}
}
}
Symbol 478 MovieClip Frame 1
stop();
Symbol 478 MovieClip Frame 2
if (_parent.enemy) {
_root.money = _root.money + 100;
}
if (!_parent.enemy) {
_root.enemymoney = _root.enemymoney + 100;
}
_parent.turret._visible = false;
Symbol 478 MovieClip Frame 8
_root.objarray.findandsplice(_parent._name);
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
_root[_parent._name + "symbols"].removeMovieClip();
_root["flag" + _parent._name].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 479 MovieClip [enemylasertank] Frame 1
stop();
Instance of Symbol 478 MovieClip "dummy" in Symbol 479 MovieClip [enemylasertank] Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.unittype = "lasertank";
_parent.damage = 250;
_parent.avoid = false;
_parent.aggressive = true;
_parent.vet = 0;
_root.enemyarray.push(_parent._name);
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 1000;
nohit = 0;
_parent.fulllife = 1000;
_parent.speed = 3;
_parent.firerate = 30;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 250;
empulse = 0;
as = 0;
left = 1;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.selector.veteran.nextFrame();
_parent.speed = _parent.speed * 1.5;
_parent.damage = _parent.damage * 1.6;
_parent.life = _parent.fulllife;
_parent.firerate = _parent.firerate - 7;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (_parent.attack) {
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (this.hitTest(_root[flag])) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
}
if (_parent.fireing) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 50) {
as = 0;
left = -left;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 479 MovieClip [enemylasertank] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 479 MovieClip [enemylasertank] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 479 MovieClip [enemylasertank] Frame 2
stop();
Symbol 481 Button
on (rollOver) {
if (_parent.enemy) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("attacker");
}
}
}
on (rollOut) {
if (_parent.enemy) {
if (_root.selectedarray.length > 0) {
_root.mouse.gotoAndStop("locator");
}
}
}
on (press) {
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("blip");
soundobj.start();
}
}
Symbol 482 MovieClip [humveeebase] Frame 1
stop();
Symbol 482 MovieClip [humveeebase] Frame 2
if (_parent.enemy) {
_root.kills++;
}
if (!_parent.enemy) {
_root.losses++;
}
_parent.turret._visible = false;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 482 MovieClip [humveeebase] Frame 11
_root.objarray.findandsplice(_parent._name);
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
_root["flag" + _parent._name].removeMovieClip();
_root[_parent._name + "symbols"].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 488 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 2
_root.attachMovie("bullet", "bullet" + _root.n, _root.n);
_root["bullet" + _root.n]._x = _parent._x;
_root["bullet" + _root.n]._y = _parent._y;
_root["bullet" + _root.n]._rotation = this._rotation;
_root["bullet" + _root.n].damage = _parent.damage;
_root["bullet" + _root.n].shellspd = _parent.shellspd;
_root["bullet" + _root.n].targetobj = targetobj;
_root["bullet" + _root.n].firerer = _parent._name;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["bullet" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["bullet" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.objarray.push("bullet" + _root.n);
_root.n++;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("mach");
soundobj.start();
}
Symbol 488 MovieClip Frame 3
if (!_parent.gatling) {
gotoAndPlay ("shoot");
}
Symbol 488 MovieClip Frame 4
_root.attachMovie("bullet", "bul2et" + _root.n, _root.n);
_root["bul2et" + _root.n]._x = _parent._x;
_root["bul2et" + _root.n]._y = _parent._y;
_root["bul2et" + _root.n]._rotation = this._rotation;
_root["bul2et" + _root.n].damage = _parent.damage;
_root["bul2et" + _root.n].shellspd = _parent.shellspd;
_root["bul2et" + _root.n].targetobj = targetobj;
_root["bull2et" + _root.n].firerer = _parent._name;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["bul2et" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["bul2et" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.objarray.push("bul2et" + _root.n);
_root.n++;
Symbol 488 MovieClip Frame 5
_root.attachMovie("bullet", "bul3et" + _root.n, _root.n);
_root["bul3et" + _root.n]._x = _parent._x;
_root["bul3et" + _root.n]._y = _parent._y;
_root["bul3et" + _root.n]._rotation = this._rotation;
_root["bul3et" + _root.n].damage = _parent.damage;
_root["bul3et" + _root.n].shellspd = _parent.shellspd;
_root["bul3et" + _root.n].targetobj = targetobj;
_root["bull3et" + _root.n].firerer = _parent._name;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["bul3et" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["bul3et" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.objarray.push("bul3et" + _root.n);
_root.n++;
Symbol 488 MovieClip Frame 6
_root.attachMovie("bullet", "bul4et" + _root.n, _root.n);
_root["bul4et" + _root.n]._x = _parent._x;
_root["bul4et" + _root.n]._y = _parent._y;
_root["bul4et" + _root.n]._rotation = this._rotation;
_root["bul4et" + _root.n].damage = _parent.damage;
_root["bul4et" + _root.n].shellspd = _parent.shellspd;
_root["bul4et" + _root.n].targetobj = targetobj;
_root["bul4et" + _root.n].firerer = _parent._name;
_root.objarray.push("bul4et" + _root.n);
rads = (this._rotation * (Math.PI*2)) / 360;
_root["bul4et" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["bul4et" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.n++;
Symbol 488 MovieClip Frame 7
stop();
if (_root[targetobj].enemy != _root[firerer].enemy) {
if (_root[targetobj].aggressive) {
if ((!_root[targetobj].fireing) && (!_root[targetobj].walking)) {
_root[targetobj].targetobj = firerer;
_root[targetobj].attack = true;
_root["flag" + targetobj].removeMovieClip();
_root.flagsarray.findandsplice("flag" + targetobj);
_root.objarray.findandsplice("flag" + targetobj);
_root.attachMovie("flag2", "flag" + targetobj, _root.n);
_root["flag" + targetobj]._visible = false;
_root["flag" + targetobj]._x = origx;
_root["flag" + targetobj]._y = origy;
_root.flagsarray.push("flag" + targetobj);
_root.objarray.push("flag" + targetobj);
_root[targetobj].walking = true;
_root.n++;
hit = true;
}
}
}
Instance of Symbol 487 MovieClip in Symbol 488 MovieClip Frame 7
onClipEvent (enterFrame) {
n++;
if (n > _parent._parent.firerate) {
_parent.gotoAndStop(1);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 488 MovieClip Frame 11
gotoAndStop ("normal");
Symbol 489 MovieClip [humveeally] Frame 1
stop();
Instance of Symbol 482 MovieClip [humveeebase] "dummy" in Symbol 489 MovieClip [humveeally] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.allyarray.push(_parent._name);
_parent.upgrade = 0;
_parent.unittype = "humvee";
_parent.laser = false;
_parent.gatling = false;
_parent.damage = 3;
_parent.avoid = true;
_parent.shellspd = 15;
_parent.aggressive = true;
this.stripe1._visible = false;
this.stripe2._visible = false;
this.stripe3._visible = false;
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 200;
_parent.fulllife = 200;
_parent.speed = 6;
_parent.firerate = 3;
_root.friendlylist.push(_parent._name);
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
charge = 0;
empulse = 0;
_parent.range = 150;
charge = 100;
as = 0;
left = 1;
_parent.ally = true;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
if (!obstacle) {
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 2)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
if (!obstacle) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 20) {
as = 0;
left = -left;
}
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 489 MovieClip [humveeally] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 489 MovieClip [humveeally] Frame 1
onClipEvent (enterFrame) {
this._xscale = 80 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_root.allyarray.findandsplice(_parent._name);
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 489 MovieClip [humveeally] Frame 2
stop();
Symbol 492 MovieClip Frame 1
self = false;
stop();
Symbol 492 MovieClip Frame 2
if (_parent.enemy) {
_root.kills++;
}
if (!_parent.enemy) {
_root.losses++;
}
_parent.turret._visible = false;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 492 MovieClip Frame 7
if (self) {
if (_parent.enemy) {
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - 100;
_root[current + "symbols"].play();
}
i--;
}
}
if (!_parent.enemy) {
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - 100;
_root[current + "symbols"].play();
}
i--;
}
}
}
Symbol 492 MovieClip Frame 10
_root.objarray.findandsplice(_parent._name);
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
_root["flag" + _parent._name].removeMovieClip();
_root[_parent._name + "symbols"].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 501 MovieClip Frame 1
stop();
Symbol 505 MovieClip Frame 1
stop();
Symbol 505 MovieClip Frame 5
_root.attachMovie("missile", "missile" + _root.n, _root.n);
_root["missile" + _root.n]._x = _parent._x;
_root["missile" + _root.n]._y = _parent._y;
_root["missile" + _root.n]._rotation = this._rotation;
_root["missile" + _root.n].damage = _parent.damage;
_root["missile" + _root.n].shellspd = _parent.shellspd;
_root["missile" + _root.n].targetobj = targetobj;
_root["missile" + _root.n].hitonly = _parent.hitonly;
_root["missile" + _root.n].blast = _parent.blast;
_root["missile" + _root.n].seeker = _parent.seeker;
_root["missile" + _root.n].firerer = _parent._name;
_root.objarray.push("missile" + _root.n);
rads = (this._rotation * (Math.PI*2)) / 360;
_root["missile" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["missile" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.n++;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("missi");
soundobj.start();
}
Symbol 505 MovieClip Frame 10
if (_parent.miss < 2) {
gotoAndPlay ("rd");
}
Symbol 505 MovieClip Frame 14
_root.attachMovie("missile", "miss2ile" + _root.n, _root.n);
_root["miss2ile" + _root.n]._x = _parent._x;
_root["miss2ile" + _root.n]._y = _parent._y;
_root["miss2ile" + _root.n]._rotation = this._rotation;
_root["miss2ile" + _root.n].damage = _parent.damage;
_root["miss2ile" + _root.n].shellspd = _parent.shellspd;
_root["miss2ile" + _root.n].targetobj = targetobj;
_root["miss2ile" + _root.n].hitonly = _parent.hitonly;
_root["miss2ile" + _root.n].blast = _parent.blast;
_root["miss2ile" + _root.n].seeker = _parent.seeker;
_root["miss2ile" + _root.n].firerer = _parent._name;
_root.objarray.push("miss2ile" + _root.n);
rads = (this._rotation * (Math.PI*2)) / 360;
_root["miss2ile" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["miss2ile" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.n++;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("missi");
soundobj.start();
}
Symbol 505 MovieClip Frame 15
if (_parent.miss < 3) {
gotoAndPlay ("rd");
}
Symbol 505 MovieClip Frame 17
_root.attachMovie("missile", "miss3ile" + _root.n, _root.n);
_root["miss3ile" + _root.n]._x = _parent._x;
_root["miss3ile" + _root.n]._y = _parent._y;
_root["miss3ile" + _root.n]._rotation = this._rotation;
_root["miss3ile" + _root.n].damage = _parent.damage;
_root["miss3ile" + _root.n].shellspd = _parent.shellspd;
_root["miss3ile" + _root.n].targetobj = targetobj;
_root["miss3ile" + _root.n].hitonly = _parent.hitonly;
_root["miss3ile" + _root.n].blast = _parent.blast;
_root["miss3ile" + _root.n].seeker = _parent.seeker;
_root["miss3ile" + _root.n].firerer = _parent._name;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["miss3ile" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["miss3ile" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.objarray.push("miss3ile" + _root.n);
_root.n++;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("missi");
soundobj.start();
}
Instance of Symbol 501 MovieClip in Symbol 505 MovieClip Frame 19
onClipEvent (enterFrame) {
n++;
if (n > _parent._parent.firerate) {
_parent.gotoAndStop(1);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 505 MovieClip Frame 45
stop();
gotoAndStop ("normal");
Symbol 506 MovieClip [rocketally] Frame 1
stop();
Instance of Symbol 492 MovieClip "dummy" in Symbol 506 MovieClip [rocketally] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.allyarray.push(_parent._name);
_parent.unittype = "rocket";
_parent.seeker = false;
_parent.hitonly = false;
_parent.blast = false;
_parent.miss = 1;
_parent.damage = 50;
_parent.shellspd = 3;
_parent.avoid = false;
_parent.aggressive = true;
_parent.turret.stripe._visible = false;
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_root.friendlylist.push(_parent._name);
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 250;
_parent.fulllife = 250;
_parent.speed = 2;
_parent.firerate = 25;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 350;
as = 0;
left = 1;
empulse = 0;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
if (!obstacle) {
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range + 150)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
}
if (_parent.fireing) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (!obstacle) {
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 45;
}
if (left < 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) + 90;
}
if (as > 70) {
as = 0;
left = -left;
}
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 506 MovieClip [rocketally] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 506 MovieClip [rocketally] Frame 1
onClipEvent (enterFrame) {
this._xscale = 110 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_root.allyarray.findandsplice(_parent._name);
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 506 MovieClip [rocketally] Frame 2
stop();
Symbol 513 MovieClip Frame 1
if (_parent.ally === true) {
this.stripe._visible = false;
}
stop();
Symbol 513 MovieClip Frame 2
if (_parent.ally === true) {
this.stripe._visible = false;
}
play();
Instance of Symbol 510 MovieClip in Symbol 513 MovieClip Frame 2
onClipEvent (enterFrame) {
n++;
if (n > 4) {
n = 0;
_parent.nextFrame();
}
}
onClipEvent (load) {
this._visible = false;
n = 0;
}
Symbol 513 MovieClip Frame 3
stop();
Symbol 513 MovieClip Frame 7
play();
Symbol 513 MovieClip Frame 11
if (_parent.ally === true) {
this.stripe._visible = false;
}
_parent.turret.gotoAndStop(2);
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
stop();
Symbol 513 MovieClip Frame 12
play();
_parent.turret._visible = false;
if (_parent.enemy) {
_root.kills++;
}
if (!_parent.enemy) {
_root.losses++;
}
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 513 MovieClip Frame 15
play();
_parent.turret._visible = false;
if (_parent.enemy) {
_root.kills++;
}
if (!_parent.enemy) {
_root.losses++;
}
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 513 MovieClip Frame 21
_root.objarray.findandsplice(_parent._name);
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
_root["flag" + _parent._name].removeMovieClip();
_root[_parent._name + "symbols"].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 523 MovieClip Frame 1
_parent.aggressive = false;
stop();
Symbol 523 MovieClip Frame 2
stop();
Symbol 523 MovieClip Frame 3
x = _root[targetobj]._x;
y = _root[targetobj]._y;
Symbol 523 MovieClip Frame 12
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("ar");
soundobj.start();
}
Symbol 523 MovieClip Frame 14
Symbol 523 MovieClip Frame 30
if (_parent.accurate) {
x = _root[targetobj]._x;
y = _root[targetobj]._y;
}
if (_parent.enemy) {
_root.attachMovie("bomb2", "bomb" + _root.n, _root.n);
}
if (!_parent.enemy) {
_root.attachMovie("bomb", "bomb" + _root.n, _root.n);
}
_root["bomb" + _root.n]._x = x;
_root["bomb" + _root.n]._y = y;
_root["bomb" + _root.n]._rotation = this._rotation;
_root["bomb" + _root.n].damage = _parent.damage;
_root["bomb" + _root.n].firerer = _parent._name;
_root["bomb" + _root.n].targetobj = targetobj;
_root["bomb" + _root.n].emp = _parent.emp;
_root["bomb" + _root.n].nuke = _parent.nuke;
_root.objarray.push("bomb" + _root.n);
_root.n++;
stop();
Instance of Symbol 510 MovieClip in Symbol 523 MovieClip Frame 30
onClipEvent (enterFrame) {
n++;
if (n > (_parent._parent.firerate - 8)) {
_parent.gotoAndStop(2);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 523 MovieClip Frame 44
gotoAndStop ("ready");
Instance of Symbol 510 MovieClip in Symbol 523 MovieClip Frame 44
onClipEvent (enterFrame) {
n++;
if (n > _parent._parent.firerate) {
_parent.gotoAndStop(1);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 524 MovieClip [artilleryally] Frame 1
stop();
Instance of Symbol 513 MovieClip "dummy" in Symbol 524 MovieClip [artilleryally] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.deploy = function () {
this.walking = false;
this.dummy.gotoAndPlay("deploying");
this.dummy._rotation = 90;
};
_parent.unittype = "artillery";
_parent.accurate = false;
_parent.nuke = false;
_parent.emp = false;
_parent.damage = 35;
_parent.aggressive = false;
this.stripe._visible = false;
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 300;
_root.friendlylist.push(_parent._name);
_parent.fulllife = 300;
_parent.speed = 1;
_parent.firerate = 30;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 550;
_root.allyarray.push(_parent._name);
empulse = 0;
n = 0;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (((!_parent.walking) && (!_parent.fireing)) && (_parent.aggressive)) {
lo = Math.floor(Math.random() * (_root.enemyarray.length - 1));
unit = _root.enemyarray[lo];
_parent.aiattack(unit);
}
if (this._currentframe == 11) {
n++;
if (n == 10) {
n = 0;
if (!_parent.fireing) {
n = _root.enemyarray.length - 1;
while (n > -1) {
current2 = _root.enemyarray[n];
dx = -(_parent._x - _root[current2]._x);
dy = -(_parent._y - _root[current2]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.targetobj = current2;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
hit = true;
}
n--;
}
}
}
}
if (_parent.attack) {
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
if (this._currentframe == 1) {
_parent.walking = false;
this._rotation = 90;
gotoAndPlay ("deploying");
_parent.fireing = true;
}
}
}
if (_parent.walking == true) {
if ((this._currentframe > 1) && (_parent.life > 0)) {
gotoAndStop (1);
_parent.turret.gotoAndStop(1);
}
if (this._currentframe == 1) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > this.num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 2) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
} else {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 524 MovieClip [artilleryally] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 524 MovieClip [artilleryally] Frame 1
onClipEvent (enterFrame) {
this._xscale = 110 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe <= 11) {
if (_parent.life <= 0) {
_root.allyarray.findandsplice(_parent._name);
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 524 MovieClip [artilleryally] Frame 2
stop();
Symbol 527 MovieClip Frame 1
stop();
Symbol 527 MovieClip Frame 2
if (_parent.enemy) {
_root.money = _root.money + 500;
}
if (!_parent.enemy) {
_root.enemymoney = _root.enemymoney + 500;
}
_parent.turret._visible = false;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 527 MovieClip Frame 12
_root.objarray.findandsplice(_parent._name);
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root["flag" + _parent._name].removeMovieClip();
_root[_parent._name + "symbols"].removeMovieClip();
_root.sidebar.calccost();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 530 MovieClip Frame 1
stop();
Symbol 530 MovieClip Frame 4
_root.attachMovie("shell", "shell" + _root.n, _root.n);
_root["shell" + _root.n]._x = _parent._x;
_root["shell" + _root.n]._y = _parent._y;
_root["shell" + _root.n]._rotation = this._rotation;
_root["shell" + _root.n].damage = _parent.damage;
_root["shell" + _root.n].shellspd = _parent.shellspd;
_root["shell" + _root.n].targetobj = targetobj;
_root["shell" + _root.n].hitonly = _parent.hitonly;
_root["shell" + _root.n].firerer = _parent._name;
_root.objarray.push("shell" + _root.n);
rads = (this._rotation * (Math.PI*2)) / 360;
_root["shell" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["shell" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.n++;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("cannon6");
soundobj.start();
}
Symbol 530 MovieClip Frame 5
if (_parent.missile) {
_root.attachMovie("missile", "missile" + _root.n, _root.n);
_root["missile" + _root.n]._x = _parent._x;
_root["missile" + _root.n]._y = _parent._y;
_root["missile" + _root.n]._rotation = this._rotation;
_root["missile" + _root.n].damage = _parent.damage / 2;
_root["missile" + _root.n].shellspd = _parent.shellspd / 2;
_root["missile" + _root.n].targetobj = targetobj;
_root["missile" + _root.n].hitonly = _parent.hitonly;
_root.objarray.push("missile" + _root.n);
rads = (this._rotation * (Math.PI*2)) / 360;
_root["missile" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["missile" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.n++;
}
Symbol 530 MovieClip Frame 6
_root.attachMovie("shell", "she2ll" + _root.n, _root.n);
_root["she2ll" + _root.n]._x = _parent._x;
_root["she2ll" + _root.n]._y = _parent._y - 20;
_root["she2ll" + _root.n]._rotation = this._rotation;
_root["she2ll" + _root.n].damage = _parent.damage;
_root["she2ll" + _root.n].shellspd = _parent.shellspd;
_root["she2ll" + _root.n].targetobj = targetobj;
_root["she2ll" + _root.n].hitonly = _parent.hitonly;
_root["she2ll" + _root.n].firerer = _parent._name;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["she2ll" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["she2ll" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.objarray.push("she2ll" + _root.n);
_root.n++;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("cannon6");
soundobj.start();
}
Symbol 530 MovieClip Frame 7
if (_parent.missile) {
_root.attachMovie("missile", "miss2ile" + _root.n, _root.n);
_root["miss2ile" + _root.n]._x = _parent._x;
_root["miss2ile" + _root.n]._y = _parent._y - 40;
_root["miss2ile" + _root.n]._rotation = this._rotation;
_root["miss2ile" + _root.n].damage = _parent.damage / 2;
_root["miss2ile" + _root.n].shellspd = _parent.shellspd / 2;
_root["miss2ile" + _root.n].targetobj = targetobj;
_root["miss2ile" + _root.n].hitonly = _parent.hitonly;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["miss2ile" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["miss2ile" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.objarray.push("miss2ile" + _root.n);
_root.n++;
}
Symbol 530 MovieClip Frame 10
if (shell2) {
_root.attachMovie("shell", "she2ll" + _root.n, _root.n);
_root["she2ll" + _root.n]._x = _parent._x;
_root["she2ll" + _root.n]._y = _parent._y;
_root["she2ll" + _root.n]._rotation = this._rotation;
_root["she2ll" + _root.n].damage = _parent.damage;
_root["she2ll" + _root.n].shellspd = _parent.shellspd;
_root["she2ll" + _root.n].targetobj = targetobj;
_root["she2ll" + _root.n].hitonly = _parent.hitonly;
_root.objarray.push("she2ll" + _root.n);
}
if ((!_root[targetobj].fireing) && (!_root[targetobj].walking)) {
if (_root[targetobj].aggressive) {
_root[targetobj].targetobj = firerer;
_root[targetobj].attack = true;
_root["flag" + targetobj].removeMovieClip();
_root.flagsarray.findandsplice("flag" + targetobj);
_root.objarray.findandsplice("flag" + targetobj);
_root.attachMovie("flag2", "flag" + targetobj, _root.n);
_root["flag" + targetobj]._visible = false;
_root["flag" + targetobj]._x = origx;
_root["flag" + targetobj]._y = origy;
_root.flagsarray.push("flag" + targetobj);
_root.objarray.push("flag" + targetobj);
_root[targetobj].walking = true;
_root.n++;
hit = true;
}
}
Instance of Symbol 46 MovieClip in Symbol 530 MovieClip Frame 10
onClipEvent (enterFrame) {
n++;
if (n > _parent._parent.firerate) {
_parent.gotoAndStop(1);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 530 MovieClip Frame 30
if (shell2) {
_root.attachMovie("shell", "she2ll" + _root.n, _root.n);
_root["she2ll" + _root.n]._x = _parent._x;
_root["she2ll" + _root.n]._y = _parent._y;
_root["she2ll" + _root.n]._rotation = this._rotation;
_root["she2ll" + _root.n].damage = _parent.damage;
_root["she2ll" + _root.n].shellspd = _parent.shellspd;
_root["she2ll" + _root.n].targetobj = targetobj;
_root["she2ll" + _root.n].hitonly = _parent.hitonly;
_root.objarray.push("she2ll" + _root.n);
}
gotoAndStop ("normal");
Symbol 531 MovieClip [heavyally] Frame 1
stop();
Instance of Symbol 527 MovieClip "dummy" in Symbol 531 MovieClip [heavyally] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.auto = false;
_parent.unittype = "heavy";
_parent.crush = false;
_parent.missile = false;
_parent.hitonly = false;
_parent.avoid = false;
_parent.damage = 30;
_root.allyarray.push(_parent._name);
_parent.shellspd = 12;
_parent.aggressive = true;
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_root.friendlylist.push(_parent._name);
_parent.turret.stripe._visible = false;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 600;
_parent.fulllife = 600;
_parent.speed = 1;
_parent.firerate = 20;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 200;
as = 0;
left = 1;
empulse = 0;
lo = Math.floor(Math.random() * (_root.enemyarray.length - 1));
unit = _root.enemyarray[lo];
_parent.aiattack(unit);
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if ((!_parent.walking) && (!_parent.fireing)) {
lo = Math.floor(Math.random() * (_root.enemyarray.length - 1));
unit = _root.enemyarray[lo];
_parent.aiattack(unit);
}
if (_parent.attack) {
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
if (!obstacle) {
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
}
if (_parent.fireing) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.crush) {
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
if ((dist < 10) && (_root[_parent.targetobj].auto._x == undefined)) {
_root[_parent.targetobj].life = -1;
_parent._x = _root[_parent.targetobj]._x;
_parent._y = _root[_parent.targetobj]._y;
}
}
if (_parent.avoid) {
if (!obstacle) {
as++;
if (left > 0) {
if (!_parent.crush) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) + 90;
}
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 100) {
as = 0;
}
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 531 MovieClip [heavyally] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 531 MovieClip [heavyally] Frame 1
onClipEvent (enterFrame) {
this._xscale = 115 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_root.allyarray.findandsplice(_parent._name);
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 531 MovieClip [heavyally] Frame 2
stop();
Symbol 535 MovieClip Frame 1
stop();
Symbol 535 MovieClip Frame 2
stop();
Symbol 535 MovieClip Frame 3
_parent._x = _root.refinery1._x;
_parent._y = _root.refinery1._y + 30;
this._rotation = 90;
_parent.movesym();
play();
Symbol 535 MovieClip Frame 4
if (_parent.oil > 0) {
_root.money = _root.money + 750;
_parent.oil = _parent.oil - 20;
}
Symbol 535 MovieClip Frame 5
if (_parent.oil > 0) {
_root.money = _root.money + 250;
_parent.oil = _parent.oil - 20;
}
Symbol 535 MovieClip Frame 6
if (_parent.oil > 0) {
_root.money = _root.money + 150;
_parent.oil = _parent.oil - 20;
}
Symbol 535 MovieClip Frame 7
if (_parent.oil > 0) {
_root.money = _root.money + 250;
_parent.oil = _parent.oil - 20;
}
Symbol 535 MovieClip Frame 8
if (_parent.oil > 0) {
_root.money = _root.money + 150;
_parent.oil = _parent.oil - 20;
}
refinery = false;
gotoAndStop (1);
Symbol 535 MovieClip Frame 9
if (_parent.enemy) {
_root.money = _root.money + 200;
}
if (!_parent.enemy) {
_root.enemymoney = _root.enemymoney + 200;
}
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 535 MovieClip Frame 20
if (_parent.enemy) {
_root.money = _root.money + 200;
}
if (!_parent.enemy) {
_root.enemymoney = _root.enemymoney + 200;
}
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 535 MovieClip Frame 22
_root.unitsarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.oiltruckarray.findandsplice(_parent._name);
_root.sidebar.calccost();
_root[_parent._name + "symbols"].removeMovieClip();
_root["flag" + _parent._name].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 536 MovieClip [oiltruck] Frame 1
stop();
Instance of Symbol 535 MovieClip "dummy" in Symbol 536 MovieClip [oiltruck] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.gotooil = function () {
var _local3 = 100000000 /* 0x5F5E100 */;
var _local4 = "";
i = _root.oilarray.length - 1;
while (i > -1) {
current = _root.oilarray[i];
if (_root[current].oilspill._xscale > 0) {
dx = this._x - _root[current]._x;
dy = this._y - _root[current]._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _local3) {
_local3 = dist;
_local4 = current;
}
}
i--;
}
this.aigoto(_root[_local4]._x, _root[_local4]._y, false);
this.dummy.oil = _local4;
};
_parent.auto = false;
_root.oiltruckarray.push(_parent._name);
_parent.unittype = "oiltruck";
_parent.oil = 0;
_parent.fulloil = 100;
_parent.aggressive = false;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 500;
_parent.fulllife = 500;
_parent.speed = 3;
_parent.walking = false;
refinery = false;
as = 0;
left = 1;
empulse = 0;
}
onClipEvent (enterFrame) {
if (((!_parent.walking) && (this._currentframe == 1)) && (!refinery)) {
_parent.gotooil();
}
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (!refinery) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
}
if (refinery) {
dx = _root.refinery1._x - _parent._x;
dy = _root.refinery1._y - _parent._y;
}
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
if (this.hitTest(_root[flag]) && (!refinery)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
if (oil != undefined) {
if (_root[oil].oilspill._xscale <= 0) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
oil = undefined;
_parent.walking = false;
gotoAndStop (1);
}
if (this.hitTest(_root[oil].oilspill)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
gotoAndStop ("sucking");
}
}
if (refinery) {
if (this.hitTest(_root.refinery1.pad)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
gotoAndStop ("refining");
}
}
}
}
if (this._currentframe == 2) {
if (_parent.oil < 100) {
_parent.oil++;
_root[oil].oilspill._xscale = _root[oil].oilspill._xscale - 0.02;
_root[oil].oilspill._yscale = _root[oil].oilspill._yscale - 0.02;
}
if (_root[oil].oilspill._xscale < 0) {
gotoAndStop (1);
}
if (_parent.oil == 100) {
gotoAndStop (1);
if (_root.refinery > 0) {
_parent.aigoto(_root.refinery1._x, _root.refinery1._y - 20, false);
} else {
_parent.oil = 0;
}
oil = undefined;
refinery = true;
}
}
if (this._currentframe == 8) {
_parent.gotooil();
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 536 MovieClip [oiltruck] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 536 MovieClip [oiltruck] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe < 9) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Instance of Symbol 128 MovieClip "oilbar" in Symbol 536 MovieClip [oiltruck] Frame 1
onClipEvent (enterFrame) {
this._xscale = 60 * (_parent.oil / _parent.fulloil);
}
Symbol 536 MovieClip [oiltruck] Frame 2
stop();
Symbol 538 MovieClip Frame 1
stop();
Symbol 538 MovieClip Frame 2
if (_parent.enemy) {
_root.kills++;
}
if ((!_parent.enemy) && (!(_parent.ally === true))) {
soundobj = new Sound();
soundobj.attachSound("unitloss");
soundobj.start();
_root.losses++;
}
_parent.turret._visible = false;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 538 MovieClip Frame 12
_root.objarray.findandsplice(_parent._name);
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
_root[_parent._name + "symbols"].removeMovieClip();
_root["flag" + _parent._name].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 542 MovieClip Frame 1
stop();
Symbol 542 MovieClip Frame 4
_root.attachMovie("shell", "shell" + _root.n, _root.n);
_root["shell" + _root.n]._x = _parent._x;
_root["shell" + _root.n]._y = _parent._y;
_root["shell" + _root.n]._rotation = this._rotation;
_root["shell" + _root.n].damage = _parent.damage;
_root["shell" + _root.n].shellspd = _parent.shellspd;
_root["shell" + _root.n].targetobj = targetobj;
_root["shell" + _root.n].hitonly = _parent.hitonly;
_root["shell" + _root.n].firerer = _parent._name;
rads = (this._rotation * (Math.PI*2)) / 360;
_root["shell" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["shell" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.objarray.push("shell" + _root.n);
_root.n++;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("lights");
soundobj.start();
}
Symbol 542 MovieClip Frame 10
if (_parent.shell2) {
_root.attachMovie("shell", "she2ll" + _root.n, _root.n);
_root["she2ll" + _root.n]._x = _parent._x;
_root["she2ll" + _root.n]._y = _parent._y;
_root["she2ll" + _root.n]._rotation = this._rotation;
_root["she2ll" + _root.n].damage = _parent.damage;
_root["she2ll" + _root.n].shellspd = _parent.shellspd;
_root["she2ll" + _root.n].targetobj = targetobj;
_root["she2ll" + _root.n].hitonly = _parent.hitonly;
_root["she2ll" + _root.n].firerer = _parent._name;
_root.objarray.push("she2ll" + _root.n);
rads = (this._rotation * (Math.PI*2)) / 360;
_root["she2ll" + _root.n].movex = Math.cos(rads) * _parent.shellspd;
_root["she2ll" + _root.n].movey = Math.sin(rads) * _parent.shellspd;
_root.n++;
}
if ((!_root[targetobj].walking) && (!_root[targetobj].fireing)) {
if (_root[targetobj].aggressive) {
_root[targetobj].aiattack(_parent._name);
}
}
Instance of Symbol 46 MovieClip in Symbol 542 MovieClip Frame 10
onClipEvent (enterFrame) {
n++;
if (n > _parent._parent.firerate) {
_parent.gotoAndStop(1);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 542 MovieClip Frame 16
gotoAndStop ("normal");
Symbol 543 MovieClip [lightally] Frame 1
stop();
Instance of Symbol 538 MovieClip "dummy" in Symbol 543 MovieClip [lightally] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.auto = false;
_parent.unittype = "light";
_parent.shell2 = false;
_parent.hitonly = false;
_parent.damage = 20;
_root.allyarray.push(_parent._name);
_parent.shellspd = 10;
_parent.aggressive = true;
this.stripe._visible = false;
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
_root.friendlylist.push(_parent._name);
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 300;
nohit = 0;
_parent.avoid = true;
_parent.fulllife = 300;
_parent.speed = 3;
_parent.firerate = 5;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 200;
empulse = 0;
as = 0;
left = 1;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
if (!obstacle) {
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (_parent._width / 2);
_parent._y = _parent._y + (_parent._height / 2);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (_parent._width / 2);
_parent._y = _parent._y - (_parent._height / 2);
}
break;
}
}
i--;
}
nohit = 0;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
}
if (_parent.fireing) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (!obstacle) {
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) + 135;
}
if (as > 50) {
as = 0;
left = -left;
}
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 543 MovieClip [lightally] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 543 MovieClip [lightally] Frame 1
onClipEvent (enterFrame) {
this._xscale = 90 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_root.allyarray.findandsplice(_parent._name);
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 543 MovieClip [lightally] Frame 2
stop();
Symbol 547 MovieClip Frame 1
stop();
Symbol 547 MovieClip Frame 2
stop();
Symbol 547 MovieClip Frame 3
_parent._x = _root.enemyrefinery1._x;
_parent._y = _root.enemyrefinery1._y + 30;
this._rotation = 90;
_parent.movesym();
play();
Symbol 547 MovieClip Frame 4
if (_parent.oil > 0) {
_root.enemymoney = _root.enemymoney + 150;
_parent.oil = _parent.oil - 20;
}
Symbol 547 MovieClip Frame 5
if (_parent.oil > 0) {
_root.enemymoney = _root.enemymoney + 250;
_parent.oil = _parent.oil - 20;
}
Symbol 547 MovieClip Frame 6
if (_parent.oil > 0) {
_root.enemymoney = _root.enemymoney + 250;
_parent.oil = _parent.oil - 20;
}
Symbol 547 MovieClip Frame 7
if (_parent.oil > 0) {
_root.enemymoney = _root.enemymoney + 150;
_parent.oil = _parent.oil - 20;
}
Symbol 547 MovieClip Frame 8
if (_parent.oil > 0) {
_root.enemymoney = _root.enemymoney + 650;
_parent.oil = _parent.oil - 20;
}
refinery = false;
gotoAndStop (1);
Symbol 547 MovieClip Frame 9
if (_parent.enemy) {
_root.kills++;
}
if (!_parent.enemy) {
_root.losses++;
}
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 547 MovieClip Frame 20
if (_parent.enemy) {
_root.kills++;
}
if (!_parent.enemy) {
_root.losses++;
}
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 547 MovieClip Frame 21
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.enemyoiltruckarrray.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
_root.enemyoiltrucks--;
_root[_parent._name + "symbols"].removeMovieClip();
_root["flag" + _parent._name].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 548 MovieClip [enemyoiltruck] Frame 1
stop();
Instance of Symbol 547 MovieClip "dummy" in Symbol 548 MovieClip [enemyoiltruck] Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemyoiltrucks++;
_parent.gotooil = function () {
var _local3 = 100000000 /* 0x5F5E100 */;
var _local4 = "";
i = _root.oilarray.length - 1;
while (i > -1) {
current = _root.oilarray[i];
if (_root[current].oilspill._xscale > 0) {
dx = this._x - _root[current]._x;
dy = this._y - _root[current]._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _local3) {
_local3 = dist;
_local4 = current;
}
}
i--;
}
this.dummy.oil = _local4;
this.aigoto(_root[_local4]._x, _root[_local4]._y, false);
};
_parent.auto = false;
_root.enemyoiltruckarray.push(_parent._name);
_parent.unittype = "oiltruck";
_parent.oil = 0;
_parent.fulloil = 100;
_parent.aggressive = false;
_root.enemyarray.push(_parent._name);
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 500;
_parent.fulllife = 500;
_parent.speed = 3;
_parent.walking = false;
refinery = false;
as = 0;
left = 1;
empulse = 0;
}
onClipEvent (enterFrame) {
if (((!_parent.walking) && (this._currentframe == 1)) && (!refinery)) {
_parent.gotooil();
}
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (!refinery) {
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
}
if (refinery) {
if (!obstacle) {
dx = _root.enemyrefinery1._x - _parent._x;
dy = _root.enemyrefinery1._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
if (this.hitTest(_root[flag2])) {
obstacle = false;
flag2 = undefined;
}
if (this.hitTest(_root[flag]) && (!refinery)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
if (oil != undefined) {
if (_root[oil].oilspill._xscale <= 0) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
oil = undefined;
_parent.walking = false;
gotoAndStop (1);
}
if (this.hitTest(_root[oil].oilspill)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
gotoAndStop ("sucking");
}
}
if (refinery) {
if (this.hitTest(_root.enemyrefinery1.pad)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
gotoAndStop ("refining");
}
}
}
}
if (this._currentframe == 2) {
if (_parent.oil < 100) {
_parent.oil++;
_root[oil].oilspill._xscale = _root[oil].oilspill._xscale - 0.02;
_root[oil].oilspill._yscale = _root[oil].oilspill._yscale - 0.02;
}
if (_root[oil].oilspill._xscale < 0) {
gotoAndStop (1);
}
if (_parent.oil == 100) {
gotoAndStop (1);
if (_root.enemyrefinery1.life != undefined) {
_parent.aigoto(_root.enemyrefinery1._x, _root.enemyrefinery1._y - 20, false);
} else {
_parent.oil = 0;
}
oil = undefined;
refinery = true;
}
}
if (this._currentframe == 8) {
_parent.gotooil();
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 548 MovieClip [enemyoiltruck] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 548 MovieClip [enemyoiltruck] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe < 9) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 548 MovieClip [enemyoiltruck] Frame 2
stop();
Symbol 557 MovieClip Frame 1
stop();
Instance of Symbol 553 MovieClip in Symbol 557 MovieClip Frame 20
onClipEvent (enterFrame) {
_parent.t++;
_parent._x = _parent._x + _parent.movex;
_parent._y = _parent._y + _parent.movey;
if (_parent.hitTest(_root[_parent.targetobj])) {
_parent.play();
}
if (_parent.t > 11) {
_parent.play();
}
}
Instance of Symbol 553 MovieClip in Symbol 557 MovieClip Frame 25
onClipEvent (enterFrame) {
_parent.t++;
_parent._x = _parent._x + _parent.movex;
_parent._y = _parent._y + _parent.movey;
if (_parent.hitTest(_root[_parent.targetobj])) {
_parent.play();
}
if (_parent.t > 11) {
_parent.play();
}
}
Symbol 558 MovieClip [servicedepot] Frame 1
_root.servicedepot = 1;
_root.sidebar.serviceepot.gotoAndStop(3);
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 558 MovieClip [servicedepot] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_root.friendlylist.push(_parent._name);
_parent.unittype = "servicedepot";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 558 MovieClip [servicedepot] Frame 1
onClipEvent (enterFrame) {
this._xscale = 380 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 558 MovieClip [servicedepot] Frame 2
_root.enemymoney = _root.enemymoney + 5000;
Symbol 558 MovieClip [servicedepot] Frame 13
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.servicedepot--;
_root[_name + "symbols"].removeMovieClip();
this._name = "popp";
this.removeMovieClip();
stop();
Symbol 560 MovieClip [techcentre] Frame 1
names = this._name;
this.cacheAsBitmap = true;
_root.sidebar.build.techcentre.gotoAndStop(3);
if ((_root.money > _root.sidebar.build.lasertank.cost) && (_root.warfactory1._x != undefined)) {
if (_root.sidebar.build.lasertank._currentframe == 1) {
_root.sidebar.build.lasertank.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.weaponsilo.cost) {
if (_root.sidebar.build.weaponsilo._currentframe == 1) {
_root.sidebar.build.weaponsilo.gotoAndStop(2);
}
}
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 560 MovieClip [techcentre] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = false;
_root.objarray.findandsplice(_parent._name);
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_root.friendlylist.push(_parent._name);
_parent.unittype = "techcentre";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 560 MovieClip [techcentre] Frame 1
onClipEvent (enterFrame) {
this._xscale = 240 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 560 MovieClip [techcentre] Frame 2
_root.enemymoney = _root.enemymoney + 1500;
Symbol 560 MovieClip [techcentre] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
_root.structurearray.findandsplice(_name);
_root.techcentre = 0;
_root.sidebar.build.techcentre.gotoAndStop(1);
_root.sidebar.build.lasertank.gotoAndStop(1);
if (_root.sidebar.build.weaponsilo._currentframe == 2) {
_root.sidebar.build.weaponsilo.gotoAndStop(1);
}
this._name = "";
this.removeMovieClip();
stop();
Symbol 562 MovieClip [warfactory] Frame 1
_root.warfactory = 1;
this.cacheAsBitmap = true;
_root.rallypoint._x = this._x;
_root.rallypoint._y = this._y;
_root.sidebar.build.warfactory.gotoAndStop(3);
if (_root.money > _root.sidebar.build.light.cost) {
if (_root.sidebar.build.light._currentframe == 1) {
_root.sidebar.build.light.gotoAndStop(2);
}
}
if ((_root.money > _root.sidebar.build.lasertank.cost) && (_root.techcentre1._x != undefined)) {
if (_root.sidebar.build.lasertank._currentframe == 1) {
_root.sidebar.build.lasertank.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.heavy.cost) {
if (_root.sidebar.build.heavy._currentframe == 1) {
_root.sidebar.build.heavy.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.rocket.cost) {
if (_root.sidebar.build.rocket._currentframe == 1) {
_root.sidebar.build.rocket.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.humvee.cost) {
if (_root.sidebar.build.humvee._currentframe == 1) {
_root.sidebar.build.humvee.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.artillery.cost) {
if (_root.sidebar.build.artillery._currentframe == 1) {
_root.sidebar.build.artillery.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.oiltruck.cost) {
if (_root.sidebar.build.oiltruck._currentframe == 1) {
_root.sidebar.build.oiltruck.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.techcentre.cost) {
if (_root.sidebar.build.techcentre._currentframe == 1) {
_root.sidebar.build.techcentre.gotoAndStop(2);
}
}
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 562 MovieClip [warfactory] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_root.friendlylist.push(_parent._name);
_parent.unittype = "war factory";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 562 MovieClip [warfactory] Frame 1
onClipEvent (enterFrame) {
this._xscale = 290 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 562 MovieClip [warfactory] Frame 2
_root.sidebar.build.light.gotoAndStop(1);
_root.sidebar.build.humvee.gotoAndStop(1);
_root.sidebar.build.heavy.gotoAndStop(1);
_root.sidebar.build.rocket.gotoAndStop(1);
_root.sidebar.build.artillery.gotoAndStop(1);
_root.sidebar.build.oiltruck.gotoAndStop(1);
_root.sidebar.build.lasertank.gotoAndStop(1);
_root.sidebar.build.buildlist = [];
_root.enemymoney = _root.enemymoney + 2000;
Symbol 562 MovieClip [warfactory] Frame 12
_root.sidebar.build.buildlist = [];
Symbol 562 MovieClip [warfactory] Frame 13
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.rallypoint._y = -100;
_root.rallypoint._x = -100;
_root[_name + "symbols"].removeMovieClip();
_root.structurearray.findandsplice(_name);
_root.warfactory = 0;
_root.sidebar.calccost();
_root.sidebar.build.warfactory.gotoAndStop(1);
if (_root.sidebar.build.techcentre._currentframe == 2) {
_root.sidebar.build.techcentre.gotoAndStop(1);
}
this._name = "noob";
this.removeMovieClip();
stop();
Symbol 564 MovieClip [refinery] Frame 1
if (!(_root.nooiltruck === true)) {
_root.attachMovie("oiltruck", "oiltruck" + _root.n, _root.n);
_root["oiltruck" + _root.n]._x = this._x;
_root["oiltruck" + _root.n]._y = this._y;
_root["oiltruck" + _root.n]._rotation = 0;
}
if (_root.money > _root.sidebar.build.servicedepot.cost) {
if (_root.sidebar.build.servicedepot._currentframe == 1) {
_root.sidebar.build.servicedepot.gotoAndStop(2);
}
}
_root.sidebar.build.refinery.gotoAndStop(3);
_root.n++;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 564 MovieClip [refinery] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.refinery = 1;
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1700;
_parent.fulllife = 1700;
_root.friendlylist.push(_parent._name);
_parent.unittype = "refinery";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 564 MovieClip [refinery] Frame 1
onClipEvent (enterFrame) {
this._xscale = 400 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 564 MovieClip [refinery] Frame 2
_root.enemymoney = _root.enemymoney + 5000;
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 564 MovieClip [refinery] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
this._name = "no2ob";
_root.refinery = 0;
if (_root.sidebar.build.servicedepot._currentframe == 2) {
_root.sidebar.build.servicedepot.gotoAndStop(1);
}
_root.sidebar.build.refinery.gotoAndStop(1);
this.removeMovieClip();
stop();
Symbol 566 MovieClip [comcentre] Frame 1
_root.comcentre = 1;
this.cacheAsBitmap = true;
_root.sidebar.radarscreen.gotoAndStop(2);
_root.sidebar.build.comcentre.gotoAndStop(3);
if (_root.sidebar._visible) {
unitsarray = _root.unitsarray.concat(_root.oilarray);
i = unitsarray.length - 1;
while (i > -1) {
current = unitsarray[i];
_root[current + "symbols"]._visible = true;
i--;
}
_root.box6._visible = true;
}
if (_root.money > _root.sidebar.build.dozer.cost) {
if (_root.sidebar.build.dozer._currentframe == 1) {
_root.sidebar.build.dozer.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.refinery.cost) {
if (_root.sidebar.build.refinery._currentframe == 1) {
_root.sidebar.build.refinery.gotoAndStop(2);
}
}
if (_root.money > _root.sidebar.build.warfactory.cost) {
if (_root.sidebar.build.warfactory._currentframe == 1) {
_root.sidebar.build.warfactory.gotoAndStop(2);
}
}
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 566 MovieClip [comcentre] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 2000;
_parent.fulllife = 2000;
_root.friendlylist.push(_parent._name);
_parent.unittype = "comcentre";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 566 MovieClip [comcentre] Frame 1
onClipEvent (enterFrame) {
this._xscale = 370 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 566 MovieClip [comcentre] Frame 2
_root.enemymoney = _root.enemymoney + 5000;
_root.sidebar.build.dozer.gotoAndStop(1);
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 566 MovieClip [comcentre] Frame 11
_root.objarray.findandsplice(_name);
_root.sidebar.radarscreen.gotoAndStop(1);
_root.unitsarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.comcentre--;
_root.sidebar.build.comcentre.gotoAndStop(1);
unitsarray = _root.unitsarray.concat(_root.oilarray);
i = unitsarray.length - 1;
while (i > -1) {
current = unitsarray[i];
_root[current + "symbols"]._visible = false;
i--;
}
_root.box6._visible = false;
_root[_name + "symbols"].removeMovieClip();
this._name = "noo2b";
this.removeMovieClip();
stop();
Symbol 568 MovieClip Frame 1
stop();
Symbol 568 MovieClip Frame 2
if (_parent.enemy) {
_root.kills++;
}
if (!_parent.enemy) {
_root.losses++;
}
_parent.turret._visible = false;
if (((((_parent._x < 1000) && (_parent._y < 768)) && (_parent._x > 0)) && (_parent._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 568 MovieClip Frame 11
_root.objarray.findandsplice(_parent._name);
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.apcarray.findandsplice(_parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
_root["flag" + _parent._name].removeMovieClip();
_root[_parent._name + "symbols"].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 569 MovieClip [apc] Frame 1
stop();
Instance of Symbol 568 MovieClip "dummy" in Symbol 569 MovieClip [apc] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.unittype = "apc";
_root.apcarray.push(_parent._name);
_parent.avoid = false;
_parent.aggressive = false;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 1500;
_parent.fulllife = 1500;
_parent.speed = 2;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
empulse = 0;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
if (!obstacle) {
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 569 MovieClip [apc] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 569 MovieClip [apc] Frame 1
onClipEvent (enterFrame) {
this._xscale = 160 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 569 MovieClip [apc] Frame 2
stop();
Symbol 582 Button
on (release) {
_root.gotoAndStop("end");
}
Symbol 586 Button
on (release) {
share = SharedObject.getLocal("save");
share.data.currentframe = _root._currentframe;
share.flush();
_visible = false;
this._x = 100;
}
Instance of Symbol 249 MovieClip in Symbol 587 MovieClip Frame 1
/* no clip actions */
Symbol 589 MovieClip [mapbar] Frame 1
function calccost2() {
trace(_root.attackarray.toString() + "attackary");
var _local3 = 20 + moven;
while (_local3 > (moven - 1)) {
current = _root.attackarray[_local3];
this.build["d" + Number((_local3 + 1) - moven)].gotoAndStop(1);
trace(_root[current + "obj"].unittype);
this.build["d" + Number((_local3 - moven) + 1)].gotoAndStop(_root[current + "obj"].unittype);
this.build["d" + Number((_local3 - moven) + 1)].unit = current + "obj";
this.build["d" + Number((_local3 - moven) + 1)].unitn = current;
_local3--;
}
}
function calccost() {
if (selectedarray.length == 0) {
this.shower.gotoAndStop(1);
}
i = 20 + garn;
while (i > (garn - 1)) {
this["s" + i].gotoAndStop(1);
this.shower["d" + Number((i + 1) - garn)].gotoAndStop(1);
i--;
}
i = selectedarray.length - 1;
while (i > -1) {
current = selectedarray[i];
if (_root[current + "obj"].fulllife == undefined) {
current = current + mapn;
}
if (_root[current + "obj"].unittype == "rocket") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("rocket");
}
if (_root[current + "obj"].unittype == "humvee") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("humvee");
}
if (_root[current + "obj"].unittype == "artillery") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("artillery");
}
if (_root[current + "obj"].unittype == "light") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("light");
}
if (_root[current + "obj"].unittype == "heavy") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("heavy");
}
if (_root[current + "obj"].unittype == "war factory") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("war factory");
}
if (_root[current + "obj"].unittype == "dozer") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("dozer");
}
if (_root[current + "obj"].unittype == "comcentre") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("comcentre");
}
if (_root[current + "obj"].unittype == "lasertank") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("lasertank");
}
if (_root[current + "obj"].unittype == "oiltruck") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("oiltruck");
}
if (_root[current + "obj"].unittype == "refinery") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("refinery");
}
if (_root[current + "obj"].unittype == "construction") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("construction");
}
if (_root[current + "obj"].unittype == "turret1") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("turret1");
}
if (_root[current + "obj"].unittype == "mine") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("mine");
}
if (_root[current + "obj"].unittype == "turret2") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("turret2");
}
if (_root[current + "obj"].unittype == "servicedepot") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("servicedepot");
}
if (_root[current + "obj"].unittype == "turret3") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("turret3");
}
if (_root[current + "obj"].unittype == "weaponsilo") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("weaponsilo");
}
if (_root[current + "obj"].unittype == "techcentre") {
this.shower["d" + Number((i + 1) - garn)].gotoAndStop("techcentre");
}
this.shower["d" + Number((i + 1) - garn)].unitn = current;
this.shower["d" + Number((i + 1) - garn)].unit = current + "obj";
i--;
}
}
avoid = true;
_root.dialogue._visible = false;
_root.attachMovie("mo", "mouse", 1000001);
garn = 0;
moven = 0;
invadebutton._visible = false;
commandbutton._visible = false;
stop();
Instance of Symbol 572 MovieClip "kiss" in Symbol 589 MovieClip [mapbar] Frame 1
onClipEvent (load) {
function loadtexts() {
n = 0;
_root.mapbar.textss = "";
stringarray = _root.mapbar.words.split("");
trace(stringarray.length);
pp = stringarray.length - 1;
sound = new Sound();
sound.attachSound("ting");
sound.start(0, 10000);
playa = true;
}
playa = false;
}
onClipEvent (enterFrame) {
if ((n < pp) && (playa)) {
i = n;
_root.mapbar.textss = _root.mapbar.textss + stringarray[i];
n = n + 1;
} else {
sound.stop();
}
trace(n + "i");
trace(pp + "pp");
}
Instance of Symbol 587 MovieClip "escape" in Symbol 589 MovieClip [mapbar] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (keyDown) {
if (Key.isDown(13)) {
this._visible = !this._visible;
if (this._visible) {
this._x = 650;
}
if (!this._visible) {
this._x = 100;
}
}
}
Symbol 595 MovieClip [mo] Frame 1
Mouse.hide();
stop();
Instance of Symbol 591 MovieClip "mouse" in Symbol 595 MovieClip [mo] Frame 1
onClipEvent (enterFrame) {
_parent._x = _root._xmouse;
_parent._y = _root._ymouse;
}
Symbol 595 MovieClip [mo] Frame 2
stop();
Instance of Symbol 594 MovieClip in Symbol 595 MovieClip [mo] Frame 2
onClipEvent (enterFrame) {
_parent._x = _root._xmouse;
_parent._y = _root._ymouse;
}
Symbol 595 MovieClip [mo] Frame 3
stop();
Symbol 596 MovieClip [enemyrocket] Frame 1
stop();
Instance of Symbol 492 MovieClip "dummy" in Symbol 596 MovieClip [enemyrocket] Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.seeker = false;
_parent.miss = 1;
_parent.blast = false;
_parent.avoid = false;
upgrade = 0;
if ((_root.enemymoney > 15000) && (_root.enemytechcentre1._x != undefined)) {
upgrade = _root.upgradelevel;
}
aaa = Math.random() * upgrade;
if ((Math.random() * upgrade) > 0.3) {
_parent.seeker = true;
_root.enemymoney = _root.enemymoney - 1000;
}
if ((Math.random() * upgrade) > 0.1) {
_parent.miss++;
_root.enemymoney = _root.enemymoney - 1000;
}
if ((Math.random() * upgrade) > 0.3) {
_parent.miss++;
_root.enemymoney = _root.enemymoney - 1000;
}
if ((Math.random() * upgrade) > 0.3) {
_parent.blast = true;
_root.enemymoney = _root.enemymoney - 1000;
}
_parent.unittype = "rocket";
_parent.hitonly = false;
_parent.damage = 50;
_parent.shellspd = 3;
as = 0;
_parent.aggressive = true;
_root.enemyarray.push(_parent._name);
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 250;
_parent.fulllife = 250;
_parent.speed = 2;
_parent.firerate = 25;
_parent.vet = 0;
_parent.timer = 0;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
nohit = 0;
_parent.range = 350;
empulse = 0;
left = 1;
this.waypoint = "waypoint" + String(Math.floor(Math.random() * 6) + 100);
_root.n++;
_parent.selector.play();
if ((_root[this.waypoint]._x != undefined) && (_parent.getDepth() > 0)) {
_parent.aigoto(_root[this.waypoint]._x, _root[this.waypoint]._y, false);
}
aaa = undefined;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 3)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.damage = _parent.damage + 20;
_parent.fulllife = _parent.fulllife + 100;
_parent.life = _parent.fulllife;
_parent.shellspd = _parent.shellspd + 2;
_parent.range = _parent.range + 50;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range + 150)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 45;
}
if (left < 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) + 90;
}
if (as > 70) {
as = 0;
left = -left;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 596 MovieClip [enemyrocket] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 596 MovieClip [enemyrocket] Frame 1
onClipEvent (enterFrame) {
this._xscale = 110 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 596 MovieClip [enemyrocket] Frame 2
stop();
Symbol 597 MovieClip [enemyhumvee] Frame 1
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 597 MovieClip [enemyhumvee] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 482 MovieClip [humveeebase] "dummy" in Symbol 597 MovieClip [enemyhumvee] Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
upgrade = 0;
charge = 0;
_parent.gatling = false;
_parent.avoid = true;
_parent.laser = false;
if ((_root.enemymoney > 15000) && (_root.enemytechcentre1._x != undefined)) {
upgrade = _root.upgradelevel;
}
aaa = Math.random() * upgrade;
if ((Math.random() * upgrade) > 0.3) {
_parent.gatling = true;
_root.enemymoney = _root.enemymoney - 500;
}
if ((Math.random() * upgrade) > 0.4) {
_parent.laser = true;
_root.enemymoney = _root.enemymoney - 1000;
}
_parent.unittype = "humvee";
_parent.damage = 3;
_parent.shellspd = 15;
_parent.aggressive = true;
_root.enemyarray.push(_parent._name);
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 200;
_parent.fulllife = 200;
_parent.speed = 6;
_parent.firerate = 3;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 150;
as = 0;
empulse = 0;
_parent.vet = 0;
_parent.timer = 0;
left = 1;
this.waypoint = "waypoint" + String(Math.floor(Math.random() * 6) + 100);
_root.n++;
_parent.selector.play();
if ((_root[this.waypoint]._x != undefined) && (_parent.getDepth() > 0)) {
_parent.aigoto(_root[this.waypoint]._x, _root[this.waypoint]._y, false);
}
aaa = undefined;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.firerate--;
_parent.damage = _parent.damage + 1.5;
_parent.life = _parent.fulllife;
_parent.speed = _parent.speed + 3;
}
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
if (!obstacle) {
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 2)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
if (!obstacle) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 20) {
as = 0;
left = -left;
}
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 597 MovieClip [enemyhumvee] Frame 1
onClipEvent (enterFrame) {
this._xscale = 80 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 597 MovieClip [enemyhumvee] Frame 2
stop();
Symbol 598 MovieClip [enemylight] Frame 1
stop();
Instance of Symbol 538 MovieClip "dummy" in Symbol 598 MovieClip [enemylight] Frame 1
onClipEvent (load) {
_root.enemyarray.push(_parent._name);
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.auto = false;
_parent.shell2 = false;
_parent.hitonly = false;
_parent.avoid = true;
upgrade = 0;
if ((_root.enemymoney > 15000) && (_root.enemytechcentre1._x != undefined)) {
upgrade = _root.upgradelevel;
}
aaa = Math.random() * upgrade;
if ((Math.random() * upgrade) > 0.4) {
_parent.auto = true;
_root.enemymoney = _root.enemymoney - 1000;
}
if ((Math.random() * upgrade) > 0.3) {
_parent.shell2 = true;
_root.enemymoney = _root.enemymoney - 1000;
}
if ((Math.random() * upgrade) > 0.1) {
_parent.hitonly = true;
_root.enemymoney = _root.enemymoney - 1000;
}
_parent.unittype = "light";
_parent.shellspd = 10;
_parent.damage = 20;
_parent.aggressive = true;
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 300;
_parent.fulllife = 300;
nohit = 0;
_parent.vet = 0;
_parent.timer = 0;
_parent.speed = 3;
_parent.firerate = 5;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 200;
empulse = 0;
as = 0;
left = 1;
this.waypoint = "waypoint" + String(Math.floor(Math.random() * 6) + 100);
_root.n++;
_parent.selector.play();
if ((_root[this.waypoint]._x != undefined) && (_parent.getDepth() > 0)) {
_parent.aigoto(_root[this.waypoint]._x, _root[this.waypoint]._y, false);
}
aaa = undefined;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.damage = _parent.damage + 10;
_parent.fulllife = _parent.fulllife + 150;
_parent.life = _parent.fulllife;
_parent.speed = _parent.speed + 1.5;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (_parent._width / 2);
_parent._y = _parent._y + (_parent._height / 2);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (_parent._width / 2);
_parent._y = _parent._y - (_parent._height / 2);
}
break;
}
}
i--;
}
nohit = 0;
}
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) + 90;
}
if (left < 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 135;
}
if (as > 50) {
as = 0;
left = -left;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 598 MovieClip [enemylight] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 598 MovieClip [enemylight] Frame 1
onClipEvent (enterFrame) {
this._xscale = 90 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 598 MovieClip [enemylight] Frame 2
stop();
Symbol 599 MovieClip [enemyartillery] Frame 1
stop();
Instance of Symbol 513 MovieClip "dummy" in Symbol 599 MovieClip [enemyartillery] Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.deploy = function () {
this.walking = false;
this.dummy.gotoAndPlay("deploying");
this.dummy._rotation = 90;
};
_parent.nuke = false;
_parent.accurate = false;
_parent.emp = false;
upgrade = 0;
if ((_root.enemymoney > 15000) && (_root.enemytechcentre1._x != undefined)) {
upgrade = _root.upgradelevel;
}
aaa = Math.random() * upgrade;
if ((Math.random() * upgrade) > 0.1) {
_parent.accurate = true;
_root.enemymoney = _root.enemymoney - 1000;
}
if ((Math.random() * upgrade) > 0.5) {
_parent.nuke = true;
_root.enemymoney = _root.enemymoney - 2000;
}
if ((Math.random() * upgrade) > 0.4) {
_parent.emp = true;
_root.enemymoney = _root.enemymoney - 2000;
}
_parent.unittype = "artillery";
_parent.damage = 35;
_parent.aggressive = true;
_root.enemyarray.push(_parent._name);
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 300;
_parent.fulllife = 300;
_parent.speed = 1;
_parent.firerate = 30;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 550;
empulse = 0;
_parent.vet = 0;
_parent.timer = 0;
n = 0;
this.waypoint = "waypoint" + String(Math.floor(Math.random() * 6) + 100);
_root.n++;
_parent.selector.play();
if ((_root[this.waypoint]._x != undefined) && (_parent.getDepth() > 0)) {
_parent.aigoto(_root[this.waypoint]._x, _root[this.waypoint]._y, false);
}
if (_parent.getDepth() < 0) {
_parent.deploy();
}
aaa = undefined;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (this._currentframe == 11) {
n++;
if (n == 10) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.range = _parent.range + 100;
_parent.firerate = _parent.firerate - 7;
_parent.fulllife = _parent.fulllife + 100;
_parent.life = _parent.fulllife;
_parent.speed = _parent.speed + 1;
}
n = 0;
if (!_parent.fireing) {
n = _root.friendlylist.length - 1;
while (n > -1) {
current2 = _root.friendlylist[n];
dx = -(_parent._x - _root[current2]._x);
dy = -(_parent._y - _root[current2]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
if ((dist < _parent.range) && (_root[current2].stealth != true)) {
_parent.targetobj = current2;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
hit = true;
}
n--;
}
}
}
}
if (_parent.attack) {
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
if (this._currentframe == 1) {
_parent.walking = false;
gotoAndPlay ("deploying");
_parent.fireing = true;
this._rotation = 90;
}
}
}
if (_parent.walking == true) {
if ((this._currentframe > 1) && (_parent.life > 0)) {
gotoAndStop (1);
_parent.turret.gotoAndStop(1);
}
if (this._currentframe == 1) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (_parent.attack) {
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.walking = false;
gotoAndPlay ("deploying");
this._rotation = 90;
_parent.fireing = true;
}
}
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
if (!_parent.attacks) {
_parent.deploy();
}
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 2) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
} else {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 599 MovieClip [enemyartillery] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 599 MovieClip [enemyartillery] Frame 1
onClipEvent (enterFrame) {
this._xscale = 110 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe <= 11) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 599 MovieClip [enemyartillery] Frame 2
stop();
Symbol 600 MovieClip [frenzy] Frame 1
times--;
trace(times);
Instance of Symbol 40 MovieClip in Symbol 600 MovieClip [frenzy] Frame 1
onClipEvent (enterFrame) {
_parent._x = _root[_parent.object]._x;
_parent._y = _root[_parent.object]._y;
_parent._rotation = _root[_parent.object].dummy._rotation;
}
onClipEvent (load) {
if (_parent.loadeds == undefined) {
_parent.times = 20;
_root[_parent.object].damage = _root[_parent.object].damage * 2;
_root[_parent.object].firerate = 1;
_root[_parent.object].speed = 6;
_parent.loadeds = true;
}
}
Instance of Symbol 40 MovieClip in Symbol 600 MovieClip [frenzy] Frame 10
onClipEvent (enterFrame) {
_parent._x = _root[_parent.object]._x;
_parent._y = _root[_parent.object]._y;
_parent._rotation = _root[_parent.object].dummy._rotation;
}
Symbol 600 MovieClip [frenzy] Frame 20
if (((times == 0) || (_root[object].life == undefined)) || (_root[object].life <= 0)) {
_root[object].damage = _root[object].damage / 2;
_root[object].firerate = 5;
_root[object].speed = 3;
this.removeMovieClip();
}
Symbol 604 MovieClip [bomb] Frame 1
Symbol 604 MovieClip [bomb] Frame 2
if (((((this._x < 1000) && (this._y < 768)) && (this._x > 0)) && (this._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("exp");
soundobj.start();
}
Symbol 604 MovieClip [bomb] Frame 4
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - (damage / 2);
_root[firerer].vet = _root[firerer].vet + damage;
_root[current + "symbols"].play();
}
i--;
}
Symbol 604 MovieClip [bomb] Frame 6
hitp = 0;
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if (_root[current].hitTest(this)) {
hitp++;
if (hitp < 5) {
_root[current].life = _root[current].life - (damage / 2);
_root[current + "symbols"].play();
}
if (((!_root[current].walking) && ((!_root[current].fireing) || (_root[current].unittype == "artillery"))) && (_root[current].aggressive)) {
_root[current].attack = true;
_root[current].targetobj = firerer;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
}
i--;
}
if (emp) {
_root.attachMovie("emp", "emp" + _root.n, _root.n);
_root["emp" + _root.n]._x = this._x;
_root["emp" + _root.n]._y = this._y;
_root["emp" + _root.n].timer = 0;
_root.objarray.push("emp" + _root.n);
_root.n++;
}
if (nuke) {
_root.attachMovie("rad", "rad" + _root.n, _root.n);
_root["rad" + _root.n]._x = this._x;
_root["rad" + _root.n]._y = this._y;
_root["rad" + _root.n].timer = 0;
_root.objarray.push("rad" + _root.n);
_root.n++;
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if (_root[current].hitTest(_root["rad" + _root.n])) {
_root[current + "symbols"].play();
if (((!_root[current].walking) && ((!_root[current].fireing) || (_root[current].unittype == "artillery"))) && (_root[current].aggressive)) {
_root[current].attack = true;
_root[current].targetobj = firerer;
_root["rad" + _root.n].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
}
i--;
}
}
Symbol 604 MovieClip [bomb] Frame 21
stop();
this.removeMovieClip();
stop();
Symbol 605 MovieClip [bombardment] Frame 1
this.n = 0;
_root.objarray.push(this._name);
Symbol 605 MovieClip [bombardment] Frame 2
stop();
Instance of Symbol 604 MovieClip [bomb] in Symbol 605 MovieClip [bombardment] Frame 2
onClipEvent (enterFrame) {
this._visible = false;
stop();
timer++;
if (timer == 10) {
_parent.attachMovie("bomb", "bomb" + _parent.n, _parent.n);
_parent["bomb" + _parent.n]._x = (Math.random() * 200) - 100;
_parent["bomb" + _parent.n]._y = (Math.random() * 200) - 100;
_parent["bomb" + _parent.n].damage = 30;
_parent["bomb" + _parent.n].firerer = _parent.firerer;
_parent.shells--;
_parent.n++;
timer = 0;
}
if (timer == 3) {
_parent.attachMovie("bomb2", "bomb" + _parent.n, _parent.n);
_parent["bomb" + _parent.n]._x = (Math.random() * 200) - 100;
_parent["bomb" + _parent.n]._y = (Math.random() * 200) - 100;
_parent["bomb" + _parent.n].damage = 30;
_parent["bomb" + _parent.n].firerer = _parent.firerer;
_parent.shells--;
_parent.n++;
}
if (_parent.shells < 0) {
_parent.nextFrame();
}
}
onClipEvent (load) {
this.timer = 0;
}
Symbol 605 MovieClip [bombardment] Frame 3
_root.objarray.findandsplice(_name);
this.removeMovieClip();
Symbol 608 MovieClip [invul] Frame 1
times--;
Instance of Symbol 607 MovieClip in Symbol 608 MovieClip [invul] Frame 1
onClipEvent (enterFrame) {
_parent._x = _root[_parent.object]._x;
_parent._y = _root[_parent.object]._y;
_parent._rotation = _root[_parent.object].dummy._rotation;
}
onClipEvent (load) {
if (_parent.loadeds == undefined) {
_parent.times = 20;
_root[_parent.object].life = _root[_parent.object].life * 1000;
_root[_parent.object].fulllife = _root[_parent.object].fulllife * 1000;
_parent.loadeds = true;
}
}
Instance of Symbol 607 MovieClip in Symbol 608 MovieClip [invul] Frame 10
onClipEvent (enterFrame) {
_parent._x = _root[_parent.object]._x;
_parent._y = _root[_parent.object]._y;
_parent._rotation = _root[_parent.object].dummy._rotation;
}
Symbol 608 MovieClip [invul] Frame 20
if ((times == 0) || (_root[object].life == undefined)) {
_root[object].life = _root[object].life / 1000;
_root[object].fulllife = _root[object].fulllife / 1000;
this.removeMovieClip();
}
Symbol 616 MovieClip Frame 1
dx = _root[targetobj]._x - _parent._x;
dy = _root[targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > _parent.range) {
targetobj = undefined;
stop();
}
if (tragetobj == undefined) {
stop();
}
Instance of Symbol 612 MovieClip in Symbol 616 MovieClip Frame 1
/* no clip actions */
Symbol 616 MovieClip Frame 2
_root.attachMovie("patriot", "patriot" + _root.n, _root.n);
_root["patriot" + _root.n]._x = _parent._x;
_root["patriot" + _root.n]._y = _parent._y + 10;
_root["patriot" + _root.n]._rotation = this._rotation;
_root["patriot" + _root.n].damage = _parent.damage;
_root["patriot" + _root.n].shellspd = _parent.shellspd;
_root["patriot" + _root.n].targetobj = targetobj;
_root["patriot" + _root.n].seeker = true;
_root["patriot" + _root.n].firerer = _parent._name;
_root.objarray.push("patriot" + _root.n);
_root.n++;
Symbol 616 MovieClip Frame 5
_root.attachMovie("patriot", "patrio2t" + _root.n, _root.n);
_root["patrio2t" + _root.n]._x = _parent._x;
_root["patrio2t" + _root.n]._y = _parent._y;
_root["patrio2t" + _root.n]._rotation = this._rotation;
_root["patrio2t" + _root.n].damage = _parent.damage;
_root["patrio2t" + _root.n].shellspd = _parent.shellspd;
_root["patrio2t" + _root.n].targetobj = targetobj;
_root["patrio2t" + _root.n].seeker = true;
_root["patrio2t" + _root.n].firerer = _parent._name;
_root.objarray.push("patrio2t" + _root.n);
_root.n++;
Symbol 616 MovieClip Frame 8
_root.attachMovie("patriot", "patrio3t" + _root.n, _root.n);
_root["patrio3t" + _root.n]._x = _parent._x;
_root["patrio3t" + _root.n]._y = _parent._y - 10;
_root["patrio3t" + _root.n]._rotation = this._rotation;
_root["patrio3t" + _root.n].damage = _parent.damage;
_root["patrio3t" + _root.n].shellspd = _parent.shellspd;
_root["patrio3t" + _root.n].targetobj = targetobj;
_root["patrio3t" + _root.n].seeker = true;
_root["patrio3t" + _root.n].firerer = _parent._name;
_root.objarray.push("patrio3t" + _root.n);
_root.n++;
Symbol 616 MovieClip Frame 16
if ((_root[targetobj].life < 0) || (_root[targetobj].life == undefined)) {
targetobj = undefined;
}
stop();
Instance of Symbol 612 MovieClip in Symbol 616 MovieClip Frame 16
onClipEvent (enterFrame) {
n++;
if (n > _parent._parent.firerate) {
_parent.gotoAndStop(1);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 616 MovieClip Frame 20
gotoAndStop ("normal");
Symbol 617 MovieClip [enemymultiple] Frame 1
if (targetobj == undefined) {
stop();
}
repairs = false;
Instance of Symbol 616 MovieClip "turret" in Symbol 617 MovieClip [enemymultiple] Frame 1
onClipEvent (enterFrame) {
if (this.targetobj == undefined) {
this._rotation--;
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 617 MovieClip [enemymultiple] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemyturretarray.push(_parent._name);
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 500;
_parent.fulllife = 500;
_parent.range = 400;
_parent.damage = 30;
_parent.firerate = 30;
_parent.shellspd = 10;
_root.enemyarray.push(_parent._name);
_parent.unittype = "turret2";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 617 MovieClip [enemymultiple] Frame 1
onClipEvent (enterFrame) {
this._xscale = 110 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 617 MovieClip [enemymultiple] Frame 2
_root.money = _root.money + 1500;
Symbol 617 MovieClip [enemymultiple] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root["enemyturret" + number] = false;
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.enemyturretarray.findandsplice(this._name);
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 620 MovieClip Frame 1
stop();
Symbol 620 MovieClip Frame 2
if (_parent.enemy) {
_root.kills++;
}
if ((!_parent.enemy) && (!(_parent.ally === true))) {
soundobj = new Sound();
soundobj.attachSound("unitloss");
soundobj.start();
_root.losses++;
}
dozers.findandsplice(_parent._name);
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 620 MovieClip Frame 11
if (_parent.enemy) {
_root.kills++;
}
dozers.findandsplice(_parent._name);
Symbol 620 MovieClip Frame 13
_root.unitsarray.findandsplice(_parent._name);
_root.enemyarray.findandsplice(_parent._name);
_root.friendlylist.findandsplice(_parent._name);
_root.objarray.findandsplice("flag" + _parent._name);
_root.selectedarray.findandsplice(_parent._name);
_root.flagsarray.findandsplice("flag" + _parent._name);
_root.sidebar.calccost();
_root["flag" + _parent._name].removeMovieClip();
_root[_parent._name + "symbols"].removeMovieClip();
_parent.nextFrame();
_parent.removeMovieClip();
stop();
Symbol 621 MovieClip [dozer] Frame 1
stop();
Instance of Symbol 620 MovieClip "dummy" in Symbol 621 MovieClip [dozer] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.auto = false;
_root.dozerarray.push(_parent._name);
_parent.unittype = "dozer";
_parent.aggressive = false;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
_parent.targetbuild = undefined;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 450;
_parent.fulllife = 450;
_parent.speed = 3;
building = false;
nohit = 0;
_parent.walking = false;
_parent.build = false;
empulse = 0;
if (_root.comcentre1._x != undefined) {
_parent.aigoto(_root.comcentre1._x, _root.comcentre1._y + 100, false);
}
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.build) {
if (_root[_parent.targetbuild].life == undefined) {
obstacle = false;
buidling = false;
_parent.build = false;
_parent.walking = false;
_parent.targetbuild = undefined;
}
}
if (building) {
_root[_parent.targetbuild].percent = _root[_parent.targetbuild].percent + (0.25 * _root[_parent.targetbuild].buildrate);
_root[_parent.targetbuild].life = _root[_parent.targetbuild].life + (2.4 * _root[_parent.targetbuild].buildrate);
if (_root[_parent.targetbuild].percent >= 100) {
_root[_parent.targetbuild].nextFrame();
buidling = false;
_parent.build = false;
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.build) {
dx = _root[_parent.targetbuild]._x - _parent._x;
dy = _root[_parent.targetbuild]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_root[_parent.targetbuild].percent == undefined) {
_root[_parent.targetbuild].percent = 0;
_root[_parent.targetbuild].life = 100;
}
}
if (!_parent.build) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (_parent.build && (_root[_parent.targetbuild]._x == undefined)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
_parent.build = false;
}
if (this.hitTest(_root[flag]) && (!_parent.build)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
if (this.hitTest(_root[_parent.targetbuild]) && (_parent.build)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
building = true;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 621 MovieClip [dozer] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 621 MovieClip [dozer] Frame 1
onClipEvent (enterFrame) {
this._xscale = 85 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 621 MovieClip [dozer] Frame 2
stop();
Symbol 623 MovieClip [dot] Frame 1
if (_root.comcentre1.life == undefined) {
this._visible = false;
}
stop();
Symbol 623 MovieClip [dot] Frame 6
gotoAndStop (1);
Symbol 625 MovieClip [enemycomcentre] Frame 1
_root.enemycomcentre = 1;
repairs = false;
name = this._name;
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 625 MovieClip [enemycomcentre] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 2000;
_parent.fulllife = 2000;
_root.enemyarray.push(_parent._name);
_parent.unittype = "comcentre";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 625 MovieClip [enemycomcentre] Frame 1
onClipEvent (enterFrame) {
this._xscale = 370 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 625 MovieClip [enemycomcentre] Frame 2
_root.money = _root.money + 5000;
Symbol 625 MovieClip [enemycomcentre] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.enemycomcentre = 0;
_root[_name + "symbols"].removeMovieClip();
this._name = "opo";
this.removeMovieClip();
stop();
Symbol 626 MovieClip [artillery] Frame 1
stop();
Instance of Symbol 513 MovieClip "dummy" in Symbol 626 MovieClip [artillery] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.deploy = function () {
this.walking = false;
this.dummy.gotoAndPlay("deploying");
this.dummy._rotation = 90;
};
_parent.unittype = "artillery";
_parent.accurate = false;
_parent.nuke = false;
_parent.emp = false;
_parent.vet = 0;
_parent.timer = 0;
_parent.damage = 35;
_parent.aggressive = false;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 300;
_parent.fulllife = 300;
_parent.speed = 1;
_parent.firerate = 30;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 550;
empulse = 0;
n = 0;
if (_root.warfactory1._x != undefined) {
_parent.aigoto(_root.rallypoint._x, _root.rallypoint._y, false);
}
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (this._currentframe == 11) {
n++;
if (n == 10) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.range = _parent.range + 100;
_parent.firerate = _parent.firerate - 7;
_parent.fulllife = _parent.fulllife + 100;
_parent.life = _parent.fulllife;
_parent.speed = _parent.speed + 1;
}
n = 0;
if (!_parent.fireing) {
n = _root.enemyarray.length - 1;
while (n > -1) {
current2 = _root.enemyarray[n];
dx = -(_parent._x - _root[current2]._x);
dy = -(_parent._y - _root[current2]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
if ((dist < _parent.range) && (_root[current2].stealth != true)) {
_parent.targetobj = current2;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
hit = true;
}
n--;
}
}
}
}
if (_parent.attack) {
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
if (this._currentframe == 1) {
_parent.walking = false;
this._rotation = 90;
gotoAndPlay ("deploying");
_parent.fireing = true;
}
}
}
if (_parent.walking == true) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
rangereq = 10;
if (_parent.attack) {
rangereq = _parent.range;
}
if (((this._currentframe > 1) && (_parent.life > 0)) && (dist > rangereq)) {
gotoAndStop (1);
_parent.turret.gotoAndStop(1);
}
if (this._currentframe == 1) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > this.num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 2) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
} else {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 626 MovieClip [artillery] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 626 MovieClip [artillery] Frame 1
onClipEvent (enterFrame) {
this._xscale = 110 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe <= 11) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 626 MovieClip [artillery] Frame 2
stop();
Symbol 627 MovieClip [rocket] Frame 1
stop();
Instance of Symbol 492 MovieClip "dummy" in Symbol 627 MovieClip [rocket] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.unittype = "rocket";
_parent.seeker = false;
_parent.hitonly = false;
_parent.blast = false;
_parent.miss = 1;
_parent.damage = 50;
_parent.shellspd = 3;
_parent.avoid = false;
_parent.aggressive = true;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_parent.vet = 0;
_parent.timer = 0;
_root.num++;
nohit = 0;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 250;
_parent.fulllife = 250;
_parent.speed = 2;
_parent.firerate = 25;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 350;
as = 0;
left = 1;
empulse = 0;
if (_root.warfactory1._x != undefined) {
_parent.aigoto(_root.rallypoint._x, _root.rallypoint._y, false);
}
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 3)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.damage = _parent.damage + 20;
_parent.fulllife = _parent.fulllife + 100;
_parent.life = _parent.fulllife;
_parent.shellspd = _parent.shellspd + 2;
_parent.range = _parent.range + 50;
}
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
if (!obstacle) {
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range + 150)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 45;
}
if (left < 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) + 90;
}
if (as > 70) {
as = 0;
left = -left;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 627 MovieClip [rocket] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 627 MovieClip [rocket] Frame 1
onClipEvent (enterFrame) {
this._xscale = 110 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 627 MovieClip [rocket] Frame 2
stop();
Symbol 628 MovieClip [heavy] Frame 1
stop();
Instance of Symbol 527 MovieClip "dummy" in Symbol 628 MovieClip [heavy] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.auto = false;
_parent.unittype = "heavy";
_parent.crush = false;
_parent.missile = false;
_parent.hitonly = false;
_parent.avoid = false;
_parent.damage = 30;
_parent.shellspd = 12;
_parent.aggressive = true;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 600;
_parent.fulllife = 600;
_parent.speed = 1;
_parent.firerate = 20;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.vet = 0;
_parent.timer = 0;
_parent.range = 200;
as = 0;
left = 1;
empulse = 0;
if (_root.warfactory1._x != undefined) {
_parent.aigoto(_root.rallypoint._x, _root.rallypoint._y, false);
}
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.speed = _parent.speed + 1;
_parent.fulllife = _parent.fulllife + 200;
_parent.life = _parent.fulllife;
_parent.damage = _parent.damage + 15;
}
if (_parent.attack) {
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.crush && (_root[_parent.targetobj].life < _parent.life)) {
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
if ((dist < 10) && (_root[_parent.targetobj].life < _parent.life)) {
_root[_parent.targetobj].life = -1;
_parent._x = _root[_parent.targetobj]._x;
_parent._y = _root[_parent.targetobj]._y;
}
}
if (_parent.avoid) {
as++;
if (left > 0) {
if (!_parent.crush) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) + 90;
}
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 100) {
as = 0;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 628 MovieClip [heavy] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 628 MovieClip [heavy] Frame 1
onClipEvent (enterFrame) {
this._xscale = 115 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 628 MovieClip [heavy] Frame 2
stop();
Symbol 629 MovieClip [enemyheavy] Frame 1
stop();
Instance of Symbol 527 MovieClip "dummy" in Symbol 629 MovieClip [enemyheavy] Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.crush = false;
_parent.missile = false;
_parent.hitonly = false;
_parent.auto = false;
_parent.unittype = "heavy";
_parent.avoid = false;
upgrade = 0;
if ((_root.enemymoney > 15000) && (_root.enemytechcentre1._x != undefined)) {
upgrade = _root.upgradelevel;
}
aaa = Math.random() * upgrade;
if ((Math.random() * upgrade) > 0.3) {
_parent.crush = true;
_root.enemymoney = _root.enemymoney - 1000;
}
if ((Math.random() * upgrade) > 0.3) {
_parent.missile = true;
_root.enemymoney = _root.enemymoney - 1000;
}
if ((Math.random() * upgrade) > 0.1) {
_parent.hitonly = true;
_root.enemymoney = _root.enemymoney - 1000;
}
_parent.damage = 30;
_parent.shellspd = 12;
_parent.aggressive = true;
_root.enemyarray.push(_parent._name);
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 600;
_parent.fulllife = 600;
_parent.speed = 1;
_parent.firerate = 20;
_parent.vet = 0;
_parent.timer = 0;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 200;
empulse = 0;
nohit = 0;
as = 0;
left = 1;
this.waypoint = "waypoint" + String(Math.floor(Math.random() * 6) + 100);
_root.n++;
_parent.selector.play();
if ((_root[this.waypoint]._x != undefined) && (_parent.getDepth() > 0)) {
_parent.aigoto(_root[this.waypoint]._x, _root[this.waypoint]._y, false);
}
aaa = undefined;
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.speed = _parent.speed + 1;
_parent.fulllife = _parent.fulllife + 200;
_parent.life = _parent.fulllife;
_parent.damage = _parent.damage + 15;
}
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if ((_parent.crush && (!_root[current].enemy)) && (_root[current].fulllife < 500)) {
_root[current].life = 0;
}
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (_parent.crush && (_root[_parent.targetobj].life < _parent.life)) {
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
if ((dist < 10) && (_root[_parent.targetobj].life < _parent.life)) {
_root[_parent.targetobj].life = -1;
_parent._x = _root[_parent.targetobj]._x;
_parent._y = _root[_parent.targetobj]._y;
}
}
if (((!_parent.walking) && (_parent.avoid)) && (!_parent.crush)) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 50) {
as = 0;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 629 MovieClip [enemyheavy] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 629 MovieClip [enemyheavy] Frame 1
onClipEvent (enterFrame) {
this._xscale = 115 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 629 MovieClip [enemyheavy] Frame 2
stop();
Symbol 630 MovieClip [humvee] Frame 1
stop();
Instance of Symbol 482 MovieClip [humveeebase] "dummy" in Symbol 630 MovieClip [humvee] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.unittype = "humvee";
_parent.laser = false;
_parent.gatling = false;
_parent.damage = 3;
_parent.avoid = true;
_parent.shellspd = 15;
_parent.aggressive = true;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
nohit = 0;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 200;
_parent.fulllife = 200;
_parent.speed = 6;
_parent.firerate = 3;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.vet = 0;
_parent.timer = 0;
charge = 0;
empulse = 0;
_parent.range = 150;
charge = 0;
as = 0;
left = 1;
if (_root.warfactory1._x != undefined) {
_parent.aigoto(_root.rallypoint._x, _root.rallypoint._y, false);
}
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.firerate--;
_parent.damage = _parent.damage + 1.5;
_parent.life = _parent.fulllife;
_parent.speed = _parent.speed + 3;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 2)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 20) {
as = 0;
left = -left;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 630 MovieClip [humvee] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 630 MovieClip [humvee] Frame 1
onClipEvent (enterFrame) {
this._xscale = 80 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 630 MovieClip [humvee] Frame 2
stop();
Symbol 632 MovieClip [enemywarfactory] Frame 1
names = this._name;
repairs = false;
this.cacheAsBitmap = true;
_root.ai.build = true;
stop();
Instance of Symbol 128 MovieClip "lifebar" in Symbol 632 MovieClip [enemywarfactory] Frame 1
onClipEvent (enterFrame) {
this._xscale = 290 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 632 MovieClip [enemywarfactory] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemywarfactory = 1;
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_root.enemyarray.push(_parent._name);
_parent.unittype = "war factory";
}
Symbol 632 MovieClip [enemywarfactory] Frame 2
_root.money = _root.money + 2000;
Symbol 632 MovieClip [enemywarfactory] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
_root.enemyarray.findandsplice(_name);
_root.enemywarfactory = 0;
_root.enemystructurearray.findandsplice(_name);
this._name = "lolo";
this.removeMovieClip();
stop();
Symbol 633 MovieClip [enemydozer] Frame 1
dozers.push(this._name);
stop();
Instance of Symbol 620 MovieClip "dummy" in Symbol 633 MovieClip [enemydozer] Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.aibuild = function (what, x, y, cost, rate) {
_root.enemymoney = _root.enemymoney - cost;
_root.attachMovie("enemyconstruction", "enemyconstruction" + _root.n, _root.n);
_root["enemyconstruction" + _root.n].structure = what;
_root["enemyconstruction" + _root.n].buildrate = rate;
_root["enemyconstruction" + _root.n]._x = x;
_root["enemyconstruction" + _root.n]._y = y;
_root["enemyconstruction" + _root.n].dozer = _parent._name;
_root.n++;
};
_parent.aibuild2 = function (what, x, y, cost, nnn, rate) {
_root.enemymoney = _root.enemymoney - cost;
_root.attachMovie("enemyconstruction2", "enemyconstruction" + _root.n, _root.n);
_root["enemyconstruction" + _root.n].structure = what;
_root["enemyconstruction" + _root.n].buildrate = rate;
_root["enemyconstruction" + _root.n]._x = x;
_root["enemyconstruction" + _root.n]._y = y;
_root["enemyconstruction" + _root.n].number = nnn;
_root["enemyconstruction" + _root.n].dozer = _parent._name;
_root.n++;
};
_parent.build = false;
building = false;
nohit = 0;
_parent.auto = false;
_parent.unittype = "dozer";
_parent.aggressive = false;
_root.enemyarray.push(_parent._name);
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 450;
_parent.fulllife = 450;
_parent.speed = 3;
_parent.walking = false;
as = 0;
left = 1;
empulse = 0;
if (_root.enemycomcentre1._x != undefined) {
_parent.aigoto(_root.enemycomcentre1._x, _root.enemycomcentre1._y + 100, false);
}
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.build) {
if (_root[_parent.targetbuild].life == undefined) {
buidling = false;
_parent.build = false;
_parent.walking = false;
_parent.targetbuild = undefined;
}
}
if (building) {
_root[_parent.targetbuild].percent = _root[_parent.targetbuild].percent + (0.25 * _root[_parent.targetbuild].buildrate);
_root[_parent.targetbuild].life = _root[_parent.targetbuild].life + (2.4 * _root[_parent.targetbuild].buildrate);
if (_root[_parent.targetbuild].percent >= 100) {
_root[_parent.targetbuild].nextFrame();
buidling = false;
_parent.build = false;
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.build) {
dx = _root[_parent.targetbuild]._x - _parent._x;
dy = _root[_parent.targetbuild]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
_root[_parent.targetbuild].percent = 0;
if (_root[_parent.targetbuild].life > 100) {
_root[_parent.targetbuild].life = 100;
}
}
if (!_parent.build) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (_parent.build && (_root[_parent.targetbuild]._x == undefined)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
_parent.build = false;
}
if (this.hitTest(_root[flag]) && (!_parent.build)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
if (this.hitTest(_root[_parent.targetbuild]) && (_parent.build)) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
building = true;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 633 MovieClip [enemydozer] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 633 MovieClip [enemydozer] Frame 1
onClipEvent (enterFrame) {
this._xscale = 85 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 633 MovieClip [enemydozer] Frame 2
stop();
Symbol 635 MovieClip [enemyservicedepot] Frame 1
_root.enemyservicedepot = 1;
_root.waypoint106._x = this._x;
_root.waypoint106._y = this._y;
repairs = false;
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 635 MovieClip [enemyservicedepot] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_root.enemyarray.push(_parent._name);
_parent.unittype = "servicedepot";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 635 MovieClip [enemyservicedepot] Frame 1
onClipEvent (enterFrame) {
this._xscale = 380 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 635 MovieClip [enemyservicedepot] Frame 2
_root.money = _root.money + 5000;
Symbol 635 MovieClip [enemyservicedepot] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.enemyservicedepot = 0;
_root[_name + "symbols"].removeMovieClip();
this._name = "star";
this.removeMovieClip();
stop();
Symbol 637 MovieClip [enemytechcentre] Frame 1
names = this._name;
repairs = false;
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 637 MovieClip [enemytechcentre] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_root.enemyarray.push(_parent._name);
_parent.unittype = "techcentre";
_root.enemytechcentre = 1;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 637 MovieClip [enemytechcentre] Frame 1
onClipEvent (enterFrame) {
this._xscale = 240 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 637 MovieClip [enemytechcentre] Frame 2
_root.money = _root.money + 1500;
Symbol 637 MovieClip [enemytechcentre] Frame 11
_root.objarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemytechcentre = 0;
_root.enemystructurearray.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
this._name = "ops";
this.removeMovieClip();
stop();
Symbol 639 MovieClip [enemyrefinery] Frame 1
_root.attachMovie("enemyoiltruck", "enemyoiltruck" + _root.n, _root.n);
_root["enemyoiltruck" + _root.n]._x = this._x;
_root["enemyoiltruck" + _root.n]._y = this._y;
_root.ai.oiltrucks.push("enemyoiltruck" + _root.n);
_root["enemyoiltruck" + _root.n]._rotation = 0;
_root.n++;
this.cacheAsBitmap = true;
repairs = false;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 639 MovieClip [enemyrefinery] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemyrefinery = 1;
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1700;
_parent.fulllife = 1700;
_root.enemyarray.push(_parent._name);
_parent.unittype = "refinery";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 639 MovieClip [enemyrefinery] Frame 1
onClipEvent (enterFrame) {
this._xscale = 400 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 639 MovieClip [enemyrefinery] Frame 2
_root.money = _root.money + 5000;
Symbol 639 MovieClip [enemyrefinery] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.enemyrefinery = 0;
_root[_name + "symbols"].removeMovieClip();
this._name = "nobody";
this.removeMovieClip();
stop();
Symbol 640 MovieClip [light] Frame 1
stop();
Instance of Symbol 538 MovieClip "dummy" in Symbol 640 MovieClip [light] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_parent.auto = false;
_parent.unittype = "light";
_parent.shell2 = false;
_parent.hitonly = false;
_parent.damage = 20;
_parent.shellspd = 10;
_parent.aggressive = true;
_root.friendlylist.push(_parent._name);
_parent.enemy = false;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 300;
nohit = 0;
_parent.vet = 0;
_parent.timer = 0;
_parent.avoid = true;
_parent.fulllife = 300;
_parent.speed = 3;
_parent.firerate = 5;
_parent.walking = false;
_parent.fireing = false;
_parent.attack = false;
_parent.range = 200;
empulse = 0;
as = 0;
left = 1;
if (_root.warfactory1._x != undefined) {
_parent.aigoto(_root.rallypoint._x, _root.rallypoint._y, false);
}
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if ((_parent.vet > (_parent.fulllife * 2)) && (_parent.selector.veteran._currentframe < 4)) {
_parent.vet = 0;
_parent.timer = 0;
_parent.selector.veteran.nextFrame();
_parent.damage = _parent.damage + 10;
_parent.fulllife = _parent.fulllife + 150;
_parent.life = _parent.fulllife;
_parent.speed = _parent.speed + 1.5;
}
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (_parent.locx == undefined) {
_parent.locx = 0;
_parent.locy = 0;
}
dx = (_root[flag]._x - _parent._x) + _parent.locx;
dy = (_root[flag]._y - _parent._y) + _parent.locy;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (_parent._width / 2);
_parent._y = _parent._y + (_parent._height / 2);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (_parent._width / 2);
_parent._y = _parent._y - (_parent._height / 2);
}
break;
}
}
i--;
}
nohit = 0;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (!_parent.walking) {
if (_parent.avoid) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) + 135;
}
if (as > 50) {
as = 0;
left = -left;
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 640 MovieClip [light] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 640 MovieClip [light] Frame 1
onClipEvent (enterFrame) {
this._xscale = 90 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 640 MovieClip [light] Frame 2
stop();
Symbol 645 MovieClip Frame 1
stop();
Instance of Symbol 181 MovieClip "turret" in Symbol 645 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.targetobj == undefined) {
this._rotation++;
}
}
Symbol 647 MovieClip [enemyconstruction2] Frame 1
stop();
Instance of Symbol 645 MovieClip "constructor" in Symbol 647 MovieClip [enemyconstruction2] Frame 1
onClipEvent (load) {
this._alpha = 50;
trace(_parent.structure + "structure");
this.gotoAndStop(_parent.structure);
}
onClipEvent (enterFrame) {
this._alpha = _parent.percent;
}
Instance of Symbol 123 MovieClip "selector" in Symbol 647 MovieClip [enemyconstruction2] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 200;
_parent.fulllife = 1000;
_root.enemyarray.push(_parent._name);
timer = 0;
_parent.unittype = "construction";
_parent.aggressive = true;
_parent.percent = 0;
_root[_parent.dozer].aigoto(_parent._x, _parent._y, false);
_root[_parent.dozer].targetbuild = _parent._name;
_root[_parent.dozer].build = true;
_parent.constructor._alpha = 0;
_root["enemyturret" + _parent.number] = true;
}
onClipEvent (enterFrame) {
_parent.constructor._alpha = _parent.percent;
if ((_root[_parent.dozer].life <= 0) || (_root[_parent.dozer].life == undefined)) {
_parent.gotoAndPlay("explode");
}
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 647 MovieClip [enemyconstruction2] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent._currentframe == 1) {
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
}
Symbol 647 MovieClip [enemyconstruction2] Frame 2
_root.attachMovie(structure, structure + _root.n, _root.n - 1000);
if (structure == "enemymine") {
_root[dozer].aigoto(_root.waypoint106._x, _root.waypoint106._y, false);
}
_root[structure + _root.n]._x = this._x;
_root[structure + _root.n]._y = this._y;
_root[structure + _root.n].number = number;
_root.n++;
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.sidebar.calccost();
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
Symbol 647 MovieClip [enemyconstruction2] Frame 3
Symbol 647 MovieClip [enemyconstruction2] Frame 12
_root.objarray.findandsplice(_name);
if (structure == "enemymine") {
_root[dozer].aigoto(_root.waypoint106._x, _root.waypoint106._y, false);
}
_root.unitsarray.findandsplice(_name);
_root["enemyturret" + number] = false;
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.sidebar.calccost();
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 649 MovieClip [box5] Frame 1
if (_root.comcentre1.life == undefined) {
this._visible = false;
}
Symbol 662 Button
on (rollOver) {
_root.sidebar.build.texts = "Nuclear Missile superweapon timer";
_root.sidebar.texts = "Nuclear Missile superweapon timer";
}
on (rollOut) {
_root.sidebar.build.texts = "";
_root.sidebar.texts = "";
}
Symbol 672 Button
on (press) {
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
}
_root.attachMovie("targeter", "targeter", 1100001);
}
on (rollOver) {
_root.sidebar.build.texts = "Launch nuclear missile at target specified by cursor";
_root.sidebar.texts = "Launch nuclear missile at target specified by cursor";
}
on (rollOut) {
_root.sidebar.build.texts = "";
_root.sidebar.texts = "";
}
Symbol 674 MovieClip Frame 1
this._visible = false;
stop();
Symbol 674 MovieClip Frame 2
this._visible = true;
percent = 0;
stop();
Instance of Symbol 654 MovieClip "pp" in Symbol 674 MovieClip Frame 2
onClipEvent (load) {
timer = 0;
pptimer = 0;
this._visible = false;
_parent.percent = 0;
}
onClipEvent (enterFrame) {
if (_parent._currentframe != 10) {
timer++;
pptimer++;
if (pptimer == 20) {
_parent.percent = _parent.percent + 1.25;
pptimer = 0;
}
if (timer == 200) {
_parent.nextFrame();
timer = 0;
}
}
}
Symbol 674 MovieClip Frame 10
_root.weaponsilo1.silodoors.play();
stop();
Symbol 694 MovieClip Frame 1
this._visible = false;
stop();
Symbol 694 MovieClip Frame 2
this._visible = true;
stop();
Instance of Symbol 654 MovieClip in Symbol 694 MovieClip Frame 2
onClipEvent (load) {
timer = 0;
_parent.percent = 0;
pptimer = 0;
this._visible = false;
}
onClipEvent (enterFrame) {
timer++;
pptimer++;
if (pptimer > 20) {
_parent.percent = _parent.percent + 1.25;
pptimer = 0;
}
if (timer == 200) {
_parent.nextFrame();
timer = 0;
}
}
Symbol 694 MovieClip Frame 9
_root.enemyweaponsilo1.silodoors.play();
Symbol 694 MovieClip Frame 10
len = _root.structurearray.length - 2;
if (_root[_root.structurearray[len]]._x != undefined) {
af = _root.structurearray[len];
_root.sidebar.enemynuketimer.gotoAndPlay(2);
_root.attachMovie("flag2", "nuclearstrike2", _root.n);
_root.nuclearstrike2._x = _root[af]._x;
_root.nuclearstrike2._y = _root[af]._y;
_root.objarray.push("nuclearstrike2");
_root.n++;
hit = true;
_root.attachMovie("nukemiss2", "nukemiss2", _root.n);
_root.nukemiss2._x = _root.enemyweaponsilo1._x;
_root.nukemiss2._y = _root.enemyweaponsilo1._y;
_root.n++;
_root.enemyweaponsilo1.silodoors.gotoAndStop(1);
soundobj = new Sound();
soundobj.attachSound("launch");
soundobj.start();
}
Instance of Symbol 654 MovieClip in Symbol 694 MovieClip Frame 10
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
timer++;
if (timer > 100) {
len = _root.structurearray.length - 2;
if (_root[_root.structurearray[len]]._x != undefined) {
af = _root.structurearray[len];
_root.sidebar.enemynuketimer.gotoAndPlay(2);
_root.attachMovie("flag2", "nuclearstrike2", _root.n);
_root.nuclearstrike2._x = _root[af]._x;
_root.nuclearstrike2._y = _root[af]._y;
_root.objarray.push("nuclearstrike2");
_root.n++;
hit = true;
_root.attachMovie("nukemiss2", "nukemiss2", _root.n);
_root.nukemiss2._x = _root.enemyweaponsilo1._x;
_root.nukemiss2._y = _root.enemyweaponsilo1._y;
_root.n++;
_root.enemyweaponsilo1.silodoors.gotoAndStop(1);
soundobj = new Sound();
soundobj.attachSound("launch");
soundobj.start();
}
timer = 0;
}
}
Symbol 700 MovieClip Frame 1
n = 0;
hit = false;
stop();
Symbol 700 MovieClip Frame 2
stop();
Symbol 704 Button
on (press) {
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("blip");
soundobj.start();
}
i = 20;
while (i > 0) {
if (this._name == ("d" + i)) {
unit = _root.selectedarray[i - 1];
hp = _root[unit].life;
if ((hp > 0) && (hp != undefined)) {
firepower = _root[unit].damage;
hp2 = _root[unit].fulllife;
rate = 1 / _root[unit].firerate;
speed = _root[unit].speed;
range = _root[unit].range;
unittype = _root[unit].unittype;
_parent.unittype = unittype;
if (unittype == "light") {
unittype2 = "Light Tank";
} else if (unittype == "heavy") {
unittype2 = "Heavy Tank";
} else if (unittype == "rocket") {
unittype2 = "Rocket Launcher";
} else if (unittype == "humvee") {
unittype2 = "Humvee";
} else if (unittype == "artillery") {
unittype2 = "Artillery";
} else if (unittype == "dozer") {
unittype2 = "Construction Dozer";
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
i--;
}
_parent.unit = unit;
_root.selectedarray = [unit];
_root[unit].selector._visible = true;
_parent.stats = (((((((((((((((((unittype2 + newline) + newline) + "firepower:") + firepower) + newline) + "HP:") + hp) + "/") + hp2) + newline) + "speed:") + speed) + newline) + "rate of fire:") + rate) + newline) + "range:") + range;
_parent.gotoAndStop("selected");
}
}
i--;
}
}
Symbol 728 MovieClip Frame 1
stop();
Symbol 728 MovieClip Frame 2
stop();
Instance of Symbol 700 MovieClip "boxns" in Symbol 728 MovieClip Frame 2
onClipEvent (load) {
if (_root[_parent.unit].enemy) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 93 MovieClip in Symbol 728 MovieClip Frame 2
onClipEvent (load) {
if (!_root[_parent.unit].accurate) {
this._visible = false;
}
}
Instance of Symbol 95 MovieClip in Symbol 728 MovieClip Frame 2
onClipEvent (load) {
if (!_root[_parent.unit].nuke) {
this._visible = false;
}
}
Instance of Symbol 97 MovieClip in Symbol 728 MovieClip Frame 2
onClipEvent (load) {
if (!_root[_parent.unit].emp) {
this._visible = false;
}
}
Symbol 728 MovieClip Frame 3
stop();
Instance of Symbol 99 MovieClip in Symbol 728 MovieClip Frame 3
onClipEvent (load) {
if (!_root[_parent.unit].shell2) {
this._visible = false;
}
}
Instance of Symbol 101 MovieClip in Symbol 728 MovieClip Frame 3
onClipEvent (load) {
if (!_root[_parent.unit].hitonly) {
this._visible = false;
}
}
Instance of Symbol 103 MovieClip in Symbol 728 MovieClip Frame 3
onClipEvent (load) {
if (!_root[_parent.unit].auto) {
this._visible = false;
}
}
Symbol 728 MovieClip Frame 4
stop();
Instance of Symbol 113 MovieClip in Symbol 728 MovieClip Frame 4
onClipEvent (load) {
if (!_root[_parent.unit].seeker) {
this._visible = false;
}
}
Instance of Symbol 111 MovieClip in Symbol 728 MovieClip Frame 4
onClipEvent (load) {
if (_root[_parent.unit].miss != 3) {
this._visible = false;
}
}
Instance of Symbol 115 MovieClip in Symbol 728 MovieClip Frame 4
onClipEvent (load) {
if (_root[_parent.unit].miss != 2) {
this._visible = false;
}
}
Instance of Symbol 117 MovieClip in Symbol 728 MovieClip Frame 4
onClipEvent (load) {
if (!_root[_parent.unit].blast) {
this._visible = false;
}
}
Symbol 728 MovieClip Frame 5
stop();
Instance of Symbol 105 MovieClip in Symbol 728 MovieClip Frame 5
onClipEvent (load) {
if (!_root[_parent.unit].gatling) {
this._visible = false;
}
}
Instance of Symbol 107 MovieClip in Symbol 728 MovieClip Frame 5
onClipEvent (load) {
if (!_root[_parent.unit].laser) {
this._visible = false;
}
}
Symbol 728 MovieClip Frame 6
stop();
Instance of Symbol 109 MovieClip in Symbol 728 MovieClip Frame 6
onClipEvent (load) {
if (!_root[_parent.unit].crush) {
this._visible = false;
}
}
Instance of Symbol 115 MovieClip in Symbol 728 MovieClip Frame 6
onClipEvent (load) {
if (!_root[_parent.unit].missile) {
this._visible = false;
}
}
Instance of Symbol 101 MovieClip in Symbol 728 MovieClip Frame 6
onClipEvent (load) {
if (!_root[_parent.unit].hitonly) {
this._visible = false;
}
}
Instance of Symbol 103 MovieClip in Symbol 728 MovieClip Frame 6
onClipEvent (load) {
if (!_root[_parent.unit].auto) {
this._visible = false;
}
}
Symbol 728 MovieClip Frame 7
stop();
Symbol 728 MovieClip Frame 8
stop();
Symbol 728 MovieClip Frame 9
stop();
Symbol 728 MovieClip Frame 10
stop();
Symbol 728 MovieClip Frame 11
stop();
Symbol 728 MovieClip Frame 12
stop();
Symbol 728 MovieClip Frame 13
stop();
Symbol 728 MovieClip Frame 14
stop();
Instance of Symbol 612 MovieClip in Symbol 728 MovieClip Frame 14
/* no clip actions */
Symbol 728 MovieClip Frame 15
stop();
Symbol 728 MovieClip Frame 16
stop();
Symbol 728 MovieClip Frame 17
stop();
Symbol 728 MovieClip Frame 18
stop();
Symbol 728 MovieClip Frame 19
stop();
Symbol 728 MovieClip Frame 20
stop();
Symbol 728 MovieClip Frame 21
stop();
Symbol 728 MovieClip Frame 22
stop();
Symbol 728 MovieClip Frame 23
stop();
Symbol 751 MovieClip Frame 1
stop();
Symbol 751 MovieClip Frame 2
stop();
Instance of Symbol 700 MovieClip "boxns" in Symbol 751 MovieClip Frame 2
onClipEvent (load) {
if (_root[_parent._parent.unit].enemy) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Symbol 751 MovieClip Frame 3
stop();
Symbol 751 MovieClip Frame 4
stop();
Symbol 751 MovieClip Frame 5
stop();
Symbol 751 MovieClip Frame 6
stop();
Symbol 751 MovieClip Frame 7
stop();
Symbol 751 MovieClip Frame 8
stop();
Symbol 751 MovieClip Frame 9
stop();
Symbol 751 MovieClip Frame 10
stop();
Symbol 751 MovieClip Frame 11
stop();
Symbol 751 MovieClip Frame 12
stop();
Symbol 751 MovieClip Frame 13
stop();
Symbol 751 MovieClip Frame 14
stop();
Instance of Symbol 612 MovieClip in Symbol 751 MovieClip Frame 14
/* no clip actions */
Symbol 751 MovieClip Frame 15
stop();
Symbol 751 MovieClip Frame 16
stop();
Symbol 751 MovieClip Frame 17
stop();
Symbol 751 MovieClip Frame 18
stop();
Symbol 751 MovieClip Frame 19
stop();
Symbol 751 MovieClip Frame 20
stop();
Symbol 751 MovieClip Frame 21
stop();
Symbol 751 MovieClip Frame 22
stop();
Symbol 751 MovieClip Frame 23
stop();
Symbol 752 MovieClip Frame 1
stop();
Symbol 752 MovieClip Frame 2
stop();
Instance of Symbol 751 MovieClip "picture" in Symbol 752 MovieClip Frame 2
onClipEvent (mouseUp) {
_parent.vet.gotoAndStop(_root[unit].selector.veteran._currentframe);
this.gotoAndStop(_parent.unittype);
}
onClipEvent (enterFrame) {
unit = _parent.unit;
hp = Math.round(_root[unit].life);
if ((hp < 0) || (hp == undefined)) {
_parent.prevFrame();
}
firepower = _root[unit].damage;
hp2 = _root[unit].fulllife;
rate = _root[unit].firerate;
speed = _root[unit].speed;
shellspd = _root[unit].shellspd;
range = _root[unit].range;
unittype = _root[unit].unittype;
_parent.unittype = unittype;
if (unittype == "light") {
unittype2 = "Light Tank";
}
if (unittype == "lasertank") {
unittype2 = "Laser Tank";
}
if (unittype == "techcentre") {
unittype2 = "Tech Centre";
}
if (unittype == "heavy") {
unittype2 = "Heavy Tank";
}
if (unittype == "rocket") {
unittype2 = "Rocket Launcher";
}
if (unittype == "apc") {
unittype2 = " APC";
}
if (unittype == "humvee") {
unittype2 = "Humvee";
}
if (unittype == "artillery") {
unittype2 = "Artillery";
}
if (unittype == "war factory") {
unittype2 = "War Factory";
}
if (unittype == "dozer") {
unittype2 = "Construction Dozer";
}
if (unittype == "comcentre") {
unittype2 = "Command Centre";
}
if (unittype == "oiltruck") {
unittype2 = "Oil Truck";
}
if (unittype == "refinery") {
unittype2 = "Oil Refinery";
}
if (unittype == "construction") {
unittype2 = "Construction Site";
}
if (unittype == "turret1") {
unittype2 = "Gattling Turret";
}
if (unittype == "turret2") {
unittype2 = "Patriot Missile";
}
if (unittype == "turret3") {
unittype2 = "Laser";
}
if (unittype == "servicedepot") {
unittype2 = "Service Depot";
}
if (unittype == "mine") {
unittype2 = "Mine";
}
if (unittype == "weaponsilo") {
unittype2 = "Weapon Silo";
}
if (unittype == "derrick") {
unittype2 = "Enemy Laser Tank Facility";
}
if (unittype == "airport") {
unittype2 = "Airport";
}
if (unittype == "radar") {
unittype2 = "Control Station";
}
if (_root[unit].enemy) {
unittype2 = "Enemy " + unittype2;
}
if (_root[unit].ally) {
unittype2 = "Allied " + unittype2;
}
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].selector._visible = false;
_root[current].selected1 = false;
i--;
}
aggressive = _root[unit].aggressive;
avoid = _root[unit].avoid;
_root.selectedarray = [unit];
_root[unit].selector._visible = true;
_parent.stats = (((((((((((((((((((((((unittype2 + newline) + "firepower:") + firepower) + newline) + "HP:") + hp) + "/") + hp2) + newline) + "speed:") + speed) + newline) + "weapon speed:") + shellspd) + newline) + "reload time:") + rate) + newline) + "range:") + range) + "\n guardmode:") + aggressive) + "\n avoid fire:") + avoid;
}
Instance of Symbol 93 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].accurate) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 95 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].nuke) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (load) {
if (!_root[_parent.unit].emp) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 99 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].shell2) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 101 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].hitonly) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 103 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].auto) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 105 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].gatling) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 107 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].laser) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 109 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].crush) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 111 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root[_parent.unit].miss != 3) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 113 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].seeker) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 115 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if ((_root[_parent.unit].miss != 2) || (_root[_parent.unit].missile && (_root[_parent.unit].unittype == "heavy"))) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 117 MovieClip in Symbol 752 MovieClip Frame 2
onClipEvent (enterFrame) {
if (!_root[_parent.unit].blast) {
this._visible = false;
} else {
this._visible = true;
}
}
Symbol 757 Button
on (press) {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if (((_parent[current].speed != undefined) && (_parent[current].damage != undefined)) && (!_parent[current].enemy)) {
_parent[current].targetobj = undefined;
_parent[current].fireing = false;
_parent[current].attack = false;
flag = _parent[current].dummy.flag;
_root[_parent[current].dummy.flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent[current].walking = false;
}
i--;
}
}
on (keyPress "s") {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if (((_parent[current].speed != undefined) && (_parent[current].damage != undefined)) && (!_parent[current].enemy)) {
_parent[current].targetobj = undefined;
_parent[current].fireing = false;
_parent[current].attack = false;
flag = _parent[current].dummy.flag;
_root[_parent[current].dummy.flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent[current].walking = false;
}
i--;
}
}
on (rollOver) {
build.texts = "Stops the selected units";
texts = "Stops the selected units";
}
on (rollOut) {
texts = "";
build.texts = "";
}
Symbol 761 Button
on (press) {
soundobj = new Sound();
soundobj.attachSound("o3");
soundobj.start();
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if (((!_parent[current].enemy) && (_parent[current].speed != undefined)) && (_parent[current].damage != undefined)) {
_parent[current].aggressive = false;
}
i--;
}
}
on (keyPress "u") {
soundobj = new Sound();
soundobj.attachSound("o3");
soundobj.start();
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if (((!_parent[current].enemy) && (_parent[current].speed != undefined)) && (_parent[current].damage != undefined)) {
_parent[current].aggressive = false;
}
i--;
}
}
on (rollOver) {
build.texts = "Forces all selected units into 'harmless' mode.\n 'harmless' units won't attack any unit unless ordered to.";
texts = "Forces all selected units into 'harmless' mode.\n 'harmless' units won't attack any unit unless ordered to.";
}
on (rollOut) {
texts = "";
build.texts = "";
}
Symbol 765 Button
on (press) {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
_root.formation = "sparse";
}
on (rollOver) {
build.texts = "The selected units will gather in a scattered formation at the location specified by the mouse";
texts = "The selected units will gather in a scattered formation at the location specified by the mouse";
}
on (rollOut) {
texts = "";
build.texts = "";
}
Symbol 772 Button
on (press) {
doo();
}
on (rollOver) {
_root.sidebar.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_root.sidebar.texts = "";
}
Symbol 773 MovieClip Frame 1
stop();
Symbol 773 MovieClip Frame 2
stop();
Symbol 779 Button
on (press) {
if (_root.sidebar._visible) {
this.build._visible = true;
i = 20;
while (i > -1) {
this["s" + i].gotoAndStop(1);
i--;
}
}
}
on (keyPress "d") {
if (_root.sidebar._visible) {
this.build._visible = true;
i = 20;
while (i > -1) {
this["s" + i].gotoAndStop(1);
i--;
}
}
}
Symbol 783 Button
on (press) {
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if ((_parent[current].unittype == "artillery") && (!_parent[current].enemy)) {
_parent[current].deploy();
if (deploying == undefined) {
soundobj = new Sound();
soundobj.attachSound("deploying");
soundobj.start();
deploying = true;
}
}
i--;
}
deploying = undefined;
}
on (keyPress "d") {
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if ((_parent[current].unittype == "artillery") && (!_parent[current].enemy)) {
_parent[current].deploy();
if (deploying == undefined) {
soundobj = new Sound();
soundobj.attachSound("deploying");
soundobj.start();
deploying = true;
}
}
i--;
}
deploying = undefined;
}
on (rollOver) {
build.texts = "Deploys the selected artillery into firing position";
texts = "Deploys the selected artillery into firing position";
}
on (rollOut) {
texts = "";
build.texts = "";
}
Symbol 787 Button
on (press) {
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if ((_parent[current].auto._x != undefined) && (!_parent[current].enemy)) {
_parent[current]._visible = false;
_parent.money = _parent.money + _parent[current].life;
_parent[current].life = 0;
_parent[current]._visible = false;
soundobj = new Sound();
soundobj.attachSound("sold");
soundobj.start();
}
i--;
}
}
on (rollOver) {
build.texts = "Sells the selected structures for their HP worth of cash";
texts = "Sells the selected structures for their HP worth of cash";
}
on (rollOut) {
texts = "";
build.texts = "";
}
Symbol 791 Button
on (press) {
soundobj = new Sound();
soundobj.attachSound("o2");
soundobj.start();
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if (((!_parent[current].enemy) && (_parent[current].speed != undefined)) && (_parent[current].damage != undefined)) {
_parent[current].aggressive = true;
}
i--;
}
}
on (keyPress "g") {
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("o2");
soundobj.start();
}
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if (((!_parent[current].enemy) && (_parent[current].speed != undefined)) && (_parent[current].damage != undefined)) {
_parent[current].aggressive = true;
}
i--;
}
}
on (rollOver) {
build.texts = "Sends all selected unit into guard mode.\n They will attack any enemy that comes near them.";
texts = "Sends all selected unit into guard mode.\n They will attack any enemy that comes near them.";
}
on (rollOut) {
texts = "";
build.texts = "";
}
Symbol 795 Button
on (press) {
soundobj = new Sound();
soundobj.attachSound("o3");
soundobj.start();
i = _parent.selectedarray.length - 1;
while (i > -1) {
current = _parent.selectedarray[i];
if (((!_parent[current].enemy) && (_parent[current].speed != undefined)) && (_parent[current].damage != undefined)) {
_parent[current].avoid = avoid;
}
i--;
}
avoid = !avoid;
}
on (rollOver) {
build.texts = "Sends the selected units into 'stand ground' mode.\n They won't move around while firing to avoid return fire.\n Press again to disable 'stand ground' mode.";
texts = "Sends the selected units into 'stand ground' mode.\n They won't move around while firing to avoid return fire.\n Press again to disable 'stand ground' mode.";
}
on (rollOut) {
texts = "";
build.texts = "";
}
Symbol 799 Button
on (press) {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
_root.formation = "line";
}
on (rollOver) {
build.texts = "The selected units will gather in a dense line formation at the location specified by the mouse";
texts = "The selected units will gather in a dense line formation at the location specified by the mouse";
}
on (rollOut) {
texts = "";
build.texts = "";
}
Symbol 805 MovieClip Frame 1
this._visible = false;
Symbol 806 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 811 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 815 MovieClip Frame 1
this.cacheAsBitmap = true;
Symbol 818 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 822 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 825 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 826 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
stop();
Symbol 826 MovieClip Frame 2
stop();
Instance of Symbol 811 MovieClip "back" in Symbol 826 MovieClip Frame 5
/* no clip actions */
Instance of Symbol 815 MovieClip "back" in Symbol 826 MovieClip Frame 7
/* no clip actions */
Instance of Symbol 358 MovieClip "back" in Symbol 826 MovieClip Frame 8
/* no clip actions */
Instance of Symbol 818 MovieClip "back" in Symbol 826 MovieClip Frame 9
onClipEvent (load) {
}
Instance of Symbol 362 MovieClip "back" in Symbol 826 MovieClip Frame 10
/* no clip actions */
Instance of Symbol 822 MovieClip "back" in Symbol 826 MovieClip Frame 11
/* no clip actions */
Instance of Symbol 825 MovieClip "back" in Symbol 826 MovieClip Frame 12
/* no clip actions */
Symbol 830 MovieClip Frame 1
stop();
Symbol 830 MovieClip Frame 2
stop();
Symbol 836 MovieClip Frame 5
if (_parent.timer > 8) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_parent.hitonly) {
if (_root[current].hitTest(_parent) && (_root[current].enemy == _root[_parent.targetobj].enemy)) {
_parent.targetobj = current;
_parent.play();
break;
}
}
if (!_parent.hitonly) {
if (_root[current].hitTest(_parent)) {
_parent.targetobj = current;
_parent.play();
break;
}
}
i--;
}
}
if ((_parent.timer > 8) && (_parent.hitonly)) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (_root[current].hitTest(_parent) && (_root[current].enemy == _root[_parent.targetobj].enemy)) {
_parent.hits = current;
_parent.play();
break;
}
i--;
}
}
if (_parent.hitTest(_root[_parent.targetobj])) {
_parent.play();
}
if (_parent.timer > 40) {
_parent.removeMovieClip();
}
Symbol 839 Button
on (rollOver) {
_root.sidebar.texts = _parent.texts;
}
on (rollOut) {
_root.sidebar.texts = "";
}
Symbol 846 MovieClip Frame 1
stop();
Symbol 846 MovieClip Frame 8
_parent.nextFrame();
Symbol 847 Button
on (press) {
doo();
}
on (keyPress "z") {
doo();
}
on (rollOver) {
_root.sidebar.texts = texts;
}
on (rollOut) {
_root.sidebar.texts = "";
}
Symbol 849 MovieClip Frame 1
Symbol 849 MovieClip Frame 2
stop();
Instance of Symbol 846 MovieClip in Symbol 849 MovieClip Frame 2
onClipEvent (load) {
timer = 29;
}
onClipEvent (enterFrame) {
timer++;
if (timer == 30) {
maxtimer = 0;
timer = 0;
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (_root[current].unittype == _parent.unit) {
if (_root[current].timer >= maxtimer) {
maxtimer = _root[current].timer;
if (maxtimer >= 100) {
_parent.nextFrame();
break;
}
}
}
i--;
}
frame = Math.round(maxtimer / 12.5);
gotoAndStop(frame);
}
}
Symbol 849 MovieClip Frame 3
stop();
Instance of Symbol 654 MovieClip "num1" in Symbol 849 MovieClip Frame 3
onClipEvent (load) {
timer = 0;
_parent.num2.queue = 0;
}
onClipEvent (enterFrame) {
timer++;
if (timer == 30) {
_parent.num2.queue = 0;
queue = 0;
timer = 0;
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (_root[current].unittype == _parent.unit) {
_parent.num2.queue++;
if (_root[current].timer >= 100) {
queue++;
}
}
i--;
}
}
}
Instance of Symbol 654 MovieClip "num2" in Symbol 849 MovieClip Frame 3
/* no clip actions */
Symbol 856 Button
on (press) {
soundobj = new Sound();
soundobj.attachSound("building");
soundobj.start();
if (_root.money >= cost) {
if (_parent.buildlist.length == 0) {
play();
} else {
gotoAndStop ("reserved");
}
_root.money = _root.money - cost;
this.buildno++;
_parent.buildlist.push(unittype);
}
}
on (rollOver) {
_parent.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_parent.texts = "";
}
Symbol 858 Button
on (press) {
doo();
}
on (rollOver) {
_root.sidebar.texts = texts;
}
on (rollOut) {
_root.sidebar.texts = "";
}
Symbol 859 Button
on (press) {
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
}
if (_root.money >= cost) {
_root.money = _root.money - cost;
this.buildno++;
_parent.buildlist.push(unittype);
} else {
soundobj = new Sound();
soundobj.attachSound("fund");
soundobj.start();
}
}
on (rollOver) {
_root.sidebar.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_root.sidebar.texts = "";
}
Symbol 862 Button
on (press) {
if (_root.moeny >= cost) {
if (_parent.buildlist.length == 0) {
play();
}
_root.money = _root.money - cost;
this.buildno++;
this.s.queue++;
_parent.buildlist.push(unittype);
} else {
soundobj = new Sound();
soundobj.attachSound("fund");
soundobj.start();
}
}
on (rollOver) {
_parent.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_parent.texts = "";
}
Symbol 863 MovieClip Frame 1
if (_root.warfactory < 1) {
this.buildno = 0;
stop();
}
Instance of Symbol 855 MovieClip in Symbol 863 MovieClip Frame 1
onClipEvent (mouseDown) {
if ((_root.money > _parent.cost) && (_root.warfactory1._x != undefined)) {
_parent.gotoAndStop(2);
}
}
Symbol 863 MovieClip Frame 2
stop();
Symbol 863 MovieClip Frame 3
stop();
Instance of Symbol 654 MovieClip in Symbol 863 MovieClip Frame 3
onClipEvent (load) {
timer = 0;
this.queue = _parent.buildno;
}
onClipEvent (enterFrame) {
timer++;
if (timer >= _parent.rates) {
_parent.nextFrame();
timer = 0;
}
this.queue = _parent.buildno;
}
Symbol 863 MovieClip Frame 11
type = _parent.buildlist.shift();
type2 = _parent.buildlist[0];
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.warfactory1._x;
_root[unittype + _root.n]._y = _root.warfactory1._y;
_root[unittype + _root.n]._rotation = 0;
_root.rallylist.push(unittype + _root.n);
_root.n++;
_root.built++;
if (_parent.buildlist[0] == unittype) {
gotoAndPlay ("building");
} else {
gotoAndStop ("reserved");
_parent[type2].gotoAndPlay("building");
}
buildno--;
if (buildno == 0) {
gotoAndStop (2);
}
Symbol 863 MovieClip Frame 12
stop();
Instance of Symbol 654 MovieClip "s" in Symbol 863 MovieClip Frame 12
onClipEvent (load) {
this.queue = _parent.buildno;
}
Symbol 865 Button
on (press) {
if (_root.sidebar._visible) {
_visible = false;
}
}
on (keyPress "a") {
if (_root.sidebar._visible) {
_visible = false;
}
}
Symbol 866 Button
on (press) {
soundobj = new Sound();
soundobj.attachSound("building");
soundobj.start();
if (_root.money >= cost) {
play();
_root.money = _root.money - cost;
this.buildno++;
} else {
soundobj = new Sound();
soundobj.attachSound("fund");
soundobj.start();
}
}
on (rollOver) {
_parent.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_parent.texts = "";
}
Symbol 867 Button
on (press) {
if (_root.money >= cost) {
_root.money = _root.money - cost;
this.buildno++;
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
} else {
soundobj = new Sound();
soundobj.attachSound("fund");
soundobj.start();
}
}
on (rollOver) {
_root.sidebar.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_root.sidebar.texts = "";
}
Symbol 868 MovieClip Frame 1
stop();
Instance of Symbol 855 MovieClip in Symbol 868 MovieClip Frame 1
onClipEvent (mouseDown) {
if ((_root.money > _parent.cost) && (_root.comcentre1.life != undefined)) {
_parent.gotoAndStop(2);
}
}
Symbol 868 MovieClip Frame 2
stop();
Symbol 868 MovieClip Frame 3
stop();
Instance of Symbol 654 MovieClip in Symbol 868 MovieClip Frame 3
onClipEvent (load) {
timer = 0;
this.queue = _parent.buildno;
}
onClipEvent (enterFrame) {
timer++;
if (timer >= _parent.rates) {
_parent.nextFrame();
timer = 0;
}
this.queue = _parent.buildno;
}
Symbol 868 MovieClip Frame 11
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.comcentre1._x;
_root[unittype + _root.n]._y = _root.comcentre1._y;
_root[unittype + _root.n]._rotation = 0;
_root.n++;
buildno--;
if (buildno == 0) {
gotoAndStop (2);
} else {
gotoAndPlay (3);
}
Symbol 869 Button
on (press) {
if (_root.money >= cost) {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
_root.attachMovie("construction", "construction" + _root.n, _root.n);
_root["construction" + _root.n].drag = true;
_root["construction" + _root.n].structure = structure;
_root["construction" + _root.n].buildrate = buildrate;
_root["construction" + _root.n].cost = cost;
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if (((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) && (!_root[elementsearched].build)) {
found = elementsearched;
break;
}
i--;
}
_root["construction" + _root.n].dozer = found;
_root.n++;
if (found != false) {
_root.money = _root.money - cost;
nextFrame();
}
} else {
soundobj = new Sound();
soundobj.attachSound("fund");
soundobj.start();
}
}
on (rollOver) {
_parent.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_parent.texts = "";
}
Symbol 871 MovieClip Frame 1
stop();
Instance of Symbol 855 MovieClip in Symbol 871 MovieClip Frame 1
/* no clip actions */
Symbol 871 MovieClip Frame 2
stop();
Symbol 871 MovieClip Frame 3
stop();
Instance of Symbol 855 MovieClip in Symbol 871 MovieClip Frame 3
onClipEvent (mouseDown) {
if (_root[structure] < 0) {
gotoAndStop (1);
}
}
Symbol 872 Button
on (press) {
if (_root.money >= cost) {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
_root.attachMovie("construction2", "construction2" + _root.n, _root.n);
_root["construction2" + _root.n].drag = true;
_root["construction2" + _root.n].structure = structure;
_root["construction2" + _root.n].buildrate = buildrate;
_root["construction2" + _root.n].cost = cost;
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if (((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) && (!_root[elementsearched].build)) {
found = elementsearched;
break;
}
i--;
}
_root["construction2" + _root.n].dozer = found;
_root.n++;
if (found != false) {
_root.money = _root.money - cost;
}
} else {
soundobj = new Sound();
soundobj.attachSound("fund");
soundobj.start();
}
}
on (rollOver) {
_parent.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_parent.texts = "";
}
Symbol 873 MovieClip Frame 1
stop();
Instance of Symbol 855 MovieClip in Symbol 873 MovieClip Frame 1
/* no clip actions */
Symbol 873 MovieClip Frame 2
stop();
Symbol 874 Button
on (press) {
if (_root.money >= cost) {
soundobj = new Sound();
soundobj.attachSound("click");
soundobj.start();
if (_parent.buildlist.length == 0) {
play();
} else {
gotoAndStop ("reserved");
}
_root.money = _root.money - cost;
this.buildno++;
_parent.buildlist.push(unittype);
} else {
soundobj = new Sound();
soundobj.attachSound("fund");
soundobj.start();
}
}
on (rollOver) {
_parent.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_parent.texts = "";
}
Symbol 875 Button
on (rollOver) {
_root.sidebar.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_root.sidebar.texts = "";
}
Symbol 876 Button
on (press) {
if (_root.moeny >= cost) {
if (_parent.buildlist.length == 0) {
play();
}
_root.money = _root.money - cost;
this.buildno++;
this.s.queue++;
_parent.buildlist.push(unittype);
}
}
on (rollOver) {
_parent.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_parent.texts = "";
}
Symbol 878 MovieClip Frame 1
if (_root.warfactory < 1) {
stop();
}
Instance of Symbol 855 MovieClip in Symbol 878 MovieClip Frame 1
onClipEvent (mouseDown) {
if (((_root.money > _parent.cost) && (_root.warfactory1._x != undefined)) && (_root.techcentre1._x != undefined)) {
_parent.gotoAndStop(2);
}
}
Symbol 878 MovieClip Frame 2
stop();
Symbol 878 MovieClip Frame 3
stop();
Instance of Symbol 654 MovieClip in Symbol 878 MovieClip Frame 3
onClipEvent (load) {
timer = 0;
this.queue = _parent.buildno;
}
onClipEvent (enterFrame) {
timer++;
if (timer >= _parent.rates) {
_parent.nextFrame();
timer = 0;
}
this.queue = _parent.buildno;
}
Symbol 878 MovieClip Frame 11
type = _parent.buildlist.shift();
type2 = _parent.buildlist[0];
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.warfactory1._x;
_root[unittype + _root.n]._y = _root.warfactory1._y;
_root[unittype + _root.n]._rotation = 0;
_root.rallylist.push(unittype + _root.n);
_root.n++;
_root.built++;
gotoAndStop ("already");
_parent[type2].gotoAndPlay("building");
buildno--;
if (buildno == 0) {
gotoAndStop (2);
}
Symbol 878 MovieClip Frame 12
stop();
Instance of Symbol 654 MovieClip "s" in Symbol 878 MovieClip Frame 12
onClipEvent (load) {
this.queue = _parent.buildno;
}
Symbol 878 MovieClip Frame 13
stop();
Symbol 879 Button
on (press) {
if (_root.money >= cost) {
_root.attachMovie("construction", "construction" + _root.n, _root.n);
_root["construction" + _root.n].drag = true;
_root["construction" + _root.n].structure = structure;
_root["construction" + _root.n].buildrate = buildrate;
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if (((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) && (!_root[elementsearched].build)) {
found = elementsearched;
break;
}
i--;
}
_root["construction" + _root.n].dozer = found;
_root.n++;
if (found != false) {
_root.money = _root.money - cost;
nextFrame();
}
}
}
on (rollOver) {
_parent.texts = ((texts + newline) + "cost:$") + calculatecost;
}
on (rollOut) {
_parent.texts = "";
}
Symbol 880 MovieClip Frame 1
stop();
Instance of Symbol 855 MovieClip in Symbol 880 MovieClip Frame 1
/* no clip actions */
Symbol 880 MovieClip Frame 2
stop();
Symbol 880 MovieClip Frame 3
stop();
Instance of Symbol 855 MovieClip in Symbol 880 MovieClip Frame 3
onClipEvent (mouseDown) {
if (_root[structure] < 0) {
gotoAndStop (1);
}
}
Instance of Symbol 612 MovieClip in Symbol 883 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 863 MovieClip "light" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
unittype = "light";
buildno = 0;
rates = 5;
cost = 1000;
calculatecost = cost;
texts = "Build Light Tank\n\nA medium sized armoured unit\nbasic firepower:20\nbasic HP:300";
}
onClipEvent (mouseDown) {
if (_root.warfactory1.life == undefined) {
gotoAndStop (1);
}
}
Instance of Symbol 863 MovieClip "rocket" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
unittype = "rocket";
buildno = 0;
rates = 8;
cost = 1500;
calculatecost = cost;
texts = "Build Rocket Launcher\n\nSlow but deadly unit in terms of firepower\nbasic firepower:50\nbasic HP:250";
}
onClipEvent (mouseDown) {
if (_root.warfactory1.life == undefined) {
gotoAndStop (1);
}
}
Instance of Symbol 863 MovieClip "artillery" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
unittype = "artillery";
buildno = 0;
rates = 13;
cost = 2000;
calculatecost = cost;
texts = "Build Artillery\nLong range unit used to lob shells great distances.Must be deployed to fire.\nbasic firepower:35\nbasic HP:300";
}
onClipEvent (mouseDown) {
if (_root.warfactory1.life == undefined) {
gotoAndStop (1);
}
}
Instance of Symbol 863 MovieClip "heavy" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
unittype = "heavy";
buildno = 0;
rates = 15;
cost = 2500;
calculatecost = cost;
texts = "Build Heavy Tank\n\nLarge,lumbering but heavily armoured unit\nbasic firepower:30\nbasic HP:600";
}
onClipEvent (mouseDown) {
if (_root.warfactory1.life == undefined) {
gotoAndStop (1);
}
}
Instance of Symbol 868 MovieClip "dozer" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
unittype = "dozer";
buildno = 0;
rates = 8;
cost = 1000;
calculatecost = cost;
texts = "Build Dozer\n\nUsed to construct or repair buildings";
}
onClipEvent (mouseDown) {
if (_root.comcentre1.life == undefined) {
gotoAndStop (1);
}
}
Instance of Symbol 863 MovieClip "oiltruck" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
unittype = "oiltruck";
buildno = 0;
rates = 7;
cost = 1500;
calculatecost = cost;
texts = "Build Oil Truck\n\nGathers oil from oil wells and converts it into cash ";
}
Instance of Symbol 871 MovieClip "warfactory" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "warfactory";
cost = 2000;
calculatecost = cost;
buildrate = 1;
texts = "Build War Factory\n\nBuilds your units.";
}
onClipEvent (mouseUp) {
if (this._currentframe != 3) {
if (_root[structure] > 0) {
gotoAndStop (3);
}
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.comcentre1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
}
Instance of Symbol 871 MovieClip "techcentre" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "techcentre";
cost = 1500;
calculatecost = cost;
buildrate = 0.7;
texts = "Build Tech Centre\n\nEnables unit upgrading, and the laser tank prototype, and weapon silo to be built";
}
onClipEvent (mouseUp) {
if (this._currentframe != 3) {
if (_root[structure] > 0) {
gotoAndStop (3);
}
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.warfactory1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
}
Instance of Symbol 873 MovieClip "turrets" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "turrets";
cost = 1000;
calculatecost = cost;
buildrate = 1.5;
texts = "Build Gattling Turret\n\nBase Defense.Fires bullets in quick sucession.";
}
onClipEvent (mouseUp) {
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.comcentre1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 873 MovieClip "patriotmissile" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "patriotmiss";
cost = 1500;
calculatecost = cost;
buildrate = 1.5;
texts = "Build Patriot Missile Turret\n\nBase Defense.Fires 3 homing missiles at enemy.";
}
onClipEvent (mouseUp) {
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.comcentre1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 873 MovieClip "laser" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "laserbasedefense";
cost = 1500;
calculatecost = cost;
buildrate = 1.5;
texts = "Build Laser Turret\n\nBase Defense.Fires one devastating laser bolt at enemy.";
}
onClipEvent (mouseUp) {
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.comcentre1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 871 MovieClip "servicedepot" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "servicedepot";
cost = 1500;
calculatecost = cost;
buildrate = 1;
texts = "Build Service Depot\n\nRepairs damaged units that come on top of it.";
}
onClipEvent (mouseUp) {
if (this._currentframe != 3) {
if (_root[structure] > 0) {
gotoAndStop (3);
}
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.refinery1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
}
Instance of Symbol 873 MovieClip "mine" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "mine";
cost = 1000;
calculatecost = cost;
buildrate = 5;
texts = "Build Mine\n\nBase Defense.Detonates when enemy units come too close, disabling and damaging it";
}
onClipEvent (mouseUp) {
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.comcentre1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 878 MovieClip "lasertank" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
unittype = "lasertank";
buildno = 0;
rates = 30;
cost = 5000;
calculatecost = cost;
texts = "Build Laser Tank\n\nPrototype special unit.Limited to one unit at a time\nbasic firepower:80\nbasic HP:1000";
}
onClipEvent (mouseDown) {
if (_root.warfactory1.life == undefined) {
gotoAndStop (1);
}
}
Instance of Symbol 880 MovieClip "weaponsilo" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "weaponsilo";
cost = 10000;
calculatecost = cost;
buildrate = 0.2;
texts = "Build Weapon Silo\n\nUnleashes the Nuclear Missile superweapon ";
}
onClipEvent (mouseUp) {
if (this._currentframe != 3) {
if (_root[structure] > 0) {
gotoAndStop (3);
}
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.techcentre1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
}
Instance of Symbol 863 MovieClip "humvee" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
unittype = "humvee";
buildno = 0;
rates = 2;
cost = 500;
calculatecost = cost;
texts = "Build Humvee\n\nA fast agile unit with high rate of fire\nbasic firepower:7\nbasic HP:200";
}
onClipEvent (mouseDown) {
if (_root.warfactory1.life == undefined) {
gotoAndStop (1);
}
}
Instance of Symbol 871 MovieClip "refinery" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "refinery";
cost = 3000;
calculatecost = cost;
buildrate = 1;
texts = "Build Oil Refinery\n\nUsed by Oiltrucks to refine oil and convert into cash.";
}
onClipEvent (mouseUp) {
if (this._currentframe != 3) {
if (_root[structure] > 0) {
gotoAndStop (3);
}
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if (((_root.money > cost) && (found)) && (_root.comcentre1._x != undefined)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
}
Instance of Symbol 871 MovieClip "comcentre" in Symbol 883 MovieClip Frame 1
onClipEvent (load) {
structure = "comcentre";
cost = 5000;
calculatecost = cost;
buildrate = 0.5;
texts = "Build Command Centre\n\nWhere you build dozers to construct or repair your base.Provides radar.";
}
onClipEvent (mouseUp) {
if (this._currentframe != 3) {
if (_root[structure] > 0) {
gotoAndStop (3);
}
found = false;
i = _root.selectedarray.length - 1;
while (i > -1) {
elementsearched = _root.selectedarray[i];
if ((_root[elementsearched].unittype == "dozer") && (!_root[elementsearched].enemy)) {
found = true;
break;
}
i--;
}
if ((_root.money > cost) && (found)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
}
Symbol 887 Button
on (release) {
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
_root[current].life = 0;
i--;
}
if (_root.mission) {
currentframe = _root._currentframe;
_root.gotoAndStop(currentframe + 2);
}
}
Instance of Symbol 249 MovieClip in Symbol 888 MovieClip Frame 1
/* no clip actions */
Symbol 889 MovieClip [sidebar] Frame 1
function calccost() {
_root.money = Math.round(_root.money);
if (_root.selectedarray.length == 0) {
this.shower.gotoAndStop(1);
}
if (_root.selectedarray.length == 1) {
this.shower.gotoAndStop(2);
this.shower.unit = _root.selectedarray[0];
this.shower.unittype = _root[_root.selectedarray[0]].unittype;
} else {
this.shower.gotoAndStop(1);
}
laser = 0;
hitonly = 0;
firepower = 0;
armour = 0;
fire = 0;
range = 0;
speed = 0;
shell = 0;
auto = 0;
loads = 0;
miss2 = 0;
crush = 0;
seeker = 0;
blast = 0;
gatling = 0;
accurate = 0;
enemy = true;
nuke = 0;
emp = 0;
rocket = false;
light = false;
humvee = false;
artillery = false;
heavy = false;
i = 20;
while (i > -1) {
this["s" + i].gotoAndStop(1);
this.shower["d" + Number(i + 1)].gotoAndStop(1);
i--;
}
if (_root.selectedarray.length <= 0) {
this.s1.gotoAndStop(1);
this.s2.gotoAndStop(1);
this.s7.gotoAndStop(1);
this.s8.gotoAndStop(1);
this.s13.gotoAndStop(1);
this.s14.gotoAndStop(1);
}
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (!this.build._visible) {
if (_root.techcentre1._x != undefined) {
if (_root[current].unittype == "rocket") {
if (!_root[current].enemy) {
rocket = true;
if (!_root[current].blast) {
if (_root.money >= this.s16.cost) {
this.s16.gotoAndStop(2);
}
blast = blast + this.s16.cost;
}
}
}
if (!_root[current].enemy) {
if (_root[current].unittype == "rocket") {
if (!_root[current].seeker) {
if (_root.money >= this.s4.cost) {
this.s4.gotoAndStop(2);
}
seeker = seeker + this.s4.cost;
}
}
if (_root[current].unittype == "rocket") {
if (_root[current].miss < 3) {
if (_root.money >= this.s10.cost) {
this.s10.gotoAndStop(2);
}
miss2 = miss2 + this.s10.cost;
}
}
if (_root[current].unittype == "heavy") {
heavy = true;
if (!_root[current].missile) {
this.s10.gotoAndStop(2);
miss2 = miss2 + (this.s10.cost * 2);
}
}
}
if (_root[current].unittype == "humvee") {
if (!_root[current].enemy) {
if (!_root[current].gatling) {
humvee = true;
if (_root.money >= this.s5.cost) {
this.s5.gotoAndStop(2);
}
gatling = gatling + this.s5.cost;
}
if (!_root[current].laser) {
if (_root.money >= this.s11.cost) {
this.s11.gotoAndStop(2);
}
laser = laser + this.s11.cost;
}
}
}
if (((_root[current].unittype == "rocket") || (_root[current].unittype == "light")) || (_root[current].unittype == "heavy")) {
if (!_root[current].enemy) {
if (!_root[current].hitonly) {
hitonly = hitonly + this.s17.cost;
if (_root.money >= this.s17.cost) {
this.s17.gotoAndStop(2);
}
light = true;
}
}
}
if (_root[current].unittype == "artillery") {
if (!_root[current].enemy) {
artillery = true;
if (!_root[current].accurate) {
if (_root.money >= this.s6.cost) {
this.s6.gotoAndStop(2);
}
accurate = accurate + this.s6.cost;
}
if (!_root[current].nuke) {
if (_root.money >= this.s12.cost) {
this.s12.gotoAndStop(2);
}
nuke = nuke + this.s12.cost;
}
if (!_root[current].emp) {
if (_root.money >= this.s18.cost) {
this.s18.gotoAndStop(2);
}
emp = emp + this.s18.cost;
}
}
}
if (_root[current].unittype == "light") {
if (!_root[current].enemy) {
if (!_root[current].shell2) {
if (_root.money >= this.s3.cost) {
this.s3.gotoAndStop(2);
}
loads = loads + this.s3.cost;
}
}
}
if (_root[current].unittype == "heavy") {
if (!_root[current].enemy) {
if (!_root[current].crush) {
if (_root.money >= this.s9.cost) {
this.s9.gotoAndStop(2);
}
crush = crush + this.s9.cost;
}
}
}
if (((_root[current].unittype == "light") || (_root[current].unittype == "heavy")) || (_root[current].unittype == "dozer")) {
if (!_root[current].enemy) {
if (!_root[current].auto) {
if (_root.money >= this.s15.cost) {
this.s15.gotoAndStop(2);
}
auto = auto + this.s15.cost;
}
}
}
}
}
if (_root[current].unittype == "rocket") {
this.s2.gotoAndStop(2);
this.shower["d" + Number(i + 1)].gotoAndStop("rocket");
}
if (_root[current].unittype == "humvee") {
this.s1.gotoAndStop(2);
this.shower["d" + Number(i + 1)].gotoAndStop("humvee");
}
if (_root[current].unittype == "artillery") {
this.s8.gotoAndStop(2);
this.shower["d" + Number(i + 1)].gotoAndStop("artillery");
}
if (_root[current].unittype == "light") {
this.s13.gotoAndStop(2);
this.shower["d" + Number(i + 1)].gotoAndStop("light");
}
if (_root[current].unittype == "heavy") {
this.s7.gotoAndStop(2);
this.shower["d" + Number(i + 1)].gotoAndStop("heavy");
}
if (_root[current].unittype == "war factory") {
this.shower["d" + Number(i + 1)].gotoAndStop("war factory");
}
if (_root[current].unittype == "dozer") {
this.shower["d" + Number(i + 1)].gotoAndStop("dozer");
}
if (_root[current].unittype == "comcentre") {
this.shower["d" + Number(i + 1)].gotoAndStop("comcentre");
}
if (_root[current].unittype == "lasertank") {
this.s14.gotoAndStop(2);
this.shower["d" + Number(i + 1)].gotoAndStop("lasertank");
}
if (_root[current].unittype == "oiltruck") {
this.shower["d" + Number(i + 1)].gotoAndStop("oiltruck");
}
if (_root[current].unittype == "refinery") {
this.shower["d" + Number(i + 1)].gotoAndStop("refinery");
}
if (_root[current].unittype == "construction") {
this.shower["d" + Number(i + 1)].gotoAndStop("construction");
}
if (_root[current].unittype == "turret1") {
this.shower["d" + Number(i + 1)].gotoAndStop("turret1");
}
if (_root[current].unittype == "mine") {
this.shower["d" + Number(i + 1)].gotoAndStop("mine");
}
if (_root[current].unittype == "turret2") {
this.shower["d" + Number(i + 1)].gotoAndStop("turret2");
}
if (_root[current].unittype == "servicedepot") {
this.shower["d" + Number(i + 1)].gotoAndStop("servicedepot");
}
if (_root[current].unittype == "turret3") {
this.shower["d" + Number(i + 1)].gotoAndStop("turret3");
}
if (_root[current].unittype == "weaponsilo") {
this.shower["d" + Number(i + 1)].gotoAndStop("weaponsilo");
}
if (_root[current].unittype == "techcentre") {
this.shower["d" + Number(i + 1)].gotoAndStop("techcentre");
}
if (_root[current].unittype == "derrick") {
this.shower["d" + Number(i + 1)].gotoAndStop("derrick");
}
if (_root[current].unittype == "apc") {
this.shower["d" + Number(i + 1)].gotoAndStop("apc");
}
if (_root[current].unittype == "radar") {
this.shower["d" + Number(i + 1)].gotoAndStop("radar");
}
this.shower["d" + Number(i + 1)].unit = current;
i--;
}
if (this._currentframe == 1) {
this.s6.calculatecost = accurate;
this.s12.calculatecost = nuke;
this.s18.calculatecost = emp;
this.s9.calculatecost = crush;
this.s3.calculatecost = loads;
this.s15.calculatecost = auto;
this.s16.calculatecost = blast;
this.s11.calculatecost = laser;
this.s10.calculatecost = miss2;
this.s4.calculatecost = seeker;
this.s5.calculatecost = gatling;
this.s17.calculatecost = hitonly;
this.s1.calculatecost = firepower;
this.s2.calculatecost = fire;
this.s7.calculatecost = armour;
this.s8.calculatecost = range;
this.s13.calculatecost = speed;
this.s14.calculatecost = shell;
i = 0;
if (enemy) {
}
}
}
this.cacheAsBitmap = true;
avoid = true;
stop();
Instance of Symbol 752 MovieClip "shower" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
_parent.build.buildlist = [];
}
Instance of Symbol 773 MovieClip "s3" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "light")) {
if (!_root[current].shell2) {
_root.money = _root.money - cost;
_root[current].shell2 = true;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 750;
texts = "Autoloader\n\nLight Tanks can fire two shells at once";
}
Instance of Symbol 773 MovieClip "s4" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "rocket")) {
if (!_root[current].seeker) {
_root.money = _root.money - cost;
_root[current].seeker = true;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 2000;
texts = "Homing Missiles\n\nThis Rocket Launcher can fire homing missiles";
}
Instance of Symbol 773 MovieClip "s5" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "humvee")) {
if (!_root[current].gatling) {
_root[current].gatling = true;
_root.money = _root.money - cost;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 1000;
texts = "Gatling Gun\n\nIncreases the rate of fire of this Humvee drastically";
}
Instance of Symbol 773 MovieClip "s6" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "artillery")) {
if (!_root[current].accurate) {
_root.money = _root.money - cost;
_root[current].accurate = true;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 3000;
texts = "Accurate Targeting\n\nThis Artillery now hit all targets spot on.";
}
Instance of Symbol 773 MovieClip "s9" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "heavy")) {
if (!_root[current].crush) {
_root[current].crush = true;
_root.money = _root.money - cost;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 2000;
texts = "Tank Crushers\n\nThis Heavy Tank can crush smaller vehicles by running on top of them";
}
Instance of Symbol 773 MovieClip "s15" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (((_root[current].unittype == "light") || (_root[current].unittype == "heavy")) || (_root[current].unittype == "dozer"))) {
if (!_root[current].auto) {
_root[current].auto = true;
_root.money = _root.money - cost;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 2000;
texts = "Auto Repair\n\nThis Light Tank , Heavy Tank or Construction Dozer can auto heal itself ";
}
Instance of Symbol 773 MovieClip "s10" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "rocket")) {
if (_root[current].miss < 3) {
_root.money = _root.money - cost;
_root[current].miss++;
}
}
if ((!_root[current].enemy) && (_root[current].unittype == "heavy")) {
if (!_root[current].missile) {
_root[current].missile = true;
_root.money = _root.money - (cost * 2);
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 1000;
texts = "Multiple Missiles\nThis Rocket Launcher fires 1 more missile (max 3) Heavy Tank also fires missiles";
}
Instance of Symbol 773 MovieClip "s16" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "rocket")) {
if (!_root[current].blast) {
_root[current].blast = true;
_root.money = _root.money - cost;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 2500;
texts = "Blast Effects\n\nMissiles damage the area around it when it hits.";
}
Instance of Symbol 773 MovieClip "s17" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (((_root[current].unittype == "rocket") || (_root[current].unittype == "light")) || (_root[current].unittype == "heavy"))) {
if (!_root[current].hitonly) {
_root.money = _root.money - cost;
_root[current].hitonly = true;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 1500;
texts = "Friendly Targeting\n\nShells or missiles can no longer damage friendly units";
}
Instance of Symbol 773 MovieClip "s11" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "humvee")) {
if (!_root[current].laser) {
_root.money = _root.money - cost;
_root[current].laser = true;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 1500;
texts = "Laser Interceptors\nThis Humvee shoots a laser to intercept enemy missiles or shells and make them explode before the reach their targets";
}
Instance of Symbol 773 MovieClip "s18" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "artillery")) {
if (!_root[current].emp) {
_root.money = _root.money - cost;
_root[current].emp = true;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 2500;
texts = "EM pulse\n\nRounds from this artillery disable enemy units when hit.";
}
Instance of Symbol 773 MovieClip "s12" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
_root[current].selector.play();
if ((!_root[current].enemy) && (_root[current].unittype == "artillery")) {
if (!_root[current].nuke) {
_root.money = _root.money - cost;
_root[current].nuke = true;
if (_root.money < cost) {
break;
}
}
}
i--;
}
}
cost = 2500;
texts = "Rad Cannon\nThis Artillery fires rounds that leave behind a green cloud of radiation which damages all units in that area for 10 seconds ";
}
Instance of Symbol 826 MovieClip "mapp" in Symbol 889 MovieClip [sidebar] Frame 1
/* no clip actions */
Instance of Symbol 836 MovieClip in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (enterFrame) {
_parent.timer++;
_parent._x = _parent._x + _parent.movex;
_parent._y = _parent._y + _parent.movey;
}
Instance of Symbol 836 MovieClip in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (enterFrame) {
_parent.timer++;
_parent._x = _parent._x + _parent.movex;
_parent._y = _parent._y + _parent.movey;
}
Instance of Symbol 849 MovieClip "s1" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (((!_root[current].enemy) && (_root[current].timer >= 100)) && (_root[current].unittype == unit)) {
_root[current].timer = 0;
this.gotoAndStop(2);
_root.attachMovie("stealth", "stealth" + _root.n, _root.n);
_root["stealth" + _root.n].object = current;
_root.n++;
}
i--;
}
}
unit = "humvee";
texts = "Stealth\n\nHumvee's special ability: Humvee becomes undetectable by enemy units for a period of time.";
}
Instance of Symbol 849 MovieClip "s7" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (((!_root[current].enemy) && (_root[current].timer >= 100)) && (_root[current].unittype == unit)) {
_root[current].timer = 0;
this.gotoAndStop(2);
_root.attachMovie("invul", "invul" + _root.n, _root.n);
_root["invul" + _root.n].object = current;
_root.n++;
}
i--;
}
}
unit = "heavy";
time = (texts = "Invulnerability\n\nHeavy Tank special ability: Makes the Heavy Tank undestructable for a peroid of time.");
}
Instance of Symbol 849 MovieClip "s13" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (((!_root[current].enemy) && (_root[current].timer >= 100)) && (_root[current].unittype == unit)) {
_root[current].timer = 0;
this.gotoAndStop(2);
_root.attachMovie("frenzy", "frenzy" + _root.n, _root.n);
_root["frenzy" + _root.n].object = current;
_root.n++;
}
i--;
}
}
unit = "light";
texts = "Frenzy\nLight Tank spcecial ability: Overheats light tank's engine and causes it to fire faster, more powerful shots for a period of time.";
}
Instance of Symbol 849 MovieClip "s2" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (((!_root[current].enemy) && (_root[current].timer >= 100)) && (_root[current].unittype == unit)) {
_root[current].timer = 0;
_root[current].self = true;
_root[current].life = 0;
this.gotoAndStop(2);
}
i--;
}
}
unit = "rocket";
texts = "Self Destruct\n\nRocket Launcher special ability: Causes the Rocket Launcher to self destruct, damaging all enemy units near it.";
}
Instance of Symbol 849 MovieClip "s8" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
shells = 0;
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (((!_root[current].enemy) && (_root[current].timer >= 100)) && (_root[current].unittype == "artillery")) {
_root[current].timer = 0;
shells = shells + 5;
this.gotoAndStop(2);
}
i--;
}
trace(shells + "shells");
_root.attachMovie("targetlock", "targetlock" + _root.n, _root.n);
_root["targetlock" + _root.n].shells = shells;
_root.n++;
}
shells = 0;
texts = "Bombardment\n\nArtillery special ability: Bombards an area with a barrage of shells, causing massve damage.";
unit = "artillery";
}
Instance of Symbol 849 MovieClip "s14" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
function doo() {
gotoAndStop (1);
i = _root.selectedarray.length - 1;
while (i > -1) {
current = _root.selectedarray[i];
if (((!_root[current].enemy) && (_root[current].timer >= 100)) && (_root[current].unittype == unit)) {
_root[current].aggressive = false;
_root[current].turret.lucky = true;
break;
}
i--;
}
}
texts = "Focused Beam\nLaser Tank special ability: The Laser Tank fires s super-concentrated laser beam that can destroy the intended target in one shot.";
unit = "lasertank";
}
Instance of Symbol 883 MovieClip "build" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
this._visible = true;
}
onClipEvent (mouseDown) {
if (_root.money < this.light.cost) {
if (this.light._currentframe == 2) {
this.light.gotoAndStop(1);
}
}
if (_root.money < this.heavy.cost) {
if (this.heavy._currentframe == 2) {
this.heavy.gotoAndStop(1);
}
}
if (_root.money < this.rocket.cost) {
if (this.rocket._currentframe == 2) {
this.rocket.gotoAndStop(1);
}
}
if (_root.money < this.humvee.cost) {
if (this.humvee._currentframe == 2) {
this.humvee.gotoAndStop(1);
}
}
if (_root.money < this.dozer.cost) {
if (this.dozer._currentframe == 2) {
this.dozer.gotoAndStop(1);
}
}
if (_root.money < this.artillery.cost) {
if (this.artillery._currentframe == 2) {
this.artillery.gotoAndStop(1);
}
}
if (_root.money < this.oiltruck.cost) {
if (this.oiltruck._currentframe == 2) {
this.oiltruck.gotoAndStop(1);
}
}
}
Instance of Symbol 888 MovieClip "escape" in Symbol 889 MovieClip [sidebar] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (keyDown) {
if (Key.isDown(13)) {
this._visible = !this._visible;
if (this._visible) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].dummy.empulse = -1;
i--;
}
_root.pig.stop();
_root.pig2.stop();
this._x = 650;
_root.ai.lastimer = _root.ai.timer;
_root.ai.timer = undefined;
}
if (!this._visible) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
_root[current].dummy.empulse = 0;
i--;
}
_root.pig.play();
_root.pig2.play();
_root.ai.timer = _root.ai.lastimer;
_root.ai.lastimer = undefined;
this._x = 100;
}
_root.sidebar._visible = true;
}
}
Symbol 892 MovieClip [patriot] Frame 1
timer = 0;
_root.shellarray.push(this._name);
stop();
Instance of Symbol 226 MovieClip in Symbol 892 MovieClip [patriot] Frame 1
onClipEvent (enterFrame) {
if (_parent.seeker) {
if (_root[_parent.targetobj].life <= 0) {
_parent.play();
}
_parent.timer++;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
_parent._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (_parent._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.shellspd);
_parent._y = _parent._y + (Math.sin(rads) * _parent.shellspd);
}
}
Symbol 892 MovieClip [patriot] Frame 2
if (this.hitTest(_root[targetobj])) {
_root[targetobj].life = _root[targetobj].life - damage;
_root[targetobj + "symbols"].play();
if ((((!_root[targetobj].walking) && (!_root[targetobj].fireing)) && (_root[targetobj].enemy == _root[targetobj].enemy)) && (_root[targetobj].aggressive)) {
_root[targetobj].targetobj = firerer;
_root[targetobj].attack = true;
_root["flag" + targetobj].removeMovieClip();
_root.flagsarray.findandsplice("flag" + targetobj);
_root.objarray.findandsplice("flag" + targetobj);
_root.attachMovie("flag2", "flag" + targetobj, _root.n);
_root["flag" + targetobj]._visible = false;
_root["flag" + targetobj]._x = origx;
_root["flag" + targetobj]._y = origy;
_root.flagsarray.push("flag" + targetobj);
_root.objarray.push("flag" + targetobj);
_root[targetobj].walking = true;
_root.n++;
hit = true;
}
}
if (((((this._x < 1000) && (this._y < 768)) && (this._x > 0)) && (this._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("exp");
soundobj.start();
}
Symbol 892 MovieClip [patriot] Frame 3
_root.shellarray.findandsplice(this._name);
this.removeMovieClip();
stop();
Symbol 896 MovieClip [shell2] Frame 1
_root.objarray.push(this._name);
ti = 0;
stop();
Instance of Symbol 553 MovieClip in Symbol 896 MovieClip [shell2] Frame 1
onClipEvent (enterFrame) {
_parent.ti++;
_parent._x = _parent._x + _parent.movex;
_parent._y = _parent._y + _parent.movey;
if (_parent.hitTest(_root[_parent.targetobj])) {
_parent.play();
}
if (_parent.ti > 40) {
_parent.play();
}
}
Symbol 896 MovieClip [shell2] Frame 4
_root[targetobj].life = _root[targetobj].life - damage;
_root[targetobj + "symbols"].play();
Symbol 896 MovieClip [shell2] Frame 5
this.removeMovieClip();
stop();
Symbol 901 MovieClip [emp] Frame 1
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
_root[current].dummy.empulse = 100;
_root[current + "symbols"].play();
break;
}
i--;
}
Symbol 901 MovieClip [emp] Frame 3
this._alpha = this._alpha - 30;
Symbol 901 MovieClip [emp] Frame 5
this._alpha = this._alpha - 30;
Symbol 901 MovieClip [emp] Frame 7
_root.objarray.findandsplice(this._name);
this.removeMovieClip();
Symbol 903 MovieClip [bomb2] Frame 1
Symbol 903 MovieClip [bomb2] Frame 2
if (((((this._x < 1000) && (this._y < 768)) && (this._x > 0)) && (this._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("exp");
soundobj.start();
}
Symbol 903 MovieClip [bomb2] Frame 4
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - (damage / 2);
_root[firerer].vet = _root[firerer].vet + damage;
_root[current + "symbols"].play();
}
i--;
}
Symbol 903 MovieClip [bomb2] Frame 6
hitp = 0;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this)) {
hitp++;
if (hitp < 5) {
_root[current].life = _root[current].life - (damage / 2);
_root[current + "symbols"].play();
}
if (((!_root[current].walking) && ((!_root[current].fireing) || (_root[current].unittype == "artillery"))) && (_root[current].aggressive)) {
_root[current].attack = true;
_root[current].targetobj = firerer;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
}
i--;
}
if (emp) {
_root.attachMovie("emp", "emp" + _root.n, _root.n);
_root["emp" + _root.n]._x = this._x;
_root["emp" + _root.n]._y = this._y;
_root["emp" + _root.n].timer = 0;
_root.objarray.push("emp" + _root.n);
_root.n++;
}
if (nuke) {
_root.attachMovie("rad", "rad" + _root.n, _root.n);
_root["rad" + _root.n]._x = this._x;
_root["rad" + _root.n]._y = this._y;
_root["rad" + _root.n].timer = 0;
_root.objarray.push("rad" + _root.n);
_root.n++;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(_root["rad" + _root.n])) {
_root[current + "symbols"].play();
if (((!_root[current].walking) && ((!_root[current].fireing) || (_root[current].unittype == "artillery"))) && (_root[current].aggressive)) {
_root[current].attack = true;
_root[current].targetobj = firerer;
_root["rad" + _root.n].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
}
i--;
}
}
Symbol 903 MovieClip [bomb2] Frame 21
stop();
this.removeMovieClip();
stop();
Symbol 904 MovieClip [bullet] Frame 1
t = 0;
stop();
Instance of Symbol 553 MovieClip in Symbol 904 MovieClip [bullet] Frame 1
onClipEvent (enterFrame) {
_parent.t++;
_parent._x = _parent._x + _parent.movex;
_parent._y = _parent._y + _parent.movey;
if (_parent.hitTest(_root[_parent.targetobj])) {
_parent.play();
}
if (_parent.t > 11) {
_parent.play();
}
}
Symbol 904 MovieClip [bullet] Frame 4
_root[targetobj].life = _root[targetobj].life - damage;
_root[firerer].vet = _root[firerer].vet + damage;
_root[targetobj + "symbols"].play();
Symbol 904 MovieClip [bullet] Frame 5
this.removeMovieClip();
stop();
Symbol 908 MovieClip [missile] Frame 1
timer = 0;
_root.shellarray.push(this._name);
stop();
Instance of Symbol 226 MovieClip in Symbol 908 MovieClip [missile] Frame 1
onClipEvent (enterFrame) {
if ((!_parent.seeker) || (_parent.seeker == undefined)) {
_parent.timer++;
_parent._x = _parent._x + _parent.movex;
_parent._y = _parent._y + _parent.movey;
}
if (_parent.seeker) {
if (_root[_parent.targetobj].life <= 0) {
_parent.play();
}
_parent.timer++;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
_parent._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (_parent._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.shellspd);
_parent._y = _parent._y + (Math.sin(rads) * _parent.shellspd);
}
}
Symbol 908 MovieClip [missile] Frame 2
if (this.hitTest(_root[hits])) {
_root[hits].life = _root[hits].life - (damage / 2);
_root[hits + "symbols"].play();
if ((((!_root[hits].walking) && (!_root[hits].fireing)) && (_root[hits].enemy == _root[targetobj].enemy)) && (_root[hits].aggressive)) {
_root[hits].targetobj = firerer;
_root[hits].attack = true;
_root["flag" + hits].removeMovieClip();
_root.flagsarray.findandsplice("flag" + hits);
_root.objarray.findandsplice("flag" + hits);
_root.attachMovie("flag2", "flag" + hits, _root.n);
_root["flag" + hits]._visible = false;
_root["flag" + hits]._x = origx;
_root["flag" + hits]._y = origy;
_root.flagsarray.push("flag" + hits);
_root.objarray.push("flag" + hits);
_root[hits].walking = true;
_root.n++;
hit = true;
}
}
Symbol 908 MovieClip [missile] Frame 3
_root[firerer].vet = _root[firerer].vet + damage;
if (this.hitTest(_root[hits])) {
_root[hits].life = _root[hits].life - (damage / 2);
_root[hits + "symbols"].play();
if ((((!_root[hits].walking) && (!_root[hits].fireing)) && (_root[hits].enemy == _root[targetobj].enemy)) && (_root[hits].aggressive)) {
_root[hits].targetobj = firerer;
_root[hits].attack = true;
_root["flag" + hits].removeMovieClip();
_root.flagsarray.findandsplice("flag" + hits);
_root.objarray.findandsplice("flag" + hits);
_root.attachMovie("flag2", "flag" + hits, _root.n);
_root["flag" + hits]._visible = false;
_root["flag" + hits]._x = origx;
_root["flag" + hits]._y = origy;
_root.flagsarray.push("flag" + hits);
_root.objarray.push("flag" + hits);
_root[hits].walking = true;
_root.n++;
hit = true;
}
}
if (blast) {
hitp = 0;
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (hitonly) {
if (_root[current].hitTest(this) && (_root[current].enemy == _root[targetobj].enemy)) {
hitp++;
if (hitp < 5) {
_root[current].life = _root[current].life - (damage / 2);
}
_root[current + "symbols"].play();
if ((((!_root[current].walking) && (!_root[current].fireing)) && (_root[current].enemy == _root[targetobj].enemy)) && (_root[current].aggressive)) {
_root[current].targetobj = firerer;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
}
}
if (!hitonly) {
if (_root[current].hitTest(this)) {
hitp++;
if (hitp < 5) {
_root[current].life = _root[current].life - (damage / 2);
}
_root[current + "symbols"].play();
if ((((!_root[current].walking) && (!_root[current].fireing)) && (_root[current].enemy == _root[targetobj].enemy)) && (_root[current].aggressive)) {
_root[current].targetobj = firerer;
_root[current].attack = true;
_root["flag" + current].removeMovieClip();
_root.flagsarray.findandsplice("flag" + current);
_root.objarray.findandsplice("flag" + current);
_root.attachMovie("flag2", "flag" + current, _root.n);
_root["flag" + current]._visible = false;
_root["flag" + current]._x = origx;
_root["flag" + current]._y = origy;
_root.flagsarray.push("flag" + current);
_root.objarray.push("flag" + current);
_root[current].walking = true;
_root.n++;
hit = true;
}
}
}
i--;
}
}
if (((((this._x < 1000) && (this._y < 768)) && (this._x > 0)) && (this._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("exp3");
soundobj.start();
}
Symbol 908 MovieClip [missile] Frame 4
_root.shellarray.findandsplice(this._name);
this.removeMovieClip();
stop();
Symbol 910 MovieClip [flag2] Frame 1
stop();
Instance of Symbol 572 MovieClip in Symbol 910 MovieClip [flag2] Frame 1
/* no clip actions */
Symbol 911 MovieClip [shell] Frame 1
timer = 0;
_root.shellarray.push(this._name);
stop();
Instance of Symbol 836 MovieClip in Symbol 911 MovieClip [shell] Frame 1
onClipEvent (enterFrame) {
_parent.timer++;
_parent._x = _parent._x + _parent.movex;
_parent._y = _parent._y + _parent.movey;
}
Symbol 911 MovieClip [shell] Frame 2
if (this.hitTest(_root[targetobj])) {
_root[targetobj].life = _root[targetobj].life - damage;
_root[firerer].vet = _root[firerer].vet + damage;
_root[targetobj + "symbols"].play();
}
if (((((this._x < 1000) && (this._y < 768)) && (this._x > 0)) && (this._y > 0)) && (_root.soundon)) {
soundobj = new Sound();
soundobj.attachSound("exp2");
soundobj.start();
}
Symbol 911 MovieClip [shell] Frame 3
_root.shellarray.findandsplice(this._name);
this.removeMovieClip();
stop();
Symbol 914 MovieClip Frame 1
dx = _root[targetobj]._x - _parent._x;
dy = _root[targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > _parent.range) {
targetobj = undefined;
stop();
}
if (targetobj == undefined) {
stop();
}
Symbol 914 MovieClip Frame 5
Symbol 914 MovieClip Frame 6
dx = -(_parent._x - _root[targetobj]._x);
dy = -(_parent._y - _root[targetobj]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
_root.attachMovie("laser2", "laser" + _root.n, _root.n);
_root["laser" + _root.n]._x = _parent._x;
_root["laser" + _root.n]._y = _parent._y;
_root["laser" + _root.n]._width = dist + 10;
_root["laser" + _root.n]._rotation = this._rotation;
_root.n++;
_root[targetobj].life = _root[targetobj].life - _parent.damage;
Symbol 914 MovieClip Frame 8
if ((!_root[targetobj].fireing) && (!_root[targetobj].walking)) {
if (_root[targetobj].aggressive) {
_root[targetobj].aiattack(_parent._name);
}
}
if ((_root[targetobj].life < 0) || (_root[targetobj].life == undefined)) {
targetobj = undefined;
}
stop();
Instance of Symbol 913 MovieClip in Symbol 914 MovieClip Frame 8
onClipEvent (enterFrame) {
n++;
if (n > _parent._parent.firerate) {
_parent.gotoAndStop(1);
}
}
onClipEvent (load) {
n = 0;
}
Symbol 914 MovieClip Frame 11
gotoAndStop ("normal");
Symbol 915 MovieClip [laserbasedefense] Frame 1
stop();
Instance of Symbol 914 MovieClip "turret" in Symbol 915 MovieClip [laserbasedefense] Frame 1
onClipEvent (enterFrame) {
if (this.targetobj == undefined) {
this._rotation++;
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 915 MovieClip [laserbasedefense] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.turretarray.push(_parent._name);
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 500;
_parent.fulllife = 500;
_parent.range = 360;
_parent.damage = 100;
_parent.firerate = 80;
_root.friendlylist.push(_parent._name);
_parent.unittype = "turret3";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 915 MovieClip [laserbasedefense] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 915 MovieClip [laserbasedefense] Frame 2
_root.enemymoney = _root.enemymoney + 1500;
Symbol 915 MovieClip [laserbasedefense] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.turretarray.findandsplice(this._name);
this.removeMovieClip();
stop();
Symbol 917 MovieClip [turrets] Frame 1
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 917 MovieClip [turrets] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.turretarray.push(_parent._name);
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 800;
_parent.fulllife = 800;
_parent.range = 270;
_parent.damage = 7;
_parent.firerate = 1;
_parent.shellspd = 30;
_root.friendlylist.push(_parent._name);
_parent.unittype = "turret1";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 917 MovieClip [turrets] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Instance of Symbol 181 MovieClip "turret" in Symbol 917 MovieClip [turrets] Frame 1
onClipEvent (enterFrame) {
if (this.targetobj == undefined) {
this._rotation++;
}
}
Symbol 917 MovieClip [turrets] Frame 2
_root.enemymoney = _root.enemymoney + 1000;
Symbol 917 MovieClip [turrets] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.turretarray.findandsplice(this._name);
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 922 MovieClip [enemymine] Frame 1
_root.enemymines++;
stop();
this._visible = false;
this.cacheAsBitmap = true;
repairs = false;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 922 MovieClip [enemymine] Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.enemyminearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 500;
_parent.fulllife = 500;
_parent.damage = 250;
_parent.unittype = "mine";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 922 MovieClip [enemymine] Frame 1
onClipEvent (enterFrame) {
this._xscale = 130 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 922 MovieClip [enemymine] Frame 2
this._visible = true;
Symbol 922 MovieClip [enemymine] Frame 25
_root.enemymines--;
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 922 MovieClip [enemymine] Frame 29
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - damage;
_root[current + "symbols"].play();
_root[current].dummy.empulse = 100;
}
i--;
}
Symbol 922 MovieClip [enemymine] Frame 34
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyminearray.findandsplice(this._name);
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 926 MovieClip [mine] Frame 1
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 926 MovieClip [mine] Frame 1
onClipEvent (load) {
_root.attachMovie("dot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.minearray.push(_parent._name);
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 500;
_parent.fulllife = 500;
_parent.damage = 450;
_parent.unittype = "mine";
}
Symbol 926 MovieClip [mine] Frame 28
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if (_root[current].hitTest(this)) {
_root[current].life = _root[current].life - damage;
_root[current + "symbols"].play();
_root[current].dummy.empulse = 100;
}
i--;
}
if (_root.soundon) {
soundobj = new Sound();
soundobj.attachSound("crash");
soundobj.start();
}
Symbol 926 MovieClip [mine] Frame 33
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.objarray.findandsplice(_name);
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.minearray.findandsplice(this._name);
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 928 MovieClip [patriotmiss] Frame 1
if (targetobj == undefined) {
stop();
}
Instance of Symbol 616 MovieClip "turret" in Symbol 928 MovieClip [patriotmiss] Frame 1
onClipEvent (enterFrame) {
if (this.targetobj == undefined) {
this._rotation++;
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 928 MovieClip [patriotmiss] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.turretarray.push(_parent._name);
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 500;
_parent.shellspd = 10;
_parent.fulllife = 500;
_parent.range = 400;
_parent.damage = 30;
_parent.firerate = 30;
_root.friendlylist.push(_parent._name);
_parent.unittype = "turret2";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 928 MovieClip [patriotmiss] Frame 1
onClipEvent (enterFrame) {
this._xscale = 110 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 928 MovieClip [patriotmiss] Frame 2
_root.enemymoney = _root.enemymoney + 1500;
Symbol 928 MovieClip [patriotmiss] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
_root.friendlylist.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.turretarray.findandsplice(this._name);
this.removeMovieClip();
stop();
Symbol 930 MovieClip [enemyturret] Frame 1
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 930 MovieClip [enemyturret] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemyturretarray.push(_parent._name);
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 800;
_parent.fulllife = 800;
_parent.range = 270;
_parent.damage = 7;
_parent.firerate = 1;
_parent.shellspd = 30;
_root.enemyarray.push(_parent._name);
_parent.unittype = "turret1";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 930 MovieClip [enemyturret] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 930 MovieClip [enemyturret] Frame 2
_root.money = _root.money + 1000;
Symbol 930 MovieClip [enemyturret] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.enemyturretarray.findandsplice(this._name);
_root[_name + "symbols"].removeMovieClip();
_root["enemyturret" + number] = false;
this.removeMovieClip();
stop();
Symbol 931 MovieClip [enemylaser] Frame 1
repairs = false;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 931 MovieClip [enemylaser] Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_root.enemyturretarray.push(_parent._name);
_root.enemystructurearray.push(_parent._name);
this._visible = false;
_parent.enemy = true;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 500;
_parent.fulllife = 500;
_parent.range = 360;
_parent.damage = 150;
_parent.firerate = 80;
_root.enemyarray.push(_parent._name);
_parent.unittype = "turret3";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 931 MovieClip [enemylaser] Frame 1
onClipEvent (enterFrame) {
this._xscale = 100 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Instance of Symbol 914 MovieClip "turret" in Symbol 931 MovieClip [enemylaser] Frame 1
onClipEvent (enterFrame) {
if (this.targetobj == undefined) {
this._rotation--;
}
}
Symbol 931 MovieClip [enemylaser] Frame 2
_root.money = _root.money + 1500;
Symbol 931 MovieClip [enemylaser] Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root["enemyturret" + number] = false;
_root.enemyarray.findandsplice(_name);
_root.structurearray.findandsplice(_name);
_root.enemyturretarray.findandsplice(this._name);
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 934 MovieClip [flag] Frame 1
this._visible = false;
dd = _root.flagsarray.concat(_root.unitsarray);
stop();
Instance of Symbol 572 MovieClip in Symbol 934 MovieClip [flag] Frame 1
onClipEvent (enterFrame) {
hit = false;
i = _parent.dd.length - 1;
while (i > -1) {
current = _parent.dd[i];
if (_root[current].hitTest(_parent) && (current != _parent._name)) {
_parent._x = _parent._x - ((Math.random() - 0.5) * _parent._width);
_parent._y = _parent._y - ((Math.random() - 0.5) * _parent._height);
hit = true;
}
i--;
}
if (!hit) {
_parent.nextFrame();
}
}
Symbol 934 MovieClip [flag] Frame 2
if (this.vsisible == undefined) {
this._visible = true;
}
Symbol 937 MovieClip [flag copy] Frame 1
_root.objarray.push(this._name);
this._visible = false;
stop();
Instance of Symbol 572 MovieClip in Symbol 937 MovieClip [flag copy] Frame 1
/* no clip actions */
Symbol 945 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 947 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 950 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 952 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 955 MovieClip [Defaults] Frame 1
#initclip 25
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 956 MovieClip [UIObjectExtensions] Frame 1
#initclip 26
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 957 MovieClip [UIObject] Frame 1
#initclip 27
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 960 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 961 MovieClip Frame 1
#initclip 28
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 962 MovieClip [FocusRect] Frame 1
#initclip 29
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 963 MovieClip [FocusManager] Frame 1
#initclip 30
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 964 MovieClip [UIComponentExtensions] Frame 1
#initclip 31
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 965 MovieClip [UIComponent] Frame 1
#initclip 32
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 966 MovieClip [SimpleButton] Frame 1
#initclip 33
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 967 MovieClip [Border] Frame 1
#initclip 34
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 968 MovieClip [RectBorder] Frame 1
#initclip 35
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 969 MovieClip [ButtonSkin] Frame 1
#initclip 36
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 970 MovieClip [Button] Frame 1
#initclip 37
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 966 MovieClip [SimpleButton] in Symbol 970 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1029 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 1038 Button
on (release) {
_parent.play();
}
Symbol 1040 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 1040 MovieClip Frame 2
gotoAndPlay (1);
Symbol 1058 MovieClip Frame 1
stop();
Symbol 1058 MovieClip Frame 2
function onEnterFrame() {
if (!loaded) {
var _local3 = _root.getBytesLoaded() / _root.getBytesTotal();
if (_local3 >= 1) {
play();
bar._x = initX;
loaded = true;
} else {
bar._x = initX + ((_local3 - 1) * bar._width);
}
}
var _local4 = getTimer() - time;
timeAccum = timeAccum + _local4;
while (timeAccum >= FRAME_TIME) {
var _local2 = 0;
while (_local2 < timeClips.length) {
if (timeClips[_local2]._currentframe < timeClips[_local2]._totalframes) {
timeClips[_local2].nextFrame();
} else {
timeClips[_local2].gotoAndStop(1);
}
_local2++;
}
if (loaded && (_currentframe < _totalframes)) {
nextFrame();
}
timeAccum = timeAccum - FRAME_TIME;
}
time = time + _local4;
}
stop();
_root.stop();
var initX = bar._x;
var time = getTimer();
var FRAME_TIME = 33.3333333333333;
var timeAccum = 0;
var loaded = false;
timeClips = [bargfx, tank.mc0, tank.mc1, tank.mc2, tank.mc3, tank.mc4, tank.mc4.mc0, tank.mc4.mc1, tank.mc4.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc0.mc2, tank.mc4.mc0.mc0.mc0.mc3, tank.mc4.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc2, tank.mc5.mc0];
var i = 0;
while (i < timeClips.length) {
timeClips[i].stop();
i++;
}
Symbol 1058 MovieClip Frame 52
Symbol 1058 MovieClip Frame 161
stopAllSounds();
Symbol 1058 MovieClip Frame 173
Symbol 1058 MovieClip Frame 302
_root.play();
Symbol 938 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local2 = __width;
var _local3 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local2, oldHeight:_local3});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = createObject(className.symbolOwner.symbolName, id, depth, initobj);
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.126";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 939 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 940 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.126";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 941 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local10 = (__width - borderW) - borderW;
var _local11 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local9 = Math.min(_local10 - _local7, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local10 - _local9) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local10 - _local9) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local9;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local11 - _local6) / 2;
_local4 = (_local11 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local9 = Math.min(_local10, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local10 - _local9) / 2;
_local2._x = (_local10 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local11 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local11 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.2.126";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 971 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 972 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 973 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 974 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 975 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 976 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 977 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 978 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 979 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 980 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 981 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 982 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.126";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 983 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 984 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 985 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 986 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 987 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 988 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.126";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 989 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.2.126";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 990 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1063 MovieClip Frame 1
play();
if (ranges == undefined) {
ranges = 1.5;
}
if (_root.pig._x == undefined) {
this._name = "pig";
}
Instance of Symbol 462 MovieClip in Symbol 1063 MovieClip Frame 1
onClipEvent (enterFrame) {
i = po;
while (i < (po + 5)) {
current = _root.unitsarray[i];
if (((_root[current].unittype != "dozer") && (_root[current].unittype != "oiltruck")) && (_root[current].unittype != "artillery")) {
if (((!_root[current].walking) && (!_root[current].fireing)) && (_root[current].aggressive)) {
if (_root[current].enemy) {
if (_root[current].unittype == "light") {
if (_root[current].auto && (_root[current].life < _root[current].fulllife)) {
_root[current].life = _root[current].life + 20;
}
}
if (_root[current].unittype == "heavy") {
if (_root[current].auto && (_root[current].life < _root[current].fulllife)) {
_root[current].life = _root[current].life + 20;
}
}
if (Math.random() > 0.5) {
n = _root.friendlylist.length - 1;
while (n > -1) {
current2 = _root.friendlylist[n];
dx = _root[current]._x - _root[current2]._x;
dy = _root[current]._y - _root[current2]._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if ((dist < (_root[current].range * ranges)) && (_root[current2].stealth != true)) {
_root[current].aiattack(current2);
break;
}
n--;
}
}
}
if (!_root[current].enemy) {
if ((_root[current].unittype == "light") || (_root[current].unittype == "dozer")) {
if (_root[current].auto && (_root[current].life < _root[current].fulllife)) {
_root[current].life = _root[current].life + 20;
}
}
if (_root[current].unittype == "heavy") {
if (_root[current].auto && (_root[current].life < _root[current].fulllife)) {
_root[current].life = _root[current].life + 20;
}
}
if (Math.random() > 0.5) {
n = _root.enemyarray.length - 1;
while (n > -1) {
current2 = _root.enemyarray[n];
dx = _root[current]._x - _root[current2]._x;
dy = _root[current]._y - _root[current2]._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if ((dist < (_root[current].range * ranges)) && (_root[current2].stealth != true)) {
_root[current].aiattack(current2);
break;
}
n--;
}
}
}
}
}
i++;
}
po = po + 5;
if (po >= _root.unitsarray.length) {
po = 0;
}
}
onClipEvent (load) {
ranges = _parent.ranges;
po = 0;
}
Symbol 1063 MovieClip Frame 6
_root.objarrays = "fps:" + (10 / ((getTimer() - lastgettimer) / 1000));
lastgettimer = getTimer();
baseunder--;
breaking = false;
n = _root.structurearray.length - 1;
while (n > -1) {
current2 = _root.structurearray[n];
if (((baseunder <= 0) && (_root[current2].life < _root[current2].fulllife)) && (_root[current2].percent == undefined)) {
soundobj = new Sound();
soundobj.attachSound("ba");
soundobj.start();
baseunder = 100;
}
if (breaking) {
break;
}
i = _root.dozerarray.length - 1;
while (i > -1) {
current = _root.dozerarray[i];
if (((!_root[current].enemy) && (!_root[current].build)) && (!_root[current].walking)) {
dx = _root[current]._x - _root[current2]._x;
dy = _root[current]._y - _root[current2]._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 200) {
if (((_root[current2].life < _root[current2].fulllife) && (_root[current2].percent == undefined)) && (_root[current2].auto._currentframe == 1)) {
if (!_root[current].hitTest(_root[current2])) {
_root[current].aigoto(_root[current2]._x, _root[current2]._y, false);
}
_root[current2].auto.play();
breaking = true;
break;
}
}
}
i--;
}
n--;
}
Symbol 1063 MovieClip Frame 8
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].speed != undefined) {
n = _root.enemyminearray.length - 1;
while (n > -1) {
current2 = _root.enemyminearray[n];
if (_root[current2].hitTest(_root[current]) && (_root[current2]._currentframe == 1)) {
_root[current2].play();
}
n--;
}
x = _root[current]._x;
y = _root[current]._y;
_root[current].timer = _root[current].timer + 0.333333333333333;
if (_root.back.water.hitTest(x, y, true)) {
_root[current].life = _root[current].life - 5;
if (_root[current].water == undefined) {
_root[current].speed = _root[current].speed / 2;
_root[current].water = true;
}
}
if (!_root.back.water.hitTest(x, y, true)) {
if (_root[current].water === true) {
_root[current].speed = _root[current].speed * 2;
_root[current].water = undefined;
}
}
dx = _root[current]._x - _root.servicedepot1._x;
dy = _root[current]._y - _root.servicedepot1._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if ((dist < 150) && (_root[current].life < _root[current].fulllife)) {
_root[current].life = _root[current].life + 15;
_root[current]._x = _root.servicedepot1._x;
_root[current]._y = _root.servicedepot1._y;
if (_root[current].getDepth() < _root.servicedepot1.getDepth()) {
_root[current].swapDepths(_root.servicedepot1);
}
_root[current].dummy.empulse = 10;
_root.servicedepot1.auto2.play();
_root.money = _root.money - 20;
break;
}
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if (_root[current].speed != undefined) {
_root[current].timer = _root[current].timer + 0.333333333333333;
n = _root.minearray.length - 1;
while (n > -1) {
current2 = _root.minearray[n];
if (_root[current2].hitTest(_root[current]) && (_root[current2]._currentframe == 1)) {
_root[current2].play();
}
n--;
}
x = _root[current]._x;
y = _root[current]._y;
if (_root.back.water.hitTest(x, y, true)) {
_root[current].life = _root[current].life - 5;
if (_root[current].water == undefined) {
_root[current].speed = _root[current].speed / 2;
_root[current].water = true;
}
}
if (!_root.back.water.hitTest(x, y, true)) {
if (_root[current].water === true) {
_root[current].speed = _root[current].speed * 2;
_root[current].water = undefined;
}
}
dx = _root[current]._x - _root.enemyservicedepot1._x;
dy = _root[current]._y - _root.enemyservicedepot1._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if ((dist < 150) && (_root[current].life < _root[current].fulllife)) {
_root[current].life = _root[current].life + 15;
_root[current]._x = _root.enemyservicedepot1._x;
_root[current]._y = _root.enemyservicedepot1._y;
if (_root[current].getDepth() < _root.enemyservicedepot1.getDepth()) {
_root[current].swapDepths(_root.enemyservicedepot1);
}
_root[current].dummy.empulse = 10;
_root.emeyservicedepot1.auto2.play();
_root.enemymoney = _root.enemymoney - 20;
break;
}
}
i--;
}
Symbol 1063 MovieClip Frame 10
c = _root.objarray.length - 1;
while (c > -1) {
current = _root.objarray[c];
if ((_root[current]._x == undefined) || (!_root[current].hitTest(_root.back))) {
_root[current].life = 0;
_root.objarray.splice(c, 1);
}
c--;
}
gotoAndPlay (1);
Symbol 1066 MovieClip Frame 1
play();
if (_root.pig2._x == undefined) {
this._name = "pig2";
}
if (ranges == undefined) {
ranges = 1;
}
Instance of Symbol 462 MovieClip in Symbol 1066 MovieClip Frame 1
onClipEvent (enterFrame) {
i = po;
while (i < (po + 5)) {
current = _root.unitsarray[i];
if ((!_root.sidebar._visible) || (_root.comcentre1._currentframe > 1)) {
_root[current + "symbols"]._visible = false;
}
if (_root[current].unittype != "dozer") {
_root[current].dummy.charge--;
if ((((_root[current].unittype == "humvee") && (_root[current].laser)) && (_root[current].dummy.charge <= 0)) && (_root[current].life > 0)) {
n = _root.shellarray.length - 1;
while (n > -1) {
current2 = _root.shellarray[n];
if (_root[_root[current2].targetobj].enemy == _root[current].enemy) {
dx = -(_root[current]._x - _root[current2]._x);
dy = -(_root[current]._y - _root[current2]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < (_root[current].range * 2)) {
if (_root[current2].timer > 5) {
_root[current].dummy.charge = 2;
_root.attachMovie("laser", "laser" + current, _root.n);
_root["laser" + current]._x = _root[current]._x;
_root["laser" + current]._y = _root[current]._y;
_root["laser" + current]._width = dist + 10;
_root["laser" + current]._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
_root[current2].play();
break;
}
}
}
n--;
}
}
if ((((_root[current].walking && (_root[current].unittype != "artillery")) || ((_root[current].unittype == "artillery") && (_root[current].turret._currentframe == 2))) && (!_root[current].fireing)) && (_root[current].aggressive || (_root[current].unittype == "artillery"))) {
if (_root[current].enemy) {
n = _root.friendlylist.length - 1;
while (n > -1) {
current2 = _root.friendlylist[n];
dx = -(_root[current]._x - _root[current2]._x);
dy = -(_root[current]._y - _root[current2]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
if ((dist < (_root[current].range * _parent.ranges)) && (_root[current2].stealth != true)) {
_root[current].turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_root[current].turret._currentframe == 1) {
_root[current].turret.play();
_root[current].turret.targetobj = current2;
}
hit = true;
break;
}
n--;
}
}
if (!_root[current].enemy) {
_root[current].timer++;
n = _root.enemyarray.length - 1;
while (n > -1) {
current2 = _root.enemyarray[n];
dx = -(_root[current]._x - _root[current2]._x);
dy = -(_root[current]._y - _root[current2]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
if ((dist < (_root[current].range * _parent.ranges)) && (_root[current2].stealth != true)) {
_root[current].turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_root[current].turret._currentframe == 1) {
_root[current].turret.play();
_root[current].turret.targetobj = current2;
}
hit = true;
break;
}
n--;
}
}
}
}
i++;
}
po = po + 5;
if (po >= _root.unitsarray.length) {
po = 0;
}
}
onClipEvent (load) {
po = 0;
}
Symbol 1066 MovieClip Frame 3
i = _root.turretarray.length - 1;
while (i > -1) {
current = _root.turretarray[i];
if (_root[current].turret._currentframe == 1) {
_root[current].turret.targetobj = undefined;
n = _root.enemyarray.length - 1;
while (n > -1) {
current2 = _root.enemyarray[n];
dx = -(_root[current]._x - _root[current2]._x);
dy = -(_root[current]._y - _root[current2]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
if (Math.random() > 0.8) {
if (dist < _root[current].range) {
_root[current].turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_root[current].turret._currentframe == 1) {
_root[current].turret.play();
_root[current].turret.targetobj = current2;
}
hit = true;
}
}
n--;
}
}
i--;
}
i = _root.enemyturretarray.length - 1;
while (i > -1) {
current = _root.enemyturretarray[i];
if (_root[current].turret._currentframe == 1) {
_root[current].turret.targetobj = undefined;
n = _root.friendlylist.length - 1;
while (n > -1) {
current2 = _root.friendlylist[n];
dx = -(_root[current]._x - _root[current2]._x);
dy = -(_root[current]._y - _root[current2]._y);
dist = Math.sqrt((dx * dx) + (dy * dy));
if (Math.random() > 0.8) {
if (dist < _root[current].range) {
_root[current].turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_root[current].turret._currentframe == 1) {
_root[current].turret.play();
_root[current].turret.targetobj = current2;
}
hit = true;
}
}
n--;
}
}
i--;
}
Symbol 1066 MovieClip Frame 5
gotoAndPlay (1);
Symbol 1069 Button
on (press) {
_root.musicn--;
if (_root.musicn < 1) {
_root.musicn = 5;
}
musicu = _root.musicn;
musics = musico[musicu];
stopAllSounds();
gotoAndStop("music" + musicu);
}
on (keyPress "n") {
_root.musicn--;
if (_root.musicn < 1) {
_root.musicn = 5;
}
musicu = _root.musicn + 1;
stopAllSounds();
musics = musico[musicu];
gotoAndStop("music" + musicu);
}
Symbol 1070 Button
on (press) {
_root.musicn++;
if (_root.musicn > 5) {
_root.musicn = 1;
}
musicu = _root.musicn;
stopAllSounds();
musics = musico[musicu];
gotoAndStop("music" + musicu);
}
on (keyPress "p") {
_root.musicn++;
if (_root.musicn > 5) {
_root.musicn = 1;
}
musicu = _root.musicn + 1;
stopAllSounds();
musics = musico[musicu];
gotoAndStop("music" + musicu);
}
Symbol 1074 Button
on (press) {
stopAllSounds();
}
Symbol 1082 MovieClip Frame 1
this.swapDepths(12300);
this.cacheAsBitmap = true;
if (musics == undefined) {
musics = "";
musico = ["Several Tanks of fueled dest..", "War Menu 2", "Arctic", "Victorious Day", "newgrounds Nuclear....", "TankMen Theme", "The Battlefield"];
}
Symbol 1082 MovieClip Frame 2
gotoAndStop (1);
Symbol 1082 MovieClip Frame 3
gotoAndStop (1);
Symbol 1082 MovieClip Frame 4
gotoAndStop (1);
Symbol 1082 MovieClip Frame 5
gotoAndStop (1);
Symbol 1082 MovieClip Frame 6
gotoAndStop (1);
Symbol 1082 MovieClip Frame 7
gotoAndStop (1);
Symbol 1087 MovieClip Frame 1
this._x = 0;
this._y = 0;
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Instance of Symbol 572 MovieClip "kiss" in Symbol 1111 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
str1 = "Making theories on likely enemy plan...";
str2 = "\n Examining Battlefield Integrity....";
str3 = "\n Loading Dialogue....";
str4 = "\n Loading Mission data";
str5 = "\n Loading map...";
str6 = "\n Loading Units...";
str7 = "\n Loading Scripts..";
str8 = "\n......";
str9 = "\n..........";
str10 = "\n Loading Sidebar...";
str11 = "\n Loading Mission Bar...";
str12 = "\nDone...";
_parent.textss = "";
i = 0;
sound = new Sound();
sound.attachSound("tie");
}
onClipEvent (enterFrame) {
timer++;
if (timer >= (Math.random() * 150)) {
i++;
_parent.textss = _parent.textss + this["str" + i];
sound.start(0, 1);
timer = 0;
}
if (i == 13) {
_root.dialogue._visible = true;
stopAllSounds();
sound.setVolume(100);
_root.nextFrame();
}
}
Instance of Symbol 97 MovieClip in Symbol 1131 MovieClip Frame 2
onClipEvent (load) {
if (!_root[_parent.unit].emp) {
this._visible = false;
}
}
Instance of Symbol 95 MovieClip in Symbol 1131 MovieClip Frame 6
onClipEvent (load) {
if (!_root[_parent.unit].nuke) {
this._visible = false;
}
}
Instance of Symbol 109 MovieClip in Symbol 1131 MovieClip Frame 9
onClipEvent (load) {
if (!_root[_parent.unit].crush) {
this._visible = false;
}
}
Symbol 1132 MovieClip Frame 1
_root.sidebar._visible = false;
stopAllSounds();
_root.stop();
Instance of Symbol 1107 MovieClip in Symbol 1132 MovieClip Frame 1
onClipEvent (load) {
randomframe = Math.ceil(Math.random() * 6);
gotoAndStop(randomframe);
}
Instance of Symbol 1111 MovieClip "barn" in Symbol 1132 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 1131 MovieClip in Symbol 1132 MovieClip Frame 1
onClipEvent (load) {
randomframe = Math.ceil(Math.random() * 10);
gotoAndStop(randomframe);
}
Symbol 1137 MovieClip Frame 1
this._visible = false;
Symbol 1143 MovieClip Frame 1
_root.objarray.push(this._name);
_root.oilarray.push(this._name);
this.cacheAsBitmap = true;
Symbol 1150 MovieClip Frame 8
if (_root[oilfield].oilspill._xscale < 100) {
_root[oilfield].oilspill._xscale = _root[oilfield].oilspill._xscale + 1;
_root[oilfield].oilspill._yscale = _root[oilfield].oilspill._yscale + 1;
}
Symbol 1151 Button
on (press) {
_root.sidebar._visible = true;
modes = !modes;
if (modes == false) {
unitsarray = _root.unitsarray.concat(_root.oilarray);
i = unitsarray.length - 1;
while (i > -1) {
current = unitsarray[i];
_root[current + "symbols"]._visible = false;
i--;
}
_root.box6._visible = false;
_root.sidebar._y = _root.sidebar._y + 150;
} else {
if ((_root.comcentre1.life > 0) && (_root.comcentre1.life != undefined)) {
unitsarray = _root.unitsarray.concat(_root.oilarray);
i = unitsarray.length - 1;
while (i > -1) {
current = unitsarray[i];
_root[current + "symbols"]._visible = true;
i--;
}
_root.box6._visible = true;
}
_root.sidebar._y = _root.sidebar._y - 150;
}
}
Symbol 1152 MovieClip Frame 1
modes = true;
Symbol 1192 MovieClip Frame 1
this.swapDepths(11100);
i = _root.enemyarray.length - 1;
while (i > -1) {
_root[enemyarray[i]]._visible = false;
i--;
}
i = 6;
while (i > 0) {
_root["a" + i]._visible = false;
i--;
}
_root.missilelaunch1._visible = false;
_root.tank2._visible = false;
_root.tank3._visible = false;
_root.humvee1._visible = false;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 1
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1192 MovieClip Frame 2
n = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.n++;
if ((_parent.n > 100) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1192 MovieClip Frame 3
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 3
onClipEvent (enterFrame) {
if (_root.selectedarray.arrayfind("tank1") || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 4
_root.flag1._visible = true;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 4
onClipEvent (enterFrame) {
if (_root.tank1.hitTest(_root.flag1) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 5
_root.flag1._visible = false;
_root.flag2._visible = true;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 5
onClipEvent (enterFrame) {
if (_parent.hitTest(_root.flag2) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 6
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_root.tank1.hitTest(_root.flag2) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 7
_root.enemytechcentre1._visible = true;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 7
onClipEvent (enterFrame) {
if ((_root.enemytechcentre1.life <= 0) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 8
_root.tank2._visible = true;
_root.tank3._visible = true;
_root.humvee1._visible = true;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 8
onClipEvent (enterFrame) {
if (((_root.selectedarray.arrayfind("tank2") && (_root.selectedarray.arrayfind("tank3"))) && (_root.selectedarray.arrayfind("humvee1"))) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 9
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 9
onClipEvent (enterFrame) {
if ((_root.selectedarray.length == 0) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 10
_root.enemyheavytank1._visible = true;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 10
onClipEvent (enterFrame) {
if (_root.selectedarray.arrayfind("enemyheavytank1") || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 11
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 11
onClipEvent (enterFrame) {
if (_root.selectedarray.arrayfind("tank1") || (Key.isDown(16))) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 12
n = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 12
onClipEvent (enterFrame) {
_parent.n++;
if ((_parent.n > 200) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1192 MovieClip Frame 13
n = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 13
onClipEvent (enterFrame) {
_parent.n++;
if ((_parent.n > 200) || (Key.isDown(16))) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1192 MovieClip Frame 14
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.friendlylist.length < 7) {
_root.attachMovie("tank", "tank" + _root.n, _root.n);
_root["tank" + _root.n]._x = _root.waypointn._x;
_root["tank" + _root.n]._y = _root.waypointn._y;
_root.n++;
_root.attachMovie("tank", "tank" + _root.n, _root.n);
_root["tank" + _root.n]._x = _root.waypointn._x;
_root["tank" + _root.n]._y = _root.waypointn._y;
_root.n++;
_root.attachMovie("humvee", "humvee" + _root.n, _root.n);
_root["humvee" + _root.n]._x = _root.waypointn._x;
_root["humvee" + _root.n]._y = _root.waypointn._y;
_root.n++;
}
if (_root.enemyheavytank1.life <= 0) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 15
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 15
onClipEvent (enterFrame) {
if (_root.friendlylist.length <= 0) {
_root.attachMovie("tank", "tank" + _root.n, _root.n);
_root["tank" + _root.n]._x = _root.waypointn._x;
_root["tank" + _root.n]._y = _root.waypointn._y;
_root.n++;
_root.attachMovie("tank", "tank" + _root.n, _root.n);
_root["tank" + _root.n]._x = _root.waypointn._x;
_root["tank" + _root.n]._y = _root.waypointn._y;
_root.n++;
_root.attachMovie("humvee", "humvee" + _root.n, _root.n);
_root["humvee" + _root.n]._x = _root.waypointn._x;
_root["humvee" + _root.n]._y = _root.waypointn._y;
_root.n++;
}
if (_root.selectedarray.length > 3) {
_parent.nextFrame();
}
}
Symbol 1192 MovieClip Frame 16
i = 6;
while (i > 0) {
_root["a" + i]._visible = true;
i--;
}
_root.missilelaunch1._visible = true;
stop();
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 16
onClipEvent (enterFrame) {
}
Symbol 1192 MovieClip Frame 17
Instance of Symbol 46 MovieClip in Symbol 1192 MovieClip Frame 17
onClipEvent (enterFrame) {
if (_root.enemyarray.length <= 0) {
_parent._visible = false;
_root.gotoAndStop("victoryd");
}
}
Symbol 1194 MovieClip Frame 1
n = 0;
hit = false;
stop();
Symbol 1206 MovieClip Frame 1
this._x = 0;
this._y = 0;
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1209 MovieClip Frame 1
_root.objarray.push(this._name);
stop();
Symbol 1237 MovieClip Frame 1
this.swapDepths(11000);
stop();
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 1
onClipEvent (enterFrame) {
pp++;
if (pp > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
pp = 0;
}
Symbol 1237 MovieClip Frame 2
_root.flag12._visible = true;
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.dozer1.hitTest(_root.flag12)) {
_parent.nextFrame();
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 3
onClipEvent (enterFrame) {
if (_root.comcentre1.life != undefined) {
_parent.nextFrame();
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 4
onClipEvent (enterFrame) {
n++;
if (n > 300) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 5
onClipEvent (enterFrame) {
if (_root.refinery1._x != undefined) {
_parent.nextFrame();
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 6
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 7
onClipEvent (enterFrame) {
if (_root.warfactory1.life != undefined) {
_parent.nextFrame();
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 8
onClipEvent (enterFrame) {
if (_root.friendlylist.length > 10) {
_parent.nextFrame();
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 9
onClipEvent (enterFrame) {
numbert = 0;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].unittype == "turret1") {
numbert++;
if (numbert >= 3) {
_parent.nextFrame();
break;
}
}
i--;
}
}
Symbol 1237 MovieClip Frame 10
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if ((_root[current].damage != undefined) && (_root[current].speed != undefined)) {
_root[current].life = 400;
_root[current].fulllife = 400;
_root[current].aiattack("comcentre1");
}
i--;
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 10
onClipEvent (enterFrame) {
pp++;
if (pp > 500) {
_parent.nextFrame();
}
}
onClipEvent (load) {
pp = 0;
}
Symbol 1237 MovieClip Frame 11
stop();
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 11
onClipEvent (enterFrame) {
if (_root.techcentre1.life != undefined) {
_parent.nextFrame();
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 12
onClipEvent (enterFrame) {
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].laser && (_root[current].unittype == "humvee")) {
_parent.nextFrame();
break;
}
i--;
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 13
onClipEvent (enterFrame) {
numbert2 = 0;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if ((_root[current].speed > 6) && (_root[current].unittype == "humvee")) {
numbert2++;
if (numbert2 >= 3) {
_parent.nextFrame();
break;
}
}
i--;
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 14
onClipEvent (enterFrame) {
pp++;
if (pp > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
pp = 0;
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 15
onClipEvent (enterFrame) {
if (_root.patroit.life <= 0) {
_parent.nextFrame();
}
}
Instance of Symbol 46 MovieClip in Symbol 1237 MovieClip Frame 16
onClipEvent (enterFrame) {
if (_root.enemyarray.length <= 0) {
_root.gotoAndStop("victory2e");
}
}
Symbol 1240 MovieClip Frame 1
if (_root.ownmap5 === true) {
this._visible = false;
}
this.swapDepths(25000 + _root.n);
_root.n++;
_root.shroudarray.push(this._name);
_root.objarray.push(this._name);
Symbol 1248 MovieClip Frame 1
stop();
build = true;
timer = 150;
teamtype("guard", [], 6 / _root.difficulty);
_root.enemymoney = _root.enemymoney + (20000 / _root.difficulty);
if (_root.ais == 2) {
_root.upgradelevel = _root.upgradelevel * 0.75;
}
this.aicheck = function () {
if (type == 1) {
commandteamtype();
}
if (type == 2) {
commandteamtype2();
}
if (type == 3) {
commandteamtype3();
}
if (type == 4) {
commandteamtype4();
}
if (type == 5) {
commandteamtype5();
}
timeelasped++;
ppp = _root.enemyarray.toString();
Mouse.hide();
_root.ai.timer++;
if (_root.ai.timer == Math.round(_root.difficulty * 150)) {
if (this.teamslist.length < teamsneeded) {
nabei = Math.round(minteamlength + (Math.random() * teamlength));
teamtype("team" + pteam, [], nabei);
pteam++;
}
}
i = 0;
while (i < this.teamslist.length) {
current = this.teamslist[i];
_root[current].checks();
_root.guard.checks();
i++;
}
if (_root.ai.timer == 500) {
n = _root.enemyoiltruckarray.length - 1;
while (n > -1) {
current2 = _root.enemyoiltruckarray[n];
if ((_root[current2].targetobj != undefined) && (_root[current2].life < (_root[current2].fulllife * 0.6))) {
_root.guard.goto(undefined, undefined, current2);
_root[current2].targetobj = undefined;
break;
}
n--;
}
if (_root.enemymines < minesneeded) {
a = dozers[0];
if ((!_root[a].build) && (!_root[current].walking)) {
if (Math.random() < mineweight) {
p = Math.floor(Math.random() * minesneeded);
_root[current].aibuild2("enemymine", _root["minept" + p]._x, _root["minept" + p]._y, 500, 0, 5);
_root[current].build = true;
}
}
}
_root.ai.timer = 0;
n = 1;
while (n < 5) {
if ((!_root["enemyturret" + n]) && (_root.enemymoney >= turretmoney)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
bb = Math.random();
if (bb < turret1wt) {
_root[current].aibuild2("enemyturret", _root["turretpt" + n]._x, _root["turretpt" + n]._y, 1000, n, 1.5);
_root[current].build = true;
break;
}
if ((bb > turret1wt) && (bb < turret2wt)) {
_root[current].aibuild2("enemymultiple", _root["turretpt" + n]._x, _root["turretpt" + n]._y, 1500, n, 1.5);
_root[current].build = true;
break;
}
if (bb > turret3wt) {
_root[current].aibuild2("enemylaser", _root["turretpt" + n]._x, _root["turretpt" + n]._y, 1500, n, 1.5);
_root[current].build = true;
break;
}
}
i--;
}
}
n++;
}
}
if (_root.ai.timer == 250) {
if ((_root.enemycomcentre < 1) && (_root.enemymoney >= 5000)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemycomcentre", _root.comcentrept._x, _root.comcentrept._y, 5000, 0.5);
_root[current].build = true;
break;
}
i--;
}
}
if ((_root.enemyservicedepot < 1) && (_root.enemymoney >= servicedepotmoney)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemyservicedepot", _root.servpt._x, _root.servpt._y, 1500, 1);
_root[current].build = true;
break;
}
i--;
}
}
if ((_root.enemyrefinery < 1) && (_root.enemymoney >= 2000)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemyrefinery", _root.refpt._x, _root.refpt._y, 2000, 1);
_root[current].build = true;
break;
}
i--;
}
}
if ((_root.enemywarfactory == 0) && (_root.enemymoney >= 2000)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemywarfactory", _root.warpt._x, _root.warpt._y, 2000, 1);
_root[current].build = true;
break;
}
i--;
}
}
if ((_root.enemytechcentre < 1) && (_root.enemymoney >= techcentremoney)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemytechcentre", _root.techpt._x, _root.techpt._y, 1500, 0.7);
_root[current].build = true;
break;
}
i--;
}
}
if (((_root.enemytechcentre1._x != undefined) && (timeelasped >= this.nuketime)) && (_root.enemyweaponsilo == 0)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemyweaponsilo", _root.silopt._x, _root.silopt._y, 10000, 0.2);
_root[current].build = true;
timeelasped = 0;
break;
}
i--;
}
}
}
if ((Math.round(_root.ai.timer / 30) * 30) == _root.ai.timer) {
if (_root.enemyarray.length <= 0) {
_root.gotoAndStop("victory");
}
if (_root.friendlylist.length <= 0) {
_root.gotoAndStop("defeat");
}
n = _root.enemystructurearray.length - 1;
while (n > -1) {
current2 = _root.enemystructurearray[n];
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if (_root[current].build || (_root[current].walking)) {
} else {
dx = _root[current]._x - _root[current2]._x;
dy = _root[current]._y - _root[current2]._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 1500) {
ant = 0;
if (((_root[current2].life < _root[current2].fulllife) && (_root[current2].percent == undefined)) && (_root[current2].auto._currentframe == 1)) {
if (!_root[current].hitTest(_root[current2])) {
_root[current].aigoto(_root[current2]._x, _root[current2]._y, false);
}
_root[current2].auto.play();
if (_root[current2].targetobj != undefined) {
_root.guard.goto(undefined, undefined, current2);
_root[current2].targetobj = undefined;
}
}
}
break;
}
i--;
}
n--;
}
}
if ((Math.round(_root.ai.timer / 80) * 80) == _root.ai.timer) {
if (((dozers.length < dozersneeded) && (_root.enemycomcentre1._x != undefined)) && (_root.enemymoney > 1000)) {
_root.enemymoney = _root.enemymoney - 1000;
_root.attachMovie("enemydozer", "enemydozer" + _root.n, _root.n);
_root["enemydozer" + _root.n]._x = _root.enemycomcentre1._x;
_root["enemydozer" + _root.n]._y = _root.enemycomcentre1._y;
_root["enemydozer" + _root.n]._rotation = 0;
_root.n++;
}
if ((_root.enemymoney > uppermoney) && (!build)) {
build = true;
rounds++;
}
if ((_root.enemymoney < lowermoney) && (build)) {
build = false;
}
arrayone = _root.array1.toString();
if (_root.enemywarfactory1.life > 0) {
if ((_root.enemyoiltrucks < oiltrucksneeded) && (_root.enemymoney >= 2000)) {
_root.enemymoney = _root.enemymoney - 1500;
_root.attachMovie("enemyoiltruck", "enemyoiltruck" + _root.n, _root.n);
_root["enemyoiltruck" + _root.n]._x = _root.enemywarfactory1._x;
_root["enemyoiltruck" + _root.n]._y = _root.enemywarfactory1._y;
_root["enemyoiltruck" + _root.n]._rotation = 0;
_root.n++;
}
trace(_root.enemymoney + "money");
if ((build && (_root.enemymoney > 0)) || (_root.guard.members.length < _root.guard.maxlength)) {
randomteam = Math.floor(Math.random() * this.teamslist.length);
i = randomteam;
current = this.teamslist[i];
if ((_root.guard.members.length < _root.guard.maxlength) && (Math.random() > 0.4)) {
current = "guard";
}
if (_root[current].members.length < _root[current].maxlength) {
trace((((current + " ") + _root[current].members.length) + "/") + _root[current].maxlength);
a = Math.random();
if ((a > 0) && (a < lightwt)) {
unittype = "enemylight";
_root.enemymoney = _root.enemymoney - 1000;
}
if ((a > lightwt) && (a < rocketwt)) {
unittype = "enemyrocket";
_root.enemymoney = _root.enemymoney - 1500;
}
if ((a > rocketwt) && (a < heavywt)) {
unittype = "enemyheavy";
_root.enemymoney = _root.enemymoney - 2500;
}
if ((a > heavywt) && (a < humveewt)) {
unittype = "enemyhumvee";
_root.enemymoney = _root.enemymoney - 500;
}
if ((a > humveewt) && (a < 1)) {
unittype = "enemyartillery";
_root.enemymoney = _root.enemymoney - 2000;
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.enemywarfactory1._x;
_root[unittype + _root.n]._y = _root.enemywarfactory1._y + 100;
_root[unittype + _root.n]._rotation = 0;
_root[current].members.push(unittype + _root.n);
unittype = undefined;
_root.n++;
}
if ((_root.enemylasertank1._x == undefined) && (_root.enemytechcentre1._x != undefined)) {
if (Math.random() > 0.9) {
_root.attachMovie("enemylasertank", "enemylasertank1", _root.n);
_root.enemylasertank1._x = _root.enemywarfactory1._x;
_root.enemylasertank1._y = _root.enemywarfactory1._y + 100;
_root.enemylasertank1._rotation = 0;
_root.enemymoney = _root.enemymoney - 7500;
teamli = teamslist[0];
_root[teamli].members.push("enemylasertank1");
}
}
}
}
}
};
this.stupidai = function () {
ppp = _root.enemyarray.toString();
Mouse.hide();
_root.ai.timer++;
if (_root.ai.timer == 500) {
if (_root.enemymines < minesneeded) {
a = dozers[0];
if ((!_root[a].build) && (!_root[current].walking)) {
if (Math.random() < mineweight) {
p = Math.floor(Math.random() * minesneeded);
_root[current].aibuild2("enemymine", _root["minept" + p]._x, _root["minept" + p]._y, 500, 0, 5);
_root[current].build = true;
}
}
}
_root.ai.timer = 0;
n = 1;
while (n < 5) {
if ((!_root["enemyturret" + n]) && (_root.enemymoney >= turretmoney)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
bb = Math.random();
if (bb < turret1wt) {
_root[current].aibuild2("enemyturret", _root["turretpt" + n]._x, _root["turretpt" + n]._y, 1000, n, 1.5);
_root[current].build = true;
break;
}
if ((bb > turret1wt) && (bb < turret2wt)) {
_root[current].aibuild2("enemymultiple", _root["turretpt" + n]._x, _root["turretpt" + n]._y, 1500, n, 1.5);
_root[current].build = true;
break;
}
if (bb > turret3wt) {
_root[current].aibuild2("enemylaser", _root["turretpt" + n]._x, _root["turretpt" + n]._y, 1500, n, 1.5);
_root[current].build = true;
break;
}
}
i--;
}
}
n++;
}
}
if (_root.ai.timer == 250) {
if ((_root.enemycomcentre < 1) && (_root.enemymoney >= 5000)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemycomcentre", _root.comcentrept._x, _root.comcentrept._y, 5000, 0.5);
_root[current].build = true;
break;
}
i--;
}
}
if ((_root.enemyservicedepot < 1) && (_root.enemymoney >= servicedepotmoney)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemyservicedepot", _root.servpt._x, _root.servpt._y, 1500, 1);
_root[current].build = true;
break;
}
i--;
}
}
if ((_root.enemyrefinery < 1) && (_root.enemymoney >= 2000)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemyrefinery", _root.refpt._x, _root.refpt._y, 2000, 1);
_root[current].build = true;
break;
}
i--;
}
}
if ((_root.enemywarfactory == 0) && (_root.enemymoney >= 2000)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemywarfactory", _root.warpt._x, _root.warpt._y, 2000, 1);
_root[current].build = true;
break;
}
i--;
}
}
if ((_root.enemytechcentre < 1) && (_root.enemymoney >= techcentremoney)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemytechcentre", _root.techpt._x, _root.techpt._y, 1500, 0.7);
_root[current].build = true;
break;
}
i--;
}
}
if (((_root.enemytechcentre1._x != undefined) && (timeelasped >= this.nuketime)) && (_root.enemyweaponsilo == 0)) {
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if ((!_root[current].walking) && (!_root[current].build)) {
_root[current].aibuild("enemyweaponsilo", _root.silopt._x, _root.silopt._y, 10000, 0.2);
_root[current].build = true;
timeelasped = 0;
break;
}
i--;
}
}
i = 0;
while (i < _root.array1.length) {
current = _root.array1[i];
if (_root[current].life == undefined) {
_root.array1.splice(i, 1);
}
if (i < (_root.array1.length - peoplestay)) {
_root.array2.push(current);
_root.array1.splice(i, 1);
if (Math.random() > 0.5) {
_root[current].avoid = true;
}
if (Math.random() > 0.8) {
_root[current].aggressive = false;
}
} else if (_root[current].unittype != "artillery") {
this.waypoint = "waypoint" + String(Math.floor(Math.random() * 7) + 100);
_parent.selector.play();
if (_root[this.waypoint]._x != undefined) {
_root[current].aigoto(_root[this.waypoint]._x, _root[this.waypoint]._y, false);
}
}
i++;
}
}
if ((Math.round(_root.ai.timer / 30) * 30) == _root.ai.timer) {
if (_root.enemyarray.length <= 0) {
_root.gotoAndStop("victory");
}
if (_root.friendlylist.length <= 0) {
_root.gotoAndStop("defeat");
}
n = _root.enemystructurearray.length - 1;
while (n > -1) {
current2 = _root.enemystructurearray[n];
i = dozers.length - 1;
while (i > -1) {
current = dozers[i];
if (_root[current].build || (_root[current].walking)) {
} else {
dx = _root[current]._x - _root[current2]._x;
dy = _root[current]._y - _root[current2]._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 1500) {
ant = 0;
if (((_root[current2].life < _root[current2].fulllife) && (_root[current2].percent == undefined)) && (_root[current2].auto._currentframe == 1)) {
if (!_root[current].hitTest(_root[current2])) {
_root[current].aigoto(_root[current2]._x, _root[current2]._y, false);
}
_root[current2].auto.play();
h = array1.length - 1;
while (h > -1) {
currents = _root.array1[h];
if ((((_root[currents].natack == undefined) && (!_root[currents].walking)) && (!_root[currents].fireing)) && (ant < 5)) {
ant++;
_root[currents].aigoto(_root[current2]._x, _root[current2]._y, false);
if (_root[current2].targetobj != undefined) {
targetobj = _root[current2].targetobj;
_root[currents].aiattack(targetobj);
}
}
h--;
}
}
}
break;
}
i--;
}
n--;
}
}
if ((Math.round(_root.ai.timer / 70) * 70) == _root.ai.timer) {
if (((dozers.length < dozersneeded) && (_root.enemycomcentre1._x != undefined)) && (_root.enemymoney > 1000)) {
_root.enemymoney = _root.enemymoney - 1000;
_root.attachMovie("enemydozer", "enemydozer" + _root.n, _root.n);
_root["enemydozer" + _root.n]._x = _root.enemycomcentre1._x;
_root["enemydozer" + _root.n]._y = _root.enemycomcentre1._y;
_root["enemydozer" + _root.n]._rotation = 0;
_root.n++;
}
if ((_root.enemymoney > uppermoney) && (!build)) {
build = true;
rounds++;
}
if ((_root.enemymoney < lowermoney) && (build)) {
build = false;
}
i = 0;
while (i < _root.array2.length) {
current = _root.array2[i];
if (_root[current].life == undefined) {
_root.array2.splice(i, 1);
} else if ((!_root[current].fireing) && (!_root[current].walking)) {
lo = Math.floor(Math.random() * (_root.friendlylist.length - 1));
unit = _root.friendlylist[lo];
_root[current].aiattack(unit);
}
i++;
}
arrayone = _root.array1.toString();
if (_root.enemywarfactory1.life > 0) {
if ((_root.enemyoiltrucks < oiltrucksneeded) && (_root.enemymoney >= 2000)) {
_root.enemymoney = _root.enemymoney - 1500;
_root.attachMovie("enemyoiltruck", "enemyoiltruck" + _root.n, _root.n);
_root["enemyoiltruck" + _root.n]._x = _root.enemywarfactory1._x;
_root["enemyoiltruck" + _root.n]._y = _root.enemywarfactory1._y;
_root["enemyoiltruck" + _root.n]._rotation = 0;
_root.n++;
}
if (build || ((_root.array1.length < totalpeople) && (_root.enemymoney > 0))) {
a = Math.random();
if ((a > 0) && (a < lightwt)) {
unittype = "enemylight";
_root.enemymoney = _root.enemymoney - 1000;
}
if ((a > lightwt) && (a < rocketwt)) {
unittype = "enemyrocket";
_root.enemymoney = _root.enemymoney - 1500;
}
if ((a > rocketwt) && (a < heavywt)) {
unittype = "enemyheavy";
_root.enemymoney = _root.enemymoney - 2500;
}
if ((a > heavywt) && (a < humveewt)) {
unittype = "enemyhumvee";
_root.enemymoney = _root.enemymoney - 500;
}
if ((a > humveewt) && (a < 1)) {
unittype = "enemyartillery";
_root.enemymoney = _root.enemymoney - 2000;
}
_root.attachMovie(unittype, unittype + _root.n, _root.n);
_root[unittype + _root.n]._x = _root.enemywarfactory1._x;
_root[unittype + _root.n]._y = _root.enemywarfactory1._y + 100;
_root[unittype + _root.n]._rotation = 0;
_root.array1.push(unittype + _root.n);
unittype = undefined;
_root.n++;
if ((_root.enemylasertank1._x == undefined) && (_root.enemytechcentre1._x != undefined)) {
if (Math.random() > 0.9) {
_root.attachMovie("enemylasertank", "enemylasertank1", _root.n);
_root.enemylasertank1._x = _root.enemywarfactory1._x;
_root.enemylasertank1._y = _root.enemywarfactory1._y + 100;
_root.enemylasertank1._rotation = 0;
_root.enemymoney = _root.enemymoney - 7500;
_root.array1.push("enemylasertank1");
}
}
}
}
}
};
this.difficulty = _root.difficulty;
if (_root.ais == 1) {
_root.ai.timer = 0;
_root.array2 = [];
_root.array1 = [];
_root.ai.build = true;
_root.ai.rounds = 0;
_root.enemyoiltrucks = 0;
_root.ai.minesneeded = 0;
_root.ai.mineweight = 0;
turretsneeded = 4;
var i = 1;
while (i < turretsneeded) {
_root["enemyturret" + i] = false;
i++;
}
_root.ai.pteam = 0;
_root.ai.turretmoney = 1500;
_root.ai.techcentremoney = 10000;
_root.ai.servicedepotmoney = 50000;
_root.ai.teamslist = [];
_root.ai.teamsneeded = 5 + Math.round(5 / _root.difficulty);
_root.ai.minteamlength = 2;
_root.ai.teamlength = 3;
_root.ai.dozersneeded = 3;
_root.ai.timeelasped = 0;
_root.ai.nuketime = 2000;
_root.ai.uppermoney = 20000;
_root.ai.lowermoney = 10000;
_root.ai.oiltrucksneeded = 5;
_root.ai.difficulty = _root.difficulty;
_root.ai.lightwt = 0.3;
_root.ai.rocketwt = 0.5;
_root.ai.heavywt = 0.6;
_root.ai.humveewt = 1;
_root.ai.turret1wt = 0.5;
_root.ai.turret2wt = 0.5;
_root.ai.turret3wt = 1;
totalpeople = 14;
peoplestay = 6;
type = 1;
this.commandteamtype = function () {
if ((Math.round(_root.ai.timer / 70) * 70) == _root.ai.timer) {
nextteam++;
if ((nextteam == undefined) || (nextteam >= _root.ai.teamslist.length)) {
nextteam = 0;
}
current = _root.ai.teamslist[nextteam];
if ((_root[current].members.length <= (_root[current].members.length * 0.333333333333333)) && (_root[current].attackpt != undefined)) {
_root[current].fleeing = true;
if (_root.enemyservicedepot1._x != undefined) {
waypoint = "enemyservicedepot1";
} else {
waypoint = "waypoint100";
}
}
if (_root[current].iswithindistance(_root[current].attackpt, 200) && (!(_root[current].fleeing === true))) {
lo = Math.floor(Math.random() * (_root.friendlylist.length - 1));
unit = _root.friendlylist[lo];
_root[current].attack(unit);
i = _root[current].members.length - 1;
while (i > -1) {
current2 = _root[current].members[i];
if ((_root[current2].unittype == "humvee") && (_root[current2].timer >= 100)) {
_root[current2].timer = 0;
_root.attachMovie("stealth", "stealth" + _root.n, _root.n);
_root["stealth" + _root.n].object = current2;
_root.n++;
}
if ((_root[current2].unittype == "light") && (_root[current2].timer >= 100)) {
_root[current2].timer = 0;
_root.attachMovie("frenzy", "frenzy" + _root.n, _root.n);
_root["frenzy" + _root.n].object = current2;
_root.n++;
}
i--;
}
}
if ((_root[current].members.length == 0) && (_root[current].built === true)) {
_root.ai.teamslist.findandsplice(current);
_root[current] = undefined;
}
if (_root[current].members.length >= 1) {
_root[current].built = true;
}
if (_root[current].members.length >= _root[current].maxlength) {
_root[current].fleeing = false;
_root[current].attackpt = "attackpt" + String(Math.ceil(Math.random() * 3));
_root[current].goto(undefined, undefined, _root[current].attackpt);
_root[current].attacks = true;
}
}
};
}
if (_root.ais == 2) {
_root.ai.timer = 0;
_root.array2 = [];
_root.array1 = [];
_root.ai.build = true;
_root.ai.rounds = 0;
_root.enemyoiltrucks = 0;
_root.ai.minesneeded = 3;
_root.ai.mineweight = 0.3;
turretsneeded = 9;
var i = 1;
while (i < turretsneeded) {
_root["enemyturret" + i] = false;
i++;
}
_root.ai.pteam = 0;
_root.ai.turretmoney = 1500;
_root.ai.techcentremoney = 30000;
_root.ai.servicedepotmoney = 20000;
_root.ai.teamslist = [];
_root.ai.teamsneeded = 2;
_root.ai.minteamlength = Math.round(7 / _root.difficulty);
_root.ai.teamlength = Math.round(7 / _root.difficulty);
_root.ai.dozersneeded = 5;
_root.ai.timeelasped = 0;
_root.ai.nuketime = 2000;
_root.ai.uppermoney = 10000;
_root.ai.lowermoney = 5000;
_root.ai.oiltrucksneeded = 3;
_root.ai.difficulty = _root.difficulty;
_root.ai.lightwt = 0.2;
_root.ai.rocketwt = 0.3;
_root.ai.heavywt = 0.6;
_root.ai.humveewt = 0.7;
_root.ai.turret1wt = 0.1;
_root.ai.turret2wt = 0.5;
_root.ai.turret3wt = 0.7;
totalpeople = 30;
peoplestay = 2;
type = 2;
this.commandteamtype2 = function () {
if (_root.ai.timer == Math.round(_root.difficulty * 250)) {
nextteam++;
if ((nextteam == undefined) || (nextteam >= _root.ai.teamslist.length)) {
nextteam = 0;
}
current = _root.ai.teamslist[nextteam];
if ((_root[current].members.length == 0) && (_root[current].built === true)) {
_root.ai.teamslist.findandsplice(current);
_root[current] = undefined;
}
if (_root[current].members.length >= 1) {
_root[current].built = true;
}
if (_root[current].members.length >= (_root[current].maxlength * 0.5)) {
lo = Math.floor(Math.random() * (_root.friendlylist.length - 1));
unit = _root.friendlylist[lo];
_root[current].attack(unit);
}
}
if ((Math.round(_root.ai.timer / 100) * 100) == _root.ai.timer) {
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root.team1.iswithindistance2(current, 1000)) {
_root.team1.attack(current, true);
}
i--;
}
}
};
}
if (_root.ais == 3) {
_root.ai.timer = 0;
_root.array2 = [];
_root.array1 = [];
_root.ai.build = true;
_root.ai.rounds = 0;
_root.enemyoiltrucks = 0;
_root.ai.minesneeded = 0;
_root.ai.mineweight = 0;
turretsneeded = 6;
var i = 1;
while (i < turretsneeded) {
_root["enemyturret" + i] = false;
i++;
}
_root.ai.pteam = 0;
_root.ai.turretmoney = 1500;
_root.ai.techcentremoney = 30000;
_root.ai.servicedepotmoney = 20000;
_root.ai.teamslist = [];
_root.ai.teamsneeded = _root.oilarray.length;
_root.ai.minteamlength = Math.round(5 / _root.difficulty);
_root.ai.teamlength = Math.round(4 / _root.difficulty);
_root.ai.dozersneeded = 6;
_root.ai.timeelasped = 0;
_root.ai.nuketime = 10000;
_root.ai.uppermoney = 20000;
_root.ai.lowermoney = 10000;
_root.ai.oiltrucksneeded = 8;
_root.ai.difficulty = _root.difficulty;
_root.ai.lightwt = 0.4;
_root.ai.rocketwt = 0.6;
_root.ai.heavywt = 0.7;
_root.ai.humveewt = 0.9;
_root.ai.turret1wt = 0.3;
_root.ai.turret2wt = 0.6;
_root.ai.turret3wt = 0.9;
totalpeople = 30;
peoplestay = 2;
type = 3;
this.commandteamtype3 = function () {
if ((Math.round(_root.ai.timer / 100) * 100) == _root.ai.timer) {
nextteam++;
if ((nextteam == undefined) || (nextteam >= _root.ai.teamslist.length)) {
nextteam = 0;
}
_root.ai.teamsneeded = _root.oilarray.length;
current = _root.ai.teamslist[nextteam];
if ((_root[current].members.length == 0) && (_root[current].built === true)) {
_root.ai.teamslist.findandsplice(current);
_root[current] = undefined;
}
if (_root[current].members.length >= 1) {
_root[current].built = true;
}
lo = Math.floor(Math.random() * (_root.oilarray.length - 1));
unit = _root.oilarray[lo];
_root[current].goto(undefined, undefined, unit);
if (Math.random() > 0.5) {
if (Math.random() > 0.8) {
lo = Math.floor(Math.random() * _root.friendlylist.length);
unit = _root.friendlylist[lo];
_root[current].attack(unit);
} else {
lo = Math.floor(Math.random() * _root.oiltruckarray.length);
unit = _root.oiltruckarray[lo];
_root[current].attack(unit);
}
}
}
};
}
trace(_root.ais + "ais");
if (_root.ais == 4) {
trace("techno");
_root.ai.timer = 0;
_root.array2 = [];
_root.array1 = [];
_root.ai.build = true;
_root.ai.rounds = 0;
_root.enemyoiltrucks = 0;
_root.ai.minesneeded = 5;
_root.ai.mineweight = 0.5;
turretsneeded = 4;
trace("boohoo");
var i = 1;
while (i < turretsneeded) {
_root["enemyturret" + i] = false;
i++;
}
_root.ai.pteam = 0;
_root.ai.turretmoney = 1500;
_root.ai.techcentremoney = 10000;
_root.ai.servicedepotmoney = 10000;
_root.ai.teamslist = [];
_root.ai.teamsneeded = 4;
_root.ai.minteamlength = 2;
_root.ai.teamlength = 3;
_root.ai.dozersneeded = 5;
_root.ai.timeelasped = 0;
_root.ai.nuketime = 5000;
_root.ai.uppermoney = 20000;
_root.ai.lowermoney = 15000;
_root.ai.oiltrucksneeded = 4;
_root.ai.difficulty = _root.difficulty;
_root.ai.lightwt = 0.2;
_root.ai.rocketwt = 0.4;
_root.ai.heavywt = 0.6;
_root.ai.humveewt = 0.8;
_root.ai.turret1wt = 0.1;
_root.ai.turret2wt = 0.4;
_root.ai.turret3wt = 0.6;
posarray = 0;
const = 1;
totalpeople = 20;
peoplestay = 10;
type = 4;
this.commandteamtype4 = function () {
if (_root.ai.timer == Math.round(_root.difficulty * 250)) {
nextteam++;
if ((nextteam == undefined) || (nextteam >= _root.ai.teamslist.length)) {
nextteam = 0;
}
current = _root.ai.teamslist[nextteam];
_root[current].timer++;
if ((_root[current].members.length == 0) && (_root[current].built === true)) {
_root.ai.teamslist.findandsplice(current);
_root[current] = undefined;
}
if (_root[current].members.length >= 1) {
_root[current].built = true;
}
if (_root[current].timer > 3) {
lo = Math.floor(Math.random() * _root.friendlylist.length);
unit = _root.friendlylist[lo];
_root[current].attack(unit);
}
}
};
}
if (_root.ais == 5) {
_root.ai.timer = 0;
_root.array2 = [];
_root.array1 = [];
_root.ai.build = true;
_root.ai.rounds = 0;
_root.enemyoiltrucks = 0;
_root.ai.minesneeded = 3;
_root.ai.mineweight = 0.2;
turretsneeded = 6;
trace("boohoo");
var i = 1;
while (i < turretsneeded) {
_root["enemyturret" + i] = false;
i++;
}
_root.ai.pteam = 0;
_root.ai.turretmoney = 3500;
_root.ai.techcentremoney = 20000;
_root.ai.servicedepotmoney = 15000;
_root.ai.teamslist = [];
_root.ai.teamsneeded = 4;
_root.ai.minteamlength = Math.round(2 / _root.difficulty);
_root.ai.teamlength = 3 + Math.round(3 / _root.difficulty);
_root.ai.dozersneeded = 5;
_root.ai.timeelasped = 0;
_root.ai.nuketime = 500;
_root.ai.uppermoney = 20000;
_root.ai.lowermoney = 10000;
_root.ai.oiltrucksneeded = 3;
_root.ai.difficulty = _root.difficulty;
_root.ai.lightwt = 0;
_root.ai.rocketwt = 0.4;
_root.ai.heavywt = 0.4;
_root.ai.humveewt = 0.5;
_root.ai.turret1wt = 0;
_root.ai.turret2wt = 0.6;
_root.ai.turret3wt = 0.6;
posarray = 0;
const = 100 * (1 / _root.ai.difficulty);
totalpeople = 20;
peoplestay = 5;
type = 5;
this.commandteamtype5 = function () {
if (_root.ai.timer == Math.round(_root.difficulty * 250)) {
nextteam++;
if ((nextteam == undefined) || (nextteam >= _root.ai.teamslist.length)) {
nextteam = 0;
}
current = _root.ai.teamslist[nextteam];
_root[current].timer++;
if ((_root[current].members.length == 0) && (_root[current].built === true)) {
_root.ai.teamslist.findandsplice(current);
_root[current] = undefined;
}
if (_root[current].members.length >= 1) {
_root[current].built = true;
}
if (_root[current].attackpt == undefined) {
_root[current].attackpt = "attackpt" + String(nextteam + 1);
trace(_root[current].attackpt);
}
if (_root[current].members.length < 2) {
_root[current].upgradealready = undefined;
_root[current].isattack = false;
}
if (_root[current].timer > 3) {
if (_root[current].iswithindistance(_root[current].attackpt, 400)) {
lo = Math.floor(Math.random() * _root.friendlylist.length);
unit = _root.friendlylist[lo];
_root[current].attack(unit);
_root[current].isattack = true;
}
if ((!_root[current].iswithindistance(_root[current].attackpt, 200)) && (!_root[current].isattack)) {
_root[current].goto(undefined, undefined, _root[current].attackpt);
}
}
}
};
}
Symbol 1273 MovieClip Frame 1
this._visible = false;
Symbol 1274 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1279 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1286 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1288 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1304 Button
on (release) {
_root.play();
}
Symbol 1305 MovieClip Frame 1
stop();
Symbol 1305 MovieClip Frame 20
stop();
Symbol 1306 MovieClip Frame 25
stop();
Instance of Symbol 572 MovieClip "kiss" in Symbol 1306 MovieClip Frame 25
onClipEvent (load) {
playa = false;
words = " Dear Commander,\n A month ago ,we have encountered criticisms from our European Neighbours after a deal to sell $155 billion worth of Military Equiptment to The European Union fell through. Their governments have since rallied together and formed the Confederacy Of European States in a bid to force us to hand over our new state of the art Class 16 Military Tanks.\n \n The European Confederacy threatens to wage war on our bases in Europe should their demands not be met. I will not allow a once United Europe be split into factions because of such a trivial matter. \n\nYou are to lead a US peacekeeping team based in France and quell the conflicts in Europe. Your commanding Officer shall give you more details.";
n = 0;
_parent.textss = "";
stringarray = words.split("");
trace(stringarray.length);
pp = stringarray.length - 1;
playa = true;
}
onClipEvent (enterFrame) {
if (Key.isDown(13)) {
_root.nextFrame();
}
if (n == pp) {
if (_parent.signs._currentframe == 1) {
_parent.signs.play();
}
}
if ((n < pp) && (playa)) {
i = n;
_parent.textss = _parent.textss + stringarray[i];
n = n + 1;
} else {
sound.stop();
}
trace(n + "i");
trace(pp + "pp");
}
Symbol 1320 MovieClip Frame 1
stop();
Symbol 1323 MovieClip Frame 1
stop();
_root.dialogue.gotoAndStop("empty");
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 7
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 1323 MovieClip Frame 14
Symbol 1323 MovieClip Frame 15
_root.shader2.play();
stop();
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 17
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 25
onClipEvent (load) {
gotoAndStop (3);
}
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 34
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 42
onClipEvent (load) {
gotoAndStop (4);
}
Symbol 1323 MovieClip Frame 49
_root.shader2.play();
stop();
Symbol 1323 MovieClip Frame 50
stop();
Symbol 1323 MovieClip Frame 70
_root.shader2.play();
stop();
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 70
onClipEvent (load) {
gotoAndStop (5);
}
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 80
onClipEvent (load) {
gotoAndStop (6);
}
Symbol 1323 MovieClip Frame 95
_root.shader2.play();
stop();
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 110
onClipEvent (load) {
gotoAndStop (7);
}
Symbol 1323 MovieClip Frame 120
_root.shader2.play();
stop();
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 140
onClipEvent (load) {
gotoAndStop (8);
}
Symbol 1323 MovieClip Frame 152
_root.shader2.play();
stop();
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 185
onClipEvent (load) {
gotoAndStop (9);
}
Symbol 1323 MovieClip Frame 186
_root.shader2.play();
stop();
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 205
onClipEvent (load) {
gotoAndStop (10);
}
Symbol 1323 MovieClip Frame 216
_root.shader2.play();
stop();
Instance of Symbol 1320 MovieClip in Symbol 1323 MovieClip Frame 230
onClipEvent (load) {
gotoAndStop (11);
}
Symbol 1323 MovieClip Frame 241
_root.shader2.play();
stop();
Symbol 1327 Button
on (release) {
_root.mapbar.commandbutton._visible = true;
_root.mapbar.selectedarray = _root[this._name + "array"].concat();
_root.mapbar.mapn = this._name;
_root.mapbar.invadebutton._visible = false;
_root.mapbar.calccost();
i = 10;
while (i > -1) {
_root["map" + i].selecteds._visible = false;
i--;
}
this.selecteds._visible = true;
}
on (rollOver) {
_root.mapbar.words = words;
}
Symbol 1329 Button
on (release) {
_root.mapbar.kiss.sound.stop();
_root.gotoAndPlay(map);
}
on (rollOver) {
_root.mapbar.words = words;
_root.mapbar.info = info;
_root.mapbar.kiss.loadtexts();
}
on (rollOut) {
_root.mapbar.words = "";
_root.mapbar.textss = "";
_root.mapbar.info = "";
_root.mapbar.kiss.stringarray = [];
_root.mapbar.kiss.sound.stop();
_root.mapbar.kiss.n = 0;
_root.mapbar.kiss.pp = 0;
_root.mapbar.kiss.i = 0;
_root.mapbar.kiss.playa = false;
}
Symbol 1332 MovieClip Frame 1
this._visible = false;
stop();
Symbol 1332 MovieClip Frame 2
this._visible = true;
Symbol 1332 MovieClip Frame 15
if (_root.shader1._currentframe == 1) {
_root.shader1.play();
}
if ((this._name == "shader1") && (_root.shader0._currentframe == 1)) {
_root.shader0.play();
}
stop();
Instance of Symbol 1331 MovieClip in Symbol 1332 MovieClip Frame 15
onClipEvent (load) {
trace(1 / _parent._xscale);
this._yscale = 5000 / _parent._yscale;
this._xscale = 5000 / _parent._xscale;
}
Symbol 1332 MovieClip Frame 17
stop();
Symbol 1443 MovieClip Frame 1
_global.teamtype("enemies", _root.enemyarray, 100000);
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 1
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_root.apc.life = _root.apc.life * (3 / _root.difficulty);
_root.apc.fulllife = _root.apc.fulllife * (3 / _root.difficulty);
n = 0;
}
Symbol 1443 MovieClip Frame 2
stop();
Symbol 1443 MovieClip Frame 3
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 3
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 4
n = 0;
_root.enemies.attack("apc");
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 4
onClipEvent (enterFrame) {
_parent.n++;
if (_parent.n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1443 MovieClip Frame 5
stop();
Symbol 1443 MovieClip Frame 6
n = 0;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 6
onClipEvent (enterFrame) {
_parent.n++;
if (_parent.n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1443 MovieClip Frame 7
n = 0;
_root.scrolla = true;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 7
onClipEvent (enterFrame) {
_parent.n++;
if (_parent.n == 100) {
var i = 4;
while (i > 0) {
_root["elite" + i]._x = _root.tart._x;
_root["elite" + i]._y = _root.tart._y;
_root["elite" + i].life = 500;
_root["elite" + i].fulllife = 500;
_root["elite" + i].shell2 = true;
_root["elite" + i].auto = true;
_root["elite" + i].firerate = 10;
i--;
}
var i = 6;
while (i > 4) {
_root["elite" + i]._x = _root.tart._x;
_root["elite" + i]._y = _root.tart._y;
_root["elite" + i].miss = 2;
_root["elite" + i].damage = 75;
_root["elite" + i].seeker = true;
i--;
}
var i = 9;
while (i > 6) {
_root["elite" + i]._x = _root.tart._x;
_root["elite" + i]._y = _root.tart._y;
_root["elite" + i].laser = true;
_root["elite" + i].speed = 8;
i--;
}
var i = 10;
while (i > 9) {
_root["elite" + i]._x = _root.tart._x;
_root["elite" + i]._y = _root.tart._y;
_root["elite" + i].emp = true;
i--;
}
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1443 MovieClip Frame 8
stop();
Symbol 1443 MovieClip Frame 9
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 9
onClipEvent (enterFrame) {
_parent.n++;
if (_parent.n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1443 MovieClip Frame 10
stop();
Symbol 1443 MovieClip Frame 11
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 12
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 13
stop();
Symbol 1443 MovieClip Frame 14
p = 0;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 14
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 15
stop();
Symbol 1443 MovieClip Frame 16
stop();
p = 0;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 16
onClipEvent (enterFrame) {
n++;
if (n == 2) {
_root.miss4.miss = 2;
_root.miss5.miss = 3;
_root.miss4.range = 550;
_root.miss5.range = 550;
_root.arts.nuke = true;
_root.hum1.gatling = true;
_root.hum2.laser = true;
_root.tank1.shell2 = true;
_root.htank.crush = true;
_global.teamtype("friendlies", _root.friendlylist, 1000);
_root.friendlies.upgrade("fulllife", 5 / _root.difficulty);
_root.friendlies.upgrade("life", 5 / _root.difficulty);
_root.friendlies.command("hitonly", true);
}
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 17
stop();
Symbol 1443 MovieClip Frame 18
p = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 18
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_root.gotoAndStop("defeat4b");
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 19
stop();
Symbol 1443 MovieClip Frame 20
p = 0;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 20
onClipEvent (enterFrame) {
n++;
pet++;
if (pet == 10) {
_root.ai.createobj2();
_root.ai.applyobj();
pet = 0;
}
if (n > 300) {
_global.teamtype("enemies", _root.guyzarray, 1000);
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
pet = 0;
}
Symbol 1443 MovieClip Frame 21
stop();
Symbol 1443 MovieClip Frame 22
p = 0;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 22
onClipEvent (enterFrame) {
n++;
if (n > 500) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
pet = 0;
}
Symbol 1443 MovieClip Frame 23
stop();
Symbol 1443 MovieClip Frame 24
stop();
p = 0;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 24
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 26
stop();
p = 0;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 26
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 28
stop();
p = 0;
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 28
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 30
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 30
onClipEvent (enterFrame) {
n++;
if (n == 2) {
_root.laser1.fulllife = _root.laser1.fulllife * 10;
_root.laser1.life = _root.laser1.life * 10;
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
if (_root[current].unittype != "humvee") {
_root[current].dummy.empulse = -500;
} else {
_root[current].laser = true;
_root[current].gatling = true;
_root[current].aggressive = false;
}
i--;
}
i = _root.enemyarray.length - 1;
while (i > -1) {
current = _root.enemyarray[i];
if (_root[current].hitTest(_root.tech1)) {
_root.ai.guyz.push(current);
}
i--;
}
teamtype("guards", _root.ai.guyz, 10000);
}
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 31
stop();
Symbol 1443 MovieClip Frame 32
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 32
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 33
stop();
Symbol 1443 MovieClip Frame 34
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 34
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 35
nextFrame();
Symbol 1443 MovieClip Frame 36
_root.guards.goto(undefined, undefined, "enemyrefinery1");
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 36
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 37
stop();
Symbol 1443 MovieClip Frame 38
_root.guards.goto(undefined, undefined, "enemytechcentre1");
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 38
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 39
stop();
Symbol 1443 MovieClip Frame 40
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 40
onClipEvent (enterFrame) {
n++;
if (n > (700 / _root.difficulty)) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 41
nextFrame();
Symbol 1443 MovieClip Frame 42
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
_root[current].dummy.empulse = 0;
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 42
onClipEvent (enterFrame) {
_parent.n++;
if (_parent.n > 400) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1443 MovieClip Frame 43
n = 0;
_root.laser1.aiattack("service1");
stop();
Symbol 1443 MovieClip Frame 44
n = 0;
_root.laser1.aiattack("turret1");
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 44
onClipEvent (enterFrame) {
_parent.n++;
if (_parent.n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1443 MovieClip Frame 45
n = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 45
onClipEvent (enterFrame) {
_parent.n++;
if (_parent.n > 400) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1443 MovieClip Frame 46
n = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 46
onClipEvent (enterFrame) {
_parent.n++;
if (_parent.n > 100) {
_root.gotoAndStop("victory6");
}
}
onClipEvent (load) {
_parent.n = 0;
}
Symbol 1443 MovieClip Frame 47
i = 5;
while (i > 0) {
_root["laser" + i].life = 10000;
_root["laser" + i].fulllife = 10000;
_root["laser" + i].range = 100;
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 47
onClipEvent (enterFrame) {
n++;
if (n > 1000) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_root.selectedarray = ["em1", "em2", "em3", "em4", "em5"];
i = 5;
while (i > -1) {
_root["em" + i].emp = true;
_root["em" + i].selector._visible = true;
_root["em" + i].speed = 0;
_root["em" + i].deploy();
i--;
}
n = 0;
}
Symbol 1443 MovieClip Frame 48
nextFrame();
Symbol 1443 MovieClip Frame 49
teamtype("enemies", _root.enemyarray, 10000);
_root.enemies.attack("comally");
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 49
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 50
stop();
Symbol 1443 MovieClip Frame 51
i = _root.enemyarray.length - 1;
while (i > (_root.enemyarray.length / 3)) {
current = _root.enemyarray[i];
_root[current].aiattack("warfactory1");
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 51
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 52
stop();
Symbol 1443 MovieClip Frame 53
i = 3;
while (i > 0) {
_root["laser" + i].life = 10000;
_root["laser" + i].fulllife = 10000;
_root["laser" + i].speed = 2;
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 53
onClipEvent (enterFrame) {
n++;
if (n > 500) {
_parent.nextFrame();
}
}
onClipEvent (load) {
}
Symbol 1443 MovieClip Frame 55
_root.money = _root.money - 50000;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 55
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
_root.guide.dummy.empulse = 0;
_root.guide.aigoto(_root.enemytechcentre1._x, _root.enemytechcentre1._y);
}
Symbol 1443 MovieClip Frame 57
_root.ai.convert("laser1", 1);
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 57
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_root.guide.aigoto(_root.enemytechcentre2._x, _root.enemytechcentre2._y);
}
Symbol 1443 MovieClip Frame 59
_root.ai.convert("laser2", 2);
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 59
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
_root.guide.aigoto(_root.enemytechcentre3._x, _root.enemytechcentre3._y);
}
Symbol 1443 MovieClip Frame 61
_root.ai.convert("laser3", 3);
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 61
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
_root.guide.aigoto(_root.com._x, _root.com._y);
}
Symbol 1443 MovieClip Frame 62
nextFrame();
Symbol 1443 MovieClip Frame 63
i = 3;
while (i > 0) {
_root["laser" + i].life = 10000;
_root["laser" + i].fulllife = 10000;
_root["laser" + i].speed = 2;
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 63
onClipEvent (enterFrame) {
n++;
if (n > 500) {
_parent.nextFrame();
}
}
onClipEvent (load) {
}
Symbol 1443 MovieClip Frame 64
stop();
Symbol 1443 MovieClip Frame 65
i = 3;
while (i > 0) {
_root["laser" + i].life = 10000;
_root["laser" + i].fulllife = 10000;
_root["laser" + i].speed = 2;
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 65
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
}
Symbol 1443 MovieClip Frame 67
i = 4;
while (i > 0) {
_root.attachMovie("lasertank", "lasers" + i, _root.n);
_root["lasers" + i]._x = _root.pao1._x + (50 * i);
_root["lasers" + i]._y = _root.pao1._y;
_root.n++;
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 67
onClipEvent (enterFrame) {
n++;
if (n == 3) {
i = 4;
while (i > 0) {
_root["lasers" + i].life = 10000;
_root["lasers" + i].fulllife = 10000;
_root["lasers" + i].speed = 2;
i--;
}
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 69
i = 3;
while (i > 0) {
_root["laser" + i].life = 10000;
_root["laser" + i].fulllife = 10000;
_root["laser" + i].speed = 2;
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 69
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
}
Symbol 1443 MovieClip Frame 71
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 71
onClipEvent (enterFrame) {
n++;
if (n > 200) {
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
_root[current].life = _root[current].life * 2;
_root[current].fulllife = _root[current].fulllife * 2;
_root[current].hitonly = true;
i--;
}
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 73
_root.truck.dummy.empulse = 100;
_root.ai.go = true;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 73
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 74
if (_root.truck.mined) {
gotoAndStop ("bugged");
} else {
gotoAndStop ("good");
}
Symbol 1443 MovieClip Frame 75
_root.truck.aigoto(_root.enemyservicedepot1._x, _root.enemyservicedepot1._y);
_root.truck.dummy.empulse = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 75
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 76
_root.ai.go = false;
stop();
Symbol 1443 MovieClip Frame 77
_root.truck.life = 0;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 77
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 78
_root.ai.go = false;
stop();
Symbol 1443 MovieClip Frame 79
_root.patrols1.goto(undefined, undefined, "enemyservicedepot1");
_root.patrols2.goto(undefined, undefined, "enemyservicedepot1");
_root.patrols3.goto(undefined, undefined, "enemyservicedepot1");
_root.ai.bombed = true;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 79
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 80
stop();
Symbol 1443 MovieClip Frame 81
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 81
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 82
stop();
Symbol 1443 MovieClip Frame 83
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 83
onClipEvent (enterFrame) {
n++;
if (n == 3) {
teamtype("convoy", _root.friendlylist, 10000);
_root.convoy.goto(undefined, undefined, "dropoff");
_root.dozer1.speed = 1;
_root.dozer2.speed = 1;
_root.dozer3.speed = 1;
_root.laser.speed = 2;
_root.convoy.command("laser", true);
_root.convoy.command("auto", true);
_root.convoy.command("gatling", true);
_root.convoy.command("emp", true);
_root.convoy.command("accurate", true);
_root.convoy.command("shell2", true);
_root.convoy.command("seeker", true);
_root.convoy.command("miss", 2);
_root.convoy.command("hitonly", true);
_root.convoy.upgrade("life", 2);
_root.convoy.upgrade("fulllife", 2);
_root.convoy.upgrade("damage", 2);
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 85
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 85
onClipEvent (enterFrame) {
n++;
if (n == 3) {
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 87
i = _root.dozerarray.length - 1;
while (i > -1) {
current = _root.dozerarray[i];
if (_root[current]._y > _root.bridge2._y) {
_root.ai.downbridge.push(current);
}
if (_root[current]._y < _root.bridge2._y) {
_root.ai.upbridge.push(current);
}
i--;
}
teamtype("down", _root.ai.downbridge, 1000);
teamtype("up", _root.ai.upbridge, 1000);
_root.down.goto(undefined, undefined, "repair1");
_root.up.goto(undefined, undefined, "repair2");
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 87
onClipEvent (enterFrame) {
n++;
if (n == 3) {
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 88
stop();
Symbol 1443 MovieClip Frame 89
_root.back.bridge.gotoAndStop("q");
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 89
onClipEvent (enterFrame) {
n++;
if (n == 3) {
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 90
stop();
Symbol 1443 MovieClip Frame 91
_root.back.bridge.gotoAndStop("h");
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 91
onClipEvent (enterFrame) {
n++;
if (n == 3) {
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 92
stop();
Symbol 1443 MovieClip Frame 93
_root.back.bridge.gotoAndStop("3q");
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 93
onClipEvent (enterFrame) {
n++;
if (n == 3) {
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 94
stop();
Symbol 1443 MovieClip Frame 95
_root.back.bridge.gotoAndStop(1);
_root.ai.ambush = false;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 95
onClipEvent (enterFrame) {
n++;
if (n == 3) {
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 96
stop();
Symbol 1443 MovieClip Frame 97
i = _root.friendlylist.length - 1;
while (i > -1) {
current = _root.friendlylist[i];
_root[current].life = _root[current].life * 10;
_root[current].fulllife = _root[current].fulllife * 10;
i--;
}
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 97
onClipEvent (enterFrame) {
n++;
if (n == 3) {
_root.fortress.life = 10000000 /* 0x989680 */;
_root.fortress.fulllife = 10000000 /* 0x989680 */;
_root.fortress.dummy.empulse = -3;
i = _root.enemyturretarray.length - 1;
while (i > -1) {
current = _root.enemyturretarray[i];
if (_root[current]._yscale > 101) {
_root[current].damage = _root[current].damage * 3;
_root[current].range = 550;
}
i--;
}
i = _root.enemystructurearray.length - 1;
while (i > -1) {
current = _root.enemystructurearray[i];
_root[current].life = _root[current].life * 2;
_root[current].fulllife = _root[current].fulllife * 2;
i--;
}
}
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 98
stop();
Symbol 1443 MovieClip Frame 99
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 99
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 100
stop();
Symbol 1443 MovieClip Frame 101
_root.fortress.dummy.empulse = 0;
_root.fortress.fulllife = 100000 /* 0x0186A0 */;
_root.fortress.life = 100000 /* 0x0186A0 */;
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 101
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 102
stop();
Symbol 1443 MovieClip Frame 103
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 103
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_root.gotoAndStop("victory10");
_root.decoy = true;
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 104
stop();
Symbol 1443 MovieClip Frame 105
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 105
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_root.gotoAndStop("victory10");
_root.decoy = false;
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 106
stop();
Symbol 1443 MovieClip Frame 107
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 107
onClipEvent (enterFrame) {
n++;
if (n == 3) {
_root.friendlies = undefined;
teamtype("friendlies", _root.friendlylist, 100);
_root.friendlies.upgrade("fulllife", 10);
_root.friendlies.upgrade("life", 10);
_root.friendlies.command("hitonly", true);
_root.friendlies.command("laser", true);
_root.friendlies.command("aggressive", false);
_root.friendlies.command("gatling", true);
_root.friendlies.command("crush", true);
_root.friendlies.command("auto", true);
_root.friendlies.command("emp", true);
_root.friendlies.command("seeker", true);
_root.friendlies.command("miss", 2);
_root.friendlies.command("emp", true);
_root.friendlies.command("_alpha", 50);
_root.friendlies = undefined;
}
if (n > 400) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 108
stop();
Symbol 1443 MovieClip Frame 109
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 109
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 111
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 111
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 113
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 113
onClipEvent (enterFrame) {
n++;
if (n > 200) {
_parent.nextFrame();
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 115
stop();
Instance of Symbol 46 MovieClip in Symbol 1443 MovieClip Frame 115
onClipEvent (enterFrame) {
n++;
if (n > 100) {
_root.gotoAndStop("defeat10a");
}
}
onClipEvent (load) {
n = 0;
}
Symbol 1443 MovieClip Frame 116
stop();
Symbol 1448 MovieClip Frame 1
this.cacheAsBitmap = true;
_root.enemyarray.push(this._name);
_root.objarray.push(_name);
stop();
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1448 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.life <= 0) {
_parent.nextFrame();
}
}
onClipEvent (load) {
_parent.life = 500;
this._visible = false;
}
Symbol 1448 MovieClip Frame 2
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.ai.timergo = true;
stop();
Symbol 1471 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1481 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1486 MovieClip Frame 1
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 1486 MovieClip Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.upgrade = 0;
_root.structurearray.push(_parent._name);
this._visible = false;
_parent.enemy = false;
_parent.aggressive = true;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 2000;
_parent.fulllife = 2000;
_parent.unittype = "comcentre";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1486 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 370 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 1486 MovieClip Frame 2
_root.enemymoney = _root.enemymoney + 5000;
_root.sidebar.build.dozer.gotoAndStop(1);
Symbol 1486 MovieClip Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root[_name + "symbols"].removeMovieClip();
this._name = "noo2b";
_root.alliedunits--;
this.removeMovieClip();
stop();
Symbol 1488 MovieClip Frame 1
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 1488 MovieClip Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
this._visible = false;
_parent.enemy = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_parent.unittype = "servicedepot";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1488 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 380 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 1488 MovieClip Frame 2
_root.money = _root.money + 5000;
Symbol 1488 MovieClip Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.alliedunits--;
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 1490 MovieClip Frame 1
this.cacheAsBitmap = true;
stop();
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1490 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 290 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1490 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 290 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 1490 MovieClip Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
this._visible = false;
_parent.enemy = false;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_root.friendlylist.push(_parent._name);
_parent.unittype = "war factory";
}
Symbol 1490 MovieClip Frame 2
_root.money = _root.money + 2000;
Symbol 1490 MovieClip Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.alliedunits--;
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 1492 MovieClip Frame 1
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 1492 MovieClip Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
this._visible = false;
_parent.enemy = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_parent.unittype = "techcentre";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1492 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 240 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 1492 MovieClip Frame 2
_root.money = _root.money + 1500;
Symbol 1492 MovieClip Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.alliedunits--;
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 1495 MovieClip Frame 1
_root.enemycomcentre = 1;
repairs = false;
name = this._name;
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 1495 MovieClip Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
this._visible = false;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 1000;
_parent.fulllife = 1000;
_parent.unittype = "radar";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1495 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 370 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 1495 MovieClip Frame 2
_root.money = _root.money + 5000;
Symbol 1495 MovieClip Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.sensornets--;
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 1498 MovieClip Frame 1
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 1498 MovieClip Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
this._visible = false;
_parent.aggressive = false;
_root.enemyarray.push(_parent._name);
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_parent.life = 5000;
_parent.fulllife = 5000;
_parent.unittype = "derrick";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1498 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 1000 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 1498 MovieClip Frame 2
_root.money = _root.money + 5000;
Symbol 1498 MovieClip Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.enemystructurearray.findandsplice(_name);
_root.gotoAndStop("victory7");
_root[_name + "symbols"].removeMovieClip();
this._name = "nobody";
this.removeMovieClip();
stop();
Symbol 1502 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1517 MovieClip Frame 1
stop();
Symbol 1517 MovieClip Frame 20
stop();
Symbol 1517 MovieClip Frame 21
stop();
Symbol 1517 MovieClip Frame 22
stop();
Symbol 1517 MovieClip Frame 23
stop();
Symbol 1520 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1525 MovieClip Frame 1
_root.enemycomcentre = 1;
repairs = false;
name = this._name;
this.cacheAsBitmap = true;
stop();
Instance of Symbol 123 MovieClip "selector" in Symbol 1525 MovieClip Frame 1
onClipEvent (load) {
_root.attachMovie("bigdot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
this._visible = false;
_parent.aggressive = false;
_root.objarray.push(_parent._name);
_root.unitsarray.push(_parent._name);
_root.enemyarray.push(_parent._name);
_parent.life = 2000;
_parent.fulllife = 2000;
_parent.unittype = "radar";
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1525 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 370 * (_parent.life / _parent.fulllife);
if (_parent.life <= 0) {
_parent.gotoAndPlay("explode");
}
}
Symbol 1525 MovieClip Frame 2
_root.money = _root.money + 5000;
Symbol 1525 MovieClip Frame 11
_root.objarray.findandsplice(_name);
_root.unitsarray.findandsplice(_name);
_root.enemyarray.findandsplice(_name);
_root.sensornets--;
_root[_name + "symbols"].removeMovieClip();
this.removeMovieClip();
stop();
Symbol 1530 MovieClip Frame 1
this.cacheAsBitmap = true;
this.opaqueBackground = 0;
Symbol 1532 MovieClip Frame 1
stop();
Instance of Symbol 568 MovieClip "dummy" in Symbol 1532 MovieClip Frame 1
onClipEvent (load) {
_root.attachMovie("dot2", _parent._name + "symbols", 1000006 + _root.n);
_root[_parent._name + "symbols"]._x = x1 + (constantsx * (_parent._x - _root.back._x));
_root[_parent._name + "symbols"]._y = y1 + (constantsy * (_parent._y - _root.back._y));
_root.n++;
_parent.unittype = "apc";
_parent.avoid = false;
upgrade = 0;
aaa = Math.random() * upgrade;
_parent.aggressive = true;
_root.enemyarray.push(_parent._name);
_parent.enemy = true;
_parent.num = _root.num;
_root.num++;
_parent.selected1 = false;
_root.unitsarray.push(_parent._name);
_root.objarray.push(_parent._name);
_parent.life = 1500;
_parent.fulllife = 1500;
_parent.speed = 1;
empulse = 0;
nohit = 0;
as = 0;
left = 1;
_parent.selector.play();
}
onClipEvent (enterFrame) {
if (empulse > 0) {
empulse--;
}
if (empulse == 0) {
if (_parent.attack) {
if (_root[_parent.targetobj].life <= 0) {
obstacle = false;
_parent.targetobj = undefined;
_parent.walking = false;
_parent.attack = false;
}
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < _parent.range) {
obstacle = false;
_parent.walking = false;
_parent.fireing = true;
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.attack = false;
_parent.fireing = false;
}
}
}
if (_parent.walking == true) {
_parent.fireing = false;
hit = false;
flag = "flag" + _parent._name;
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
nohit++;
if (nohit == 20) {
i = _root.unitsarray.length - 1;
while (i > -1) {
current = _root.unitsarray[i];
if (this.hitTest(_root[current])) {
if ((_parent.crush && (!_root[current].enemy)) && (_root[current].fulllife < 500)) {
_root[current].life = 0;
}
if (_parent.num > _root[current].num) {
if (this._rotation > 0) {
_parent._x = _parent._x + (0.2 * _parent._width);
_parent._y = _parent._y + (0.2 * _parent._height);
}
if (this._rotation < 0) {
_parent._x = _parent._x - (0.2 * _parent._width);
_parent._y = _parent._y - (0.2 * _parent._height);
}
}
}
i--;
}
nohit = 0;
}
if (obstacle) {
dx = _root[flag2]._x - _parent._x;
dy = _root[flag2]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
obstacle = false;
}
}
if (!obstacle) {
dx = _root[flag]._x - _parent._x;
dy = _root[flag]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < 10) {
_root[flag].removeMovieClip();
_root.objarray.findandsplice(flag);
_root.flagsarray.findandsplice(flag);
_parent.walking = false;
}
}
}
if (_parent.fireing) {
dx = _root[_parent.targetobj]._x - _parent._x;
dy = _root[_parent.targetobj]._y - _parent._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist > (_parent.range * 1.5)) {
_parent.walking = true;
_root[flag]._x = _root[_parent.targetobj]._x;
_root[flag]._y = _root[_parent.targetobj]._y;
_parent.fireing = false;
}
}
if (_parent.fireing) {
_parent.turret._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
if (_parent.turret._currentframe == 1) {
_parent.turret.play();
_parent.turret.targetobj = _parent.targetobj;
}
if (_root[_parent.targetobj].life <= 0) {
_parent.targetobj = undefined;
_parent.fireing = false;
_parent.attack = false;
}
if (_parent.crush) {
this._rotation = (Math.atan2(dy, dx) * 360) / (Math.PI*2);
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
if ((dist < 10) && (_root[_parent.targetobj].auto._x == undefined)) {
_root[_parent.targetobj].life = -1;
_parent._x = _root[_parent.targetobj]._x;
_parent._y = _root[_parent.targetobj]._y;
}
}
if (((!_parent.walking) && (_parent.avoid)) && (!_parent.crush)) {
if (!obstacle) {
as++;
if (left > 0) {
this._rotation = ((Math.atan2(dy, dx) * 360) / (Math.PI*2)) - 90;
}
if (left < 0) {
this._rotation = -((Math.atan2(dy, dx) * 360) / (Math.PI*2));
}
if (as > 50) {
as = 0;
}
}
if (obstacle) {
dxn = _root[flag2]._x - _parent._x;
dyn = _root[flag2]._y - _parent._y;
this._rotation = (Math.atan2(dyn, dxn) * 360) / (Math.PI*2);
}
rads = (this._rotation * (Math.PI*2)) / 360;
_parent._x = _parent._x + (Math.cos(rads) * _parent.speed);
_parent._y = _parent._y + (Math.sin(rads) * _parent.speed);
_parent.movesym();
}
}
if (_parent.hitTest(_root.back.tops)) {
_parent._y = _parent._y + 20;
}
if (_parent.hitTest(_root.back.bottoms)) {
_parent._y = _parent._y - 20;
}
if (_parent.hitTest(_root.back.lefts)) {
_parent._x = _parent._x + 20;
}
if (_parent.hitTest(_root.back.rights)) {
_parent._x = _parent._x - 20;
}
}
}
Instance of Symbol 123 MovieClip "selector" in Symbol 1532 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 128 MovieClip "lifebar" in Symbol 1532 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = 160 * (_parent.life / _parent.fulllife);
if (_parent.dummy._currentframe == 1) {
if (_parent.life <= 0) {
_parent.dummy.gotoAndPlay("explode");
}
}
}
Symbol 1532 MovieClip Frame 2
stop();
Symbol 1535 MovieClip Frame 1
stop();
Symbol 1535 MovieClip Frame 39
_root.play();
Symbol 1537 MovieClip Frame 1
_root.stop();
stop();
Instance of Symbol 572 MovieClip "kiss" in Symbol 1537 MovieClip Frame 1
onClipEvent (load) {
playa = false;
words = " Baron Anton Von Traitos was trialed in the Supreme Court in the United States and charged with War Crimes relating to corruption.It was discovered that Traitos blackmailed the European leaders to force them to comply with his wishes to obtain top-secret US military technology. \n \n He was sentenced to be executed on the electric chair on May 16, 2045.However, he has escaped and is now on the loose , reportedly taking revenge on his 'aides' who betrayed him not too long ago.... \n \n It is possible that he could stir up another war in Europe, but in the event of such happening, the US will always step in to resolve the matter, and we can always rely on the services of one who suceeded in bringing Traitos to his knees.....";
n = 0;
_parent.textss = "";
stringarray = words.split("");
trace(stringarray.length);
pp = stringarray.length - 1;
}
onClipEvent (enterFrame) {
if (n == pp) {
if (_parent.signs._currentframe == 1) {
_parent.signs.play();
}
}
if ((n < pp) && (playa)) {
i = n;
_parent.textss = _parent.textss + stringarray[i];
n = n + 1;
} else {
sound.stop();
}
trace(n + "i");
trace(pp + "pp");
}