Frame 1
_global.state = "start";
var shared = SharedObject.getLocal("edge_tanks");
_global.hardness = shared.data.hardness;
if (_global.hardness == undefined) {
(_global.hardness = 1);
(shared.data.hardness = _global.hardness);
shared.flush();
}
_global.lang = shared.data.lang;
if (_global.lang == undefined) {
(_global.lang = "eng");
(shared.data.lang = _global.lang);
shared.flush();
}
_global.main_volume = shared.data.main_volume;
if (_global.main_volume == undefined) {
(_global.main_volume = 50);
(shared.data.main_volume = _global.main_volume);
shared.flush();
}
_global.quality = shared.data.quality;
if (_global.quality == undefined) {
(_global.quality = "LOW");
(shared.data.quality = _global.quality);
shared.flush();
}
var keyListener = new Object();
var timer0 = 0;
keyListener.onKeyDown = function () {
a = Key.getCode();
if ((a == 39) || (a == 68)) {
(eng.tank0.move4 = "right");
(eng.tank0.move3 = 1);
}
if ((a == 37) || (a == 65)) {
(eng.tank0.move4 = "left");
(eng.tank0.move3 = 1);
}
if ((a == 38) || (a == 87)) {
(eng.tank0.move4 = "up");
(eng.tank0.move3 = 1);
if ((state == "menu") || (state == "pause")) {
cursor_move = "up";
}
}
if ((a == 40) || (a == 83)) {
(eng.tank0.move4 = "down");
(eng.tank0.move3 = 1);
if ((state == "menu") || (state == "pause")) {
cursor_move = "down";
}
}
if (a == 32) {
timer0++;
if (timer0 == 15) {
eng.tank0.shot = 2;
}
}
if (a == 36) {
if ((state == "menu") || (state == "pause")) {
cursor_move = "home";
}
}
if (a == 35) {
if ((state == "menu") || (state == "pause")) {
cursor_move = "end";
}
}
};
keyListener.onKeyUp = function () {
a = Key.getCode();
menu.aaa = a;
if ((a == 39) || (a == 68)) {
eng.tank0.move3 = 0;
}
if ((a == 37) || (a == 65)) {
eng.tank0.move3 = 0;
}
if ((a == 38) || (a == 87)) {
eng.tank0.move3 = 0;
}
if ((a == 40) || (a == 83)) {
eng.tank0.move3 = 0;
}
if ((a == 27) || (a == 13)) {
eng.Pause("pause");
(cursor_enter = true);
}
if (a == 32) {
if (timer0 < 15) {
eng.tank0.shot = 1;
}
timer0 = 0;
}
if ((a == 106) || (a == 186)) {
var a = true;
if ((quality == "LOW") && (a)) {
(quality = "MEDIUM");
(a = false);
}
if ((quality == "MEDIUM") && (a)) {
(quality = "HIGH");
(a = false);
}
if ((quality == "HIGH") && (a)) {
(quality = "LOW");
(a = false);
}
(shared.data.quality = quality);
shared.flush();
_quality = quality;
menu.popup.quality.text = quality;
menu.popup.volume_mask._xscale = main_volume;
menu.popup._alpha = 100;
}
if ((a == 109) || (a == 189)) {
if (main_volume > 0) {
main_volume = main_volume - 10;
(shared.data.main_volume = main_volume);
shared.flush();
}
menu.popup.quality.text = quality;
menu.popup.volume_mask._xscale = main_volume;
menu.popup._alpha = 100;
}
if ((a == 107) || (a == 187)) {
if (main_volume < 100) {
main_volume = main_volume + 10;
(shared.data.main_volume = main_volume);
shared.flush();
}
menu.popup.quality.text = quality;
menu.popup.volume_mask._xscale = main_volume;
menu.popup._alpha = 100;
}
if (a == 192) {
trace("timer1: " + eng.timer1);
trace("total_tanks: " + eng.total_tanks);
trace("total_tanks1: " + eng.total_tanks1);
trace("base: " + eng.base);
trace("tank0.armor: " + eng.tank0.armor);
trace("tanks_num: " + eng.tanks_num);
trace("tanks_hits: " + eng.tanks_hits);
}
};
Key.addListener(keyListener);
var debug = false;
var gameID = 227;
var gameName = "city_under_siege";
stop();
fscommand ("showmenu", "false");
prel.onEnterFrame = function () {
prel.procent.text = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
prel.gotoAndStop(prel.procent.text);
if (Number(prel.procent.text) > 99) {
play();
delete this.onEnterFrame;
}
};
Frame 2
stop();
Frame 3
if (!okToPlay) {
gotoAndStop (2);
}
Frame 4
_quality = "HIGH";
Stage.showMenu = false;
Stage.scaleMode = "noScale";
var f_megacharge = (new flash.filters.GlowFilter(13311, 1, 25, 25, 2, 1, false, false));
var f_bombs = (new flash.filters.GlowFilter(16711680, 1, 25, 25, 2, 1, false, false));
var f_shield = (new flash.filters.GlowFilter(10027110, 1, 25, 25, 2, 1, false, false));
var f_shadow = (new flash.filters.DropShadowFilter(4, 45, 0, 1, 2, 2, 1, 1, false, false, false));
var f_shadow_apc = (new flash.filters.DropShadowFilter(2, 45, 0, 1, 2, 2, 1, 1, false, false, false));
var f_shadow1 = (new flash.filters.DropShadowFilter(2, 45, 0, 1, 2, 2, 1, 1, false, false, false));
var f_shadow2 = (new flash.filters.DropShadowFilter(6, 45, 0, 1, 20, 20, 1, 1, false, false, false));
var f_shadow3 = (new flash.filters.DropShadowFilter(2, 45, 0, 1, 6, 6, 1, 1, false, false, false));
_root.myFilters0 = new Array();
_global.addEffect0 = function (target, effect, layer) {
tellTarget (target) {
_root.myFilters0 = filters;
};
if (effect == "mega charge") {
_root.myFilters0[layer] = f_megacharge;
}
if (effect == "bombs") {
_root.myFilters0[layer] = f_bombs;
}
if (effect == "shield") {
_root.myFilters0[layer] = f_shield;
}
if (effect == "shadow") {
_root.myFilters0[layer] = f_shadow;
}
if (effect == "shadow apc") {
_root.myFilters0[layer] = f_shadow_apc;
}
if (effect == "shadow1") {
_root.myFilters0[layer] = f_shadow1;
}
if (effect == "shadow2") {
_root.myFilters0[layer] = f_shadow3;
}
if (effect == "tree shadow") {
_root.myFilters0[layer] = f_shadow2;
}
tellTarget (target) {
filters = _root.myFilters0;
};
};
_global.removeEffect0 = function (target, layer) {
tellTarget (target) {
_root.myFilters0 = filters;
};
_root.myFilters0[layer] = [];
tellTarget (target) {
filters = _root.myFilters0;
};
};
_global.CheckMove = function (pos, dir) {
var _local4 = pos;
if (dir == "up") {
pos = pos - 20;
}
if (dir == "down") {
pos = pos + 20;
}
if (dir == "left") {
pos--;
}
if (dir == "right") {
pos++;
}
if ((pos < 0) || (pos > 239)) {
return(false);
}
if (map[pos]) {
return(false);
}
if (mapMove[pos]) {
return(false);
}
var _local3 = ((_local4 / 20) - Math.floor(_local4 / 20)) * 20;
if ((_local3 >= 18.99) && (dir == "right")) {
return(false);
}
if ((_local3 <= 0.01) && (dir == "left")) {
return(false);
}
return(true);
};
_global.GetPosition = function (pos, dir) {
if (dir == "up") {
pos = pos - 20;
}
if (dir == "down") {
pos = pos + 20;
}
if (dir == "left") {
pos--;
}
if (dir == "right") {
pos++;
}
return(pos);
};
_global.CheckCollision = function (x, y) {
x = x - 15;
y = y - 15;
if ((((x <= 0) || (y <= 0)) || (x >= 640)) || (y >= 384)) {
return(500);
}
var _local1 = Math.floor(x / 32) + (20 * Math.floor(y / 32));
if (map[_local1] > 1) {
return(_local1);
}
return(-1);
};
_global.Turn = function (dir) {
if (dir == "no") {
return(0);
}
if (dir == "random") {
return(-180 + random(360));
}
if (dir == "random stay") {
return(-180 + random(360));
}
if (dir == "up") {
return(0);
}
if (dir == "down") {
return(180);
}
if (dir == "right") {
return(90);
}
if (dir == "left") {
return(-90);
}
};
_global.Angle = function (angle) {
return((Math.PI * angle) / 180);
};
_global.ChooseTurn = function (dir1, dir2) {
if (dir1 == "up") {
if (dir2 == "up") {
return("forward");
}
if (dir2 == "left") {
return("left");
}
if (dir2 == "right") {
return("right");
}
if (dir2 == "down") {
return("right");
}
}
if (dir1 == "right") {
if (dir2 == "up") {
return("left");
}
if (dir2 == "left") {
return("right");
}
if (dir2 == "right") {
return("forward");
}
if (dir2 == "down") {
return("right");
}
}
if (dir1 == "down") {
if (dir2 == "up") {
return("left");
}
if (dir2 == "left") {
return("right");
}
if (dir2 == "right") {
return("left");
}
if (dir2 == "down") {
return("forward");
}
}
if (dir1 == "left") {
if (dir2 == "up") {
return("right");
}
if (dir2 == "left") {
return("forward");
}
if (dir2 == "right") {
return("left");
}
if (dir2 == "down") {
return("left");
}
}
};
_global.ShiftX = function (dir, n, func) {
if (dir == "up") {
return((func ? (func) : 0));
}
if (dir == "down") {
return((func ? (-func) : 0));
}
if (dir == "left") {
return(-n);
}
if (dir == "right") {
return(n);
}
return(0);
};
_global.ShiftY = function (dir, n, func) {
if (dir == "up") {
return(-n);
}
if (dir == "down") {
return(n);
}
if (dir == "left") {
return((func ? (-func) : 0));
}
if (dir == "right") {
return((func ? (func) : 0));
}
return(0);
};
_global.randomDir = function (dir, dir1) {
var _local2 = random(2);
if (dir == "up") {
if (dir1 == "left") {
return("right");
}
if (dir1 == "right") {
return("left");
}
if (_local2) {
return("left");
}
return("right");
}
if (dir == "left") {
if (dir1 == "up") {
return("down");
}
if (dir1 == "down") {
return("up");
}
return("down");
}
if (dir == "right") {
if (dir1 == "up") {
return("down");
}
if (dir1 == "down") {
return("up");
}
return("down");
}
if (dir == "down") {
if (dir1 == "left") {
return("right");
}
if (dir1 == "right") {
return("left");
}
if (_local2) {
return("right");
}
return("left");
}
};
_global.turning = function (dir, dir1) {
var _local3 = random(2);
if (dir == "up") {
if (dir1 == "cw") {
return("right");
}
if (dir1 == "acw") {
return("left");
}
}
if (dir == "left") {
if (dir1 == "cw") {
return("up");
}
if (dir1 == "acw") {
return("down");
}
}
if (dir == "right") {
if (dir1 == "cw") {
return("down");
}
if (dir1 == "acw") {
return("up");
}
}
if (dir == "down") {
if (dir1 == "cw") {
return("left");
}
if (dir1 == "acw") {
return("right");
}
}
};
_global.getXpos = function (pos) {
return(Math.round(((pos / 20) - Math.floor(pos / 20)) * 20));
};
_global.getYpos = function (pos) {
return(Math.floor(pos / 20));
};
_global.randomDirAI1 = function (pos, dir, dir1) {
var _local7 = random(10);
var _local1;
var _local5 = getXpos(pos);
var _local4 = getYpos(pos);
var _local3 = eng.base_pos_x;
var _local2 = eng.base_pos_y;
if ((!eng.base) && (eng.tank0.armor > 0)) {
_local3 = getXpos(eng.tank0.pos);
_local2 = getYpos(eng.tank0.pos);
}
if ((dir == "up") || (dir == "down")) {
if (_local5 < _local3) {
_local1 = "right";
}
if (_local5 > _local3) {
_local1 = "left";
}
if (_local5 == _local3) {
if (_local4 < _local2) {
_local1 = "down";
}
if (_local4 > _local2) {
_local1 = "up";
}
}
}
if ((dir == "left") || (dir == "right")) {
if (_local4 < _local2) {
_local1 = "down";
}
if (_local4 > _local2) {
_local1 = "up";
}
if (_local4 == _local2) {
if (_local5 < _local3) {
_local1 = "right";
}
if (_local5 > _local3) {
_local1 = "left";
}
}
}
if ((_local1 == dir1) || (!_local7)) {
_local1 = randomDir1();
}
return(_local1);
};
_global.DirAI = function (dir) {
if (dir == "up") {
return("down");
}
if (dir == "down") {
return("up");
}
if (dir == "left") {
return("right");
}
if (dir == "right") {
return("left");
}
return(0);
};
_global.dirAI2 = function (pos, dir, dist) {
var _local6;
var _local1;
var _local5 = getXpos(pos);
var _local4 = getYpos(pos);
var _local3 = eng.base_pos_x;
var _local2 = eng.base_pos_y;
if ((dir == "up") || (dir == "down")) {
if (_local5 < _local3) {
_local1 = "right";
}
if (_local5 > _local3) {
_local1 = "left";
}
if (_local5 == _local3) {
_local6 = random(2);
if (_local6) {
_local1 = "left";
} else {
_local1 = "right";
}
}
}
if ((dir == "left") || (dir == "right")) {
if (_local4 < _local2) {
_local1 = "down";
}
if (_local4 > _local2) {
_local1 = "up";
}
if (_local4 == _local2) {
_local6 = random(2);
if (_local6) {
_local1 = "down";
} else {
_local1 = "up";
}
}
}
if (dist < 75) {
if (_local5 == _local3) {
if (_local4 < _local2) {
_local1 = "down";
}
if (_local4 > _local2) {
_local1 = "up";
}
}
if (_local4 == _local2) {
if (_local5 < _local3) {
_local1 = "right";
}
if (_local5 > _local3) {
_local1 = "left";
}
}
}
return(_local1);
};
_global.randomDir2 = function (pos, dir, dist) {
var _local2 = random(4);
var _local1;
if (_local2 == 0) {
_local1 = "left";
}
if (_local2 == 1) {
_local1 = "right";
}
if (_local2 == 2) {
_local1 = "up";
}
if (_local2 == 3) {
_local1 = "down";
}
if (dist < 75) {
var _local6 = getXpos(pos);
var _local5 = getYpos(pos);
var _local4 = eng.base_pos_x;
var _local3 = eng.base_pos_y;
if (_local6 == _local4) {
if (_local5 < _local3) {
_local1 = "down";
}
if (_local5 > _local3) {
_local1 = "up";
}
}
if (_local5 == _local3) {
if (_local6 < _local4) {
_local1 = "right";
}
if (_local6 > _local4) {
_local1 = "left";
}
}
}
return(_local1);
};
_global.dirAI3 = function (pos, dir) {
var _local5 = getXpos(pos);
var _local4 = getYpos(pos);
var _local3 = eng.base_pos_x;
var _local2 = eng.base_pos_y;
var _local7 = Math.abs(_local5 - _local3);
var _local6 = Math.abs(_local4 - _local2);
var _local1 = randomDir1();
if (_local7 == 0) {
if (_local4 < _local2) {
_local1 = "down";
}
if (_local4 > _local2) {
_local1 = "up";
}
}
if (_local6 == 0) {
if (_local5 < _local3) {
_local1 = "right";
}
if (_local5 > _local3) {
_local1 = "left";
}
}
return(_local1);
};
_global.randomDir1 = function () {
var _local1 = random(4);
if (_local1 == 0) {
return("left");
}
if (_local1 == 1) {
return("right");
}
if (_local1 == 2) {
return("up");
}
if (_local1 == 3) {
return("down");
}
};
_global.GenerateMap = function (level) {
var _local4;
var _local5;
var _local3 = 0;
var _local6 = 15;
var _local7 = 15;
var _local11 = 0;
var _local12 = 0;
var _local9 = 0;
var _local10 = 0;
var _local15 = new Array();
map1.createEmptyMovieClip("map1", map1.getNextHighestDepth());
map1.createEmptyMovieClip("map2", map1.getNextHighestDepth());
map1.createEmptyMovieClip("map3", map1.getNextHighestDepth());
eng.createEmptyMovieClip("trees", 1000);
map1.map2._x = 0;
map1.map2._y = 0;
eng.lpnum = 0;
eng.lplaunch = 0;
eng.base = 0;
while (_local3 < 240) {
_local4 = 0;
if (!random(2)) {
_local5 = random(10);
if ((_local5 >= 0) && (_local5 < 5)) {
_local4 = 2;
}
if ((_local5 >= 6) && (_local5 < 8)) {
_local4 = 1;
}
if ((_local5 >= 8) && (_local5 < 10)) {
_local4 = 3;
}
}
if ((((_local3 == 204) || (_local3 == 190)) || (_local3 == 205)) || (_local3 == 189)) {
_local4 = 0;
}
if (((_local3 == 1) || (_local3 == 15)) || (_local3 == 16)) {
_local4 = 0;
}
if (((_local3 == 13) || (_local3 == 29)) || (_local3 == 28)) {
_local4 = 0;
}
if ((_local3 == 0) || (_local3 == 14)) {
_local4 = -1;
}
if (((((_local3 == 201) || (_local3 == 203)) || (_local3 == 188)) || (_local3 == 187)) || (_local3 == 186)) {
_local4 = 2;
}
if (_local3 == 202) {
_local4 = 4;
}
if (_local3 == 204) {
_local4 = -2;
}
_local12 = 300;
if (level > 0) {
_local4 = levels[level][_local3];
}
if (_local4 == -1) {
(eng.launch_pads[eng.lpnum] = _local3);
eng.lpnum++;
_local4 = 0;
}
if (_local4 == -2) {
(eng.tank0pos_start = _local3);
(eng.tank0_x_start = _local6 + 16);
(eng.tank0_y_start = _local7 + 16);
_local4 = 0;
}
if (_local4 == 4) {
(eng.base_pos_x = _local9);
(eng.base_pos_y = _local10);
(eng.base = 1);
(eng.base_x = _local6 + 16);
(eng.base_y = _local7 + 16);
}
map[_local3] = _local4;
if (_local4 == 5) {
map[_local3] = 0;
}
mapMove[_local3] = 0;
CreateCell(_local4, _local6, _local7, _local11, level);
_local11++;
_local6 = _local6 + 32;
_local9++;
if (_local6 > 640) {
_local6 = 15;
_local7 = _local7 + 32;
_local9 = 0;
_local10++;
}
_local3++;
}
var _local14 = new flash.display.BitmapData(670, 450, false, 0);
_local14.draw(map1.map1);
map1.createEmptyMovieClip("map1_", this.getNextHighestDepth());
map1.map1_.attachBitmap(_local14, this.getNextHighestDepth());
removeMovieClip("map1.map1");
var _local13 = new flash.display.BitmapData(670, 450, true, 0);
_local13.draw(eng.trees);
eng.createEmptyMovieClip("trees_", 1001);
eng.trees_.attachBitmap(_local13, 0);
removeMovieClip("eng.trees");
if (_global.hardness == 0) {
eng.weak_tanks = 20;
eng.medium_tanks = 0;
eng.heavy_tanks = 0;
eng.apcs = 0;
eng.launch_speed = 300;
eng.max_tanks = 5;
}
if (_global.hardness == 1) {
eng.weak_tanks = 30;
eng.medium_tanks = 5;
eng.heavy_tanks = 0;
eng.apcs = 0;
eng.launch_speed = 200;
eng.max_tanks = 10;
}
if (_global.hardness == 2) {
eng.weak_tanks = 25;
eng.medium_tanks = 7;
eng.heavy_tanks = 1;
eng.apcs = 7;
eng.launch_speed = 200;
eng.max_tanks = 15;
}
if (_global.hardness == 3) {
eng.weak_tanks = 25;
eng.medium_tanks = 10;
eng.heavy_tanks = 5;
eng.apcs = 10;
eng.launch_speed = 100;
eng.max_tanks = 20;
}
if (_global.hardness == 4) {
eng.weak_tanks = 20;
eng.medium_tanks = 15;
eng.heavy_tanks = 10;
eng.apcs = 15;
eng.launch_speed = 50;
eng.max_tanks = 20;
}
if (level > 0) {
(eng.weak_tanks = levels[level][_local3]);
_local3++;
(eng.medium_tanks = levels[level][_local3]);
_local3++;
(eng.heavy_tanks = levels[level][_local3]);
_local3++;
(eng.apcs = levels[level][_local3]);
_local3++;
(eng.launch_speed = levels[level][_local3]);
_local3++;
(eng.max_tanks = levels[level][_local3]);
_local3++;
if (_global.hardness == 0) {
eng.weak_tanks = eng.weak_tanks - 10;
if (eng.weak_tanks < 0) {
eng.weak_tanks = 0;
}
eng.medium_tanks = eng.medium_tanks - 5;
if (eng.medium_tanks < 0) {
eng.medium_tanks = 0;
}
eng.heavy_tanks = eng.heavy_tanks - 3;
if (eng.heavy_tanks < 0) {
eng.heavy_tanks = 0;
}
eng.apcs = eng.apcs - 5;
if (eng.apcs < 0) {
eng.apcs = 0;
}
eng.launch_speed = eng.launch_speed - 40;
eng.max_tanks = eng.max_tanks - 6;
if (eng.max_tanks < 5) {
eng.max_tanks = 5;
}
}
if (_global.hardness == 1) {
eng.weak_tanks = eng.weak_tanks - 5;
if (eng.weak_tanks < 0) {
eng.weak_tanks = 0;
}
eng.medium_tanks = eng.medium_tanks - 3;
if (eng.medium_tanks < 0) {
eng.medium_tanks = 0;
}
eng.heavy_tanks = eng.heavy_tanks - 1;
if (eng.heavy_tanks < 0) {
eng.heavy_tanks = 0;
}
eng.apcs = eng.apcs - 3;
if (eng.apcs < 0) {
eng.apcs = 0;
}
eng.launch_speed = eng.launch_speed + 20;
eng.max_tanks = eng.max_tanks - 3;
if (eng.max_tanks < 5) {
eng.max_tanks = 5;
}
}
if (_global.hardness == 3) {
eng.weak_tanks = eng.weak_tanks + 5;
eng.medium_tanks = eng.medium_tanks + 3;
eng.heavy_tanks = eng.heavy_tanks + 1;
eng.apcs = eng.apcs + 3;
eng.launch_speed = eng.launch_speed - 20;
eng.max_tanks = eng.max_tanks + 3;
if (eng.max_tanks > 20) {
eng.max_tanks = 20;
}
}
if (_global.hardness == 4) {
eng.weak_tanks = eng.weak_tanks + 10;
eng.medium_tanks = eng.medium_tanks + 5;
eng.heavy_tanks = eng.heavy_tanks + 3;
eng.apcs = eng.apcs + 5;
eng.launch_speed = eng.launch_speed - 40;
eng.max_tanks = eng.max_tanks + 6;
if (eng.max_tanks > 20) {
eng.max_tanks = 20;
}
}
}
eng.total_tanks = ((eng.weak_tanks + eng.medium_tanks) + eng.heavy_tanks) + eng.apcs;
eng.total_tanks1 = eng.total_tanks;
};
_global.CreateCell = function (a, x, y, layer, level) {
if (a == 2) {
map1.map1.attachMovie("cell0", "duplicatedcell" + layer, layer, {_x:x, _y:y});
map1.map3.attachMovie("cell2", "duplicatedcell" + layer, layer, {_x:x, _y:y});
addEffect0("map1.map3.duplicatedcell" + layer, "shadow2", 0);
}
if ((a == 3) || (a == 4)) {
map1.map3.attachMovie("cell" + a, "duplicatedcell" + layer, layer, {_x:x, _y:y});
addEffect0("map1.map3.duplicatedcell" + layer, "shadow2", 0);
}
if ((a == 0) || (a == 1)) {
map1.map1.attachMovie("cell" + a, "duplicatedcell" + layer, layer, {_x:x, _y:y});
}
if ((((!a) && (!random(10))) && (level == 0)) || (a == 5)) {
b = random(2);
if (b) {
eng.trees.attachMovie("cell5", "duplicatedcell" + layer, layer, {_x:x - 7, _y:y - 6});
}
if (!b) {
eng.trees.attachMovie("cell6", "duplicatedcell" + layer, layer, {_x:x - 7, _y:y - 6});
}
addEffect0(eng.trees["duplicatedcell" + layer], "tree shadow", 0);
}
};
_global.Update = function () {
menu.armor.mask._xscale = (100 * eng.tank0.armor) / 45;
var _local2 = eng.tank0.charges;
if (_local2 > 100) {
_local2 = 100;
}
menu.charges.mask._xscale = _local2;
menu.mines.mask._xscale = (100 * eng.tank0.mines) / 3;
menu.tanks.mask._yscale = (100 * eng.total_tanks) / eng.total_tanks1;
menu.score.text = score;
while (menu.score.text.length < 5) {
menu.score.text = "0" + menu.score.text;
}
menu.levell.levell.text = _global.level;
menu.lives.text = _global.lives;
};
sound = new Object();
_global.s_count = 0;
_global.playSound = function (name, pan, perc) {
if (perc == 0) {
return(false);
}
var ss = s_count;
var _local2 = _root.createEmptyMovieClip("ssss" + ss, _root.getNextHighestDepth());
sound[ss] = new Sound(_local2);
sound[ss].attachSound(name + ".wav");
if (perc == undefined) {
sound[ss].setVolume(main_volume);
} else {
sound[ss].setVolume((perc * main_volume) / 100);
}
sound[ss].setPan(pan);
sound[ss].onSoundComplete = function () {
removeMovieClip(_root["ssss" + ss]);
};
sound[ss].start();
if ((s_count++) >= 100) {
s_count = 0;
}
};
_global.initSound_tank0_engine = function () {
var _local2 = _root.createEmptyMovieClip("tank0_engine_sound", _root.getNextHighestDepth());
_root.tank0_engine = new Sound(_local2);
tank0_engine.attachSound("engine1.wav");
};
_global.startSound_tank0_engine = function () {
tank0_engine.setVolume((50 * main_volume) / 100);
tank0_engine.start(0, 999);
};
_global.stopSound_tank0_engine = function () {
tank0_engine.stop("engine1.wav");
};
_global.initSound_tank2_engine = function () {
var _local2 = _root.createEmptyMovieClip("tank2_engine_sound", _root.getNextHighestDepth());
_root.tank2_engine = new Sound(_local2);
tank2_engine.attachSound("engine2.wav");
};
_global.startSound_tank2_engine = function () {
tank2_engine.start(0, 100000);
};
_global.volume_tank2_engine = function (vol) {
tank2_engine.setVolume((vol * main_volume) / 100);
};
_global.stopSound_tank2_engine = function () {
tank2_engine.stop("engine2.wav");
};
_global.distance_volume = function (x, y, x1, y1) {
var _local1 = Math.sqrt(Math.pow(Math.abs(x - x1), 2) + Math.pow(Math.abs(y - y1), 2));
_local1 = 100 * (1 - (_local1 / 300));
if (_local1 < 0) {
_local1 = 0;
}
if (_local1 > 100) {
_local1 = 100;
}
return(_local1);
};
_global.distance = function (x, y, x1, y1) {
return(Math.sqrt(Math.pow(Math.abs(x - x1), 2) + Math.pow(Math.abs(y - y1), 2)));
};
var levels = new Array();
levels[1] = new Array(-1, 0, 0, 0, 5, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 3, 5, 0, 0, 0, 0, 0, 3, 2, 0, 0, 3, 3, 0, 3, 2, 3, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 5, 3, 2, 0, 0, 0, 3, 0, 5, 0, 2, 0, 3, 0, 3, 3, 0, 2, 3, 3, 0, 3, 0, 3, 3, 2, 0, 0, 0, 3, 3, 0, 3, 0, 5, 0, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 2, 3, 2, 3, 3, 0, 0, 0, 0, 0, 5, 3, 0, 3, 3, 0, 0, 0, 3, 3, 0, 3, 0, 0, 0, 0, 3, 0, 3, 0, 0, 3, 0, 0, 2, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 3, 2, 3, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 3, 3, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 2, 3, 3, 0, 0, 3, 0, 0, 0, 0, 2, 2, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 4, 2, -2, 3, 0, 0, 3, 3, 0, 0, 0, 0, 10, 5, 0, 5, 150, 11);
levels[2] = new Array(-1, 0, 2, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0, -1, 2, 2, 0, 0, 0, -1, 2, 5, 0, 0, 0, 2, 2, 0, 2, 0, 5, 0, 2, 0, 0, 2, 2, 2, 5, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 2, 2, 0, 2, 2,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, 0, 0, 2, 5, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, -1, 2, 0, 0, 2, 2, 0, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 0, 2, 2, 0, 5, 0, 2, 3, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 0, 2, 0, 0, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 2, 0, 0, 0, 2, 0, 2, 0, 3, 2, 3, 0, 2, 0, 0, 3, 2, 2, 2, 2, 0, 0, 2, 0, 3, 0, 0, 0, 2, 4, 2, -2, 3, 2, 0, 2, 5, 0, 2, 0, 0, 2, 2, 2, 2, 5, 0, 0, 3, 2, 3, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 3, 0, 2, 0, 0, 0, 0, 5, 2, 0, 0, 2, 0, 3, 2, 2, 2, -1, 0, 0, 0, 0, 2, 0, 2, 2, 0, 0, 2, 0, 3, 2, 2, 2, 0, 0, 0, 2, 5, 2, 2, 0, 0, 0, 2, 0, 0, 2, 2, 0, 2, 0, 5, 0, 0, 2, -1, 30, 10, 5, 10, 150, 20);
var rules1 = false;
var controls1 = false;
var about1 = false;
var hardness1 = false;
var lang1 = false;
var sponsor_logo1 = true;
_global.state = "menu";
var cursor_id = 0;
var cursor_id2 = -1;
var cursor_enter = false;
var cursor_move = "";
this.onEnterFrame = function () {
if (cursor_move == "down") {
(cursor_move = "");
(cursor._alpha = 100);
if ((cursor_id++) == 5) {
cursor_id = 0;
}
}
if (cursor_move == "up") {
(cursor_move = "");
(cursor._alpha = 100);
if ((cursor_id--) == 0) {
cursor_id = 5;
}
}
if (cursor_move == "home") {
(cursor_move = "");
(cursor._alpha = 100);
cursor_id = 0;
}
if (cursor_move == "end") {
(cursor_move = "");
(cursor._alpha = 100);
cursor_id = 5;
}
if (cursor_id != cursor_id2) {
playSound("mine", 0);
if (cursor_id == 0) {
playing2.gotoAndPlay("over");
}
if (cursor_id == 1) {
hardness2.gotoAndPlay("over");
}
if (cursor_id == 2) {
controls2.gotoAndPlay("over");
}
if (cursor_id == 3) {
rules2.gotoAndPlay("over");
}
if (cursor_id == 4) {
lang2.gotoAndPlay("over");
}
if (cursor_id == 5) {
about2.gotoAndPlay("over");
}
if (cursor_id2 == 0) {
playing2.gotoAndPlay("out");
}
if (cursor_id2 == 1) {
hardness2.gotoAndPlay("out");
}
if (cursor_id2 == 2) {
controls2.gotoAndPlay("out");
}
if (cursor_id2 == 3) {
rules2.gotoAndPlay("out");
}
if (cursor_id2 == 4) {
lang2.gotoAndPlay("out");
}
if (cursor_id2 == 5) {
about2.gotoAndPlay("out");
}
cursor_id2 = cursor_id;
}
if (cursor_enter) {
playSound("mine_put", 0);
if (cursor_id == 0) {
playing2.gotoAndPlay("go");
}
if (cursor_id == 1) {
hardness2.gotoAndPlay("go");
}
if (cursor_id == 2) {
controls2.gotoAndPlay("go");
}
if (cursor_id == 3) {
rules2.gotoAndPlay("go");
}
if (cursor_id == 4) {
lang2.gotoAndPlay("go");
}
if (cursor_id == 5) {
about2.gotoAndPlay("go");
}
cursor_enter = false;
}
};
stop();
Instance of Symbol 367 MovieClip "playing2" in Frame 4
on (rollOver) {
_parent.cursor_id = 0;
}
on (release) {
_parent.cursor_enter = true;
}
Instance of Symbol 371 MovieClip "controls2" in Frame 4
on (rollOver) {
_parent.cursor_id = 2;
}
on (release) {
_parent.cursor_enter = true;
}
Instance of Symbol 375 MovieClip "rules2" in Frame 4
on (rollOver) {
_parent.cursor_id = 3;
}
on (release) {
_parent.cursor_enter = true;
}
Instance of Symbol 379 MovieClip "hardness2" in Frame 4
on (rollOver) {
_parent.cursor_id = 1;
}
on (release) {
_parent.cursor_enter = true;
}
Instance of Symbol 383 MovieClip "lang2" in Frame 4
on (rollOver) {
_parent.cursor_id = 4;
}
on (release) {
_parent.cursor_enter = true;
}
Instance of Symbol 386 MovieClip "fgfyw" in Frame 4
on (rollOver) {
this.gotoAndPlay("over");
}
on (rollOut) {
this.gotoAndPlay("out");
}
on (release) {
this.gotoAndPlay("go");
}
Instance of Symbol 389 MovieClip in Frame 4
on (rollOver) {
this.gotoAndPlay("over");
}
on (rollOut) {
this.gotoAndPlay("out");
}
on (release) {
this.gotoAndPlay("go");
}
Instance of Symbol 496 MovieClip in Frame 4
on (release) {
getURL ("http://www.freeonlinegames.com/?" + _root.gameName, "_blank");
}
Frame 16
_quality = quality;
Stage.showMenu = true;
Stage.scaleMode = "noScale";
var map = new Array();
var mapMove = new Array();
var players = 1;
_global.state = "main";
pausee = false;
stop();
Frame 23
if (_global.stat == "nextlevel") {
trace("nextlevel");
_root.gotoAndPlay("goplay");
}
if (_global.stat == "restart") {
trace("restart");
_root.gotoAndPlay("goplay");
}
if (_global.stat == "playing") {
trace("menu");
_root.gotoAndPlay("mainarea");
}
if (_global.stat == "gameover") {
trace("gameover");
_root.gotoAndPlay("mainarea");
}
trace("stop");
stop();
Instance of Symbol 604 MovieClip [TMP6pbk6uzm9i] in Frame 24
//component parameters
onClipEvent (construct) {
gameID = 227;
}
Instance of Symbol 609 MovieClip [TMP6ojzjuzm8i] in Frame 24
//component parameters
onClipEvent (construct) {
gameID = 227;
}
Instance of Symbol 614 MovieClip in Frame 24
on (rollOver) {
this.gotoAndPlay("over");
}
on (rollOut) {
this.gotoAndPlay("out");
}
on (release) {
this.gotoAndPlay("go");
_root.gotoAndPlay("mainarea");
}
Symbol 27 MovieClip [logo] Frame 1
onEnterFrame = function () {
tower._rotation++;
};
Symbol 31 MovieClip Frame 1
this.onEnterFrame = function () {
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
this._alpha = 100;
}
};
Symbol 41 MovieClip Frame 1
this.onEnterFrame = function () {
if (drive == 1) {
var _local1 = 0;
while (_local1 < 4) {
tellTarget ("p" + _local1) {
_y = (_y-1);
if (_y < -1.5) {
_y = (_y + 28);
}
if (_y < 1.5) {
_alpha = ((_y + 1.5) * 33.4);
}
if (_y > 23.5) {
_alpha = ((26.5 - _y) * 33.4);
}
};
_local1++;
}
}
if (drive == -1) {
var _local1 = 0;
while (_local1 < 4) {
tellTarget ("p" + _local1) {
_y = (_y+1);
if (_y > 26.5) {
_y = (_y - 28);
}
if (_y < 1.5) {
_alpha = ((_y + 1.5) * 33.4);
}
if (_y > 23.5) {
_alpha = ((26.5 - _y) * 33.4);
}
};
_local1++;
}
}
};
Symbol 47 MovieClip [tank0] Frame 1
track0.drive = 0;
track1.drive = 0;
stop();
Symbol 47 MovieClip [tank0] Frame 2
track0.drive = 1;
track1.drive = 1;
stop();
Symbol 47 MovieClip [tank0] Frame 3
track0.drive = -1;
track1.drive = 1;
stop();
Symbol 47 MovieClip [tank0] Frame 4
track0.drive = 1;
track1.drive = -1;
stop();
Symbol 61 MovieClip Frame 1
this.onEnterFrame = function () {
this._rotation = this._rotation + 2;
};
Symbol 62 MovieClip [cell4] Frame 1
stop();
Symbol 88 MovieClip [cell2] Frame 1
stop();
Symbol 111 MovieClip Frame 1
this.onEnterFrame = function () {
this._alpha = this._alpha - 4;
if (this._alpha <= 0) {
this._alpha = 100;
}
};
Symbol 117 MovieClip Frame 1
this.onEnterFrame = function () {
if (drive == 1) {
var _local1 = 0;
tellTarget ("p") {
_y = (_y-1);
if (_y < -3) {
_y = (_y + 6);
}
};
}
if (drive == -1) {
tellTarget ("p") {
_y = (_y+1);
if (_y > 3) {
_y = (_y - 6);
}
_local1++;
};
}
};
Symbol 118 MovieClip [tank5] Frame 1
wheel0.p._y = -3 + random(7);
wheel1.p._y = -3 + random(7);
wheel2.p._y = -3 + random(7);
wheel3.p._y = -3 + random(7);
wheel4.p._y = -3 + random(7);
wheel5.p._y = -3 + random(7);
Symbol 118 MovieClip [tank5] Frame 2
wheel0.drive = 0;
wheel1.drive = 0;
wheel2.drive = 0;
wheel3.drive = 0;
wheel4.drive = 0;
wheel5.drive = 0;
stop();
Symbol 118 MovieClip [tank5] Frame 3
wheel0.drive = 1;
wheel1.drive = 1;
wheel2.drive = 1;
wheel3.drive = 1;
wheel4.drive = 1;
wheel5.drive = 1;
stop();
Symbol 118 MovieClip [tank5] Frame 4
wheel0.drive = -1;
wheel1.drive = -1;
wheel2.drive = -1;
wheel3.drive = 1;
wheel4.drive = 1;
wheel5.drive = 1;
stop();
Symbol 118 MovieClip [tank5] Frame 5
wheel0.drive = 1;
wheel1.drive = 1;
wheel2.drive = 1;
wheel3.drive = -1;
wheel4.drive = -1;
wheel5.drive = -1;
stop();
Symbol 121 MovieClip [tank4] Frame 1
track0.drive = 0;
track1.drive = 0;
stop();
Symbol 121 MovieClip [tank4] Frame 2
track0.drive = 1;
track1.drive = 1;
stop();
Symbol 121 MovieClip [tank4] Frame 3
track0.drive = -1;
track1.drive = 1;
stop();
Symbol 121 MovieClip [tank4] Frame 4
track0.drive = 1;
track1.drive = -1;
stop();
Symbol 124 MovieClip [tank3] Frame 1
track0.drive = 0;
track1.drive = 0;
stop();
Symbol 124 MovieClip [tank3] Frame 2
track0.drive = 1;
track1.drive = 1;
stop();
Symbol 124 MovieClip [tank3] Frame 3
track0.drive = -1;
track1.drive = 1;
stop();
Symbol 124 MovieClip [tank3] Frame 4
track0.drive = 1;
track1.drive = -1;
stop();
Symbol 127 MovieClip [tank2] Frame 1
track0.drive = 0;
track1.drive = 0;
stop();
Symbol 127 MovieClip [tank2] Frame 2
track0.drive = 1;
track1.drive = 1;
stop();
Symbol 127 MovieClip [tank2] Frame 3
track0.drive = -1;
track1.drive = 1;
stop();
Symbol 127 MovieClip [tank2] Frame 4
track0.drive = 1;
track1.drive = -1;
stop();
Symbol 139 MovieClip [target] Frame 166
gotoAndPlay ("loop");
Symbol 139 MovieClip [target] Frame 183
_parent.attachMovie("bomber", "bomber", 1030);
this.removeMovieClip();
Symbol 142 MovieClip [bomber] Frame 10
this.removeMovieClip();
Symbol 147 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 147 MovieClip Frame 2
stop();
Symbol 150 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 150 MovieClip Frame 2
stop();
Symbol 154 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 154 MovieClip Frame 2
stop();
Symbol 157 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 157 MovieClip Frame 2
stop();
Symbol 160 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 160 MovieClip Frame 2
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 162 MovieClip [falling text] Frame 10
stop();
Symbol 162 MovieClip [falling text] Frame 19
this.removeMovieClip();
Symbol 174 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 174 MovieClip Frame 2
stop();
Symbol 177 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 177 MovieClip Frame 2
stop();
Symbol 180 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 180 MovieClip Frame 2
stop();
Symbol 183 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 183 MovieClip Frame 2
stop();
Symbol 186 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 186 MovieClip Frame 2
stop();
Symbol 277 MovieClip Frame 1
stop();
var tagctr = (random(55) + 1);
gotoAndStop(tagctr);
Symbol 278 MovieClip Frame 105
stop();
Symbol 284 MovieClip Frame 1
_root.earl223 = function (val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
};
Symbol 291 MovieClip Frame 1
stop();
Symbol 298 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?" + _root.gameName, "_blank");
}
Instance of Symbol 306 MovieClip "mcNotice" in Symbol 343 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 343 MovieClip Frame 120
stop();
if ((_url.indexOf("freeonlinegames.com") >= 0) && (_url.indexOf("file:") == -1)) {
_root.okToPlay = true;
_root.play();
} else if (_root.debug) {
_root.okToPlay = true;
_root.play();
} else {
_root.mcTaglines._visible = false;
mcNotice._visible = true;
}
Symbol 344 MovieClip Frame 71
stop();
var fogsound = new Sound();
fogsound.onSoundComplete = function () {
_root.okToPlay = true;
_root.play();
};
fogsound.attachSound("fogaudio");
fogsound.start(0, 1);
Symbol 348 MovieClip Frame 1
stop();
Symbol 351 MovieClip [submitMe2] Frame 1
stop();
Symbol 351 MovieClip [submitMe2] Frame 5
stop();
Symbol 361 MovieClip Frame 40
stop();
Symbol 366 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 366 MovieClip Frame 2
stop();
Symbol 367 MovieClip Frame 1
stop();
Symbol 367 MovieClip Frame 10
stop();
Symbol 367 MovieClip Frame 19
stop();
Symbol 367 MovieClip Frame 20
_global.level = 1;
_global.lives = 3;
_global.score = 0;
_global.score_to_live = 1000;
delete _root.onEnterFrame;
_root.gotoAndPlay(4);
Symbol 367 MovieClip Frame 28
stop();
Symbol 370 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 370 MovieClip Frame 2
stop();
Symbol 371 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 10
stop();
Symbol 371 MovieClip Frame 19
stop();
Symbol 371 MovieClip Frame 20
if (_root.hardness1) {
_parent.hardness.gotoAndPlay("out");
(_root.hardness1 = false);
}
if (!_root.controls1) {
_parent.controls.gotoAndPlay("in");
(_root.controls1 = true);
}
if (_root.rules1) {
_parent.rules.gotoAndPlay("out");
(_root.rules1 = false);
}
if (_root.lang1) {
_parent.lang.gotoAndPlay("out");
(_root.lang1 = false);
}
if (_root.about1) {
_parent.about.gotoAndPlay("out");
(_root.about1 = false);
}
if (_root.sponsor_logo1) {
_parent.sponsor_logo.gotoAndPlay("out");
(_root.sponsor_logo1 = false);
}
Symbol 371 MovieClip Frame 32
stop();
Symbol 374 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 374 MovieClip Frame 2
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 10
stop();
Symbol 375 MovieClip Frame 19
stop();
Symbol 375 MovieClip Frame 20
if (_root.hardness1) {
_parent.hardness.gotoAndPlay("out");
(_root.hardness1 = false);
}
if (_root.controls1) {
_parent.controls.gotoAndPlay("out");
(_root.controls1 = false);
}
if (!_root.rules1) {
_parent.rules.gotoAndPlay("in");
(_root.rules1 = true);
}
if (_root.lang1) {
_parent.lang.gotoAndPlay("out");
(_root.lang1 = false);
}
if (_root.about1) {
_parent.about.gotoAndPlay("out");
(_root.about1 = false);
}
if (_root.sponsor_logo1) {
_parent.sponsor_logo.gotoAndPlay("out");
(_root.sponsor_logo1 = false);
}
Symbol 375 MovieClip Frame 32
stop();
Symbol 378 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 378 MovieClip Frame 2
stop();
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 10
stop();
Symbol 379 MovieClip Frame 19
stop();
Symbol 379 MovieClip Frame 20
if (_root.hardness1) {
_global.hardness++;
if (_global.hardness == 5) {
_global.hardness = 0;
}
(_root.shared.data.hardness = _global.hardness);
_root.shared.flush();
if (_global.hardness == 0) {
_root.hardness.ttt.point._x = -46;
}
if (_global.hardness == 1) {
_root.hardness.ttt.point._x = 33;
}
if (_global.hardness == 2) {
_root.hardness.ttt.point._x = 103;
}
if (_global.hardness == 3) {
_root.hardness.ttt.point._x = 178;
}
if (_global.hardness == 4) {
_root.hardness.ttt.point._x = 246;
}
}
if (!_root.hardness1) {
_parent.hardness.gotoAndPlay("in");
(_root.hardness1 = true);
}
if (_root.controls1) {
_parent.controls.gotoAndPlay("out");
(_root.controls1 = false);
}
if (_root.rules1) {
_parent.rules.gotoAndPlay("out");
(_root.rules1 = false);
}
if (_root.lang1) {
_parent.lang.gotoAndPlay("out");
(_root.lang1 = false);
}
if (_root.about1) {
_parent.about.gotoAndPlay("out");
(_root.about1 = false);
}
if (_root.sponsor_logo1) {
_parent.sponsor_logo.gotoAndPlay("out");
(_root.sponsor_logo1 = false);
}
Symbol 379 MovieClip Frame 32
stop();
Symbol 382 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 382 MovieClip Frame 2
stop();
Symbol 383 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 10
stop();
Symbol 383 MovieClip Frame 19
stop();
Symbol 383 MovieClip Frame 20
if (_root.lang1) {
var a = true;
var b = true;
if ((_global.lang == "eng") && (a)) {
(_global.lang = "rus");
(a = false);
}
if ((_global.lang == "rus") && (a)) {
(_global.lang = "eng");
(a = false);
}
(_root.shared.data.lang = _global.lang);
_root.shared.flush();
if (_global.lang == "eng") {
_root.lang.ttt.point._x = 91;
}
if (_global.lang == "rus") {
_root.lang.ttt.point._x = 161;
}
}
if (_root.hardness1) {
_parent.hardness.gotoAndPlay("out");
(_root.hardness1 = false);
}
if (_root.controls1) {
_parent.controls.gotoAndPlay("out");
(_root.controls1 = false);
}
if (_root.rules1) {
_parent.rules.gotoAndPlay("out");
(_root.rules1 = false);
}
if (!_root.lang1) {
_parent.lang.gotoAndPlay("in");
(_root.lang1 = true);
}
if (_root.about1) {
_parent.about.gotoAndPlay("out");
(_root.about1 = false);
}
if (_root.sponsor_logo1) {
_parent.sponsor_logo.gotoAndPlay("out");
(_root.sponsor_logo1 = false);
}
Symbol 383 MovieClip Frame 32
if (b) {
_root.gotoAndPlay(2);
}
stop();
Symbol 386 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 10
stop();
Symbol 386 MovieClip Frame 19
stop();
Symbol 386 MovieClip Frame 20
getURL ("http://www.freegamesforyourwebsite.com/?" + _root.gameName, "_blank");
Symbol 389 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 10
stop();
Symbol 389 MovieClip Frame 19
stop();
Symbol 389 MovieClip Frame 20
_root.gotoAndStop("scoreboard");
Symbol 393 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 393 MovieClip Frame 2
stop();
Symbol 394 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 6
stop();
Symbol 397 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 397 MovieClip Frame 2
stop();
Symbol 398 MovieClip Frame 1
stop();
Symbol 398 MovieClip Frame 6
stop();
Symbol 401 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 401 MovieClip Frame 2
stop();
Symbol 402 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 6
stop();
Symbol 405 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 405 MovieClip Frame 2
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 6
stop();
Symbol 409 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 409 MovieClip Frame 2
stop();
Symbol 410 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 6
stop();
Instance of Symbol 394 MovieClip in Symbol 411 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
(_parent.point._x = -46);
(_global.hardness = 0);
(_root.shared.data.hardness = _global.hardness);
_root.shared.flush();
}
Instance of Symbol 398 MovieClip in Symbol 411 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
(_parent.point._x = 33);
(_global.hardness = 1);
(_root.shared.data.hardness = _global.hardness);
_root.shared.flush();
}
Instance of Symbol 402 MovieClip in Symbol 411 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
(_parent.point._x = 103);
(_global.hardness = 2);
(_root.shared.data.hardness = _global.hardness);
_root.shared.flush();
}
Instance of Symbol 406 MovieClip in Symbol 411 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
(_parent.point._x = 178);
(_global.hardness = 3);
(_root.shared.data.hardness = _global.hardness);
_root.shared.flush();
}
Instance of Symbol 410 MovieClip in Symbol 411 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
(_parent.point._x = 246);
(_global.hardness = 4);
(_root.shared.data.hardness = _global.hardness);
_root.shared.flush();
}
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 2
if (_global.hardness == 0) {
ttt.point._x = -46;
}
if (_global.hardness == 1) {
ttt.point._x = 33;
}
if (_global.hardness == 2) {
ttt.point._x = 103;
}
if (_global.hardness == 3) {
ttt.point._x = 178;
}
if (_global.hardness == 4) {
ttt.point._x = 246;
}
Symbol 412 MovieClip Frame 6
stop();
Symbol 426 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 426 MovieClip Frame 2
stop();
Symbol 427 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 6
stop();
Symbol 430 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 6
stop();
Symbol 433 MovieClip Frame 1
stop();
Symbol 433 MovieClip Frame 6
stop();
Instance of Symbol 430 MovieClip in Symbol 434 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
(_parent.point._x = 91);
(_global.lang = "eng");
(_root.shared.data.lang = _global.lang);
_root.shared.flush();
_root.gotoAndPlay(2);
}
Instance of Symbol 433 MovieClip in Symbol 434 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
(_parent.point._x = 161);
(_global.lang = "rus");
(_root.shared.data.lang = _global.lang);
_root.shared.flush();
_root.gotoAndPlay(2);
}
Symbol 435 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 2
if (_global.lang == "eng") {
ttt.point._x = 91;
}
if (_global.lang == "rus") {
ttt.point._x = 161;
}
Symbol 435 MovieClip Frame 6
stop();
Symbol 442 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 443 MovieClip Frame 1
stop();
Symbol 443 MovieClip Frame 6
stop();
Symbol 447 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 6
stop();
Symbol 449 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Instance of Symbol 447 MovieClip in Symbol 449 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
getURL ("mailto:e_d_g_e@mail.ru", "_blank");
}
Symbol 449 MovieClip Frame 2
stop();
Symbol 450 MovieClip Frame 1
stop();
Symbol 450 MovieClip Frame 6
stop();
Symbol 451 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 451 MovieClip Frame 2
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 2
this._visible = true;
Symbol 452 MovieClip Frame 6
stop();
Symbol 452 MovieClip Frame 11
this._visible = false;
stop();
Symbol 498 MovieClip Frame 1
Symbol 499 MovieClip Frame 3
gotoAndPlay (2);
Symbol 500 MovieClip Frame 1
function check1() {
var _local1 = 0;
while (_local1 < 50) {
trace((((_local1 + " ") + p_life[_local1]) + " ") + p_damage[_local1]);
_local1++;
}
}
function CreateTank(pos, dir, type) {
var _local2 = 0;
while (_local2 < 20) {
if (!t_life[_local2]) {
t_life[_local2] = 20;
t_x[_local2] = 31 + (32 * (pos - (20 * Math.floor(pos / 20))));
t_y[_local2] = 31 + (32 * Math.floor(pos / 20));
t_dir[_local2] = dir;
t_dir1[_local2] = dir;
t_dir2[_local2] = dir;
t_pos[_local2] = pos;
t_type[_local2] = type;
t_move[_local2] = 0;
t_ai[_local2] = 0;
t_ai1[_local2] = 0;
t_wait[_local2] = 0;
t_shot[_local2] = 0;
t_move1[_local2] = 0;
t_move2[_local2] = 0;
t_wait[_local2] = 32;
t_timer0[_local2] = random(30);
t_rotation[_local2] = 0;
t_rotation1[_local2] = Turn(dir);
t_distance_to_target1[_local2] = 10000;
t_distance_to_target[_local2] = distance(t_x[_local2], t_y[_local2], base_x, base_y);
tanks_num++;
if (type == "weak") {
attachMovie("tank2", "tank_" + _local2, 300 + _local2);
t_armor[_local2] = 45;
}
if (type == "medium") {
attachMovie("tank3", "tank_" + _local2, 300 + _local2);
t_armor[_local2] = 75;
}
if (type == "heavy") {
attachMovie("tank4", "tank_" + _local2, 300 + _local2);
t_armor[_local2] = 150;
}
if (type == "apc") {
attachMovie("tank5", "tank_" + _local2, 300 + _local2);
t_armor[_local2] = 45;
}
addEffect0(this["tank_" + _local2], "shadow", 0);
setProperty("tank_" + _local2, _rotation , t_rotation1[_local2]);
setProperty("tank_" + _local2, _x , t_x[_local2]);
setProperty("tank_" + _local2, _y , t_y[_local2]);
setProperty("tank_" + _local2, _alpha , 0);
playSound("launch_tank", (t_x[_local2] - tank0._x) / 5, distance_volume(t_x[_local2], t_y[_local2], tank0._x, tank0._y));
CreateParticle(t_x[_local2], t_y[_local2], "no", "launch_tank");
return(true);
}
_local2++;
}
return(false);
}
var p_life = new Array();
var p_x = new Array();
var p_y = new Array();
var p_func = new Array();
var p_dir = new Array();
var p_dir1 = new Array();
var p_speed = new Array();
var p_damage = new Array();
var p_type = new Array();
var p_harmful = new Array();
var p_mc = new Array();
var p_timer = new Array();
var p_timer1 = new Array();
particles = function () {
i = 0;
while (i < 100) {
if (p_life[i] > 0) {
if (p_dir[i] == "random") {
(p_x[i] = p_x[i] + (p_speed[i] * Math.cos(Angle(p_dir1[i]))));
(p_y[i] = p_y[i] + (p_speed[i] * Math.sin(Angle(p_dir1[i]))));
}
if (p_dir[i] == "up") {
p_y[i] = p_y[i] - p_speed[i];
}
if (p_dir[i] == "down") {
p_y[i] = p_y[i] + p_speed[i];
}
if (p_dir[i] == "left") {
p_x[i] = p_x[i] - p_speed[i];
}
if (p_dir[i] == "right") {
p_x[i] = p_x[i] + p_speed[i];
}
if (p_type[i] == "frendly") {
if (p_speed[i] < 10) {
p_speed[i] = p_speed[i] + 0.5;
}
setProperty("particle" + i, _x , p_x[i]);
setProperty("particle" + i, _y , p_y[i]);
p_timer[i]--;
if (!p_timer[i]) {
p_timer[i] = 2;
j = 0;
while (j < 100) {
if ((p_life[j] > 1) && (p_life[j] < 1000)) {
if (p_type[j] == "enemy") {
if (((((p_x[j] - 16) < p_x[i]) && ((p_x[j] + 16) > p_x[i])) && ((p_y[j] - 16) < p_y[i])) && ((p_y[j] + 16) > p_y[i])) {
if (p_damage[j] > 0) {
if (p_damage[j] > p_damage[i]) {
(p_damage[j] = p_damage[j] - p_damage[i]);
(p_life[i] = 1000);
} else {
(p_damage[i] = p_damage[i] - p_damage[j]);
(p_life[j] = 1000);
if (p_damage[i] <= 0) {
p_life[i] = 1000;
}
}
}
}
}
}
j++;
}
if (p_life[i] != 1000) {
j = 0;
while (j < 20) {
if (t_life[j] > 0) {
if (((((t_x[j] - 16) < p_x[i]) && ((t_x[j] + 16) > p_x[i])) && ((t_y[j] - 16) < p_y[i])) && ((t_y[j] + 16) > p_y[i])) {
if (t_armor[j] > 0) {
if (t_armor[j] > p_damage[i]) {
(t_armor[j] = t_armor[j] - p_damage[i]);
(p_life[i] = 1000);
(t_ai[j] = p_dir[i]);
} else {
(p_damage[i] = p_damage[i] - t_armor[j]);
(t_armor[j] = 0);
if (p_damage[i] <= 0) {
p_life[i] = 1000;
}
}
}
}
}
j++;
}
}
}
}
if (p_type[i] == "frendly mine") {
if (((p_life[i] == 440) || (p_life[i] == 380)) || (p_life[i] == 320)) {
playSound("mine", (p_x[i] - tank0._x) / 5, distance_volume(p_x[i], p_y[i], tank0._x, tank0._y));
}
if (p_life[i] == 320) {
p_life[i] = 380;
}
if (p_life[i] == 440) {
this[p_mc[i]].a0._y = this[p_mc[i]].a0._y - 2;
}
if (p_life[i] == 430) {
this[p_mc[i]].a1._x = this[p_mc[i]].a1._x + 2;
}
if (p_life[i] == 420) {
this[p_mc[i]].a2._y = this[p_mc[i]].a2._y + 2;
}
if (p_life[i] == 410) {
this[p_mc[i]].a3._x = this[p_mc[i]].a3._x - 2;
}
p_timer[i]--;
if (!p_timer[i]) {
p_timer[i] = 10;
j = 0;
while (j < 20) {
if (t_life[j] > 0) {
if (((((t_x[j] - 16) < p_x[i]) && ((t_x[j] + 16) > p_x[i])) && ((t_y[j] - 16) < p_y[i])) && ((t_y[j] + 16) > p_y[i])) {
if (t_armor[j] > 0) {
if (t_armor[j] > p_damage[i]) {
(t_armor[j] = t_armor[j] - p_damage[i]);
(p_damage[i] = 0);
(p_life[i] = 1000);
} else {
(p_damage[i] = p_damage[i] - t_armor[j]);
(t_armor[j] = 0);
(p_life[i] = 1000);
}
}
}
}
j++;
}
}
}
if (p_type[i] == "frendly hit") {
setProperty("particle" + i, _rotation , getProperty("particle" + i, _rotation) + 15);
setProperty("particle" + i, _alpha , p_life[i] * 15);
setProperty("particle" + i, _xscale , 100 + (20 * (10 - p_life[i])));
setProperty("particle" + i, _yscale , 100 + (20 * (10 - p_life[i])));
}
if (p_type[i] == "frendly glow") {
}
if (p_type[i] == "spot") {
if (p_life[i] < 10) {
setProperty("particle" + i, _alpha , p_life[i] * 10);
}
}
if (p_type[i] == "enemy") {
setProperty("particle" + i, _x , p_x[i]);
setProperty("particle" + i, _y , p_y[i]);
p_timer[i]--;
if (!p_timer[i]) {
p_timer[i] = 3;
if (((((tank0._x - 16) < p_x[i]) && ((tank0._x + 16) > p_x[i])) && ((tank0._y - 16) < p_y[i])) && ((tank0._y + 16) > p_y[i])) {
if (tank0.armor > 0) {
if (tank0.armor > p_damage[i]) {
if (!tank0.sh) {
tank0.armor = tank0.armor - p_damage[i];
}
p_life[i] = 1000;
} else {
if (!tank0.sh) {
(p_damage[i] = p_damage[i] - tank0.armor);
(tank0.armor = 0);
} else {
p_damage[i] = 0;
}
if (p_damage[i] <= 0) {
p_life[i] = 1000;
}
}
if (!tank0.sh) {
_parent.menu.decrease_armor._alpha = 100;
}
Update();
}
}
}
}
if (p_type[i] == "enemy glow") {
setProperty("particle" + i, _x , p_x[i]);
setProperty("particle" + i, _y , p_y[i]);
setProperty("particle" + i, _yscale , 1000 - (p_life[i] * 100));
setProperty("particle" + i, _xscale , (p_life[i] * 20) - 19);
setProperty("particle" + i, _alpha , 10 * p_life[i]);
}
if (p_type[i] == "enemy hit") {
setProperty("particle" + i, _alpha , 30 + random(60));
setProperty("particle" + i, _xscale , 50 + Math.sqrt(3000 * (5 - p_life[i])));
setProperty("particle" + i, _yscale , 50 + Math.sqrt(3000 * (5 - p_life[i])));
}
if (p_type[i] == "destroy hit") {
setProperty("particle" + i, _alpha , 30 + random(60));
setProperty("particle" + i, _xscale , 50 + Math.sqrt(3000 * (5 - p_life[i])));
setProperty("particle" + i, _yscale , 50 + Math.sqrt(3000 * (5 - p_life[i])));
}
if (p_type[i] == "enemy blow") {
setProperty("particle" + i, _xscale , 100 + Math.sqrt(5000 * (20 - p_life[i])));
setProperty("particle" + i, _yscale , 100 + Math.sqrt(5000 * (20 - p_life[i])));
setProperty("particle" + i, _alpha , p_life[i] * 5);
}
if (p_type[i] == "destroy") {
if (!random(2)) {
CreateParticle((p_x[i] - 16) + random(33), (p_y[i] - 16) + random(33), "random", "destroy hit");
}
if (p_life[i] == 1) {
CreateParticle(p_x[i], p_y[i], "no", "enemy blow");
}
}
if (p_type[i] == "bombs") {
if (((((p_life[i] == 25) || (p_life[i] == 20)) || (p_life[i] == 15)) || (p_life[i] == 10)) || (p_life[i] == 5)) {
CreateParticle((p_x[i] - 48) + random(97), (p_y[i] - 48) + random(97), "random", "enemy blow 1");
}
if (p_life[i] == 1) {
j = 0;
while (j < 20) {
if (t_life[j] > 0) {
if (((((t_x[j] - 48) < p_x[i]) && ((t_x[j] + 48) > p_x[i])) && ((t_y[j] - 48) < p_y[i])) && ((t_y[j] + 48) > p_y[i])) {
t_armor[j] = 0;
}
}
j++;
}
}
}
if (p_type[i] == "powerup") {
if (p_life[i] >= 580) {
setProperty("particle" + i, _alpha , 5 * (600 - p_life[i]));
setProperty("particle" + i, _xscale , 100 + Math.pow(2, (p_life[i] - 580) / 2));
setProperty("particle" + i, _yscale , 100 + Math.pow(2, (p_life[i] - 580) / 2));
}
if (p_life[i] == 300) {
(p_dir[i] = -1);
(p_dir1[i] = 100);
}
if (p_life[i] < 300) {
p_dir1[i] = p_dir1[i] + (5 * p_dir[i]);
if (p_dir1[i] < 0) {
(p_dir[i] = -1 * p_dir[i]);
(p_dir1[i] = 0);
}
if ((p_dir1[i] > ((100 * p_life[i]) / 300)) && (p_dir[i] != 0)) {
(p_dir[i] = -1 * p_dir[i]);
(p_dir1[i] = (100 * p_life[i]) / 300);
}
setProperty("particle" + i, _alpha , p_dir1[i]);
}
if (((((((tank0._x - 16) < p_x[i]) && ((tank0._x + 16) > p_x[i])) && ((tank0._y - 16) < p_y[i])) && ((tank0._y + 16) > p_y[i])) && (!p_speed[i])) && (tank0.armor > 0)) {
playSound("pickup", 0);
if (p_func[i] == "charges") {
(tank0.charges = 100);
(_parent.menu.increase_ammo._alpha = 100);
}
if (p_func[i] == "armor") {
(tank0.armor = 45);
(_parent.menu.increase_armor._alpha = 100);
}
if (p_func[i] == "megacharge") {
tank0.mc = 1;
if (!tank0.sh) {
addEffect0("eng.tank0", "mega charge", 1);
}
if (tank0.charges == 0) {
tank0.charges = 1;
}
}
if (p_func[i] == "mines") {
if (tank0.mines < 3) {
tank0.mines++;
}
_parent.menu.mine_put_glow._alpha = 100;
}
if (p_func[i] == "bombs") {
tank0.bm = 2000;
if (!tank0.sh) {
addEffect0("eng.tank0", "bombs", 1);
}
}
if (p_func[i] == "shield") {
(tank0.sh = 1);
(tank0.sh_timer = 300);
addEffect0("eng.tank0", "shield", 1);
}
Update();
p_speed[i] = 20;
(p_dir[i] = 0);
(p_dir1[i] = 100);
}
if (p_speed[i] > 0) {
p_x[i] = p_x[i] + ((tank0._x - p_x[i]) / 10);
p_y[i] = p_y[i] + ((tank0._y - p_y[i]) / 10);
p_dir1[i] = p_dir1[i] - 5;
setProperty("particle" + i, _x , p_x[i]);
setProperty("particle" + i, _y , p_y[i]);
setProperty("particle" + i, _alpha , p_dir1[i]);
p_speed[i]--;
if (p_speed[i] <= 0) {
p_life[i] = 1000;
}
}
}
if (p_type[i] == "smoke") {
setProperty("particle" + i, _alpha , (100 * p_life[i]) / 30);
setProperty("particle" + i, _xscale , Math.sqrt(1000 * (30 - p_life[i])));
setProperty("particle" + i, _yscale , Math.sqrt(1000 * (30 - p_life[i])));
setProperty("particle" + i, _x , p_x[i]);
setProperty("particle" + i, _y , p_y[i]);
}
if (p_type[i] == "big smoke") {
setProperty("particle" + i, _alpha , (100 * p_life[i]) / 50);
setProperty("particle" + i, _xscale , Math.sqrt(3000 * (50 - p_life[i])));
setProperty("particle" + i, _yscale , Math.sqrt(3000 * (50 - p_life[i])));
setProperty("particle" + i, _x , p_x[i]);
setProperty("particle" + i, _y , p_y[i]);
}
if (p_type[i] == "smokes") {
if (p_life[i] == 10) {
CreateParticle((p_x[i] - 8) + random(17), (p_y[i] - 8) + random(17), "random", "smoke");
}
if (p_life[i] == 8) {
CreateParticle((p_x[i] - 8) + random(17), (p_y[i] - 8) + random(17), "random", "smoke");
}
if (p_life[i] == 6) {
CreateParticle((p_x[i] - 8) + random(17), (p_y[i] - 8) + random(17), "random", "smoke");
}
if (p_life[i] == 3) {
CreateParticle((p_x[i] - 8) + random(17), (p_y[i] - 8) + random(17), "random", "smoke");
}
if (p_life[i] == 1) {
CreateParticle((p_x[i] - 8) + random(17), (p_y[i] - 8) + random(17), "random", "smoke");
}
}
if (p_type[i] == "spark") {
setProperty("particle" + i, _alpha , random(100));
setProperty("particle" + i, _x , p_x[i]);
setProperty("particle" + i, _y , p_y[i]);
}
if (p_type[i] == "launch_tank") {
if (!random(2)) {
CreateParticle((p_x[i] - 12) + random(25), (p_y[i] - 12) + random(25), "no", "launch");
}
}
if (p_type[i] == "launch") {
if (p_life[i] > 10) {
setProperty("particle" + i, _alpha , (100 * (20 - p_life[i])) / 10);
}
if (p_life[i] <= 10) {
setProperty("particle" + i, _alpha , (100 * p_life[i]) / 10);
}
}
if ((((p_life[i] > 0) && (p_life[i] < 1000)) && (p_harmful[i])) && (p_timer[i] == 1)) {
a = CheckCollision(p_x[i], p_y[i]);
if (a >= 0) {
if (a < 240) {
if (_parent.map[a] == 2) {
tellTarget ("_parent.map1.map3.duplicatedcell" + a) {
_root.b = (_root.c = _currentframe);
};
_root.b = _root.b + p_damage[i];
if (_root.b > 100) {
_root.b = 100;
_parent.map[a] = 0;
playSound("wall_destroy", (p_x[i] - tank0._x) / 5, distance_volume(p_x[i], p_y[i], tank0._x, tank0._y));
}
tellTarget ("_parent.map1.map3.duplicatedcell" + a) {
gotoAndStop(_root.b);
};
p_damage[i] = p_damage[i] - (100 - _root.c);
}
if ((_parent.map[a] == 4) && (p_type[i] != "frendly")) {
tellTarget ("_parent.map1.map3.duplicatedcell" + a) {
_root.b = _currentframe;
};
if (_root.b < 6) {
_root.b++;
_parent.menu.decrease_armor._alpha = 100;
tellTarget ("_parent.map1.map3.duplicatedcell" + a) {
gotoAndStop(_root.b);
};
if (_root.b == 6) {
CreateParticle(31 + (base_pos_x * 32), 31 + (base_pos_y * 32), "no", "destroy");
base = 0;
if (!timer1) {
timer1 = 90;
}
}
}
p_damage[i] = 0;
}
if ((_parent.map[a] == 3) || (_parent.map[a] > 4)) {
p_damage[i] = 0;
}
}
if (a == 500) {
p_life[i] = 1000;
}
if (p_damage[i] <= 0) {
p_life[i] = 1000;
}
}
}
if (p_life[i] == 1000) {
if (p_type[i] == "frendly") {
CreateParticle(p_x[i], p_y[i], "random", "frendly hit");
if (p_func[i]) {
CreateParticle((p_x[i] - 8) + random(17), (p_y[i] - 8) + random(17), "random", "frendly hit");
}
if (p_func[i]) {
CreateParticle((p_x[i] - 8) + random(17), (p_y[i] - 8) + random(17), "random", "frendly hit");
}
CreateParticle((p_x[i] - 3) + random(7), (p_y[i] - 3) + random(7), "no", "spot");
}
if (p_type[i] == "enemy") {
CreateParticle(p_x[i], p_y[i], "random stay", "enemy hit");
CreateParticle((p_x[i] - 3) + random(7), (p_y[i] - 3) + random(7), "no", "spot");
}
if (p_type[i] == "frendly mine") {
CreateParticle(p_x[i], p_y[i], "no", "enemy blow");
CreateParticle((p_x[i] - 3) + random(7), (p_y[i] - 3) + random(7), "no", "spot");
}
p_life[i] = 0;
}
if (p_life >= 0) {
p_life[i]--;
}
if (p_life[i] <= 0) {
(p_life[i] = 0);
p_num--;
removeMovieClip("particle" + i);
}
}
i++;
}
};
CreateParticle = function (x, y, dir, type, func) {
var _local4 = 0;
while (p_life[particle_count]) {
particle_count++;
_local4++;
if (particle_count == 100) {
particle_count = 0;
}
if (_local4 == 100) {
trace("tt");
return(undefined);
}
}
p_num++;
p_dir[particle_count] = dir;
p_dir1[particle_count] = 0;
p_x[particle_count] = x;
p_y[particle_count] = y;
p_type[particle_count] = type;
p_harmful[particle_count] = 0;
p_life[particle_count] = 1;
p_speed[particle_count] = 0;
p_func[particle_count] = func;
if (type == "frendly") {
attachMovie("particle_0", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 2;
p_damage[particle_count] = 15;
p_harmful[particle_count] = 1;
p_life[particle_count] = 100;
p_x[particle_count] = p_x[particle_count] + ShiftX(dir, 15);
p_y[particle_count] = p_y[particle_count] + ShiftY(dir, 15);
if (func) {
setProperty("particle" + particle_count, _xscale , 150);
setProperty("particle" + particle_count, _yscale , 150);
p_damage[particle_count] = 990;
}
p_timer[i] = 1;
}
if (type == "frendly hit") {
attachMovie("particle_01", "particle" + particle_count, 500 + particle_count);
p_damage[particle_count] = 0;
p_life[particle_count] = 10;
p_dir1[particle_count] = Turn(dir);
playSound("frendly_hit", (x - tank0._x) / 5, distance_volume(x, y, tank0._x, tank0._y));
}
if (type == "spot") {
attachMovie("particle3", "particle" + particle_count, 200 + particle_count);
p_damage[particle_count] = 0;
p_life[particle_count] = 50;
p_dir1[particle_count] = Turn(dir);
}
if (type == "frendly glow") {
attachMovie("particle_02", "particle" + particle_count, 500 + particle_count);
p_damage[particle_count] = 0;
p_life[particle_count] = 3;
p_x[particle_count] = p_x[particle_count] + ShiftX(dir, 25);
p_y[particle_count] = p_y[particle_count] + ShiftY(dir, 25);
setProperty("particle" + particle_count, _xscale , 200);
setProperty("particle" + particle_count, _yscale , 200);
}
if (type == "enemy") {
attachMovie("particle_1", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 5;
p_damage[particle_count] = 15;
p_harmful[particle_count] = 1;
p_life[particle_count] = 200;
p_x[particle_count] = p_x[particle_count] + ShiftX(dir, 15, func);
p_y[particle_count] = p_y[particle_count] + ShiftY(dir, 15, func);
p_timer[particle_count] = 1;
}
if (type == "enemy apc") {
attachMovie("particle_1", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 5;
p_damage[particle_count] = 15;
p_harmful[particle_count] = 1;
p_life[particle_count] = 200;
p_type[particle_count] = "enemy";
p_x[particle_count] = p_x[particle_count] + ShiftX(dir, 10, func);
p_y[particle_count] = p_y[particle_count] + ShiftY(dir, 10, func);
}
if (type == "enemy glow") {
attachMovie("particle_12", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 3;
p_damage[particle_count] = 0;
p_life[particle_count] = 10;
p_x[particle_count] = p_x[particle_count] + ShiftX(dir, 15, func);
p_y[particle_count] = p_y[particle_count] + ShiftY(dir, 15, func);
}
if (type == "enemy glow apc") {
attachMovie("particle_12", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 3;
p_damage[particle_count] = 0;
p_life[particle_count] = 10;
p_type[particle_count] = "enemy glow";
p_x[particle_count] = p_x[particle_count] + ShiftX(dir, 10, func);
p_y[particle_count] = p_y[particle_count] + ShiftY(dir, 10, func);
}
if (type == "enemy hit") {
attachMovie("particle_11", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 2;
p_damage[particle_count] = 0;
p_life[particle_count] = 5;
playSound("explode0", (x - tank0._x) / 5, distance_volume(x, y, tank0._x, tank0._y));
}
if (type == "destroy hit") {
attachMovie("particle_11", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 2;
p_damage[particle_count] = 0;
p_life[particle_count] = 5;
}
if (type == "enemy blow") {
attachMovie("particle_13", "particle" + particle_count, 500 + particle_count);
p_damage[particle_count] = 0;
p_life[particle_count] = 20;
playSound("destroy", (x - tank0._x) / 5, distance_volume(x, y, tank0._x, tank0._y));
}
if (type == "enemy blow 1") {
attachMovie("particle_13", "particle" + particle_count, 500 + particle_count);
p_damage[particle_count] = 0;
p_life[particle_count] = 20;
p_type[particle_count] = "enemy blow";
playSound("destroy", (x - tank0._x) / 5, 100);
}
if (type == "destroy") {
p_damage[particle_count] = 0;
p_life[particle_count] = 25;
playSound("heavy_destroy", (x - tank0._x) / 5, distance_volume(x, y, tank0._x, tank0._y));
}
if (type == "bombs") {
p_damage[particle_count] = 0;
p_life[particle_count] = 25;
}
if (type == "powerup") {
if (func == "charges") {
attachMovie("powerup0", "particle" + particle_count, 1400 + particle_count);
}
if (func == "armor") {
attachMovie("powerup1", "particle" + particle_count, 1400 + particle_count);
}
if (func == "megacharge") {
attachMovie("powerup2", "particle" + particle_count, 1400 + particle_count);
}
if (func == "mines") {
attachMovie("powerup3", "particle" + particle_count, 1400 + particle_count);
}
if (func == "bombs") {
attachMovie("powerup4", "particle" + particle_count, 1400 + particle_count);
}
if (func == "shield") {
attachMovie("powerup5", "particle" + particle_count, 1400 + particle_count);
}
addEffect0("eng.particle" + particle_count, "shadow", 0);
setProperty("particle" + particle_count, _alpha , 0);
p_dir1[particle_count] = -1;
p_damage[particle_count] = 0;
p_life[particle_count] = 600;
playSound("powerup_resp", (p_x[particle_count] - tank0._x) / 5, 50);
}
if (type == "smoke") {
attachMovie("smoke", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 0.2 + (random(5) / 10);
p_damage[particle_count] = 0;
p_life[particle_count] = 30;
p_dir[particle_count] = "random";
p_dir1[particle_count] = random(360);
setProperty("particle" + particle_count, _xscale , 0);
setProperty("particle" + particle_count, _yscale , 0);
}
if (type == "big smoke") {
attachMovie("smoke", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 0.1 + (random(5) / 15);
p_damage[particle_count] = 0;
p_life[particle_count] = 50;
p_dir[particle_count] = "random";
p_dir1[particle_count] = random(360);
setProperty("particle" + particle_count, _xscale , 0);
setProperty("particle" + particle_count, _yscale , 0);
}
if (type == "smokes") {
p_damage[particle_count] = 0;
p_life[particle_count] = 10;
}
if (type == "spark") {
attachMovie("spark", "particle" + particle_count, 500 + particle_count);
p_speed[particle_count] = 0.5 + random(5);
p_damage[particle_count] = 0;
p_life[particle_count] = 5 + random(5);
p_dir[particle_count] = "random";
p_dir1[particle_count] = random(360);
p_func[particle_count] = p_life[particle_count];
playSound("spark", (x - tank0._x) / 5, distance_volume(x, y, tank0._x, tank0._y));
}
if (type == "launch_tank") {
p_damage[particle_count] = 0;
p_life[particle_count] = 40;
}
if (type == "launch") {
attachMovie("particle2", "particle" + particle_count, 500 + particle_count);
p_damage[particle_count] = 0;
p_life[particle_count] = 20;
}
if (type == "no") {
attachMovie("spark", "particle" + particle_count, 500 + particle_count);
p_damage[particle_count] = 0;
p_life[particle_count] = 1;
}
if (type == "frendly mine") {
attachMovie("mine", "particle" + particle_count, 200 + particle_count);
p_mc[particle_count] = "particle" + particle_count;
addEffect0("eng.particle" + particle_count, "shadow1", 0);
p_damage[particle_count] = 200;
p_life[particle_count] = 500;
playSound("mine_put", 0);
p_timer[particle_count] = 10;
}
setProperty("particle" + particle_count, _rotation , Turn(dir));
if (p_dir1[particle_count] != -1) {
setProperty("particle" + particle_count, _alpha , 100);
}
setProperty("particle" + particle_count, _x , p_x[particle_count]);
setProperty("particle" + particle_count, _y , p_y[particle_count]);
particle_count++;
if (particle_count == 100) {
particle_count = 0;
}
};
var particle_count = 0;
var p_num = 0;
var ttt1 = 0;
var ttt2 = 0;
var timer;
var i;
var j;
var a;
var b;
var c;
var e;
var base_pos_x;
var base_pos_y;
var pausee = false;
var base_x;
var base_y;
var tank0pos_start;
var tank0_x_start;
var tank0_y_start;
var weak_tanks;
var medium_tanks;
var heavy_tanks;
var apcs;
var helicopters;
var mechs;
var total_tanks;
var total_tanks1;
var tanks_hits = 0;
var launch_pads = new Array();
var lpnum;
var lplaunch = 0;
var launcher = 30;
var launch_speed = 150;
var max_tanks = 30;
var poweruper = 450;
var tanks_num = 0;
var base;
var timer0 = 0;
var timer1 = 0;
var mv = 2;
var low_ammo_glow_add = 10;
attachMovie("tank0", "tank0", 330);
tank0._rotation = (tank0._rotation1 = -90);
(tank0.shot = 0);
(tank0.shot1 = 0);
(tank0.move1 = "up");
(tank0.move5 = tank0.move1);
tank0.armor = 45;
tank0.charges = 100;
tank0.mines = 3;
tank0.life = 1;
tank0.mc = 0;
tank0.sh = 0;
tank0.mc_effect = 50;
tank0.mc_add = -1;
tank0.bm = 0;
tank0.engine = false;
pausee = false;
initSound_tank0_engine();
initSound_tank2_engine();
_global.stat = "playing";
Update();
GenerateMap(level);
(tank0.pos = tank0pos_start);
(tank0._x = tank0_x_start);
(tank0._y = tank0_y_start);
(_parent.mapMove[tank0.pos] = 1);
addEffect0(this.tank0, "shadow", 0);
CreateParticle(tank0._x, tank0._y, "no", "launch_tank");
playSound("launch_tank", 0);
_parent.menu.levell._alpha = 100;
this.onEnterFrame = function () {
if (!pausee) {
player1();
particles();
tanks();
launch();
powerup();
timers();
} else {
Pause1();
}
};
launch = function () {
if (!(launcher--)) {
var _local1 = 0;
var _local2 = random(((weak_tanks + medium_tanks) + heavy_tanks) + apcs);
if (tanks_num < max_tanks) {
if ((!_local1) && (_local2 < weak_tanks)) {
if (CreateTank(launch_pads[lplaunch], randomDir1(), "weak")) {
weak_tanks--;
_local1 = 1;
}
}
if (((!_local1) && (_local2 >= weak_tanks)) && (_local2 < (weak_tanks + medium_tanks))) {
if (CreateTank(launch_pads[lplaunch], randomDir1(), "medium")) {
medium_tanks--;
_local1 = 1;
}
}
if (((!_local1) && (_local2 >= (weak_tanks + medium_tanks))) && (_local2 < ((weak_tanks + medium_tanks) + heavy_tanks))) {
if (CreateTank(launch_pads[lplaunch], randomDir1(), "heavy")) {
heavy_tanks--;
_local1 = 1;
}
}
if (((!_local1) && (_local2 >= ((weak_tanks + medium_tanks) + heavy_tanks))) && (_local2 < (((weak_tanks + medium_tanks) + heavy_tanks) + apcs))) {
if (CreateTank(launch_pads[lplaunch], randomDir1(), "apc")) {
apcs--;
_local1 = 1;
}
}
if (_local1) {
lplaunch++;
if (lplaunch >= lpnum) {
lplaunch = 0;
}
}
}
launcher = launch_speed;
}
};
powerup = function () {
if (!(poweruper--)) {
var _local4 = random(6);
var _local3 = random(20);
var _local2 = random(12);
var _local5 = 0;
while ((_parent.map[(_local2 * 20) + _local3] && (!_parent.mapMove[(_local2 * 20) + _local3])) && (((_local2 * 20) + _local3) != tank0.pos)) {
_local3 = random(20);
_local2 = random(12);
_local5++;
if (_local5 > 50) {
_local4 = -1;
break;
}
}
if (_local4 == 0) {
CreateParticle(31 + (32 * _local3), 31 + (32 * _local2), "no", "powerup", "charges");
}
if (_local4 == 1) {
CreateParticle(31 + (32 * _local3), 31 + (32 * _local2), "no", "powerup", "armor");
}
if (_local4 == 2) {
CreateParticle(31 + (32 * _local3), 31 + (32 * _local2), "no", "powerup", "megacharge");
}
if (_local4 == 3) {
CreateParticle(31 + (32 * _local3), 31 + (32 * _local2), "no", "powerup", "mines");
}
if (_local4 == 4) {
CreateParticle(31 + (32 * _local3), 31 + (32 * _local2), "no", "powerup", "bombs");
}
if (_local4 == 5) {
CreateParticle(31 + (32 * _local3), 31 + (32 * _local2), "no", "powerup", "shield");
}
poweruper = 50 + random(300);
}
};
Pause = function (st) {
if (!pausee) {
if (_global.stat == "restart") {
if (_global.lang == "eng") {
_root.ttg = "LET'S DO IT AGAIN";
}
if (_global.lang == "rus") {
_root.ttg = "\u043D\u0435\u0442 \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0433\u043E";
}
_parent.message_mc.point._y = 250;
}
if (_global.stat == "playing") {
if (_global.lang == "eng") {
_root.ttg = "RESUME";
}
if (_global.lang == "rus") {
_root.ttg = "\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C";
}
_parent.message_mc.point._y = 250;
}
if (_global.stat == "gameover") {
if (_global.lang == "eng") {
_root.ttg = "YOU LOST";
}
if (_global.lang == "rus") {
_root.ttg = "\u0432\u044B \u043F\u0440\u043E\u0438\u0433\u0440\u0430\u043B\u0438";
}
_parent.message_mc.point._y = 266;
}
if (_global.stat == "nextlevel") {
_global.level++;
if (_global.level == _parent.levels.length) {
if (_global.lang == "eng") {
_root.ttg = "CONGRATULATIONS! YOU WIN!";
}
if (_global.lang == "rus") {
_root.ttg = "\u043F\u043E\u0437\u0434\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F! \u0432\u044B \u043F\u0440\u043E\u0448\u043B\u0438 \u0438\u0433\u0440\u0443!";
}
st = "victory";
_global.stat = "gameover";
} else {
if (_global.lang == "eng") {
_root.ttg = "LET'S GO";
}
if (_global.lang == "rus") {
_root.ttg = "\u0432\u043F\u0435\u0440\u0435\u0434!";
}
}
_parent.message_mc.point._y = 250;
}
_parent.message_mc.gotoAndPlay("in");
(pausee = true);
(_global.state = "pause");
if (tank2_engine) {
stopSound_tank2_engine();
(tank2_engine = false);
}
if (tank0.engine) {
stopSound_tank0_engine();
(tank0.engine = false);
}
_parent.message_mc.st = st;
} else {
if (_parent.message_mc.point._y == 266) {
(_global.stat = "gameover");
delete this.onEnterFrame;
_root.gotoAndPlay("initgame");
}
if (_global.stat == "gameover") {
delete this.onEnterFrame;
_root.gotoAndPlay("initgame");
}
if (_global.stat == "nextlevel") {
delete this.onEnterFrame;
_root.gotoAndPlay("initgame");
}
if (_global.stat == "restart") {
delete this.onEnterFrame;
_root.gotoAndPlay("initgame");
}
_parent.message_mc.gotoAndPlay("out");
(pausee = false);
(_global.state = "main");
}
};
Pause1 = function () {
if ((_root.cursor_move == "up") || (_root.cursor_move == "home")) {
_parent.message_mc.point._y = 250;
}
if ((_root.cursor_move == "down") || (_root.cursor_move == "end")) {
_parent.message_mc.point._y = 266;
}
};
timers = function () {
if (timer1 > 0) {
timer1--;
if (timer1 <= 0) {
if (!base) {
_global.lives--;
if (_global.lives > 0) {
(_global.stat = "restart");
Pause("restart");
} else {
(_global.stat = "gameover");
Pause("gameover");
}
}
if (tank0.armor <= 0) {
(_global.stat = "gameover");
Pause("gameover");
}
if (total_tanks <= 0) {
(_global.stat = "nextlevel");
Pause("nextlevel");
}
}
}
};
player1 = function () {
if (tank0.charges <= 15) {
_parent.menu.low_ammo_glow._alpha = _parent.menu.low_ammo_glow._alpha + low_ammo_glow_add;
if ((_parent.menu.low_ammo_glow._alpha >= 100) || (_parent.menu.low_ammo_glow._alpha <= 0)) {
low_ammo_glow_add = -low_ammo_glow_add;
}
} else if (_parent.menu.low_ammo_glow._alpha != 0) {
(_parent.menu.low_ammo_glow._alpha = 0);
(low_ammo_glow_add = Math.abs(low_ammo_glow_add));
}
if (_parent.menu.destroy_tank_glow._alpha > 0) {
_parent.menu.destroy_tank_glow._alpha = _parent.menu.destroy_tank_glow._alpha - 10;
}
if (_parent.menu.mine_put_glow._alpha > 0) {
_parent.menu.mine_put_glow._alpha = _parent.menu.mine_put_glow._alpha - 10;
}
if (_parent.menu.decrease_armor._alpha > 0) {
_parent.menu.decrease_armor._alpha = _parent.menu.decrease_armor._alpha - 3;
}
if (_parent.menu.increase_armor._alpha > 0) {
_parent.menu.increase_armor._alpha = _parent.menu.increase_armor._alpha - 5;
}
if (_parent.menu.increase_ammo._alpha > 0) {
_parent.menu.increase_ammo._alpha = _parent.menu.increase_ammo._alpha - 5;
}
if (_parent.menu.increase_lives._alpha > 0) {
_parent.menu.increase_lives._alpha = _parent.menu.increase_lives._alpha - 5;
}
if (_parent.menu.popup._alpha > 0) {
_parent.menu.popup._alpha = _parent.menu.popup._alpha - 1;
}
if (_parent.menu.levell._alpha > 0) {
_parent.menu.levell._alpha = _parent.menu.levell._alpha - 1;
}
if (tank0.armor <= 0) {
if ((tank0.armor <= 0) && (tank0.armor > -1000)) {
tank0.armor = -1000;
if (((tank0.move2 > 0) && (tank0.allowMove)) && (tank0.move1 == tank0.move5)) {
_parent.mapMove[GetPosition(tank0.pos, tank0.move1)] = 0;
} else {
_parent.mapMove[tank0.pos] = 0;
}
tellTarget (tank0) {
gotoAndStop ("stop");
};
CreateParticle(tank0._x, tank0._y, "no", "destroy");
if (tank0.engine) {
stopSound_tank0_engine();
(tank0.engine = false);
}
}
if (tank0.armor == -1050) {
if (base) {
_global.lives--;
}
if ((_global.lives > 0) && (base)) {
tank0.armor = 45;
tank0.charges = 100;
tank0.mines = 3;
tank0.life = 1;
tank0.mc = 0;
tank0.bm = 0;
tank0.sh = 0;
tank0.mc_effect = 50;
tank0.mc_add = -1;
(tank0.pos = tank0pos_start);
(tank0._x = tank0_x_start);
(tank0._y = tank0_y_start);
removeEffect0("eng.tank0", 1);
targett.removeMovieClip();
tank0._rotation = (tank0._rotation1 = -90);
(tank0.shot = 0);
(tank0.shot1 = 0);
tank0.move2 = 0;
(tank0.move1 = "up");
(tank0.move5 = tank0.move1);
CreateParticle(tank0._x, tank0._y, "no", "launch_tank");
playSound("launch_tank", 0);
setProperty(tank0, _alpha , 100);
} else {
tank0.life = 0;
if (!timer1) {
timer1 = 90;
}
}
Update();
}
setProperty(tank0, _alpha , tank0.armor + 1050);
tank0.armor--;
}
if (tank0.armor > 0) {
if (tank0.bm == 2000) {
attachMovie("target", "targett", 1020, {_x:31 + (32 * getXpos(tank0.pos)), _y:31 + (32 * getYpos(tank0.pos))});
targett.pos = tank0.pos;
tank0.bm = 1;
playSound("target", 0);
}
if (tank0.sh_timer > 0) {
if (tank0.sh_timer > 60) {
var _local3 = tank0.filters;
_local3[1].alpha = 0.5 + (random(50) / 100);
tank0.filters = _local3;
} else {
var _local3 = tank0.filters;
_local3[1].alpha = 0.1 + (random(10) / 20);
tank0.filters = _local3;
}
tank0.sh_timer--;
if (tank0.sh_timer == 0) {
tank0.sh = 2;
}
}
if (tank0.bm == 1) {
if (tank0.move3) {
if (tank0.move4 == "right") {
if (targett._x < 638) {
targett.pos++;
(targett._x = targett._x + 32);
}
}
if (tank0.move4 == "left") {
if (targett._x > 47) {
targett.pos++;
(targett._x = targett._x - 32);
}
}
if (tank0.move4 == "up") {
if (targett._y > 47) {
(targett.pos = targett.pos - 20);
(targett._y = targett._y - 32);
}
}
if (tank0.move4 == "down") {
if (targett._y < 354) {
(targett.pos = targett.pos + 20);
(targett._y = targett._y + 32);
}
}
tank0.move3 = 0;
}
if (tank0.shot == 1) {
CreateParticle(targett._x, targett._y, "no", "bombs");
targett.gotoAndPlay("out");
playSound("bomber", 0);
(tank0.shot = 0);
(tank0.bm = 2);
}
}
if (((tank0.mc == 1) || (tank0.bm == 1)) && (!tank0.sh)) {
var _local3 = tank0.filters;
_local3[1].alpha = 0.5 + (random(50) / 100);
tank0.filters = _local3;
}
if (((tank0.mc > 1) || (tank0.bm > 1)) || (tank0.sh > 1)) {
var _local3 = tank0.filters;
var _local4;
if (tank0.mc > 1) {
_local4 = tank0.mc;
}
if (tank0.bm > 1) {
_local4 = tank0.bm;
}
if (tank0.sh > 1) {
_local4 = tank0.sh;
}
_local3[1].blurX = Math.sqrt(500 * _local4);
_local3[1].blurY = Math.sqrt(500 * _local4);
_local3[1].alpha = 1;
_local3[1].strength = 5 - ((4 * _local4) / 10);
_local3[1].quality = 3;
tank0.filters = _local3;
b = false;
if (tank0.mc > 1) {
tank0.mc++;
}
if (tank0.mc == 11) {
(tank0.mc = 0);
removeEffect0("eng.tank0", 1);
(b = true);
}
if (tank0.bm > 1) {
tank0.bm++;
}
if (tank0.bm == 11) {
(tank0.bm = 0);
removeEffect0("eng.tank0", 1);
(b = true);
}
if (tank0.sh > 1) {
tank0.sh++;
}
if (tank0.sh == 11) {
(tank0.sh = 0);
removeEffect0("eng.tank0", 1);
(b = true);
}
if (b) {
if (tank0.mc > 0) {
addEffect0("eng.tank0", "mega charge", 1);
}
if (tank0.bm > 0) {
addEffect0("eng.tank0", "bombs", 1);
}
if (tank0.sh > 0) {
addEffect0("eng.tank0", "shield", 1);
}
}
}
if (tank0.armor <= 30) {
if (!random(10)) {
CreateParticle((tank0._x - 8) + random(17), (tank0._y - 8) + random(17), "random", "smoke");
}
if (tank0.armor <= 15) {
if (!random(30)) {
CreateParticle((tank0._x - 8) + random(17), (tank0._y - 8) + random(17), "random", "spark");
}
}
}
tank0.tower1._rotation = tank0.tower1._rotation + 2;
if ((tank0.shot == 1) && (!tank0.bm)) {
tank0.shot = 0;
if (tank0.charges > 0) {
CreateParticle(tank0._x, tank0._y, tank0.move1, "frendly glow");
if (tank0.mc == 1) {
CreateParticle(tank0._x, tank0._y, tank0.move1, "frendly", 1);
tank0.mc = 2;
playSound("frendly_mega_fire", 0);
} else {
CreateParticle(tank0._x, tank0._y, tank0.move1, "frendly");
playSound("frendly_fire", 0);
}
tank0.charges--;
Update();
}
}
if (tank0.shot == 2) {
tank0.shot = 0;
if (tank0.mines > 0) {
(i = 0);
(a = true);
while (i < 100) {
if (p_life[i] > 0) {
if (p_type[i] == "frendly mine") {
if ((p_x[i] == tank0._x) && (p_y[i] == tank0._y)) {
a = false;
}
}
}
i++;
}
if (a) {
_parent.menu.mine_put_glow._alpha = 100;
CreateParticle(tank0._x, tank0._y, tank0.move1, "frendly mine", 1);
tank0.mines--;
Update();
} else {
playSound("mine_restricted", 0);
}
}
}
if ((tank0.move3 && (!tank0.move2)) && (!tank0.bm)) {
(tank0.move1 = tank0.move4);
(tank0.move2 = 16 / mv);
(tank0._rotation2 = 32 / mv);
if (!tank0.engine) {
startSound_tank0_engine();
(tank0.engine = true);
}
}
if ((!tank0.move3) && (!tank0.move2)) {
if (tank0.engine) {
stopSound_tank0_engine();
(tank0.engine = false);
}
}
if (tank0.move2 > 0) {
if (tank0.move2 == (16 / mv)) {
tank0.gotoAndStop(ChooseTurn(tank0.move5, tank0.move1));
if (tank0.move1 == tank0.move5) {
tank0.allowMove = CheckMove(tank0.pos, tank0.move1);
} else {
tank0.move2 = 8;
}
if (tank0.move1 == "left") {
if ((tank0._rotation1 <= -60) && (tank0._rotation1 >= -120)) {
tank0._rotation1 = 270;
}
}
if (tank0.move1 == "up") {
if ((tank0._rotation1 <= 210) && (tank0._rotation1 >= 150)) {
tank0._rotation1 = -180;
}
}
if (tank0.allowMove && (tank0.move1 == tank0.move5)) {
(_parent.mapMove[tank0.pos] = 0);
(_parent.mapMove[GetPosition(tank0.pos, tank0.move1)] = 1);
}
}
if (tank0.move1 == "right") {
if (tank0.allowMove && (tank0.move1 == tank0.move5)) {
tank0._x = tank0._x + (2 * mv);
}
}
if (tank0.move1 == "left") {
if (tank0.allowMove && (tank0.move1 == tank0.move5)) {
tank0._x = tank0._x - (2 * mv);
}
}
if (tank0.move1 == "up") {
if (tank0.allowMove && (tank0.move1 == tank0.move5)) {
tank0._y = tank0._y - (2 * mv);
}
}
if (tank0.move1 == "down") {
if (tank0.allowMove && (tank0.move1 == tank0.move5)) {
tank0._y = tank0._y + (2 * mv);
}
}
if (tank0.move2 == 1) {
tank0.gotoAndStop("stop");
if (tank0.allowMove && (tank0.move1 == tank0.move5)) {
tank0.pos = GetPosition(tank0.pos, tank0.move1);
}
tank0.move5 = tank0.move1;
}
tank0.move2--;
}
if (tank0._rotation2 > 0) {
if (tank0.move1 == "right") {
tank0._rotation1 = tank0._rotation1 + (((-tank0._rotation1) / 5) * mv);
}
if (tank0.move1 == "left") {
tank0._rotation1 = tank0._rotation1 + (((180 - tank0._rotation1) / 5) * mv);
}
if (tank0.move1 == "up") {
tank0._rotation1 = tank0._rotation1 + (((-90 - tank0._rotation1) / 5) * mv);
}
if (tank0.move1 == "down") {
tank0._rotation1 = tank0._rotation1 + (((90 - tank0._rotation1) / 5) * mv);
}
tank0._rotation = tank0._rotation1;
tank0.rotation2--;
}
}
};
var t_life = new Array();
var t_x = new Array();
var t_y = new Array();
var t_wait = new Array();
var t_dir = new Array();
var t_dir1 = new Array();
var t_dir2 = new Array();
var t_ai = new Array();
var t_ai1 = new Array();
var t_pos = new Array();
var t_armor = new Array();
var t_shot = new Array();
var t_type = new Array();
var t_rotation = new Array();
var t_rotation1 = new Array();
var t_timer0 = new Array();
var t_move = new Array();
var t_move1 = new Array();
var t_move2 = new Array();
var t_allowMove = new Array();
var t_action = new Array();
var t_distance_to_target = new Array();
var t_distance_to_target1 = new Array();
i = 0;
while (i < 20) {
t_action[i] = new Array();
i++;
}
var min_l = 1000;
var tank2_timer0 = 30;
_global.tank2_engine = false;
tanks = function () {
i = 0;
while (i < 20) {
if (t_life[i] == -1) {
t_life[i] = -2;
}
if (t_life[i] > 0) {
if ((t_timer0[i]--) <= 0) {
(t_timer0[i] = 30);
(a = Math.sqrt(Math.pow(Math.abs(t_x[i] - tank0._x), 2) + Math.pow(Math.abs(t_y[i] - tank0._y), 2)));
if (a < min_l) {
min_l = a;
}
}
if (t_life[i] > 1) {
setProperty("tank_" + i, _alpha , 5 * (22 - t_life[i]));
t_life[i]--;
}
if (t_armor[i] > 0) {
if (t_armor[i] <= 30) {
if (!random(10)) {
CreateParticle((t_x[i] - 8) + random(17), (t_y[i] - 8) + random(17), "random", "smoke");
}
if (t_armor[i] <= 15) {
if (!random(30)) {
CreateParticle((t_x[i] - 8) + random(17), (t_y[i] - 8) + random(17), "random", "spark");
}
}
}
}
if (t_armor[i] <= 0) {
if ((t_armor[i] <= 0) && (t_armor[i] > -1000)) {
if (t_type[i] == "weak") {
_global.score = _global.score + 10;
}
if (t_type[i] == "medium") {
_global.score = _global.score + 30;
}
if (t_type[i] == "heavy") {
_global.score = _global.score + 100;
}
if (t_type[i] == "apc") {
_global.score = _global.score + 30;
}
if (_global.score >= _global.score_to_live) {
_global.lives++;
(_global.score_to_live = _global.score_to_live + 1000);
(_parent.menu.increase_lives._alpha = 100);
}
tanks_num--;
total_tanks--;
tanks_hits++;
Update();
_parent.menu.destroy_tank_glow._alpha = 100;
if (t_move[i] > 0) {
_parent.mapMove[GetPosition(t_pos[i], t_dir[i])] = 0;
} else {
_parent.mapMove[t_pos[i]] = 0;
}
(t_armor[i] = -1000);
(t_rotation[i] = -1);
(t_move[i] = -1);
(t_wait[i] = -1);
t_shot[i] = -1;
tellTarget ("tank_" + i) {
gotoAndStop ("stop");
};
CreateParticle(t_x[i], t_y[i], "no", "destroy");
}
if (t_armor[i] == -1050) {
t_life[i] = 0;
if ((total_tanks <= 0) && (base)) {
timer1 = 90;
}
removeMovieClip("tank_" + i);
}
setProperty("tank_" + i, _alpha , t_armor[i] + 1050);
t_armor[i]--;
}
if (!t_shot[i]) {
if (t_type[i] == "weak") {
t_shot[i] = 30;
if (!random(3)) {
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy glow");
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy");
playSound("enemy_fire", (t_x[i] - tank0._x) / 5, distance_volume(t_x[i], t_y[i], tank0._x, tank0._y));
}
}
if (t_type[i] == "medium") {
t_shot[i] = 15;
if ((!random(3)) || (t_ai1[i])) {
if (t_ai1[i] > 0) {
t_ai1[i]--;
(t_shot[i] = 5);
if (!t_ai1[i]) {
(t_ai[i] = 0);
(t_shot[i] = 15);
}
}
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy glow");
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy");
playSound("enemy_fire", (t_x[i] - tank0._x) / 5, distance_volume(t_x[i], t_y[i], tank0._x, tank0._y));
}
}
if (t_type[i] == "heavy") {
t_shot[i] = 20;
if ((!random(3)) || (t_ai1[i])) {
if (t_ai1[i] > 0) {
t_ai1[i]--;
(t_shot[i] = 5);
if (!t_ai1[i]) {
(t_ai[i] = 0);
(t_shot[i] = 20);
}
}
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy glow", -3);
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy", -3);
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy glow", 3);
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy", 3);
playSound("enemy_fire", (t_x[i] - tank0._x) / 5, distance_volume(t_x[i], t_y[i], tank0._x, tank0._y));
}
}
if (t_type[i] == "apc") {
t_shot[i] = 15;
if (!random(3)) {
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy glow");
CreateParticle(t_x[i], t_y[i], t_dir1[i], "enemy");
playSound("enemy_fire", (t_x[i] - tank0._x) / 5, distance_volume(t_x[i], t_y[i], tank0._x, tank0._y));
}
}
} else {
t_shot[i]--;
}
if ((!t_move[i]) && (!t_wait[i])) {
j = 4;
while (j > 0) {
t_action[i][j] = t_action[i][j - 1];
j--;
}
t_action[i][0] = "wait";
if ((((t_type[i] == "medium") || (t_type[i] == "heavy")) && (t_ai[i])) && (!t_ai1[i])) {
(t_dir[i] = DirAI(t_ai[i]));
(t_ai[i] = 0);
(t_ai1[i] = 3);
(t_action[i][0] = "defense");
} else {
if (t_action[i][1] == "move") {
t_distance_to_target1[i] = t_distance_to_target[i];
t_distance_to_target[i] = distance(t_x[i], t_y[i], base_x, base_y);
}
if (CheckMove(t_pos[i], t_dir[i])) {
if (t_dir[i] == t_dir1[i]) {
t_action[i][0] = "move";
t_action[i][5] = "kek";
if (t_distance_to_target[i] > t_distance_to_target1[i]) {
if (!random(2)) {
if (!t_rotation[i]) {
(t_dir[i] = dirAI2(t_pos[i], t_dir[i], t_distance_to_target[i]));
(t_action[i][0] = "calculate");
}
}
} else if (!random(5)) {
if (!t_rotation[i]) {
(t_dir[i] = dirAI2(t_pos[i], t_dir[i], t_distance_to_target[i]));
(t_action[i][0] = "calculate");
}
}
} else {
t_action[i][0] = "turn";
}
} else if (((((t_action[i][1] == "calculate") && (t_action[i][2] == "calculate")) && (t_action[i][3] == "calculate")) && (t_action[i][4] == "calculate")) && (t_action[i][5] == "kek")) {
if (!t_rotation[i]) {
t_dir[i] = t_dir1[i];
t_dir[i] = dirAI2(t_pos[i], t_dir[i], t_distance_to_target[i]);
t_action[i][0] = "break turn";
t_action[i][5] = "break turn";
}
} else {
if (t_action[i][1] == "calculate") {
if (!t_rotation[i]) {
t_dir[i] = randomDir2(t_pos[i], t_dir[i], t_distance_to_target[i]);
}
} else if (!t_rotation[i]) {
t_dir[i] = dirAI2(t_pos[i], t_dir[i], t_distance_to_target[i]);
}
t_action[i][0] = "calculate";
}
}
switch (t_action[i][0]) {
case "move" :
t_move[i] = 32;
if (t_type[i] == "apc") {
t_move[i] = 16;
}
tellTarget ("tank_" + i) {
gotoAndStop ("forward");
};
break;
case "turn" :
t_rotation[i] = 48;
t_wait[i] = 32;
if (t_type[i] == "apc") {
(t_rotation[i] = 32);
(t_wait[i] = 16);
}
if (t_dir[i] != t_dir1[i]) {
_root.e = ChooseTurn(t_dir[i], t_dir1[i]);
tellTarget ("tank_" + i) {
gotoAndStop(_root.e);
};
}
if (t_dir[i] == "down") {
if ((t_rotation1[i] <= -60) && (t_rotation1[i] >= -120)) {
t_rotation1[i] = 270;
}
}
if (t_dir[i] == "left") {
if ((t_rotation1[i] <= 210) && (t_rotation1[i] >= 150)) {
t_rotation1[i] = -180;
}
}
t_dir1[i] = t_dir[i];
break;
case "break turn" :
t_rotation[i] = 48;
if (t_type[i] == "apc") {
t_rotation[i] = 32;
}
t_wait[i] = 128;
if (t_dir[i] != t_dir1[i]) {
_root.e = ChooseTurn(t_dir[i], t_dir1[i]);
tellTarget ("tank_" + i) {
gotoAndStop(_root.e);
};
}
if (t_dir[i] == "down") {
if ((t_rotation1[i] <= -60) && (t_rotation1[i] >= -120)) {
t_rotation1[i] = 270;
}
}
if (t_dir[i] == "left") {
if ((t_rotation1[i] <= 210) && (t_rotation1[i] >= 150)) {
t_rotation1[i] = -180;
}
}
t_dir1[i] = t_dir[i];
break;
case "wait" :
t_wait[i] = 32 + random(33);
if (t_type[i] == "apc") {
t_wait[i] = 16 + random(17);
}
break;
case "defense" :
t_wait[i] = 32;
t_rotation[i] = 48;
if (t_dir[i] != t_dir1[i]) {
_root.e = ChooseTurn(t_dir[i], t_dir1[i]);
tellTarget ("tank_" + i) {
gotoAndStop(_root.e);
};
}
if (t_dir[i] == "down") {
if ((t_rotation1[i] <= -60) && (t_rotation1[i] >= -120)) {
t_rotation1[i] = 270;
}
}
if (t_dir[i] == "left") {
if ((t_rotation1[i] <= 210) && (t_rotation1[i] >= 150)) {
t_rotation1[i] = -180;
}
}
t_dir1[i] = t_dir[i];
break;
case "calculate" :
t_wait[i] = 8;
if (t_type[i] != "apc") {
break;
}
t_wait[i] = 0;
}
}
if (t_move[i] > 0) {
if (((t_type[i] == "weak") || (t_type[i] == "medium")) || (t_type[i] == "heavy")) {
if (t_move[i] == 32) {
(_parent.mapMove[t_pos[i]] = 0);
(_parent.mapMove[GetPosition(t_pos[i], t_dir[i])] = 1);
}
if (t_dir[i] == "up") {
t_y[i] = t_y[i] - 1;
}
if (t_dir[i] == "down") {
t_y[i] = t_y[i] + 1;
}
if (t_dir[i] == "left") {
t_x[i] = t_x[i] - 1;
}
if (t_dir[i] == "right") {
t_x[i] = t_x[i] + 1;
}
}
if (t_type[i] == "apc") {
if (t_move[i] == 16) {
(_parent.mapMove[t_pos[i]] = 0);
(_parent.mapMove[GetPosition(t_pos[i], t_dir[i])] = 1);
}
if (t_dir[i] == "up") {
t_y[i] = t_y[i] - 2;
}
if (t_dir[i] == "down") {
t_y[i] = t_y[i] + 2;
}
if (t_dir[i] == "left") {
t_x[i] = t_x[i] - 2;
}
if (t_dir[i] == "right") {
t_x[i] = t_x[i] + 2;
}
}
setProperty("tank_" + i, _x , t_x[i]);
setProperty("tank_" + i, _y , t_y[i]);
if (t_move[i] == 1) {
tellTarget ("tank_" + i) {
gotoAndStop ("stop");
};
t_pos[i] = GetPosition(t_pos[i], t_dir[i]);
}
t_move[i]--;
}
if (t_rotation[i] > 0) {
if (((t_type[i] == "weak") || (t_type[i] == "medium")) || (t_type[i] == "heavy")) {
if (t_dir[i] == "right") {
t_rotation1[i] = t_rotation1[i] + ((90 - t_rotation1[i]) / 7);
}
if (t_dir[i] == "left") {
t_rotation1[i] = t_rotation1[i] + ((-90 - t_rotation1[i]) / 7);
}
if (t_dir[i] == "up") {
t_rotation1[i] = t_rotation1[i] + ((-t_rotation1[i]) / 7);
}
if (t_dir[i] == "down") {
t_rotation1[i] = t_rotation1[i] + ((180 - t_rotation1[i]) / 7);
}
setProperty("tank_" + i, _rotation , t_rotation1[i]);
if (t_rotation[i] == 32) {
if (!t_move[i]) {
tellTarget ("tank_" + i) {
gotoAndStop ("stop");
};
}
}
}
if (t_type[i] == "apc") {
if (t_dir[i] == "right") {
t_rotation1[i] = t_rotation1[i] + ((90 - t_rotation1[i]) / 5);
}
if (t_dir[i] == "left") {
t_rotation1[i] = t_rotation1[i] + ((-90 - t_rotation1[i]) / 5);
}
if (t_dir[i] == "up") {
t_rotation1[i] = t_rotation1[i] + ((-t_rotation1[i]) / 5);
}
if (t_dir[i] == "down") {
t_rotation1[i] = t_rotation1[i] + ((180 - t_rotation1[i]) / 5);
}
setProperty("tank_" + i, _rotation , t_rotation1[i]);
if (t_rotation[i] == 24) {
if (!t_move[i]) {
tellTarget ("tank_" + i) {
gotoAndStop ("stop");
};
}
}
}
t_rotation[i]--;
}
if (t_wait[i] > 0) {
t_wait[i]--;
}
}
i++;
}
if ((tank2_timer0--) <= 0) {
tank2_timer0 = 30;
min_l = 75 * (1 - (min_l / 300));
if (min_l < 0) {
min_l = 0;
}
if (min_l > 75) {
min_l = 75;
}
volume_tank2_engine(min_l);
if (min_l && (!tank2_engine)) {
startSound_tank2_engine();
(tank2_engine = true);
}
if ((!min_l) && (tank2_engine)) {
stopSound_tank2_engine();
(tank2_engine = false);
}
min_l = 1000;
}
};
Symbol 503 MovieClip Frame 1
text0.text = _root.ttg;
Symbol 504 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 6
stop();
Symbol 507 MovieClip Frame 5
stop();
Symbol 509 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?" + _root.gameName, "_blank");
}
Symbol 510 MovieClip Frame 1
trace(_global.stat);
Symbol 513 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 513 MovieClip Frame 2
stop();
Symbol 514 MovieClip Frame 1
stop();
Symbol 514 MovieClip Frame 6
stop();
Instance of Symbol 504 MovieClip "text0" in Symbol 515 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_root.eng.Pause();
}
Symbol 522 MovieClip [TMPd4lzhusf84] Frame 1
function earl223(val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
}
mcButtonMain.mcButton.FOG.swapDepths(0);
mcButtonMain.mcButton.attachMovie(btnMC, "btnMC", 0);
mcButtonMain.mcButton.btnMC.onRelease = function () {
var _local2 = new LoadVars();
_local2.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
_local2.score = Score;
_local2.score2 = earl223(String(Score));
_local2.gamer = gameID;
_local2.id = random(9999999);
_local2.toString();
_local2.sendAndLoad("http://www.freeonlinegames.com/scoreboard/score_c.php", _local2, "POST");
delete this.onRelease;
};
Symbol 523 MovieClip Frame 1
stop();
Instance of Symbol 504 MovieClip "text0" in Symbol 523 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_root.gotoAndPlay(16);
}
Instance of Symbol 514 MovieClip in Symbol 523 MovieClip Frame 2
on (rollOver) {
gotoAndPlay ("in");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_root.gotoAndPlay(16);
}
Symbol 523 MovieClip Frame 6
mc = attachMovie("falling text", "ft", this.getNextHighestDepth(), {_x:122, _y:-24});
mc.text.gotoAndStop(st);
stop();
Instance of Symbol 522 MovieClip [TMPd4lzhusf84] "submitScore" in Symbol 523 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
btnMC = "submitMe2";
gameID = 227;
}
Symbol 523 MovieClip Frame 11
mc.gotoAndPlay("out");
Symbol 526 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 526 MovieClip Frame 2
stop();
Symbol 530 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 530 MovieClip Frame 2
stop();
Symbol 537 MovieClip Frame 1
mc = attachMovie("static_elements", "st", this.getNextHighestDepth());
Symbol 537 MovieClip Frame 2
_quality = "BEST";
var menuBitmap = (new flash.display.BitmapData(670, 450, true, 0));
menuBitmap.draw(st);
createEmptyMovieClip("st1", this.getNextHighestDepth());
st1.attachBitmap(menuBitmap, this.getNextHighestDepth());
st.removeMovieClip();
_quality = quality;
stop();
Symbol 556 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 556 MovieClip Frame 2
stop();
Symbol 572 MovieClip Frame 1
if (_global.lang == "eng") {
gotoAndStop (2);
}
stop();
Symbol 572 MovieClip Frame 2
stop();
Symbol 586 Button
on (press) {
sboard.dir = "up";
}
on (release) {
sboard.dir = "stop";
}
Symbol 587 Button
on (press) {
sboard.dir = "down";
}
on (release) {
sboard.dir = "stop";
}
Symbol 594 MovieClip Frame 1
stop();
Symbol 594 MovieClip Frame 2
stop();
Symbol 604 MovieClip [TMP6pbk6uzm9i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load(((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + gameID) + "&rand=") + random(999999)) + "&filt=1");
Symbol 609 MovieClip [TMP6ojzjuzm8i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + _root.gameID) + "&rand=") + random(999999));
Symbol 614 MovieClip Frame 1
stop();
Symbol 614 MovieClip Frame 10
stop();
Symbol 614 MovieClip Frame 19
stop();
Symbol 614 MovieClip Frame 20
_root.gotoAndPlay("scoreboard");