Frame 1
function ammonition() {
trace("ammonition start");
this.count = 20;
}
function shield() {
trace("shield start");
this.count = 100;
this.lives_count = 4;
this.lives.gotoAndStop(this.lives_count);
}
function score() {
trace("score start");
this.count = 0;
this.fired = 0;
this.hit = 0;
this.bonus_dropped = 0;
}
function terrainDesigner() {
trace("terrain designer start");
this.tex_addres = "_root.textures";
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
}
function terrainGame() {
trace("terrainGame start");
this.tex_addres = "_root.textures";
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
}
function ship() {
trace("ship start");
this.target_x = 200;
this.target_y = -50;
this.ammo_type = 1;
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
_root.shadow_id++;
this.shadow = this._parent.shadows.attachMovie("ship_shadow", "ship_shadow", _root.shadow_id, {_x:this._x, _y:this._y});
}
function tank() {
trace("tank start");
this.hp = 100;
this.target_x = 200;
this.target_y = 200;
this.killable = true;
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
}
function bonus() {
trace("bonus start");
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
this.dead = true;
}
function turret() {
this.hp = 100;
this.target_x = 200;
this.target_y = 200;
this.killable = true;
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
}
function fighter() {
this.hp = 40;
this.target_x = 200;
this.target_y = 200;
this.killable = true;
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
this.dead = false;
this._x = -200;
}
function boss() {
this.hp = 1000;
this.target_x = 200;
this.target_y = -300;
this.killable = true;
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
this.dead = false;
this._x = 200;
this._y = -300;
this.timer = 1500;
}
function ammo() {
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
this.playSound("laser1", 60);
this._parent._parent.score.firedAdd();
}
function mine() {
this.hp = 0;
this.hit = new object();
this.hit.x = 0;
this.hit.y = 0;
this.speed = 3;
}
function keyboard() {
}
ammonition.prototype = new MovieClip();
ammonition.prototype.startAmmo = function (timer) {
this.count = 20;
this.ammoInterval = setInterval(this, "addAmmo", timer);
this.setAmmoMask();
};
ammonition.prototype.stopAmmo = function () {
this.count = 0;
clearInterval(this.ammoInterval);
this.setAmmoMask();
};
ammonition.prototype.addAmmo = function () {
if (this.count < 20) {
this.count++;
}
this.setAmmoMask();
};
ammonition.prototype.removeAmmo = function () {
if (this.count > 0) {
this.count--;
}
this.setAmmoMask();
};
ammonition.prototype.checkAmmo = function () {
if (this.count > 0) {
return(true);
}
return(false);
};
ammonition.prototype.setAmmoMask = function () {
this.mask._xscale = this.count * 5;
};
Object.registerClass("ammonition", ammonition);
shield.prototype = new MovieClip();
shield.prototype.startShield = function (timer) {
this.count = 100;
this.ammoInterval = setInterval(this, "addShield", timer);
this.setShieldMask();
};
shield.prototype.stopShield = function () {
this.count = 0;
clearInterval(this.ammoInterval);
this.setShieldMask();
};
shield.prototype.addShield = function (amount) {
if (!amount) {
amount = 10;
}
if (this.count < 100) {
this.count = this.count + amount;
}
if (this.count > 100) {
this.count = 100;
}
this.setShieldMask();
};
shield.prototype.removeShield = function (amount) {
if (this.count > 0) {
this.count = this.count - amount;
}
if (this.count < 0) {
this.count = 0;
}
this.setShieldMask();
};
shield.prototype.removeLive = function () {
this.lives_count--;
this.lives.gotoAndStop(this.lives_count);
if (this.lives_count > 0) {
return(true);
}
return(false);
};
shield.prototype.checkShield = function () {
if (this.count > 0) {
return(true);
}
return(false);
};
shield.prototype.setShieldMask = function () {
this.mask._xscale = this.count;
};
Object.registerClass("shield", shield);
score.prototype = new MovieClip();
score.prototype.updateScore = function (nr) {
this.count = this.count + nr;
this.score = this.count;
_global.score = this.score;
this.bonus_check = (this.count / 500) - this.bonus_dropped;
if (this.bonus_check > 0) {
this.bonus_dropped++;
return(1);
}
return(0);
};
score.prototype.firedAdd = function () {
this.fired++;
this.updateAccuracy();
};
score.prototype.hitAdd = function () {
this.hit++;
this.updateAccuracy();
};
score.prototype.updateAccuracy = function () {
this.accuracy = ((((Math.floor((100 * this.hit) / this.fired) + "% (") + this.hit) + "/") + this.fired) + ")";
_global.accuracy = this.accuracy;
};
Object.registerClass("score", score);
MovieClip.prototype.hitTest2 = function (x_hit, y_hit, range) {
var x_delta = Math.abs(this._x - x_hit);
var y_delta = Math.abs(this._y - y_hit);
if ((x_delta < range) && (y_delta < range)) {
return(true);
}
return(false);
};
trace("main.as loaded");
terrainDesigner.prototype = new MovieClip();
terrainDesigner.prototype.loadTerrainData = function (data, bg) {
this.data = data;
this.bg = bg;
trace("bg=" + this.bg);
this.data_size = this.data.length;
};
terrainDesigner.prototype.exportTerrainData = function () {
var tex_nr = Number(this.data[this.data_size - nr][0]);
if (tex_nr > 0) {
}
var i = 1;
while (i < 6) {
var tex_nr = Number(this.data[this.data_size - nr][i]);
if (tex_nr > 0) {
this.createTexture(tex_nr, nr, i);
}
i++;
}
export_string = "terrain_background=" + this.bg;
export_string = export_string + "&terrain_data=";
rows = new Array();
var i = 0;
while (i < 100) {
rows[i] = this.data[i].join("|");
i++;
}
export_string = export_string + rows.join("#");
export_string = export_string + "&terrain_name=xx";
return(export_string);
};
terrainDesigner.prototype.createTextureRow = function (nr) {
this.data[nr][0] = Number(this.data[nr][0]);
var tex_nr = Number(this.data[nr][0]);
temp_enemy = this.attachMovie("enemy_" + tex_nr, ("tex_" + nr) + "_0", nr * 100, {_x:0, _y:(-nr) * 100, nr:nr});
temp_enemy.onPress = function () {
this._parent.data[this.nr][0] = _root.current_enemy_nr;
this._parent.attachMovie("enemy_" + _root.current_enemy_nr, ("tex_" + this.nr) + "_0", nr * 100, {_x:0, _y:(-nr) * 100, nr:nr});
};
var i = 1;
while (i < 6) {
this.data[nr][i] = Number(this.data[nr][i]);
var tex_nr = Number(this.data[nr][i]);
if (tex_nr > 0) {
this.createTexture(tex_nr, nr, i);
}
i++;
}
};
terrainDesigner.prototype.createTexture = function (tex_nr, nr, i) {
temp_tex = this.attachMovie("tex_" + tex_nr, (("tex_" + nr) + "_") + i, (nr * 100) + i, {_x:(i - 1) * 100, _y:(-nr) * 100, i:i, nr:nr});
temp_bg = temp_tex.background.attachMovie("bg_" + this.bg, "bg_" + this.bg, -100, {_x:0, _y:0});
temp_tex.swapDepthsNR((nr * 100) + i);
temp_tex.onPress = function () {
this._parent.data[this.nr][this.i] = _root.current_tex_nr;
this._parent.createTexture(_root.current_tex_nr, this.nr, this.i);
};
};
terrainDesigner.prototype.startTerrain = function () {
this.speed = 1;
this.row_count = 0;
this.count = 0;
var i = 0;
while (i < 100) {
this.createTextureRow(i);
i++;
}
};
terrainDesigner.prototype.scrollUp = function () {
this._y = this._y - 100;
};
terrainDesigner.prototype.scrollDn = function () {
this._y = this._y + 100;
};
terrainDesigner.prototype.scrollTo = function (nr) {
this._y = (-nr) * 100;
};
terrainDesigner.prototype.scrollTerrain = function () {
this._y = this._y + this.speed;
if ((++this.count) == 100) {
this.count = 0;
this.row_count++;
this.createTextureRow(this.row_count + 5);
this["tex_row_" + this.row_count].removeMovieClip();
}
};
terrainDesigner.prototype.stopTerrain = function () {
this.speed = 0;
delete this.onEnterFrame;
};
trace("terrainDesigner loaded");
Object.registerClass("terrainDesigner", terrainDesigner);
terrainGame.prototype = new MovieClip();
terrainGame.prototype.loadTerrainData = function (data, bg) {
this.data = data;
this.bg = bg;
trace("bg=" + this.bg);
this.data_size = this.data.length;
};
terrainGame.prototype.createTextureRow = function (nr) {
this.data[nr][0] = Number(this.data[nr][0]);
var tex_nr = Number(this.data[nr][0]);
if (tex_nr > 0) {
temp_enemy = this.attachMovie("enemy_" + tex_nr, ("tex_" + nr) + "_0", (nr * 100) + 10, {_x:0, _y:(-nr) * 100, nr:nr, active:true});
}
var i = 1;
while (i < 6) {
this.data[nr][i] = Number(this.data[nr][i]);
var tex_nr = Number(this.data[nr][i]);
if (tex_nr > 0) {
this.createTexture(tex_nr, nr, i);
}
i++;
}
};
terrainGame.prototype.deleteTextureRow = function (nr) {
var i = 0;
while (i < 6) {
this[(("tex_" + nr) + "_") + i].removeMovieClip();
this.hitmask[(("hit_" + nr) + "_") + i].removeMovieClip();
i++;
}
};
terrainGame.prototype.createTexture = function (tex_nr, nr, i) {
temp_tex = this.attachMovie("tex_" + tex_nr, (("tex_" + nr) + "_") + i, (nr * 100) + i, {_x:(i - 1) * 100, _y:(-nr) * 100, i:i, nr:nr, active:true});
temp_bg = temp_tex.background.attachMovie("bg_" + this.bg, "bg_" + this.bg, -100, {_x:0, _y:0});
temp_tex.swapDepthsNR((nr * 100) + i);
};
terrainGame.prototype.startTerrain = function () {
_global.speed = 2;
this.row_count = 0;
this.count = 0;
var i = 0;
while (i < 5) {
this.createTextureRow(i);
i++;
}
this.last_row = Math.floor(this._x / 20);
this.onEnterFrame = this.scrollTerrain;
};
terrainGame.prototype.scrollTerrain = function () {
this._y = this._y + _global.speed;
this.current_row = Math.floor(this._y / 100);
if (this.row_count < (this.current_row + 1)) {
this.row_count++;
this.createTextureRow(this.row_count + 4);
this.deleteTextureRow(this.current_row);
this._parent.suwak.setPos();
}
};
terrainGame.prototype.stopTerrain = function () {
this.speed = 0;
delete this.onEnterFrame;
};
terrainGame.prototype.kill = function () {
this.speed = 0;
delete this.onEnterFrame;
this.removeMovieClip();
};
trace("terrainGame loaded");
Object.registerClass("terrainGame", terrainGame);
track_1 = [[-46, 24.95, -1], [-42.1, 25.15, -1], [-38.15, 25.35, -1], [-34.2, 25.55, -1], [-30.25, 25.75, -1], [-26.3, 25.95, -1], [-22.35, 26.15, -1], [-18.4, 26.3, -1], [-14.4, 26.5, -1], [-10.4, 26.7, -1], [-6.4, 26.85, -1], [-2.4, 26.95, -2], [1.55, 27, -2], [5.5, 27.05, -3], [9.5, 27.05, -4], [13.5, 26.95, -5], [17.5, 26.8, -6], [21.5, 26.6, -7], [25.5, 26.3, -8], [29.5, 25.85, -10], [33.45, 25.35, -12], [37.4, 24.65, -14], [41.3, 23.85, -16], [45.15, 22.9, -18], [49, 21.75, -21], [52.8, 20.45, -24], [56.5, 18.9, -27], [60.1, 17.1, -31], [63.6, 15.1, -35], [66.95, 12.8, -40], [70.1, 10.3, -44], [73.05, 7.5, -49], [75.75, 4.45, -53], [78.2, 1.25, -58], [80.4, -2.15, -62], [82.35, -5.75, -66], [84.05, -9.4, -70], [85.5, -13.2, -73], [86.75, -16.95, -76], [87.8, -20.8, -79], [88.6, -24.7, -83], [89.15, -28.7, -87], [89.45, -32.7, -91], [89.4, -36.7, -96], [89, -40.75, -101], [88.25, -44.7, -106], [87.15, -48.6, -112], [85.65, -52.4, -118], [83.7, -56.15, -123], [81.5, -59.7, -126], [79.15, -63.15, -128], [76.7, -66.45, -130], [74.15, -69.65, -132], [71.55, -72.8, -133], [68.95, -75.85, -134], [66.35, -78.85, -133], [63.8, -81.9, -132], [61.4, -85, -130], [59.1, -88.3, -125], [57.1, -91.8, -120], [55.5, -95.45, -113], [54.3, -99.3, -105], [53.7, -103.3, -97], [53.75, -107.45, -88], [54.3, -111.55, -81], [55.35, -115.5, -75], [56.75, -119.4, -70], [58.5, -123.1, -66], [60.45, -126.65, -62], [62.6, -130.1, -59], [64.9, -133.35, -56], [67.3, -136.5, -54], [69.9, -139.5, -50], [72.65, -142.35, -47], [75.6, -145, -43], [78.75, -147.45, -38], [82.1, -149.6, -32], [85.7, -151.4, -26], [89.45, -152.85, -20], [93.4, -153.8, -13], [97.4, -154.3, -6], [101.45, -154.3, 1], [105.5, -153.9, 6], [109.55, -153.1, 11], [113.5, -152, 15], [117.4, -150.65, 18], [121.15, -149.1, 21], [124.85, -147.45, 23], [128.6, -145.55, 25], [132.35, -143.6, 26], [135.95, -141.6, 27], [139.55, -139.55, 27], [143.1, -137.5, 28], [146.6, -135.45, 28], [150, -133.4, 28], [153.4, -131.45, 28], [156.8, -129.45, 28], [160.2, -127.5, 27], [163.65, -125.6, 26], [167.15, -123.7, 25], [170.75, -121.9, 24], [174.35, -120.15, 23], [178, -118.55, 21], [181.7, -117, 19], [185.45, -115.6, 17], [189.3, -114.35, 15], [193.15, -113.3, 12], [197.1, -112.4, 9], [201.05, -111.75, 6], [205.1, -111.3, 2], [209.1, -111.15, -1], [213.15, -111.2, -5], [217.2, -111.55, -9], [221.25, -112.15, -13], [225.2, -113.05, -16], [229.1, -114.15, -20], [232.95, -115.55, -24], [236.7, -117.15, -27], [240.35, -118.95, -30], [243.85, -120.95, -33], [247.3, -123.1, -36], [250.6, -125.45, -38], [253.85, -127.85, -39], [257.05, -130.3, -40], [260.2, -132.85, -41], [263.3, -135.4, -43], [266.35, -138.1, -44], [269.3, -140.8, -45], [272.25, -143.6, -46], [275.1, -146.45, -47], [277.9, -149.35, -49], [280.65, -152.35, -50], [283.3, -155.35, -51], [285.9, -158.45, -53], [288.35, -161.55, -54], [290.8, -164.75, -56], [293.1, -168, -57], [295.3, -171.35, -59], [297.4, -174.75, -61], [299.4, -178.25, -63], [301.25, -181.85, -66], [302.95, -185.5, -68], [304.45, -189.25, -71], [305.75, -193.05, -74], [306.85, -196.85, -78], [307.7, -200.75, -82], [308.25, -204.75, -86], [308.5, -208.75, -91], [308.45, -212.75, -96], [307.95, -216.8, -101], [307.1, -220.75, -107], [305.9, -224.6, -112], [304.25, -228.3, -118], [302.3, -231.9, -124], [299.95, -235.25, -129], [297.3, -238.4, -134], [294.45, -241.35, -139], [291.35, -244, -143], [288.1, -246.5, -146], [284.75, -248.75, -149], [281.25, -250.85, -152], [277.85, -252.85, -150], [274.5, -254.95, -148], [271.3, -257.15, -146], [268.15, -259.5, -144], [265.05, -262, -141], [262.1, -264.6, -138], [259.3, -267.4, -135], [256.65, -270.4, -132], [254.2, -273.55, -128], [251.95, -276.85, -123], [249.95, -280.35, -119], [248.25, -284.05, -114], [246.9, -287.85, -109], [245.9, -291.8, -103], [245.2, -295.85, -98], [244.9, -299.9, -93], [244.95, -304, -88], [245.35, -308.05, -84], [246, -312.1, -80], [246.95, -316.05, -76], [248.1, -319.95, -73], [249.5, -323.8, -70], [251.05, -327.5, -68], [252.75, -331.15, -66], [254.55, -334.8, -64], [256.45, -338.35, -62], [258.5, -341.8, -60], [260.7, -345.25, -58], [263.05, -348.55, -55], [265.45, -351.8, -53], [268.05, -354.95, -51], [270.7, -358, -49], [273.5, -360.95, -47], [276.4, -363.8, -45], [279.4, -366.55, -43], [282.45, -369.2, -41], [285.65, -371.7, -39], [288.9, -374.1, -37], [292.25, -376.45, -35], [295.65, -378.65, -33], [299.1, -380.75, -31], [302.65, -382.7, -30], [306.25, -384.65, -28], [309.95, -386.5, -27], [313.65, -388.25, -26], [317.4, -389.9, -25], [321.15, -391.5, -24], [324.95, -393, -23], [328.75, -394.45, -22], [332.6, -395.9, -21], [336.4, -397.2, -20], [340.25, -398.5, -19], [344.15, -399.75, -19], [348.15, -401, -18], [352.15, -402.2, -17], [356.1, -403.35, -17], [360.1, -404.45, -17], [364.05, -405.55, -16], [368, -406.6, -16], [371.95, -407.65, -16], [375.9, -408.7, -15], [379.85, -409.7, -15], [383.8, -410.65, -15], [387.75, -411.65, -15], [391.65, -412.6, -14], [395.6, -413.5, -14], [399.55, -414.4, -13], [403.5, -415.25, -13], [407.45, -416.05, -12], [411.45, -416.85, -12], [415.4, -417.55, -11], [419.4, -418.3, -11], [423.4, -418.95, -10], [427.4, -419.6, -10], [431.4, -420.2, -9], [435.4, -420.75, -9], [439.4, -421.3, -8], [443.45, -421.8, -8], [447.5, -422.25, -7], [451.5, -422.65, -7], [455.55, -423.05, -6], [459.55, -423.4, -6], [463.6, -423.75, -5], [467.65, -424, -5], [471.7, -424.25, -4], [475.7, -424.5, -4], [479.75, -424.65, -3], [483.8, -424.8, -3], [487.85, -424.9, -2], [491.9, -425, -1], [495.95, -425, -1], [500, -425, 0], [-50, 24.8, 0], [-46, 24.95, -1]];
track_2 = [[-45.75, 24.45, -5], [-41.95, 24.35, -10], [-38.15, 23.95, -16], [-34.4, 23.15, -22], [-30.7, 21.95, -28], [-27.2, 20.35, -33], [-23.8, 18.45, -39], [-20.6, 16.2, -44], [-17.6, 13.7, -49], [-14.85, 10.95, -53], [-12.3, 8.05, -57], [-9.9, 4.95, -60], [-7.75, 1.8, -63], [-5.7, -1.5, -66], [-3.8, -4.85, -68], [-2.05, -8.25, -70], [-0.45, -11.75, -72], [1.05, -15.25, -74], [2.45, -18.75, -76], [3.8, -22.35, -77], [5.05, -25.9, -76], [6.4, -29.5, -76], [7.8, -33.05, -75], [9.2, -36.6, -74], [10.65, -40.1, -74], [12.15, -43.6, -73], [13.7, -47.1, -72], [15.3, -50.55, -72], [16.9, -54, -71], [18.55, -57.45, -70], [20.25, -60.85, -70], [22, -64.25, -69], [23.75, -67.65, -69], [25.55, -71, -68], [27.4, -74.3, -67], [29.3, -77.65, -67], [31.2, -80.9, -66], [33.15, -84.2, -65], [35.15, -87.45, -65], [37.15, -90.65, -64], [39.2, -93.9, -64], [41.25, -97.05, -63], [43.35, -100.2, -63], [45.5, -103.35, -62], [47.65, -106.5, -62], [49.85, -109.6, -61], [52.1, -112.65, -60], [54.3, -115.75, -60], [56.6, -118.75, -59], [58.9, -121.75, -58], [61.3, -124.65, -55], [63.9, -127.5, -52], [66.65, -130.15, -49], [69.55, -132.7, -46], [72.55, -135.1, -43], [75.75, -137.3, -40], [79.05, -139.35, -37], [82.45, -141.2, -34], [85.95, -142.9, -31], [89.55, -144.35, -28], [93.25, -145.7, -25], [96.95, -146.8, -22], [100.75, -147.8, -20], [104.55, -148.6, -17], [108.4, -149.2, -15], [112.3, -149.7, -13], [116.15, -150.05, -11], [120.05, -150.25, -9], [123.9, -150.35, -7], [127.8, -150.35, -5], [131.65, -150.2, -4], [135.5, -149.95, -2], [139.35, -149.65, -1], [143.2, -149.2, 0], [147, -148.7, 2], [150.8, -148.15, 3], [154.55, -147.5, 4], [158.3, -146.8, 5], [162.1, -146, 6], [165.8, -145.15, 7], [169.5, -144.25, 7], [173.2, -143.35, 8], [176.85, -142.35, 9], [180.55, -141.3, 10], [184.2, -140.2, 10], [187.8, -139.1, 10], [191.4, -138, 9], [195, -137.05, 8], [198.6, -136.1, 7], [202.25, -135.2, 6], [205.9, -134.4, 5], [209.55, -133.7, 4], [213.25, -133.05, 3], [216.95, -132.45, 2], [220.65, -131.95, 1], [224.4, -131.5, -1], [228.15, -131.15, -2], [231.9, -130.9, -3], [235.65, -130.7, -5], [239.45, -130.65, -6], [243.25, -130.65, -7], [247, -130.75, -9], [250.8, -130.9, -10], [254.55, -131.2, -12], [258.35, -131.6, -13], [262.1, -132.05, -15], [265.85, -132.65, -16], [269.6, -133.35, -18], [273.3, -134.1, -19], [277.05, -135, -21], [280.7, -135.95, -22], [284.35, -137.05, -24], [288, -138.2, -25], [291.6, -139.5, -27], [295.15, -140.85, -28], [298.65, -142.3, -30], [302.15, -143.85, -31], [305.6, -145.5, -33], [309, -147.25, -34], [312.35, -149.05, -36], [315.65, -150.9, -37], [318.95, -152.9, -38], [322.15, -154.95, -40], [325.35, -157.05, -41], [328.45, -159.25, -42], [331.5, -161.45, -43], [334.55, -163.8, -45], [337.55, -166.15, -46], [340.45, -168.6, -47], [343.3, -171.05, -48], [346.15, -173.6, -49], [348.9, -176.2, -51], [351.55, -178.8, -52], [354.15, -181.55, -54], [356.65, -184.4, -56], [359.05, -187.3, -58], [361.35, -190.35, -60], [363.55, -193.45, -62], [365.65, -196.65, -65], [367.6, -199.9, -67], [369.4, -203.3, -69], [371.1, -206.75, -72], [372.65, -210.25, -74], [374.05, -213.85, -76], [375.3, -217.5, -79], [376.4, -221.25, -81], [377.35, -225, -84], [378.1, -228.8, -86], [378.75, -232.65, -88], [379.2, -236.5, -91], [379.55, -240.4, -93], [379.7, -244.3, -95], [379.75, -248.2, -97], [379.65, -252.1, -99], [379.4, -256, -101], [379.05, -259.85, -103], [378.55, -263.7, -104], [377.95, -267.55, -106], [377.3, -271.4, -108], [376.5, -275.2, -109], [375.6, -278.9, -111], [374.6, -282.7, -112], [373.55, -286.45, -113], [372.4, -290.1, -114], [371.15, -293.8, -116], [369.85, -297.4, -117], [368.5, -301, -118], [367.1, -304.6, -119], [365.6, -308.15, -120], [364.1, -311.65, -121], [362.5, -315.15, -121], [360.85, -318.6, -122], [359.15, -322.05, -123], [357.45, -325.45, -124], [355.65, -328.85, -125], [353.85, -332.2, -125], [352, -335.55, -126], [350.1, -338.85, -127], [348.2, -342.15, -127], [346.25, -345.4, -128], [344.25, -348.65, -128], [342.25, -351.85, -129], [340.2, -355.05, -129], [338.15, -358.15, -130], [336.15, -361.2, -131], [334.05, -364.2, -132], [331.95, -367.15, -132], [329.75, -370.1, -133], [327.55, -373.05, -134], [325.3, -375.9, -135], [323.05, -378.8, -136], [320.65, -381.6, -137], [318.25, -384.4, -138], [315.8, -387.1, -139], [313.3, -389.8, -140], [310.7, -392.45, -141], [308.1, -395, -143], [305.4, -397.55, -144], [302.6, -399.95, -146], [299.8, -402.4, -147], [296.9, -404.7, -149], [293.9, -406.95, -151], [290.85, -409.1, -152], [287.7, -411.15, -154], [284.5, -413.05, -156], [281.25, -414.85, -159], [277.85, -416.55, -161], [274.45, -418.1, -163], [270.95, -419.5, -166], [267.35, -420.75, -169], [263.7, -421.85, -171], [260, -422.75, -174], [256.25, -423.5, -177], [252.5, -424.05, -180], [248.65, -424.4, 177], [244.8, -424.55, 174], [240.95, -424.5, 171], [237.1, -424.3, 169], [233.3, -423.85, 166], [229.5, -423.25, 163], [225.7, -422.5, 161], [221.95, -421.55, 158], [218.25, -420.5, 156], [214.6, -419.25, 154], [211, -417.9, 152], [207.45, -416.4, 150], [204, -414.8, 148], [200.55, -413.05, 146], [197.2, -411.25, 144], [193.85, -409.35, 143], [190.6, -407.35, 141], [187.4, -405.3, 140], [184.25, -403.1, 139], [181.15, -400.9, 137], [178.1, -398.65, 136], [175.1, -396.3, 135], [172.15, -393.9, 135], [169.15, -391.6, 136], [166.15, -389.3, 137], [163.1, -387.1, 137], [160.05, -384.85, 138], [156.9, -382.7, 139], [153.8, -380.55, 140], [150.65, -378.45, 140], [147.45, -376.45, 141], [144.2, -374.4, 142], [140.95, -372.45, 143], [137.7, -370.55, 144], [134.4, -368.65, 144], [131.05, -366.85, 145], [127.7, -365.05, 146], [124.3, -363.3, 147], [120.9, -361.6, 147], [117.45, -360, 148], [114, -358.4, 149], [110.6, -356.85, 150], [107.05, -355.35, 151], [103.5, -353.9, 151], [99.95, -352.5, 152], [96.4, -351.1, 153], [92.8, -349.8, 154], [89.2, -348.55, 155], [85.6, -347.35, 155], [81.95, -346.2, 156], [78.3, -345.1, 157], [74.65, -344.05, 158], [70.95, -343.05, 159], [67.25, -342.1, 159], [63.55, -341.15, 160], [59.8, -340.3, 161], [56.1, -339.5, 162], [52.35, -338.75, 162], [48.6, -338.05, 163], [44.85, -337.35, 164], [41.05, -336.75, 165], [37.3, -336.2, 165], [33.55, -335.65, 166], [29.75, -335.2, 167], [25.95, -334.75, 167], [22.15, -334.4, 168], [18.35, -334.05, 169], [14.55, -333.75, 169], [10.75, -333.5, 170], [6.95, -333.3, 171], [3.15, -333.15, 171], [-0.65, -333.05, 172], [-4.45, -332.95, 173], [-8.3, -332.9, 173], [-12.1, -332.9, 174], [-15.9, -332.95, 174], [-19.7, -333.05, 175], [-23.5, -333.2, 176], [-27.3, -333.35, 176], [-31.1, -333.55, 177], [-34.85, -333.8, 177], [-38.65, -334.05, 178], [-42.45, -334.35, 178], [-46.25, -334.7, 179], [-50, -335.1, 179], [-50, -335.1, 179], [-50, -335.1, 179]];
track_6 = [[-46.9, -25, 0], [-43.75, -25, 0], [-40.65, -25, 0], [-37.5, -25, 0], [-34.4, -25, 0], [-31.25, -25, 0], [-28.15, -25, 0], [-25, -25, 0], [-21.9, -25, 0], [-18.75, -25, 0], [-15.65, -25, 0], [-12.5, -25, 0], [-9.4, -25, 0], [-6.25, -25, 0], [-3.15, -25, 0], [0, -25, 0], [3.1, -25, 0], [6.25, -25, 0], [9.35, -25, 0], [12.45, -25, 0], [15.6, -25, 0], [18.7, -25, 0], [21.85, -25, 0], [24.95, -25, 0], [28.1, -25, 0], [31.2, -25, 0], [34.35, -25, 0], [37.45, -25, 0], [40.6, -25, 0], [43.7, -25, 0], [46.85, -25, 0], [49.95, -25, 0], [53.1, -25, 0], [56.2, -25, 0], [59.3, -25, 0], [62.45, -25, 0], [65.55, -25, 0], [68.7, -25, 0], [71.8, -25, 0], [74.95, -25, 0], [78.05, -25, 0], [81.2, -25, 0], [84.3, -25, 0], [87.45, -25, 0], [90.55, -25, 0], [93.7, -25, 0], [96.8, -25, 0], [99.95, -25, 0], [103.05, -25, 0], [106.15, -25, 0], [109.3, -25, 0], [112.4, -25, 0], [115.55, -25, 0], [118.65, -25, 0], [121.8, -25, 0], [124.9, -25, 0], [128.05, -25, 0], [131.15, -25, 0], [134.3, -25, 0], [137.4, -25, 0], [140.55, -25, 0], [143.65, -25, 0], [146.8, -25, 0], [149.9, -25, 0], [153.05, -25, 0], [156.15, -25, 0], [159.3, -25, 0], [162.4, -25, 0], [165.5, -25, 0], [168.65, -25, 0], [171.75, -25, 0], [174.9, -25, 0], [178, -25, 0], [181.15, -25, 0], [184.25, -25, 0], [187.4, -25, 0], [190.5, -25, 0], [193.65, -25, 0], [196.75, -25, 0], [199.9, -25, 0], [203, -25, 0], [206.15, -25, 0], [209.25, -25, 0], [212.4, -25, 0], [215.5, -25, 0], [218.6, -25, 0], [221.75, -25, 0], [224.85, -25, 0], [228, -25, 0], [231.1, -25, 0], [234.25, -25, 0], [237.35, -25, 0], [240.5, -25, 0], [243.6, -25, 0], [246.75, -25, 0], [249.85, -25, 0], [253, -25, 0], [256.1, -25, 0], [259.25, -25, 0], [262.35, -25, 0], [265.5, -25, 0], [268.6, -25, 0], [271.7, -25, 0], [274.85, -25, 0], [277.95, -25, 0], [281.1, -25, 0], [284.2, -25, 0], [287.35, -25, 0], [290.45, -25, 0], [293.6, -25, 0], [296.7, -25, 0], [299.85, -25, 0], [302.95, -25, 0], [306.1, -25, 0], [309.2, -25, 0], [312.35, -25, 0], [315.45, -25, 0], [318.6, -25, 0], [321.7, -25, 0], [324.9, -24.85, 8], [328.15, -24.2, 13], [331.3, -23.35, 15], [334.35, -22.5, 16], [337.35, -21.55, 17], [340.35, -21.15, 1], [343.35, -21.5, -19], [345.8, -23.3, -56], [346.85, -26.3, -84], [346.75, -29.35, -102], [345.3, -32, -140], [342.3, -33.1, -176], [339.1, -32.9, 169], [336.1, -32.05, 158], [333.3, -30.95, 159], [330.5, -29.9, 160], [327.65, -28.95, 162], [324.75, -28.2, 168], [321.7, -28, 180], [318.6, -28, 180], [315.45, -28, 180], [312.35, -28, 180], [309.2, -28, 180], [306.1, -28, 180], [302.95, -28, 180], [299.85, -28, 180], [296.7, -28, 180], [293.6, -28, 180], [290.45, -28, 180], [287.35, -28, 180], [284.2, -28, 180], [281.1, -28, 180], [277.95, -28, 180], [274.85, -28, 180], [271.7, -28, 180], [268.6, -28, 180], [265.45, -28, 180], [262.35, -28, 180], [259.25, -28, 180], [256.1, -28, 180], [253, -28, 180], [249.85, -28, 180], [246.75, -28, 180], [243.6, -28, 180], [240.5, -28, 180], [237.35, -28, 180], [234.25, -28, 180], [231.1, -28, 180], [228, -28, 180], [224.85, -28, 180], [221.75, -28, 180], [218.6, -28, 180], [215.5, -28, 180], [212.4, -28, 180], [209.25, -28, 180], [206.15, -28, 180], [203, -28, 180], [199.9, -28, 180], [196.75, -28, 180], [193.65, -28, 180], [190.5, -28, 180], [187.4, -28, 180], [184.25, -28, 180], [181.15, -28, 180], [178, -28, 180], [174.9, -28, 180], [171.75, -28, 180], [168.65, -28, 180], [165.5, -28, 180], [162.4, -28, 180], [159.3, -28, 180], [156.15, -28, 180], [153.05, -28, 180], [149.9, -28, 180], [146.8, -28, 180], [143.65, -28, 180], [140.55, -28, 180], [137.4, -28, 180], [134.3, -28, 180], [131.15, -28, 180], [128.05, -28, 180], [124.9, -28, 180], [121.8, -28, 180], [118.65, -28, 180], [115.55, -28, 180], [112.4, -28, 180], [109.3, -28, 180], [106.2, -28, 180], [103.05, -28, 180], [99.95, -28, 180], [96.8, -28, 180], [93.7, -28, 180], [90.55, -28, 180], [87.45, -28, 180], [84.3, -28, 180], [81.2, -28, 180], [78.05, -28, 180], [74.95, -28, 180], [71.8, -28, 180], [68.7, -28, 180], [65.55, -28, 180], [62.45, -28, 180], [59.3, -28, 180], [56.2, -28, 180], [53.1, -28, 180], [49.95, -28, 180], [46.85, -28, 180], [43.7, -28, 180], [40.6, -28, 180], [37.45, -28, 180], [34.35, -28, 180], [31.2, -28, 180], [28.1, -28, 180], [24.95, -28, 180], [21.85, -28, 180], [18.7, -28, 180], [15.6, -28, 180], [12.45, -28, 180], [9.35, -28, 180], [6.2, -28, 180], [3.1, -28, 180], [0, -28, 180], [-3.15, -28, 180], [-6.25, -28, 180], [-9.4, -28, 180], [-12.5, -28, 180], [-15.65, -28, 180], [-18.75, -28, 180], [-21.9, -28, 180], [-25, -28, 180], [-28.15, -28, 180], [-31.25, -28, 180], [-34.4, -28, 180], [-37.5, -28, 180], [-40.65, -28, 180], [-43.75, -28, 180], [-46.9, -28, 180], [-50, -28, 180], [-50, -25, 0], [-46.9, -25, 0]];
track_5 = [[-47.85, -25, 0], [-45.7, -25, 0], [-43.55, -25, 0], [-41.35, -25, 0], [-39.2, -25, 0], [-37.05, -25, 0], [-34.9, -25, 0], [-32.75, -25, 0], [-30.6, -25, 0], [-28.4, -25, 0], [-26.25, -25, 0], [-24.1, -25, 0], [-21.95, -25, 0], [-19.8, -25, 0], [-17.65, -25, 0], [-15.5, -25, 0], [-13.3, -25, 0], [-11.15, -25, 0], [-9, -25, 0], [-6.85, -25, 0], [-4.7, -25, 0], [-2.55, -25, 0], [-0.35, -25, 0], [1.8, -25, 0], [3.95, -25, 0], [6.1, -25, 0], [8.25, -25, 0], [10.4, -25, 0], [12.6, -25, 0], [14.75, -25, 0], [16.9, -25, 0], [19.05, -25, 0], [21.2, -25, 0], [23.35, -25, 0], [25.55, -25, 0], [27.7, -25, 0], [29.85, -25, 0], [32, -25, 0], [34.15, -25, 0], [36.3, -25, 0], [38.5, -25, 0], [40.65, -25, 0], [42.8, -25, 0], [44.95, -25, 0], [47.1, -25, 0], [49.25, -25, 0], [51.45, -25, 0], [53.6, -25, 0], [55.75, -25, 0], [57.9, -25, 0], [60.05, -25, 0], [62.2, -25, 0], [64.35, -25, 0], [66.55, -25, 0], [68.7, -25, 0], [70.85, -25, 0], [73, -25, 0], [75.15, -25, 0], [77.3, -25, 0], [79.5, -25, 0], [81.65, -25, 0], [83.8, -25, 0], [85.95, -25, 0], [88.1, -25, 0], [90.25, -25, 0], [92.4, -25, 0], [94.6, -25, 0], [96.75, -25, 0], [98.9, -25, 0], [101.05, -25, 0], [103.2, -25, 0], [105.35, -25, 0], [107.55, -25, 0], [109.7, -25, 0], [111.85, -25, 0], [114, -25, 0], [116.15, -25, 0], [118.3, -25, 0], [120.5, -25, 0], [122.65, -25, 0], [124.8, -25, 0], [126.95, -25, 0], [129.1, -25, 0], [131.25, -25, 0], [133.4, -25, 0], [135.6, -25, 0], [137.75, -25, 0], [139.9, -25, 0], [142.05, -25, 0], [144.2, -25, 0], [146.35, -25, 0], [148.55, -25, 0], [150.7, -25, 0], [152.85, -25, 0], [155, -25, 0], [157.15, -25, 0], [159.3, -25, 0], [161.45, -25, 0], [163.65, -25, 0], [165.8, -25, 0], [167.95, -25, 0], [170.1, -25, 0], [172.25, -25, 0], [174.4, -25, 0], [176.6, -25, 0], [178.75, -25, 0], [180.9, -25, 0], [183.05, -25, 0], [185.2, -25, 0], [187.35, -25, 0], [189.5, -25, 0], [191.7, -25, 0], [193.85, -25, 0], [196, -25, 0], [198.15, -25, 0], [200.3, -25, 1], [202.45, -24.95, 0], [204.55, -24.95, -1], [206.65, -25, -2], [208.7, -25.1, -4], [210.8, -25.25, -5], [212.9, -25.45, -6], [215, -25.7, -8], [217.1, -26, -10], [219.15, -26.35, -12], [221.25, -26.8, -14], [223.3, -27.35, -16], [225.3, -28, -19], [227.3, -28.7, -22], [229.3, -29.55, -25], [231.2, -30.45, -28], [233.1, -31.55, -32], [234.85, -32.7, -36], [236.55, -34, -40], [238.15, -35.45, -45], [239.65, -37.05, -50], [241.05, -38.75, -54], [242.3, -40.6, -58], [243.4, -42.55, -62], [244.4, -44.55, -65], [245.3, -46.6, -69], [246.1, -48.65, -71], [246.75, -50.75, -74], [247.35, -52.9, -76], [247.9, -55.05, -78], [248.35, -57.2, -80], [248.7, -59.35, -81], [249.05, -61.5, -83], [249.3, -63.65, -84], [249.55, -65.85, -85], [249.7, -68, -86], [249.85, -70.15, -87], [249.95, -72.3, -88], [250, -74.5, -89], [250, -76.65, -90], [250, -78.8, -90], [250, -80.95, -90], [250, -83.1, -90], [250, -85.25, -90], [250, -87.45, -90], [250, -89.6, -90], [250, -91.75, -90], [250, -93.9, -90], [250, -96.05, -90], [250, -98.2, -90], [250, -100.35, -90], [250, -102.55, -90], [250, -104.7, -90], [250, -106.85, -90], [250, -109, -90], [250, -111.15, -90], [250, -113.3, -90], [250, -115.5, -90], [250, -117.65, -90], [250, -119.8, -90], [250, -121.95, -90], [250, -124.1, -90], [250, -126.25, -90], [250, -128.4, -90], [250, -130.6, -90], [250, -132.75, -90], [250, -134.9, -90], [250, -137.05, -90], [250, -139.2, -90], [250, -141.35, -90], [250, -143.55, -90], [250, -145.7, -90], [250, -147.85, -90], [250, -150, -90], [250, -152.15, -90], [250, -154.3, -90], [250, -156.5, -90], [250, -158.65, -90], [250, -160.8, -90], [250, -162.95, -90], [250, -165.1, -90], [250, -167.3, -90], [250, -169.45, -90], [250, -171.6, -90], [250, -173.75, -90], [250, -175.9, -89], [250.05, -178, -88], [250.15, -180.1, -87], [250.3, -182.2, -86], [250.5, -184.3, -85], [250.7, -186.4, -84], [251, -188.45, -82], [251.35, -190.55, -80], [251.75, -192.6, -79], [252.2, -194.7, -77], [252.75, -196.7, -75], [253.35, -198.75, -72], [254.05, -200.75, -70], [254.9, -202.75, -67], [255.8, -204.7, -64], [256.8, -206.55, -61], [257.9, -208.4, -57], [259.15, -210.15, -53], [260.55, -211.8, -49], [262.05, -213.35, -44], [263.7, -214.8, -40], [265.45, -216.15, -36], [267.3, -217.35, -32], [269.25, -218.45, -28], [271.2, -219.45, -25], [273.25, -220.3, -22], [275.35, -221.1, -20], [277.45, -221.8, -17], [279.55, -222.4, -15], [281.7, -222.9, -13], [283.85, -223.35, -11], [286, -223.75, -10], [288.15, -224.05, -8], [290.3, -224.35, -7], [292.45, -224.55, -6], [294.6, -224.75, -5], [296.8, -224.85, -4], [298.95, -224.95, -3], [301.1, -225, 0], [303.25, -225, 0], [305.4, -225, 0], [307.6, -225, 0], [309.75, -225, 0], [311.9, -225, 0], [314.05, -225, 0], [316.2, -225, 0], [318.35, -225, 0], [320.5, -225, 0], [322.7, -225, 0], [324.85, -225, 0], [327, -225, 0], [329.15, -225, 0], [331.3, -225, 0], [333.45, -225, 0], [335.65, -225, 0], [337.8, -225, 0], [339.95, -225, 0], [342.1, -225, 0], [344.25, -225, 0], [346.4, -225, 0], [348.55, -225, 0], [350.75, -225, 0], [352.9, -225, 0], [355.05, -225, 0], [357.2, -225, 0], [359.35, -225, 0], [361.55, -225, 0], [363.7, -225, 0], [365.85, -225, 0], [368, -225, 0], [370.15, -225, 0], [372.3, -225, 0], [374.5, -225, 0], [376.65, -225, 0], [378.8, -225, 0], [380.95, -225, 0], [383.1, -225, 0], [385.25, -225, 0], [387.4, -225, 0], [389.6, -225, 0], [391.75, -225, 0], [393.9, -225, 0], [396.05, -225, 0], [398.2, -225, 0], [400.35, -225, 0], [402.55, -225, 0], [404.7, -225, 0], [406.85, -225, 0], [409, -225, 0], [411.15, -225, 0], [413.3, -225, 0], [415.5, -225, 0], [417.65, -225, 0], [419.8, -225, 0], [421.95, -225, 0], [424.1, -225, 0], [426.25, -225, 0], [428.4, -225, 0], [430.6, -225, 0], [432.75, -225, 0], [434.9, -225, 0], [437.05, -225, 0], [439.2, -225, 0], [441.35, -225, 0], [443.55, -225, 0], [445.7, -225, 0], [447.85, -225, 0], [450, -225, 0], [-50, -25, 0], [-47.85, -25, 0]];
trace("track data loaded");
terrain_data = [[99, 20, 20, 20, 20, 0], [0, 20, 20, 20, 20, 0], [0, 20, 20, 20, 20, 0], [0, 20, 20, 20, 20, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [10, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 10, 10, 10, 10, 0], [0, 31, 10, 10, 10, 0], [3, 31, 31, 31, 31, 0], [3, 41, 10, 5, 1, 0], [0, 71, 10, 2, 72, 0], [5, 1, 1, 4, 61, 0], [0, 41, 41, 61, 62, 0], [0, 10, 61, 62, 10, 0], [3, 61, 62, 5, 1, 0], [0, 62, 41, 2, 41, 0], [5, 1, 1, 4, 10, 0], [0, 10, 10, 10, 72, 0], [6, 1, 1, 1, 1, 0], [2, 71, 10, 10, 10, 0], [0, 65, 41, 10, 10, 0], [0, 64, 65, 41, 72, 0], [3, 10, 64, 65, 41, 0], [0, 71, 10, 64, 65, 0], [0, 10, 10, 10, 64, 0], [0, 65, 10, 10, 10, 0], [0, 64, 65, 41, 61, 0], [2, 71, 64, 63, 62, 0], [0, 10, 41, 10, 41, 0], [0, 10, 10, 10, 10, 0], [6, 1, 1, 1, 1, 0], [3, 10, 10, 5, 1, 0], [0, 10, 41, 2, 72, 0], [5, 1, 1, 4, 10, 0], [0, 10, 10, 10, 10, 0], [2, 11, 12, 11, 12, 0], [0, 20, 20, 20, 20, 0], [0, 20, 20, 20, 20, 0], [0, 20, 20, 20, 20, 0], [0, 20, 20, 20, 20, 0]];
trace("terrain data loaded");
ship.prototype = new MovieClip();
ship.prototype.moveUp = function () {
if (this.target_y > -380) {
this.target_y = this.target_y - 5;
}
};
ship.prototype.moveDown = function () {
if (this.target_y < -20) {
this.target_y = this.target_y + 5;
}
};
ship.prototype.moveLeft = function () {
if (this.target_x > 20) {
this.target_x = this.target_x - 8;
}
};
ship.prototype.moveRight = function () {
if (this.target_x < 380) {
this.target_x = this.target_x + 8;
}
};
ship.prototype.checkKeyboard = function (nr) {
if (Key.isDown(39)) {
this.moveRight();
}
if (Key.isDown(37)) {
this.moveLeft();
}
if (Key.isDown(38)) {
this.moveUp();
}
if (Key.isDown(40)) {
this.moveDown();
}
};
ship.prototype.moving = function () {
this._x = this._x + ((this.target_x - this._x) * 0.2);
this._y = this._y + ((this.target_y - this._y) * 0.2);
this.shadow._x = this._x;
this.shadow._y = this._y;
this.checkKeyboard();
};
ship.prototype.startShip = function () {
this.weapon.gotoAndStop(this.ammo_type);
this.onEnterFrame = this.moving;
};
ship.prototype.stopShip = function () {
delete this.onEnterFrame;
};
ship.prototype.upgradeWeapon = function () {
this.weapon.gotoAndStop(++this.ammo_type);
};
ship.prototype.fireAmmo = function () {
_root.layer_id++;
this.ammo = this._parent.attachMovie("ammo", "ammo" + _root.layer_id, 10000 + _root.layer_id, {_x:this._x, _y:this._y - 10, ammo_type:this.ammo_type});
this.ammo.startAmmo();
if (ammo_type_tmp == 2) {
}
};
ship.prototype.getDir = function (tx, ty) {
return(Math.atan2(this._y - ty, this._x - tx));
};
ship.prototype.damage = function (damage) {
this._parent.shield.removeShield(damage);
if (!this._parent.shield.checkShield()) {
this.kill();
} else {
this.punch();
}
};
ship.prototype.kill = function () {
this.gotoAndPlay("death");
this.ammo_type = 1;
if (this._parent.shield.removeLive()) {
this._parent.shield.addShield(100);
} else {
this._parent._parent.gotoAndStop("end");
}
};
ship.prototype.punch = function () {
this.gotoAndPlay("punch");
};
Object.registerClass("ship", ship);
trace("ship loaded");
tank.prototype = new MovieClip();
tank.prototype.moving = function () {
this.y_add = this.y_add + _global.speed;
this.nr++;
if (this.nr >= this.dummy.length) {
this.removeTank();
}
if (!this.dead) {
this.hit.x = this.dummy[this.nr][0];
this.hit.y = this.dummy[this.nr][1];
this._rotation = this.dummy[this.nr][2];
}
this._x = this.hit.x;
this._y = (this.hit.y - 425) + this.y_add;
if (!this.dead) {
this.collisionTest();
}
};
tank.prototype.collisionTest = function () {
if (this._parent._parent.ship.hitTest2(this._x, this._y, 20)) {
this._parent._parent.ship.damage(70);
this.kill();
}
};
tank.prototype.startTank = function (target_dummy, interva) {
this.y_add = 0;
this.dummy = target_dummy;
this.onEnterFrame = this.moving;
this.mineInterval = setInterval(this, "fireMine", interva);
};
tank.prototype.stopTank = function () {
delete this.onEnterFrame;
};
tank.prototype.removeTank = function () {
this.removeMovieClip();
};
tank.prototype.kill = function () {
clearInterval(this.mineInterval);
this.gotoAndPlay("death");
this.dead = true;
};
tank.prototype.punch = function () {
this.gotoAndPlay("punch");
};
tank.prototype.fireMine = function () {
_root.layer_id++;
this.mine = this._parent.attachMovie("mine", "mine" + _root.layer_id, 10000 + _root.layer_id, {_x:this._x, _y:this._y});
this.dir = this._parent._parent.ship.getDir(this._x, this._y);
this.mine.startMine(this.dir, 15);
this.turret.gun.gotoAndPlay(2);
this.turret._rotation = Math.radToDeg(this.dir) - this._rotation;
};
tank.prototype.damage = function (damage) {
this.hp = this.hp - damage;
if (this.hp <= 0) {
this.kill();
this._parent._parent.score.updateScore(200);
} else {
this.punch();
this._parent._parent.score.updateScore(10);
}
};
Object.registerClass("tank", tank);
trace("tank loaded");
bonus.prototype = new MovieClip();
bonus.prototype.moving = function () {
if (this._y > 400) {
this.remove();
}
this._y = this._y + _global.speed;
this.collisionTest();
};
bonus.prototype.collisionTest = function () {
if (this._parent._parent.ship.hitTest2(this._x, this._y, 20)) {
this._parent._parent.ship.upgradeWeapon();
this.remove();
}
};
bonus.prototype.begin = function (bonus_type) {
this._y = this._y - 50;
this.bonus_type = bonus_type;
this.onEnterFrame = this.moving;
};
bonus.prototype.end = function () {
delete this.onEnterFrame;
};
bonus.prototype.remove = function () {
this.end();
this.removeMovieClip();
};
bonus.prototype.kill = function () {
this.gotoAndPlay("death");
this.dead = true;
};
Object.registerClass("bonus", bonus);
trace("bonus loaded");
turret.prototype = new MovieClip();
turret.prototype.moving = function () {
if (this._y > 50) {
this.removeTurret();
this.removeMovieClip();
trace("remove turret");
}
this._y = this._y + _global.speed;
if (!this.dead) {
this.collisionTest();
}
};
turret.prototype.collisionTest = function () {
if (this._parent._parent.ship.hitTest2(this._x, this._y, 20)) {
this._parent._parent.ship.damage(70);
this.kill();
}
};
turret.prototype.startTurret = function (interval) {
this.y_add = 0;
this._x = this._x + 50;
this._y = this._y + 50;
this.dummy = target_dummy;
this.onEnterFrame = this.moving;
this.mineInterval = setInterval(this, "fireMine", interval);
};
turret.prototype.stopTurret = function () {
delete this.onEnterFrame;
};
turret.prototype.removeTurret = function () {
clearInterval(this.mineInterval);
this.removeMovieClip();
};
turret.prototype.kill = function () {
clearInterval(this.mineInterval);
this.gotoAndPlay("death");
this.dead = true;
};
turret.prototype.punch = function () {
this.gotoAndPlay("punch");
};
turret.prototype.fireMine = function () {
_root.layer_id++;
this.mine = this._parent.attachMovie("mine", "mine" + _root.layer_id, _root.layer_id, {_x:this._x, _y:this._y, ammo_type:2});
this.dir = this._parent._parent.ship.getDir(this._x, this._y);
trace(this._parent._parent._parent.ship);
this.mine.startMine(this.dir, 20);
this.gun.gotoAndPlay(2);
this._rotation = Math.radToDeg(this.dir);
};
turret.prototype.damage = function (damage) {
this.hp = this.hp - damage;
if (this.hp <= 0) {
this.kill();
this._parent._parent.score.updateScore(200);
} else {
this.punch();
this._parent._parent.score.updateScore(10);
}
};
Object.registerClass("turret", turret);
trace("turret loaded");
fighter.prototype = new MovieClip();
fighter.prototype.moving = function () {
this.y_add = this.y_add + _global.speed;
this.nr++;
if (this.nr >= this.dummy.length) {
this.removeFighter();
}
if (!this.dead) {
this.hit.x = this.dummy[this.nr][0];
this.hit.y = this.dummy[this.nr][1];
this._rotation = this.dummy[this.nr][2];
}
this._x = this.hit.x;
this._y = (this.hit.y - 400) + this.y_add;
if (!this.dead) {
this.collisionTest();
}
};
fighter.prototype.collisionTest = function () {
if (this._parent._parent.ship.hitTest2(this._x, this._y, 20)) {
this._parent._parent.ship.damage(50);
this.kill();
}
};
fighter.prototype.startFighter = function (target_dummy, nr, fighter_type) {
this.fighter_type = fighter_type;
this.body.gotoAndStop(this.fighter_type);
this.nr = nr;
this.y_add = 0;
this.dummy = target_dummy;
this.onEnterFrame = this.moving;
this.mineInterval = setInterval(this, "fireMine", 5000);
};
fighter.prototype.stopFighter = function () {
delete this.onEnterFrame;
};
fighter.prototype.removeFighter = function () {
this.removeMovieClip();
};
fighter.prototype.kill = function () {
clearInterval(this.mineInterval);
this.gotoAndPlay("death");
this.dead = true;
};
fighter.prototype.punch = function () {
this.gotoAndPlay("punch");
};
fighter.prototype.damage = function (damage) {
this.hp = this.hp - damage;
if (this.hp <= 0) {
this.kill();
this.bonus_type = this._parent._parent.score.updateScore(100);
if (this.bonus_type > 0) {
this.bonus = this._parent.attachMovie("bonus", "bonus" + _root.layer_id, 10000 + _root.layer_id, {_x:this._x, _y:this._y});
this.bonus.begin(this.bonus_type);
}
} else {
this.punch();
this._parent._parent.score.updateScore(10);
}
};
fighter.prototype.fireMine = function () {
_root.layer_id++;
this.mine = this._parent.attachMovie("mine", "mine" + _root.layer_id, _root.layer_id, {_x:this._x, _y:this._y});
this.dir = this._parent._parent.ship.getDir(this._x, this._y);
this.mine.startMine(this.dir);
};
Object.registerClass("fighter", fighter);
trace("fighter loaded");
boss.prototype = new MovieClip();
boss.prototype.moving = function () {
this.y_add++;
this.target_x = this._parent._parent.ship._x;
if (!this.dead) {
this._x = this._x + ((this.target_x - this._x) * 0.01);
}
if (!this.dead) {
this.collisionTest();
}
};
boss.prototype.collisionTest = function () {
if (this._parent._parent.ship.hitTest2(this._x, this._y, 20)) {
this._parent._parent.ship.damage(50);
this.kill();
}
};
boss.prototype.begin = function (fighter_type, hp) {
this.max_hp = hp;
this.hp = hp;
this.fighter_type = fighter_type;
this.body.gotoAndStop(this.fighter_type);
this.y_add = 0;
this.onEnterFrame = this.moving;
this.mineInterval = setInterval(this, "fireMine", this.timer);
};
boss.prototype.stopFighter = function () {
delete this.onEnterFrame;
};
boss.prototype.removeFighter = function () {
this.removeMovieClip();
};
boss.prototype.kill = function () {
clearInterval(this.mineInterval);
this.gotoAndPlay("death");
this.dead = true;
};
boss.prototype.punch = function () {
this.gotoAndPlay("punch");
};
boss.prototype.damage = function (damage) {
this.hp = this.hp - damage;
this.health.hp._xscale = (100 * this.hp) / this.max_hp;
trace(this.hp);
if (this.hp <= 0) {
this.kill();
this.bonus_type = this._parent._parent.score.updateScore(this.max_hp * 2);
if (this.bonus_type > 0) {
this.bonus = this._parent.attachMovie("bonus", "bonus" + _root.layer_id, 10000 + _root.layer_id, {_x:this._x, _y:this._y});
this.bonus.begin(this.bonus_type);
}
} else {
this.punch();
this._parent._parent.score.updateScore(10);
}
};
boss.prototype.fireMine = function () {
clearInterval(this.mineInterval);
if (this.timer > 400) {
this.timer = this.timer - 30;
}
this.mineInterval = setInterval(this, "fireMine", this.timer);
_root.layer_id++;
this.mine = this._parent.attachMovie("mine", "mine" + _root.layer_id, 10000 + _root.layer_id, {_x:this._x, _y:this._y, ammo_type:10});
this.dir = this._parent._parent.ship.getDir(this._x, this._y);
this.mine.startMine(this.dir, 10);
};
Object.registerClass("boss", boss);
trace("boss loaded");
ammo.prototype = new MovieClip();
ammo.prototype.moveUp = function (nr) {
if (this._y > -400) {
this._y = this._y - nr;
} else {
this.stopAmmo();
}
};
ammo.prototype.moving = function () {
this.moveUp(10);
this.collisionTest();
};
ammo.prototype.collisionTest = function (nr) {
this.hit.x = this._x;
this.hit.y = this._y;
this._parent.localToGlobal(this.hit);
for (e in this._parent.enemies) {
if (this._parent.enemies[e].hitTest(this.hit.x, this.hit.y, true)) {
if ((!this._parent.enemies[e].dead) && (this._parent.enemies[e].killable)) {
this._parent.enemies[e].damage(20 * this.ammo_type);
this.explosion();
}
break;
}
}
};
ammo.prototype.startAmmo = function () {
this.gotoAndStop(this.ammo_type);
this.onEnterFrame = this.moving;
};
ammo.prototype.stopAmmo = function () {
delete this.onEnterFrame;
this.removeMovieClip();
};
ammo.prototype.explosion = function () {
delete this.onEnterFrame;
this.ex = this._parent.explosions.attachMovie("explosion", "explosion" + _root.explosion_count, ++_root.explosion_count, {_x:this._x, _y:this._y});
this.ex.playSound("explosion1", 100);
this._parent._parent.score.hitAdd();
this.removeMovieClip();
};
Object.registerClass("ammo", ammo);
mine.prototype = new MovieClip();
mine.prototype.moving = function () {
if (this._y > 0) {
this._y = this._y - nr;
} else {
this.stopAmmo();
}
};
mine.prototype.moving = function () {
this._x = this._x + this.x_step;
this._y = this._y + (this.y_step + _global.speed);
if ((((this._x > 400) || (this._x < 0)) || (this._y < -400)) || (this._y > 0)) {
this.stopMine();
}
this.collisionTest();
};
mine.prototype.collisionTest = function (nr) {
if (this._parent._parent.ship.hitTest2(this._x, this._y, 20)) {
this._parent._parent.ship.damage(30);
this.explosion();
}
};
mine.prototype.startMine = function (dir, start_add) {
this.dir = dir;
this.gotoAndStop(this.ammo_type);
this._rotation = Math.radToDeg(this.dir);
this.x_step = this.speed * Math.cos(this.dir);
this.y_step = this.speed * Math.sin(this.dir);
this._x = this._x + (start_add * this.x_step);
this._y = this._y + (start_add * this.y_step);
this.onEnterFrame = this.moving;
};
mine.prototype.stopMine = function () {
delete this.onEnterFrame;
this.removeMovieClip();
};
mine.prototype.explosion = function () {
this.ex = this._parent._parent.explosions.attachMovie("explosion", "explosion" + _root.explosion_count, ++_root.explosion_count, {_x:this._x, _y:this._y});
this.ex.playSound("explosion1", 100);
this.stopMine();
};
mine.prototype.damage = function (damage) {
this.kill();
this._parent._parent.score.updateScore(1);
};
mine.prototype.kill = function () {
this.stopMine();
};
mine.prototype.punch = function () {
this.stopMine();
};
Object.registerClass("mine", mine);
trace("ammo loaded");
Math.radToDeg = function (rad) {
return((rad * 180) / Math.PI);
};
Math.degToRad = function (deg) {
return((deg * Math.PI) / 180);
};
Math.distance = function (x, y) {
return(Math.sqrt((x * x) + (y * y)));
};
Math.volumeDistance = function (x, y) {
this.d = Math.sqrt(((x - _root.body.player._x) * (x - _root.body.player._x)) + ((y - _root.body.player._y) * (y - _root.body.player._y))) / 10;
if (this.d > 80) {
return(0);
}
return(80 - this.d);
};
Math.smalest = function (d0, d1, d2) {
if (d0 < d1) {
if (d0 < d2) {
return(0);
}
return(2);
}
if (d1 < d2) {
return(1);
}
return(2);
};
MovieClip.prototype.playSound = function (id, vol) {
if ((vol > 5) && (vol <= 100)) {
_root.sound_count++;
this.soundClip = _root.sounds.createEmptyMovieClip("sound" + _root.sound_count, _root.sound_count);
this.sound_id = new Sound(this.soundClip);
this.sound_id.attachSound(id);
this.sound_id.setVolume(vol);
this.sound_id.start();
this.sound_id.onSoundComplete = function () {
this.soundClip.removeMovieClip();
};
}
};
trace("sounds.as loaded");
keyboard.prototype.shipKeysStart = function () {
this.onKeyDown = this.shipDown;
};
keyboard.prototype.nullKeys = function () {
delete this.onKeyDown;
delete this.onKeyUp;
};
keyboard.prototype.shipDown = function () {
switch (Key.getCode()) {
case Key.SPACE :
if (ammonition.checkAmmo()) {
ship.fireAmmo();
ammonition.removeAmmo();
}
this.onKeyUp = this.fireAmmo;
delete this.onKeyDown;
return;
case Key.ESCAPE :
this.power_delta = bubbleRadar.getPower();
bubbleRadar.powerDown();
this.onKeyUp = this.weaponUp;
delete this.onKeyDown;
}
};
keyboard.prototype.fireAmmo = function () {
this.onKeyDown = this.shipDown;
delete this.onKeyUp;
};
keyboardListener = new keyboard();
Key.addListener(keyboardListener);
Stage.showMenu = false;
_quality = "HIGH";
Stage.scaleMode = "noScale";
Stage.align = "CC";
Frame 10
stop();
this.onEnterFrame = function () {
this.loading = this.getBytesLoaded();
this.total = this.getBytesTotal();
this.percent = int((100 * this.loading) / this.total);
trace((("load:" + this.loading) + "/") + this.total);
trace("percent:" + this.percent);
this.loader.setPercent(this.percent);
if (this.percent >= 100) {
this.gotoAndStop("menu");
delete this.onEnterFrame;
}
};
Frame 19
stop();
_global.level_nr = 1;
_root.enemies_id = 10000;
_root.layer_id = 1000000 /* 0x0F4240 */;
this.but_action.onPress = function () {
this._parent.gotoAndStop("game");
};
this.but_action.onRollOver = function () {
this.shake();
};
this.but_action.onRollOut = function () {
this.stopShake();
};
this.but_action.shake = function () {
this.x = this._x;
this.y = this._y;
this.onEnterFrame = function () {
this._x = (this.x + random(10)) - 5;
this._y = (this.y + random(6)) - 3;
};
};
this.but_action.stopShake = function () {
delete this.onEnterFrame;
this._x = this.x;
this._y = this.y;
};
Frame 34
stop();
_global.level_name = ("level" + _global.level_nr) + ".txt";
this.but_level.body.level_id = "LEVEL:" + _global.level_nr;
keyboardListener.shipKeysStart();
this.terrain = this.body.attachMovie("terrainGame", "terrain", 10, {_x:0, _y:0});
this.ship = this.body.attachMovie("ship", "ship", 1800000, {_x:200, _y:-200});
this.ship.startShip();
this.ammonition = this.body.attachMovie("ammonition", "ammonition", 12000001, {_x:400, _y:0});
this.ammonition.startAmmo(800);
this.shield = this.body.attachMovie("shield", "shield", 12000002, {_x:0, _y:0});
this.shield.startShield(5000);
this.score = this.body.attachMovie("score", "score", 12000003, {_x:400, _y:-400});
levelAdres = new LoadVars();
levelAdres.onLoad = function (success) {
if (success) {
_global.terrain_data = parseLevel(this.terrain_data);
_global.terrain_background = this.terrain_background;
terrain.loadTerrainData(_global.terrain_data, _global.terrain_background);
terrain.startTerrain();
} else {
trace("loadFailed");
}
};
_global.parseLevel = function (data_to_parse) {
t1 = data_to_parse.split("#");
t2 = new Array();
i = 0;
while (i < t1.length) {
t2.push(t1[i].split("|"));
i++;
}
return(t2);
};
this.levelAdres.load("levels/" + _global.level_name);
Frame 44
stop();
_global.level_nr++;
if (_global.level_nr > 3) {
gotoAndStop (53);
}
_root.enemies_id = 10000;
_root.layer_id = 1000000 /* 0x0F4240 */;
this.but_next.shake = function () {
this.x = this._x;
this.y = this._y;
this.onEnterFrame = function () {
this._x = (this.x + random(10)) - 5;
this._y = (this.y + random(6)) - 3;
};
};
this.but_next.stopShake = function () {
delete this.onEnterFrame;
this._x = this.x;
this._y = this.y;
};
this.but_next.onPress = function () {
this._parent.gotoAndStop("game");
};
this.but_next.onRollOver = function () {
this.shake();
};
this.but_next.onRollOut = function () {
this.stopShake();
};
Frame 53
stop();
_global.level_nr = 1;
_root.enemies_id = 10000;
_root.layer_id = 1000000 /* 0x0F4240 */;
this.sc = "SCORE: " + _global.score;
this.acc = "ACCURACY: " + _global.accuracy;
this.but_gameover.shake = function () {
this.x = this._x;
this.y = this._y;
this.onEnterFrame = function () {
this._x = (this.x + random(10)) - 5;
this._y = (this.y + random(6)) - 3;
};
};
this.but_gameover.stopShake = function () {
delete this.onEnterFrame;
this._x = this.x;
this._y = this.y;
};
this.but_gameover.onPress = function () {
this._parent.gotoAndStop("menu");
};
this.but_gameover.onRollOver = function () {
this.shake();
};
this.but_gameover.onRollOut = function () {
this.stopShake();
};
Instance of Symbol 406 MovieClip in Frame 53
//component parameters
onClipEvent (initialize) {
scr = "_global.score";
}
Symbol 7 MovieClip [bonus] Frame 23
stop();
Symbol 12 MovieClip [mine] Frame 1
this._parent.killable = true;
stop();
Symbol 12 MovieClip [mine] Frame 2
this._parent.killable = true;
Symbol 12 MovieClip [mine] Frame 3
this._parent.killable = false;
Symbol 12 MovieClip [mine] Frame 10
this._parent.killable = false;
Symbol 44 MovieClip [tex_41] Frame 1
stop();
trace("active=" + this.active);
this.begin = function () {
trace("begin turret");
_root.enemies_id = _root.enemies_id + 3;
this.turret = this._parent._parent.enemies.attachMovie("turret", "turret" + _root.enemies_id, _root.enemies_id - 1000, {_x:this._x, _y:this._y + this._parent._y});
this.turret.startTurret(3000);
};
this.end = function () {
trace("end turret");
this.turret.stopTurret();
this.turret.removeTurret();
};
if (this.active) {
this.begin();
trace("costam");
}
Symbol 81 MovieClip [enemy_12] Frame 1
stop();
this.begin = function () {
this.boss = this._parent._parent.enemies.attachMovie("boss", "boss" + (_root.enemies_id++), _root.enemies_id);
this.boss.begin(3, 3000);
};
this.end = function () {
this.removeMovieClip();
};
if (this.active) {
this.begin();
this.end();
}
Symbol 83 MovieClip [enemy_11] Frame 1
stop();
this.begin = function () {
this.boss = this._parent._parent.enemies.attachMovie("boss", "boss" + (_root.enemies_id++), _root.enemies_id);
this.boss.begin(2, 2000);
};
this.end = function () {
this.removeMovieClip();
};
if (this.active) {
this.begin();
this.end();
}
Symbol 93 MovieClip [enemy_4] Frame 1
stop();
this.begin = function () {
_root.enemies_id++;
this.fighter1 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter1.startFighter(_root.track_1, 0, 1);
_root.enemies_id++;
this.fighter2 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter2.startFighter(_root.track_1, -15, 1);
_root.enemies_id++;
this.fighter3 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter3.startFighter(_root.track_1, -30, 1);
_root.enemies_id++;
this.fighter4 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter4.startFighter(_root.track_1, -45, 1);
};
this.end = function () {
this.removeMovieClip();
};
if (this.active) {
this.begin();
this.end();
}
Symbol 95 MovieClip [enemy_1] Frame 1
stop();
this.begin = function () {
trace(_root.terrain);
_root.terrain.stopTerrain();
};
if (this.active) {
this.begin();
}
Symbol 106 MovieClip [tank4] Frame 1
stop();
this.hp = 100;
Symbol 106 MovieClip [tank4] Frame 5
gotoAndStop (1);
Symbol 106 MovieClip [tank4] Frame 7
gotoAndStop (1);
Symbol 106 MovieClip [tank4] Frame 51
this.removeMovieClip();
Symbol 109 MovieClip Frame 1
this.swapDepths(1500000);
Symbol 112 MovieClip [explosion] Frame 15
this.removeMovieClip();
Symbol 126 MovieClip Frame 8
stop();
Symbol 135 MovieClip [enemy_10] Frame 1
stop();
this.begin = function () {
this.boss = this._parent._parent.enemies.attachMovie("boss", "boss" + (_root.enemies_id++), _root.enemies_id);
this.boss.begin(1, 1500);
};
this.end = function () {
this.removeMovieClip();
};
if (this.active) {
this.begin();
this.end();
}
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 2
stop();
Symbol 136 MovieClip Frame 3
stop();
Symbol 136 MovieClip Frame 4
stop();
Symbol 156 MovieClip Frame 29
stop();
Symbol 159 MovieClip Frame 44
gotoAndPlay (10);
Symbol 161 MovieClip [boss] Frame 1
stop();
Symbol 161 MovieClip [boss] Frame 6
gotoAndStop (1);
Symbol 161 MovieClip [boss] Frame 11
this.dead = true;
Symbol 161 MovieClip [boss] Frame 168
stop();
this._parent._parent._parent.gotoAndStop("levelup");
this.removeMovieClip();
Symbol 166 MovieClip [bonus] Frame 23
stop();
Symbol 173 MovieClip Frame 1
stop();
Symbol 177 MovieClip [turret] Frame 1
stop();
Symbol 177 MovieClip [turret] Frame 8
gotoAndStop (1);
Symbol 177 MovieClip [turret] Frame 45
stop();
Symbol 184 MovieClip Frame 1
stop();
Symbol 185 MovieClip [ship] Frame 1
stop();
Symbol 185 MovieClip [ship] Frame 10
gotoAndStop (1);
Symbol 185 MovieClip [ship] Frame 47
gotoAndStop (1);
Symbol 187 MovieClip [enemy_0] Frame 1
stop();
Symbol 190 MovieClip [enemy_3] Frame 1
stop();
this.begin = function () {
_root.enemies_id++;
this.fighter1 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter1.startFighter(_root.track_2, 0, 2);
_root.enemies_id++;
this.fighter2 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter2.startFighter(_root.track_2, -15, 2);
_root.enemies_id++;
this.fighter3 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter3.startFighter(_root.track_2, -30, 2);
_root.enemies_id++;
this.fighter4 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter4.startFighter(_root.track_2, -45, 2);
};
this.end = function () {
this.removeMovieClip();
};
if (this.active) {
this.begin();
this.end();
}
Symbol 194 MovieClip [mine] Frame 1
this._parent.killable = true;
stop();
Symbol 194 MovieClip [mine] Frame 2
this._parent.killable = true;
Symbol 194 MovieClip [mine] Frame 3
this._parent.killable = false;
Symbol 194 MovieClip [mine] Frame 10
this._parent.killable = false;
Symbol 200 MovieClip [ammo] Frame 1
stop();
Symbol 203 MovieClip Frame 10
gotoAndPlay (2);
Symbol 207 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 10
stop();
Symbol 219 MovieClip [tank] Frame 1
stop();
Symbol 219 MovieClip [tank] Frame 6
gotoAndStop (1);
Symbol 219 MovieClip [tank] Frame 11
this.dead = true;
Symbol 219 MovieClip [tank] Frame 51
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 222 MovieClip [fighter] Frame 1
stop();
Symbol 222 MovieClip [fighter] Frame 6
gotoAndStop (1);
Symbol 222 MovieClip [fighter] Frame 11
this.dead = true;
Symbol 222 MovieClip [fighter] Frame 51
stop();
Symbol 224 MovieClip [enemy_2] Frame 1
stop();
this.begin = function () {
_root.enemies_id++;
this.fighter1 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter1.startFighter(_root.track_2, 0, 1);
_root.enemies_id++;
this.fighter2 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter2.startFighter(_root.track_2, -15, 1);
_root.enemies_id++;
this.fighter3 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter3.startFighter(_root.track_2, -30, 1);
_root.enemies_id++;
this.fighter4 = this._parent._parent.enemies.attachMovie("fighter", "fighter" + _root.enemies_id, _root.enemies_id);
this.fighter4.startFighter(_root.track_2, -45, 1);
};
this.end = function () {
this.removeMovieClip();
};
if (this.active) {
this.begin();
this.end();
}
Symbol 226 MovieClip [enemy_6] Frame 1
stop();
this.begin = function () {
_root.enemies_id++;
this.tank = this._parent._parent.enemies.attachMovie("tank", "tank" + _root.enemies_id, _root.enemies_id + 9000);
this.tank.startTank(_root.track_5, 2000);
};
this.end = function () {
this.removeMovieClip();
};
if (this.active) {
this.begin();
this.end();
}
Symbol 228 MovieClip [enemy_5] Frame 1
stop();
this.begin = function () {
_root.enemies_id++;
this.tank = this._parent._parent.enemies.attachMovie("tank", "tank" + _root.enemies_id, _root.enemies_id + 9000);
this.tank.startTank(_root.track_6, 2000);
};
this.end = function () {
this.removeMovieClip();
};
if (this.active) {
this.begin();
this.end();
}
Symbol 234 MovieClip Frame 1
Stage.scaleMode = "noScale";
fscommand ("trapallkeys", true);
Stage.showMenu = false;
this.uu = _root._url;
var a = _root._url.split("/");
var i = 0;
while (i < a.length) {
if (a[i] == "files") {
_root.gid = a[i + 1];
}
i++;
}
if ((a[2] == "www.netstupidity.com") || (a[2] == "netstupidity.com")) {
_root.ligin = 1;
}
_root.__url = "http://www.netstupidity.com/games/hof/";
_root.loadVariables((_root.__url + "hof_bsc.php?id=") + _root.gid);
_root.prc = 0;
this.onEnterFrame = function () {
var ld = _root.getBytesLoaded();
var tt = _root.getBytesTotal();
var pr = ((100 * ld) / tt);
this.pasek._xscale = pr;
var b = Math.round(pr / 20);
if (pr >= 100) {
this.onEnterFrame = null;
this._parent.play();
}
};
Symbol 248 MovieClip Frame 140
stop();
Symbol 287 MovieClip Frame 1
this.t = getTimer();
this.tm = 0;
this.onEnterFrame = function () {
if (_root._framesloaded < 2) {
this.t = getTimer();
return(undefined);
}
this.tm = this.tm + (getTimer() - this.t);
var tt = Math.round(this.tm / 33);
if (tt < 1) {
this.stop();
} else {
this.t = getTimer();
if (tt >= 145) {
this.onEnterFrame = null;
this.gotoAndStop(145);
_root.play();
} else {
this.gotoAndStop(tt);
}
}
};
stop();
Symbol 290 MovieClip Frame 1
_root.stop();
stop();
Symbol 290 MovieClip Frame 2
stop();
Symbol 296 MovieClip Frame 1
stop();
this.setPercent = function (percent) {
this.loader_text = percent + "%";
this.gotoAndStop(percent + 1);
};
Symbol 299 MovieClip Frame 1
Symbol 299 MovieClip Frame 29
stop();
Symbol 306 MovieClip Frame 1
this._visible = _root.ligin == undefined;
this.onPress = function () {
getURL ("http://www.netstupidity.com");
};
Symbol 309 MovieClip Frame 1
this.swapDepths(90);
Symbol 311 MovieClip Frame 1
this.swapDepths(97);
Symbol 313 MovieClip Frame 1
this.swapDepths(98);
Symbol 317 MovieClip Frame 1
this.swapDepths(12000000);
Symbol 321 MovieClip Frame 1
this.max_pos = 100;
this.swapDepths(12000020);
this.setPos = function () {
this.but_pos._y = (-4 * this._parent.terrain._y) / this.max_pos;
};
Symbol 322 MovieClip Frame 1
Symbol 325 MovieClip Frame 1
this.shake = function () {
this.x = this._x;
this.y = this._y;
this.onEnterFrame = function () {
this._x = (this.x + random(10)) - 5;
this._y = (this.y + random(6)) - 3;
};
};
this.stopShake = function () {
delete this.onEnterFrame;
this._x = this.x;
this._y = this.y;
};
this.shake();
Symbol 325 MovieClip Frame 63
stop();
this.stopShake();
Symbol 347 Button
on (press) {
this.gotoAndStop("weekly");
}
Symbol 348 Button
on (press) {
this.gotoAndStop("daily");
}
Symbol 349 Button
on (press) {
this.gotoAndStop("hourly");
}
Symbol 352 Button
on (press) {
this.gotoAndStop("monthly");
}
Symbol 357 Button
on (press) {
this.gotoAndStop("daily");
}
Symbol 360 MovieClip Frame 1
this._parent.tp = 2592000 /* 0x278D00 */;
this._parent.tc = 0;
this._parent.reload();
stop();
Symbol 360 MovieClip Frame 2
this._parent.tp = 604800 /* 0x093A80 */;
this._parent.tc = 0;
this._parent.reload();
Symbol 360 MovieClip Frame 3
this._parent.tp = 86400 /* 0x015180 */;
this._parent.tc = 0;
this._parent.reload();
Symbol 360 MovieClip Frame 4
this._parent.tp = 3600;
this._parent.tc = 0;
this._parent.reload();
Symbol 367 Button
on (press) {
this.tc--;
this.reload();
}
Symbol 372 Button
on (press) {
this.tc = ((this.tc < 0) ? (this.tc + 1) : 0);
this.reload();
}
Symbol 375 Button
on (press) {
if (this.submitted == false) {
this.loadVariables((((this.__url + "hof_put.php?id=") + this.gid) + "&s=") + this.sc);
}
}
Symbol 379 Button
on (press) {
this._parent.l = 10;
this._parent.reload();
this.gotoAndStop(2);
}
Symbol 382 Button
on (press) {
this._parent.l = 100;
this._parent.reload();
this.gotoAndStop(1);
}
Symbol 383 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 18
stop();
Symbol 400 MovieClip Frame 1
function reset() {
this.m._x = this.s._x;
this.m._y = this.s._y;
}
function scroll(p) {
this._parent.rolki.f1.scroll = (this._parent.rolki.f2.scroll = (this._parent.rolki.f3.scroll = (this._parent.rolki.f4.scroll = int((this.mx * p) / 100))));
}
this.onEnterFrame = function () {
this.s._y = ((this.m._y > 5) ? (((this.m._y < 165) ? (this.m._y) : 166)) : 5);
this.mx = this._parent.rolki.f1.maxscroll;
scroll((100 * (this.s._y - 5)) / 160);
};
Instance of Symbol 399 MovieClip "m" in Symbol 400 MovieClip Frame 1
on (press) {
this.startDrag();
}
on (release, releaseOutside) {
this.stopDrag();
this._parent.reset();
}
Symbol 405 MovieClip Frame 1
this._visible = _root.ligin == undefined;
this.onPress = function () {
getURL ("http://www.netstupidity.com");
};
Symbol 406 MovieClip Frame 1
this.submitted = false;
Symbol 406 MovieClip Frame 2
function reload() {
if (this.rolki._currentframe > 1) {
this.rolki.gotoAndPlay(18);
}
var te = ((-this.tc) * this.tp);
var tb = ((-(this.tc - 1)) * this.tp);
this.loadVariables((((((((((this.__url + "hof_get.php?id=") + this.gid) + "&n=") + this.l) + "&tb=") + tb) + "&te=") + te) + "&s=") + this.sc);
}
this.uu = _root._url;
this.gid = _root.gid;
this.__url = _root.__url;
this.l = 10;
this.sc = eval (this.scr);
if (int(this.sc) > int(_root.bsc)) {
_root.bsc = this.sc;
}
this.onData = function () {
if (this.r == 1) {
this.rolki.gotoAndPlay(2);
clearInterval(this._itr);
return(undefined);
}
if (this.r == "3") {
this.submitted = true;
reload();
}
if (this.r == "2") {
getURL ("javascript:if(confirm('To submit Your score You have to be logged into netstupidity.com site. Do You wish to log in now?')) window.open('http://www.netstupidity.com/login.php'); void(0);");
}
};
stop();