Frame 1
_root.stop();
Instance of Symbol 499 MovieClip "loading" in Frame 1
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
_root.percent = int((bytes_loaded / bytes) * 100) + "%";
_root.loading._xscale = int((bytes_loaded / bytes) * 100);
_root.stop();
if (bytes_loaded == bytes) {
_root.gotoAndPlay(3);
}
}
Frame 2
gotoAndPlay (1);
Frame 20
stop();
Frame 23
stop();
Frame 384
_root._quality = "LOW";
Instance of Symbol 549 MovieClip in Frame 384
//component parameters
onClipEvent (construct) {
varName = "defaultValue";
}
Frame 728
_root._quality = "HIGH";
Frame 729
stop();
_root._quality = "HIGH";
instructions._visible = false;
Instance of Symbol 421 MovieClip in Frame 729
onClipEvent (load) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 730
selected_building = ["", "", "", "", "none"];
buildings_a = [[], [75, 10, "turret", 1, 1, 1, 0, 100], [1000, 100, "factory", 0, 4, 3, 0, 2000], [500, 0, "powerplant", 0, 2, 2, 5, 600], [750, 50, "Nuclear silo", 0, 2, 2, 0, 1000]];
level1 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level2 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level3 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
level1bg = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 36], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 2], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 36, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26]];
level2bg = [[17, 18, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 17, 1, 1, 1, 1, 18], [19, 20, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 17, 1, 1, 1, 1, 18], [21, 21, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 19, 16, 16, 16, 16, 20], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 21, 21, 21, 21, 21, 21], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 2], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [1, 1, 1, 1, 1, 1, 1, 1, 18, 21, 21, 21, 21, 1, 1, 1, 1, 16, 16, 16, 16, 16], [1, 1, 1, 1, 1, 1, 1, 1, 18, 23, 1, 1, 22, 17, 1, 1, 18, 21, 21, 21, 21, 21], [16, 16, 16, 16, 16, 1, 1, 1, 18, 23, 1, 1, 22, 17, 1, 1, 18, 23, 1, 1, 1, 1], [21, 21, 21, 21, 21, 23, 1, 1, 18, 23, 1, 1, 22, 19, 16, 16, 18, 23, 1, 1, 1, 1], [26, 26, 26, 26, 24, 23, 1, 1, 18, 23, 1, 1, 22, 21, 21, 21, 21, 23, 1, 1, 1, 1], [26, 26, 26, 26, 24, 23, 1, 1, 18, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [26, 26, 26, 26, 24, 23, 1, 1, 18, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
level3bg = [[26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26], [26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26]];
function building(x, y, lr, hr, id) {
bname2 = buildings_a[id][2];
if (bname2 == "turret") {
_root.online_turrets++;
}
bname = "building";
_root.power_rate = _root.power_rate + buildings_a[id][6];
_root.attachMovie(bname2, bname + bi, bi);
_root[bname + bi]._x = x;
_root[bname + bi]._y = y;
_root[bname + bi].id = id;
_root[bname + bi].lr = lr;
_root[bname + bi].hr = hr;
_root[bname + bi].hp = buildings_a[id][7];
_root[bname + bi].damage = buildings_a[id][3];
bi++;
xa = x / 25;
ya = y / 25;
var _local3 = hr - 1;
while (_local3 >= 0) {
var _local2 = lr - 1;
while (_local2 >= 0) {
xvar = xa + _local2;
yvar = ya + _local3;
_root["level" + _root.level][yvar][xvar] = 0;
_local2--;
}
_local3--;
}
}
function remove_building(x, y, lr, hr, id, nom) {
bname2 = buildings_a[id][2];
if (bname2 == "turret") {
_root.online_turrets--;
}
_root.power_rate = _root.power_rate - buildings_a[id][6];
removeMovieClip(nom);
xa = x / 25;
ya = y / 25;
var _local3 = hr - 1;
while (_local3 >= 0) {
var _local2 = lr - 1;
while (_local2 >= 0) {
xvar = xa + _local2;
yvar = ya + _local3;
_root["level" + _root.level][yvar][xvar] = 1;
_local2--;
}
_local3--;
}
}
function make_explosion_building(x, y, xscale, yscale) {
((!iz) ? ((iz = 1000)) : (iz++));
((iz == 1200) ? ((iz = 1000)) : null);
_root.attachMovie("explosion1", "explosion" + iz, iz);
_root["explosion" + iz]._x = x;
_root["explosion" + iz]._y = y;
_root["explosion" + iz]._xscale = 100 * xscale;
_root["explosion" + iz]._yscale = 100 * yscale;
}
function make_explosion_car(x, y, xscale, yscale) {
((!iz) ? ((iz = 1000)) : (iz++));
((iz == 1200) ? ((iz = 1000)) : null);
_root.attachMovie("explosion2", "explosion" + iz, iz);
_root["explosion" + iz]._x = x;
_root["explosion" + iz]._y = y;
_root["explosion" + iz]._xscale = 100 * xscale;
_root["explosion" + iz]._yscale = 100 * yscale;
}
function make_background(levelid) {
_root.createEmptyMovieClip("lvl_background", 1);
_root.lvl_background._x = 0;
_root.lvl_background._y = 0;
ibg = 1;
var _local3 = 15;
while (_local3 >= 0) {
var _local2 = 21;
while (_local2 >= 0) {
_root.lvl_background.attachMovie("tile", "tile" + ibg, ibg);
_root.lvl_background["tile" + ibg].gotoAndStop(_root[("level" + levelid) + "bg"][_local3][_local2]);
_root.lvl_background["tile" + ibg]._x = _local2 * 25;
_root.lvl_background["tile" + ibg]._y = _local3 * 25;
ibg++;
_local2--;
}
_local3--;
}
}
function make_ennemy(x, y, id) {
((!i) ? ((i = 601)) : (i++));
((i == 700) ? ((i = 601)) : null);
_root.attachMovie("ennemy", "ennemy" + i, i);
_root["ennemy" + i]._x = x;
_root["ennemy" + i]._y = y;
_root["ennemy" + i].gotoAndStop(id);
}
function comm_message(message, time, songid) {
_root.box_message = message;
_root.hud.comm.gotoAndStop("up");
_root.hud.comm.life = time;
}
function accomplished_start() {
_root.hud.accomplished_text.play();
}
function accomplished_end() {
_root.musicplayersound.stop();
_root.cursor._visible = false;
removeMovieClip(_root.hud);
removeMovieClip(_root.lvl_background);
removeMovieClip(_root.ennemy_creator);
var _local2 = 400;
while (_local2 <= 700) {
removeMovieClip(_root["building" + _local2]);
removeMovieClip(_root["ennemy" + _local2]);
_local2++;
}
removeMovieClip(_root.ennemy_creator);
_root.gotoAndStop("victory");
}
function gameOver() {
_root.musicplayersound.stop();
_root.cursor.removeMovieClip();
removeMovieClip(_root.hud);
removeMovieClip(_root.lvl_background);
removeMovieClip(_root.ennemy_creator);
var _local2 = 400;
while (_local2 <= 700) {
removeMovieClip(_root["building" + _local2]);
removeMovieClip(_root["ennemy" + _local2]);
_local2++;
}
_root.ennemy_container.removeMovieClip();
_root.back1.removeMovieClip();
_root.mech_hud.removeMovieClip();
_root.mech.removeMovieClip();
_root.mech_mask.removeMovieClip();
removeMovieClip(_root.ennemy_creator);
_root.gotoAndStop("game over");
}
function gameDone() {
_root.musicplayersound.stop();
_root.cursor.removeMovieClip();
removeMovieClip(_root.hud);
removeMovieClip(_root.lvl_background);
removeMovieClip(_root.ennemy_creator);
var _local2 = 400;
while (_local2 <= 700) {
removeMovieClip(_root["building" + _local2]);
removeMovieClip(_root["ennemy" + _local2]);
_local2++;
}
_root.ennemy_container.removeMovieClip();
_root.back1.removeMovieClip();
_root.mech_hud.removeMovieClip();
_root.mech.removeMovieClip();
removeMovieClip(_root.ennemy_creator);
_root._x = 0;
_root._y = 0;
_root.mech_mask.removeMovieClip();
_root.gotoAndPlay("game done");
}
function set_new_level() {
if (_root.level == 1) {
_root.can_factory = 1;
_root.available_turrets = 15;
_root.online_turrets = 0;
_root.bi = 400;
_root.money = 775;
_root.power_rate = 0;
_root.power = 50;
_root.power_display = (power + "/+") + power_rate;
_root.attachMovie("hud", "hud", 300001);
_root.hud._x = 0;
_root.hud._y = 0;
_root.attachMovie("cursor", "cursor", 300000);
_root.hud.cancel._visible = false;
_root.build_enabled = false;
_root.hud._visible = true;
_root.cursor._visible = true;
_root.level = 2;
_root.building(0, 0, 0, 0, 3);
_root.gotoAndStop("game");
} else if (_root.level == 2) {
_root.can_factory = 1;
_root.available_turrets = 12;
_root.online_turrets = 0;
_root.bi = 400;
_root.money = 875;
_root.power_rate = 0;
_root.power = 50;
_root.power_display = (power + "/+") + power_rate;
_root.attachMovie("hud", "hud", 300001);
_root.hud._x = 0;
_root.hud._y = 0;
_root.attachMovie("cursor", "cursor", 300000);
_root.hud.cancel._visible = false;
_root.build_enabled = false;
_root.hud._visible = true;
_root.cursor._visible = true;
_root.upgrade_turret_enabled = 0;
_root.level = 3;
_root.gotoAndStop("game");
}
}
upgrade_turret_enabled = 0;
nuclear_build_enabled = 0;
available_turrets = 20;
online_turrets = 0;
can_nuclear = 0;
can_factory = 0;
_root.level = 1;
Machinegun = new Sound(channel1);
Machinegun.attachSound("machinegun");
channel1.setVolume(25);
Music1 = new Sound(this);
Music1.attachSound("music1");
Music1.setVolume(120);
_root.attachMovie("hud", "hud", 300001);
_root.hud._x = -3;
_root.hud._y = 0;
_root.attachMovie("cursor", "cursor", 300000);
_root.hud._x = 0;
_root.hud._y = 0;
bi = 400;
money = 775;
power_rate = 0;
power = 50;
power_display = (power + "/+") + power_rate;
hud.cancel._visible = false;
build_enabled = false;
_root.life = 1000;
Frame 731
make_background(_root.level);
_root.attachMovie("creator" + level, "ennemy_creator", 4000);
_root.ennemy_creator._x = -300;
stop();
Frame 732
stop();
Instance of Symbol 625 MovieClip in Frame 732
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
if (_root.level == 1) {
_root.gotoAndPlay("brieffing2");
} else if (_root.level == 2) {
_root.gotoAndPlay("brieffing3");
} else if (_root.level == 3) {
_root.gotoAndPlay("brieffing4");
}
}
}
Instance of Symbol 421 MovieClip in Frame 732
onClipEvent (load) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 733
stop();
speech = new Sound(_root);
speech.attachSound("speech1");
speech.start();
Instance of Symbol 625 MovieClip in Frame 733
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
timer++;
if (timer > 20) {
if (Key.isDown(32)) {
_root.speech.stop();
_root.gotoAndPlay("initialize");
}
}
}
Frame 734
stop();
speech = new Sound(_root);
speech.attachSound("speech2");
speech.start();
Instance of Symbol 625 MovieClip in Frame 734
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
timer++;
if (timer > 20) {
if (Key.isDown(32)) {
_root.speech.stop();
_root.set_new_level();
}
}
}
Frame 735
stop();
speech = new Sound(_root);
speech.attachSound("speech3");
speech.start();
Frame 736
stop();
speech = new Sound(_root);
speech.attachSound("speech4");
speech.start();
Instance of Symbol 625 MovieClip in Frame 736
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
timer++;
if (timer > 20) {
if (Key.isDown(32)) {
_root.speech.stop();
_root.gotoAndPlay("mech menu");
}
}
}
Frame 737
Mouse.show();
stop();
Instance of Symbol 421 MovieClip in Frame 737
onClipEvent (load) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Frame 756
function moveWorld(x, y, instance) {
_root._x = _root._x - x;
_root._y = _root._y - y;
_root.mech_hud._x = _root.mech_hud._x + x;
_root.mech_hud._y = _root.mech_hud._y + y;
_root.mech_mask._x = _root.mech_mask._x + x;
_root.mech_mask._y = _root.mech_mask._y + y;
_root[instance]._x = _root[instance]._x + x;
_root[instance]._y = _root[instance]._y + y;
}
function shoot(x, y, rot) {
((!ib) ? ((ib = 10)) : null);
((ib >= 30) ? ((ib = 10)) : null);
_root.attachMovie("bullet", "bullet" + ib, ib);
_root["bullet" + ib]._x = x;
_root["bullet" + ib]._y = y;
_root["bullet" + ib]._rotation = rot;
ib++;
}
function shoot2(x, y, rot) {
((!ic) ? ((ic = 31)) : null);
((ic >= 60) ? ((ic = 31)) : null);
_root.attachMovie("bullet2", "bullet2" + ic, ic);
_root["bullet2" + ic]._x = x;
_root["bullet2" + ic]._y = y;
_root["bullet2" + ic]._rotation = rot;
ic++;
}
function shoot_missile(x, y, rot) {
((!is) ? ((is = 61)) : null);
((is >= 99) ? ((is = 61)) : null);
_root.attachMovie("mech_missile", "missile" + is, is);
_root["missile" + is]._x = x;
_root["missile" + is]._y = y;
_root["missile" + is]._rotation = rot;
is++;
}
function create_level() {
_root.attachMovie("mech", "mech", 2);
_root.attachMovie("mech_mask", "mech_mask", 5);
_root.attachMovie("mech_background", "back1", 1);
_root.attachMovie("mech_hud", "mech_hud", 10000);
_root.back1.setMask(_root.mech_mask);
_root.moveWorld(-275, -200, null);
}
function createEnnemy(x, y) {
if (!_root.ennemy_container) {
_root.createEmptyMovieClip("ennemy_container", 6);
}
((!ae) ? ((ae = 300)) : (ae++));
((ae == 400) ? ((ae = 300)) : null);
_root.ennemy_container.attachMovie("mech_ennemy", "ennemy" + ae, ae);
_root.ennemy_container["ennemy" + ae]._x = x;
_root.ennemy_container["ennemy" + ae]._y = y;
}
function checkSeen(instance, x, y, rot) {
((!ai) ? ((ai = 600)) : (ai++));
((ae == 700) ? ((ae = 600)) : null);
_root.attachMovie("checker", "checker" + ai, ai);
_root["checker" + ai]._x = x;
_root["checker" + ai]._y = y;
_root["checker" + ai]._rotation = rot;
_root["checker" + ai].parent = instance;
}
function CreateAmmoCrate() {
}
function createParticle(x, y, type) {
((!ism) ? ((ism = 1000)) : (ism++));
((ism == 1200) ? ((ism = 1000)) : null);
_root.attachMovie(type, "particle" + ism, ism);
_root["particle" + ism]._x = x;
_root["particle" + ism]._y = y;
}
function createAmmoCrate(x, y) {
((!ac) ? ((ac = 800)) : (ac++));
((ac == 850) ? ((ac = 800)) : null);
_root.attachMovie("mech_ammocrate", "mech_ammocrate" + ac, ac);
_root["mech_ammocrate" + ac]._x = x;
_root["mech_ammocrate" + ac]._y = y;
}
function gameOver() {
_root.musicplayersound.stop();
_root.cursor.removeMovieClip();
removeMovieClip(_root.hud);
removeMovieClip(_root.lvl_background);
removeMovieClip(_root.ennemy_creator);
var _local2 = 400;
while (_local2 <= 700) {
removeMovieClip(_root["building" + _local2]);
removeMovieClip(_root["ennemy" + _local2]);
_local2++;
}
_root.ennemy_container.removeMovieClip();
_root.back1.removeMovieClip();
_root.mech_hud.removeMovieClip();
_root.mech.removeMovieClip();
removeMovieClip(_root.ennemy_creator);
_root._x = 0;
_root._y = 0;
_root.gotoAndStop("game over");
}
_root._quality = "low";
powerPlantsRemaining = 4;
mech_health = 500;
mech_ammo = 500;
mech_missiles = 14;
numberOfBreakables = 21;
numberOfEnnemies = 30;
sound_shoot = new Sound(_root);
sound_shoot.attachSound("rifle");
sound_mech_explosion = new Sound(_root);
sound_mech_explosion.attachSound("mech_explosion");
sound_mech_explosion2 = new Sound(_root);
sound_mech_explosion2.attachSound("mech_explosion2");
sound_mech_missile = new Sound(_root);
sound_mech_missile.attachSound("sound_missile");
create_level();
_root.attachMovie("mech_transportship_drop", "transport", 6000);
_root.back1.endzoneindicator._visible = false;
Frame 757
stop();
Frame 758
_root._quality = "HIGH";
Instance of Symbol 693 MovieClip in Frame 758
onClipEvent (enterFrame) {
_x = (_x + 10);
if (_x > 700) {
_x = -4000;
}
}
Frame 1332
_root.gotoAndPlay("game intro");
Frame 1333
stop();
Symbol 10 MovieClip [mech_transportship_comeget] Frame 54
_root.mech.removeMovieClip();
Symbol 10 MovieClip [mech_transportship_comeget] Frame 96
_root.gameDone();
this.removeMovieClip();
Symbol 11 MovieClip [mech_transportship_drop] Frame 85
this.removeMovieClip();
Symbol 54 MovieClip Frame 29
gotoAndPlay (8);
Symbol 55 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 2
stop();
Symbol 69 MovieClip Frame 2
rot = this._parent._parent._rotation;
rot = rot - 45;
px = 18 * Math.cos((Math.PI/180) * rot);
py = 18 * Math.sin((Math.PI/180) * rot);
_root.shoot2(this._parent._parent._parent._x + px, this._parent._parent._parent._y + py, this._parent._parent._rotation);
rot = rot + 90;
px = 18 * Math.cos((Math.PI/180) * rot);
py = 18 * Math.sin((Math.PI/180) * rot);
_root.shoot2(this._parent._parent._parent._x + px, this._parent._parent._parent._y + py, this._parent._parent._rotation);
_root.sound_shoot.start();
Instance of Symbol 67 MovieClip in Symbol 69 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop(random(3) + 1);
}
Instance of Symbol 67 MovieClip in Symbol 69 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop(random(3) + 1);
}
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
stop();
Symbol 72 MovieClip [mech_ennemy] Frame 1
function sendChecker() {
_root.checkSeen(_name, _x, _y, turret._rotation - targettingFactor);
}
function setSpeeds(rot) {
rot = rot - 90;
px = speed * Math.cos((Math.PI/180) * rot);
py = speed * Math.sin((Math.PI/180) * rot);
}
function setTurretRotation() {
turret._rotation = Math.atan2((_root.mech._y - turret._y) - _y, (_root.mech._x - turret._x) - _x) / (Math.PI/180);
turret._rotation = turret._rotation + targettingFactor;
}
function checkcollision(xside, yside, px, py, x, y) {
col_y = false;
col_x = false;
if (xside == "left") {
if (_root.back1.collision.hitTest(x - 20, y, true)) {
col_x = true;
} else if (_root.back1.collision.hitTest(x - 20, y - 15, true)) {
col_x = true;
} else if (_root.back1.collision.hitTest(x - 20, y + 15, true)) {
col_x = true;
}
}
if (xside == "right") {
if (_root.back1.collision.hitTest(x + 20, y, true)) {
col_x = true;
} else if (_root.back1.collision.hitTest(x + 20, y - 15, true)) {
col_x = true;
} else if (_root.back1.collision.hitTest(x + 20, y + 15, true)) {
col_x = true;
}
}
if (yside == "up") {
if (_root.back1.collision.hitTest(x + 15, y - 20, true)) {
col_y = true;
} else if (_root.back1.collision.hitTest(x, y - 20, true)) {
col_y = true;
} else if (_root.back1.collision.hitTest(x - 15, y - 20, true)) {
col_y = true;
}
}
if (yside == "down") {
if (_root.back1.collision.hitTest(x + 15, y + 20, true)) {
col_y = true;
} else if (_root.back1.collision.hitTest(x, y + 20, true)) {
col_y = true;
} else if (_root.back1.collision.hitTest(x - 15, y + 20, true)) {
col_y = true;
}
}
if (xside == "left") {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hitTest(x - 20, y, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_x = true;
} else if (_root.back1.breakables["breakable" + a].hitTest(x - 20, y - 15, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_x = true;
} else if (_root.back1.breakables["breakable" + a].hitTest(x - 20, y + 15, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_x = true;
}
}
a--;
}
}
if (xside == "right") {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hitTest(x + 20, y, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_x = true;
} else if (_root.back1.breakables["breakable" + a].hitTest(x + 20, y - 15, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_x = true;
} else if (_root.back1.breakables["breakable" + a].hitTest(x + 20, y + 15, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_x = true;
}
}
a--;
}
}
if (yside == "up") {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hitTest(x + 15, y - 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_y = true;
} else if (_root.back1.breakables["breakable" + a].hitTest(x, y - 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_y = true;
} else if (_root.back1.breakables["breakable" + a].hitTest(x - 15, y - 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_y = true;
}
}
a--;
}
}
if (yside == "down") {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hitTest(x + 15, y + 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_y = true;
} else if (_root.back1.breakables["breakable" + a].hitTest(x, y + 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_y = true;
} else if (_root.back1.breakables["breakable" + a].hitTest(x - 15, y + 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
col_y = true;
}
}
a--;
}
}
}
moving = false;
speed = 2;
hp = 50;
seeMech = false;
targettingFactorNumber = 0;
targettingFactor = 0;
_root.mech_hud.radar.attachMovie("radardot", "radardot" + _name, this.getDepth());
_root.mech_hud.radar.attachMovie("radarmask", "radarmask" + _name, this.getDepth() * 2);
_root.mech_hud.radar["radardot" + _name].setMask(_root.mech_hud.radar["radarmask" + _name]);
_root.mech_hud.radar["radardot" + _name]._x = (_x - _root.mech._x) / 10;
_root.mech_hud.radar["radardot" + _name]._y = (_y - _root.mech._y) / 10;
checktimer = 10;
Symbol 72 MovieClip [mech_ennemy] Frame 2
checktimer--;
targettingFactorNumber++;
targettingFactor = Math.sin(targettingFactorNumber / 7) * 18;
if (checktimer < 0) {
sendChecker();
checktimer = 10;
}
_root.mech_hud.radar["radardot" + _name]._x = (_x - _root.mech._x) / 10;
_root.mech_hud.radar["radardot" + _name]._y = (_y - _root.mech._y) / 10;
if (hp > 0) {
xdist = Math.round(_root.mech._x - _x);
ydist = Math.round(_root.mech._y - _y);
distance = Math.round(Math.sqrt((xdist * xdist) + (ydist * ydist)));
shootTimer--;
if (distance < 300) {
if (shootTimer <= 0) {
if (seeMech) {
turret.anims.gotoAndStop("shoot");
} else {
turret.anims.gotoAndStop("idle");
}
} else {
turret.anims.gotoAndStop("idle");
}
} else {
turret.anims.gotoAndStop("idle");
shootTimer = 30;
}
if ((distance < 300) and (distance > 50)) {
if ((_root.mech._x + 10) < _x) {
xmoving = true;
xside = "left";
} else if ((_root.mech._x - 10) > _x) {
xmoving = true;
xside = "right";
} else {
xside = "none";
xmoving = false;
}
if ((_root.mech._y + 10) < _y) {
ymoving = true;
yside = "up";
} else if ((_root.mech._y - 10) > _y) {
ymoving = true;
yside = "down";
} else {
yside = "none";
ymoving = false;
}
if ((xside == "left") and (yside == "none")) {
legs._rotation = 270;
setSpeeds(legs._rotation);
} else if ((xside == "right") and (yside == "none")) {
legs._rotation = 90;
setSpeeds(legs._rotation);
} else if ((xside == "none") and (yside == "up")) {
legs._rotation = 0;
setSpeeds(legs._rotation);
} else if ((xside == "none") and (yside == "down")) {
legs._rotation = 180;
setSpeeds(legs._rotation);
} else if ((xside == "left") and (yside == "up")) {
legs._rotation = 315;
setSpeeds(legs._rotation);
} else if ((xside == "left") and (yside == "down")) {
legs._rotation = 225;
setSpeeds(legs._rotation);
} else if ((xside == "right") and (yside == "down")) {
legs._rotation = 135;
setSpeeds(legs._rotation);
} else if ((xside == "right") and (yside == "up")) {
legs._rotation = 45;
setSpeeds(legs._rotation);
}
if (xmoving or ymoving) {
checkcollision(xside, yside, px, py, _x, _y);
if ((!col_y) or (!col_x)) {
if (!col_y) {
if (yside == "up") {
_y = (_y - speed);
} else if (yside == "down") {
_y = (_y + speed);
}
}
if (!col_x) {
if (xside == "left") {
_x = (_x - speed);
} else if (xside == "right") {
_x = (_x + speed);
}
}
legs.anims.gotoAndStop("walk");
if ((xside == "none") and col_y) {
legs.anims.gotoAndStop("idle");
}
if ((yside == "none") and col_x) {
legs.anims.gotoAndStop("idle");
}
} else {
legs.anims.gotoAndStop("idle");
}
}
setTurretRotation();
} else {
legs.anims.gotoAndStop("idle");
}
} else {
_root.mech_hud.radar["radardot" + _name].removeMovieClip();
_root.mech_hud.radar["radarmask" + _name].removeMovieClip();
_root.sound_mech_explosion.start();
_root.createParticle(this._x, this._y, "particle_explosion");
_root.createParticle(this._x, this._y, "particle_flash");
_root.createParticle(this._x + 10, this._y - 10, "particle_smoke");
_root.createParticle(this._x - 10, this._y - 10, "particle_smoke");
_root.createParticle(this._x + 10, this._y + 10, "particle_smoke");
_root.createParticle(this._x - 10, this._y + 10, "particle_smoke");
this.removeMovieClip();
}
if (hp < 25) {
((!smoketimer) ? ((smoketimer = 5)) : (smoketimer--));
if (smoketimer == 0) {
_root.createParticle(this._x, this._y, "particle_smoke");
smoketimer = 5;
}
}
Symbol 72 MovieClip [mech_ennemy] Frame 3
gotoAndPlay (2);
Symbol 80 MovieClip Frame 1
if (_root.mech_ammo >= 2) {
play();
} else {
stop();
}
Symbol 80 MovieClip Frame 2
rot = this._parent._parent._rotation;
rot = rot - 45;
px = 18 * Math.cos((Math.PI/180) * rot);
py = 18 * Math.sin((Math.PI/180) * rot);
_root.shoot(this._parent._parent._parent._x + px, this._parent._parent._parent._y + py, this._parent._parent._rotation);
rot = rot + 90;
px = 18 * Math.cos((Math.PI/180) * rot);
py = 18 * Math.sin((Math.PI/180) * rot);
_root.shoot(this._parent._parent._parent._x + px, this._parent._parent._parent._y + py, this._parent._parent._rotation);
_root.mech_ammo = _root.mech_ammo - 2;
_root.sound_shoot.start();
Instance of Symbol 67 MovieClip in Symbol 80 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop(random(3) + 1);
}
Instance of Symbol 67 MovieClip in Symbol 80 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop(random(3) + 1);
}
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 2
stop();
Symbol 83 MovieClip [mech] Frame 1
function setSpeeds(rot) {
rot = rot - 90;
px = speed * Math.cos((Math.PI/180) * rot);
py = speed * Math.sin((Math.PI/180) * rot);
}
function setTurretRotation() {
turret._rotation = Math.atan2((_root._ymouse - turret._y) - _y, (_root._xmouse - turret._x) - _x) / (Math.PI/180);
}
function checkcollision(xside, yside, px, py, x, y) {
if (xside == "left") {
if (_root.back1.collision.hitTest(x - 20, y, true)) {
return(true);
}
if (_root.back1.collision.hitTest(x - 20, y - 15, true)) {
return(true);
}
if (_root.back1.collision.hitTest(x - 20, y + 15, true)) {
return(true);
}
}
if (xside == "right") {
if (_root.back1.collision.hitTest(x + 20, y, true)) {
return(true);
}
if (_root.back1.collision.hitTest(x + 20, y - 15, true)) {
return(true);
}
if (_root.back1.collision.hitTest(x + 20, y + 15, true)) {
return(true);
}
}
if (yside == "up") {
if (_root.back1.collision.hitTest(x + 15, y - 20, true)) {
return(true);
}
if (_root.back1.collision.hitTest(x, y - 20, true)) {
return(true);
}
if (_root.back1.collision.hitTest(x - 15, y - 20, true)) {
return(true);
}
}
if (yside == "down") {
if (_root.back1.collision.hitTest(x + 15, y + 20, true)) {
return(true);
}
if (_root.back1.collision.hitTest(x, y + 20, true)) {
return(true);
}
if (_root.back1.collision.hitTest(x - 15, y + 20, true)) {
return(true);
}
}
if (xside == "left") {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hitTest(x - 20, y, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
if (_root.back1.breakables["breakable" + a].hitTest(x - 20, y - 15, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
if (_root.back1.breakables["breakable" + a].hitTest(x - 20, y + 15, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
}
a--;
}
}
if (xside == "right") {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hitTest(x + 20, y, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
if (_root.back1.breakables["breakable" + a].hitTest(x + 20, y - 15, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
if (_root.back1.breakables["breakable" + a].hitTest(x + 20, y + 15, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
}
a--;
}
}
if (yside == "up") {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hitTest(x + 15, y - 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
if (_root.back1.breakables["breakable" + a].hitTest(x, y - 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
if (_root.back1.breakables["breakable" + a].hitTest(x - 15, y - 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
}
a--;
}
}
if (yside == "down") {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hitTest(x + 15, y + 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
if (_root.back1.breakables["breakable" + a].hitTest(x, y + 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
if (_root.back1.breakables["breakable" + a].hitTest(x - 15, y + 20, true) and (_root.back1.breakables["breakable" + a].hp > 0)) {
return(true);
}
}
a--;
}
}
}
moving = false;
speed = 5;
busy = false;
movementArray = [""];
bombcount = 0;
toggleM = false;
_root.onMouseDown = function () {
if (_root.mech_ammo >= 2) {
turret.anims.gotoAndStop("shoot");
trace("shoot");
}
};
_root.onMouseUp = function () {
turret.anims.gotoAndStop("idle");
};
Symbol 83 MovieClip [mech] Frame 2
if (!busy) {
if (Key.isDown(32)) {
if (!toggleM) {
if (_root.mech_missiles >= 2) {
rot = turret._rotation;
rot = rot - 45;
px = 18 * Math.cos((Math.PI/180) * rot);
py = 18 * Math.sin((Math.PI/180) * rot);
_root.shoot_missile(_x + px, _y + py, turret._rotation);
rot = rot + 90;
px = 18 * Math.cos((Math.PI/180) * rot);
py = 18 * Math.sin((Math.PI/180) * rot);
_root.shoot_missile(_x + px, _y + py, turret._rotation);
_root.sound_mech_missile.start();
toggleM = true;
_root.mech_missiles = _root.mech_missiles - 2;
}
}
} else {
toggleM = false;
}
if (Key.isDown(65) and Key.isDown(87)) {
moving = true;
yside = "up";
xside = "left";
legs._rotation = 315;
setSpeeds(legs._rotation);
} else if (Key.isDown(65) and Key.isDown(83)) {
moving = true;
yside = "down";
xside = "left";
legs._rotation = 225;
setSpeeds(legs._rotation);
} else if (Key.isDown(68) and Key.isDown(83)) {
moving = true;
yside = "down";
xside = "right";
legs._rotation = 135;
setSpeeds(legs._rotation);
} else if (Key.isDown(68) and Key.isDown(87)) {
moving = true;
yside = "up";
xside = "right";
legs._rotation = 45;
setSpeeds(legs._rotation);
} else if (Key.isDown(65)) {
moving = true;
yside = "none";
xside = "left";
legs._rotation = 270;
setSpeeds(legs._rotation);
} else if (Key.isDown(68)) {
moving = true;
yside = "none";
xside = "right";
legs._rotation = 90;
setSpeeds(legs._rotation);
} else if (Key.isDown(87)) {
moving = true;
yside = "up";
xside = "none";
legs._rotation = 0;
setSpeeds(legs._rotation);
} else if (Key.isDown(83)) {
moving = true;
yside = "down";
xside = "none";
legs._rotation = 180;
setSpeeds(legs._rotation);
} else {
moving = false;
}
if (moving and (!checkcollision(xside, yside, px, py, _x, _y))) {
legs.anims.gotoAndStop("walk");
_root.moveWorld(px, py, _name);
} else {
legs.anims.gotoAndStop("idle");
}
_root.mech_bomb._rotation = _root.mech_bomb._rotation + 6;
setTurretRotation();
if (_root.powerPlantsRemaining == 0) {
_root.back1.endzoneindicator._visible = true;
if (_root.back1.endzone.hitTest(this)) {
_root.attachMovie("mech_transportship_comeget", "transport", 6000);
legs.anims.gotoAndStop("idle");
busy = true;
}
}
if (_root.mech_health <= 0) {
_root.gameOver();
}
}
Symbol 83 MovieClip [mech] Frame 3
gotoAndPlay (2);
Symbol 87 MovieClip Frame 3
_parent.gotoAndStop("idle");
Symbol 90 MovieClip Frame 12
stop();
Symbol 91 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 1
hp = 20;
stop();
Symbol 96 MovieClip Frame 3
_parent.gotoAndStop("idle");
Symbol 101 MovieClip Frame 1
bob = _parent._parent._name;
_root.createAmmoCrate(_root.back1.breakables[bob]._x, _root.back1.breakables[bob]._y);
Symbol 101 MovieClip Frame 5
stop();
Symbol 102 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 1
hp = 6;
stop();
Symbol 120 MovieClip Frame 3
_parent.gotoAndStop("idle");
Symbol 152 MovieClip Frame 1
_root.sound_mech_explosion.start();
_root.powerPlantsRemaining--;
if (_root.powerPlantsRemaining == 1) {
_root.mech_hud.hudMessage(("There is " + _root.powerPlantsRemaining) + " powerplant left");
} else if (_root.powerPlantsRemaining > 0) {
_root.mech_hud.hudMessage(("There is " + _root.powerPlantsRemaining) + " powerplants left");
} else {
_root.mech_hud.hudMessage("Mission accomplished, now get out of here.");
}
_root.createParticle(_parent._parent._x, _parent._parent._y, "particle_flash");
_root.createParticle(_parent._parent._x, _parent._parent._y, "particle_explosion");
Symbol 152 MovieClip Frame 31
stop();
Symbol 153 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 1
hp = 30;
stop();
Symbol 163 MovieClip Frame 1
_root.createEnnemy(_x, _y);
Symbol 163 MovieClip Frame 2
stop();
_visible = false;
Symbol 172 MovieClip [checker] Frame 1
touched = false;
rot = _rotation;
px = 10 * Math.cos((Math.PI/180) * rot);
py = 10 * Math.sin((Math.PI/180) * rot);
Symbol 172 MovieClip [checker] Frame 2
while (!touched) {
_x = (_x + px);
_y = (_y + py);
if (_root.back1.collision.hitTest(_x, _y, true)) {
touched = "yep";
_root.ennemy_container["" + parent].seeMech = false;
}
if ((((_x < (-_root._x)) or (_x > ((-_root._x) + Stage.width))) or (_y < (-_root._y))) or (_y > ((-_root._y) + Stage.height))) {
touched = "yep";
_root.ennemy_container["" + parent].seeMech = false;
}
if (_root.mech) {
if (_root.mech_health > 0) {
if (_root.mech.hitTest(_x, _y, false)) {
_root.ennemy_container["" + parent].seeMech = true;
touched = "yep";
}
}
}
}
this.removeMovieClip();
Symbol 172 MovieClip [checker] Frame 3
gotoAndPlay (2);
Symbol 180 MovieClip [bullet2] Frame 1
function moveBullet() {
while (!touched) {
_x = (_x + px);
_y = (_y + py);
if (_root.back1.collision.hitTest(_x, _y, true)) {
touched = true;
}
if ((((_x < (-_root._x)) or (_x > ((-_root._x) + Stage.width))) or (_y < (-_root._y))) or (_y > ((-_root._y) + Stage.height))) {
touched = "nothing";
}
if (_root.back1.breakables.hitTest(_x, _y, true)) {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hp > 0) {
if (_root.back1.breakables["breakable" + a].hitTest(_x, _y, false)) {
_root.back1.breakables["breakable" + a].hp--;
_root.back1.breakables["breakable" + a].anims.gotoAndStop("hit");
touched = "breakable";
}
}
if (_root.back1.breakables["breakable" + a].hp <= 0) {
if (_root.back1.breakables["breakable" + a].hitTest(_x, _y, false)) {
_root.back1.breakables["breakable" + a].anims.gotoAndStop("break");
_root.back1.breakables["breakable" + a]._name = "breaked" + a;
touched = "breakable";
}
}
}
a--;
}
}
if (_root.mech) {
if (_root.mech_health > 0) {
if (_root.mech.hitTest(_x, _y, false)) {
_root.mech_health = _root.mech_health - 2;
touched = "breakable";
}
}
}
}
}
touched = false;
rot = _rotation;
px = 10 * Math.cos((Math.PI/180) * rot);
py = 10 * Math.sin((Math.PI/180) * rot);
Symbol 180 MovieClip [bullet2] Frame 2
moveBullet();
if (touched == true) {
this.gotoAndPlay("touched");
} else if (touched == "nothing") {
this.gotoAndPlay("nothing");
} else if (touched == "breakable") {
this.gotoAndPlay("breakable");
}
Symbol 180 MovieClip [bullet2] Frame 3
gotoAndPlay (2);
Instance of Symbol 178 MovieClip in Symbol 180 MovieClip [bullet2] Frame 4
onClipEvent (load) {
gotoAndStop(random(5));
}
Symbol 180 MovieClip [bullet2] Frame 5
this.removeMovieClip();
Instance of Symbol 178 MovieClip in Symbol 180 MovieClip [bullet2] Frame 6
onClipEvent (load) {
gotoAndStop(random(5));
}
Symbol 180 MovieClip [bullet2] Frame 8
this.removeMovieClip();
Symbol 181 MovieClip [bullet] Frame 1
function moveBullet() {
while (!touched) {
_x = (_x + px);
_y = (_y + py);
if (_root.back1.collision.hitTest(_x, _y, true)) {
touched = true;
}
if ((((_x < (-_root._x)) or (_x > ((-_root._x) + Stage.width))) or (_y < (-_root._y))) or (_y > ((-_root._y) + Stage.height))) {
touched = "nothing";
}
if (_root.back1.breakables.hitTest(_x, _y, true)) {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hp > 0) {
if (_root.back1.breakables["breakable" + a].hitTest(_x, _y, false)) {
_root.back1.breakables["breakable" + a].hp--;
_root.back1.breakables["breakable" + a].anims.gotoAndStop("hit");
touched = "breakable";
}
}
if (_root.back1.breakables["breakable" + a].hp <= 0) {
if (_root.back1.breakables["breakable" + a].hitTest(_x, _y, false)) {
_root.back1.breakables["breakable" + a].anims.gotoAndStop("break");
_root.back1.breakables["breakable" + a]._name = "breaked" + a;
touched = "breakable";
}
}
}
a--;
}
}
if (_root.ennemy_container.hitTest(_x, _y, true)) {
a = _root.numberOfEnnemies;
while (a >= 0) {
if (_root.ennemy_container["ennemy" + (a + 300)]) {
if (_root.ennemy_container["ennemy" + (a + 300)].hp > 0) {
if (_root.ennemy_container["ennemy" + (a + 300)].hitTest(_x, _y, false)) {
_root.ennemy_container["ennemy" + (a + 300)].hp = _root.ennemy_container["ennemy" + (a + 300)].hp - 2;
touched = "breakable";
}
}
}
a--;
}
}
}
}
touched = false;
rot = _rotation;
px = 10 * Math.cos((Math.PI/180) * rot);
py = 10 * Math.sin((Math.PI/180) * rot);
Symbol 181 MovieClip [bullet] Frame 2
moveBullet();
if (touched == true) {
this.gotoAndPlay("touched");
} else if (touched == "nothing") {
this.gotoAndPlay("nothing");
} else if (touched == "breakable") {
this.gotoAndPlay("breakable");
}
Symbol 181 MovieClip [bullet] Frame 3
gotoAndPlay (2);
Instance of Symbol 178 MovieClip in Symbol 181 MovieClip [bullet] Frame 4
onClipEvent (load) {
gotoAndStop(random(5));
}
Symbol 181 MovieClip [bullet] Frame 5
this.removeMovieClip();
Instance of Symbol 178 MovieClip in Symbol 181 MovieClip [bullet] Frame 6
onClipEvent (load) {
gotoAndStop(random(5));
}
Symbol 181 MovieClip [bullet] Frame 8
this.removeMovieClip();
Instance of Symbol 196 MovieClip "fpsbar" in Symbol 199 MovieClip Frame 1
onClipEvent (load) {
height = _height;
}
onClipEvent (enterFrame) {
oldtemp = newtemp;
newtemp = getTimer();
fps = Math.round(1 / ((newtemp - oldtemp) / 1000));
_height = Math.round((fps / 25) * height);
_root.cfps = fps;
if (fps < _root.lfps) {
_root.lfps = fps;
}
if (Key.isDown(32)) {
_root.lfps = 25;
}
}
Instance of Symbol 196 MovieClip "fpsbar2" in Symbol 199 MovieClip Frame 1
onClipEvent (load) {
height = _height;
_height = 0;
}
onClipEvent (enterFrame) {
_height = Math.round((_root.lfps / 25) * height);
}
Symbol 212 Button
on (release) {
_root.musicplayersound.stop();
_root.musicplayersound = new Sound(this);
_root.musicplayersound.attachSound(_root[("song" + _root.song) + "_id"]);
_root.musicplayersound.start(0, 99);
}
Symbol 217 Button
on (release) {
_root.musicplayersound.stop();
}
Symbol 219 Button
on (press) {
if (_root.song == 3) {
_root.song = 1;
} else {
_root.song++;
}
}
on (release) {
_root.musicplayersound.stop();
_root.musicplayersound = new Sound(this);
_root.musicplayersound.attachSound(_root[("song" + _root.song) + "_id"]);
_root.musicplayersound.start(0, 99);
}
Symbol 220 MovieClip Frame 1
_root.song1_titre = "Battlefield";
_root.song2_titre = "Halo main theme";
_root.song3_titre = "In a land of War and Hatred";
_root.song1_id = "1";
_root.song2_id = "2";
_root.song3_id = "3";
_root.musicplayersound = new Sound(this);
_root.musicplayersound.attachSound(_root[("song" + _root.song) + "_id"]);
_root.musicplayersound.start(0, 99);
_root.song = 1;
Symbol 220 MovieClip Frame 2
display_title = _root[("song" + _root.song) + "_titre"];
Symbol 220 MovieClip Frame 3
gotoAndPlay (2);
Symbol 223 MovieClip [mech_hud] Frame 1
function hudMessage(msg) {
messageBox.message.text = msg;
messageBox._visible = true;
messageBoxInterval = setInterval(closeMessage, 3000);
}
function closeMessage() {
messageBox.message.text = "";
messageBox._visible = false;
clearInterval(messageBoxInterval);
}
messageBox._visible = false;
Instance of Symbol 222 MovieClip in Symbol 223 MovieClip [mech_hud] Frame 1
onClipEvent (load) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Symbol 223 MovieClip [mech_hud] Frame 2
hpbar._yscale = (_root.mech_health / 500) * 100;
Symbol 223 MovieClip [mech_hud] Frame 3
gotoAndPlay (2);
Symbol 230 MovieClip [particle_flash] Frame 1
moveFactor = 0;
growFactor = 2;
alphaFactor = 50;
_rotation = random(360);
Symbol 230 MovieClip [particle_flash] Frame 2
_alpha = (_alpha - alphaFactor);
if (_alpha <= 0) {
this.removeMovieClip();
}
Symbol 230 MovieClip [particle_flash] Frame 3
gotoAndPlay (2);
Symbol 233 MovieClip [particle_explosion] Frame 1
moveFactor = 0;
growFactor = 2;
alphaFactor = 15;
Symbol 233 MovieClip [particle_explosion] Frame 2
_height = (_height + growFactor);
_width = (_width + growFactor);
_alpha = (_alpha - alphaFactor);
if (_alpha <= 0) {
this.removeMovieClip();
}
Symbol 233 MovieClip [particle_explosion] Frame 3
gotoAndPlay (2);
Symbol 236 MovieClip [particle_missilesmoke] Frame 1
growFactor = 2;
alphaFactor = 5;
rotationFactor = random(30) - random(60);
Symbol 236 MovieClip [particle_missilesmoke] Frame 2
_height = (_height + growFactor);
_width = (_width + growFactor);
_alpha = (_alpha - alphaFactor);
_rotation = (_rotation + rotationFactor);
if (_alpha <= 0) {
this.removeMovieClip();
}
Symbol 236 MovieClip [particle_missilesmoke] Frame 3
gotoAndPlay (2);
Symbol 238 MovieClip [particle_smoke] Frame 1
moveFactor = 2;
growFactor = 3;
alphaFactor = 3;
rotationFactor = random(15) - random(30);
Symbol 238 MovieClip [particle_smoke] Frame 2
_height = (_height + growFactor);
_width = (_width + growFactor);
_alpha = (_alpha - alphaFactor);
_x = (_x + growFactor);
_rotation = (_rotation + rotationFactor);
if (_alpha <= 0) {
this.removeMovieClip();
}
Symbol 238 MovieClip [particle_smoke] Frame 3
gotoAndPlay (2);
Symbol 241 MovieClip [mech_ammocrate] Frame 1
trace("ammocrate");
Symbol 241 MovieClip [mech_ammocrate] Frame 2
_rotation = (_rotation + 8);
if (_root.mech.hitTest(this)) {
_root.mech_ammo = _root.mech_ammo + 100;
this.removeMovieClip();
}
Symbol 241 MovieClip [mech_ammocrate] Frame 3
gotoAndPlay (2);
Symbol 245 MovieClip [mech_missile] Frame 1
touched = false;
rot = _rotation;
px = 10 * Math.cos((Math.PI/180) * rot);
py = 10 * Math.sin((Math.PI/180) * rot);
Symbol 245 MovieClip [mech_missile] Frame 2
if (!touched) {
_x = (_x + px);
_y = (_y + py);
if (_root.back1.collision.hitTest(_x, _y, true)) {
touched = true;
}
if ((((_x < (-_root._x)) or (_x > ((-_root._x) + Stage.width))) or (_y < (-_root._y))) or (_y > ((-_root._y) + Stage.height))) {
touched = "nothing";
}
if (_root.back1.breakables.hitTest(_x, _y, true)) {
a = _root.numberOfBreakables;
while (a >= 0) {
if (_root.back1.breakables["breakable" + a]) {
if (_root.back1.breakables["breakable" + a].hp > 0) {
if (_root.back1.breakables["breakable" + a].hitTest(_x, _y, false)) {
_root.back1.breakables["breakable" + a].hp = _root.back1.breakables["breakable" + a].hp - 10;
_root.back1.breakables["breakable" + a].anims.gotoAndStop("hit");
touched = "breakable";
}
}
if (_root.back1.breakables["breakable" + a].hp <= 0) {
if (_root.back1.breakables["breakable" + a].hitTest(_x, _y, false)) {
_root.back1.breakables["breakable" + a].anims.gotoAndStop("break");
_root.back1.breakables["breakable" + a]._name = "breaked" + a;
touched = "breakable";
}
}
}
a--;
}
}
if (_root.ennemy_container.hitTest(_x, _y, true)) {
a = _root.numberOfEnnemies;
while (a >= 0) {
if (_root.ennemy_container["ennemy" + (a + 300)]) {
if (_root.ennemy_container["ennemy" + (a + 300)].hp > 0) {
if (_root.ennemy_container["ennemy" + (a + 300)].hitTest(_x, _y, false)) {
_root.ennemy_container["ennemy" + (a + 300)].hp = _root.ennemy_container["ennemy" + (a + 300)].hp - 20;
touched = "breakable";
}
}
}
a--;
}
}
}
((!mt) ? ((mt = 1)) : (mt--));
((mt == 0) ? ((mt = 1)) : null);
if (mt == 1) {
_root.createParticle(_x, _y, "particle_missilesmoke");
}
if (touched == true) {
this.gotoAndPlay("touched");
} else if (touched == "nothing") {
this.gotoAndPlay("nothing");
} else if (touched == "breakable") {
this.gotoAndPlay("breakable");
}
Symbol 245 MovieClip [mech_missile] Frame 3
gotoAndPlay (2);
Symbol 245 MovieClip [mech_missile] Frame 4
_root.sound_mech_explosion2.setVolume(75);
_root.sound_mech_explosion2.start();
Instance of Symbol 178 MovieClip in Symbol 245 MovieClip [mech_missile] Frame 4
onClipEvent (load) {
gotoAndStop(random(5));
}
Symbol 245 MovieClip [mech_missile] Frame 5
this.removeMovieClip();
Symbol 245 MovieClip [mech_missile] Frame 6
_root.sound_mech_explosion2.setVolume(75);
_root.sound_mech_explosion2.start();
Instance of Symbol 178 MovieClip in Symbol 245 MovieClip [mech_missile] Frame 6
onClipEvent (load) {
gotoAndStop(random(5));
}
Symbol 245 MovieClip [mech_missile] Frame 8
this.removeMovieClip();
Symbol 249 MovieClip [cursor] Frame 1
grid = 25;
lr = 1;
hr = 1;
_root.build_id = 1;
_root.onMouseDown = function () {
if (_root.build_enabled and (_root._ymouse < 350)) {
id = _root.build_id;
if (((buildable == 1) and (_root.money >= _root.buildings_a[id][0])) and (_root.power >= _root.buildings_a[id][1])) {
if ((_root.online_turrets == _root.available_turrets) and (_root.buildings_a[id][2] == "turret")) {
_root.alert = "No more turrets available";
alerttimer = 100;
_root.build_enabled = false;
} else {
_root.money = _root.money - _root.buildings_a[id][0];
_root.power = _root.power - _root.buildings_a[id][1];
_root.building(_x, _y, lr, hr, _root.build_id);
_root.build_enabled = false;
}
} else if (buildable == 0) {
_root.alert = "You cannot build here";
alerttimer = 100;
} else if (buildable == 1) {
_root.alert = "You need more ressources";
alerttimer = 100;
_root.build_enabled = false;
}
}
};
this.swapDepths(300000);
Symbol 249 MovieClip [cursor] Frame 2
((_root.build_enabled == true) ? ((_root.hud.cancel._visible = true)) : ((_root.hud.cancel._visible = false)));
lr = _root.buildings_a[_root.build_id][4];
hr = _root.buildings_a[_root.build_id][5];
_width = (lr * 25);
_height = (hr * 25);
while (((((_root._xmouse - _x) > grid) or ((_root._xmouse - _x) < 0)) or ((_root._ymouse - _y) > grid)) or ((_root._ymouse - _y) < 0)) {
if ((_root._xmouse - _x) > grid) {
_x = (_x + grid);
} else if ((_root._xmouse - _x) < 0) {
_x = (_x - grid);
}
if ((_root._ymouse - _y) > grid) {
_y = (_y + grid);
} else if ((_root._ymouse - _y) < 0) {
_y = (_y - grid);
}
}
xa = _x / 25;
ya = _y / 25;
buildable = 1;
var ycount = (hr - 1);
while (ycount >= 0) {
var xcount = (lr - 1);
while (xcount >= 0) {
xvar = xa + xcount;
yvar = ya + ycount;
checkit = _root["level" + _root.level][yvar][xvar];
((checkit == 0) ? ((buildable = 0)) : null);
xcount--;
}
ycount--;
}
this.anim.gotoAndStop(buildable + 1);
alerttimer--;
((alerttimer <= 0) ? ((_root.alert = "")) : null);
(_root.build_enabled ? ((this._visible = true)) : ((this._visible = false)));
Symbol 249 MovieClip [cursor] Frame 3
this.gotoAndPlay(2);
Symbol 258 MovieClip Frame 1
stop();
Instance of Symbol 255 MovieClip "head_type" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.headanim);
}
onClipEvent (enterFrame) {
gotoAndStop(_parent._parent.headanim);
}
Symbol 262 MovieClip [turret] Frame 1
selected._visible = false;
hpmax = hp;
damage_bonus = 0;
Symbol 262 MovieClip [turret] Frame 2
((timer == 0) ? ((timer = 5)) : (timer--));
((!record) ? ((target = "none")) : null);
((!timer) ? ((timer = 5)) : null);
((!shoot_timer) ? ((shoot_timer = 5)) : null);
((!shoot_timer2) ? ((shoot_timer2 = 1)) : null);
if (target == "none") {
head._rotation = head._rotation + 2;
} else {
head._rotation = Math.atan2((_root["ennemy" + target]._y - head._y) - _y, (_root["ennemy" + target]._x - head._x) - _x) / (Math.PI/180);
shoot_timer--;
if (shoot_timer == 0) {
shoot_timer = 5;
head.gotoAndPlay("shoot");
shoot_timer2++;
_root["ennemy" + target].hp = _root["ennemy" + target].hp - (damage + damage_bonus);
if (shoot_timer2 == 4) {
shoot_timer2 = 1;
}
}
}
if (hp <= 0) {
_root.make_explosion_building(_x, _y, lr, hr);
_root.remove_building(_x, _y, lr, hr, id, _name);
}
if (timer == 1) {
record = 0;
var ec = 700;
while (ec >= 600) {
if (_root["ennemy" + ec]) {
a = _x - _root["ennemy" + ec]._x;
b = _y - _root["ennemy" + ec]._y;
distance = Math.sqrt((a * a) + (b * b));
distance = Math.round(distance);
if (!record) {
record = 1000;
}
if (distance < record) {
tmp_name = ec;
record = distance;
}
}
ec--;
}
if (record <= 150) {
target = tmp_name;
} else {
target = "none";
}
}
this.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.selected_building[0] = "turret";
_root.selected_building[1] = _name;
_root.selected_building[2] = damage + damage_bonus;
_root.selected_building[3] = hp;
_root.selected_building[4] = "turret";
}
};
if (_root.selected_building[1] == _name) {
_root.selected_building[2] = damage + damage_bonus;
_root.selected_building[3] = hp;
selected._visible = true;
} else {
selected._visible = false;
}
selected.hpbar._xscale = (hp / hpmax) * 100;
headanim = damage + damage_bonus;
((headanim > 10) ? ((headanim = 10)) : null);
Symbol 262 MovieClip [turret] Frame 3
gotoAndPlay (2);
Symbol 267 MovieClip [Nuclear silo] Frame 1
selected._visible = false;
hpmax = hp;
Symbol 267 MovieClip [Nuclear silo] Frame 2
this.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.selected_building[0] = "turret";
_root.selected_building[1] = _name;
_root.selected_building[2] = damage;
_root.selected_building[3] = hp;
_root.selected_building[4] = "Silo";
}
};
if (hp <= 0) {
_root.make_explosion_building(_x, _y, lr, hr);
_root.remove_building(_x, _y, lr, hr, id, _name);
}
if (_root.selected_building[1] == _name) {
_root.selected_building[2] = damage;
_root.selected_building[3] = hp;
selected._visible = true;
} else {
selected._visible = false;
}
selected.hpbar._xscale = (hp / hpmax) * 100;
Symbol 267 MovieClip [Nuclear silo] Frame 3
gotoAndPlay (2);
Symbol 272 MovieClip [factory] Frame 1
selected._visible = false;
hpmax = hp;
_root.nuclear_build_enabled = 1;
Symbol 272 MovieClip [factory] Frame 2
this.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.selected_building[0] = "turret";
_root.selected_building[1] = _name;
_root.selected_building[2] = damage;
_root.selected_building[3] = hp;
_root.selected_building[4] = "factory";
}
};
if (hp <= 0) {
_root.make_explosion_building(_x, _y, lr, hr);
_root.remove_building(_x, _y, lr, hr, id, _name);
}
if (_root.selected_building[1] == _name) {
_root.selected_building[2] = damage;
_root.selected_building[3] = hp;
selected._visible = true;
} else {
selected._visible = false;
}
selected.hpbar._xscale = (hp / hpmax) * 100;
Symbol 272 MovieClip [factory] Frame 3
gotoAndPlay (2);
Symbol 364 Button
on (release) {
_root.build_id = 1;
_root.build_enabled = true;
}
on (rollOver) {
id = 1;
display.display_money = _root.buildings_a[id][0];
display.display_power = _root.buildings_a[id][1];
display.display_name = "build a " + _root.buildings_a[id][2];
display._visible = true;
}
on (rollOut) {
display.display_money = "";
display.display_power = "";
display.display_name = "";
display._visible = false;
}
Symbol 366 Button
on (release) {
_root.build_id = 2;
_root.build_enabled = true;
}
on (rollOver) {
id = 2;
display.display_money = _root.buildings_a[id][0];
display.display_power = _root.buildings_a[id][1];
display.display_name = "build a " + _root.buildings_a[id][2];
display._visible = true;
}
on (rollOut) {
display.display_money = "";
display.display_power = "";
display.display_name = "";
display._visible = false;
}
Symbol 368 Button
on (release) {
_root.build_id = 3;
_root.build_enabled = true;
}
on (rollOver) {
id = 3;
display.display_money = _root.buildings_a[id][0];
display.display_power = _root.buildings_a[id][1];
display.display_name = "build a " + _root.buildings_a[id][2];
display._visible = true;
}
on (rollOut) {
display.display_money = "";
display.display_power = "";
display.display_name = "";
display._visible = false;
}
Symbol 374 Button
on (release) {
_root.build_enabled = false;
}
Symbol 377 Button
on (release) {
_root.build_id = 4;
_root.build_enabled = true;
}
on (rollOver) {
id = 4;
display.display_money = _root.buildings_a[id][0];
display.display_power = _root.buildings_a[id][1];
display.display_name = "build a " + _root.buildings_a[id][2];
display._visible = true;
}
on (rollOut) {
display.display_money = "";
display.display_power = "";
display.display_name = "";
display._visible = false;
}
Symbol 381 Button
on (rollOver) {
id = 1;
display.display_money = 300;
display.display_power = 0;
display.display_name = "Enable turret upgrades";
display._visible = true;
}
on (rollOut) {
display.display_money = "";
display.display_power = "";
display.display_name = "";
display._visible = false;
}
on (press) {
if (_root.money >= 300) {
_root.money = _root.money - 300;
_root.upgrade_turret_enabled = 1;
}
}
Symbol 397 Button
on (rollOver) {
id = 1;
display.display_money = 60;
display.display_power = 7;
display.display_name = "upgrade turret damage";
display._visible = true;
}
on (rollOut) {
display.display_money = "";
display.display_power = "";
display.display_name = "";
display._visible = false;
}
on (press) {
if ((_root.money >= 60) and (_root.power >= 7)) {
_root.money = _root.money - 60;
_root.power = _root.power - 7;
_root[_root.selected_building[1]].damage_bonus = _root[_root.selected_building[1]].damage_bonus + 1;
trace(_root.selected_building[1]);
}
}
Symbol 411 Button
on (press) {
life = 0;
}
Symbol 429 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 35
_root.accomplished_end();
Symbol 429 MovieClip Frame 36
stop();
Symbol 430 MovieClip [hud] Frame 1
function setlife() {
if (_root.life < 1000) {
_root.life++;
}
lifebar._xscale = _root.life / 10;
}
timer = 250 / _root.power_rate;
((timer == Infinity) ? ((timer = 0)) : null);
timerb = timer;
upgr_dam._visible = false;
upgr_enable._visible = false;
build_silo._visible = false;
build_factory._visible = false;
_root.nuclear_timer = 0;
_root.nuclear_started = false;
Instance of Symbol 335 MovieClip "fpsbar" in Symbol 430 MovieClip [hud] Frame 1
onClipEvent (load) {
height = _height;
}
onClipEvent (enterFrame) {
oldtemp = newtemp;
newtemp = getTimer();
fps = Math.round(1 / ((newtemp - oldtemp) / 1000));
_height = Math.round((fps / 25) * height);
_root.cfps = fps;
if (fps < _root.lfps) {
_root.lfps = fps;
}
if (Key.isDown(32)) {
_root.lfps = 25;
}
}
Instance of Symbol 335 MovieClip "fpsbar2" in Symbol 430 MovieClip [hud] Frame 1
onClipEvent (load) {
height = _height;
_height = 0;
}
onClipEvent (enterFrame) {
_height = Math.round((_root.lfps / 25) * height);
}
Instance of Symbol 387 MovieClip "display" in Symbol 430 MovieClip [hud] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 413 MovieClip "comm" in Symbol 430 MovieClip [hud] Frame 1
onClipEvent (enterFrame) {
if ((life < 0) or (!life)) {
this.gotoAndStop("down");
} else {
this.gotoAndStop("up");
life--;
}
}
Instance of Symbol 421 MovieClip in Symbol 430 MovieClip [hud] Frame 1
onClipEvent (load) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Symbol 430 MovieClip [hud] Frame 2
minidisplay_hp = _root.selected_building[3];
minidisplay_damage = _root.selected_building[2];
hud_buildingpicture.gotoAndStop(_root.selected_building[4]);
setlife();
if (_root.power_rate > 0) {
timer--;
if (timer <= 0) {
_root.power++;
timer = 250 / _root.power_rate;
}
}
if (_root.life <= 0) {
_root.gameOver();
}
_root.power_display = (_root.power + "/+") + _root.power_rate;
_root.money_display = _root.money;
if (_root.upgrade_turret_enabled == 0) {
if (_root.selected_building[4] == "factory") {
upgr_enable._visible = true;
} else {
upgr_enable._visible = false;
}
} else {
upgr_enable._visible = false;
}
if (_root.upgrade_turret_enabled == 1) {
if (_root.selected_building[4] == "turret") {
upgr_dam._visible = true;
} else {
upgr_dam._visible = false;
}
} else {
upgr_dam._visible = false;
}
if (_root.can_nuclear == 1) {
if (_root.nuclear_build_enabled == 1) {
build_silo._visible = true;
} else {
build_silo._visible = false;
}
}
if (_root.can_factory == 1) {
build_factory._visible = true;
} else {
build_factory._visible = false;
}
if (_root.nuclear_timer == 0) {
nuclear_show._visible = false;
} else {
nuclear_show._visible = true;
}
if (_root.nuclear_started == true) {
_root.nuclear_timer++;
trace(_root.nuclear_timer);
}
_root.turret_display = (_root.online_turrets + " / ") + _root.available_turrets;
Symbol 430 MovieClip [hud] Frame 3
gotoAndPlay (2);
Symbol 432 MovieClip [powerplant] Frame 1
selected._visible = false;
hpmax = hp;
Symbol 432 MovieClip [powerplant] Frame 2
this.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.selected_building[0] = "turret";
_root.selected_building[1] = _name;
_root.selected_building[2] = damage;
_root.selected_building[3] = hp;
_root.selected_building[4] = "Powerplant";
}
};
if (hp <= 0) {
_root.make_explosion_building(_x, _y, lr, hr);
_root.remove_building(_x, _y, lr, hr, id, _name);
}
if (_root.selected_building[1] == _name) {
_root.selected_building[2] = damage;
_root.selected_building[3] = hp;
selected._visible = true;
} else {
selected._visible = false;
}
selected.hpbar._xscale = (hp / hpmax) * 100;
Symbol 432 MovieClip [powerplant] Frame 3
gotoAndPlay (2);
Symbol 443 MovieClip Frame 1
stop();
Symbol 451 MovieClip Frame 1
stop();
Symbol 461 MovieClip Frame 1
stop();
Symbol 471 MovieClip Frame 1
stop();
Instance of Symbol 436 MovieClip in Symbol 473 MovieClip [ennemy] Frame 1
onClipEvent (load) {
speed = 2;
_parent.hp = 50;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 300;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 10;
_root.make_explosion_car(_parent._x, _parent._y, 2, 2);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 50) * 100;
}
Instance of Symbol 438 MovieClip in Symbol 473 MovieClip [ennemy] Frame 2
onClipEvent (load) {
speed = 1.2;
_parent.hp = 120;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 400;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 20;
_root.make_explosion_car(_parent._x, _parent._y, 2.3, 2.3);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 120) * 100;
}
Instance of Symbol 440 MovieClip in Symbol 473 MovieClip [ennemy] Frame 3
onClipEvent (load) {
speed = 4;
_parent.hp = 50;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 300;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 10;
_root.make_explosion_car(_parent._x, _parent._y, 1.4, 1.4);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 50) * 100;
}
Instance of Symbol 444 MovieClip in Symbol 473 MovieClip [ennemy] Frame 4
onClipEvent (load) {
speed = 4;
_parent.hp = 50;
damage = 1;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 400;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.make_explosion_car(_parent._x, _parent._y, 2.4, 2.4);
_root.money = _root.money + 30;
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 50) * 100;
((timer == 0) ? ((timer = 3)) : (timer--));
((!record) ? ((target = "none")) : null);
((!timer) ? ((timer = 3)) : null);
((!shoot_timer) ? ((shoot_timer = 5)) : null);
if (target == "none") {
head._rotation = head._rotation + 2;
} else {
head._rotation = Math.atan2(_root["building" + target]._y - _parent._y, _root["building" + target]._x - _parent._x) / (Math.PI/180);
shoot_timer--;
if (shoot_timer == 0) {
shoot_timer = 5;
head.gotoAndPlay("shoot");
_root["building" + target].hp = _root["building" + target].hp - damage;
}
}
if (timer == 1) {
record = 0;
var ec = 600;
while (ec >= 350) {
if (_root["building" + ec]) {
a = _parent._x - _root["building" + ec]._x;
b = _parent._y - _root["building" + ec]._y;
distance = Math.sqrt((a * a) + (b * b));
distance = Math.round(distance);
if (!record) {
record = 1000;
}
if (distance < record) {
tmp_name = ec;
record = distance;
}
}
ec--;
}
if (record <= 150) {
target = tmp_name;
} else {
target = "none";
}
}
}
Instance of Symbol 452 MovieClip in Symbol 473 MovieClip [ennemy] Frame 5
onClipEvent (load) {
speed = 0.5;
_parent.hp = 200;
damage = 10;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 700;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 50;
_root.make_explosion_car(_parent._x, _parent._y, 3, 3);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 200) * 100;
((timer == 0) ? ((timer = 5)) : (timer--));
((!record) ? ((target = "none")) : null);
((!timer) ? ((timer = 5)) : null);
((!shoot_timer) ? ((shoot_timer = 30)) : null);
if (target == "none") {
head._rotation = head._rotation + 2;
} else {
head._rotation = Math.atan2(_root["building" + target]._y - _parent._y, _root["building" + target]._x - _parent._x) / (Math.PI/180);
shoot_timer--;
if (shoot_timer == 0) {
shoot_timer = 60;
head.gotoAndPlay("shoot");
_root["building" + target].hp = _root["building" + target].hp - damage;
}
}
if (timer == 1) {
record = 0;
var ec = 600;
while (ec >= 350) {
if (_root["building" + ec]) {
a = _parent._x - _root["building" + ec]._x;
b = _parent._y - _root["building" + ec]._y;
distance = Math.sqrt((a * a) + (b * b));
distance = Math.round(distance);
if (!record) {
record = 1000;
}
if (distance < record) {
tmp_name = ec;
record = distance;
}
}
ec--;
}
if (record <= 150) {
target = tmp_name;
} else {
target = "none";
}
}
}
Instance of Symbol 462 MovieClip in Symbol 473 MovieClip [ennemy] Frame 6
onClipEvent (load) {
speed = 2;
_parent.hp = 50;
damage = 2;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 300;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 30;
_root.make_explosion_car(_parent._x, _parent._y, 1.2, 1.2);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 50) * 100;
((timer == 0) ? ((timer = 5)) : (timer--));
((!record) ? ((target = "none")) : null);
((!timer) ? ((timer = 5)) : null);
((!shoot_timer) ? ((shoot_timer = 5)) : null);
if (target == "none") {
head._rotation = head._rotation + 2;
} else {
head._rotation = Math.atan2(_root["building" + target]._y - _parent._y, _root["building" + target]._x - _parent._x) / (Math.PI/180);
shoot_timer--;
if (shoot_timer == 0) {
shoot_timer = 5;
head.gotoAndPlay("shoot");
_root["building" + target].hp = _root["building" + target].hp - damage;
}
}
if (timer == 1) {
record = 0;
var ec = 600;
while (ec >= 350) {
if (_root["building" + ec]) {
a = _parent._x - _root["building" + ec]._x;
b = _parent._y - _root["building" + ec]._y;
distance = Math.sqrt((a * a) + (b * b));
distance = Math.round(distance);
if (!record) {
record = 1000;
}
if (distance < record) {
tmp_name = ec;
record = distance;
}
}
ec--;
}
if (record <= 150) {
target = tmp_name;
} else {
target = "none";
}
}
}
Instance of Symbol 464 MovieClip in Symbol 473 MovieClip [ennemy] Frame 7
onClipEvent (load) {
speed = 3;
_parent.hp = 50;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 300;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 40;
_root.make_explosion_car(_parent._x, _parent._y, 1.4, 1.4);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 50) * 100;
}
Instance of Symbol 466 MovieClip in Symbol 473 MovieClip [ennemy] Frame 8
onClipEvent (load) {
speed = 0.4;
_parent.hp = 500;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -100) {
_root.life = _root.life - 600;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 300;
_root.make_explosion_car(_parent._x, _parent._y, 2.5, 2.5);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 500) * 100;
}
Instance of Symbol 468 MovieClip in Symbol 473 MovieClip [ennemy] Frame 9
onClipEvent (load) {
speed = 3;
_parent.hp = 90;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 400;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 70;
_root.make_explosion_car(_parent._x, _parent._y, 1.4, 1.4);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 90) * 100;
}
Instance of Symbol 472 MovieClip in Symbol 473 MovieClip [ennemy] Frame 10
onClipEvent (load) {
speed = 5;
_parent.hp = 25;
damage = 2;
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x <= -50) {
_root.life = _root.life - 300;
removeMovieClip(_parent);
} else if (_parent.hp <= 0) {
_root.money = _root.money + 50;
_root.make_explosion_car(_parent._x, _parent._y, 1, 1);
removeMovieClip(_parent);
}
hpbar._xscale = (_parent.hp / 25) * 100;
((timer == 0) ? ((timer = 5)) : (timer--));
((!record) ? ((target = "none")) : null);
((!timer) ? ((timer = 5)) : null);
((!shoot_timer) ? ((shoot_timer = 5)) : null);
if (target == "none") {
head._rotation = head._rotation + 2;
} else {
head._rotation = Math.atan2(_root["building" + target]._y - _parent._y, _root["building" + target]._x - _parent._x) / (Math.PI/180);
shoot_timer--;
if (shoot_timer == 0) {
shoot_timer = 5;
head.gotoAndPlay("shoot");
_root["building" + target].hp = _root["building" + target].hp - damage;
}
}
if (timer == 1) {
record = 0;
var ec = 600;
while (ec >= 350) {
if (_root["building" + ec]) {
a = _parent._x - _root["building" + ec]._x;
b = _parent._y - _root["building" + ec]._y;
distance = Math.sqrt((a * a) + (b * b));
distance = Math.round(distance);
if (!record) {
record = 1000;
}
if (distance < record) {
tmp_name = ec;
record = distance;
}
}
ec--;
}
if (record <= 150) {
target = tmp_name;
} else {
target = "none";
}
}
}
Symbol 477 MovieClip [creator3] Frame 1
lvl_timer = 0;
decalx = 3;
decal = 25;
Symbol 477 MovieClip [creator3] Frame 2
lvl_timer++;
if (lvl_timer == 1) {
_root.comm_message("Be sure to watch the both sides, up and down.", 50, 0);
}
if ((lvl_timer >= 200) and (lvl_timer < 1000)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 25 + random(60), 7)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 25 + random(60), 7)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 25 + random(60), 7)) : null);
decal = 60;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 1200) {
_root.make_ennemy(800, 250, 8);
_root.make_ennemy(600, 230, 8);
}
if ((lvl_timer >= 2500) and (lvl_timer < 3000)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 25 + random(60), 7)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 25 + random(60), 7)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 25 + random(60), 7)) : null);
decal = 40;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if ((lvl_timer >= 3000) and (lvl_timer < 3500)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 220 + random(60), 6)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 220 + random(60), 7)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 220 + random(60), 7)) : null);
decal = 40;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if ((lvl_timer >= 3500) and (lvl_timer < 4500)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 25 + random(60), 6)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 220 + random(60), 7)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 220 + random(60), 7)) : null);
decal = 30;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 4500) {
_root.make_ennemy(800, 220 + random(60), 8);
_root.make_ennemy(600, 220 + random(60), 8);
_root.make_ennemy(800, 25 + random(60), 8);
_root.make_ennemy(600, 25 + random(60), 8);
}
if (lvl_timer == 6100) {
_root.comm_message("Scouts are reporting that some eavy armored ships are coming our way. We must stop them at all cost.", 140, 0);
}
if ((lvl_timer >= 6200) and (lvl_timer < 7000)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 25 + random(60), 9)) : null);
((decalx == 3) ? (_root.make_ennemy(600, 220 + random(60), 9)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 25 + random(60), 9)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 220 + random(60), 9)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 25 + random(60), 9)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 220 + random(60), 9)) : null);
decal = 60;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 7300) {
_root.accomplished_start();
}
Symbol 477 MovieClip [creator3] Frame 3
gotoAndPlay (2);
Symbol 479 MovieClip [creator2] Frame 1
lvl_timer = 0;
decalx = 3;
decal = 25;
Symbol 479 MovieClip [creator2] Frame 2
lvl_timer++;
if (lvl_timer == 1) {
_root.Music1.start(0, 99);
}
if (lvl_timer == 260) {
_root.comm_message("INCOMMING!!!", 50, 0);
}
if ((lvl_timer >= 260) and (lvl_timer < 1299)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 10)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 10)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 10)) : null);
decal = 30;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if ((lvl_timer >= 1300) and (lvl_timer < 2299)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 10)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 4)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 10)) : null);
decal = 30;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if ((lvl_timer >= 2300) and (lvl_timer < 3000)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 4)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 10)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 4)) : null);
decal = 30;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if ((lvl_timer >= 3001) and (lvl_timer < 3599)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 5)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 10)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 10)) : null);
decal = 60;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 3600) {
_root.comm_message("If it is not already done, you should consider upgrading your turrets.", 120, 0);
}
if ((lvl_timer >= 3680) and (lvl_timer < 4600)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 5)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 5)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 5)) : null);
decal = 80;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 5000) {
_root.accomplished_start();
}
Symbol 479 MovieClip [creator2] Frame 3
gotoAndPlay (2);
Symbol 481 MovieClip [creator1] Frame 1
lvl_timer = 0;
decalx = 3;
decal = 25;
Symbol 481 MovieClip [creator1] Frame 2
lvl_timer++;
if (lvl_timer == 1) {
_root.Music1.start(0, 99);
_root.comm_message("ok, hurry up to set some defence, you ain't got much time to prepare yourself: use the buttons on the down right corner of your screen to build things", 250, 0);
}
if (lvl_timer == 260) {
_root.comm_message("INCOMMING!!!", 50, 0);
}
if ((lvl_timer >= 260) and (lvl_timer < 1000)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 1)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 1)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 1)) : null);
decal = 60;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 1100) {
_root.comm_message("Good job. If you had not already seen it, you get cash every time you kill an ennemy unit, but you dont get power.", 225, 0);
}
if (lvl_timer == 1350) {
_root.comm_message("If you want some power, you will have to build a PowerPlant!", 175, 0);
}
if (lvl_timer == 1650) {
_root.comm_message("This was easy i know, but it was only a small part of the convoy!", 125, 0);
}
if (lvl_timer == 1800) {
_root.comm_message("I detect ennemy vehicules heading to your defense, prepare yourself to destroy them!", 150, 0);
}
if ((lvl_timer >= 1800) and (lvl_timer < 3000)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 1)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 1)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 1)) : null);
decal = 50;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 3100) {
_root.comm_message("Scouts are reporting that bigger trucks are incomming, be ready for some hard battle!", 200, 0);
}
if ((lvl_timer >= 3400) and (lvl_timer < 5500)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 2)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 2)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 2)) : null);
decal = 70;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 5800) {
_root.comm_message("Watchout, a new wave is coming!", 150, 0);
}
if ((lvl_timer >= 6000) and (lvl_timer < 7000)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 2)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 3)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 2)) : null);
decal = 50;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if ((lvl_timer >= 7500) and (lvl_timer < 7800)) {
decal--;
if (decal <= 0) {
((decalx == 3) ? (_root.make_ennemy(600, 175, 5)) : null);
((decalx == 2) ? (_root.make_ennemy(600, 150, 4)) : null);
((decalx == 1) ? (_root.make_ennemy(600, 200, 5)) : null);
decal = 30;
decalx--;
((decalx == 0) ? ((decalx = 3)) : null);
}
}
if (lvl_timer == 9000) {
_root.comm_message("Wow you did wonderfull, mission accomplished sergent!", 150, 0);
}
if (lvl_timer == 9150) {
_root.accomplished_start();
}
Symbol 481 MovieClip [creator1] Frame 3
gotoAndPlay (2);
Symbol 489 MovieClip Frame 1
gotoAndStop(random(5) + 1);
Symbol 491 MovieClip [explosion2] Frame 26
this.removeMovieClip();
Symbol 492 MovieClip [explosion1] Frame 26
this.removeMovieClip();
Symbol 496 Button
on (press) {
_root.getURL("http://www.armorgames.com", "_blank", "GET");
}
Symbol 502 Button
on (press) {
_root.play();
}
Symbol 549 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 550 Button
on (release) {
_root.play();
}
Instance of Symbol 549 MovieClip in Symbol 557 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
varName = "defaultValue";
}
Symbol 557 MovieClip Frame 349
_root.play();
Symbol 561 Button
on (press) {
_root.gotoAndStop("menu");
}
Symbol 608 Button
on (release) {
_root.instructions._visible = false;
}
Symbol 610 Button
on (press, keyPress "<Enter>") {
_root.gotoAndPlay("brieffing1");
}
Symbol 611 Button
on (press) {
_root.instructions._visible = true;
}
Symbol 613 Button
on (keyPress "<Enter>") {
_root.accomplished_start();
}
Symbol 615 MovieClip Frame 1
if (Key.isDown(81)) {
if (!toggleT) {
toggleT = true;
if (_root._quality == "HIGH") {
_root._quality = "LOW";
} else if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
}
}
} else {
toggleT = false;
}
Symbol 615 MovieClip Frame 2
gotoAndPlay (2);
Symbol 668 Button
on (release) {
_root.gotoAndPlay("mech game");
}
Symbol 669 Button
on (release) {
_root.gotoAndStop("mission info");
}
Symbol 670 Button
on (release) {
_root.gotoAndStop("mission map");
}
Symbol 671 Button
on (release) {
_root.gotoAndStop("mech user guide");
}
Symbol 675 Button
on (release) {
_root.gotoAndStop("mech menu");
}
Instance of Symbol 686 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x - 0.1);
if (_x < -2400) {
_x = 400;
}
}
Instance of Symbol 693 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 4);
if (_x > 700) {
_x = -4000;
}
}
Instance of Symbol 693 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 4);
if (_x < -4000) {
_x = 1000;
}
}
Instance of Symbol 689 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
if (_x < -1000) {
_x = 2000;
}
}
Instance of Symbol 689 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
if (_x < -1000) {
_x = 2000;
}
}
Instance of Symbol 692 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
if (_x < -1000) {
_x = 2000;
}
}
Instance of Symbol 689 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x - 0.5);
if (_x < -1000) {
_x = 2000;
}
}
Instance of Symbol 693 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 6);
if (_x > 700) {
_x = -4000;
}
}
Instance of Symbol 693 MovieClip in Symbol 694 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 3);
if (_x > 700) {
_x = -4000;
}
}
Symbol 708 Button
on (keyPress "<Enter>") {
_root.gotoAndPlay("menu");
}