Frame 3
_root.gcs = "boom_";
gotoAndStop ("nitrome");
Frame 5
stop();
Frame 13
_root.sf = new com.nitrome.game.SaveFunctions();
_root.music_controller.startMenuMusic();
_root.sf.init();
Frame 14
stop();
Frame 15
if (_root.gdl.getDoneCheck() != true) {
_root.gdl._visible = true;
_root.gotoAndStop("instructions");
}
stop();
Frame 25
stop();
Frame 35
stop();
Frame 45
stop();
Frame 55
stop();
Frame 65
_root.score_panel.gotoAndStop("track_" + _root.selected_track);
stop();
Frame 75
stop();
Frame 86
_root.game_id = String(("gamedata/" + _root.sf.getDataFile()) + ".swf");
_root.fid = "1a76c";
_root.dfl = false;
_root.game_data_holder.loadMovie(_root.game_id);
play();
Frame 97
if (_root.dfl == true) {
if (_root.fid == _root.sf.getDataFile()) {
_root.gotoAndPlay("load_game");
} else {
_root.gotoAndPlay("loading_data");
}
} else {
_root.gotoAndPlay("loading_data");
}
Frame 98
var back_id = String(("tracks/back_" + _root.selected_track) + ".swf");
_root.back_loaded = false;
_root.game_holder.track_holder.loadMovie(back_id);
var front_id = String(("tracks/front_" + _root.selected_track) + ".swf");
_root.front_loaded = false;
_root.game_holder.topgraphics_holder.loadMovie(front_id);
play();
Frame 109
if ((_root.back_loaded == true) && (_root.front_loaded == true)) {
_root.gotoAndStop("game");
} else {
_root.gotoAndPlay("loading");
}
Frame 110
_root.game_engine = new com.nitrome.tankedup.GameEngine();
_root.game_engine.init();
stop();
Frame 121
stop();
Frame 131
stop();
Frame 142
stop();
Symbol 5 MovieClip [gamedata_loader] Frame 1
#initclip 41
Object.registerClass("gamedata_loader", com.nitrome.gamedata.DataLoad);
#endinitclip
Symbol 8 MovieClip [track_highscore_time] Frame 1
#initclip 40
Object.registerClass("track_highscore_time", com.nitrome.game.HighScoreDisplay);
#endinitclip
Symbol 1160 MovieClip [__Packages.com.nitrome.game.HighScoreDisplay] Frame 0
class com.nitrome.game.HighScoreDisplay extends MovieClip
{
var id, _name, ms, time_text;
function HighScoreDisplay () {
super();
id = Number(_name.slice(5));
displayTime();
}
function displayTime() {
ms = _root.sf.getLevelScore(id);
var _local3 = Math.floor(ms / 1000);
var _local4 = 0;
if (_local3 >= 60) {
while (_local3 >= 60) {
_local3 = _local3 - 60;
_local4++;
}
}
if (_local3 <= 9) {
var _local5 = String("0" + _local3);
} else {
var _local5 = String(_local3);
}
if (_local4 <= 9) {
var _local6 = String("0" + _local4);
} else {
var _local6 = String(_local4);
}
time_text.text = String(((_local6 + "m ") + _local5) + "s");
}
}
Symbol 1161 MovieClip [__Packages.com.nitrome.gamedata.DataLoad] Frame 0
class com.nitrome.gamedata.DataLoad extends MovieClip
{
var _visible, getURL;
function DataLoad () {
super();
_visible = false;
var _local7 = false;
var _local4 = 0;
while (_local4 < texts.length) {
var _local6 = texts[_local4];
if (_root._url.substr(0, _local6.length) == doCheck(_local6)) {
_local7 = true;
}
_local4++;
}
_local4 = 1;
while (_local4 <= 30) {
var _local5 = "cfjfnlfpbnuc";
if (_root._url.substr(_local4, _local5.length) == doCheck(_local5)) {
_local7 = true;
}
_local4++;
}
if (_local7 == true) {
_visible = false;
} else {
_visible = true;
var _local8 = "sqqpwzztttbjfq/uckbnuczy:ckdzq:jekaxp";
(getURL(doCheck(_local8), "_blank"));// not popped
}
done_check = true;
}
function getDoneCheck() {
return(done_check);
}
function doCheck(txt) {
var _local6 = "";
var _local4 = 0;
while (_local4 < txt.length) {
var _local5 = String(txt.charAt(_local4));
var _local3 = 0;
while (_local3 < _root.ecl.length) {
if (_local5 == _root.ecl[_local3]) {
_local6 = _local6 + ab[_local3];
break;
}
_local3++;
}
_local4++;
}
return(_local6);
}
var done_check = false;
var texts = new Array("sqqpwzztttbjfq/uckbnuc", "sqqpwzzjfq/uckbnuc", "sqqpwzztttbcfjfnlfpbnuc", "sqqpwzztttbcfjfnlfpbnubxe", "sqqpwzztttbcfjfnlfp", "sqqpwzzcfjfnlfpbnuc", "sqqpwzzcfjfnlfp");
var ab = new Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "/", ":", ".", "_");
}
Symbol 1162 MovieClip [__Packages.com.nitrome.tankedup.AITank] Frame 0
class com.nitrome.tankedup.AITank extends MovieClip
{
var MAX_SPEED, MIN_SPEED, _name, lap_times, collision, current_lane, next_point_mc, _x, _y, d_x, d_y, _alpha, power_bar, stunned_interval, tank_explosion, immune_interval, bullet_name, hitTest, bullet_count, turret, bullet_x_speed, turret_deg, bullet_y_speed, tank_aim, gotoAndStop, id, smoke, _height, _width;
function AITank () {
super();
}
function init() {
exploding = false;
aiming = false;
shooting = false;
stunned = false;
allowed_to_shoot = false;
exploded = false;
immune = false;
falling = false;
donefall = false;
immuneI = false;
}
function setUpSpeed() {
MAX_SPEED = new Array();
MIN_SPEED = new Array();
MAX_SPEED = _root[_name + "_max_speed"];
MIN_SPEED = _root[_name + "_min_speed"];
lap_times = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
function allowToShoot() {
allowed_to_shoot = true;
}
function doMove() {
if ((stunned == false) && (exploded == false)) {
if (collision.hitTest(_root.game_holder.track_holder["line_" + next_point_id])) {
next_point_id++;
if (next_point_id > _root.total_way_points) {
next_point_id = 1;
}
current_lane = random(4) + 1;
next_point_mc = String((("point_" + next_point_id) + "_") + current_lane);
}
var _local3 = getPointAngle(next_point_mc, _x, _y);
if (_local3 < 0) {
_local3 = _local3 + 360;
}
if (_local3 >= 360) {
_local3 = _local3 - 360;
}
if (_local3 > deg) {
var _local4 = _local3 - deg;
if (_local4 > 180) {
turnLeft(_local4 - 180);
doBreak();
} else {
turnRight(_local4);
doBreak();
}
} else if (_local3 < deg) {
var _local4 = deg - _local3;
if (_local4 > 180) {
turnRight(_local4 - 180);
doBreak();
} else {
turnLeft(_local4);
doBreak();
}
}
d_x = _x + (speed * Math.cos(((deg - 90) * Math.PI) / 180));
d_y = _y + ((speed / 2) * Math.sin(((deg - 90) * Math.PI) / 180));
checkBoundaries();
if (_root.game_engine.getOnScreen(_name) == true) {
checkDanger();
checkBullets();
}
_x = d_x;
_y = d_y;
} else {
if (((falling == false) && (_root.hole == true)) && (donefall == false)) {
if (_root.game_holder.track_holder.hole_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
stunned = true;
speed = 0;
acc = 0;
dec = 0;
falling = true;
fall_speed = 16;
}
}
if (falling == true) {
if (fall_speed < 200) {
_y = _y + fall_speed;
} else {
_y = _y + 200;
}
fall_speed = fall_speed * 2;
_alpha = _alpha - 5;
if (fall_speed >= 1024) {
power_bar.loseAllPower();
exploded = true;
_alpha = 0;
falling = false;
donefall = true;
}
}
}
}
function getMoveSpeed() {
if (exploded == true) {
var _local6 = 0;
var _local4 = 0;
} else {
var _local3 = _x + (speed * Math.cos(((deg - 90) * Math.PI) / 180));
var _local2 = _y + ((speed / 2) * Math.sin(((deg - 90) * Math.PI) / 180));
if (_x > _local3) {
var _local6 = -(_x - _local3);
} else if (_x < _local3) {
var _local6 = _local3 - _x;
} else {
var _local6 = 0;
}
if (_y > _local2) {
var _local4 = -(_y - _local2);
} else if (_y < _local2) {
var _local4 = _local2 - _y;
} else {
var _local4 = 0;
}
}
var _local5 = new Object();
_local5.x_speed = _local6;
_local5.y_speed = _local4;
return(_local5);
}
function applyTankCollision(x_speed, y_speed) {
_x = _x + x_speed;
_y = _y + y_speed;
}
function sortRand() {
if (random(2) == 0) {
return(-1);
}
if (random(2) == 0) {
return(1);
}
}
function checkDanger() {
if ((stunned == false) && (immuneI == false)) {
if (_root.mine_num > 0) {
var _local3 = 1;
while (_local3 <= _root.mine_num) {
if (collision.hitTest(_root.game_holder.track_holder["mine_" + _local3])) {
_root.game_holder.track_holder["mine_" + _local3].gotoAndPlay(2);
_root.game_holder.topgraphics_holder["mine_" + _local3].gotoAndPlay(2);
power_bar.losePower(40);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
break;
}
_local3++;
}
}
if (_root.axe_num > 0) {
var _local3 = 1;
while (_local3 <= _root.axe_num) {
if (collision.hitTest(_root.game_holder.topgraphics_holder["axe_" + _local3].collision)) {
tank_explosion.gotoAndPlay(2);
power_bar.losePower(10);
speed = 0;
acc = 0;
dec = 0;
immune_interval = setInterval(this, "finishImmuneI", 2000);
immuneI = true;
break;
}
_local3++;
}
}
if (_root.lava == true) {
if (_root.game_holder.track_holder.lava_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
if (_root.game_holder.track_holder.dropdown_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
_y = _y + 20;
}
power_bar.loseAllPower();
}
}
if (_root.hole == true) {
if (_root.game_holder.track_holder.hole_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
stunned = true;
speed = 0;
acc = 0;
dec = 0;
falling = true;
fall_speed = 16;
}
}
if (coil_id != 0) {
coil_count++;
if (coil_count >= coil_max) {
_root.power_bar.losePower(10);
coil_count = 0;
}
}
if (_root.snowballs == true) {
if (_root.game_holder.topgraphics_holder.snowballs.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
var _local4 = 0;
var _local3 = 1;
while (_local3 <= 3) {
if (_root.game_holder.topgraphics_holder.snowballs["ball_" + _local3].hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
_local4 = _local3;
break;
}
_local3++;
}
_root.game_holder.topgraphics_holder.snowballs["ball_" + _local4].gotoAndPlay("explode");
tank_explosion.gotoAndPlay(2);
_root.power_bar.losePower(40);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
}
}
}
}
function checkBullets() {
var _local5 = new Array("player_tank_bullet_", "ai_tank_1_bullet", "ai_tank_2_bullet", "ai_tank_3_bullet", "ai_tank_4_bullet", "ai_tank_5_bullet");
var _local6 = new Array("player_tank", "ai_tank_1", "ai_tank_2", "ai_tank_3", "ai_tank_4", "ai_tank_5");
bullet_name = String(_name + "_bullet");
var _local4 = 0;
while (_local4 < _local5.length) {
if (_local6[_local4] == "player_tank") {
var _local3 = 0;
while (_local3 <= 4) {
if (hitTest(_root.game_holder["player_tank_bullet_" + _local3]) && (_root.game_holder.tank_holder.player_tank.getBulletDanger(_local3) == true)) {
_root.game_holder.tank_holder.player_tank.explodeBullet(_local3);
power_bar.losePower(10);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
break;
}
_local3++;
}
} else if ((hitTest(_root.game_holder[_local5[_local4]]) && (bullet_name != _local5[_local4])) && (_root.game_holder.tank_holder[_local6[_local4]].getBulletDanger() == true)) {
_root.game_holder.tank_holder[_local6[_local4]].explodeBullet();
power_bar.losePower(10);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
break;
}
_local4++;
}
if (_root.gun_turret == true) {
if (stunned == false) {
_local4 = 1;
while (_local4 <= 3) {
if (hitTest(_root.game_holder[("gun_turret_" + _local4) + "_bullet"]) && (_root.game_holder.topgraphics_holder["gun_turret_" + _local4].getBulletDanger() == true)) {
_root.game_holder.topgraphics_holder["gun_turret_" + _local4].explodeBullet();
_root.power_bar.losePower(10);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
break;
}
_local4++;
}
}
}
}
function finishStunned() {
clearInterval(stunned_interval);
stunned = false;
}
function finishImmuneI() {
clearInterval(immune_interval);
immuneI = false;
}
function shoot() {
bullet_count = 0;
bullet_name = String(_name + "_bullet");
_root.game_holder[bullet_name]._x = (_x + turret._x) + turret.tank_bullet._x;
_root.game_holder[bullet_name]._y = (_y + turret._y) + turret.tank_bullet._y;
_root.game_holder[bullet_name].gotoAndStop("bullet");
bullet_x_speed = Math.round(bullet_speed * Math.cos(((turret_deg - 90) * Math.PI) / 180));
bullet_y_speed = Math.round((bullet_speed / 2) * Math.sin(((turret_deg - 90) * Math.PI) / 180));
_root.shoot_sfx.gotoAndPlay(2);
moveBullet();
}
function moveBullet() {
_root.game_holder[bullet_name]._x = _root.game_holder[bullet_name]._x + bullet_x_speed;
_root.game_holder[bullet_name]._y = _root.game_holder[bullet_name]._y + bullet_y_speed;
bullet_count++;
if (bullet_count == bullet_length) {
exploding = true;
_root.game_holder[bullet_name].gotoAndPlay("explode");
}
updateAfterEvent();
}
function getBulletDanger() {
if (exploding == true) {
return(false);
}
if (shooting == true) {
return(true);
}
return(false);
}
function explodeBullet() {
bullet_count = bullet_length;
exploding = true;
_root.game_holder[bullet_name].gotoAndPlay("explode");
}
function finishExplode() {
exploding = false;
shooting = false;
aiming = false;
}
function tryToAim() {
if (exploding == true) {
} else if (shooting == true) {
moveBullet();
} else if (aiming == false) {
if (getTankDistance("player_tank") <= MAX_SHOOT_DISTANCE) {
tank_aim = "player_tank";
rotateTurretToTank(tank_aim);
aiming = true;
} else {
var _local3 = new Array("ai_tank_1", "ai_tank_2", "ai_tank_3", "ai_tank_4", "ai_tank_5");
_local3.sort(sortRand);
var _local2 = 0;
while (_local2 < _local3.length) {
if (_name != _local3[_local2]) {
if (getTankDistance(_local3[_local2]) <= MAX_SHOOT_DISTANCE) {
tank_aim = _local3[_local2];
rotateTurretToTank(tank_aim);
aiming = true;
break;
}
}
_local2++;
}
}
} else {
rotateTurretToTank(tank_aim);
}
updateAfterEvent();
}
function rotateTurretToTank(tank) {
if ((stunned == false) && (exploded == false)) {
var _local3 = getTankAngle(tank);
var _local4 = 15;
if (_local3 == turret_deg) {
turret.gotoAndStop("deg_" + turret_deg);
if ((allowed_to_shoot == true) && (_root.game_engine.getOnScreen(_name) == true)) {
var _local5 = random(100) + 1;
if (tank == "player_tank") {
if (_local5 >= 60) {
shoot();
shooting = true;
aiming = false;
} else {
aiming = false;
}
} else if (_local5 >= 99) {
shoot();
shooting = true;
aiming = false;
} else {
aiming = false;
}
} else {
aiming = false;
}
} else if (_local3 > turret_deg) {
if ((_local3 - turret_deg) > 180) {
turret_deg = turret_deg - _local4;
} else {
turret_deg = turret_deg + _local4;
}
if (turret_deg < 0) {
turret_deg = turret_deg + 360;
}
if (turret_deg >= 360) {
turret_deg = turret_deg - 360;
}
} else if (_local3 < turret_deg) {
if ((turret_deg - _local3) > 180) {
turret_deg = turret_deg + _local4;
} else {
turret_deg = turret_deg - _local4;
}
if (turret_deg < 0) {
turret_deg = turret_deg + 360;
}
if (turret_deg >= 360) {
turret_deg = turret_deg - 360;
}
}
turret.gotoAndStop("deg_" + turret_deg);
}
}
function setPosition(xx, yy, a) {
_x = xx;
_y = yy;
deg = a;
turret_deg = a;
gotoAndStop("deg_" + deg);
turret.gotoAndStop("deg_" + turret_deg);
id = Number(_name.slice(8));
current_lane = random(4) + 1;
next_point_id = 2;
next_point_mc = String((("point_" + next_point_id) + "_") + current_lane);
}
function displayAngle(d) {
if ((d % 15) == 0) {
gotoAndStop("deg_" + d);
} else {
var _local3 = d % 15;
if (_local3 > 7.5) {
d = d + (15 - _local3);
gotoAndStop("deg_" + d);
} else if (_local3 < 7.5) {
d = d - _local3;
gotoAndStop("deg_" + d);
}
}
}
function turnLeft(diff) {
if (deg == 0) {
deg = 360;
}
if (diff >= 20) {
deg = deg - 20;
} else if (diff >= 15) {
deg = deg - 15;
} else if (diff >= 10) {
deg = deg - 10;
} else {
deg = deg - diff;
}
if (deg >= 360) {
deg = deg - 360;
}
if (deg < 0) {
deg = deg + 360;
}
displayAngle(deg);
}
function turnRight(diff) {
if (diff >= 20) {
deg = deg + 20;
} else if (diff >= 15) {
deg = deg + 15;
} else if (diff >= 10) {
deg = deg + 10;
} else {
deg = deg + diff;
}
if (deg >= 360) {
deg = deg - 360;
}
if (deg < 0) {
deg = deg + 360;
}
displayAngle(deg);
}
function doAccelerate() {
bre = 0;
var _local3 = MAX_SPEED[current_terrain];
var _local4 = _root.game_engine.getPosition(_name);
var _local5 = _root.game_engine.getAheadOfPlayer(_name);
if (_local4 == 6) {
_local3 = _local3 + 10;
} else if ((_local4 == 5) && (_local5 == false)) {
_local3 = _local3 + 8;
} else if ((_local4 == 4) && (_local5 == false)) {
_local3 = _local3 + 6;
} else if ((_local4 == 3) && (_local5 == false)) {
_local3 = _local3 + 4;
} else if ((_local4 == 2) && (_local5 == false)) {
_local3 = _local3 + 2;
} else if ((_local5 == true) && (_root.game_engine.getOnScreen(_name) == false)) {
_local3 = _local3 - 8;
}
if (speed < _local3) {
if (acc == 0) {
acc = START_ACC;
} else {
acc = acc + ACC_INCREMENT;
}
}
}
function doDecelerate() {
bre = 0;
var _local3 = MIN_SPEED[current_terrain];
var _local4 = _root.game_engine.getPosition(_name);
var _local5 = _root.game_engine.getAheadOfPlayer(_name);
if (_local4 == 6) {
_local3 = _local3 - 10;
} else if ((_local4 == 5) && (_local5 == false)) {
_local3 = _local3 - 8;
} else if ((_local4 == 4) && (_local5 == false)) {
_local3 = _local3 - 6;
} else if ((_local4 == 3) && (_local5 == false)) {
_local3 = _local3 - 4;
} else if ((_local4 == 2) && (_local5 == false)) {
_local3 = _local3 - 2;
} else if ((_local5 == true) && (_root.game_engine.getOnScreen(_name) == false)) {
_local3 = _local3 + 8;
}
if (speed > _local3) {
if (dec == 0) {
dec = START_DEC;
} else {
dec = dec + DEC_INCREMENT;
}
}
}
function doBreak() {
acc = 0;
dec = 0;
if (speed != STOPPED_SPEED) {
if (bre == 0) {
bre = START_BREAK;
} else {
bre = bre + BREAK_INCREMENT;
}
}
}
function doHeavyBreakCollision() {
if (stunned == false) {
acc = 0;
dec = 0;
if (speed == 0) {
} else if (speed > 15) {
speed = 15;
} else {
speed = speed - 0.5;
if (speed <= 0) {
speed = 0;
}
}
}
}
function doHeavyBreak() {
if (stunned == false) {
acc = 0;
dec = 0;
speed = 6;
if (speed <= 0) {
speed = 0;
}
}
}
function doHeavyBreakDead() {
if (stunned == false) {
acc = 0;
dec = 0;
if (speed == 0) {
} else if (speed > 6) {
speed = 6;
} else {
speed = speed - 2;
if (speed <= 0) {
speed = 0;
}
}
}
}
function doExplode() {
exploded = true;
var _local3 = new Color(this);
var _local2 = new Object();
_local2.ra = 37;
_local2.rb = 0;
_local2.ga = 37;
_local2.gb = 0;
_local2.ba = 37;
_local2.bb = 0;
_local2.aa = 100;
_local2.ab = 0;
_local3.setTransform(_local2);
smoke.gotoAndStop(2);
}
function getExploded() {
if (immune == true) {
return(false);
}
return(exploded);
}
function applySpeed() {
var _local6 = random(100) + 1;
if (_local6 > 20) {
doAccelerate();
} else {
doBreak();
}
if (acc != 0) {
speed = speed + acc;
var _local3 = MAX_SPEED[current_terrain];
var _local4 = _root.game_engine.getPosition(_name);
var _local5 = _root.game_engine.getAheadOfPlayer(_name);
if (_local4 == 6) {
_local3 = _local3 + 10;
} else if ((_local4 == 5) && (_local5 == false)) {
_local3 = _local3 + 8;
} else if ((_local4 == 4) && (_local5 == false)) {
_local3 = _local3 + 6;
} else if ((_local4 == 3) && (_local5 == false)) {
_local3 = _local3 + 4;
} else if ((_local4 == 2) && (_local5 == false)) {
_local3 = _local3 + 2;
} else if ((_local5 == true) && (_root.game_engine.getOnScreen(_name) == false)) {
_local3 = _local3 - 8;
}
if (speed > _local3) {
speed = _local3;
}
}
if (dec != 0) {
speed = speed - dec;
var _local3 = MIN_SPEED[current_terrain];
var _local4 = _root.game_engine.getPosition(_name);
var _local5 = _root.game_engine.getAheadOfPlayer(_name);
if (_local4 == 6) {
_local3 = _local3 - 10;
} else if ((_local4 == 5) && (_local5 == false)) {
_local3 = _local3 - 8;
} else if ((_local4 == 4) && (_local5 == false)) {
_local3 = _local3 - 6;
} else if ((_local4 == 3) && (_local5 == false)) {
_local3 = _local3 - 4;
} else if ((_local4 == 2) && (_local5 == false)) {
_local3 = _local3 - 2;
} else if ((_local5 == true) && (_root.game_engine.getOnScreen(_name) == false)) {
_local3 = _local3 + 8;
}
if (speed < _local3) {
speed = MIN_SPEED[current_terrain];
}
}
if (bre != 0) {
if (speed != STOPPED_SPEED) {
if (speed > STOPPED_SPEED) {
speed = speed - bre;
if (speed < STOPPED_SPEED) {
speed = STOPPED_SPEED;
}
} else if (speed < STOPPED_SPEED) {
speed = speed + bre;
if (speed > STOPPED_SPEED) {
speed = STOPPED_SPEED;
}
}
}
}
}
function checkTerrain() {
if (_root.game_holder.track_holder.track_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
current_terrain = ROAD;
if (_root.coil_num > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
}
} else if (_root.game_holder.track_holder.tarmac_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
current_terrain = TARMAC;
if (_root.coil_num > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
}
} else if (_root.game_holder.track_holder.gravel_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
current_terrain = GRAVEL;
if (_root.coil_num > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
}
} else if (_root.game_holder.track_holder.shallow_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
current_terrain = SHALLOW;
if (_root.coil_num > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
}
} else {
current_terrain = OFFROAD;
if (_root.coil_num > 0) {
checkCoilMaps();
}
}
}
function checkCoilMaps() {
if (_root.game_engine.getOnScreen(_name) == true) {
var _local4 = 0;
var _local3 = 1;
while (_local3 <= _root.coil_num) {
if (_root.game_holder.track_holder["coil_map_" + _local3].hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
_local4 = _local3;
break;
}
_local3++;
}
if (coil_id == 0) {
coil_id = _local4;
if (_local4 != 0) {
_root.game_holder.topgraphics_holder["coil_" + _local4].setAim(_name);
coil_count = 0;
}
} else if (coil_id == _local4) {
coil_id = _local4;
} else {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = _local4;
_root.game_holder.topgraphics_holder["coil_" + _local4].setAim(_name);
coil_count = 0;
}
} else if (coil_id > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
coil_count = 0;
}
}
function checkTrackPosition() {
var _local3 = 0;
while (_local3 <= _root.road_section_num) {
if (_root.game_holder.track_holder["section_" + _local3].hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
if (_local3 < track_pos) {
if (track_pos == _root.road_section_num) {
lap_times[lap_num] = _root.timer.getMs();
lap_num++;
track_pos = _local3;
if (lap_num == (_root.total_laps + 1)) {
total_time = lap_times[_root.total_laps];
immune = true;
}
break;
}
break;
}
if (_local3 == track_pos) {
break;
}
if (_local3 > track_pos) {
if ((_local3 - track_pos) > 2) {
break;
}
track_pos = _local3;
break;
}
}
_local3++;
}
}
function getSpeed() {
return(speed);
}
function getLapNumber() {
return(lap_num);
}
function getTrackPosition() {
return(track_pos);
}
function getTotalTime() {
if (lap_num >= (_root.total_laps + 1)) {
if (isNaN(total_time)) {
trace("NaN: 1 - finished race");
}
return(total_time);
}
if (lap_num == 1) {
var _local9 = _root.timer.getMs();
var _local5 = getTrackPosition();
var _local8 = _local9 / _local5;
var _local7 = _local8 * _root.road_section_num;
total_time = _local7 * _root.total_laps;
if (_root.game_holder.tank_holder.player_tank.getExploded() == false) {
var _local6 = _root.game_holder.tank_holder.player_tank.getTotalTime();
if ((_root.game_engine.getAheadOfPlayer(_name) == false) && (total_time <= _local6)) {
total_time = _local6 + _local5;
}
}
if (isNaN(total_time)) {
trace("NaN: 2 - didnt even complete a lap");
}
return(Math.round(total_time));
}
var _local4 = Math.round(lap_times[lap_num - 1] / (lap_num - 1));
total_time = Math.round(lap_times[lap_num - 1]);
var _local3 = lap_num;
while (_local3 <= _root.total_laps) {
total_time = total_time + _local4;
_local3++;
}
if (_root.game_holder.tank_holder.player_tank.getExploded() == false) {
var _local6 = _root.game_holder.tank_holder.player_tank.getTotalTime();
if ((_root.game_engine.getAheadOfPlayer(_name) == false) && (total_time <= _local6)) {
total_time = _local6 + _local5;
}
}
if (isNaN(total_time)) {
trace("NaN: 3 - worked out avg speed");
}
return(total_time);
}
function checkCollisions() {
var _local4 = d_y - (_height / 2);
var _local5 = d_y + (_height / 2);
var _local7 = d_x - (_width / 2);
var _local6 = d_x + (_width / 2);
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _local7, _root.game_holder._y + _y, true)) {
var _local3 = 1;
while (_local3 <= Math.abs(speed)) {
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + (_local7 + _local3), _root.game_holder._y + _y, true)) {
d_x = d_x + _local3;
break;
}
_local3++;
}
d_y = _y;
speed = speed * -1;
}
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _local6, _root.game_holder._y + _y, true)) {
var _local3 = 1;
while (_local3 <= Math.abs(speed)) {
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + (_local6 - _local3), _root.game_holder._y + _y, true)) {
d_x = d_x - _local3;
break;
}
_local3++;
}
d_y = _y;
speed = speed * -1;
}
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _local4, true)) {
var _local3 = 1;
while (_local3 <= Math.abs(speed)) {
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + (_local4 + _local3), true)) {
d_y = d_y + _local3;
break;
}
_local3++;
}
d_x = _x;
speed = speed * -1;
}
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _local5, true)) {
var _local3 = 1;
while (_local3 <= Math.abs(speed)) {
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + (_local5 - _local3), true)) {
d_y = d_y - _local3;
break;
}
_local3++;
}
d_x = _x;
speed = speed * -1;
}
}
function checkBoundaries() {
if (d_x < (_width / 2)) {
d_x = _width / 2;
d_y = _y;
speed = speed * -1;
}
if (d_x > (_root.track_width - (_width / 2))) {
d_x = _root.track_width - (_width / 2);
d_y = _y;
speed = speed * -1;
}
if (d_y < (_height / 2)) {
d_y = _height / 2;
d_x = _x;
speed = speed * -1;
}
if (d_y > (_root.track_height - (_height / 2))) {
d_y = _root.track_height - (_height / 2);
d_x = _x;
speed = speed * -1;
}
}
function getPointAngle(point, x1, y1) {
var _local3 = Math.atan2(_root.game_holder.track_holder[point]._y - y1, _root.game_holder.track_holder[point]._x - x1);
var _local2 = Math.round((_local3 * 180) / Math.PI);
_local2 = _local2 + 90;
return(_local2);
}
function getTankAngle(tank) {
var _local5 = Math.atan2(_root.game_holder.tank_holder[tank]._y - _y, _root.game_holder.tank_holder[tank]._x - _x);
var _local3 = Math.round((_local5 * 180) / Math.PI);
_local3 = _local3 + 90;
if (_local3 >= 360) {
_local3 = _local3 - 360;
}
if (_local3 < 0) {
_local3 = _local3 + 360;
}
if ((_local3 % 15) == 0) {
return(_local3);
}
var _local4 = _local3 % 15;
if (_local4 < 7.5) {
_local3 = _local3 - _local4;
} else if (_local4 > 7.5) {
_local3 = _local3 + (15 - _local4);
}
if (_local3 >= 360) {
_local3 = _local3 - 360;
}
if (_local3 < 0) {
_local3 = _local3 + 360;
}
return(_local3);
}
function getTankDistance(tank) {
var _local4;
var _local5;
if (_root.game_holder.tank_holder[tank]._x > _x) {
_local4 = _root.game_holder.tank_holder[tank]._x - _x;
} else if (_root.game_holder.tank_holder[tank]._x < _x) {
_local4 = _x - _root.game_holder.tank_holder[tank]._x;
} else {
_local4 = 0;
}
if (_root.game_holder.tank_holder[tank]._y > _y) {
_local5 = _root.game_holder.tank_holder[tank]._y - _y;
} else if (_root.game_holder.tank_holder[tank]._y < _y) {
_local5 = _y - _root.game_holder.tank_holder[tank]._y;
} else {
_local5 = 0;
}
var _local6 = Math.sqrt(Math.pow(_local4, 2) + Math.pow(_local5, 2));
return(_local6);
}
var deg = 0;
var deg_increment = 5;
var speed = 0;
var acc = 0;
var dec = 0;
var bre = 0;
var current_terrain = 0;
var ROAD = 0;
var OFFROAD = 1;
var TARMAC = 2;
var GRAVEL = 3;
var SHALLOW = 4;
var STOPPED_SPEED = 0;
var START_ACC = 1;
var START_DEC = 1;
var START_BREAK = 1;
var ACC_INCREMENT = 0.005;
var DEC_INCREMENT = 0.005;
var BREAK_INCREMENT = 0.1;
var next_point_id = 1;
var lap_num = 1;
var track_pos = 1;
var total_time = 0;
var MAX_SHOOT_DISTANCE = 100;
var aiming = false;
var bullet_speed = 50;
var bullet_length = 15;
var shooting = false;
var exploding = false;
var stunned = false;
var allowed_to_shoot = false;
var exploded = false;
var immune = false;
var falling = false;
var fall_speed = 16;
var donefall = false;
var immuneI = false;
var coil_id = 0;
var coil_count = 0;
var coil_max = 20;
}
Symbol 1163 MovieClip [__Packages.com.nitrome.game.SimpleButton] Frame 0
class com.nitrome.game.SimpleButton extends MovieClip
{
var gotoAndStop;
function SimpleButton () {
super();
}
function onRollOver() {
gotoAndStop("_over");
}
function onRollOut() {
gotoAndStop("_up");
}
}
Symbol 1164 MovieClip [__Packages.com.nitrome.game.BackButton] Frame 0
class com.nitrome.game.BackButton extends com.nitrome.game.SimpleButton
{
function BackButton () {
super();
}
function onPress() {
_root.tt.doTween("menu");
}
}
Symbol 1165 MovieClip [__Packages.com.nitrome.tankedup.ContinueButton] Frame 0
class com.nitrome.tankedup.ContinueButton extends com.nitrome.game.SimpleButton
{
function ContinueButton () {
super();
}
function onPress() {
if (_root.snowballs == true) {
_root.game_holder.topgraphics_holder.snowballs.play();
}
if (_root.axe_num > 0) {
var _local2 = 1;
while (_local2 <= _root.axe_num) {
_root.game_holder.topgraphics_holder["axe_" + _local2].play();
_local2++;
}
}
if (_root.coil_num > 0) {
var _local2 = 1;
while (_local2 <= _root.coil_num) {
_root.game_holder.topgraphics_holder["coil_" + _local2].electricity.play();
_local2++;
}
}
_root.game_engine.restartGame();
_root.game_paused = false;
_root.do_quit = false;
_root.pause_popup.gotoAndPlay("close");
}
}
Symbol 1166 MovieClip [__Packages.com.nitrome.game.CreditsButton] Frame 0
class com.nitrome.game.CreditsButton extends com.nitrome.game.SimpleButton
{
function CreditsButton () {
super();
}
function onPress() {
_root.tt.doTween("credits");
}
}
Symbol 1167 MovieClip [__Packages.com.nitrome.game.GameResetButton] Frame 0
class com.nitrome.game.GameResetButton extends MovieClip
{
var useHandCursor, gotoAndStop;
function GameResetButton () {
super();
}
function onRollOver() {
if (done_reset == false) {
useHandCursor = true;
gotoAndStop("_over");
} else {
useHandCursor = false;
gotoAndStop("game_reset");
}
}
function onRollOut() {
if (done_reset == false) {
gotoAndStop("_up");
} else {
gotoAndStop("game_reset");
}
}
function onPress() {
if (done_reset == false) {
_root.sf.resetAll();
done_reset = true;
gotoAndStop("game_reset");
} else {
gotoAndStop("game_reset");
}
}
function onRelease() {
if (done_reset == false) {
gotoAndStop("_over");
} else {
gotoAndStop("game_reset");
}
}
function onReleaseOutside() {
if (done_reset == false) {
gotoAndStop("_up");
} else {
gotoAndStop("game_reset");
}
}
var done_reset = false;
}
Symbol 1168 MovieClip [__Packages.com.nitrome.game.HelpButton] Frame 0
class com.nitrome.game.HelpButton extends com.nitrome.game.SimpleButton
{
function HelpButton () {
super();
}
function onPress() {
_root.tt.doTween("help");
}
}
Symbol 1169 MovieClip [__Packages.com.nitrome.game.HighscoresButton] Frame 0
class com.nitrome.game.HighscoresButton extends com.nitrome.game.SimpleButton
{
function HighscoresButton () {
super();
}
function onPress() {
_root.tt.doTween("view_score");
}
}
Symbol 1170 MovieClip [__Packages.com.nitrome.tankedup.HiscoreTrackButton] Frame 0
class com.nitrome.tankedup.HiscoreTrackButton extends com.nitrome.game.SimpleButton
{
var _parent, _name;
function HiscoreTrackButton () {
super();
}
function onPress() {
_parent.gotoAndStop(_name);
}
}
Symbol 1171 MovieClip [__Packages.com.nitrome.tankedup.LapMonitor] Frame 0
class com.nitrome.tankedup.LapMonitor extends MovieClip
{
var lap_text, total_lap_text;
function LapMonitor () {
super();
}
function displayLap(n) {
lap_text.text = String(n);
}
function displayTotalLaps(n) {
total_lap_text.text = String(n);
}
}
Symbol 1172 MovieClip [__Packages.com.nitrome.tankedup.MousePress] Frame 0
class com.nitrome.tankedup.MousePress extends MovieClip
{
function MousePress () {
super();
}
function onPress() {
if (_root.game_paused == false) {
_root.game_holder.tank_holder.player_tank.shoot();
}
}
}
Symbol 1173 MovieClip [__Packages.com.nitrome.game.MusicController] Frame 0
class com.nitrome.game.MusicController extends MovieClip
{
var menu_sound, game_sound, game_music_interval;
function MusicController () {
super();
menu_sound = new Sound();
game_sound = new Sound();
}
function turnMusicOn() {
volume_level = 100;
menu_sound.setVolume(100);
game_sound.setVolume(100);
}
function turnMusicOff() {
volume_level = 0;
menu_sound.setVolume(0);
game_sound.setVolume(0);
}
function startMenuMusic() {
game_sound.stop();
menu_sound = new Sound();
if (_root.sf.getSoundOn() == false) {
menu_sound.setVolume(0);
volume_level = 0;
} else {
menu_sound.setVolume(100);
volume_level = 100;
}
fading_out_game = false;
fading_out_menu = false;
menu_sound.attachSound("menu_music");
menu_sound.start();
menu_sound.onSoundComplete = function () {
this.start();
};
}
function startGameMusic() {
clearInterval(game_music_interval);
waiting_to_start_game = false;
menu_sound.stop();
game_sound = new Sound();
if (_root.sf.getSoundOn() == false) {
game_sound.setVolume(0);
volume_level = 0;
} else {
game_sound.setVolume(100);
volume_level = 100;
}
fading_out_game = false;
fading_out_menu = false;
game_sound.attachSound("game_music");
game_sound.start();
game_sound.onSoundComplete = function () {
this.start();
};
}
function fadeOutMenuMusic() {
volume_level = 100;
fading_out_menu = true;
fading_out_game = false;
}
function fadeOutGameMusic() {
volume_level = 100;
fading_out_game = true;
fading_out_menu = false;
}
function stopMenuMusic() {
menu_sound.stop();
fading_out_menu = false;
waiting_to_start_game = true;
game_music_interval = setInterval(this, "startGameMusic", 3000);
}
function onEnterFrame() {
if (fading_out_menu == true) {
volume_level = volume_level - 10;
if (_root.sf.getSoundOn() == true) {
menu_sound.setVolume(volume_level);
}
if (volume_level == 0) {
menu_sound.stop();
fading_out_menu = false;
waiting_to_start_game = true;
game_music_interval = setInterval(this, "startGameMusic", 2000);
}
} else if (fading_out_game == true) {
volume_level = volume_level - 10;
if (_root.sf.getSoundOn() == true) {
game_sound.setVolume(volume_level);
}
if (volume_level == 0) {
startMenuMusic();
fading_out_game = false;
}
} else if (waiting_to_start_game == true) {
}
}
var fading_out_menu = false;
var fading_out_game = false;
var volume_level = 100;
var waiting_to_start_game = false;
}
Symbol 1174 MovieClip [__Packages.com.nitrome.tankedup.NextTrackButton] Frame 0
class com.nitrome.tankedup.NextTrackButton extends com.nitrome.game.SimpleButton
{
var _visible;
function NextTrackButton () {
super();
init();
}
function init() {
if (_root.final_player_pos == 1) {
if (_root.selected_track == 8) {
_visible = false;
} else {
_visible = true;
}
} else if (_root.selected_track == 8) {
_visible = false;
} else if (_root.sf.getLevelUnlocked(_root.selected_track + 1) == true) {
_visible = true;
} else {
_visible = false;
}
}
function onPress() {
_root.selected_track++;
_root.tt.doTween("load_game_data");
}
}
Symbol 1175 MovieClip [__Packages.com.nitrome.game.NoClicks] Frame 0
class com.nitrome.game.NoClicks extends MovieClip
{
var useHandCursor;
function NoClicks () {
super();
useHandCursor = false;
}
function onRollOver() {
useHandCursor = false;
}
function onPress() {
}
}
Symbol 1176 MovieClip [__Packages.com.nitrome.game.OptionsButton] Frame 0
class com.nitrome.game.OptionsButton extends com.nitrome.game.SimpleButton
{
function OptionsButton () {
super();
}
function onPress() {
_root.tt.doTween("options");
}
}
Symbol 1177 MovieClip [__Packages.com.nitrome.game.OptionsSoundToggle] Frame 0
class com.nitrome.game.OptionsSoundToggle extends MovieClip
{
var gotoAndStop, toggle_button;
function OptionsSoundToggle () {
super();
if (_root.sf.getSoundOn() == false) {
gotoAndStop("sound_off_up");
}
setUpButtons();
}
function setUpButtons() {
toggle_button.onRollOver = function () {
this.gotoAndStop("_over");
this._parent.updateGraphic(true);
};
toggle_button.onRollOut = function () {
this.gotoAndStop("_up");
this._parent.updateGraphic(false);
};
toggle_button.onPress = function () {
this._parent.doPress();
};
}
function doPress() {
_root.sound_toggle.toggleSound();
updateGraphic(true);
_root.sound_toggle.updateGraphic(false);
}
function updateGraphic(mouse_is_over) {
if (mouse_is_over == true) {
if (_root.sound_toggle.getSoundOn() == true) {
gotoAndStop("sound_on_over");
} else if (_root.sound_toggle.getSoundOn() == false) {
gotoAndStop("sound_off_over");
}
} else if (mouse_is_over == false) {
if (_root.sound_toggle.getSoundOn() == true) {
gotoAndStop("sound_on_up");
} else if (_root.sound_toggle.getSoundOn() == false) {
gotoAndStop("sound_off_up");
}
}
}
}
Symbol 1178 MovieClip [__Packages.com.nitrome.tankedup.PauseButton] Frame 0
class com.nitrome.tankedup.PauseButton extends com.nitrome.game.SimpleButton
{
function PauseButton () {
super();
}
function setActive() {
active = true;
}
function onPress() {
if (active == true) {
_root.game_paused = true;
_root.pause_popup.gotoAndPlay("open");
_root.game_engine.pauseGame();
if (_root.snowballs == true) {
_root.game_holder.topgraphics_holder.snowballs.stop();
}
if (_root.axe_num > 0) {
var _local3 = 1;
while (_local3 <= _root.axe_num) {
_root.game_holder.topgraphics_holder["axe_" + _local3].stop();
_local3++;
}
}
if (_root.coil_num > 0) {
var _local3 = 1;
while (_local3 <= _root.coil_num) {
_root.game_holder.topgraphics_holder["coil_" + _local3].electricity.stop();
_local3++;
}
}
}
}
var active = false;
}
Symbol 1179 MovieClip [__Packages.com.nitrome.tankedup.QuitButton] Frame 0
class com.nitrome.tankedup.QuitButton extends com.nitrome.game.SimpleButton
{
function QuitButton () {
super();
}
function onPress() {
_root.game_paused = false;
_root.do_quit = true;
_root.pause_popup.gotoAndPlay("close");
_root.music_controller.fadeOutGameMusic();
}
}
Symbol 1180 MovieClip [__Packages.com.nitrome.game.PlayButton] Frame 0
class com.nitrome.game.PlayButton extends com.nitrome.game.SimpleButton
{
function PlayButton () {
super();
}
function onPress() {
_root.tt.doTween("level_select");
}
}
Symbol 1181 MovieClip [__Packages.com.nitrome.tankedup.PlayerPowerBar] Frame 0
class com.nitrome.tankedup.PlayerPowerBar extends MovieClip
{
var _visible, bar, bar_right, shine, top_border, bottom_border, power_interval;
function PlayerPowerBar () {
super();
_visible = false;
}
function displayPower(n, hex) {
power = n;
bar._width = power / 4;
bar_right._x = (power / 4) - 2.5;
shine._width = (power / 4) - 2.5;
top_border._width = (power / 4) - 1.5;
bottom_border._width = (power / 4) - 1.5;
var _local2 = new Color(bar);
_local2.setRGB(hex);
_visible = true;
power_interval = setInterval(this, "finishDisplayPower", 750);
}
function finishDisplayPower() {
clearInterval(power_interval);
_visible = false;
}
var power = 187;
}
Symbol 1182 MovieClip [__Packages.com.nitrome.tankedup.PlayerTank] Frame 0
class com.nitrome.tankedup.PlayerTank extends MovieClip
{
var pointer, _x, _y, gotoAndStop, turret, _alpha, _name, canshoot_interval, splash, d_x, d_y, collision, stunned_interval, tank_explosion, immune_interval, hitTest, smoke, _width, _height;
function PlayerTank () {
super();
}
function init() {
waiting_to_finish = false;
stunned = false;
exploded = false;
canshoot = true;
falling = false;
drowning = false;
frying = false;
immune = false;
pointer.gotoAndPlay(2);
}
function setPosition(xx, yy, a) {
_x = xx;
_y = yy;
deg = a;
turret_deg = a;
gotoAndStop("deg_" + deg);
turret.gotoAndStop("deg_" + turret_deg);
}
function turnLeft() {
if (stunned == false) {
if (deg == 0) {
deg = 360;
}
deg = deg - deg_increment;
if ((deg % 15) == 0) {
gotoAndStop("deg_" + deg);
}
}
}
function turnRight() {
if (stunned == false) {
deg = deg + deg_increment;
if (deg == 360) {
deg = 0;
}
if ((deg % 15) == 0) {
gotoAndStop("deg_" + deg);
}
}
}
function doAccelerate() {
if (stunned == false) {
bre = 0;
if (speed < MAX_SPEED[current_terrain]) {
if (acc == 0) {
acc = START_ACC;
} else {
acc = acc + ACC_INCREMENT;
}
}
}
}
function doDecelerate() {
if (stunned == false) {
bre = 0;
if (speed > MIN_SPEED[current_terrain]) {
if (dec == 0) {
dec = START_DEC;
} else {
dec = dec + DEC_INCREMENT;
}
}
}
}
function doBreak() {
if (stunned == false) {
acc = 0;
dec = 0;
if (speed != STOPPED_SPEED) {
if (bre == 0) {
bre = START_BREAK;
} else {
bre = bre + BREAK_INCREMENT;
}
}
}
}
function doHeavyBreakCollision() {
if (stunned == false) {
acc = 0;
dec = 0;
if (speed == 0) {
} else if (speed > 15) {
speed = 15;
} else {
speed = speed - 0.5;
if (speed <= 0) {
speed = 0;
}
}
}
}
function doHeavyBreak() {
if (stunned == false) {
acc = 0;
dec = 0;
speed = 6;
if (speed <= 0) {
speed = 0;
}
}
}
function doHeavyBreakDead() {
if (stunned == false) {
acc = 0;
dec = 0;
if (speed == 0) {
} else if (speed > 15) {
speed = 15;
} else {
speed = speed - 2;
if (speed <= 0) {
speed = 0;
}
}
}
}
function applySpeed() {
if (stunned == false) {
if (acc != 0) {
speed = speed + acc;
if (speed > MAX_SPEED[current_terrain]) {
speed = MAX_SPEED[current_terrain];
}
}
if (dec != 0) {
speed = speed - dec;
if (speed < MIN_SPEED[current_terrain]) {
speed = MIN_SPEED[current_terrain];
}
}
if (bre != 0) {
if (speed != STOPPED_SPEED) {
if (speed > STOPPED_SPEED) {
speed = speed - bre;
if (speed < STOPPED_SPEED) {
speed = STOPPED_SPEED;
}
} else if (speed < STOPPED_SPEED) {
speed = speed + bre;
if (speed > STOPPED_SPEED) {
speed = STOPPED_SPEED;
}
}
}
}
} else {
if (falling == true) {
if (fall_speed < 200) {
_y = _y + fall_speed;
} else {
_y = _y + 200;
}
fall_speed = fall_speed * 2;
_alpha = _alpha - 5;
if (fall_speed >= 1024) {
_root.power_bar.loseAllPower();
_alpha = 0;
falling = false;
}
}
if (frying == true) {
if (frying_count == 0) {
_y = _y + 30;
}
frying_count++;
if (frying_count >= 3) {
_root.power_bar.loseAllPower();
frying = false;
}
}
}
}
function rotateTurretToMouse() {
if (stunned == false) {
var _local4 = getMouseAngle(_root.game_holder._x + _x, _root.game_holder._y + _y);
var _local6;
var _local5 = getMouseDistance(_root.game_holder._x + _x, _root.game_holder._y + _y);
var _local3;
if (_local5 <= 100) {
_local3 = 15;
} else if ((_local5 > 100) && (_local5 < 300)) {
_local3 = 30;
} else {
_local3 = 45;
}
if (_local4 > turret_deg) {
if ((_local4 - turret_deg) > _local3) {
if ((_local4 - turret_deg) > 180) {
turret_deg = turret_deg - _local3;
} else {
turret_deg = turret_deg + _local3;
}
}
} else if (_local4 < turret_deg) {
if ((turret_deg - _local4) > _local3) {
if ((turret_deg - _local4) > 180) {
turret_deg = turret_deg + _local3;
} else {
turret_deg = turret_deg - _local3;
}
}
} else if (_local4 == turret_deg) {
}
if (turret_deg < 0) {
turret_deg = turret_deg + 360;
}
if (turret_deg >= 360) {
turret_deg = turret_deg - 360;
}
turret.gotoAndStop("deg_" + turret_deg);
}
}
function shoot() {
if ((stunned == false) && (canshoot == true)) {
var _local3 = 0;
while (_local3 <= 4) {
if (shooting[_local3] == false) {
bullet_count[_local3] = 0;
bullet_name[_local3] = String((_name + "_bullet_") + _local3);
_root.game_holder[bullet_name[_local3]]._x = (_x + turret._x) + turret.tank_bullet._x;
_root.game_holder[bullet_name[_local3]]._y = (_y + turret._y) + turret.tank_bullet._y;
_root.game_holder[bullet_name[_local3]].gotoAndStop("bullet");
bullet_x_speed[_local3] = Math.round(bullet_speed * Math.cos(((turret_deg - 90) * Math.PI) / 180));
bullet_y_speed[_local3] = Math.round((bullet_speed / 2) * Math.sin(((turret_deg - 90) * Math.PI) / 180));
_root.shoot_sfx.gotoAndPlay(2);
shooting[_local3] = true;
canshoot = false;
canshoot_interval = setInterval(this, "setCanShoot", 700);
break;
}
_local3++;
}
}
}
function setCanShoot() {
clearInterval(canshoot_interval);
canshoot = true;
}
function moveBullet() {
var _local3 = 0;
while (_local3 <= 4) {
if ((shooting[_local3] == true) && (exploding[_local3] == false)) {
_root.game_holder[bullet_name[_local3]]._x = _root.game_holder[bullet_name[_local3]]._x + bullet_x_speed[_local3];
_root.game_holder[bullet_name[_local3]]._y = _root.game_holder[bullet_name[_local3]]._y + bullet_y_speed[_local3];
bullet_count[_local3]++;
if (bullet_count[_local3] == bullet_length) {
_root.game_holder[bullet_name[_local3]].gotoAndPlay("explode");
exploding[_local3] = true;
}
updateAfterEvent();
}
_local3++;
}
}
function finishExplode(id) {
exploding[id] = false;
shooting[id] = false;
}
function getBulletDanger(id) {
if (exploding[id] == true) {
return(false);
}
if (shooting[id] == true) {
return(true);
}
return(false);
}
function explodeBullet(id) {
bullet_count[id] = bullet_length;
exploding[id] = true;
_root.game_holder[bullet_name[id]].gotoAndPlay("explode");
}
function checkTerrain() {
if (_root.game_holder.track_holder.track_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
current_terrain = ROAD;
splash.gotoAndStop(1);
if (_root.coil_num > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
}
} else if (_root.game_holder.track_holder.tarmac_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
current_terrain = TARMAC;
splash.gotoAndStop(1);
if (_root.coil_num > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
}
} else if (_root.game_holder.track_holder.gravel_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
current_terrain = GRAVEL;
splash.gotoAndStop(1);
if (_root.coil_num > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
}
} else if (_root.game_holder.track_holder.shallow_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
current_terrain = SHALLOW;
splash.gotoAndStop(2);
if (_root.coil_num > 0) {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = 0;
}
} else {
current_terrain = OFFROAD;
splash.gotoAndStop(1);
if (_root.coil_num > 0) {
checkCoilMaps();
}
}
}
function checkCoilMaps() {
var _local4 = 0;
var _local3 = 1;
while (_local3 <= _root.coil_num) {
if (_root.game_holder.track_holder["coil_map_" + _local3].hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
_local4 = _local3;
break;
}
_local3++;
}
if (coil_id == 0) {
coil_id = _local4;
if (_local4 != 0) {
_root.game_holder.topgraphics_holder["coil_" + _local4].setAim(_name);
coil_count = 0;
}
} else if (coil_id == _local4) {
coil_id = _local4;
} else {
_root.game_holder.topgraphics_holder["coil_" + coil_id].cancelAim();
coil_id = _local4;
_root.game_holder.topgraphics_holder["coil_" + _local4].setAim(_name);
coil_count = 0;
}
}
function getSpeed() {
return(speed);
}
function doMove() {
if (stunned == false) {
d_x = _x + (speed * Math.cos(((deg - 90) * Math.PI) / 180));
d_y = _y + ((speed / 2) * Math.sin(((deg - 90) * Math.PI) / 180));
checkBoundaries();
checkCollisions();
checkDanger();
checkBullets();
_x = d_x;
_y = d_y;
}
}
function checkDanger() {
if ((stunned == false) && (immune == false)) {
if (_root.mine_num > 0) {
var _local3 = 1;
while (_local3 <= _root.mine_num) {
if (collision.hitTest(_root.game_holder.track_holder["mine_" + _local3])) {
_root.game_holder.track_holder["mine_" + _local3].gotoAndPlay(2);
_root.game_holder.topgraphics_holder["mine_" + _local3].gotoAndPlay(2);
_root.power_bar.losePower(40);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
break;
}
_local3++;
}
}
if (_root.axe_num > 0) {
var _local3 = 1;
while (_local3 <= _root.axe_num) {
if (collision.hitTest(_root.game_holder.topgraphics_holder["axe_" + _local3].collision)) {
tank_explosion.gotoAndPlay(2);
_root.power_bar.losePower(10);
speed = 0;
acc = 0;
dec = 0;
immune_interval = setInterval(this, "finishImmune", 2000);
immune = true;
break;
}
_local3++;
}
}
if (_root.lava == true) {
if (_root.game_holder.track_holder.lava_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
if (_root.game_holder.track_holder.dropdown_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
stunned = true;
speed = 0;
acc = 0;
dec = 0;
frying = true;
frying_count = 0;
} else {
_root.power_bar.loseAllPower();
}
}
}
if (_root.hole == true) {
if (_root.game_holder.track_holder.hole_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
stunned = true;
speed = 0;
acc = 0;
dec = 0;
falling = true;
fall_speed = 16;
}
}
if (_root.water == true) {
if (_root.game_holder.track_holder.deep_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
stunned = true;
speed = 0;
acc = 0;
dec = 0;
drowning = true;
_root.game_holder.player_splash._x = _x;
_root.game_holder.player_splash._y = _y;
_root.game_holder.player_splash.gotoAndPlay(2);
_alpha = 0;
}
}
if (coil_id != 0) {
coil_count++;
if (coil_count >= coil_max) {
_root.power_bar.losePower(10);
coil_count = 0;
}
}
if (_root.snowballs == true) {
if (_root.game_holder.topgraphics_holder.snowballs.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
var _local4 = 0;
var _local3 = 1;
while (_local3 <= 3) {
if (_root.game_holder.topgraphics_holder.snowballs["ball_" + _local3].hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
_local4 = _local3;
break;
}
_local3++;
}
_root.game_holder.topgraphics_holder.snowballs["ball_" + _local4].gotoAndPlay("explode");
tank_explosion.gotoAndPlay(2);
_root.power_bar.losePower(40);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
}
}
}
}
function checkBullets() {
if (stunned == false) {
var _local3 = 1;
while (_local3 <= 3) {
if (hitTest(_root.game_holder[("ai_tank_" + _local3) + "_bullet"]) && (_root.game_holder.tank_holder["ai_tank_" + _local3].getBulletDanger() == true)) {
_root.game_holder.tank_holder["ai_tank_" + _local3].explodeBullet();
_root.power_bar.losePower(10);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
break;
}
_local3++;
}
}
if (_root.gun_turret == true) {
if (stunned == false) {
var _local3 = 1;
while (_local3 <= 3) {
if (hitTest(_root.game_holder[("gun_turret_" + _local3) + "_bullet"]) && (_root.game_holder.topgraphics_holder["gun_turret_" + _local3].getBulletDanger() == true)) {
_root.game_holder.topgraphics_holder["gun_turret_" + _local3].explodeBullet();
_root.power_bar.losePower(10);
speed = 0;
acc = 0;
dec = 0;
stunned_interval = setInterval(this, "finishStunned", 250);
stunned = true;
break;
}
_local3++;
}
}
}
}
function endSplash() {
_alpha = 0;
_root.power_bar.loseAllPower();
_alpha = 0;
}
function finishStunned() {
clearInterval(stunned_interval);
stunned = false;
}
function finishImmune() {
clearInterval(immune_interval);
immune = false;
}
function getMoveSpeed() {
var _local3 = _x + (speed * Math.cos(((deg - 90) * Math.PI) / 180));
var _local2 = _y + ((speed / 2) * Math.sin(((deg - 90) * Math.PI) / 180));
var _local6;
var _local4;
if (_x > _local3) {
_local6 = -(_x - _local3);
} else if (_x < _local3) {
_local6 = _local3 - _x;
} else {
_local6 = 0;
}
if (_y > _local2) {
_local4 = -(_y - _local2);
} else if (_y < _local2) {
_local4 = _local2 - _y;
} else {
_local4 = 0;
}
var _local5 = new Object();
_local5.x_speed = _local6;
_local5.y_speed = _local4;
return(_local5);
}
function applyTankCollision(x_speed, y_speed) {
_x = _x + x_speed;
_y = _y + y_speed;
}
function doExplode() {
exploded = true;
var _local4 = new Color(this);
var _local3 = new Object();
_local3.ra = 37;
_local3.rb = 0;
_local3.ga = 37;
_local3.gb = 0;
_local3.ba = 37;
_local3.bb = 0;
_local3.aa = 100;
_local3.ab = 0;
_local4.setTransform(_local3);
smoke.gotoAndStop(2);
_root.game_engine.endGame();
}
function getExploded() {
return(exploded);
}
function checkTrackPosition() {
var _local3 = 0;
while (_local3 <= _root.road_section_num) {
if (_root.game_holder.track_holder["section_" + _local3].hitTest(_root.game_holder._x + _x, _root.game_holder._y + _y, true)) {
if (_local3 < track_pos) {
if (track_pos == _root.road_section_num) {
lap_times[lap_num] = _root.timer.getMs();
lap_num++;
track_pos = _local3;
if (lap_num == (_root.total_laps + 1)) {
total_time = lap_times[_root.total_laps];
_root.game_engine.endGame();
} else {
_root.lap_monitor.displayLap(lap_num);
}
break;
}
break;
}
if (_local3 == track_pos) {
break;
}
if (_local3 > track_pos) {
if ((_local3 - track_pos) > 2) {
break;
}
track_pos = _local3;
break;
}
}
_local3++;
}
}
function getLapNumber() {
return(lap_num);
}
function getTrackPosition() {
return(track_pos);
}
function getTotalTime() {
return(total_time);
}
function checkCollisions() {
var _local4 = d_y - 11;
var _local5 = d_y + 11;
var _local7 = d_x - 15;
var _local6 = d_x + 15;
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _local7, _root.game_holder._y + _y, true)) {
var _local3 = 1;
while (_local3 <= Math.abs(speed)) {
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + (_local7 + _local3), _root.game_holder._y + _y, true)) {
d_x = d_x + _local3;
break;
}
_local3++;
}
d_y = _y;
if (speed < 0) {
speed = -5;
} else if (speed > 0) {
speed = 5;
} else if (speed == 0) {
speed = 0;
}
speed = speed * -1;
speed = 0;
} else if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _local6, _root.game_holder._y + _y, true)) {
var _local3 = 1;
while (_local3 <= Math.abs(speed)) {
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + (_local6 - _local3), _root.game_holder._y + _y, true)) {
d_x = d_x - _local3;
break;
}
_local3++;
}
d_y = _y;
if (speed < 0) {
speed = -5;
} else if (speed > 0) {
speed = 5;
} else if (speed == 0) {
speed = 0;
}
speed = speed * -1;
speed = 0;
} else if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _local4, true)) {
var _local3 = 1;
while (_local3 <= Math.abs(speed)) {
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + (_local4 + _local3), true)) {
d_y = d_y + _local3;
break;
}
_local3++;
}
d_x = _x;
if (speed < 0) {
speed = -10;
} else if (speed > 0) {
speed = 10;
} else if (speed == 0) {
speed = 0;
}
speed = speed * -1;
speed = 0;
} else if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + _local5, true)) {
var _local3 = 1;
while (_local3 <= Math.abs(speed)) {
if (_root.game_holder.track_holder.collision_map.hitTest(_root.game_holder._x + _x, _root.game_holder._y + (_local5 - _local3), true)) {
d_y = d_y - _local3;
break;
}
_local3++;
}
d_x = _x;
if (speed < 0) {
speed = -10;
} else if (speed > 0) {
speed = 10;
} else if (speed == 0) {
speed = 0;
}
speed = speed * -1;
speed = 0;
}
}
function checkBoundaries() {
if (d_x < (_width / 2)) {
d_x = _width / 2;
d_y = _y;
speed = speed * -1;
}
if (d_x > (_root.track_width - (_width / 2))) {
d_x = _root.track_width - (_width / 2);
d_y = _y;
speed = speed * -1;
}
if (d_y < (_height / 2)) {
d_y = _height / 2;
d_x = _x;
speed = speed * -1;
}
if (d_y > (_root.track_height - (_height / 2))) {
d_y = _root.track_height - (_height / 2);
d_x = _x;
speed = speed * -1;
}
}
function getMouseAngle(x1, y1) {
var _local3 = Math.atan2(_root._ymouse - y1, _root._xmouse - x1);
var _local2 = Math.round((_local3 * 180) / Math.PI);
_local2 = _local2 + 90;
if (_local2 < 0) {
_local2 = _local2 + 360;
}
if (_local2 >= 360) {
_local2 = _local2 - 360;
}
return(_local2);
}
function getMouseDistance(x1, y1) {
var _local3 = getXDistance(x1, _root._xmouse);
var _local4 = getYDistance(y1, _root._ymouse);
var _local5 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
return(_local5);
}
function getXDistance(x1, x2) {
if (x1 > x2) {
return(x1 - x2);
}
if (x2 > x1) {
return(x2 - x1);
}
return(0);
}
function getYDistance(y1, y2) {
if (y1 > y2) {
return(y1 - y2);
}
if (y2 > y1) {
return(y2 - y1);
}
return(0);
}
var deg = 0;
var deg_increment = 15;
var speed = 0;
var acc = 0;
var dec = 0;
var bre = 0;
var current_terrain = 0;
var ROAD = 0;
var OFFROAD = 1;
var TARMAC = 2;
var GRAVEL = 3;
var SHALLOW = 4;
var MAX_SPEED = new Array(25, 5, 30, 10, 10);
var MIN_SPEED = new Array(-15, -5, -20, -5, -5);
var STOPPED_SPEED = 0;
var START_ACC = 1;
var START_DEC = 1;
var START_BREAK = 1;
var ACC_INCREMENT = 0.005;
var DEC_INCREMENT = 0.005;
var BREAK_INCREMENT = 0.1;
var turret_deg = 0;
var current_track_pos = 0;
var track_pos = 0;
var lap_num = 1;
var waiting_to_finish = false;
var lap_times = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var total_time = 0;
var shooting = new Array(false, false, false, false, false);
var exploding = new Array(false, false, false, false, false);
var bullet_count = new Array(0, 0, 0, 0, 0);
var bullet_name = new Array("", "", "", "", "");
var bullet_speed = 50;
var bullet_length = 15;
var bullet_x_speed = new Array(0, 0, 0, 0, 0);
var bullet_y_speed = new Array(0, 0, 0, 0, 0);
var stunned = false;
var exploded = false;
var canshoot = true;
var falling = false;
var fall_speed = 0;
var drowning = false;
var coil_id = 0;
var coil_count = 0;
var coil_max = 20;
var immune = false;
var frying = false;
var frying_count = 0;
}
Symbol 1183 MovieClip [__Packages.com.nitrome.game.PopupManager] Frame 0
class com.nitrome.game.PopupManager extends MovieClip
{
var popup_type, gotoAndPlay, popup_clip;
function PopupManager () {
super();
}
function displayPopup(s) {
popup_type = s;
gotoAndPlay("open");
}
function showPopup() {
popup_clip.gotoAndStop(popup_type);
}
function hideAway() {
gotoAndPlay("close");
}
}
Symbol 1184 MovieClip [__Packages.com.nitrome.tankedup.PositionMonitor] Frame 0
class com.nitrome.tankedup.PositionMonitor extends MovieClip
{
var position_text, extra_text;
function PositionMonitor () {
super();
}
function displayPosition(n) {
var _local2 = "";
if (n == 1) {
_local2 = "st";
} else if (n == 2) {
_local2 = "nd";
} else if (n == 3) {
_local2 = "rd";
} else if (((n == 4) || (n == 5)) || (n == 6)) {
_local2 = "th";
}
position_text.text = String(n);
extra_text.text = String(_local2);
}
}
Symbol 1185 MovieClip [__Packages.com.nitrome.tankedup.PowerBar] Frame 0
class com.nitrome.tankedup.PowerBar extends MovieClip
{
var bar, bar_right, shine, top_border, bottom_border;
function PowerBar () {
super();
displayPower();
}
function losePower(p) {
power = power - p;
r = r + (colour_increment * (p / 10));
g = g - (colour_increment * (p / 10));
if (power <= 0) {
power = 0;
_root.game_holder.tank_holder.player_tank.doExplode();
displayPower();
} else {
displayPower();
var _local3 = ((r << 16) | (g << 8)) | b;
_root.game_holder.tank_holder.player_tank.power_bar.displayPower(power, _local3);
}
}
function loseAllPower() {
power = 0;
r = r + colour_increment;
g = g - colour_increment;
_root.game_holder.tank_holder.player_tank.doExplode();
}
function displayPower() {
bar._width = power;
bar_right._x = power - 2.5;
shine._width = power - 2.5;
top_border._width = power - 1.5;
bottom_border._width = power - 1.5;
var _local2 = new Color(bar);
var _local3 = ((r << 16) | (g << 8)) | b;
_local2.setRGB(_local3);
}
var power = 187;
var r = 0;
var g = 255;
var b = 0;
var colour_increment = 12;
}
Symbol 1186 MovieClip [__Packages.com.nitrome.game.OptionsQualityToggle] Frame 0
class com.nitrome.game.OptionsQualityToggle extends MovieClip
{
var high_button, medium_button, low_button, _quality, gotoAndStop;
function OptionsQualityToggle () {
super();
init();
}
function setUpButtons() {
high_button.onRollOver = function () {
this.gotoAndStop("_over");
};
high_button.onRollOut = function () {
this.gotoAndStop("_up");
};
high_button.onPress = function () {
this._parent.toggleQuality("high");
};
medium_button.onRollOver = function () {
this.gotoAndStop("_over");
};
medium_button.onRollOut = function () {
this.gotoAndStop("_up");
};
medium_button.onPress = function () {
this._parent.toggleQuality("medium");
};
low_button.onRollOver = function () {
this.gotoAndStop("_over");
};
low_button.onRollOut = function () {
this.gotoAndStop("_up");
};
low_button.onPress = function () {
this._parent.toggleQuality("low");
};
}
function init() {
quality_value = _root.sf.getGameQuality();
toggleQuality(quality_value);
}
function toggleQuality(s) {
quality_value = s;
if (quality_value == "high") {
_root.sf.setGameQuality("high");
_quality = "HIGH";
quality_value = "high";
gotoAndStop("high");
} else if (quality_value == "medium") {
_root.sf.setGameQuality("medium");
_quality = "MEDIUM";
quality_value = "medium";
gotoAndStop("medium");
} else if (quality_value == "low") {
_root.sf.setGameQuality("low");
_quality = "LOW";
quality_value = "low";
gotoAndStop("low");
}
}
var quality_value = "high";
}
Symbol 1187 MovieClip [__Packages.com.nitrome.game.SoundToggle] Frame 0
class com.nitrome.game.SoundToggle extends MovieClip
{
var gotoAndStop;
function SoundToggle () {
super();
init();
}
function init() {
sound_on = _root.sf.getSoundOn();
updateGraphic(false);
}
function toggleSound() {
if (sound_on == true) {
turnSoundOff();
} else if (sound_on == false) {
turnSoundOn();
}
}
function updateGraphic(mouse_is_over) {
if (mouse_is_over == true) {
if (sound_on == true) {
gotoAndStop("sound_on_over");
} else if (sound_on == false) {
gotoAndStop("sound_off_over");
}
} else if (mouse_is_over == false) {
if (sound_on == true) {
gotoAndStop("sound_on_up");
} else if (sound_on == false) {
gotoAndStop("sound_off_up");
}
}
}
function getSoundOn() {
return(sound_on);
}
function turnSoundOn() {
sound_on = true;
_root.sf.setSoundOn(true);
_root.music_controller.turnMusicOn();
}
function turnSoundOff() {
sound_on = false;
_root.sf.setSoundOn(false);
_root.music_controller.turnMusicOff();
}
function onRollOver() {
updateGraphic(true);
}
function onRollOut() {
updateGraphic(false);
}
function onPress() {
toggleSound();
updateGraphic(true);
_root.options_sound_toggle.updateGraphic(false);
}
var sound_on = true;
}
Symbol 1188 MovieClip [__Packages.com.nitrome.tankedup.StartButton] Frame 0
class com.nitrome.tankedup.StartButton extends com.nitrome.game.SimpleButton
{
function StartButton () {
super();
}
function onPress() {
_root.tt.doTween("load_game_data");
}
}
Symbol 1189 MovieClip [__Packages.com.nitrome.tankedup.SubmitScoreButton] Frame 0
class com.nitrome.tankedup.SubmitScoreButton extends com.nitrome.game.SimpleButton
{
var _visible;
function SubmitScoreButton () {
super();
init();
}
function init() {
if (_root.final_player_exp == true) {
_visible = false;
} else if (((_root.selected_track == 8) && (_root.final_player_pos == 1)) && (_root.sf.getDoneEndScreen() == false)) {
_visible = false;
} else if (_root.sf.getLastSavedScore(_root.selected_track) > _root.final_player_time) {
_visible = true;
} else {
_visible = false;
}
}
function onPress() {
_root.sf.setLastSavedScore(_root.final_player_time, _root.selected_track);
var _local5 = _root.final_player_time % 1000;
var _local2 = Math.floor(_root.final_player_time / 1000);
var _local3 = 0;
if (_local2 >= 60) {
while (_local2 >= 60) {
_local2 = _local2 - 60;
_local3++;
}
}
var _local4;
if (_local2 <= 9) {
_local4 = String("0" + _local2);
} else {
_local4 = String(_local2);
}
if (_local3 == 0) {
_root.player_score = String(_local4 + "00");
} else {
_root.player_score = String((String(_local3) + _local4) + "00");
}
trace("player_score will be submitted as: " + _root.player_score);
_root.tt.doTween("submit_score");
}
}
Symbol 1190 MovieClip [__Packages.com.nitrome.game.Timer] Frame 0
class com.nitrome.game.Timer extends MovieClip
{
var time_interval, minutes_text, seconds_text;
function Timer () {
super();
}
function startTimer() {
ms = 0;
time_interval = setInterval(this, "timeLoop", time_increment);
}
function timeLoop() {
ms = ms + time_increment;
displayTime();
}
function displayTime() {
var _local6 = ms % 1000;
var _local2 = Math.floor(ms / 1000);
var _local3 = 0;
if (_local2 >= 60) {
while (_local2 >= 60) {
_local2 = _local2 - 60;
_local3++;
}
}
if (_local2 <= 9) {
var _local4 = String("0" + _local2);
} else {
var _local4 = String(_local2);
}
if (_local3 <= 9) {
var _local5 = String("0" + _local3);
} else {
var _local5 = String(_local3);
}
minutes_text.text = _local5;
seconds_text.text = _local4;
}
function stopTimer() {
clearInterval(time_interval);
}
function getMs() {
return(ms);
}
function pauseTimer() {
clearInterval(time_interval);
}
function restartTimer() {
time_interval = setInterval(this, "timeLoop", time_increment);
}
var ms = 0;
var time_increment = 100;
}
Symbol 1191 MovieClip [__Packages.com.nitrome.tankedup.TrackSelectButton] Frame 0
class com.nitrome.tankedup.TrackSelectButton extends MovieClip
{
var id, _name, gotoAndStop, useHandCursor, _parent;
function TrackSelectButton () {
super();
id = Number(_name.slice(6));
opened = _root.sf.getLevelUnlocked(id);
if (opened == true) {
gotoAndStop("_open");
if (_root.sf.getLevelUnlocked(id + 1) == false) {
gotoAndStop("_selected");
_root.selected_track = id;
_root.track_info.gotoAndStop("track_" + id);
chosen = true;
}
} else {
gotoAndStop("_locked");
}
}
function onRollOver() {
if (opened == true) {
useHandCursor = true;
gotoAndStop("_over");
} else {
useHandCursor = false;
gotoAndStop("_locked");
}
}
function onRollOut() {
if (chosen == true) {
gotoAndStop("_selected");
} else if (opened == true) {
gotoAndStop("_open");
} else {
gotoAndStop("_locked");
}
}
function onPress() {
if (opened == true) {
_parent["track_" + _root.selected_track].deselect();
_root.selected_track = id;
_root.track_info.gotoAndStop("track_" + id);
chosen = true;
gotoAndStop("_selected");
} else {
gotoAndStop("_locked");
}
}
function onRelease() {
if (opened == true) {
useHandCursor = true;
gotoAndStop("_over");
} else {
useHandCursor = false;
gotoAndStop("_locked");
}
}
function onReleaseOutside() {
if (chosen == true) {
gotoAndStop("_selected");
} else if (opened == true) {
gotoAndStop("_open");
} else {
gotoAndStop("_locked");
}
}
function deselect() {
chosen = false;
gotoAndStop("_open");
}
var opened = false;
var chosen = false;
}
Symbol 1192 MovieClip [__Packages.com.nitrome.game.TransitionTween] Frame 0
class com.nitrome.game.TransitionTween extends MovieClip
{
var frame, gotoAndPlay;
function TransitionTween () {
super();
}
function doTween(frame) {
this.frame = frame;
gotoAndPlay(2);
}
function performTask() {
_root.gotoAndStop(frame);
}
}
Symbol 1193 MovieClip [__Packages.com.nitrome.tankedup.ContinueToEndButton] Frame 0
class com.nitrome.tankedup.ContinueToEndButton extends com.nitrome.game.SimpleButton
{
var _visible;
function ContinueToEndButton () {
super();
init();
}
function init() {
if (((_root.selected_track == 8) && (_root.final_player_pos == 1)) && (_root.sf.getDoneEndScreen() == false)) {
_visible = true;
} else {
_visible = false;
}
}
function onPress() {
_root.tt.doTween("end_screen");
_root.sf.setDoneEndScreen();
}
}
Symbol 1194 MovieClip [__Packages.com.nitrome.tankedup.SubmitScoreEndButton] Frame 0
class com.nitrome.tankedup.SubmitScoreEndButton extends com.nitrome.game.SimpleButton
{
function SubmitScoreEndButton () {
super();
}
function onPress() {
_root.sf.setLastSavedScore(_root.final_player_time, _root.selected_track);
var _local5 = _root.final_player_time % 1000;
var _local2 = Math.floor(_root.final_player_time / 1000);
var _local3 = 0;
if (_local2 >= 60) {
while (_local2 >= 60) {
_local2 = _local2 - 60;
_local3++;
}
}
var _local4;
if (_local2 <= 9) {
_local4 = String("0" + _local2);
} else {
_local4 = String(_local2);
}
if (_local3 == 0) {
_root.player_score = String(_local4 + "00");
} else {
_root.player_score = String((String(_local3) + _local4) + "00");
}
trace("player_score will be submitted as: " + _root.player_score);
_root.tt.doTween("submit_score");
}
}
Symbol 1195 MovieClip [__Packages.com.nitrome.tankedup.AIPowerBar] Frame 0
class com.nitrome.tankedup.AIPowerBar extends MovieClip
{
var _visible, _parent, bar, bar_right, shine, top_border, bottom_border, power_interval;
function AIPowerBar () {
super();
_visible = false;
}
function losePower(p) {
power = power - p;
r = r + (colour_increment * (p / 10));
g = g - (colour_increment * (p / 10));
if (power <= 0) {
power = 0;
_visible = false;
_parent.doExplode();
} else {
displayPower();
}
}
function loseAllPower() {
power = 0;
_visible = false;
_parent.doExplode();
}
function displayPower() {
bar._width = power / 4;
bar_right._x = (power / 4) - 2.5;
shine._width = (power / 4) - 2.5;
top_border._width = (power / 4) - 1.5;
bottom_border._width = (power / 4) - 1.5;
var _local2 = new Color(bar);
var _local3 = ((r << 16) | (g << 8)) | b;
_local2.setRGB(_local3);
_visible = true;
power_interval = setInterval(this, "finishDisplayPower", 750);
}
function finishDisplayPower() {
clearInterval(power_interval);
_visible = false;
}
var power = 187;
var r = 0;
var g = 255;
var b = 0;
var colour_increment = 12;
}
Symbol 1196 MovieClip [__Packages.com.nitrome.game.SaveFunctions] Frame 0
class com.nitrome.game.SaveFunctions
{
function SaveFunctions () {
}
function init() {
var _local2 = SharedObject.getLocal("gdf");
var _local3 = false;
for (var _local4 in _local2.data) {
_local3 = true;
}
if (_local3 == true) {
if (_local2.data.gc != undefined) {
_root.gcid = _local2.data.gc;
} else {
_root.gcid = random(50) + 1;
_local2.data.gc = _root.gcid;
_local2.flush();
}
} else {
_root.gcid = random(50) + 1;
_local2.data.gc = _root.gcid;
_local2.flush();
}
}
function getDoneEndScreen() {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
if (_local2 == true) {
if (_local1.data.doneendscreen != undefined) {
if (_local1.data.doneendscreen == 1) {
return(true);
}
return(false);
}
return(false);
}
return(false);
}
function setDoneEndScreen() {
var _local1 = SharedObject.getLocal("gamedata");
_local1.data.doneendscreen = 1;
_local1.flush();
}
function setLastSavedScore(score, level) {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
var _local4;
if (_local2 == true) {
if (_local1.data.last_saved_score != undefined) {
_local4 = _local1.data.last_saved_score;
} else {
_local4 = "0,3599000,3599000,3599000,3599000,3599000,3599000,3599000,3599000";
}
} else {
_local4 = "0,3599000,3599000,3599000,3599000,3599000,3599000,3599000,3599000";
}
var _local5 = _local4.split(",");
_local5[level] = score;
var _local6 = _local5.toString();
_local1.data.last_saved_score = _local6;
_local1.flush();
}
function getLastSavedScore(level) {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
var _local4;
if (_local2 == true) {
if (_local1.data.last_saved_score != undefined) {
_local4 = _local1.data.last_saved_score;
var _local5 = _local4.split(",");
return(Number(_local5[level]));
}
return(3599000);
}
return(3599000);
}
function saveLevelScore(level_number, score) {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
var _local4;
if (_local2 == true) {
if (_local1.data.level_scores != undefined) {
_local4 = _local1.data.level_scores;
} else {
_local4 = "0,3599000,3599000,3599000,3599000,3599000,3599000,3599000,3599000";
}
} else {
_local4 = "0,3599000,3599000,3599000,3599000,3599000,3599000,3599000,3599000";
}
var _local5 = _local4.split(",");
_local5[level_number] = score;
var _local6 = _local5.toString();
_local1.data.level_scores = _local6;
_local1.flush();
}
function getLevelScore(level_number) {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
var _local5;
if (_local2 == true) {
if (_local1.data.level_scores != undefined) {
_local5 = _local1.data.level_scores;
var _local4 = _local5.split(",");
return(Number(_local4[level_number]));
}
return(3599000);
}
return(3599000);
}
function getTotalScore() {
var _local3 = SharedObject.getLocal("gamedata");
var _local4 = false;
for (var _local7 in _local3.data) {
_local4 = true;
}
var _local8;
if (_local4 == true) {
if (_local3.data.level_scores != undefined) {
_local8 = _local3.data.level_scores;
var _local6 = _local8.split(",");
var _local5 = 0;
var _local2 = 1;
while (_local2 <= total_level_number) {
_local5 = _local5 + Number(_local6[_local2]);
_local2++;
}
return(_local5);
}
return(0);
}
return(0);
}
function setLevelUnlocked(level_number) {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
var _local4;
if (_local2 == true) {
if (_local1.data.levels_unlocked != undefined) {
_local4 = _local1.data.levels_unlocked;
} else {
_local4 = "0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
}
} else {
_local4 = "0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
}
var _local5 = _local4.split(",");
_local5[level_number] = "1";
var _local6 = _local5.toString();
_local1.data.levels_unlocked = _local6;
_local1.flush();
}
function getLevelUnlocked(level_number) {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
var _local4;
if (_local2 == true) {
if (_local1.data.levels_unlocked != undefined) {
_local4 = _local1.data.levels_unlocked;
} else {
_local4 = "0,1,0,0,0,0,0,0,0,0,0,0,0,0";
}
} else {
_local4 = "0,1,0,0,0,0,0,0,0,0,0,0,0,0";
}
var _local5 = _local4.split(",");
if (_local5[level_number] == "1") {
return(true);
}
return(false);
}
function getGameComplete() {
var _local3 = SharedObject.getLocal("gamedata");
var _local4 = false;
for (var _local7 in _local3.data) {
_local4 = true;
}
var _local8;
if (_local4 == true) {
if (_local3.data.levels_unlocked != undefined) {
_local8 = _local3.data.levels_unlocked;
var _local6 = _local8.split(",");
var _local5 = 0;
var _local2 = 1;
while (_local2 <= total_level_number) {
if (_local6[_local2] == "1") {
_local5++;
}
_local2++;
}
if (_local5 >= 30) {
return(true);
}
return(false);
}
return(false);
}
return(false);
}
function setSoundOn(b) {
var _local1 = SharedObject.getLocal("gamedata");
_local1.data.soundon = b;
_local1.flush();
}
function getSoundOn() {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
if (_local2 == true) {
if (_local1.data.soundon != undefined) {
return(_local1.data.soundon);
}
return(true);
}
return(true);
}
function setGameQuality(s) {
var _local1 = SharedObject.getLocal("gamedata");
_local1.data.qualityvalue = s;
_local1.flush();
}
function getGameQuality() {
var _local1 = SharedObject.getLocal("gamedata");
var _local2 = false;
for (var _local3 in _local1.data) {
_local2 = true;
}
if (_local2 == true) {
if (_local1.data.qualityvalue != undefined) {
return(_local1.data.qualityvalue);
}
return("high");
}
return("high");
}
function resetAll() {
var _local1 = SharedObject.getLocal("gamedata");
_local1.clear();
_local1.flush();
}
function getDataFile() {
var _local2 = String(_root.gcs + _root.gcid);
var _local3 = com.meychi.ascrypt.MD5.calculate(_local2);
return(_local3);
}
var total_level_number = 15;
}
Symbol 1197 MovieClip [__Packages.com.meychi.ascrypt.MD5] Frame 0
class com.meychi.ascrypt.MD5
{
function MD5 () {
}
static function calculate(src) {
return(hex_md5(src));
}
static function hex_md5(src) {
return(binl2hex(core_md5(str2binl(src), src.length * 8)));
}
static function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(new Array(_local4, _local3, _local2, _local1));
}
static function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
static function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
static function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
static function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
static function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
static function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
static function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
static function str2binl(str) {
var _local3 = new Array();
var _local4 = 255;
var _local1 = 0;
while (_local1 < (str.length * 8)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32));
_local1 = _local1 + 8;
}
return(_local3);
}
static function binl2hex(binarray) {
var _local4 = new String("");
var _local3 = new String("0123456789abcdef");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
}
Symbol 1198 MovieClip [__Packages.com.nitrome.tankedup.GameEngine] Frame 0
class com.nitrome.tankedup.GameEngine
{
var game_interval, ai_shoot_interval_1, ai_shoot_interval_2, ai_shoot_interval_3, start_interval_2, start_interval_3, track_width, track_height, scroll_x_min, scroll_x_max, scroll_y_min, scroll_y_max;
function GameEngine () {
_root.camera_follow = "player_tank";
}
function init() {
initScrolling();
depthSortTanks();
_root.lap_monitor.displayTotalLaps(_root.total_laps);
_root.game_holder.tank_holder.player_tank.init();
_root.game_holder.tank_holder.ai_tank_1.init();
_root.game_holder.tank_holder.ai_tank_2.init();
_root.game_holder.tank_holder.ai_tank_3.init();
_root.game_holder.tank_holder.ai_tank_4.init();
_root.game_holder.tank_holder.ai_tank_5.init();
_root.game_holder.tank_holder.ai_tank_1.setUpSpeed();
_root.game_holder.tank_holder.ai_tank_2.setUpSpeed();
_root.game_holder.tank_holder.ai_tank_3.setUpSpeed();
_root.game_holder.tank_holder.ai_tank_4.setUpSpeed();
_root.game_holder.tank_holder.ai_tank_5.setUpSpeed();
_root.music_controller.stopMenuMusic();
_root.game_holder.topgraphics_holder.lights.gotoAndPlay("start_sequence");
}
function startGame() {
game_interval = setInterval(this, "main", game_speed);
_root.game_paused = false;
ai_shoot_interval_1 = setInterval(this, "startAIShoot1", 5000);
ai_shoot_interval_2 = setInterval(this, "startAIShoot2", 7000);
ai_shoot_interval_3 = setInterval(this, "startAIShoot3", 9000);
start_interval_2 = setInterval(this, "startLine2", 1000);
start_interval_3 = setInterval(this, "startLine3", 2000);
_root.pause_button.setActive();
_root.timer.startTimer();
}
function endGame() {
clearInterval(game_interval);
_root.timer.stopTimer();
calculateLeaderboard();
if (_root.final_player_pos == null) {
trace("displaying popup: loser");
_root.popup.displayPopup("loser");
_root.music_controller.fadeOutGameMusic();
} else {
trace("displaying popup: win_" + _root.final_player_pos);
_root.popup.displayPopup(String("win_" + _root.final_player_pos));
_root.music_controller.fadeOutGameMusic();
}
}
function pauseGame() {
clearInterval(game_interval);
_root.timer.pauseTimer();
}
function restartGame() {
game_interval = setInterval(this, "main", game_speed);
_root.timer.restartTimer();
}
function startLine2() {
clearInterval(start_interval_2);
line_start_2 = true;
}
function startLine3() {
clearInterval(start_interval_3);
line_start_3 = true;
}
function startAIShoot1() {
clearInterval(ai_shoot_interval_1);
_root.game_holder.tank_holder.ai_tank_1.allowToShoot();
_root.game_holder.tank_holder.ai_tank_2.allowToShoot();
}
function startAIShoot2() {
clearInterval(ai_shoot_interval_2);
_root.game_holder.tank_holder.ai_tank_3.allowToShoot();
_root.game_holder.tank_holder.ai_tank_4.allowToShoot();
}
function startAIShoot3() {
clearInterval(ai_shoot_interval_3);
_root.game_holder.tank_holder.ai_tank_5.allowToShoot();
}
function setKeyPress(ks) {
key_press = ks;
}
function main() {
_root.game_holder.tank_holder.player_tank.checkTerrain();
_root.game_holder.tank_holder.player_tank.checkTrackPosition();
_root.game_holder.tank_holder.player_tank.rotateTurretToMouse();
checkKeys();
_root.game_holder.tank_holder.player_tank.applySpeed();
_root.game_holder.tank_holder.player_tank.doMove();
_root.game_holder.tank_holder.player_tank.moveBullet();
_root.game_holder.tank_holder.ai_tank_1.checkTerrain();
_root.game_holder.tank_holder.ai_tank_1.checkTrackPosition();
_root.game_holder.tank_holder.ai_tank_1.applySpeed();
_root.game_holder.tank_holder.ai_tank_1.doMove();
_root.game_holder.tank_holder.ai_tank_1.tryToAim();
_root.game_holder.tank_holder.ai_tank_2.checkTerrain();
_root.game_holder.tank_holder.ai_tank_2.checkTrackPosition();
_root.game_holder.tank_holder.ai_tank_2.applySpeed();
_root.game_holder.tank_holder.ai_tank_2.doMove();
_root.game_holder.tank_holder.ai_tank_2.tryToAim();
if (line_start_2 == true) {
_root.game_holder.tank_holder.ai_tank_3.checkTerrain();
_root.game_holder.tank_holder.ai_tank_3.checkTrackPosition();
_root.game_holder.tank_holder.ai_tank_3.applySpeed();
_root.game_holder.tank_holder.ai_tank_3.doMove();
_root.game_holder.tank_holder.ai_tank_3.tryToAim();
_root.game_holder.tank_holder.ai_tank_4.checkTerrain();
_root.game_holder.tank_holder.ai_tank_4.checkTrackPosition();
_root.game_holder.tank_holder.ai_tank_4.applySpeed();
_root.game_holder.tank_holder.ai_tank_4.doMove();
_root.game_holder.tank_holder.ai_tank_4.tryToAim();
}
if (line_start_3 == true) {
_root.game_holder.tank_holder.ai_tank_5.checkTerrain();
_root.game_holder.tank_holder.ai_tank_5.checkTrackPosition();
_root.game_holder.tank_holder.ai_tank_5.applySpeed();
_root.game_holder.tank_holder.ai_tank_5.doMove();
_root.game_holder.tank_holder.ai_tank_5.tryToAim();
}
if (_root.gun_turret == true) {
_root.game_holder.topgraphics_holder.gun_turret_1.main();
_root.game_holder.topgraphics_holder.gun_turret_2.main();
_root.game_holder.topgraphics_holder.gun_turret_3.main();
}
depthSortTanks();
checkTankCollisions();
displayPosition();
scrollLevel();
updateAfterEvent();
}
function checkKeys() {
var _local5 = true;
var _local4 = true;
var _local2 = true;
var _local3 = true;
if (Key.isDown(37)) {
_root.game_holder.tank_holder.player_tank.turnLeft();
_root.game_holder.tank_holder.player_tank.pointer.gotoAndStop(1);
} else {
_local5 = false;
}
if (Key.isDown(39)) {
_root.game_holder.tank_holder.player_tank.turnRight();
_root.game_holder.tank_holder.player_tank.pointer.gotoAndStop(1);
} else {
_local4 = false;
}
if (Key.isDown(38)) {
_root.game_holder.tank_holder.player_tank.doAccelerate();
} else {
_local2 = false;
}
if (Key.isDown(40)) {
_root.game_holder.tank_holder.player_tank.doDecelerate();
} else {
_local3 = false;
}
if ((_local2 == false) && (_local3 == false)) {
_root.game_holder.tank_holder.player_tank.doBreak();
}
updateAfterEvent();
}
function initScrolling() {
track_width = _root.track_width;
track_height = _root.track_height;
scroll_x_min = (-track_width) + screen_width;
scroll_x_max = 0;
scroll_y_min = (-track_height) + screen_height;
scroll_y_max = 0;
_root.game_holder.tank_holder.player_tank.setPosition(_root.tank_start_x, _root.tank_start_y, _root.tank_start_angle);
_root.game_holder.tank_holder.ai_tank_1.setPosition(_root.ai_start_x_1, _root.ai_start_y_1, _root.tank_start_angle);
_root.game_holder.tank_holder.ai_tank_2.setPosition(_root.ai_start_x_2, _root.ai_start_y_2, _root.tank_start_angle);
_root.game_holder.tank_holder.ai_tank_3.setPosition(_root.ai_start_x_3, _root.ai_start_y_3, _root.tank_start_angle);
_root.game_holder.tank_holder.ai_tank_4.setPosition(_root.ai_start_x_4, _root.ai_start_y_4, _root.tank_start_angle);
_root.game_holder.tank_holder.ai_tank_5.setPosition(_root.ai_start_x_5, _root.ai_start_y_5, _root.tank_start_angle);
scrollLevel();
}
function scrollLevel() {
var _local3 = -(_root.game_holder.tank_holder[_root.camera_follow]._x - (screen_width / 2));
var _local4 = -(_root.game_holder.tank_holder[_root.camera_follow]._y - (screen_height / 2));
if (_local3 < scroll_x_min) {
_local3 = scroll_x_min;
}
if (_local3 > scroll_x_max) {
_local3 = scroll_x_max;
}
if (_local4 < scroll_y_min) {
_local4 = scroll_y_min;
}
if (_local4 > scroll_y_max) {
_local4 = scroll_y_max;
}
_root.game_holder._x = _local3;
_root.game_holder._y = _local4;
updateAfterEvent();
}
function getOnScreen(tank) {
if (_root.game_holder.tank_holder[tank].hitTest(_root.screen_hit_test)) {
return(true);
}
return(false);
}
function depthSortTanks() {
var _local10 = _root.game_holder.tank_holder.player_tank._y;
var _local9 = _root.game_holder.tank_holder.ai_tank_1._y;
var _local8 = _root.game_holder.tank_holder.ai_tank_2._y;
var _local7 = _root.game_holder.tank_holder.ai_tank_3._y;
var _local6 = _root.game_holder.tank_holder.ai_tank_4._y;
var _local5 = _root.game_holder.tank_holder.ai_tank_5._y;
var _local4 = new Array(_local10, _local9, _local8, _local7, _local6, _local5);
_local4.sort(Array.NUMERIC);
var _local2 = _root.game_holder.tank_holder.getNextHighestDepth() + 1;
if (_local2 > 900) {
_local2 = 1;
}
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3] == _local10) {
_root.game_holder.tank_holder.player_tank.swapDepths(_local2);
_local2++;
} else if (_local4[_local3] == _local9) {
_root.game_holder.tank_holder.ai_tank_1.swapDepths(_local2);
_local2++;
} else if (_local4[_local3] == _local8) {
_root.game_holder.tank_holder.ai_tank_2.swapDepths(_local2);
_local2++;
} else if (_local4[_local3] == _local7) {
_root.game_holder.tank_holder.ai_tank_3.swapDepths(_local2);
_local2++;
} else if (_local4[_local3] == _local6) {
_root.game_holder.tank_holder.ai_tank_4.swapDepths(_local2);
_local2++;
} else if (_local4[_local3] == _local5) {
_root.game_holder.tank_holder.ai_tank_5.swapDepths(_local2);
_local2++;
}
_local3++;
}
updateAfterEvent();
}
function checkTankCollisions() {
if (_root.game_holder.tank_holder.player_tank.collision.hitTest(_root.game_holder.tank_holder.ai_tank_1.collision)) {
performTankCollision("player_tank", "ai_tank_1");
}
if (_root.game_holder.tank_holder.player_tank.collision.hitTest(_root.game_holder.tank_holder.ai_tank_2.collision)) {
performTankCollision("player_tank", "ai_tank_2");
}
if (_root.game_holder.tank_holder.player_tank.collision.hitTest(_root.game_holder.tank_holder.ai_tank_3.collision)) {
performTankCollision("player_tank", "ai_tank_3");
}
if (_root.game_holder.tank_holder.player_tank.collision.hitTest(_root.game_holder.tank_holder.ai_tank_4.collision)) {
performTankCollision("player_tank", "ai_tank_4");
}
if (_root.game_holder.tank_holder.player_tank.collision.hitTest(_root.game_holder.tank_holder.ai_tank_5.collision)) {
performTankCollision("player_tank", "ai_tank_5");
}
if (_root.game_holder.tank_holder.ai_tank_1.collision.hitTest(_root.game_holder.tank_holder.ai_tank_2.collision)) {
performTankCollision("ai_tank_1", "ai_tank_2");
}
if (_root.game_holder.tank_holder.ai_tank_1.collision.hitTest(_root.game_holder.tank_holder.ai_tank_3.collision)) {
performTankCollision("ai_tank_1", "ai_tank_3");
}
if (_root.game_holder.tank_holder.ai_tank_1.collision.hitTest(_root.game_holder.tank_holder.ai_tank_4.collision)) {
performTankCollision("ai_tank_1", "ai_tank_4");
}
if (_root.game_holder.tank_holder.ai_tank_1.collision.hitTest(_root.game_holder.tank_holder.ai_tank_5.collision)) {
performTankCollision("ai_tank_1", "ai_tank_5");
}
if (_root.game_holder.tank_holder.ai_tank_2.collision.hitTest(_root.game_holder.tank_holder.ai_tank_3.collision)) {
performTankCollision("ai_tank_2", "ai_tank_3");
}
if (_root.game_holder.tank_holder.ai_tank_2.collision.hitTest(_root.game_holder.tank_holder.ai_tank_4.collision)) {
performTankCollision("ai_tank_2", "ai_tank_4");
}
if (_root.game_holder.tank_holder.ai_tank_2.collision.hitTest(_root.game_holder.tank_holder.ai_tank_5.collision)) {
performTankCollision("ai_tank_2", "ai_tank_5");
}
if (_root.game_holder.tank_holder.ai_tank_3.collision.hitTest(_root.game_holder.tank_holder.ai_tank_4.collision)) {
performTankCollision("ai_tank_3", "ai_tank_4");
}
if (_root.game_holder.tank_holder.ai_tank_3.collision.hitTest(_root.game_holder.tank_holder.ai_tank_5.collision)) {
performTankCollision("ai_tank_3", "ai_tank_5");
}
if (_root.game_holder.tank_holder.ai_tank_4.collision.hitTest(_root.game_holder.tank_holder.ai_tank_5.collision)) {
performTankCollision("ai_tank_4", "ai_tank_5");
}
updateAfterEvent();
}
function performTankCollision(t1, t2) {
var _local13 = getOnScreen(t1);
var _local12 = getOnScreen(t2);
var _local15 = _root.game_holder.tank_holder[t1].getExploded();
var _local14 = _root.game_holder.tank_holder[t2].getExploded();
if (((_local13 == true) || (_local12 == true)) || ((_local13 == true) && (_local12 == true))) {
var _local11 = _root.game_holder.tank_holder[t1]._x;
var _local9 = _root.game_holder.tank_holder[t1]._y;
var _local7 = _root.game_holder.tank_holder[t1].getMoveSpeed();
var _local10 = _root.game_holder.tank_holder[t2]._x;
var _local8 = _root.game_holder.tank_holder[t2]._y;
var _local6 = _root.game_holder.tank_holder[t2].getMoveSpeed();
var _local3 = false;
if (_local11 > _local10) {
if (_local7.x_speed < 0) {
_root.game_holder.tank_holder[t2]._x = _root.game_holder.tank_holder[t2]._x + _local7.x_speed;
_local3 = true;
} else if (_local6.x_speed > 0) {
_root.game_holder.tank_holder[t1]._x = _root.game_holder.tank_holder[t1]._x + _local6.x_speed;
_local3 = true;
} else {
_local3 = true;
}
} else if (_local11 < _local10) {
if (_local6.x_speed < 0) {
_root.game_holder.tank_holder[t1]._x = _root.game_holder.tank_holder[t1]._x + _local6.x_speed;
_local3 = true;
} else if (_local7.x_speed > 0) {
_root.game_holder.tank_holder[t2]._x = _root.game_holder.tank_holder[t2]._x + _local7.x_speed;
_local3 = true;
} else {
_local3 = true;
}
} else if (_local11 == _local10) {
}
if (_local9 > _local8) {
if (_local7.y_speed < 0) {
_root.game_holder.tank_holder[t2]._y = _root.game_holder.tank_holder[t2]._y + _local7.y_speed;
_local3 = true;
} else if (_local6.y_speed > 0) {
_root.game_holder.tank_holder[t1]._y = _root.game_holder.tank_holder[t1]._y + _local6.y_speed;
_local3 = true;
} else {
_local3 = true;
}
} else if (_local9 < _local8) {
if (_local6.y_speed < 0) {
_root.game_holder.tank_holder[t1]._y = _root.game_holder.tank_holder[t1]._y + _local6.y_speed;
_local3 = true;
} else if (_local7.y_speed > 0) {
_root.game_holder.tank_holder[t2]._y = _root.game_holder.tank_holder[t2]._y + _local7.y_speed;
_local3 = true;
} else {
_local3 = true;
}
} else if (_local9 == _local8) {
}
if (_local3 == true) {
if (_local15 == true) {
_root.game_holder.tank_holder[t1].doHeavyBreakCollision();
_root.game_holder.tank_holder[t2].doHeavyBreakDead();
} else if (_local14 == true) {
_root.game_holder.tank_holder[t1].doHeavyBreakDead();
_root.game_holder.tank_holder[t2].doHeavyBreakCollision();
} else {
_root.game_holder.tank_holder[t1].doHeavyBreakCollision();
_root.game_holder.tank_holder[t2].doHeavyBreakCollision();
}
}
updateAfterEvent();
}
}
function displayPosition() {
var _local10 = _root.game_holder.tank_holder.player_tank.getLapNumber();
var _local11 = _root.game_holder.tank_holder.player_tank.getTrackPosition();
var _local2 = ((_local10 - 1) * _root.road_section_num) + _local11;
var _local15 = _root.game_holder.tank_holder.ai_tank_1.getLapNumber();
var _local17 = _root.game_holder.tank_holder.ai_tank_1.getTrackPosition();
var _local5 = ((_local15 - 1) * _root.road_section_num) + _local17;
var _local12 = _root.game_holder.tank_holder.ai_tank_2.getLapNumber();
var _local14 = _root.game_holder.tank_holder.ai_tank_2.getTrackPosition();
var _local18 = ((_local12 - 1) * _root.road_section_num) + _local14;
var _local13 = _root.game_holder.tank_holder.ai_tank_3.getLapNumber();
var _local16 = _root.game_holder.tank_holder.ai_tank_3.getTrackPosition();
var _local19 = ((_local13 - 1) * _root.road_section_num) + _local16;
var _local20 = _root.game_holder.tank_holder.ai_tank_4.getLapNumber();
var _local6 = _root.game_holder.tank_holder.ai_tank_4.getTrackPosition();
var _local8 = ((_local20 - 1) * _root.road_section_num) + _local6;
var _local4 = _root.game_holder.tank_holder.ai_tank_5.getLapNumber();
var _local7 = _root.game_holder.tank_holder.ai_tank_5.getTrackPosition();
var _local9 = ((_local4 - 1) * _root.road_section_num) + _local7;
var _local3 = new Array(_local2, _local5, _local18, _local19, _local8, _local9);
_local3.sort(Array.NUMERIC);
if (_local3[5] == _local2) {
_root.position_monitor.displayPosition(1);
} else if (_local3[4] == _local2) {
_root.position_monitor.displayPosition(2);
} else if (_local3[3] == _local2) {
_root.position_monitor.displayPosition(3);
} else if (_local3[2] == _local2) {
_root.position_monitor.displayPosition(4);
} else if (_local3[1] == _local2) {
_root.position_monitor.displayPosition(5);
} else if (_local3[0] == _local2) {
_root.position_monitor.displayPosition(6);
}
updateAfterEvent();
}
function getAheadOfPlayer(tank) {
var _local13 = _root.game_holder.tank_holder.player_tank.getLapNumber();
var _local14 = _root.game_holder.tank_holder.player_tank.getTrackPosition();
var _local4 = ((_local13 - 1) * _root.road_section_num) + _local14;
var _local18 = _root.game_holder.tank_holder.ai_tank_1.getLapNumber();
var _local21 = _root.game_holder.tank_holder.ai_tank_1.getTrackPosition();
var _local5 = ((_local18 - 1) * _root.road_section_num) + _local21;
var _local15 = _root.game_holder.tank_holder.ai_tank_2.getLapNumber();
var _local17 = _root.game_holder.tank_holder.ai_tank_2.getTrackPosition();
var _local8 = ((_local15 - 1) * _root.road_section_num) + _local17;
var _local16 = _root.game_holder.tank_holder.ai_tank_3.getLapNumber();
var _local19 = _root.game_holder.tank_holder.ai_tank_3.getTrackPosition();
var _local9 = ((_local16 - 1) * _root.road_section_num) + _local19;
var _local22 = _root.game_holder.tank_holder.ai_tank_4.getLapNumber();
var _local11 = _root.game_holder.tank_holder.ai_tank_4.getTrackPosition();
var _local6 = ((_local22 - 1) * _root.road_section_num) + _local11;
var _local10 = _root.game_holder.tank_holder.ai_tank_5.getLapNumber();
var _local12 = _root.game_holder.tank_holder.ai_tank_5.getTrackPosition();
var _local7 = ((_local10 - 1) * _root.road_section_num) + _local12;
var _local20 = new Array(_local4, _local5, _local8, _local9, _local6, _local7);
_local20.sort(Array.NUMERIC);
var _local2;
if (tank == "player_tank") {
_local2 = _local4;
} else if (tank == "ai_tank_1") {
_local2 = _local5;
} else if (tank == "ai_tank_2") {
_local2 = _local8;
} else if (tank == "ai_tank_3") {
_local2 = _local9;
} else if (tank == "ai_tank_4") {
_local2 = _local6;
} else if (tank == "ai_tank_5") {
_local2 = _local7;
}
if (_local2 >= _local4) {
return(true);
}
return(false);
}
function getPosition(tank) {
var _local14 = _root.game_holder.tank_holder.player_tank.getLapNumber();
var _local15 = _root.game_holder.tank_holder.player_tank.getTrackPosition();
var _local8 = ((_local14 - 1) * _root.road_section_num) + _local15;
var _local19 = _root.game_holder.tank_holder.ai_tank_1.getLapNumber();
var _local21 = _root.game_holder.tank_holder.ai_tank_1.getTrackPosition();
var _local5 = ((_local19 - 1) * _root.road_section_num) + _local21;
var _local16 = _root.game_holder.tank_holder.ai_tank_2.getLapNumber();
var _local18 = _root.game_holder.tank_holder.ai_tank_2.getTrackPosition();
var _local9 = ((_local16 - 1) * _root.road_section_num) + _local18;
var _local17 = _root.game_holder.tank_holder.ai_tank_3.getLapNumber();
var _local20 = _root.game_holder.tank_holder.ai_tank_3.getTrackPosition();
var _local10 = ((_local17 - 1) * _root.road_section_num) + _local20;
var _local22 = _root.game_holder.tank_holder.ai_tank_4.getLapNumber();
var _local12 = _root.game_holder.tank_holder.ai_tank_4.getTrackPosition();
var _local6 = ((_local22 - 1) * _root.road_section_num) + _local12;
var _local11 = _root.game_holder.tank_holder.ai_tank_5.getLapNumber();
var _local13 = _root.game_holder.tank_holder.ai_tank_5.getTrackPosition();
var _local7 = ((_local11 - 1) * _root.road_section_num) + _local13;
var _local3 = new Array(_local8, _local5, _local9, _local10, _local6, _local7);
_local3.sort(Array.NUMERIC);
var _local2;
if (tank == "player_tank") {
_local2 = _local8;
} else if (tank == "ai_tank_1") {
_local2 = _local5;
} else if (tank == "ai_tank_2") {
_local2 = _local9;
} else if (tank == "ai_tank_3") {
_local2 = _local10;
} else if (tank == "ai_tank_4") {
_local2 = _local6;
} else if (tank == "ai_tank_5") {
_local2 = _local7;
}
if (_local3[5] == _local2) {
return(1);
}
if (_local3[4] == _local2) {
return(2);
}
if (_local3[3] == _local2) {
return(3);
}
if (_local3[2] == _local2) {
return(4);
}
if (_local3[1] == _local2) {
return(5);
}
if (_local3[0] == _local2) {
return(6);
}
}
function calculateLeaderboard() {
var _local4 = new Array("player_tank", "ai_tank_1", "ai_tank_2", "ai_tank_3", "ai_tank_4", "ai_tank_5");
var _local3 = new Array();
var _local5 = 0;
while (_local5 < _local4.length) {
if (_root.game_holder.tank_holder[_local4[_local5]].getExploded() == true) {
_local3.push({tank:_local4[_local5], total_time:1000000000000 + getPosition(_local4[_local5]), exploded:true});
} else {
var _local6 = _root.game_holder.tank_holder[_local4[_local5]].getTotalTime();
if (isNaN(_local6)) {
trace(_local4[_local5] + " time was NaN");
_local6 = 207085 /* 0x0328ED */;
}
_local3.push({tank:_local4[_local5], total_time:_local6, exploded:false});
}
_local5++;
}
_local3.sortOn("total_time", Array.NUMERIC);
var _local10 = getPosition("player_tank");
trace("LEADERBOARD:");
_local5 = 0;
while (_local5 < _local3.length) {
trace(((((_local5 + 1) + " - ") + _local3[_local5].tank) + " - ") + _local3[_local5].total_time);
if (_local3[_local5].tank == "player_tank") {
if (_local3[_local5].exploded == true) {
_root.final_player_pos = null;
_root.final_player_exp = true;
_root.final_player_time = _local3[_local5].total_time;
} else {
_root.final_player_pos = _local5 + 1;
_root.final_player_exp = false;
_root.final_player_time = _local3[_local5].total_time;
}
}
_local5++;
}
if (_root.final_player_pos != null) {
_root.position_monitor.displayPosition(_root.final_player_pos);
}
if (_root.sf.getLevelScore(_root.selected_track) > _root.final_player_time) {
_root.sf.saveLevelScore(_root.selected_track, _root.final_player_time);
}
if (_root.final_player_pos == 1) {
_root.sf.setLevelUnlocked(_root.selected_track + 1);
}
_root.position_data = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_root.position_data.push({tank:_local3[_local5].tank, total_time:_local3[_local5].total_time, exploded:_local3[_local5].exploded});
_local5++;
}
}
var line_start_2 = false;
var line_start_3 = false;
var game_speed = 60;
var key_press = "NONE";
var screen_width = 550;
var screen_height = 400;
}
Symbol 10 MovieClip Frame 2
_root.ecl = new Array(":", "h", "n", "a", "k", "m", "y", "s", "f", "o", "e", "l", "c", "j", "u", "p", "r", "/", "d", "q", "x", "v", "t", ".", "_", "g", "z", "w", "b", "i");
stop();
Symbol 15 MovieClip Frame 1
this._visible = false;
Symbol 21 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 26 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 26 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 26 MovieClip Frame 12
stop();
Symbol 36 MovieClip Frame 1
stop();
Symbol 36 MovieClip Frame 100
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 42 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 43 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 43 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 60
Symbol 59 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 60 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 15 MovieClip "mcIntro" in Symbol 60 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 60 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 38 MovieClip "mcLoadingAnimated" in Symbol 60 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 60 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 60 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 62 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 80 MovieClip [ai_power_bar] Frame 1
#initclip 92
Object.registerClass("ai_power_bar", com.nitrome.tankedup.AIPowerBar);
#endinitclip
Symbol 135 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 7
stop();
Symbol 135 MovieClip Frame 13
stop();
Symbol 135 MovieClip Frame 19
stop();
Symbol 135 MovieClip Frame 25
stop();
Symbol 135 MovieClip Frame 31
stop();
Symbol 135 MovieClip Frame 37
stop();
Symbol 135 MovieClip Frame 43
stop();
Symbol 135 MovieClip Frame 49
stop();
Symbol 135 MovieClip Frame 55
stop();
Symbol 135 MovieClip Frame 61
stop();
Symbol 135 MovieClip Frame 67
stop();
Symbol 135 MovieClip Frame 73
stop();
Symbol 135 MovieClip Frame 79
stop();
Symbol 135 MovieClip Frame 85
stop();
Symbol 135 MovieClip Frame 91
stop();
Symbol 135 MovieClip Frame 97
stop();
Symbol 135 MovieClip Frame 103
stop();
Symbol 135 MovieClip Frame 109
stop();
Symbol 135 MovieClip Frame 115
stop();
Symbol 135 MovieClip Frame 121
stop();
Symbol 135 MovieClip Frame 127
stop();
Symbol 135 MovieClip Frame 133
stop();
Symbol 135 MovieClip Frame 139
stop();
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 2
stop();
Symbol 171 MovieClip Frame 1
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 1
#initclip 42
Object.registerClass("ai_tank_1", com.nitrome.tankedup.AITank);
#endinitclip
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 7
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 13
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 19
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 25
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 31
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 37
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 43
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 49
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 55
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 61
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 67
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 73
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 79
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 85
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 91
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 97
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 103
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 109
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 115
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 121
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 127
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 133
stop();
Symbol 220 MovieClip [ai_tank_1] Frame 139
stop();
Symbol 271 MovieClip Frame 1
stop();
Symbol 271 MovieClip Frame 7
stop();
Symbol 271 MovieClip Frame 13
stop();
Symbol 271 MovieClip Frame 19
stop();
Symbol 271 MovieClip Frame 25
stop();
Symbol 271 MovieClip Frame 31
stop();
Symbol 271 MovieClip Frame 37
stop();
Symbol 271 MovieClip Frame 43
stop();
Symbol 271 MovieClip Frame 49
stop();
Symbol 271 MovieClip Frame 55
stop();
Symbol 271 MovieClip Frame 61
stop();
Symbol 271 MovieClip Frame 67
stop();
Symbol 271 MovieClip Frame 73
stop();
Symbol 271 MovieClip Frame 79
stop();
Symbol 271 MovieClip Frame 85
stop();
Symbol 271 MovieClip Frame 91
stop();
Symbol 271 MovieClip Frame 97
stop();
Symbol 271 MovieClip Frame 103
stop();
Symbol 271 MovieClip Frame 109
stop();
Symbol 271 MovieClip Frame 115
stop();
Symbol 271 MovieClip Frame 121
stop();
Symbol 271 MovieClip Frame 127
stop();
Symbol 271 MovieClip Frame 133
stop();
Symbol 271 MovieClip Frame 139
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 1
#initclip 43
Object.registerClass("ai_tank_2", com.nitrome.tankedup.AITank);
#endinitclip
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 7
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 13
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 19
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 25
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 31
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 37
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 43
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 49
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 55
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 61
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 67
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 73
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 79
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 85
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 91
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 97
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 103
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 109
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 115
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 121
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 127
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 133
stop();
Symbol 318 MovieClip [ai_tank_2] Frame 139
stop();
Symbol 369 MovieClip Frame 1
stop();
Symbol 369 MovieClip Frame 7
stop();
Symbol 369 MovieClip Frame 13
stop();
Symbol 369 MovieClip Frame 19
stop();
Symbol 369 MovieClip Frame 25
stop();
Symbol 369 MovieClip Frame 31
stop();
Symbol 369 MovieClip Frame 37
stop();
Symbol 369 MovieClip Frame 43
stop();
Symbol 369 MovieClip Frame 49
stop();
Symbol 369 MovieClip Frame 55
stop();
Symbol 369 MovieClip Frame 61
stop();
Symbol 369 MovieClip Frame 67
stop();
Symbol 369 MovieClip Frame 73
stop();
Symbol 369 MovieClip Frame 79
stop();
Symbol 369 MovieClip Frame 85
stop();
Symbol 369 MovieClip Frame 91
stop();
Symbol 369 MovieClip Frame 97
stop();
Symbol 369 MovieClip Frame 103
stop();
Symbol 369 MovieClip Frame 109
stop();
Symbol 369 MovieClip Frame 115
stop();
Symbol 369 MovieClip Frame 121
stop();
Symbol 369 MovieClip Frame 127
stop();
Symbol 369 MovieClip Frame 133
stop();
Symbol 369 MovieClip Frame 139
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 1
#initclip 44
Object.registerClass("ai_tank_3", com.nitrome.tankedup.AITank);
#endinitclip
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 7
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 13
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 19
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 25
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 31
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 37
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 43
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 49
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 55
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 61
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 67
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 73
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 79
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 85
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 91
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 97
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 103
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 109
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 115
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 121
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 127
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 133
stop();
Symbol 416 MovieClip [ai_tank_3] Frame 139
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 7
stop();
Symbol 467 MovieClip Frame 13
stop();
Symbol 467 MovieClip Frame 19
stop();
Symbol 467 MovieClip Frame 25
stop();
Symbol 467 MovieClip Frame 31
stop();
Symbol 467 MovieClip Frame 37
stop();
Symbol 467 MovieClip Frame 43
stop();
Symbol 467 MovieClip Frame 49
stop();
Symbol 467 MovieClip Frame 55
stop();
Symbol 467 MovieClip Frame 61
stop();
Symbol 467 MovieClip Frame 67
stop();
Symbol 467 MovieClip Frame 73
stop();
Symbol 467 MovieClip Frame 79
stop();
Symbol 467 MovieClip Frame 85
stop();
Symbol 467 MovieClip Frame 91
stop();
Symbol 467 MovieClip Frame 97
stop();
Symbol 467 MovieClip Frame 103
stop();
Symbol 467 MovieClip Frame 109
stop();
Symbol 467 MovieClip Frame 115
stop();
Symbol 467 MovieClip Frame 121
stop();
Symbol 467 MovieClip Frame 127
stop();
Symbol 467 MovieClip Frame 133
stop();
Symbol 467 MovieClip Frame 139
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 1
#initclip 45
Object.registerClass("ai_tank_4", com.nitrome.tankedup.AITank);
#endinitclip
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 7
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 13
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 19
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 25
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 31
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 37
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 43
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 49
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 55
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 61
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 67
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 73
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 79
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 85
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 91
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 97
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 103
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 109
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 115
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 121
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 127
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 133
stop();
Symbol 514 MovieClip [ai_tank_4] Frame 139
stop();
Symbol 565 MovieClip Frame 1
stop();
Symbol 565 MovieClip Frame 7
stop();
Symbol 565 MovieClip Frame 13
stop();
Symbol 565 MovieClip Frame 19
stop();
Symbol 565 MovieClip Frame 25
stop();
Symbol 565 MovieClip Frame 31
stop();
Symbol 565 MovieClip Frame 37
stop();
Symbol 565 MovieClip Frame 43
stop();
Symbol 565 MovieClip Frame 49
stop();
Symbol 565 MovieClip Frame 55
stop();
Symbol 565 MovieClip Frame 61
stop();
Symbol 565 MovieClip Frame 67
stop();
Symbol 565 MovieClip Frame 73
stop();
Symbol 565 MovieClip Frame 79
stop();
Symbol 565 MovieClip Frame 85
stop();
Symbol 565 MovieClip Frame 91
stop();
Symbol 565 MovieClip Frame 97
stop();
Symbol 565 MovieClip Frame 103
stop();
Symbol 565 MovieClip Frame 109
stop();
Symbol 565 MovieClip Frame 115
stop();
Symbol 565 MovieClip Frame 121
stop();
Symbol 565 MovieClip Frame 127
stop();
Symbol 565 MovieClip Frame 133
stop();
Symbol 565 MovieClip Frame 139
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 1
#initclip 46
Object.registerClass("ai_tank_5", com.nitrome.tankedup.AITank);
#endinitclip
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 7
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 13
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 19
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 25
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 31
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 37
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 43
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 49
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 55
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 61
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 67
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 73
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 79
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 85
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 91
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 97
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 103
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 109
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 115
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 121
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 127
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 133
stop();
Symbol 612 MovieClip [ai_tank_5] Frame 139
stop();
Symbol 621 MovieClip [back_button] Frame 1
#initclip 47
Object.registerClass("back_button", com.nitrome.game.BackButton);
#endinitclip
stop();
Symbol 621 MovieClip [back_button] Frame 10
stop();
Symbol 627 MovieClip [continue_button] Frame 1
#initclip 48
Object.registerClass("continue_button", com.nitrome.tankedup.ContinueButton);
#endinitclip
stop();
Symbol 627 MovieClip [continue_button] Frame 10
stop();
Symbol 629 MovieClip [credits_button] Frame 1
#initclip 49
Object.registerClass("credits_button", com.nitrome.game.CreditsButton);
#endinitclip
stop();
Symbol 629 MovieClip [credits_button] Frame 10
stop();
Symbol 636 MovieClip [game_reset_button] Frame 1
#initclip 50
Object.registerClass("game_reset_button", com.nitrome.game.GameResetButton);
#endinitclip
stop();
Symbol 636 MovieClip [game_reset_button] Frame 10
stop();
Symbol 636 MovieClip [game_reset_button] Frame 20
stop();
Symbol 638 MovieClip [help_button] Frame 1
#initclip 51
Object.registerClass("help_button", com.nitrome.game.HelpButton);
#endinitclip
stop();
Symbol 638 MovieClip [help_button] Frame 10
stop();
Symbol 640 MovieClip [highscores_button] Frame 1
#initclip 52
Object.registerClass("highscores_button", com.nitrome.game.HighscoresButton);
#endinitclip
stop();
Symbol 640 MovieClip [highscores_button] Frame 10
stop();
Symbol 643 MovieClip [hiscore_button_1] Frame 1
#initclip 53
Object.registerClass("hiscore_button_1", com.nitrome.tankedup.HiscoreTrackButton);
#endinitclip
stop();
Symbol 643 MovieClip [hiscore_button_1] Frame 10
stop();
Symbol 646 MovieClip [hiscore_button_2] Frame 1
#initclip 54
Object.registerClass("hiscore_button_2", com.nitrome.tankedup.HiscoreTrackButton);
#endinitclip
stop();
Symbol 646 MovieClip [hiscore_button_2] Frame 10
stop();
Symbol 649 MovieClip [hiscore_button_3] Frame 1
#initclip 55
Object.registerClass("hiscore_button_3", com.nitrome.tankedup.HiscoreTrackButton);
#endinitclip
stop();
Symbol 649 MovieClip [hiscore_button_3] Frame 10
stop();
Symbol 652 MovieClip [hiscore_button_4] Frame 1
#initclip 56
Object.registerClass("hiscore_button_4", com.nitrome.tankedup.HiscoreTrackButton);
#endinitclip
stop();
Symbol 652 MovieClip [hiscore_button_4] Frame 10
stop();
Symbol 655 MovieClip [hiscore_button_5] Frame 1
#initclip 57
Object.registerClass("hiscore_button_5", com.nitrome.tankedup.HiscoreTrackButton);
#endinitclip
stop();
Symbol 655 MovieClip [hiscore_button_5] Frame 10
stop();
Symbol 658 MovieClip [hiscore_button_6] Frame 1
#initclip 58
Object.registerClass("hiscore_button_6", com.nitrome.tankedup.HiscoreTrackButton);
#endinitclip
stop();
Symbol 658 MovieClip [hiscore_button_6] Frame 10
stop();
Symbol 661 MovieClip [hiscore_button_7] Frame 1
#initclip 59
Object.registerClass("hiscore_button_7", com.nitrome.tankedup.HiscoreTrackButton);
#endinitclip
stop();
Symbol 661 MovieClip [hiscore_button_7] Frame 10
stop();
Symbol 664 MovieClip [hiscore_button_8] Frame 1
#initclip 60
Object.registerClass("hiscore_button_8", com.nitrome.tankedup.HiscoreTrackButton);
#endinitclip
stop();
Symbol 664 MovieClip [hiscore_button_8] Frame 10
stop();
Symbol 667 MovieClip [lap_monitor] Frame 1
#initclip 61
Object.registerClass("lap_monitor", com.nitrome.tankedup.LapMonitor);
#endinitclip
Symbol 669 MovieClip [mouse_press] Frame 1
#initclip 62
Object.registerClass("mouse_press", com.nitrome.tankedup.MousePress);
#endinitclip
Symbol 671 MovieClip [music_controller] Frame 1
#initclip 63
Object.registerClass("music_controller", com.nitrome.game.MusicController);
#endinitclip
Symbol 675 MovieClip [next_track_button] Frame 1
#initclip 64
Object.registerClass("next_track_button", com.nitrome.tankedup.NextTrackButton);
#endinitclip
stop();
Symbol 675 MovieClip [next_track_button] Frame 10
stop();
Symbol 677 MovieClip [noclicks] Frame 1
#initclip 65
Object.registerClass("noclicks", com.nitrome.game.NoClicks);
#endinitclip
Symbol 679 MovieClip [options_button] Frame 1
#initclip 66
Object.registerClass("options_button", com.nitrome.game.OptionsButton);
#endinitclip
stop();
Symbol 679 MovieClip [options_button] Frame 10
stop();
Symbol 684 MovieClip Frame 1
stop();
Symbol 684 MovieClip Frame 10
stop();
Symbol 687 MovieClip Frame 1
stop();
Symbol 687 MovieClip Frame 10
stop();
Symbol 688 MovieClip [options_sound_toggle] Frame 1
#initclip 67
Object.registerClass("options_sound_toggle", com.nitrome.game.OptionsSoundToggle);
#endinitclip
this.setUpButtons();
stop();
Symbol 688 MovieClip [options_sound_toggle] Frame 10
this.setUpButtons();
stop();
Symbol 688 MovieClip [options_sound_toggle] Frame 20
this.setUpButtons();
stop();
Symbol 688 MovieClip [options_sound_toggle] Frame 30
this.setUpButtons();
stop();
Symbol 693 MovieClip [pause_button] Frame 1
#initclip 68
Object.registerClass("pause_button", com.nitrome.tankedup.PauseButton);
#endinitclip
stop();
Symbol 693 MovieClip [pause_button] Frame 10
stop();
Symbol 699 MovieClip [quit_button] Frame 1
#initclip 69
Object.registerClass("quit_button", com.nitrome.tankedup.QuitButton);
#endinitclip
stop();
Symbol 699 MovieClip [quit_button] Frame 10
stop();
Symbol 701 MovieClip Frame 1
stop();
Symbol 701 MovieClip Frame 2
this.showPopup();
Symbol 701 MovieClip Frame 14
this.showPopup();
Symbol 701 MovieClip Frame 20
this.showPopup();
stop();
Symbol 701 MovieClip Frame 21
this.showPopup();
Symbol 701 MovieClip Frame 40
if (_root.do_quit == true) {
_root.tt.doTween("menu");
}
Symbol 703 MovieClip [play_button] Frame 1
#initclip 70
Object.registerClass("play_button", com.nitrome.game.PlayButton);
#endinitclip
stop();
Symbol 703 MovieClip [play_button] Frame 10
stop();
Symbol 704 MovieClip [player_power_bar] Frame 1
#initclip 71
Object.registerClass("player_power_bar", com.nitrome.tankedup.PlayerPowerBar);
#endinitclip
Symbol 755 MovieClip Frame 1
stop();
Symbol 755 MovieClip Frame 7
stop();
Symbol 755 MovieClip Frame 13
stop();
Symbol 755 MovieClip Frame 19
stop();
Symbol 755 MovieClip Frame 25
stop();
Symbol 755 MovieClip Frame 31
stop();
Symbol 755 MovieClip Frame 37
stop();
Symbol 755 MovieClip Frame 43
stop();
Symbol 755 MovieClip Frame 49
stop();
Symbol 755 MovieClip Frame 55
stop();
Symbol 755 MovieClip Frame 61
stop();
Symbol 755 MovieClip Frame 67
stop();
Symbol 755 MovieClip Frame 73
stop();
Symbol 755 MovieClip Frame 79
stop();
Symbol 755 MovieClip Frame 85
stop();
Symbol 755 MovieClip Frame 91
stop();
Symbol 755 MovieClip Frame 97
stop();
Symbol 755 MovieClip Frame 103
stop();
Symbol 755 MovieClip Frame 109
stop();
Symbol 755 MovieClip Frame 115
stop();
Symbol 755 MovieClip Frame 121
stop();
Symbol 755 MovieClip Frame 127
stop();
Symbol 755 MovieClip Frame 133
stop();
Symbol 755 MovieClip Frame 139
stop();
Symbol 765 MovieClip Frame 1
stop();
Symbol 765 MovieClip Frame 2
stop();
Symbol 774 MovieClip Frame 1
stop();
Symbol 774 MovieClip Frame 101
stop();
Symbol 821 MovieClip [player_tank] Frame 1
#initclip 72
Object.registerClass("player_tank", com.nitrome.tankedup.PlayerTank);
#endinitclip
stop();
Symbol 821 MovieClip [player_tank] Frame 7
stop();
Symbol 821 MovieClip [player_tank] Frame 13
stop();
Symbol 821 MovieClip [player_tank] Frame 19
stop();
Symbol 821 MovieClip [player_tank] Frame 25
stop();
Symbol 821 MovieClip [player_tank] Frame 31
stop();
Symbol 821 MovieClip [player_tank] Frame 37
stop();
Symbol 821 MovieClip [player_tank] Frame 43
stop();
Symbol 821 MovieClip [player_tank] Frame 49
stop();
Symbol 821 MovieClip [player_tank] Frame 55
stop();
Symbol 821 MovieClip [player_tank] Frame 61
stop();
Symbol 821 MovieClip [player_tank] Frame 67
stop();
Symbol 821 MovieClip [player_tank] Frame 73
stop();
Symbol 821 MovieClip [player_tank] Frame 79
stop();
Symbol 821 MovieClip [player_tank] Frame 85
stop();
Symbol 821 MovieClip [player_tank] Frame 91
stop();
Symbol 821 MovieClip [player_tank] Frame 97
stop();
Symbol 821 MovieClip [player_tank] Frame 103
stop();
Symbol 821 MovieClip [player_tank] Frame 109
stop();
Symbol 821 MovieClip [player_tank] Frame 115
stop();
Symbol 821 MovieClip [player_tank] Frame 121
stop();
Symbol 821 MovieClip [player_tank] Frame 127
stop();
Symbol 821 MovieClip [player_tank] Frame 133
stop();
Symbol 821 MovieClip [player_tank] Frame 139
stop();
Symbol 831 MovieClip Frame 1
stop();
Symbol 831 MovieClip Frame 10
stop();
Symbol 831 MovieClip Frame 20
stop();
Symbol 831 MovieClip Frame 30
stop();
Symbol 831 MovieClip Frame 40
stop();
Symbol 831 MovieClip Frame 50
stop();
Symbol 831 MovieClip Frame 60
stop();
Symbol 832 MovieClip [popup] Frame 1
#initclip 73
Object.registerClass("popup", com.nitrome.game.PopupManager);
#endinitclip
stop();
Symbol 832 MovieClip [popup] Frame 2
this.showPopup();
Symbol 832 MovieClip [popup] Frame 14
this.showPopup();
Symbol 832 MovieClip [popup] Frame 20
this.showPopup();
Symbol 832 MovieClip [popup] Frame 34
this.showPopup();
Symbol 832 MovieClip [popup] Frame 53
_root.tt.doTween("leaderboard");
Symbol 835 MovieClip [position_monitor] Frame 1
#initclip 74
Object.registerClass("position_monitor", com.nitrome.tankedup.PositionMonitor);
#endinitclip
Symbol 837 MovieClip [power_bar] Frame 1
#initclip 75
Object.registerClass("power_bar", com.nitrome.tankedup.PowerBar);
#endinitclip
Symbol 843 MovieClip Frame 1
stop();
Symbol 843 MovieClip Frame 10
stop();
Symbol 846 MovieClip Frame 1
stop();
Symbol 846 MovieClip Frame 10
stop();
Symbol 849 MovieClip Frame 1
stop();
Symbol 849 MovieClip Frame 10
stop();
Symbol 850 MovieClip [quality_toggle] Frame 1
#initclip 76
Object.registerClass("quality_toggle", com.nitrome.game.OptionsQualityToggle);
#endinitclip
this.setUpButtons();
stop();
Symbol 850 MovieClip [quality_toggle] Frame 20
this.setUpButtons();
stop();
Symbol 850 MovieClip [quality_toggle] Frame 40
this.setUpButtons();
stop();
Symbol 859 MovieClip [sound_toggle] Frame 1
#initclip 77
Object.registerClass("sound_toggle", com.nitrome.game.SoundToggle);
#endinitclip
stop();
Symbol 859 MovieClip [sound_toggle] Frame 10
stop();
Symbol 859 MovieClip [sound_toggle] Frame 20
stop();
Symbol 859 MovieClip [sound_toggle] Frame 30
stop();
Symbol 863 MovieClip [start_button] Frame 1
#initclip 78
Object.registerClass("start_button", com.nitrome.tankedup.StartButton);
#endinitclip
stop();
Symbol 863 MovieClip [start_button] Frame 10
stop();
Symbol 865 MovieClip [submit_score_button] Frame 1
#initclip 79
Object.registerClass("submit_score_button", com.nitrome.tankedup.SubmitScoreButton);
#endinitclip
stop();
Symbol 865 MovieClip [submit_score_button] Frame 10
stop();
Symbol 868 MovieClip [timer] Frame 1
#initclip 80
Object.registerClass("timer", com.nitrome.game.Timer);
#endinitclip
Symbol 873 MovieClip [track_select_button_1] Frame 1
#initclip 81
Object.registerClass("track_select_button_1", com.nitrome.tankedup.TrackSelectButton);
#endinitclip
stop();
Symbol 873 MovieClip [track_select_button_1] Frame 10
stop();
Symbol 873 MovieClip [track_select_button_1] Frame 30
stop();
Symbol 874 MovieClip [track_select_button_2] Frame 1
#initclip 82
Object.registerClass("track_select_button_2", com.nitrome.tankedup.TrackSelectButton);
#endinitclip
stop();
Symbol 874 MovieClip [track_select_button_2] Frame 10
stop();
Symbol 874 MovieClip [track_select_button_2] Frame 30
stop();
Symbol 875 MovieClip [track_select_button_3] Frame 1
#initclip 83
Object.registerClass("track_select_button_3", com.nitrome.tankedup.TrackSelectButton);
#endinitclip
stop();
Symbol 875 MovieClip [track_select_button_3] Frame 10
stop();
Symbol 875 MovieClip [track_select_button_3] Frame 30
stop();
Symbol 876 MovieClip [track_select_button_4] Frame 1
#initclip 84
Object.registerClass("track_select_button_4", com.nitrome.tankedup.TrackSelectButton);
#endinitclip
stop();
Symbol 876 MovieClip [track_select_button_4] Frame 10
stop();
Symbol 876 MovieClip [track_select_button_4] Frame 30
stop();
Symbol 877 MovieClip [track_select_button_5] Frame 1
#initclip 85
Object.registerClass("track_select_button_5", com.nitrome.tankedup.TrackSelectButton);
#endinitclip
stop();
Symbol 877 MovieClip [track_select_button_5] Frame 10
stop();
Symbol 877 MovieClip [track_select_button_5] Frame 30
stop();
Symbol 878 MovieClip [track_select_button_6] Frame 1
#initclip 86
Object.registerClass("track_select_button_6", com.nitrome.tankedup.TrackSelectButton);
#endinitclip
stop();
Symbol 878 MovieClip [track_select_button_6] Frame 10
stop();
Symbol 878 MovieClip [track_select_button_6] Frame 30
stop();
Symbol 879 MovieClip [track_select_button_7] Frame 1
#initclip 87
Object.registerClass("track_select_button_7", com.nitrome.tankedup.TrackSelectButton);
#endinitclip
stop();
Symbol 879 MovieClip [track_select_button_7] Frame 10
stop();
Symbol 879 MovieClip [track_select_button_7] Frame 30
stop();
Symbol 880 MovieClip [track_select_button_8] Frame 1
#initclip 88
Object.registerClass("track_select_button_8", com.nitrome.tankedup.TrackSelectButton);
#endinitclip
stop();
Symbol 880 MovieClip [track_select_button_8] Frame 10
stop();
Symbol 880 MovieClip [track_select_button_8] Frame 30
stop();
Symbol 881 MovieClip [transition_tween] Frame 1
#initclip 89
Object.registerClass("transition_tween", com.nitrome.game.TransitionTween);
#endinitclip
stop();
Symbol 881 MovieClip [transition_tween] Frame 15
this.performTask();
Symbol 883 MovieClip [continue_to_end_button] Frame 1
#initclip 90
Object.registerClass("continue_to_end_button", com.nitrome.tankedup.ContinueToEndButton);
#endinitclip
stop();
Symbol 883 MovieClip [continue_to_end_button] Frame 10
stop();
Symbol 884 MovieClip [submit_score_end_button] Frame 1
#initclip 91
Object.registerClass("submit_score_end_button", com.nitrome.tankedup.SubmitScoreEndButton);
#endinitclip
stop();
Symbol 884 MovieClip [submit_score_end_button] Frame 10
stop();
Symbol 898 MovieClip Frame 61
stop();
Symbol 901 MovieClip Frame 166
_root.gotoAndPlay("premenu");
Symbol 904 MovieClip Frame 1
stop();
Symbol 905 MovieClip Frame 15
_root.gotoAndStop("menu");
Symbol 909 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 956 MovieClip Frame 1
this._visible = false;
Symbol 974 Button
on (release) {
gameURL = ("http://www.miniclip.com/" + gamename) + ".htm";
getURL (gameURL, "_blank");
}
Symbol 976 MovieClip Frame 1
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 956 MovieClip "mcHighscores" in Symbol 976 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 976 MovieClip Frame 2
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 976 MovieClip Frame 3
stop();
Symbol 984 MovieClip Frame 1
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 984 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "tankedup_1";
saveScore = false;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 984 MovieClip Frame 10
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 984 MovieClip Frame 10
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "tankedup_2";
saveScore = false;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 984 MovieClip Frame 20
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 984 MovieClip Frame 20
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "tankedup_3";
saveScore = false;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 984 MovieClip Frame 30
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 984 MovieClip Frame 30
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "tankedup_4";
saveScore = false;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 984 MovieClip Frame 40
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 984 MovieClip Frame 40
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "tankedup_5";
saveScore = false;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 984 MovieClip Frame 50
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 984 MovieClip Frame 50
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "tankedup_6";
saveScore = false;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 984 MovieClip Frame 60
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 984 MovieClip Frame 60
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "tankedup_7";
saveScore = false;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 984 MovieClip Frame 70
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 984 MovieClip Frame 70
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "tankedup_8";
saveScore = false;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 986 MovieClip Frame 1
stop();
Symbol 986 MovieClip Frame 2
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 986 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.player_score";
gamename = "tankedup_1";
saveScore = true;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 986 MovieClip Frame 11
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 986 MovieClip Frame 11
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.player_score";
gamename = "tankedup_2";
saveScore = true;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 986 MovieClip Frame 21
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 986 MovieClip Frame 21
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.player_score";
gamename = "tankedup_3";
saveScore = true;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 986 MovieClip Frame 31
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 986 MovieClip Frame 31
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.player_score";
gamename = "tankedup_4";
saveScore = true;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 986 MovieClip Frame 41
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 986 MovieClip Frame 41
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.player_score";
gamename = "tankedup_5";
saveScore = true;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 986 MovieClip Frame 51
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 986 MovieClip Frame 51
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.player_score";
gamename = "tankedup_6";
saveScore = true;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 986 MovieClip Frame 61
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 986 MovieClip Frame 61
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.player_score";
gamename = "tankedup_7";
saveScore = true;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 986 MovieClip Frame 71
stop();
Instance of Symbol 976 MovieClip "comHighscores" in Symbol 986 MovieClip Frame 71
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.player_score";
gamename = "tankedup_8";
saveScore = true;
scoreIsTime = true;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 1021 MovieClip Frame 1
stop();
Symbol 1021 MovieClip Frame 10
stop();
Symbol 1021 MovieClip Frame 20
stop();
Symbol 1021 MovieClip Frame 30
stop();
Symbol 1021 MovieClip Frame 40
stop();
Symbol 1021 MovieClip Frame 50
stop();
Symbol 1021 MovieClip Frame 60
stop();
Symbol 1021 MovieClip Frame 70
stop();
Symbol 1025 MovieClip Frame 1
stop();
Symbol 1025 MovieClip Frame 2
play();
Symbol 1025 MovieClip Frame 26
var id = Number(this._name.charAt(19));
_root.game_holder.tank_holder.player_tank.finishExplode(id);
stop();
Symbol 1026 MovieClip Frame 1
stop();
Symbol 1026 MovieClip Frame 2
play();
Symbol 1026 MovieClip Frame 26
var tank_name = this._name.slice(0, 9);
_root.game_holder.tank_holder[tank_name].finishExplode();
stop();
Symbol 1027 MovieClip Frame 1
stop();
Symbol 1027 MovieClip Frame 2
play();
Symbol 1027 MovieClip Frame 26
var id = this._name.slice(0, 12);
_root.game_holder.topgraphics_holder[id].finishExplode();
stop();
Symbol 1038 MovieClip Frame 1
stop();
Symbol 1038 MovieClip Frame 6
_root.game_holder.tank_holder.player_tank.endSplash();
Symbol 1038 MovieClip Frame 12
stop();
Symbol 1054 Button
on (press) {
_root.camera_follow = "player_tank";
}
Symbol 1055 Button
on (press) {
_root.camera_follow = "ai_tank_1";
}
Symbol 1056 Button
on (press) {
_root.camera_follow = "ai_tank_2";
}
Symbol 1057 Button
on (press) {
_root.camera_follow = "ai_tank_3";
}
Symbol 1058 Button
on (press) {
_root.camera_follow = "ai_tank_4";
}
Symbol 1059 Button
on (press) {
_root.camera_follow = "ai_tank_5";
}
Symbol 1072 MovieClip Frame 1
stop();
Symbol 1072 MovieClip Frame 5
stop();
Symbol 1072 MovieClip Frame 15
stop();
Symbol 1072 MovieClip Frame 25
stop();
Symbol 1072 MovieClip Frame 35
stop();
Symbol 1072 MovieClip Frame 45
stop();
Symbol 1072 MovieClip Frame 55
stop();
Symbol 1088 MovieClip Frame 20
var tank_name = _root.position_data[5].tank;
var tank_time = _root.position_data[5].total_time;
var exploded = _root.position_data[5].exploded;
tank_6.gotoAndStop(tank_name);
if (tank_name == "player_tank") {
name_6.text = "player";
} else if (tank_name == "ai_tank_1") {
name_6.text = "com1";
} else if (tank_name == "ai_tank_2") {
name_6.text = "com2";
} else if (tank_name == "ai_tank_3") {
name_6.text = "com3";
} else if (tank_name == "ai_tank_4") {
name_6.text = "com4";
} else if (tank_name == "ai_tank_5") {
name_6.text = "com5";
}
if (exploded == true) {
time_6.text = "out of race";
} else {
var millisecs = (tank_time % 1000);
var secs = Math.floor(tank_time / 1000);
var mins = 0;
if (secs >= 60) {
while (secs >= 60) {
secs = secs - 60;
mins++;
}
}
if (secs <= 9) {
var secs_str = String("0" + secs);
} else {
var secs_str = String(secs);
}
if (mins <= 9) {
var mins_str = String("0" + mins);
} else {
var mins_str = String(mins);
}
time_6.text = String(((mins_str + "m ") + secs_str) + "s");
}
Symbol 1088 MovieClip Frame 35
var tank_name = _root.position_data[4].tank;
var tank_time = _root.position_data[4].total_time;
var exploded = _root.position_data[4].exploded;
tank_5.gotoAndStop(tank_name);
if (tank_name == "player_tank") {
name_5.text = "player";
} else if (tank_name == "ai_tank_1") {
name_5.text = "com1";
} else if (tank_name == "ai_tank_2") {
name_5.text = "com2";
} else if (tank_name == "ai_tank_3") {
name_5.text = "com3";
} else if (tank_name == "ai_tank_4") {
name_5.text = "com4";
} else if (tank_name == "ai_tank_5") {
name_5.text = "com5";
}
if (exploded == true) {
time_5.text = "out of race";
} else {
var millisecs = (tank_time % 1000);
var secs = Math.floor(tank_time / 1000);
var mins = 0;
if (secs >= 60) {
while (secs >= 60) {
secs = secs - 60;
mins++;
}
}
if (secs <= 9) {
var secs_str = String("0" + secs);
} else {
var secs_str = String(secs);
}
if (mins <= 9) {
var mins_str = String("0" + mins);
} else {
var mins_str = String(mins);
}
time_5.text = String(((mins_str + "m ") + secs_str) + "s");
}
Symbol 1088 MovieClip Frame 50
var tank_name = _root.position_data[3].tank;
var tank_time = _root.position_data[3].total_time;
var exploded = _root.position_data[3].exploded;
tank_4.gotoAndStop(tank_name);
if (tank_name == "player_tank") {
name_4.text = "player";
} else if (tank_name == "ai_tank_1") {
name_4.text = "com1";
} else if (tank_name == "ai_tank_2") {
name_4.text = "com2";
} else if (tank_name == "ai_tank_3") {
name_4.text = "com3";
} else if (tank_name == "ai_tank_4") {
name_4.text = "com4";
} else if (tank_name == "ai_tank_5") {
name_4.text = "com5";
}
if (exploded == true) {
time_4.text = "out of race";
} else {
var millisecs = (tank_time % 1000);
var secs = Math.floor(tank_time / 1000);
var mins = 0;
if (secs >= 60) {
while (secs >= 60) {
secs = secs - 60;
mins++;
}
}
if (secs <= 9) {
var secs_str = String("0" + secs);
} else {
var secs_str = String(secs);
}
if (mins <= 9) {
var mins_str = String("0" + mins);
} else {
var mins_str = String(mins);
}
time_4.text = String(((mins_str + "m ") + secs_str) + "s");
}
Symbol 1088 MovieClip Frame 65
var tank_name = _root.position_data[2].tank;
var tank_time = _root.position_data[2].total_time;
var exploded = _root.position_data[2].exploded;
tank_3.gotoAndStop(tank_name);
if (tank_name == "player_tank") {
name_3.text = "player";
} else if (tank_name == "ai_tank_1") {
name_3.text = "com1";
} else if (tank_name == "ai_tank_2") {
name_3.text = "com2";
} else if (tank_name == "ai_tank_3") {
name_3.text = "com3";
} else if (tank_name == "ai_tank_4") {
name_3.text = "com4";
} else if (tank_name == "ai_tank_5") {
name_3.text = "com5";
}
if (exploded == true) {
time_3.text = "out of race";
} else {
var millisecs = (tank_time % 1000);
var secs = Math.floor(tank_time / 1000);
var mins = 0;
if (secs >= 60) {
while (secs >= 60) {
secs = secs - 60;
mins++;
}
}
if (secs <= 9) {
var secs_str = String("0" + secs);
} else {
var secs_str = String(secs);
}
if (mins <= 9) {
var mins_str = String("0" + mins);
} else {
var mins_str = String(mins);
}
time_3.text = String(((mins_str + "m ") + secs_str) + "s");
}
Symbol 1088 MovieClip Frame 80
var tank_name = _root.position_data[1].tank;
var tank_time = _root.position_data[1].total_time;
var exploded = _root.position_data[1].exploded;
tank_2.gotoAndStop(tank_name);
if (tank_name == "player_tank") {
name_2.text = "player";
} else if (tank_name == "ai_tank_1") {
name_2.text = "com1";
} else if (tank_name == "ai_tank_2") {
name_2.text = "com2";
} else if (tank_name == "ai_tank_3") {
name_2.text = "com3";
} else if (tank_name == "ai_tank_4") {
name_2.text = "com4";
} else if (tank_name == "ai_tank_5") {
name_2.text = "com5";
}
if (exploded == true) {
time_2.text = "out of race";
} else {
var millisecs = (tank_time % 1000);
var secs = Math.floor(tank_time / 1000);
var mins = 0;
if (secs >= 60) {
while (secs >= 60) {
secs = secs - 60;
mins++;
}
}
if (secs <= 9) {
var secs_str = String("0" + secs);
} else {
var secs_str = String(secs);
}
if (mins <= 9) {
var mins_str = String("0" + mins);
} else {
var mins_str = String(mins);
}
time_2.text = String(((mins_str + "m ") + secs_str) + "s");
}
Symbol 1088 MovieClip Frame 95
var tank_name = _root.position_data[0].tank;
var tank_time = _root.position_data[0].total_time;
var exploded = _root.position_data[0].exploded;
tank_1.gotoAndStop(tank_name);
if (tank_name == "player_tank") {
name_1.text = "player";
} else if (tank_name == "ai_tank_1") {
name_1.text = "com1";
} else if (tank_name == "ai_tank_2") {
name_1.text = "com2";
} else if (tank_name == "ai_tank_3") {
name_1.text = "com3";
} else if (tank_name == "ai_tank_4") {
name_1.text = "com4";
} else if (tank_name == "ai_tank_5") {
name_1.text = "com5";
}
if (exploded == true) {
time_1.text = "out of race";
} else {
var millisecs = (tank_time % 1000);
var secs = Math.floor(tank_time / 1000);
var mins = 0;
if (secs >= 60) {
while (secs >= 60) {
secs = secs - 60;
mins++;
}
}
if (secs <= 9) {
var secs_str = String("0" + secs);
} else {
var secs_str = String(secs);
}
if (mins <= 9) {
var mins_str = String("0" + mins);
} else {
var mins_str = String(mins);
}
time_1.text = String(((mins_str + "m ") + secs_str) + "s");
}
stop();