Frame 1
function goTo() {
getURL ("http://www.MoFunZone.com");
}
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
var theLink = new ContextMenuItem("MoFunZone.com - Play More Games", goTo);
newMenu.customItems.push(theLink);
this.menu = newMenu;
stop();
Frame 2
Frame 4
function mysound(idname) {
mysoundobj = new Sound(this);
mysoundobj.attachSound(idname);
mysoundobj.start();
}
frame = 0;
selectedBtn = "";
stop();
Instance of Symbol 275 MovieClip in Frame 4
onClipEvent (load) {
mus = new Sound(this);
mus.attachSound("mainMenuSong");
i = 0;
}
onClipEvent (enterFrame) {
if (_root._currentframe == 5) {
mus.stop();
} else {
gotoAndStop (1);
if (i < 1) {
mus.start(0, 999);
mus.setVolume(70);
}
i++;
}
}
Frame 5
stop();
_root.mainMenuSong.stop();
_root.chance1 = false;
_root.chance2 = false;
_root.chance3 = false;
_root.chance4 = false;
_root.chance5 = false;
_root.chance6 = false;
_root.clearBots = false;
_root.n = 0;
_root.j = 0;
_root.a = 0;
mgnoteT = 0;
lcnoteT = 0;
_root.rrot = 0;
_root.showMainMenu = false;
_root.showInstructionsOn = true;
_root.del = 0;
_root.deleteMe = false;
_root.bc = 0;
_root.firstReset = 0;
_root.bossHP = 6;
_root.difficultyLevel = new Array();
_root.dieOnce = true;
_root.difficultyLevel[1] = 5;
_root.difficultyLevel[2] = 10;
_root.difficultyLevel[3] = 10;
_root.difficultyLevel[4] = 15;
_root.difficultyLevel[5] = 15;
_root.difficultyLevel[6] = 20;
_root.difficultyLevel[7] = 20;
_root.difficultyLevel[8] = 20;
_root.difficultyLevel[9] = 1;
_root.bossSpawn = new Array();
_root.bossSpawnX[0] = 443;
_root.bossSpawnX[1] = 266;
_root.bossSpawnX[2] = 60;
_root.bossSpawnRand = 0;
_root.difficulty = 1;
_root.spawnVariation = new Array();
_root.spawnVariation[1] = 225;
_root.spawnVariation[2] = 225;
_root.spawnVariation[3] = 180;
_root.spawnVariation[4] = 180;
_root.spawnVariation[5] = 180;
_root.spawnVariation[6] = 150;
_root.spawnVariation[7] = 150;
_root.spawnVariation[8] = 100;
_root.spawnVariation[9] = 85;
_root.xPositions = new Array();
_root.xPositions[1] = 300;
_root.xPositions[2] = 300;
_root.xPositions[3] = 300;
_root.xPositions[4] = 300;
_root.xPositions[5] = 300;
_root.xPositions[6] = 300;
_root.xPositions[7] = 300;
_root.xPositions[8] = 300;
_root.xPositions[9] = 300;
_root.yPositions = new Array();
_root.yPositions[1] = 205;
_root.yPositions[2] = 205;
_root.yPositions[3] = 205;
_root.yPositions[4] = 205;
_root.yPositions[5] = 205;
_root.yPositions[6] = 205;
_root.yPositions[7] = 205;
_root.yPositions[8] = 205;
_root.yPositions[9] = 205;
_root.smokeBits = 0;
_root.b = 0;
resettable = true;
_root.qwe123 = 0;
_root.getNewLife = 0;
_root.level = 1;
_root.doorOpen = true;
_root.kamikazeTime = false;
_root.kamikazeThink = 0;
_root.tagger = 0;
_root.tagger2 = 0;
_root.tagger3 = 0;
_root.decals = true;
_root.score = 0;
_root.fasterReload = false;
_root.powerup = "none";
_root.extra = "none";
_root.i = 0;
_root.lives = 20;
_root.randomSpawn = 100;
_root.frames = 0;
_root.rdx = random(550);
_root.rdy = random(400);
_root.kills = 0;
_root.tank.boost = 4;
_root.shakeIntensity = 2;
_root.gameFinished = false;
_root.y_shake = 0;
_root.x_shake = 0;
_root.lastLevel = 7;
_root.playingGame = false;
_root.boss = false;
_root.tank._x = 275;
_root.tank._y = 200;
_root.selectedWeapon = "missile";
_root.missileEnabled = true;
_root.gunEnabled = false;
_root.laserEnabled = false;
_root.shootingNow = false;
_root.onEnterFrame = function () {
_root.hud.livesDisplay.text = "lives: " + lives;
goFirstTime = function () {
if (_root.showInstructionsOn == true) {
showInstructionsOn = false;
hideMenus();
playingGame = true;
_root.deleteMe = false;
}
};
if (showInstructionsOn == true) {
_root.instructions._visible = true;
_root.instructions._x = 275;
_root.instructions._y = 200;
} else {
_root.instructions._visible = false;
}
if (frame == 1) {
frames++;
if (del < 5) {
del = 1;
_root.deleteMe = false;
} else {
del = 0;
}
_root.hud.reload._xscale = _root.tank.gunTimer * (100 / _root.tank.gunTimerMax);
_root.hud.framesPerSec.text = Math.round((frames / getTimer()) * 1000);
if (difficulty < 4) {
_root.missileEnabled = true;
}
if (difficulty >= 3) {
_root.gunEnabled = true;
if (tagger < 1) {
_root.selectedWeapon = "gun";
_root.mgnote.play();
tagger = 3;
}
}
if (difficulty == 6) {
_root.laserEnabled = true;
if (tagger2 < 1) {
_root.selectedWeapon = "laser";
_root.hud.lcnote.play();
tagger2 = 3;
}
}
if (difficulty == 7) {
_root.laserEnabled = false;
if (tagger3 < 1) {
_root.selectedWeapon = "gun";
tagger3 = 3;
}
}
if (lives > 0) {
dieOnce = true;
}
if (lives < 0) {
lives = 0;
}
if (lives == 0) {
if (dieOnce == true) {
trace("AAAAAAAAAAAAAAAAAAAA");
_root.nukeHere(_root.tank._x, _root.tank._y);
tank.die();
dieOnce = false;
}
lives = 0;
}
removeDamage = function () {
deleteMe = true;
};
displayComplete = function (levelDone, levelKills) {
_root.barriers._visible = false;
_root.nextStep.play();
_root.b++;
_root.env.attachMovie("totalBlock", "totalBlock" + _root.b, _root.b + 10000);
clearBots = true;
_root.levelComplete._visible = true;
_root.levelComplete._x = 275;
_root.levelComplete._y = 200;
_root.levelComplete.theLevel.text = ("Level " + levelDone) + " Complete!";
_root.levelComplete.theKills.text = levelKills + " Tanks destroyed!";
};
hideMenus = function () {
_root.levelComplete._visible = false;
_root.gameOver._visible = false;
_root.gameOver.gotoAndStop(1);
_root.youWin._visible = false;
_root.instructions._visible = false;
};
displayGameOver = function (bossStatus) {
_root.barriers._visible = false;
if (bossStatus == false) {
_root.b++;
_root.env.attachMovie("totalBlock", "totalBlock", _root.b + 10000);
clearBots = true;
_root.gameOver._visible = true;
_root.gameOver._x = 275;
_root.gameOver._y = 200;
} else {
_root.b++;
_root.env.attachMovie("totalBlock", "totalBlock", _root.b + 10000);
clearBots = true;
_root.gameOver._visible = true;
_root.gameOver._x = 275;
_root.gameOver._y = 200;
_root.gameOver.gotoAndStop(2);
_root.gameOver.youKilled.text = ("You destroyed " + _root.kills) + " tanks.";
}
};
displayYouWin = function () {
_root.barriers._visible = false;
clearBots = true;
_root.youWin.creds.gotoAndPlay(2);
_root.youWin._visible = true;
_root.youWin._x = 275;
_root.youWin._y = 200;
_root.youWin.theLevel.text = ("You destroyed " + _root.kills) + " tanks!";
};
resetInits = function () {
clearBots = false;
_root.deleteMe = true;
_root.nextStep.gotoAndStop(1);
_root.levelComplete._visible = false;
_root.gameOver._visible = false;
_root.tank._x = xPositions[difficulty];
_root.tank._y = yPositions[difficulty];
_root.kills = 0;
trace("Kills: " + kills);
trace("BEEN TOLD TO RESET");
};
if (playingGame == true) {
_root.randomSpawn = _root.spawnVariation[difficulty];
if (_root.boss == false) {
if (_root.kills >= difficultyLevel[difficulty]) {
displayComplete(difficulty, kills);
playingGame = false;
}
if (difficulty != _root.lastLevel) {
_root.hud.killText.text = "kills to go: " + Number(difficultyLevel[difficulty] - _root.kills);
_root.env.gotoAndStop(difficulty + 1);
} else {
_root.hud.killText.text = "kills: " + _root.kills;
boss = true;
_root.env.gotoAndStop(8);
resetInits();
trace("BOSS TIME");
_root.hud.bhp._visible = true;
}
if ((((random(randomSpawn) == 10) || (random(randomSpawn) == 50)) || (random(randomSpawn) == 68)) || (random(randomSpawn) == 35)) {
trace(_root.randomSpawn);
j++;
kamikazeThink = random(10);
if (kamikazeThink == 5) {
kamikazeTime = true;
} else {
kamikazeTime = false;
}
if (kamikazeTime == false) {
rnd = random(4);
if (rnd == 0) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:1, _y:random(400) + 1});
} else if (rnd == 1) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:550, _y:random(400) + 1});
} else if (rnd == 2) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:random(550) + 1, _y:1});
} else if (rnd == 3) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:random(550) + 1, _y:400});
}
} else {
rnd = random(4);
if (rnd == 0) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"kill", _x:1, _y:random(400) + 1});
} else if (rnd == 1) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"kill", _x:550, _y:random(400) + 1});
} else if (rnd == 2) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"kill", _x:random(550) + 1, _y:1});
} else if (rnd == 3) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"kill", _x:random(550) + 1, _y:400});
}
}
}
} else {
_root.hud.killText.text = "kills: " + _root.kills;
_root.env.gotoAndStop(10);
if (_root.doorOpen == true) {
if ((((random(randomSpawn) == 10) || (random(randomSpawn) == 50)) || (random(randomSpawn) == 45)) || (random(randomSpawn) == 30)) {
j++;
_root.shaker.play();
bossSpawnRnd = random(3);
if (bossSpawnRnd == 0) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:465, _y:87});
}
if (bossSpawnRnd == 1) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:277, _y:87});
}
if (bossSpawnRnd == 2) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:81, _y:87});
}
}
}
}
}
}
if (frame == 2) {
_root.hud.reload._xscale = _root.tank.gunTimer * (100 / _root.tank.gunTimerMax);
if ((kills >= 20) && (kills < 40)) {
_root.gunEnabled = true;
if (tagger < 1) {
_root.selectedWeapon = "gun";
_root.mgnote.gotoAndPlay(2);
tagger = 3;
}
} else if (kills >= 40) {
_root.laserEnabled = true;
if (tagger2 < 1) {
_root.selectedWeapon = "laser";
_root.hud.lcnote.gotoAndPlay(2);
tagger2 = 3;
}
}
hideMenus = function () {
_root.levelComplete._visible = false;
_root.gameOver._visible = false;
_root.gameOver.gotoAndStop(1);
_root.youWin._visible = false;
_root.instructions._visible = false;
};
if (lives > 0) {
dieOnce = true;
}
if (lives < 0) {
lives = 0;
}
if (lives == 0) {
if (dieOnce == true) {
trace("SSSSSSSSSSSSSSSSS");
_root.nukeHere(_root.tank._x, _root.tank._y);
tank.die();
dieOnce = false;
}
lives = 0;
}
removeDamage = function () {
deleteMe = true;
};
displayGameOver = function () {
_root.b++;
_root.env.attachMovie("totalBlock", "totalBlock", _root.b + 10000);
clearBots = true;
_root.gameOver._visible = true;
_root.gameOver._x = 275;
_root.gameOver._y = 200;
_root.gameOver.gotoAndStop(3);
_root.gameOver.youKilled.text = ("You destroyed " + _root.kills) + " tanks.";
};
resetInits = function () {
clearBots = false;
_root.deleteMe = true;
_root.levelComplete._visible = false;
_root.gameOver._visible = false;
_root.tank._x = 275;
_root.tank._y = 200;
_root.kills = 0;
trace("Kills: " + kills);
trace("BEEN TOLD TO RESET");
};
if (playingGame == true) {
if (firstReset < 5) {
_root.randomSpawn = 300;
_root.deleteMe = false;
firstReset++;
}
if (randomSpawn > 55) {
_root.randomSpawn = _root.randomSpawn - 0.3;
} else {
randomSpawn = 55;
}
_root.hud.killText.text = "kills: " + _root.kills;
if (resettable == true) {
resetInits();
resettable = false;
}
if (random(randomSpawn) == random(randomSpawn)) {
trace("RAND" + randomSpawn);
j++;
kamikazeThink = random(10);
if (kamikazeThink == 5) {
kamikazeTime = true;
} else {
kamikazeTime = false;
}
if (kamikazeTime == false) {
rnd = random(4);
if (rnd == 0) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:1, _y:random(400) + 1});
} else if (rnd == 1) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:550, _y:random(400) + 1});
} else if (rnd == 2) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:random(550) + 1, _y:1});
} else if (rnd == 3) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"tank", _x:random(550) + 1, _y:400});
}
} else {
rnd = random(4);
if (rnd == 0) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"kill", _x:1, _y:random(400) + 1});
} else if (rnd == 1) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"kill", _x:550, _y:random(400) + 1});
} else if (rnd == 2) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"kill", _x:random(550) + 1, _y:1});
} else if (rnd == 3) {
_root.attachMovie("bot", "bot" + j, 1000 + j, {focus:"kill", _x:random(550) + 1, _y:400});
}
}
}
}
}
nukeHere = function (nuke_x, nuke_y) {
rrot = random(360);
n++;
_root.attachMovie("scorchMC", "scorch" + n, n, {_x:nuke_x, _y:nuke_y, _rotation:rrot});
n++;
_root.attachMovie("nuke", "nuke" + n, n, {_x:nuke_x, _y:nuke_y, _rotation:rrot});
};
flashHere = function (flash_x, flash_y) {
a++;
_root.attachMovie("flash", "flash" + a, a, {_x:flash_x, _y:flash_y});
};
hitTank = function (t_x, t_y, r) {
a++;
_root.attachMovie("tankFlash", "tankFlash" + a, a + 1000000000, {_x:t_x, _y:t_y, _rotation:r});
};
};
resetInits();
hideMenus();
displayInstructions();
Instance of Symbol 287 MovieClip "env" in Frame 5
onClipEvent (enterFrame) {
this.swapDepths(-99);
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
}
Instance of Symbol 299 MovieClip "bossStructure" in Frame 5
onClipEvent (enterFrame) {
if (_root.boss == true) {
_visible = true;
shootTank = function (who) {
if (who == 1) {
_root.turret.muzzle.explode.play();
invX = _root.turret._x + (40 * Math.sin(((_root.turret.angle + 90) / 180) * Math.PI));
invY = _root.turret._y - (40 * Math.cos(((_root.turret.angle + 90) / 180) * Math.PI));
angle = (_root.turret.angle + random(30)) - random(30);
_root.i++;
_root.attachMovie("missile", "emissile" + _root.i, _root.i + 100, {_rotation:angle, _x:invX, _y:invY, style:"missile"});
} else if (who == 2) {
_root.turret2.muzzle.explode.play();
invX = _root.turret2._x + (40 * Math.sin(((_root.turret2.angle + 90) / 180) * Math.PI));
invY = _root.turret2._y - (40 * Math.cos(((_root.turret2.angle + 90) / 180) * Math.PI));
angle = (_root.turret2.angle + random(30)) - random(30);
_root.i++;
_root.attachMovie("missile", "emissile" + _root.i, _root.i + 100, {_rotation:angle, _x:invX, _y:invY, style:"missile"});
}
};
if ((_root.bossHP > 0) && (_root.tank.alive == true)) {
shotnum = random(40);
if (shotnum == 32) {
shootTank(1);
}
if (shotnum == 33) {
shootTank(2);
}
}
if (_root.bossHP <= 0) {
_root.playingGame = false;
_root.finalExplosion.go = true;
_root.clearBots = true;
_root.gameFinished = true;
_root.music.theme.stop();
this.swapDepths(101);
} else {
this.swapDepths(10000000000);
}
} else {
_visible = false;
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
}
Instance of Symbol 301 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.boss == true) {
_visible = true;
this.swapDepths(100);
} else {
_visible = false;
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
}
Instance of Symbol 313 MovieClip "turret" in Frame 5
onClipEvent (enterFrame) {
if (_root.boss == true) {
_visible = true;
this.swapDepths(10000000048);
} else {
_visible = false;
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
}
Instance of Symbol 313 MovieClip "turret2" in Frame 5
onClipEvent (enterFrame) {
if (_root.boss == true) {
_visible = true;
this.swapDepths(10000000051);
} else {
_visible = false;
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
}
Instance of Symbol 320 MovieClip "patterns" in Frame 5
onClipEvent (enterFrame) {
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
this.swapDepths(-100);
gotoAndStop(_root.env._currentframe);
}
Instance of Symbol 322 MovieClip "barriers" in Frame 5
onClipEvent (enterFrame) {
if (_root.frame == 1) {
gotoAndStop(_root.env._currentframe);
this.swapDepths(10000000180);
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
} else if ((_root.frame = 2)) {
this.swapDepths(10000000180);
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
}
}
Instance of Symbol 326 MovieClip "aimer" in Frame 5
onClipEvent (load) {
this.swapDepths(10000000190);
_root.menuuu.dragger.stopDrag();
this.startDrag(true);
}
onClipEvent (enterFrame) {
Mouse.hide();
}
Instance of Symbol 342 MovieClip "tank" in Frame 5
onClipEvent (load) {
speed = 0;
dirAngle = 0;
i = 0;
e = 0;
c = 0;
v = 0;
enginePlay = false;
alive = true;
boost = 0;
gunTimer = gunTimerMax;
gunTimerMax = 20;
sideWinder = true;
playEngine = function () {
_root.engineer.gotoAndStop(2);
};
stopEngine = function () {
_root.engineer.gotoAndStop(1);
};
}
onClipEvent (enterFrame) {
if (alive == true) {
_visible = true;
_root.removeMovieClip(_root.tankExplosionSET);
} else {
_visible = false;
}
if (_root.gameFinished == true) {
trace("end Tank");
} else if (_root.gameFinished == false) {
boost = (speed / 2) + speed;
if (speed != 0) {
playEngine();
} else {
stopEngine();
}
go = speed + boost;
if ((_root.selectedWeapon == "missile") || (_root.selectedWeapon == "laser")) {
if (_root.selectedWeapon == "missile") {
turret.gotoAndStop(1);
}
if (_root.selectedWeapon == "laser") {
turret.gotoAndStop(3);
}
gunTimerMax = 20;
} else {
gunTimerMax = 6;
turret.gotoAndStop(2);
}
if (gunTimer == gunTimerMax) {
turret.laserReload.gotoAndStop(1);
} else {
turret.laserReload.gotoAndStop(2);
}
this.swapDepths(100000);
if (alive == true) {
if ((_root.env.hitTest(this._x, this._y, true) == false) || ((_root.playingGame == true) && (_root.barriers.hitTest(this._x, this._y, true) == true))) {
if (Key.isDown(83)) {
go = 2;
} else {
go = -2;
}
} else {
}
var dx = (_root.aimer._x - _x);
var dy = (_root.aimer._y - _y);
var angle = Math.atan2(dy, dx);
rot = (angle * 180) / Math.PI;
shoot = function (r, type) {
if (type == "missile") {
i++;
_root.attachMovie("missile", "missile" + i, i, {_rotation:r, _x:this._x, _y:this._y, sidewinder:true, style:"missile"});
}
if (type == "gun") {
i++;
_root.attachMovie("missile", "missile" + i, i, {_rotation:(r + random(10)) - random(10), _x:this._x, _y:this._y, sidewinder:false, style:"gun"});
}
if (type == "laser") {
i++;
_root.attachMovie("laserBeam", "laserBeam" + i, i, {_rotation:r, _x:this._x, _y:this._y});
trace("SHOT LASER!!! " + i);
}
_root.mysound("cannon");
turret.explode.gotoAndPlay(2);
};
die = function () {
trace("TTTTTTTTTTTTTTTTT");
this.swapDepths(100000000);
_root.engineer.gotoAndStop(1);
engineSound.stop();
alive = false;
_root.displayGameOver(_root.boss);
_root.playingGame = false;
};
if (dirAngle > 359) {
dirAngle = 0;
}
if (dirAngle < 0) {
dirAngle = 359;
}
if (Key.isDown(65)) {
dirAngle = dirAngle - 5;
}
if (Key.isDown(68)) {
dirAngle = dirAngle + 5;
}
if (Key.isDown(87)) {
speed = 1;
} else if (Key.isDown(83)) {
speed = -0.5;
} else {
speed = 0;
}
dirAngleRad = dirAngle * (Math.PI/180);
xMov = go * Math.cos(dirAngleRad);
yMov = go * Math.sin(dirAngleRad);
this._x = this._x + (xMov + _root.x_shake);
this._y = this._y + (yMov + _root.y_shake);
var tdx = (_root.aimer._x - _x);
var tdy = (_root.aimer._y - _y);
var tangle = Math.atan2(dy, dx);
turret._rotation = (tangle * 180) / Math.PI;
this.body._rotation = dirAngle;
startTimingGun = function () {
if (gunTimer < gunTimerMax) {
gunTimer++;
} else {
gunTimer = gunTimerMax;
}
};
e = 0;
while (e < (_root.i + 3)) {
if (this.hitTest(_root["emissile" + e]._x, _root["emissile" + e]._y, false) == true) {
_root.nukeHere(_x, _y);
_root.lives--;
removeMovieClip(_root["emissile" + e]);
_root.shaker.play();
}
e++;
}
startTimingGun();
}
if (_y >= 386) {
_y = 386;
}
if (_root.boss == false) {
if (_y <= 18) {
_y = 18;
}
} else if (_y <= 138) {
_y = 138;
}
if (_x <= 16) {
_x = 16;
}
if (_root.playingGame == true) {
if (_x >= 531) {
_x = 531;
}
} else if (_root.boss == true) {
if (_x >= 531) {
_x = 531;
}
} else if (_root.showInstructionsOn == true) {
if (_x >= 531) {
_x = 531;
}
} else if (_x >= 550) {
_x = 275;
_root.difficulty++;
_root.playingGame = true;
_root.resetInits();
_root.lives++;
}
}
}
onClipEvent (mouseDown) {
_root.shootingNow = true;
if (_root.gameFinished == true) {
} else if (alive == true) {
if (_root.shootingNow == true) {
if (_root.selectedWeapon == "gun") {
this.onEnterFrame = function () {
turret.machineMuzzle.play();
startTimingGun();
if (gunTimer == gunTimerMax) {
this.shoot(rot, _root.selectedWeapon);
gunTimer = 0;
startTimingGun();
}
};
} else if (_root.selectedWeapon != "gun") {
turret.machineMuzzle.gotoAndStop(1);
startTimingGun();
if (gunTimer == gunTimerMax) {
this.shoot(rot, _root.selectedWeapon);
gunTimer = 0;
startTimingGun();
}
}
}
}
}
onClipEvent (mouseUp) {
delete this.onEnterFrame;
turret.machineMuzzle.gotoAndStop(1);
_root.shootingNow = false;
}
Instance of Symbol 344 MovieClip "engineer" in Frame 5
onClipEvent (load) {
engineSound = new Sound(this);
engineSound.attachSound("diesel");
}
onClipEvent (enterFrame) {
if (_root.gameFinished == true) {
gotoAndStop (1);
}
}
Instance of Symbol 361 MovieClip "levelComplete" in Frame 5
onClipEvent (load) {
_visible = false;
this.swapDepths(-70);
}
Instance of Symbol 377 MovieClip "gameOver" in Frame 5
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
this.swapDepths(10000000092);
if (_visible == true) {
_root.hiscores = true;
} else {
_root.hiscores = false;
}
}
Instance of Symbol 378 MovieClip "youWin" in Frame 5
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
this.swapDepths(10000000090);
}
Instance of Symbol 392 MovieClip "instructions" in Frame 5
onClipEvent (load) {
_visible = false;
this.swapDepths(-80);
}
Instance of Symbol 344 MovieClip "music" in Frame 5
onClipEvent (load) {
theme = new Sound(this);
theme.attachSound("song");
i = 0;
}
onClipEvent (enterFrame) {
gotoAndStop (1);
if (i < 1) {
theme.start(0, 999);
theme.setVolume(70);
}
i++;
}
Instance of Symbol 272 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.showMainMenu == true) {
this._visible = true;
this.swapDepths(10000000019);
} else {
this._visible = false;
}
}
Instance of Symbol 408 MovieClip "nextStep" in Frame 5
onClipEvent (enterFrame) {
if (_root.boss == true) {
this.swapDepths(10000000001);
} else {
swapDepths(100000000);
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
}
Instance of Symbol 437 MovieClip "hud" in Frame 5
onClipEvent (enterFrame) {
if (_root.boss == true) {
this.swapDepths(10000000003);
} else {
swapDepths(10000000);
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
}
Instance of Symbol 461 MovieClip "finalExplosion" in Frame 5
onClipEvent (load) {
go = false;
gone = false;
}
onClipEvent (enterFrame) {
this.swapDepths(10000000080);
if ((go == true) && (gone == false)) {
gone = true;
play();
}
}
Instance of Symbol 465 MovieClip "mgnote" in Frame 5
onClipEvent (enterFrame) {
this.swapDepths(10000010003);
}
Symbol 26 MovieClip Frame 11
_parent.gotoAndStop(2);
Symbol 36 MovieClip Frame 1
this.onEnterFrame = function () {
bytesloaded = Math.round(_root.getBytesLoaded());
bytestotal = Math.round(_root.getBytesTotal());
percent = bytesloaded / bytestotal;
barmask._xscale = percent * 100;
};
Symbol 68 MovieClip Frame 1
if (Math.random() > 0.5) {
_xscale = (-_xscale);
_x = (_x - _parent.shiftamt);
}
Symbol 68 MovieClip Frame 90
if (_parent.isloaded) {
_parent.gotoAndStop(10);
} else {
thenextframe = Math.ceil(Math.random() * 8) + 1;
if (thenextframe == _parent._currentframe) {
_parent.nextFrame();
} else {
_parent.gotoAndStop(thenextframe);
}
}
Symbol 79 MovieClip Frame 1
if (Math.random() > 0.5) {
_xscale = (-_xscale);
_x = (_x - _parent.shiftamt);
}
Symbol 79 MovieClip Frame 90
if (_parent.isloaded) {
_parent.gotoAndStop(10);
} else {
thenextframe = Math.ceil(Math.random() * 8) + 1;
if (thenextframe == _parent._currentframe) {
_parent.nextFrame();
} else {
_parent.gotoAndStop(thenextframe);
}
}
Symbol 87 MovieClip Frame 1
if (Math.random() > 0.5) {
_xscale = (-_xscale);
_x = (_x - _parent.shiftamt);
}
Symbol 87 MovieClip Frame 90
if (_parent.isloaded) {
_parent.gotoAndStop(10);
} else {
thenextframe = Math.ceil(Math.random() * 8) + 1;
if (thenextframe == _parent._currentframe) {
_parent.nextFrame();
} else {
_parent.gotoAndStop(thenextframe);
}
}
Symbol 95 MovieClip Frame 1
if (Math.random() > 0.5) {
_xscale = (-_xscale);
_x = (_x - _parent.shiftamt);
}
Symbol 95 MovieClip Frame 90
if (_parent.isloaded) {
_parent.gotoAndStop(10);
} else {
thenextframe = Math.ceil(Math.random() * 8) + 1;
if (thenextframe == _parent._currentframe) {
_parent.nextFrame();
} else {
_parent.gotoAndStop(thenextframe);
}
}
Symbol 103 MovieClip Frame 1
if (Math.random() > 0.5) {
_xscale = (-_xscale);
_x = (_x - _parent.shiftamt);
}
Symbol 103 MovieClip Frame 90
if (_parent.isloaded) {
_parent.gotoAndStop(10);
} else {
thenextframe = Math.ceil(Math.random() * 8) + 1;
if (thenextframe == _parent._currentframe) {
_parent.nextFrame();
} else {
_parent.gotoAndStop(thenextframe);
}
}
Symbol 111 MovieClip Frame 1
if (Math.random() > 0.5) {
_xscale = (-_xscale);
_x = (_x - _parent.shiftamt);
}
Symbol 111 MovieClip Frame 90
if (_parent.isloaded) {
_parent.gotoAndStop(10);
} else {
thenextframe = Math.ceil(Math.random() * 8) + 1;
if (thenextframe == _parent._currentframe) {
_parent.nextFrame();
} else {
_parent.gotoAndStop(thenextframe);
}
}
Symbol 119 MovieClip Frame 1
if (Math.random() > 0.5) {
_xscale = (-_xscale);
_x = (_x - _parent.shiftamt);
}
Symbol 119 MovieClip Frame 90
if (_parent.isloaded) {
_parent.gotoAndStop(10);
} else {
thenextframe = Math.ceil(Math.random() * 8) + 1;
if (thenextframe == _parent._currentframe) {
_parent.nextFrame();
} else {
_parent.gotoAndStop(thenextframe);
}
}
Symbol 127 MovieClip Frame 1
if (Math.random() > 0.5) {
_xscale = (-_xscale);
_x = (_x - _parent.shiftamt);
}
Symbol 127 MovieClip Frame 90
if (_parent.isloaded) {
_parent.gotoAndStop(10);
} else {
thenextframe = Math.ceil(Math.random() * 8) + 1;
if (thenextframe == _parent._currentframe) {
_parent.gotoAndStop(2);
} else {
_parent.gotoAndStop(thenextframe);
}
}
Symbol 134 MovieClip Frame 133
_root.gotoAndStop(4);
Symbol 135 MovieClip Frame 1
stop();
_root.stop();
shiftamt = 17;
isloaded = false;
this.onEnterFrame = function () {
bytesloaded = Math.round(_root.getBytesLoaded());
bytestotal = Math.round(_root.getBytesTotal());
percent = bytesloaded / bytestotal;
if (bytesloaded == bytestotal) {
isloaded = true;
}
};
this.onRelease = function () {
getURL ("http://www.mofunzone.com/", "_blank");
};
Symbol 137 MovieClip [laserHole] Frame 1
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
if (_root.deleteMe == true) {
removeMovieClip(this);
}
};
Symbol 144 MovieClip [laserBeam] Frame 1
this.onEnterFrame = function () {
if (_root.deleteMe == true) {
trace("deleteMe == true");
removeMovieClip(this);
}
};
Symbol 144 MovieClip [laserBeam] Frame 3
if (_root.boss == false) {
_root.b++;
_root.env.attachMovie("laserHole", "bombMark" + _root.b, _root.b + 10000, {_x:this._x, _y:this._y, _rotation:_rotation});
}
o = 0;
while (o < _root.j) {
if (this.hitTest(_root.patterns._x, _root.patterns._y, true) == true) {
} else if (this.hitTest(_root["bot" + o]._x, _root["bot" + o]._y, true) == true) {
_root.nukeHere(_root["bot" + o]._x, _root["bot" + o]._y);
_root["bot" + o].removeMovieClip();
_root.shaker.play();
_root.kills++;
if (_root.frame == 1) {
if (_root.getNewLife < 6) {
_root.getNewLife++;
} else {
_root.lives++;
_root.getNewLife = 0;
}
}
}
o++;
}
Symbol 144 MovieClip [laserBeam] Frame 6
stop();
removeMovieClip(this);
Symbol 145 MovieClip [totalBlock] Frame 1
this.onEnterFrame = function () {
if (_root.deleteMe == true) {
removeMovieClip(this);
}
};
stop();
Symbol 148 MovieClip [smokeBit] Frame 1
this.cacheAsBitmap = true;
trace("ad" + this.cacheAsBitmap);
timer = 100;
this.onEnterFrame = function () {
if (timer < 0) {
this.swapDepths(0);
removeMovieClip(this);
delete this.onEnterFrame;
} else {
timer = timer - 20;
}
};
Symbol 152 MovieClip [shakeness] Frame 1
_root.x_shake = 0;
_root.y_shake = 0;
stop();
Symbol 152 MovieClip [shakeness] Frame 2
_root.x_shake = -5;
_root.y_shake = 5;
Symbol 152 MovieClip [shakeness] Frame 3
_root.x_shake = 5;
_root.y_shake = 5;
Symbol 152 MovieClip [shakeness] Frame 4
_root.x_shake = -4;
_root.y_shake = -5;
Symbol 152 MovieClip [shakeness] Frame 5
_root.x_shake = 4;
_root.y_shake = -5;
Symbol 152 MovieClip [shakeness] Frame 6
_root.x_shake = -3;
_root.y_shake = 4;
Symbol 152 MovieClip [shakeness] Frame 7
_root.x_shake = 3;
_root.y_shake = 4;
Symbol 152 MovieClip [shakeness] Frame 8
_root.x_shake = -2;
_root.y_shake = -4;
Symbol 152 MovieClip [shakeness] Frame 9
_root.x_shake = 2;
_root.y_shake = -4;
Symbol 152 MovieClip [shakeness] Frame 10
_root.x_shake = 0;
_root.y_shake = 0;
Symbol 162 MovieClip Frame 10
stop();
removeMovieClip(this);
Symbol 185 MovieClip Frame 23
stop();
Symbol 186 MovieClip [nuke] Frame 1
_root.mysound("explode");
_root.tank.swapDepths(1000000000);
this.onEnterFrame = function () {
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
if (_root.clearBots == true) {
_alpha = (_alpha - 10);
if (_alpha <= 0) {
this.removeMovieClip();
}
} else {
_alpha = 100;
}
};
Symbol 186 MovieClip [nuke] Frame 25
stop();
this.swapDepths(10);
trace("removed" + this);
removeMovieClip(this);
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 2
this.cacheAsBitmap = true;
Symbol 190 MovieClip [missile] Frame 1
q = 0;
accel = 0;
s = 0;
if (this.sidewinder == true) {
trace("TANK SHOT");
} else {
this.cacheAsBitmap = true;
}
sc = 0;
sideWinderOn = true;
qwe = 0;
this.onEnterFrame = function () {
if (style == "missile") {
internal._alpha = 100;
accelerate = true;
qwe = 5;
internal.gotoAndStop(1);
}
if (style == "gun") {
internal._alpha = 100;
qwe = 5;
internal.gotoAndStop(2);
}
if (style == "laser") {
accelerate = false;
qwe = 0;
internal.gotoAndStop(3);
}
if (_root.clearBots == true) {
this.removeMovieClip();
} else {
_alpha = 100;
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
if ((_x > 570) || (_x < -20)) {
this.removeMovieClip();
}
if ((_y > 420) || (_y < -20)) {
this.removeMovieClip();
}
if (_root.barriers.hitTest(this._x, this._y, true) == true) {
_root.mysound("envhit");
_root.flashHere(_x, _y);
this.removeMovieClip();
}
if (_root.env.hitTest(this._x, this._y, true) == false) {
_root.mysound("envhit");
if (_root.boss == false) {
if (this.style != "gun") {
_root.b++;
_root.env.attachMovie("bombMark", "bombMark" + _root.b, _root.b + 10000, {_x:this._x, _y:this._y});
} else {
_root.b++;
_root.env.attachMovie("bombMark", "bombMark" + _root.b, _root.b + 10000, {_x:this._x, _y:this._y, _xscale:80, _yscale:80});
}
_root.flashHere(_x, _y);
}
this.removeMovieClip();
} else {
if (accelerate == true) {
accel = accel + 1;
} else {
accel = 0;
}
this.gotoAndStop(1);
this.speed = qwe + accel;
}
if ((_root.bossStructure.bossDoor.hitTest(this._x, this._y, true) == true) && (_root.boss == true)) {
if (_root.doorOpen == true) {
trace("DOOR HIT");
_root.mysound("envhit");
if (_root.chance == 1) {
if (_root.chance1 == false) {
_root.chance1 = true;
_root.bossHP--;
}
}
if (_root.chance == 2) {
if (_root.chance2 == false) {
_root.chance2 = true;
_root.bossHP--;
}
}
if (_root.chance == 3) {
if (_root.chance3 == false) {
_root.chance3 = true;
_root.bossHP--;
}
}
if (_root.chance == 4) {
if (_root.chance4 == false) {
_root.chance4 = true;
_root.bossHP--;
}
}
if (_root.chance == 5) {
if (_root.chance5 == false) {
_root.chance5 = true;
_root.bossHP--;
}
}
if (_root.chance == 6) {
if (_root.chance6 == false) {
_root.chance6 = true;
_root.bossHP--;
}
}
_root.bossStructure.whiteFlash.gotoAndPlay(2);
trace(_root.bossHP);
}
this.removeMovieClip();
_root.tank.i--;
}
if (sidewinder == true) {
if (style == "missile") {
if (_root.j < 6) {
_root.smokeBits++;
_root.attachMovie("smokeBit", "smokeBit" + _root.smokeBits, _root.smokeBits + 10000000000000, {_x:this._x, _y:this._y});
}
}
if (sidewinderON == true) {
s = s + 5;
_rotation = (_rotation + 5);
if (s > 10) {
sidewinderON = false;
}
} else {
s = s - 5;
_rotation = (_rotation - 5);
if (s < -10) {
sidewinderON = true;
}
}
} else {
accelerate = true;
s = 0;
}
xSpeed = this.speed * Math.sin(((_rotation + 90) * Math.PI) / 180);
ySpeed = this.speed * Math.cos(((_rotation + 90) * Math.PI) / 180);
_y = (_y - ySpeed);
_x = (_x + xSpeed);
};
stop();
Symbol 195 MovieClip [fps] Frame 1
fps = 30;
var timeinit = new Date();
var lasttime = timeinit.getMilliseconds();
this.onEnterFrame = function () {
var _local1 = new Date();
timepassed = (((_local1.getMilliseconds() - lasttime) >= 0) ? (_local1.getMilliseconds() - lasttime) : (1000 + (_local1.getMilliseconds() - lasttime)));
fps = Math.round(10000 / timepassed) / 10;
lasttime = _local1.getMilliseconds();
};
Symbol 198 MovieClip [flash] Frame 1
Symbol 198 MovieClip [flash] Frame 10
stop();
removeMovieClip(this);
Symbol 209 MovieClip Frame 1
stop();
Symbol 210 MovieClip [bot] Frame 1
speed = 0.9;
rotMove = 90;
rotMove2 = 90;
time = 0;
stepback = 0;
hp = 100;
shoot = function (r) {
_root.i++;
_root.mysound("cannon");
_root.attachMovie("missile", "emissile" + _root.i, _root.i + 100, {_rotation:r, _x:_x, _y:_y, style:"missile"});
};
this.onEnterFrame = function () {
if ((_x <= 20) && (_y <= 20)) {
this.removeMovieClip();
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
if (_root.clearBots == true) {
_alpha = (_alpha - 10);
if (_alpha <= 0) {
this.removeMovieClip();
}
} else {
_alpha = 100;
}
checkHit = function () {
if (((_root.env.hitTest(this._x, this._y, true) == false) && (_root.boss == false)) || (_root.barriers.hitTest(this._x, this._y, true) == true)) {
if (focus == "tank") {
focus = "self";
}
if (focus == "kill") {
_root.shaker.play();
removeMovieClip(this);
}
}
if ((_root.bossStructure.hitTest(this._x, this._y, true) == true) && (_root.boss == true)) {
if (focus == "tank") {
focus = "straight";
}
} else if ((_root.bossStructure.hitTest(this._x, this._y, true) == false) && (_root.boss == true)) {
focus = "tank";
}
};
checkHit();
this.swapDepths(100);
if (focus == "tank") {
inner.gotoAndStop(1);
rotMove = 90;
rotMove2 = 90;
time = 0;
speed = 0.9;
stepback = 0;
if (_root.tank.alive == false) {
angle = 90;
} else {
var _local4 = _root.tank._x - this._x;
var _local3 = _root.tank._y - this._y;
var angle = Math.atan2(_local3, _local4);
}
rot = (angle * 180) / Math.PI;
xMov = speed * Math.cos(angle);
yMov = speed * Math.sin(angle);
this._x = this._x + xMov;
this._y = this._y + yMov;
_rotation = rot;
shotnum = random(80);
if (shotnum == 32) {
trace("shot");
shoot(rot);
}
} else if (focus == "self") {
inner.gotoAndStop(1);
if (stepback < 50) {
this._x = this._x + (-xMov);
this._y = this._y + (-yMov);
stepback++;
} else if (rotMove > 0) {
rotMove = rotMove - 5;
_rotation = (_rotation + 5);
} else if (rotMove <= 0) {
if (time < 50) {
speed = 0.9;
xMov = speed * Math.cos(_rotation - rot);
yMov = speed * Math.sin(_rotation - rot);
this._x = this._x + (-xMov);
this._y = this._y + (-yMov);
time++;
checkHit();
} else if (rotMove2 > 0) {
rotMove2 = rotMove2 - 5;
_rotation = (_rotation - 5);
} else {
focus = "tank";
speed = 0.9;
}
}
} else if (focus == "kill") {
inner.gotoAndStop(2);
speed = 10;
if (_root.tank.alive == false) {
angle = 90;
} else {
var _local4 = _root.tank._x - this._x;
var _local3 = _root.tank._y - this._y;
var angle = Math.atan2(_local3, _local4);
}
rot = (angle * 180) / Math.PI;
xMov = speed * Math.cos(angle);
yMov = speed * Math.sin(angle);
this._x = this._x + xMov;
this._y = this._y + yMov;
_rotation = rot;
} else if (focus == "straight") {
_rotation = 90;
this._y = this._y + 2;
}
if (this.hitTest(_root.tank) == true) {
if (_root.tank.alive == true) {
_root.nukeHere(this._x, this._y);
_root.shaker.play();
_root.lives--;
removeMovieClip(this);
}
}
i = 0;
while (i < (_root.tank.i + 3)) {
if (_root["missile" + i].hitTest(this._x, this._y, false) == true) {
if ((_root["missile" + i].style == "missile") || (_root["missile" + i].style == "laser")) {
proceedDie();
}
if (_root["missile" + i].style == "gun") {
if ((hp - 40) <= 0) {
trace((("MYX_" + _x) + "_") + _y);
_root.nukeHere(this._x, this._y);
_root.shaker.play();
_root.kills++;
if (_root.frame == 1) {
if (_root.getNewLife < 6) {
_root.getNewLife++;
} else {
_root.lives++;
_root.getNewLife = 0;
}
}
_root.hitTank(_x, _y, _rotation);
_root["missile" + i].removeMovieClip();
removeMovieClip(this);
} else {
hp = hp - 40;
_root.hitTank(_x, _y, _rotation);
_root["missile" + i].removeMovieClip();
}
}
}
i++;
}
proceedDie = function () {
trace((("MYXS_" + _x) + "_") + _y);
_root.nukeHere(_x, _y);
_root.shaker.play();
_root.kills++;
if (_root.frame == 1) {
if (_root.getNewLife < 6) {
_root.getNewLife++;
} else {
_root.lives++;
_root.getNewLife = 0;
}
}
removeMovieClip(this);
};
};
Instance of Symbol 209 MovieClip "inner" in Symbol 210 MovieClip [bot] Frame 1
onClipEvent (load) {
if (_currentframe == 1) {
this.cacheAsBitmap = true;
trace("bdbdy " + this.cacheAsBitmap);
idd = 0;
}
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
if (idd > 10) {
idd = 0;
trace("bdbdy2 " + this.cacheAsBitmap);
} else {
idd++;
}
}
}
Symbol 212 MovieClip [bombMark] Frame 1
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
if (_root.deleteMe == true) {
removeMovieClip(this);
}
};
Symbol 216 MovieClip [tankFlash] Frame 4
this.swapDepths(0);
this.removeMovieClip();
Symbol 219 MovieClip [scorchMC] Frame 1
timer = 0;
this.cacheAsBitmap = true;
this.onEnterFrame = function () {
timer++;
if (timer > 50) {
this.swapDepths(11);
this.removeMovieClip();
}
this._x = _x + _root.x_shake;
this._y = _y + _root.y_shake;
if (_root.clearBots == true) {
_alpha = (_alpha - 10);
if (_alpha <= 0) {
this.removeMovieClip();
}
} else {
_alpha = 100;
}
};
Symbol 245 Button
on (press) {
getURL ("http://www.mofunzone.com/game_scores/destructotanks/highscores.shtml", "_blank");
}
Symbol 251 Button
on (rollOver) {
_root.selectedBtn = "sur";
}
on (rollOut) {
_root.selectedBtn = "";
}
on (press) {
if (_root._currentframe == 4) {
_root.frame = 2;
_root.gotoAndStop(5);
_root.env.gotoAndStop(1);
} else {
_root.frame = 2;
_root.env.gotoAndStop(1);
_root.resetInits();
_root.tank.alive = true;
_root.tank.gotoAndStop(1);
_root.clearBots = false;
_root.n = 0;
_root.j = 0;
_root.a = 0;
_root.showMainMenu = false;
_root.del = 0;
_root.deleteMe = false;
_root.bc = 0;
_root.bossHP = 45;
_root.difficultyLevel = new Array();
_root.difficultyLevel[1] = 10;
_root.difficultyLevel[2] = 15;
_root.difficultyLevel[3] = 20;
_root.difficultyLevel[4] = 25;
_root.difficultyLevel[5] = 1;
_root.bossSpawn = new Array();
_root.bossSpawnX[0] = 443;
_root.bossSpawnX[1] = 266;
_root.bossSpawnX[2] = 60;
_root.bossSpawnRand = 0;
_root.difficulty = 1;
_root.spawnVariation = new Array();
_root.spawnVariation[1] = 200;
_root.spawnVariation[2] = 150;
_root.spawnVariation[3] = 100;
_root.spawnVariation[4] = 70;
_root.spawnVariation[5] = 70;
_root.xPositions = new Array();
_root.xPositions[1] = 275;
_root.xPositions[2] = 275;
_root.xPositions[3] = 66;
_root.xPositions[4] = 275;
_root.xPositions[5] = 275;
_root.yPositions = new Array();
_root.yPositions[1] = 200;
_root.yPositions[2] = 200;
_root.yPositions[3] = 341;
_root.yPositions[4] = 200;
_root.yPositions[5] = 200;
_root.smokeBits = 0;
_root.b = 0;
_root.getNewLife = 0;
_root.level = 1;
_root.doorOpen = true;
_root.kamikazeTime = false;
_root.kamikazeThink = 0;
_root.decals = true;
_root.score = 0;
_root.fasterReload = false;
_root.powerup = "none";
_root.extra = "none";
_root.i = 0;
_root.lives = 20;
_root.randomSpawn = 100;
_root.frames = 0;
_root.rdx = random(550);
_root.rdy = random(400);
_root.kills = 0;
_root.tank.boost = 4;
_root.shakeIntensity = 2;
_root.gameFinished = false;
_root.y_shake = 0;
_root.x_shake = 0;
_root.lastLevel = 5;
_root.playingGame = true;
_root.boss = false;
_root.tank._x = 275;
_root.tank._y = 200;
_root.showInstructionsOn = false;
hideMenus();
}
}
Symbol 256 Button
on (rollOver) {
_root.selectedBtn = "adv";
}
on (rollOut) {
_root.selectedBtn = "";
}
on (press) {
if (_root._currentframe == 4) {
_root.frame = 1;
_root.gotoAndStop(5);
_root.env.gotoAndStop(2);
} else {
_root.frame = 1;
_root.env.gotoAndStop(2);
_root.resetInits();
_root.tank.alive = true;
_root.tank.gotoAndStop(1);
_root.clearBots = false;
_root.n = 0;
_root.j = 0;
_root.a = 0;
_root.showMainMenu = false;
_root.del = 0;
_root.deleteMe = false;
_root.bc = 0;
_root.bossHP = 45;
_root.difficultyLevel = new Array();
_root.difficultyLevel[1] = 10;
_root.difficultyLevel[2] = 15;
_root.difficultyLevel[3] = 20;
_root.difficultyLevel[4] = 25;
_root.difficultyLevel[5] = 1;
_root.bossSpawn = new Array();
_root.bossSpawnX[0] = 443;
_root.bossSpawnX[1] = 266;
_root.bossSpawnX[2] = 60;
_root.bossSpawnRand = 0;
_root.difficulty = 1;
_root.spawnVariation = new Array();
_root.spawnVariation[1] = 200;
_root.spawnVariation[2] = 150;
_root.spawnVariation[3] = 100;
_root.spawnVariation[4] = 70;
_root.spawnVariation[5] = 70;
_root.xPositions = new Array();
_root.xPositions[1] = 275;
_root.xPositions[2] = 275;
_root.xPositions[3] = 66;
_root.xPositions[4] = 275;
_root.xPositions[5] = 275;
_root.yPositions = new Array();
_root.yPositions[1] = 200;
_root.yPositions[2] = 200;
_root.yPositions[3] = 341;
_root.yPositions[4] = 200;
_root.yPositions[5] = 200;
_root.smokeBits = 0;
_root.b = 0;
_root.getNewLife = 0;
_root.level = 1;
_root.doorOpen = true;
_root.kamikazeTime = false;
_root.kamikazeThink = 0;
_root.decals = true;
_root.score = 0;
_root.fasterReload = false;
_root.powerup = "none";
_root.extra = "none";
_root.i = 0;
_root.lives = 20;
_root.randomSpawn = 100;
_root.frames = 0;
_root.rdx = random(550);
_root.rdy = random(400);
_root.kills = 0;
_root.tank.boost = 4;
_root.shakeIntensity = 2;
_root.gameFinished = false;
_root.y_shake = 0;
_root.x_shake = 0;
_root.lastLevel = 5;
_root.playingGame = true;
_root.tank._x = 275;
_root.tank._y = 200;
_root.showInstructionsOn = false;
resetInits();
hideMenus();
}
}
Symbol 263 Button
on (release) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 271 Button
on (release) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Instance of Symbol 239 MovieClip in Symbol 272 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
Instance of Symbol 267 MovieClip "dragger" in Symbol 272 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.selectedBtn == "adv") {
_visible = true;
_x = (_root._xmouse - 240);
_y = (_root._ymouse - 200);
captionText.text = "beat the levels and face the boss!!!";
} else if (_root.selectedBtn == "sur") {
_visible = true;
_x = (_root._xmouse - 240);
_y = (_root._ymouse - 200);
captionText.text = "see how long you can last! go for the highscore!";
} else {
_visible = false;
}
}
Symbol 275 MovieClip Frame 1
mus.stop();
stop();
Symbol 275 MovieClip Frame 2
mus.start(0, 999);
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 10
stop();
Symbol 287 MovieClip Frame 1
stop();
stop();
Symbol 287 MovieClip Frame 2
_root.removeDamage();
Symbol 287 MovieClip Frame 3
_root.removeDamage();
_root.tank.i = 0;
_root.b = 0;
_root.i = 0;
_root.j = 0;
_root.barriers._visible = false;
_root.smokeBits = 0;
Symbol 287 MovieClip Frame 4
_root.removeDamage();
_root.tank.i = 0;
_root.b = 0;
_root.i = 0;
_root.j = 0;
_root.barriers._visible = true;
_root.smokeBits = 0;
Symbol 287 MovieClip Frame 5
_root.removeDamage();
_root.tank.i = 0;
_root.b = 0;
_root.i = 0;
_root.j = 0;
_root.barriers.gotoAndStop = 5;
_root.barriers._visible = false;
_root.smokeBits = 0;
Symbol 287 MovieClip Frame 6
_root.removeDamage();
_root.tank.i = 0;
_root.b = 0;
_root.i = 0;
_root.j = 0;
_root.barriers._visible = false;
_root.smokeBits = 0;
Symbol 287 MovieClip Frame 7
_root.removeDamage();
_root.tank.i = 0;
_root.b = 0;
_root.i = 0;
_root.j = 0;
_root.barriers._visible = false;
_root.smokeBits = 0;
Symbol 287 MovieClip Frame 8
_root.removeDamage();
_root.tank.i = 0;
_root.b = 0;
_root.i = 0;
_root.j = 0;
_root.barriers._visible = false;
_root.smokeBits = 0;
Symbol 292 MovieClip Frame 1
stop();
Symbol 295 MovieClip Frame 1
_root.doorOpen = true;
_root.chance = 1;
_root.chance1 = false;
_root.chance2 = false;
_root.chance3 = false;
_root.chance4 = false;
_root.chance5 = false;
_root.chance6 = false;
Symbol 295 MovieClip Frame 75
_root.doorOpen = false;
Symbol 295 MovieClip Frame 139
_root.doorOpen = true;
_root.chance = 2;
Symbol 295 MovieClip Frame 156
_root.doorOpen = true;
Symbol 295 MovieClip Frame 230
_root.doorOpen = false;
Symbol 295 MovieClip Frame 294
_root.doorOpen = true;
_root.chance = 3;
Symbol 295 MovieClip Frame 311
_root.doorOpen = true;
Symbol 295 MovieClip Frame 385
_root.doorOpen = false;
Symbol 295 MovieClip Frame 449
_root.doorOpen = true;
_root.chance = 4;
Symbol 295 MovieClip Frame 466
_root.doorOpen = true;
Symbol 295 MovieClip Frame 540
_root.doorOpen = false;
Symbol 295 MovieClip Frame 604
_root.doorOpen = true;
_root.chance = 5;
Symbol 295 MovieClip Frame 621
_root.doorOpen = true;
Symbol 295 MovieClip Frame 695
_root.doorOpen = false;
Symbol 295 MovieClip Frame 759
_root.doorOpen = true;
_root.chance = 6;
Symbol 295 MovieClip Frame 776
_root.doorOpen = true;
Symbol 295 MovieClip Frame 850
_root.doorOpen = false;
Symbol 295 MovieClip Frame 914
_root.doorOpen = true;
_root.chance = 7;
Symbol 298 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 10
gotoAndStop (1);
Instance of Symbol 295 MovieClip "bossDoor" in Symbol 299 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.gameFinished == true) {
gotoAndStop(_currentframe);
}
}
Symbol 307 MovieClip Frame 1
stop();
Symbol 313 MovieClip Frame 1
this.onLoad = function () {
};
this.onEnterFrame = function () {
xDif = this._x - _root.tank._x;
yDif = this._y - _root.tank._y;
angleR = Math.atan2(yDif, xDif);
angle = (angleR * 180) / Math.PI;
angle = angle + 180;
gotoAndStop(Math.ceil(angle));
};
stop();
Symbol 320 MovieClip Frame 1
this.cacheAsBitmap = true;
stop();
Symbol 320 MovieClip Frame 2
this.cacheAsBitmap = true;
Symbol 320 MovieClip Frame 3
this.cacheAsBitmap = true;
Symbol 320 MovieClip Frame 4
this.cacheAsBitmap = true;
Symbol 320 MovieClip Frame 5
this.cacheAsBitmap = true;
Symbol 320 MovieClip Frame 6
this.cacheAsBitmap = true;
Symbol 320 MovieClip Frame 7
this.cacheAsBitmap = true;
Symbol 322 MovieClip Frame 1
stop();
Symbol 326 MovieClip Frame 50
Mouse.hide();
Symbol 334 MovieClip Frame 1
stop();
Symbol 334 MovieClip Frame 5
gotoAndPlay (2);
Symbol 340 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 1
stop();
Instance of Symbol 328 MovieClip "body" in Symbol 342 MovieClip Frame 1
onClipEvent (load) {
this.cacheAsBitmap = true;
trace("tnk " + this.cacheAsBitmap);
idd = 0;
}
onClipEvent (enterFrame) {
if (idd > 10) {
idd = 0;
trace("tnk2 " + this.cacheAsBitmap);
} else {
idd++;
}
}
Instance of Symbol 341 MovieClip "turret" in Symbol 342 MovieClip Frame 1
onClipEvent (enterFrame) {
}
Symbol 344 MovieClip Frame 1
theme.stop();
stop();
Symbol 344 MovieClip Frame 2
theme.start(0, 999);
Symbol 347 MovieClip Frame 1
stop();
_root.level = 1;
_root.bossOn = false;
Symbol 347 MovieClip Frame 2
_root.level = 2;
_root.bossOn = false;
Symbol 347 MovieClip Frame 3
_root.level = 4;
_root.bossOn = false;
Symbol 347 MovieClip Frame 4
_root.level = 4;
_root.bossOn = false;
Symbol 347 MovieClip Frame 5
_root.level = 5;
_root.bossOn = true;
Symbol 361 MovieClip Frame 1
Symbol 365 Button
on (press) {
_root.playingGame = true;
_root.resetInits();
_root.tank.alive = true;
_root.lives = 4;
_root.tank.gotoAndStop(1);
_root.tank.i = 0;
_root.b = 0;
_root.i = 0;
_root.j = 0;
}
Symbol 371 Button
on (press) {
_root.frame = 2;
_root.kills = 0;
_root.lives = 20;
_root.playingGame = true;
_root.finalExplosion.gotoAndStop(1);
_root.env.gotoAndStop(1);
_root.tank.alive = true;
_root.tank.i = 0;
_root.removeDamage();
_root.b = 0;
_root.i = 0;
_root.j = 0;
_root.barriers._visible = false;
_root.smokeBits = 0;
_root.boss = false;
_root.tank._x = 275;
_root.tank._y = 200;
_root.selectedWeapon = "missile";
_root.missileEnabled = true;
_root.gunEnabled = false;
_root.laserEnabled = false;
_root.shootingNow = false;
_root.gameFinished = false;
_root.hideMenus();
_root.tank.go = 1;
_root.tank.gotoAndStop(1);
_root.resetInits();
_root.bossHP = 6;
_root.tagger = 0;
_root.tagger2 = 0;
_root.tagger3 = 0;
_root.hud.bhp._visible = false;
_root.music.theme.stop();
_root.music.theme.start(0, 999);
_root.music.theme.setVolume(70);
_root.randomSpawn = 300;
_root.deleteMe = false;
}
Symbol 376 Button
on (release) {
getURL ("http://www.mofunzone.com/online_games/destructotanks.shtml", "_blank");
}
Symbol 377 MovieClip Frame 1
this.cacheAsBitmap(true);
stop();
Symbol 377 MovieClip Frame 2
stop();
Symbol 378 MovieClip Frame 1
this.cacheAsBitmap(true);
Symbol 391 Button
on (keyPress "<Space>") {
_root.goFirstTime();
}
Symbol 392 MovieClip Frame 1
this.cacheAsBitmap(true);
Symbol 401 MovieClip Frame 1
stop();
Symbol 407 Button
on (release) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 408 MovieClip Frame 1
this.cacheAsBitmap(true);
stop();
Instance of Symbol 401 MovieClip in Symbol 408 MovieClip Frame 1
on (press) {
if (_currentframe == 1) {
gotoAndStop (2);
_root.music.theme.setVolume(0);
} else {
gotoAndStop (1);
_root.music.theme.setVolume(70);
}
}
Symbol 408 MovieClip Frame 35
stop();
Instance of Symbol 424 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.missileEnabled == true) {
_alpha = 0;
} else {
_alpha = 40;
}
if (Key.isDown(49)) {
if (_root.missileEnabled == true) {
_root.selectedWeapon = "missile";
}
}
}
on (press) {
if (_root.missileEnabled == true) {
_root.selectedWeapon = "missile";
}
}
Instance of Symbol 425 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.gunEnabled == true) {
_alpha = 0;
} else {
_alpha = 40;
}
if (Key.isDown(50)) {
if (_root.gunEnabled == true) {
_root.selectedWeapon = "gun";
}
}
}
on (press) {
if (_root.gunEnabled == true) {
_root.selectedWeapon = "gun";
}
}
Instance of Symbol 426 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.laserEnabled == true) {
_alpha = 0;
} else {
_alpha = 40;
}
if (Key.isDown(51)) {
if (_root.laserEnabled == true) {
_root.selectedWeapon = "laser";
}
}
}
on (press) {
if (_root.laserEnabled == true) {
_root.selectedWeapon = "laser";
}
}
Symbol 436 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 110
stop();
Symbol 437 MovieClip Frame 1
Instance of Symbol 432 MovieClip "bhp" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
internal1.inner._xscale = (_root.bossHP / 6) * 100;
}
Symbol 440 MovieClip Frame 10
stop();
Symbol 452 Button
on (rollOver) {
roller._visible = true;
}
on (rollOut) {
roller._visible = false;
}
on (press) {
_root.frame = 2;
_root.kills = 0;
_root.lives = 20;
_root.playingGame = true;
_root.finalExplosion.gotoAndStop(1);
_root.env.gotoAndStop(1);
_root.tank.alive = true;
_root.tank.i = 0;
_root.removeDamage();
_root.b = 0;
_root.i = 0;
_root.j = 0;
_root.barriers._visible = false;
_root.smokeBits = 0;
_root.boss = false;
_root.tank._x = 275;
_root.tank._y = 200;
_root.selectedWeapon = "missile";
_root.missileEnabled = true;
_root.gunEnabled = false;
_root.laserEnabled = false;
_root.shootingNow = false;
_root.gameFinished = false;
_root.hideMenus();
_root.tank.go = 1;
_root.tank.gotoAndStop(1);
_root.resetInits();
_root.bossHP = 6;
_root.tagger = 0;
_root.tagger2 = 0;
_root.tagger3 = 0;
_root.hud.bhp._visible = false;
_root.music.theme.stop();
_root.music.theme.start(0, 999);
_root.music.theme.setVolume(70);
_root.randomSpawn = 300;
_root.deleteMe = false;
}
Symbol 458 Button
on (release) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 461 MovieClip Frame 1
stop();
Symbol 461 MovieClip Frame 2
_root.music.theme.stop();
Symbol 461 MovieClip Frame 54
_root.selectedBtn == "";
Symbol 461 MovieClip Frame 75
_root.displayYouWin();
Instance of Symbol 267 MovieClip "roller" in Symbol 461 MovieClip Frame 75
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_x = (_root._xmouse - 117);
_y = (_root._ymouse - 73);
captionText.text = "see how long you can last! go for the hiscore!";
}
Symbol 461 MovieClip Frame 95
stop();
_root.stopAllSounds();
stopAllSounds();
Symbol 465 MovieClip Frame 1
stop();
Symbol 465 MovieClip Frame 111
stop();