Frame 1
var rightClick = new ContextMenu();
rightClick.hideBuiltInItems();
_root.menu = rightClick;
local_data_ToyTanksArena = SharedObject.getLocal("user_data_ToyTanksArena");
mochi.as2.MochiServices.connect("42f67d25cfda8225", root, onConnectError);
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("4270cf7d", this, 10301, true);
Instance of Symbol 82 MovieClip "domainClip" in Frame 1
onClipEvent (load) {
domain.text = _url;
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain.text = real_domain[0];
}
Frame 2
stop();
visitButton.useHandCursor = false;
_root.explosionLocation = 225;
_root.changeFrameVar = false;
if (_root.backgroundVolume == undefined) {
_root.backgroundVolume = 80;
}
if (_root.effectsVolume == undefined) {
_root.effectsVolume = 80;
}
local_data_ToyTanksArena.data.levelSelectsArray = _root.levelSelects;
local_data_ToyTanksArena.flush();
if (_root.levelSelects[3] == undefined) {
var levelSelects = new Array();
local_data_ToyTanksArena = SharedObject.getLocal("savedData");
levelSelects = local_data_ToyTanksArena.data.levelSelectsArray;
}
if (_root.levelSelects[3] == undefined) {
var levelSelects = new Array();
}
_root.levelSelects[1] = true;
var i = 1;
while (i < 21) {
if (_root.levelSelects[i] == undefined) {
_root.levelSelects[i] = false;
}
i++;
}
shoutArray = ["NOOB", "JERK", "HELP", "LOLWUT", ":P"];
dieArray = ["NOOOO!", "OUCH!", "NOT AGAIN!", "I'LL BE BACK!", "YOU GOT ME!"];
winArray = ["YES!", "GOT YOU!", "HAHA!", "I WIN!", "NOOB!"];
friendlyArray = ["OOPS!", "SORRY!", "WHOOPS!", "MY BAD!", "FORGIVE ME!"];
yellIt = function (ex, ey, purpose) {
shout = _root[purpose + "Array"][random(5)];
gNHD = _root.getNextHighestDepth();
if ((ex != undefined) && (ey != undefined)) {
eRot = random(360);
ex = ex + (50 * Math.sin(eRot * (Math.PI/180)));
ey = ey + (50 * Math.cos(eRot * (Math.PI/180)));
attachMovie("yellShell", "yellShell" + gNHD, gNHD, {_x:ex, _y:ey, spring:0, _xscale:0, _yscale:0, eScale:0, b:60, smoke:shout, frameSpawned:_root._currentframe, onEnterFrame:yellEnterFrame, name:"shout"});
while ((_root["yellShell" + gNHD]._x + (shout.length * 6)) > 540) {
_root["yellShell" + gNHD]._x = _root["yellShell" + gNHD]._x - 2;
}
while ((_root["yellShell" + gNHD]._x - (shout.length * 6)) < 10) {
_root["yellShell" + gNHD]._x = _root["yellShell" + gNHD]._x + 2;
}
while ((_root["yellShell" + gNHD]._y + 8) > 390) {
_root["yellShell" + gNHD]._y = _root["yellShell" + gNHD]._y - 2;
}
while ((_root["yellShell" + gNHD]._y - 8) < 10) {
_root["yellShell" + gNHD]._y = _root["yellShell" + gNHD]._y + 2;
}
}
};
yellEnterFrame = function () {
if (((this.frameSpawned != _root._currentframe) && (_root._currentframe != 24)) && (_root._currentframe != 30)) {
this.removeMovieClip();
}
if (_root.PauseTransition == true) {
this.removeMovieClip();
}
if (this.b > 0) {
this.b--;
this.spring = this.spring + ((100 - this.eScale) / 5);
this.eScale = this.eScale + this.spring;
this.spring = this.spring * 0.8;
this._xscale = (this._yscale = this.eScale);
} else if ((this.eScale + this.spring) > 0) {
this.spring = this.spring - 5;
this.eScale = this.eScale + this.spring;
this._xscale = (this._yscale = this.eScale);
} else {
this.removeMovieClip();
}
};
neoBackgroundBitmap = new flash.display.BitmapData(550, 400, false, 0);
neoBackgroundShell.createEmptyMovieClip("levelBitmapClip", 0);
neoBackgroundShell.levelBitmapClip.attachBitmap(neoBackgroundBitmap, 0);
neoBackgroundBitmap.draw(oldBackground, oldBackground.transform.matrix);
Instance of Symbol 114 MovieClip in Frame 2
onClipEvent (load) {
if (_root.controlScheme == "arrows") {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.controlScheme == "wasd") {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
_root.controlScheme = "arrows";
}
}
Instance of Symbol 118 MovieClip in Frame 2
onClipEvent (load) {
if ((_root.controlScheme == "wasd") || (_root.controlScheme == undefined)) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.controlScheme == "arrows") {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
_root.controlScheme = "wasd";
}
}
Instance of Symbol 121 MovieClip in Frame 2
onClipEvent (load) {
if ((_root.cratersOnOff == "on") || (_root.cratersOnOff == undefined)) {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.cratersOnOff == "off") {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
_root.cratersOnOff = "on";
}
}
Instance of Symbol 123 MovieClip in Frame 2
onClipEvent (load) {
if (_root.cratersOnOff == "off") {
this.gotoAndStop(2);
}
}
onClipEvent (enterFrame) {
if (_root.cratersOnOff == "on") {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
_root.cratersOnOff = "off";
}
}
Instance of Symbol 105 MovieClip in Frame 2
onClipEvent (load) {
local_data_ToyTanksArena.data.levelSelectsArray = _root.levelSelects;
local_data_ToyTanksArena.flush();
_root.randomFixVariable = 1;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.gameScore = 0;
_root.firstTry = undefined;
_root.increaseScore = undefined;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.doNotStartMusic = false;
_root.firstLevelTry == undefined;
_root.gotoAndStop(28);
}
}
Instance of Symbol 129 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.gotoAndStop(26);
}
}
Instance of Symbol 133 MovieClip in Frame 2
onClipEvent (load) {
bounceDirect = 0.4;
var bounceCounter = 0;
bounceCounter = 5;
}
onClipEvent (enterFrame) {
this._x = this._x + 3;
this.bounce._y = this.bounce._y + bounceDirect;
bounceCounter--;
if (bounceCounter == 0) {
bounceCounter = 7;
bounceDirect = bounceDirect * -1;
}
if (this._x > 800) {
this._x = -350;
}
}
Instance of Symbol 138 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.gameScore = 0;
_root.firstTry = undefined;
_root.difficultyLevel = "levelselect";
_root.increaseScore = undefined;
_root.doNotStartMusic = false;
_root.gotoAndStop(27);
}
}
Instance of Symbol 151 MovieClip in Frame 2
onClipEvent (load) {
var clickCounter = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
clickCounter++;
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (clickCounter > 10) {
getURL ("http://www.andkon.com/arcade/", "_blank");
}
}
}
Instance of Symbol 93 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
getURL ("http://www.andkon.com/arcade/", "_blank");
}
}
Frame 3
stop();
_root.totalTanks = 0;
_root.destroyedTanks = 0;
_root.transitionLevel = false;
_root.timeElapsed = 0;
_root.pauseGame = true;
_root.pauseMenu = false;
_root.levelBeginningCount = true;
_root.PauseTransition = false;
_root.pauseGameTransitionCounter = 0;
_root.gameScore = 0;
_root.doNotStartMusic;
if (_root.firstLevelTry == undefined) {
_root.firstLevelTry = true;
}
if (_root.firstTry == undefined) {
_root.totalShots = 0;
_root.hitShots = 0;
_root.firstTry = true;
_root.firstShot = true;
_root.firstBlood = false;
_root.friendlyFire = 0;
_root.allRicochet = true;
_root.oneRicochet = false;
_root.totalRichochets = 0;
_root.noShots = true;
_root.waitTime = 0;
_root.tankDead = false;
_root.levelPageTimer = 0;
_root.killerX = 0;
_root.killerY = 0;
_root.killerType = undefined;
_root.killerRotation = 0;
_root.killerBarrelRotation = 0;
_root.addLife = false;
}
setLevelVariables = function () {
if (_root.firstLevelTry == true) {
_root.firstShot = true;
_root.firstBlood = false;
_root.friendlyFire = 0;
_root.totalRichochets = 0;
_root.firstTry = true;
_root.allRicochet = true;
_root.oneRicochet = false;
_root.noShots = true;
}
};
_root.musicNotStart;
if (_root.currentLevel == undefined) {
_root.currentLevel = 1;
}
_root.pauseGameCounter = 0;
_root.deadCheck = false;
_root.controlsText.text = _root.controlScheme;
leaveCrater = function (ex, ey) {
var _local1 = neoBackgroundShell.getNextHighestDepth();
neoBackgroundShell.attachMovie("crater", "crater" + _local1, _local1, {_x:ex, _y:ey, _rotation:random(360)});
neoBackgroundShell["crater" + _local1].gotoAndStop(random(3));
neoBackgroundBitmap.draw(neoBackgroundShell["crater" + _local1], neoBackgroundShell["crater" + _local1].transform.matrix);
removeMovieClip(neoBackgroundShell["crater" + _local1]);
};
leaveSmallCrater = function (ex, ey) {
var _local1 = neoBackgroundShell.getNextHighestDepth();
neoBackgroundShell.attachMovie("craterSmall", "craterSmall" + _local1, _local1, {_x:ex, _y:ey, _rotation:random(360)});
neoBackgroundShell["craterSmall" + _local1].gotoAndStop(random(3));
neoBackgroundBitmap.draw(neoBackgroundShell["craterSmall" + _local1], neoBackgroundShell["craterSmall" + _local1].transform.matrix);
removeMovieClip(neoBackgroundShell["craterSmall" + _local1]);
};
gameScoreChange = function (tankType) {
if (tankType == "Cannon2") {
_root.gameScore = _root.gameScore + 20;
} else if (tankType == "Cannon3") {
_root.gameScore = _root.gameScore + 60;
} else if (tankType == "Cannon4") {
_root.gameScore = _root.gameScore + 40;
} else if (tankType == "Cannon5") {
_root.gameScore = _root.gameScore + 50;
} else if (tankType == "Cannon6") {
_root.gameScore = _root.gameScore + 60;
} else if (tankType == "Cannon7") {
_root.gameScore = _root.gameScore + 50;
}
};
onEnterFrame = function () {
bgSound.setVolume(_root.backgroudVolume);
if ((_root._currentframe == 24) && (_root.deadCheck == true)) {
_root.levelPageTimer++;
_root.levelPage._x = -100;
_root.levelNumber._x = -100;
_root.livesLeft._x = -100;
if ((_root.killerX != 0) && (_root.killerY != 0)) {
attachMovie(["fakeCannon" + _root.killerType], ["fakeCannon" + _root.killerType] + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.killerX, _y:_root.killerY, _rotation:_root.killerRotation, _name:"joe"});
_root.joe.fakeBarrel._rotation = _root.killerBarrelRotation;
killerX = 0;
}
if (_root.levelPageTimer > 70) {
_root.joe.removeMovieClip();
_root.levelPage._x = 209.6;
_root.levelNumber._x = 347.1;
_root.livesLeft._x = 298.6;
} else {
_root.timeElapsed = 0;
}
}
if (_root.difficultyLevel != "levelselect") {
_root.scoreBox.text = "Score: " + _root.gameScore;
}
if (_root.changeFrameVar == true) {
_root.changeFrameVar = false;
_root.totalTanks = 0;
_root.destroyedTanks = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.tank7Alive = true;
gotoAndStop(_root.currentLevel + 2);
}
_root.pauseGameTransitionCounter++;
if ((((Key.isDown(32) && (_root.transitionLevel == false)) && (_root.PauseTransition == false)) && (_root.levelBeginningCount == false)) && (_root.pauseGameTransitionCounter > 30)) {
_root.pauseGame = !_root.pauseGame;
_root.pauseMenu = !_root.pauseMenu;
if (pauseMenu == true) {
_root.PauseTransition = true;
_root.neoPauseMenu.attachMovie("pauseMenu", "pauseMenu1", _root.getNextHighestDepth(), {_x:0, _y:0});
} else {
_root.neoPauseMenu.pauseMenu1.removeMovieClip();
_root.pauseGameTransitionCounter = 1;
}
}
if (pauseGame == false) {
if ((_root.destroyedTanks == _root.totalTanks) && (_root.deadCheck == false)) {
if (_root.difficultyLevel != "levelselect") {
_root.gotoAndStop(30);
} else {
_root.destroyedTanks = 0;
_root.totalTanks = 0;
_root.pauseGame = true;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.tank7Alive = true;
_root.CannonBottom.swapDepths(10001);
_root.currentLevel = currentLevel + 1;
_root.transitionLevel = true;
_root.gotoAndStop(24);
}
}
}
if (_root.transitionLevel == true) {
if (_root.deadCheck == true) {
_root.extraLife.text = "";
_root.firstTry = false;
_root.firstLevelTry = false;
_root.tankDead = true;
}
if (_root.currentLevel != 21) {
if (((((_root.currentLevel % 5) == 0) && (_root.deadCheck == false)) && (_root.addLife == false)) && (_root.difficultyLevel != "levelselect")) {
_root.extraLife.text = "Extra Life!";
_root.addLife = true;
_root.lives++;
}
_root.levelNumber.text = _root.currentLevel;
_root.livesLeft.text = _root.lives;
_root.levelSelects[_root.currentLevel] = true;
pauseGame = true;
_root.pauseMenu = false;
_root.timeElapsed++;
if ((_root.timeElapsed > 60) && (_root.currentLevel != 0)) {
_root.addLife = false;
_root.levelBeginningCount = true;
pauseGameCounter = 0;
_root.gotoAndStop(_root.currentLevel + 2);
_root.timeElapsed = 0;
_root.deadCheck = false;
_root.levelPageTimer++;
_root.transitionLevel = false;
_root.levelPageTimer = 0;
_root.addLife = false;
_root.extraLife.text = "";
}
} else {
_root.gotoAndStop(23);
}
}
if ((((_root.pauseGame == true) && (_root.transitionLevel == false)) && (_root.pauseMenu == false)) && (_root.levelBeginningCount == true)) {
pauseGameCounter++;
if (pauseGameCounter > 15) {
pauseGameCounter = 0;
_root.levelBeginningCount = false;
_root.pauseGame = false;
_root.PauseTransition = false;
}
}
};
Instance of Symbol 156 MovieClip "CannonBottom" in Frame 3
onClipEvent (load) {
function angleCheck(directions) {
if ((directions == "down") || (directions == "up")) {
if (((this.Cannon1Inside._rotation == 0) || (this.Cannon1Inside._rotation == 180)) || (this.Cannon1Inside._rotation == -180)) {
return(true);
}
if (((this.Cannon1Inside._rotation <= 90) && (this.Cannon1Inside._rotation > 0)) || ((this.Cannon1Inside._rotation <= -90) && (this.Cannon1Inside._rotation > -180))) {
this.Cannon1Inside._rotation = this.Cannon1Inside._rotation - 15;
}
if (((this.Cannon1Inside._rotation > -90) && (this.Cannon1Inside._rotation < 0)) || ((this.Cannon1Inside._rotation > 90) && (this.Cannon1Inside._rotation < 180))) {
this.Cannon1Inside._rotation = this.Cannon1Inside._rotation + 15;
}
return(true);
}
if ((directions == "left") || (directions == "right")) {
if ((this.Cannon1Inside._rotation == -90) || (this.Cannon1Inside._rotation == 90)) {
return(true);
}
if (((this.Cannon1Inside._rotation < 0) && (this.Cannon1Inside._rotation > -90)) || ((this.Cannon1Inside._rotation > 90) && (this.Cannon1Inside._rotation <= 180))) {
this.Cannon1Inside._rotation = this.Cannon1Inside._rotation - 15;
}
if (((this.Cannon1Inside._rotation >= 0) && (this.Cannon1Inside._rotation < 90)) || ((this.Cannon1Inside._rotation < -90) && (this.Cannon1Inside._rotation >= -180))) {
this.Cannon1Inside._rotation = this.Cannon1Inside._rotation + 15;
}
return(true);
}
if ((directions == "upleft") || (directions == "downright")) {
if ((this.Cannon1Inside._rotation == -45) || (this.Cannon1Inside._rotation == 135)) {
return(true);
}
if (((this.Cannon1Inside._rotation < -45) && (this.Cannon1Inside._rotation >= -135)) || ((this.Cannon1Inside._rotation >= 45) && (this.Cannon1Inside._rotation < 135))) {
this.Cannon1Inside._rotation = this.Cannon1Inside._rotation + 15;
}
if (((this.Cannon1Inside._rotation > -45) && (this.Cannon1Inside._rotation < 45)) || (((this.Cannon1Inside._rotation < -135) && (this.Cannon1Inside._rotation >= -180)) || ((this.Cannon1Inside._rotation <= 180) && (this.Cannon1Inside._rotation > 135)))) {
this.Cannon1Inside._rotation = this.Cannon1Inside._rotation - 15;
}
return(true);
}
if ((directions == "downleft") || (directions == "upright")) {
if ((this.Cannon1Inside._rotation == 45) || (this.Cannon1Inside._rotation == -135)) {
return(true);
}
if (((this.Cannon1Inside._rotation >= -45) && (this.Cannon1Inside._rotation < 45)) || (((this.Cannon1Inside._rotation < -135) && (this.Cannon1Inside._rotation >= -180)) || ((this.Cannon1Inside._rotation > 135) && (this.Cannon1Inside._rotation <= 180)))) {
this.Cannon1Inside._rotation = this.Cannon1Inside._rotation + 15;
}
if (((this.Cannon1Inside._rotation > -135) && (this.Cannon1Inside._rotation < -45)) || ((this.Cannon1Inside._rotation <= 135) && (this.Cannon1Inside._rotation > 45))) {
this.Cannon1Inside._rotation = this.Cannon1Inside._rotation - 15;
}
return(true);
}
}
function die() {
if (_root.cratersOnOff == "on") {
_root.leaveSmallCrater(this._x - xSpeed, this._y - ySpeed);
}
var _local4 = _root.attachMovie("Explosion", "Explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = this._x;
_local4._y = this._y;
this.swapDepths(10001);
_root.destroyedTanks = 0;
_root.totalTanks = 0;
var _local3 = 0;
while (_local3 < 11) {
_root.tank[_local3].die();
_local3++;
}
_local3 = 0;
while (_local3 < 21) {
_root["bullet" + _local3].explodeNoExplosion();
_local3++;
}
_root.lives = _root.lives - 1;
if (_root.lives >= 0) {
_root.deadCheck = true;
_root.gotoAndStop(24);
_root.transitionLevel = true;
this.removeMovieClip();
} else {
_root.backgroundMusicmc.stopMusic();
_root.deadCheck = true;
_root.gotoAndStop(25);
this.removeMovieClip();
}
}
function bombDrop() {
var _local3 = _root.attachMovie("Bomb", "Bomb" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = this._x;
_local3._y = this._y;
}
function leftCollision() {
if (_root.wall.hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y, true) || (_root["wallLvl" + _root.currentLevel].hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y, true))) {
moveRL = 0;
} else if (_root.wall.hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y - 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y - 11, true))) {
moveRL = 0;
} else if (_root.wall.hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y + 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y + 11, true))) {
moveRL = 0;
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_root["tank" + _local3].hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y, true)) {
moveRL = 0;
}
if (_root["tank" + _local3].hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y - 11, true)) {
moveRL = 0;
break;
}
if (_root["tank" + _local3].hitTest((this._x - (this.Cannon1Inside._width / 2)) + moveRL, this._y + 11, true)) {
moveRL = 0;
break;
}
_local3++;
}
}
function rightCollision() {
if (_root.wall.hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y, true) || (_root["wallLvl" + _root.currentLevel].hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y, true))) {
moveRL = 0;
} else if (_root.wall.hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y - 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y - 11, true))) {
moveRL = 0;
} else if (_root.wall.hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y + 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y + 11, true))) {
moveRL = 0;
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_root["tank" + _local3].hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y, true)) {
moveRL = 0;
break;
}
if (_root["tank" + _local3].hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y - 11, true)) {
moveRL = 0;
break;
}
if (_root["tank" + _local3].hitTest((this._x + (this.Cannon1Inside._width / 2)) + moveRL, this._y + 11, true)) {
moveRL = 0;
break;
}
_local3++;
}
}
function upCollision() {
if (_root.wall.hitTest(this._x, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(this._x, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true))) {
moveUD = 0;
} else if (_root.wall.hitTest(this._x - 11, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(this._x - 11, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true))) {
moveUD = 0;
} else if (_root.wall.hitTest(this._x + 11, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(this._x + 11, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true))) {
moveUD = 0;
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_root["tank" + _local3].hitTest(this._x, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true)) {
moveUD = 0;
break;
}
if (_root["tank" + _local3].hitTest(this._x - 11, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true)) {
moveUD = 0;
break;
}
if (_root["tank" + _local3].hitTest(this._x + 11, (this._y - (this.Cannon1Inside._height / 2)) + moveUD, true)) {
moveUD = 0;
break;
}
_local3++;
}
}
function downCollision() {
if (_root.wall.hitTest(this._x, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(this._x, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true))) {
moveUD = 0;
} else if (_root.wall.hitTest(this._x - 11, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(this._x - 11, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true))) {
moveUD = 0;
} else if (_root.wall.hitTest(this._x + 11, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(this._x + 11, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true))) {
moveUD = 0;
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_root["tank" + _local3].hitTest(this._x, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true)) {
moveUD = 0;
break;
}
if (_root["tank" + _local3].hitTest(this._x - 11, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true)) {
moveUD = 0;
break;
}
if (_root["tank" + _local3].hitTest(this._x + 11, (this._y + (this.Cannon1Inside._height / 2)) + moveUD, true)) {
moveUD = 0;
break;
}
_local3++;
}
}
var bombTimer = 4;
var totalBombs = 0;
var bulletNumber = 0;
var levelLoaded = _root.currentLevel;
moveRL = 0;
moveUD = 0;
RLing = 1;
maxSpeed = 3.7;
var shootlimit;
var totalBullets = 0;
var xBullet;
var yBullet;
shootlimit = 0;
var bulletNumbers = new Array();
var tankNumbers = new Array();
var i = 0;
while (i <= 20) {
bulletNumbers[i] = false;
i++;
}
var i = 0;
while (i <= 10) {
tankNumbers[i] = false;
i++;
}
}
onClipEvent (enterFrame) {
if (levelLoaded != _root.currentLevel) {
this.removeMovieClip();
}
if (_root.pauseGame == false) {
bombTimer++;
shootlimit = shootlimit + 1;
xBullet = _bulletLocation.bulletLocation._x;
yBullet = _bulletLocation.bulletLocation._y;
if (((_root.controlScheme == "arrows") && (Key.isDown(39))) || ((_root.controlScheme == "wasd") && (Key.isDown(68)))) {
moveRL = moveRL + RLing;
} else if (((_root.controlScheme == "arrows") && (Key.isDown(37))) || ((_root.controlScheme == "wasd") && (Key.isDown(65)))) {
moveRL = moveRL - RLing;
} else if (Math.abs(moveRL) > RLing) {
moveRL = moveRL - ((moveRL / Math.abs(moveRL)) * RLing);
} else {
moveRL = 0;
}
if (((_root.controlScheme == "arrows") && (Key.isDown(38))) || ((_root.controlScheme == "wasd") && (Key.isDown(87)))) {
moveUD = moveUD - RLing;
} else if (((_root.controlScheme == "arrows") && (Key.isDown(40))) || ((_root.controlScheme == "wasd") && (Key.isDown(83)))) {
moveUD = moveUD + RLing;
} else if (Math.abs(moveUD) > RLing) {
moveUD = moveUD - ((moveUD / Math.abs(moveUD)) * RLing);
} else {
moveUD = 0;
}
this.nowSpeed = Math.sqrt((this.moveRL * this.moveRL) + (this.moveUD * this.moveUD));
if (this.nowSpeed > this.maxSpeed) {
this.moveRL = this.moveRL * (this.maxSpeed / this.nowSpeed);
this.moveUD = this.moveUD * (this.maxSpeed / this.nowSpeed);
}
if (moveRL > 0) {
rightCollision();
} else if (moveRL < 0) {
leftCollision();
}
if (moveUD > 0) {
downCollision();
} else if (moveUD < 0) {
upCollision();
}
this._x = this._x + moveRL;
this._y = this._y + moveUD;
if (((_root.controlScheme == "wasd") && (Key.isDown(68) && (Key.isDown(87)))) || ((_root.controlScheme == "arrows") && (Key.isDown(39) && (Key.isDown(38))))) {
angleCheck("upright");
} else if (((_root.controlScheme == "wasd") && (Key.isDown(65) && (Key.isDown(87)))) || ((_root.controlScheme == "arrows") && (Key.isDown(37) && (Key.isDown(38))))) {
angleCheck("upleft");
} else if (((_root.controlScheme == "wasd") && (Key.isDown(68) && (Key.isDown(83)))) || ((_root.controlScheme == "arrows") && (Key.isDown(39) && (Key.isDown(40))))) {
angleCheck("downright");
} else if (((_root.controlScheme == "wasd") && (Key.isDown(65) && (Key.isDown(83)))) || ((_root.controlScheme == "arrows") && (Key.isDown(37) && (Key.isDown(40))))) {
angleCheck("downleft");
}
if (((_root.controlScheme == "wasd") && (Key.isDown(65) && ((!Key.isDown(87)) && (!Key.isDown(83))))) || ((_root.controlScheme == "arrows") && (Key.isDown(37) && ((!Key.isDown(38)) && (!Key.isDown(40)))))) {
angleCheck("left");
}
if (((_root.controlScheme == "wasd") && (Key.isDown(68) && ((!Key.isDown(87)) && (!Key.isDown(83))))) || ((_root.controlScheme == "arrows") && (Key.isDown(39) && ((!Key.isDown(38)) && (!Key.isDown(40)))))) {
angleCheck("right");
}
if (((_root.controlScheme == "wasd") && (Key.isDown(87) && ((!Key.isDown(65)) && (!Key.isDown(68))))) || ((_root.controlScheme == "arrows") && (Key.isDown(38) && ((!Key.isDown(37)) && (!Key.isDown(39)))))) {
angleCheck("up");
}
if (((_root.controlScheme == "wasd") && (Key.isDown(83) && ((!Key.isDown(65)) && (!Key.isDown(68))))) || ((_root.controlScheme == "arrows") && (Key.isDown(40) && ((!Key.isDown(37)) && (!Key.isDown(39)))))) {
angleCheck("down");
}
}
this.barrel.pointAt(_root._xmouse, _root._ymouse, 90 - this._rotation);
}
onClipEvent (mouseDown) {
if (_root.pauseGame == false) {
if ((shootlimit > 6) && (totalBullets <= 5)) {
totalBullets++;
var rotate = (90 + ((Math.atan2(_root._ymouse - _root.CannonBottom._y, _root._xmouse - _root.CannonBottom._x) * 180) / Math.PI));
if (_root.difficultyLevel != "easy") {
var Missile1 = _root.attachMovie("Missile1", "Missile1" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
Missile1._x = _root.CannonBottom._x + (Math.sin((rotate * Math.PI) / 180) * 22.35);
Missile1._y = _root.CannonBottom._y - (Math.cos((rotate * Math.PI) / 180) * 22.35);
} else if (_root.difficultyLevel == "easy") {
var Missile3 = _root.attachMovie("Missile3", "Missile3" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
Missile3._x = _root.CannonBottom._x + (Math.sin((rotate * Math.PI) / 180) * 22.35);
Missile3._y = _root.CannonBottom._y - (Math.cos((rotate * Math.PI) / 180) * 22.35);
}
shootlimit = 0;
}
}
}
Instance of Symbol 76 MovieClip [backgroundMusicmc] "backgroundMusicmc" in Frame 3
onClipEvent (load) {
backgroundMusic = new Sound(this);
backgroundMusic.attachSound("background_loop.mp3");
this.backgroundMusic.setVolume(_root.effectsVolume);
stopMusic = function () {
this.backgroundMusic.stop();
};
}
onClipEvent (enterFrame) {
this.backgroundMusic.setVolume(_root.backgroundVolume);
if ((((((_root.doNotStartMusic != true) && (_root._currentFrame != 25)) && (_root._currentFrame != 26)) && (_root._currentFrame != 27)) && (_root._currentFrame != 28)) && (_root._currentFrame != 29)) {
this.backgroundMusic.start(0, 1000);
_root.doNotStartMusic = true;
}
if (_root.lives < 0) {
this.backgroundMusic.stop();
}
}
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Frame 8
stop();
Frame 9
stop();
Frame 10
stop();
Frame 11
stop();
Frame 12
stop();
Frame 13
stop();
Frame 14
stop();
Instance of Symbol 68 MovieClip [Cannon4] in Frame 14
onClipEvent (load) {
this.barrel2.aimAngle = -90;
}
Instance of Symbol 68 MovieClip [Cannon4] in Frame 14
onClipEvent (load) {
this.barrel2.aimAngle = 90;
}
Instance of Symbol 68 MovieClip [Cannon4] in Frame 14
onClipEvent (load) {
this.barrel2.aimAngle = 90;
}
Frame 15
stop();
Instance of Symbol 68 MovieClip [Cannon4] in Frame 15
onClipEvent (load) {
this.barrel2.aimAngle = -2;
}
Instance of Symbol 68 MovieClip [Cannon4] in Frame 15
onClipEvent (load) {
this.barrel2.aimAngle = -2;
}
Instance of Symbol 68 MovieClip [Cannon4] in Frame 15
onClipEvent (load) {
this.barrel2.aimAngle = -2;
}
Instance of Symbol 68 MovieClip [Cannon4] in Frame 15
onClipEvent (load) {
this.barrel2.aimAngle = -2;
}
Instance of Symbol 68 MovieClip [Cannon4] in Frame 15
onClipEvent (load) {
this.barrel2.aimAngle = -2;
}
Instance of Symbol 68 MovieClip [Cannon4] in Frame 15
onClipEvent (load) {
this.barrel2.aimAngle = -2;
}
Frame 16
stop();
Frame 17
stop();
Frame 18
stop();
Frame 19
stop();
Frame 20
stop();
Frame 21
stop();
Frame 22
stop();
Frame 23
if (_root.randomFixVariable == 1) {
_root.randomFixVariable == 0;
}
stop();
stop();
neoBackgroundBitmap2 = new flash.display.BitmapData(550, 400, false, 0);
neoBackgroundShell.createEmptyMovieClip("levelBitmapClip2", 0);
neoBackgroundShell.levelBitmapClip.attachBitmap(neoBackgroundBitmap2, 0);
neoBackgroundBitmap.draw(oldBackground, oldBackground.transform.matrix);
Instance of Symbol 222 MovieClip in Frame 23
onClipEvent (load) {
if (_root.difficultyLevel == "easy") {
if (_root.increaseScore == undefined) {
_root.gameScore = _root.gameScore + 1000;
_root.increaseScore = false;
}
this.winText.text = "Congratulations! \n \n You beat easy mode! \n \n Final Score: " + _root.gameScore;
}
if (_root.difficultyLevel == "medium") {
if (_root.increaseScore == undefined) {
_root.gameScore = _root.gameScore + 2000;
_root.increaseScore = false;
}
this.winText.text = "Congratulations! \n \n You beat medium mode! \n \n Final Score: " + _root.gameScore;
}
if (_root.difficultyLevel == "hard") {
if (_root.increaseScore == undefined) {
_root.gameScore = _root.gameScore + 3000;
_root.increaseScore = false;
}
this.winText.text = "Congratulations! \n \n You beat hard mode! \n \n Final Score: " + _root.gameScore;
}
if (_root.difficultyLevel == "insane") {
if (_root.increaseScore == undefined) {
_root.gameScore = _root.gameScore + 4000;
_root.increaseScore = false;
}
this.winText.text = "Congratulations! \n \n You beat insane mode! \n \n Final Score: " + _root.gameScore;
}
if (_root.difficultyLevel == "levelselect") {
this.winText.text = "Congratulations! \n \n You have finished all of the levels! \n \n Try to beat the main mode now!";
}
}
Instance of Symbol 223 MovieClip in Frame 23
onClipEvent (load) {
function __f_load(eventObj) {
this.width = 5;
}
this.addEventListener("load", __f_load);
}
Instance of Symbol 228 MovieClip in Frame 23
onClipEvent (enterFrame) {
this._visible = true;
this._x = 279.4;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.backgroundMusicmc.backgroundMusic.stop();
_root.currentLevel = 0;
_root.gotoAndStop(2);
}
}
Instance of Symbol 230 MovieClip "leaderboard" in Frame 23
/* no clip actions */
Instance of Symbol 234 MovieClip in Frame 23
onClipEvent (load) {
trace("hmmm3");
if (_root.difficultyLevel != "levelselect") {
this._visible = true;
this._x = 279.4;
} else {
this._visible = false;
this._x = 1000;
}
}
onClipEvent (enterFrame) {
if (_root.difficultyLevel != "levelselect") {
this._visible = true;
this._x = 279.4;
} else {
this._visible = false;
this._x = 1000;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
var o = {n:[7, 9, 10, 1, 10, 15, 3, 1, 9, 1, 2, 1, 14, 12, 5, 0], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "79a1af319121ec50");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:_root.gameScore, onClose:function () {
_root.backgroundMusicmc.backgroundMusic.stop();
_root.currentLevel = 0;
_root.gotoAndStop(2);
}});
}
}
Frame 25
stop();
Instance of Symbol 228 MovieClip in Frame 25
onClipEvent (load) {
local_data_ToyTanksArena.data.levelSelectsArray = _root.levelSelects;
local_data_ToyTanksArena.flush();
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.gameoverMusicClip.gameoverMusic.stop();
_root.gotoAndStop(2);
}
}
Instance of Symbol 252 MovieClip in Frame 25
onClipEvent (load) {
if (_root.difficultyLevel != "levelselect") {
this.gameOverFinalScore.text = "Final Score: " + _root.gameScore;
} else {
this.gameOverFinalScore.text = "";
}
}
Instance of Symbol 234 MovieClip in Frame 25
onClipEvent (load) {
if (_root.difficultyLevel != "levelselect") {
this._visible = true;
this._x = 279.4;
} else {
this._visible = false;
this._x = 1000;
}
}
onClipEvent (enterFrame) {
if (_root.difficultyLevel != "levelselect") {
this._visible = true;
this._x = 279.4;
} else {
this._visible = false;
this._x = 1000;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
var o = {n:[7, 9, 10, 1, 10, 15, 3, 1, 9, 1, 2, 1, 14, 12, 5, 0], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "79a1af319121ec50");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:_root.gameScore, onClose:function () {
_root.backgroundMusicmc.backgroundMusic.stop();
_root.currentLevel = 0;
_root.gotoAndStop(2);
}});
}
}
Instance of Symbol 255 MovieClip "gameoverMusicClip" in Frame 25
onClipEvent (load) {
gameoverMusic = new Sound(this);
gameoverMusic.attachSound("gameoverAudio");
this.gameoverMusic.setVolume(_root.backgroundVolume * 0.5);
this.gameoverMusic.start();
}
Frame 26
stop();
Instance of Symbol 228 MovieClip in Frame 26
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.gotoAndStop(2);
}
}
Frame 27
stop();
Instance of Symbol 268 MovieClip in Frame 27
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
if (_root.levelSelects[1] == false) {
this._alpha = 100;
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[1] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 1;
_root.deadCheck = false;
_root.changeFrameVar = false;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 271 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[2] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[2] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 2;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 274 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[3] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[3] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 3;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 277 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[4] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[4] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 4;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 280 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[5] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[5] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 5;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 283 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[6] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[6] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 6;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 286 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[7] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[7] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 7;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 289 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[8] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[8] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 8;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 292 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[9] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[9] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 9;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 295 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[10] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[10] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 10;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 298 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[11] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[11] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 11;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 301 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[12] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[12] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 12;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 304 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[13] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[13] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 13;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 307 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[14] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[14] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 14;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 310 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[15] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[15] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 15;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 313 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[16] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[16] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 16;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 316 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[17] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[17] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 17;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 319 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[18] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[18] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 18;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 322 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[19] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[19] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 19;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 325 MovieClip in Frame 27
onClipEvent (load) {
if (_root.levelSelects[20] == false) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.levelSelects[20] == true) {
if (_root.controlScheme == undefined) {
_root.controlScheme = "wasd";
}
if (_root.cratersOnOff == undefined) {
_root.cratersOnOff = "on";
}
_root.lives = 0;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.currentLevel = 20;
_root.deadCheck = false;
_root.changeFrameVar = true;
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 228 MovieClip in Frame 27
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 334 MovieClip in Frame 28
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.currentLevel = 1;
_root.lives = 0;
_root.difficultyLevel = "insane";
_root.gotoAndStop(3);
}
}
Instance of Symbol 343 MovieClip in Frame 28
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.currentLevel = 1;
_root.lives = 5;
_root.difficultyLevel = "hard";
_root.gotoAndStop(3);
}
}
Instance of Symbol 352 MovieClip in Frame 28
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.currentLevel = 1;
_root.lives = 10;
_root.difficultyLevel = "medium";
_root.gotoAndStop(3);
}
}
Instance of Symbol 361 MovieClip in Frame 28
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.currentLevel = 1;
_root.lives = 20;
_root.difficultyLevel = "easy";
_root.gotoAndStop(3);
}
}
Instance of Symbol 228 MovieClip in Frame 28
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
_root.clickMusic = new Sound();
_root.clickMusic.attachSound("clickSound");
_root.clickMusic.start(0, 1);
}
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.gotoAndStop(2);
}
}
Frame 29
stop();
_root.gotoAndStop(2);
Frame 30
_root.bonusTimer = 0;
_root.currentLevel = currentLevel + 1;
_root.trainTimer = 0;
_root.totalBonus = 0;
onMouseDown = function () {
if (_root.bonusTimer > 50) {
_root.bonusTimer = 190;
}
};
if (_root.firstTry == true) {
_root.train1.noDeaths.text = "No Deaths";
_root.train1.trainScore1.text = "+50";
} else {
_root.train1.noDeaths.text = "- - - - - - - - - - ";
}
if (_root.firstBlood == true) {
_root.train2.firstBlood.text = "FirstBlood ";
_root.train2.trainScore2.text = "+20 ";
} else {
_root.train2.firstBlood.text = "- - - - - - - - - - ";
}
if (_root.friendlyFire > 0) {
_root.train3.friendlyFire.text = "Friendly Fire X " + _root.friendlyFire;
if (_root.friendlyFire > 5) {
_root.train3.trainScore3.text = "+" + (_root.friendlyFire * 20);
} else {
_root.train3.trainScore3.text = ("+" + (_root.friendlyFire * 20)) + " ";
}
} else {
_root.train3.friendlyFire.text = "- - - - - - - - - - ";
}
if (_root.totalRichochets > 0) {
_root.train4.ricochetMaster.text = "Ricochet kill X " + _root.totalRichochets;
_root.train4.trainScore4.text = ("+" + (_root.totalRichochets * 10)) + " ";
} else {
_root.train4.ricochetMaster.text = "- - - - - - - - - - ";
}
if (_root.noShots == true) {
_root.train5.shotless.text = "No Shots";
_root.train5.trainScore5.text = "+100";
} else {
_root.train5.shotless.text = "- - - - - - - - - - ";
}
if (_root.firstTry == true) {
_root.totalBonus = _root.totalBonus + 50;
}
if (_root.firstBlood == true) {
_root.totalBonus = _root.totalBonus + 20;
}
if (_root.friendlyFire > 0) {
_root.totalBonus = _root.totalBonus + (_root.friendlyFire * 20);
}
if (_root.totalRichochets > 0) {
_root.totalBonus = _root.totalBonus + (_root.totalRichochets * 10);
}
if (_root.noShots == true) {
_root.totalBonus = _root.totalBonus + 100;
}
if (_root.totalShots != 0) {
_root.train6.accuracy.text = ("Accuracy Bonus: " + Math.floor((_root.hitShots / _root.totalShots) * 100)) + "%";
_root.train6.trainScore6.text = ("+" + Math.floor(((_root.hitShots / _root.totalShots) * 100) / 2)) + " ";
_root.totalBonus = _root.totalBonus + Math.floor(((_root.hitShots / _root.totalShots) * 100) / 2);
} else {
_root.train6.accuracy.text = "- - - - - - - - - - ";
}
if (_root.totalBonus == 0) {
_root.train3.friendlyFire.text = " No Bonuses";
}
_root.train7.total.text = "Total";
if (_root.totalBonus > 100) {
_root.train7.trainScore7.text = "+" + _root.totalBonus;
} else {
_root.train7.trainScore7.text = ("+" + _root.totalBonus) + " ";
}
onLoad = function () {
};
moveTrain = function (directionLR, finalX, mcName, eThis) {
_root.trainTimer++;
if (_root.trainTimer > 180) {
var _local4 = new flash.filters.BlurFilter(0, 0, 3);
var _local5 = new Array();
_local5.push(_local4);
_local4.blurX = 3.5;
_local4.blurY = 0;
if (directionLR == "Right") {
if (Math.abs(eThis._x - finalX) > 1) {
if (Math.abs((finalX - eThis._x) / 5) < 1) {
eThis._x++;
} else if (Math.abs((finalX - eThis._x) / 5) < 15) {
eThis._x = eThis._x + ((finalX - eThis._x) / 5);
} else {
eThis._x = eThis._x + 15;
}
} else {
eThis._x = finalX;
}
}
if (directionLR == "Left") {
if (Math.abs(eThis._x - finalX) > 1) {
if (Math.abs((finalX - eThis._x) / 5) < 1) {
eThis._x--;
} else if (Math.abs((finalX - eThis._x) / 5) < 15) {
eThis._x = eThis._x + ((finalX - eThis._x) / 5);
} else {
eThis._x = eThis._x - 15;
}
} else {
eThis._x = finalX;
}
}
if (_root.bonusTimer > 190) {
_root.levelPageTimer = 0;
_root.hitShots = 0;
_root.totalShots = 0;
_root.train1.changeDepthBack();
_root.train2.changeDepthBack();
_root.train3.changeDepthBack();
_root.train4.changeDepthBack();
_root.train5.changeDepthBack();
_root.train6.changeDepthBack();
_root.train7.changeDepthBack();
_root.destroyedTanks = 0;
_root.totalTanks = 0;
_root.pauseGame = true;
_root.tank1Alive = true;
_root.tank2Alive = true;
_root.tank3Alive = true;
_root.tank4Alive = true;
_root.tank5Alive = true;
_root.tank6Alive = true;
_root.tank7Alive = true;
_root.gameScore = _root.gameScore + _root.totalBonus;
_root.firstLevelTry = true;
_root.setLevelVariables();
_root.CannonBottom.swapDepths(10001);
_root.doNotStartMusic = true;
_root.transitionLevel = true;
_root.gotoAndStop(24);
}
}
};
Instance of Symbol 485 MovieClip "train1" in Frame 30
onClipEvent (load) {
var originalDepth = this.getDepth();
this.swapDepths(_root.getNextHighestDepth());
changeDepthBack = function () {
this.swapDepths(originalDepth);
};
}
onClipEvent (enterFrame) {
_root.moveTrain("Right", 575.1, this._name, this);
_root.bonusTimer++;
}
Instance of Symbol 489 MovieClip "train2" in Frame 30
onClipEvent (load) {
var originalDepth = this.getDepth();
this.swapDepths(_root.getNextHighestDepth());
changeDepthBack = function () {
this.swapDepths(originalDepth);
};
}
onClipEvent (enterFrame) {
_root.moveTrain("Left", 11.8, this._name, this);
}
Instance of Symbol 493 MovieClip "train4" in Frame 30
onClipEvent (load) {
var originalDepth = this.getDepth();
this.swapDepths(_root.getNextHighestDepth());
changeDepthBack = function () {
this.swapDepths(originalDepth);
};
}
onClipEvent (enterFrame) {
_root.moveTrain("Left", 12.75, this._name, this);
}
Instance of Symbol 497 MovieClip "train5" in Frame 30
onClipEvent (load) {
var originalDepth = this.getDepth();
this.swapDepths(_root.getNextHighestDepth());
changeDepthBack = function () {
this.swapDepths(originalDepth);
};
}
onClipEvent (enterFrame) {
_root.moveTrain("Right", 389.7, this._name, this);
}
Instance of Symbol 501 MovieClip "train6" in Frame 30
onClipEvent (load) {
var originalDepth = this.getDepth();
this.swapDepths(_root.getNextHighestDepth());
changeDepthBack = function () {
this.swapDepths(originalDepth);
};
}
onClipEvent (enterFrame) {
_root.moveTrain("Left", 170.3, this._name, this);
}
Instance of Symbol 506 MovieClip "train7" in Frame 30
onClipEvent (load) {
var originalDepth = this.getDepth();
this.swapDepths(_root.getNextHighestDepth());
changeDepthBack = function () {
this.swapDepths(originalDepth);
};
}
onClipEvent (enterFrame) {
_root.moveTrain("Right", 548.2, this._name, this);
}
Instance of Symbol 510 MovieClip "train3" in Frame 30
onClipEvent (load) {
var originalDepth = this.getDepth();
this.swapDepths(_root.getNextHighestDepth());
changeDepthBack = function () {
this.swapDepths(originalDepth);
};
}
onClipEvent (enterFrame) {
_root.moveTrain("Right", 359.08, this._name, this);
}
Symbol 14 MovieClip [Explosion(original)] Frame 15
this.removeMovieClip();
Symbol 16 MovieClip [Missile1] Frame 1
#initclip 25
Object.registerClass("Missile1", Missile1);
#endinitclip
stop();
Symbol 17 MovieClip [Missile2] Frame 1
#initclip 17
Object.registerClass("Missile2", Missile2);
#endinitclip
Symbol 20 MovieClip [Bomb] Frame 164
var explosion = _root.attachMovie("Explosion", "Explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
this.removeMovieClip();
Symbol 30 MovieClip Frame 1
this.ratio = _root.backgroundVolume;
blueTrain.onPress = function () {
this.startDrag(true, 0, 0, sliderLine._width, 0);
this.onEnterFrame = function () {
ratio = Math.round((this._x * 100) / sliderLine._width);
};
};
blueTrain.onRelease = (blueTrain.onReleaseOutside = stopDrag);
Instance of Symbol 29 MovieClip "blueTrain" in Symbol 30 MovieClip Frame 1
onClipEvent (load) {
this._x = _root.backgroundVolume * 3;
}
Symbol 33 MovieClip Frame 1
this.ratio = _root.effectsVolume;
redTrain.onPress = function () {
this.startDrag(true, 0, 0, sliderLine._width, 0);
this.onEnterFrame = function () {
ratio = Math.round((this._x * 100) / sliderLine._width);
};
};
redTrain.onRelease = (redTrain.onReleaseOutside = stopDrag);
Instance of Symbol 32 MovieClip "redTrain" in Symbol 33 MovieClip Frame 1
onClipEvent (load) {
this._x = _root.effectsVolume * 3;
}
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
stop();
Instance of Symbol 40 MovieClip in Symbol 43 MovieClip Frame 2
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
mochi.as2.MochiEvents.endPlay();
_root.backgroundMusicmc.stopMusic();
_root.backgroundMusicmc.backgroundMusic.stop();
var i = 0;
while (i <= 20) {
_root["bullet" + i].removeMovieClip();
i++;
}
_root.gotoAndStop(2);
}
}
Instance of Symbol 42 MovieClip in Symbol 43 MovieClip Frame 2
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_parent.gotoAndStop(1);
}
}
Symbol 48 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 2
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 2
stop();
Instance of Symbol 30 MovieClip in Symbol 53 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.backgroundVolume = this.ratio;
_root.backgroundMusic.setVolume(_root.backgroundVolume);
}
Instance of Symbol 33 MovieClip in Symbol 53 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.effectsVolume = this.ratio;
}
Instance of Symbol 43 MovieClip "pauseMenuButton" in Symbol 53 MovieClip Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 48 MovieClip in Symbol 53 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.controlScheme == "arrows") {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
_root.controlScheme = "wasd";
}
}
Instance of Symbol 52 MovieClip in Symbol 53 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.controlScheme == "wasd") {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
_root.controlScheme = "arrows";
}
}
Symbol 54 MovieClip [pauseMenu] Frame 1
this.swapDepths(_root.getNextHighestDepth());
Symbol 54 MovieClip [pauseMenu] Frame 17
_root.PauseTransition = false;
stop();
Symbol 60 MovieClip [Missile3] Frame 1
#initclip 18
Object.registerClass("Missile3", Missile3);
#endinitclip
Symbol 66 MovieClip [Cannon7] Frame 1
#initclip 19
Object.registerClass("Cannon7", Cannon7);
#endinitclip
Instance of Symbol 65 MovieClip "barrel2" in Symbol 66 MovieClip [Cannon7] Frame 1
onClipEvent (load) {
var rotationPoint;
var tank;
var anchX;
var anchY;
var offsetX;
var offsetY;
var bounce = 0;
var bounceTotal = 2;
var shootLimit = 10;
pendulum = 0;
penSmooth = 0;
penTick = 5.5;
var frameCount = 90;
var whileLoopFixer = 0;
clean1 = function () {
anchX = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
anchY = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
offsetX = 0;
offsetY = 0;
};
clean2 = function () {
anchX = (anchX + offsetX) + moveRL;
anchY = anchY + offsetY;
offsetX = 0;
offsetY = 0;
};
clean3 = function () {
anchX = anchX + offsetX;
anchY = (anchY + offsetY) + moveUD;
offsetX = 0;
offsetY = 0;
};
pointAt = function (x, y, offset) {
var _local4 = _parent._x - x;
var _local3 = _parent._y - y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6;
rotationPoint = (-Math.atan2(_local4, _local3)) / (Math.PI/180);
if (Math.abs(pendulum + penTick) > 60) {
penTick = penTick * -1;
} else {
pendulum = pendulum + penTick;
}
penSmooth = penSmooth + ((pendulum - penSmooth) / 10);
this._rotation = (rotationPoint - _parent._rotation) + penSmooth;
};
shoot = function () {
if (shootLimit > 30) {
var _local4 = _root.attachMovie("Missile2", "Missile2" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4._y = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4.tank = tank;
_local4.tankBounces = 2;
_local4.speed = 10;
_local4.shooter = this._parent;
shootLimit = 0;
}
};
aim = function () {
clean1();
shootRot = this._rotation + _parent._rotation;
moveRL = 10 * Math.sin(shootRot * (Math.PI/180));
moveUD = 10 * (-Math.cos(shootRot * (Math.PI/180)));
bounce = 0;
shot = false;
whileLoopFixer = 0;
do {
if (bounce >= bounceTotal) {
break;
}
if (_root.CannonBottom.hitTest(anchX + offsetX, anchY + offsetY, true)) {
shot = true;
break;
}
if (_root.wall.hitTest((anchX + offsetX) + moveRL, anchY + offsetY, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean3();
moveRL = moveRL * -1;
bounce++;
} else if (_root.wall.hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean2();
moveUD = moveUD * -1;
bounce++;
} else {
offsetX = offsetX + moveRL;
offsetY = offsetY + moveUD;
whileLoopFixer++;
}
} while (whileLoopFixer <= 200);
if (shot) {
shoot();
}
};
aim();
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
}
onClipEvent (enterFrame) {
if (_root.pauseGame == false) {
shootLimit++;
frameCount++;
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
if (frameCount >= 5) {
aim();
frameCount = 0;
}
}
}
Symbol 68 MovieClip [Cannon4] Frame 1
#initclip 20
Object.registerClass("Cannon4", Cannon4);
#endinitclip
Instance of Symbol 65 MovieClip "barrel2" in Symbol 68 MovieClip [Cannon4] Frame 1
onClipEvent (load) {
var rotationPoint;
var tank;
var anchX;
var anchY;
var offsetX;
var offsetY;
var bounce = 0;
var bounceTotal = 1;
var shootLimit = 0;
var frameCount = 0;
var whileLoopFixer = 0;
var aimAngle;
clean1 = function () {
anchX = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
anchY = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
offsetX = 0;
offsetY = 0;
};
clean2 = function () {
anchX = (anchX + offsetX) + moveRL;
anchY = anchY + offsetY;
offsetX = 0;
offsetY = 0;
};
clean3 = function () {
anchX = anchX + offsetX;
anchY = (anchY + offsetY) + moveUD;
offsetX = 0;
offsetY = 0;
};
pointAt = function (x, y, offset) {
var _local4 = _parent._x - x;
var _local3 = _parent._y - y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6;
rotationPoint = (-Math.atan2(_local4, _local3)) / (Math.PI/180);
this._rotation = aimAngle;
};
shoot = function () {
if (shootLimit > 10) {
var _local4 = _root.attachMovie("Missile2", "Missile2" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4._y = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4.tank = tank;
_local4.tankBounces = 1;
_local4.speed = 7;
_local4.shooter = this._parent;
shootLimit = 0;
}
};
aim = function () {
clean1();
shootRot = this._rotation + _parent._rotation;
moveRL = 10 * Math.sin(shootRot * (Math.PI/180));
moveUD = 10 * (-Math.cos(shootRot * (Math.PI/180)));
bounce = 0;
shot = false;
whileLoopFixer = 0;
do {
if (bounce >= bounceTotal) {
break;
}
if (_root.CannonBottom.hitTest(anchX + offsetX, anchY + offsetY, true)) {
shot = true;
break;
}
if (_root.wall.hitTest((anchX + offsetX) + moveRL, anchY + offsetY, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean3();
moveRL = moveRL * -1;
bounce++;
} else if (_root.wall.hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean2();
moveUD = moveUD * -1;
bounce++;
} else {
offsetX = offsetX + moveRL;
offsetY = offsetY + moveUD;
whileLoopFixer++;
}
} while (whileLoopFixer <= 200);
if (shot) {
shoot();
}
};
this._rotation = aimAngle;
}
onClipEvent (enterFrame) {
if (_root.pauseGame == false) {
shootLimit++;
frameCount++;
if (frameCount >= 5) {
aim();
frameCount = 0;
}
}
}
Symbol 70 MovieClip [Cannon6] Frame 1
#initclip 21
Object.registerClass("Cannon6", Cannon6);
#endinitclip
Instance of Symbol 65 MovieClip "barrel2" in Symbol 70 MovieClip [Cannon6] Frame 1
onClipEvent (load) {
var rotationPoint = 0;
var tank;
var anchX;
var anchY;
var offsetX;
var offsetY;
var bounce = 0;
var bounceTotal = 2;
var shootLimit = 10;
pendulum = 0;
penSmooth = 0;
penTick = 5.5;
var frameCount = 90;
var whileLoopFixer = 0;
clean1 = function () {
anchX = _parent._x + (Math.sin(((this._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
anchY = _parent._y - (Math.cos(((this._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
offsetX = 0;
offsetY = 0;
};
clean2 = function () {
anchX = (anchX + offsetX) + moveRL;
anchY = anchY + offsetY;
offsetX = 0;
offsetY = 0;
};
clean3 = function () {
anchX = anchX + offsetX;
anchY = (anchY + offsetY) + moveUD;
offsetX = 0;
offsetY = 0;
};
pointAt = function (x, y, offset) {
var _local4 = _parent._x - x;
var _local3 = _parent._y - y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6;
rotationPoint = (-Math.atan2(_local4, _local3)) / (Math.PI/180);
if (Math.abs(pendulum + penTick) > 60) {
penTick = penTick * -1;
} else {
pendulum = pendulum + penTick;
}
penSmooth = penSmooth + ((pendulum - penSmooth) / 10);
this._rotation = (rotationPoint - _parent._rotation) + penSmooth;
};
shoot = function () {
if (shootLimit > 30) {
var _local4 = _root.attachMovie("Missile2", "Missile2" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4._y = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4.tank = tank;
_local4.tankBounces = 2;
_local4.speed = 10;
_local4.shooter = this._parent;
shootLimit = 0;
}
};
aim = function () {
clean1();
shootRot = this._rotation + _parent._rotation;
moveRL = 10 * Math.sin(shootRot * (Math.PI/180));
moveUD = 10 * (-Math.cos(shootRot * (Math.PI/180)));
bounce = 0;
shot = false;
whileLoopFixer = 0;
do {
if (bounce >= bounceTotal) {
break;
}
if (_root.CannonBottom.hitTest(anchX + offsetX, anchY + offsetY, true)) {
shot = true;
break;
}
if (_root.wall.hitTest((anchX + offsetX) + moveRL, anchY + offsetY, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean3();
moveRL = moveRL * -1;
bounce++;
} else if (_root.wall.hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean2();
moveUD = moveUD * -1;
bounce++;
} else {
offsetX = offsetX + moveRL;
offsetY = offsetY + moveUD;
whileLoopFixer++;
}
} while (whileLoopFixer <= 200);
if (shot) {
shoot();
}
};
_parent.moveRot = random(360) - 180;
_parent._rotation = _parent.moveRot;
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
aim();
}
onClipEvent (enterFrame) {
if (_root.pauseGame == false) {
shootLimit++;
frameCount++;
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
if (frameCount >= 5) {
aim();
frameCount = 0;
}
}
}
Symbol 72 MovieClip [Cannon3] Frame 1
#initclip 22
Object.registerClass("Cannon3", Cannon3);
#endinitclip
Instance of Symbol 65 MovieClip "barrel2" in Symbol 72 MovieClip [Cannon3] Frame 1
onClipEvent (load) {
var rotationPoint;
var tank;
var anchX;
var anchY;
var offsetX;
var offsetY;
var bounce = 0;
var bounceTotal = 3;
var shootLimit = 0;
var whileWatcher = 0;
pendulum = 0;
penSmooth = 0;
penTick = 3;
var frameCount = 0;
clean1 = function () {
anchX = _parent._x + (Math.sin((_parent.barrel2._rotation * Math.PI) / 180) * 22.35);
anchY = _parent._y - (Math.cos((_parent.barrel2._rotation * Math.PI) / 180) * 22.35);
offsetX = 0;
offsetY = 0;
};
clean2 = function () {
anchX = (anchX + offsetX) + moveRL;
anchY = anchY + offsetY;
offsetX = 0;
offsetY = 0;
};
clean3 = function () {
anchX = anchX + offsetX;
anchY = (anchY + offsetY) + moveUD;
offsetX = 0;
offsetY = 0;
};
pointAt = function (x, y, offset) {
var _local4 = _parent._x - x;
var _local3 = _parent._y - y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6;
rotationPoint = (-Math.atan2(_local4, _local3)) / (Math.PI/180);
if (Math.abs(pendulum + penTick) > 50) {
penTick = penTick * -1;
} else {
pendulum = pendulum + penTick;
}
penSmooth = penSmooth + ((pendulum - penSmooth) / 10);
this._rotation = rotationPoint + penSmooth;
};
shoot = function () {
if (shootLimit > 10) {
var _local4 = _root.attachMovie("Missile2", "Missile2" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = _parent._x + (Math.sin((_parent.barrel2._rotation * Math.PI) / 180) * 22.35);
_local4._y = _parent._y - (Math.cos((_parent.barrel2._rotation * Math.PI) / 180) * 22.35);
_local4.tank = tank;
_local4.tankBounces = 3;
_local4.speed = 10;
_local4.shooter = this._parent;
shootLimit = 0;
}
};
aim = function () {
clean1();
shootRot = this._rotation;
moveRL = 8 * Math.sin(shootRot * (Math.PI/180));
moveUD = 8 * (-Math.cos(shootRot * (Math.PI/180)));
bounce = 0;
shot = false;
while (bounce < bounceTotal) {
whileWatcher++;
if (whileWatcher > 200) {
break;
}
if (_root.CannonBottom.hitTest(anchX + offsetX, anchY + offsetY, true)) {
shot = true;
break;
}
if (_root.wall.hitTest((anchX + offsetX) + moveRL, anchY + offsetY, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean3();
moveRL = moveRL * -1;
bounce++;
} else if (_root.wall.hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean2();
moveUD = moveUD * -1;
bounce++;
} else {
offsetX = offsetX + moveRL;
offsetY = offsetY + moveUD;
}
}
whileWatcher = 0;
if (shot) {
shoot();
}
};
aim();
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
}
onClipEvent (enterFrame) {
if (_root.pauseGame == false) {
shootLimit++;
frameCount++;
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
if (frameCount >= 5) {
aim();
frameCount = 0;
}
}
}
Symbol 74 MovieClip [Cannon5] Frame 1
#initclip 23
Object.registerClass("Cannon5", Cannon5);
#endinitclip
Instance of Symbol 65 MovieClip "barrel2" in Symbol 74 MovieClip [Cannon5] Frame 1
onClipEvent (load) {
var rotationPoint;
var tank;
var anchX;
var anchY;
var offsetX;
var offsetY;
var bounce = 0;
var bounceTotal = 1;
var shootLimit = 40;
pendulum = 0;
penSmooth = 0;
penTick = 1;
var frameCount = 90;
var whileLoopFixer = 0;
clean1 = function () {
anchX = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
anchY = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
offsetX = 0;
offsetY = 0;
};
clean2 = function () {
anchX = (anchX + offsetX) + moveRL;
anchY = anchY + offsetY;
offsetX = 0;
offsetY = 0;
};
clean3 = function () {
anchX = anchX + offsetX;
anchY = (anchY + offsetY) + moveUD;
offsetX = 0;
offsetY = 0;
};
pointAt = function (x, y, offset) {
var _local4 = _parent._x - x;
var _local3 = _parent._y - y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6;
rotationPoint = (-Math.atan2(_local4, _local3)) / (Math.PI/180);
if (Math.abs(pendulum + penTick) > 90) {
penTick = penTick * -1;
} else {
pendulum = pendulum + penTick;
}
this._rotation = rotationPoint - _parent._rotation;
};
shoot = function () {
if (shootLimit > 70) {
var _local4 = _root.attachMovie("Missile2", "Missile2" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4._y = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4.tank = tank;
_local4.tankBounces = 1;
_local4.speed = 10;
_local4.shooter = this._parent;
shootLimit = 0;
}
};
aim = function () {
clean1();
shootRot = this._rotation + _parent._rotation;
moveRL = 10 * Math.sin(shootRot * (Math.PI/180));
moveUD = 10 * (-Math.cos(shootRot * (Math.PI/180)));
bounce = 0;
shot = false;
whileLoopFixer = 0;
do {
if (bounce >= bounceTotal) {
break;
}
if (_root.CannonBottom.hitTest(anchX + offsetX, anchY + offsetY, true)) {
shot = true;
break;
}
if (_root.wall.hitTest((anchX + offsetX) + moveRL, anchY + offsetY, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean3();
moveRL = moveRL * -1;
bounce++;
} else if (_root.wall.hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean2();
moveUD = moveUD * -1;
bounce++;
} else {
offsetX = offsetX + moveRL;
offsetY = offsetY + moveUD;
whileLoopFixer++;
}
} while (whileLoopFixer <= 200);
if (shot) {
shoot();
}
};
_parent.moveRot = random(360) - 180;
_parent._rotation = _parent.moveRot;
aim();
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
}
onClipEvent (enterFrame) {
if (_root.pauseGame == false) {
shootLimit++;
frameCount++;
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
if (frameCount >= 5) {
aim();
frameCount = 0;
}
}
}
Symbol 80 MovieClip [Cannon2] Frame 1
#initclip 24
Object.registerClass("Cannon2", Cannon2);
#endinitclip
Instance of Symbol 65 MovieClip "barrel2" in Symbol 80 MovieClip [Cannon2] Frame 1
onClipEvent (load) {
var rotationPoint = 0;
var tank;
var anchX;
var anchY;
var offsetX;
var offsetY;
var bounce = 0;
var bounceTotal = 1;
var shootLimit = 0;
pendulum = 0;
penSmooth = 0;
penTick = 1;
var frameCount = 0;
var whileLoopFixer = 0;
b = 30;
clean1 = function () {
anchX = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
anchY = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
offsetX = 0;
offsetY = 0;
};
clean2 = function () {
anchX = (anchX + offsetX) + moveRL;
anchY = anchY + offsetY;
offsetX = 0;
offsetY = 0;
};
clean3 = function () {
anchX = anchX + offsetX;
anchY = (anchY + offsetY) + moveUD;
offsetX = 0;
offsetY = 0;
};
pointAt = function (x, y, offset) {
var _local4 = _parent._x - x;
var _local3 = _parent._y - y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local6;
rotationPoint = (-Math.atan2(_local4, _local3)) / (Math.PI/180);
if (Math.abs(pendulum + penTick) > 90) {
penTick = penTick * -1;
} else {
pendulum = pendulum + penTick;
}
this._rotation = rotationPoint + pendulum;
};
shoot = function () {
if (shootLimit > 10) {
var _local4 = _root.attachMovie("Missile2", "Missile2" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = _parent._x + (Math.sin(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4._y = _parent._y - (Math.cos(((_parent.barrel2._rotation + _parent._rotation) * Math.PI) / 180) * 22.35);
_local4.tank = tank;
_local4.tankBounces = 1;
_local4.speed = 7;
_local4.shooter = this._parent;
shootLimit = 0;
}
};
aim = function () {
clean1();
shootRot = this._rotation + _parent._rotation;
moveRL = 3 * Math.sin(shootRot * (Math.PI/180));
moveUD = 3 * (-Math.cos(shootRot * (Math.PI/180)));
bounce = 0;
shot = false;
whileLoopFixer = 0;
do {
if (bounce >= bounceTotal) {
break;
}
if (_root.CannonBottom.hitTest(anchX + offsetX, anchY + offsetY, true)) {
shot = true;
break;
}
if (_root.wall.hitTest((anchX + offsetX) + moveRL, anchY + offsetY, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean3();
moveRL = moveRL * -1;
bounce++;
} else if (_root.wall.hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest(anchX + offsetX, (anchY + offsetY) + moveUD, true))) {
clean2();
moveUD = moveUD * -1;
bounce++;
} else {
offsetX = offsetX + moveRL;
offsetY = offsetY + moveUD;
whileLoopFixer++;
}
} while (whileLoopFixer <= 200);
if (shot) {
shoot();
}
};
aim();
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
}
onClipEvent (enterFrame) {
if (_root._currentframe != 24) {
if (_root.pauseGame == false) {
shootLimit++;
frameCount++;
pointAt(_root.CannonBottom._x, _root.CannonBottom._y, 90);
if (frameCount >= 5) {
aim();
frameCount = 0;
}
}
if (this.b > 0) {
this.b--;
} else {
this.b = 60 + random(60);
}
}
}
Symbol 105 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 2
stop();
Symbol 106 MovieClip Frame 1
function timerHandler() {
if (!loadingComplete) {
var _local2 = _root.getBytesLoaded() / _root.getBytesTotal();
tankPre._x = (487 * _local2) - 210.1;
bar._xscale = 100 * _local2;
if (_local2 == 1) {
loadingComplete = true;
gotoAndStop ("loaded");
return(undefined);
}
}
}
_root.stop();
stop();
var loadingComplete = false;
onEnterFrame = function () {
timerHandler();
};
stop();
Instance of Symbol 93 MovieClip in Symbol 106 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
getURL ("http://www.andkon.com/arcade/", "_blank");
}
}
Symbol 106 MovieClip Frame 2
stop();
Instance of Symbol 105 MovieClip in Symbol 106 MovieClip Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
}
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.gotoAndPlay(29);
}
}
onClipEvent (load) {
_root.gotoAndStop(29);
}
Symbol 511 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 512 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function setNotifications(clip, style) {
var _local2 = {};
for (var _local3 in style) {
_local2[_local3] = style[_local3];
}
_local2.clip = clip;
mochi.as2.MochiServices.send("events_setNotifications", _local2, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startPlay(tag) {
if (tag == undefined) {
tag = "gameplay";
}
mochi.as2.MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null);
}
static function endPlay() {
mochi.as2.MochiServices.send("events_clearRoundID", null, null, null);
}
static function trackEvent(tag, value) {
mochi.as2.MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null);
}
static var ACHIEVEMENT_RECEIVED = "AchievementReceived";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 513 MovieClip [__Packages.mochi.as2.MochiSync] Frame 0
class mochi.as2.MochiSync
{
var _syncContainer;
function MochiSync () {
_syncContainer = {};
}
function getProp(name) {
return(_syncContainer[name]);
}
function setProp(name, value) {
if (_syncContainer[name] == value) {
return(undefined);
}
_syncContainer[name] = value;
mochi.as2.MochiServices.send("sync_propUpdate", {name:name, value:value});
}
function triggerEvent(eventType, args) {
switch (eventType) {
case SYNC_REQUEST :
mochi.as2.MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY :
_syncContainer[args.name] = args.value;
}
}
static var SYNC_REQUEST = "SyncRequest";
static var SYNC_PROPERTY = "UpdateProperty";
}
Symbol 514 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.8 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError.apply(null, [errorCode]);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
break;
case "sync" :
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function updateCopy(args) {
send("coins_updateCopy", args, null, null);
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var servicesSync = new mochi.as2.MochiSync();
}
Symbol 515 MovieClip [__Packages.mochi.as2.MochiSocial] Frame 0
class mochi.as2.MochiSocial
{
function MochiSocial () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("coins_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("coins_hideLoginWidget");
}
static function requestLogin() {
mochi.as2.MochiServices.send("coins_requestLogin");
}
static function getUserInfo() {
mochi.as2.MochiServices.send("coins_getUserInfo");
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("coins_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var LOGIN_SHOWN = "LoginShown";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 516 MovieClip [__Packages.Missile2] Frame 0
class Missile2 extends MovieClip
{
var bulletNum, ySpeed, _rotation, xSpeed, _x, _y, removeMovieClip, _name, frameShot, tank, barrelRotation, speed, hitTest, shooter, tankBounces;
function Missile2 () {
super();
}
function findBulletNumber() {
var _local3 = 0;
while (_local3 <= 20) {
if (_root.CannonBottom.bulletNumbers[_local3] == false) {
_root.CannonBottom.bulletNumbers[_local3] = true;
bulletNum = _local3;
return(_local3);
}
_local3++;
}
}
function UDBounce() {
ySpeed = ySpeed * -1;
_rotation = 180 - _rotation;
bounces++;
bounceUDCounter = 0;
}
function LRBounce() {
xSpeed = xSpeed * -1;
_rotation = _rotation * -1;
bounces++;
bounceCounter = 0;
}
function bulletCollision() {
var _local3 = 0;
while (_local3 <= 20) {
if ((_root.CannonBottom.bulletNumbers[_local3] == true) && (_local3 != bulletNum)) {
if (_root["bullet" + _local3].hitTest(_x + (xSpeed / 2), _y + (ySpeed / 2), true)) {
_root["bullet" + _local3].explode();
explode();
break;
}
if (_root["bullet" + _local3].hitTest(_x - (xSpeed / 2), _y - (ySpeed / 2), true)) {
_root["bullet" + _local3].explode();
explode();
break;
}
}
_local3++;
}
}
function explode() {
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("smallExplosion", "smallExplosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
if (_root.cratersOnOff == "on") {
_root.leaveSmallCrater(_x - xSpeed, _y - ySpeed);
}
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
}
function explodeNoExplosion() {
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
}
function onLoad() {
_name = "bullet" + findBulletNumber();
frameShot = _root.currentLevel;
_rotation = _root[tank].barrel2._rotation + _root[tank]._rotation;
barrelRotation = _root[tank].barrel2._rotation + _root[tank]._rotation;
xSpeed = (Math.sin(barrelRotation * (Math.PI/180)) * speed) * -1;
ySpeed = Math.cos(barrelRotation * (Math.PI/180)) * speed;
}
function onEnterFrame() {
if ((((_x < -100) || (_x > 600)) || (_y > 500)) || (_y < -100)) {
explode();
}
if ((_root.pauseGame == false) || (_root.transitionLevel == true)) {
bounceCounter++;
bounceUDCounter++;
wallBounceCounter++;
_y = _y - ySpeed;
_x = _x - xSpeed;
bulletCollision();
var _local3 = 1;
while (_local3 <= (_root.totalTanks + 1)) {
if (hitTest(_root["tank" + _local3]) && (temp >= 2)) {
_root[_name].explosionMusic.setPan((_x / 2.25) - 100);
_root[_name].explosionMusic.start(0, 1);
_root.yellIt(shooter._x, shooter._y, "friendly");
removeMovieClip();
_root.friendlyFire++;
_root["tank" + _local3].die();
}
_local3++;
}
if (hitTest(_root.CannonBottom) && (temp >= 2)) {
_root[_name].explosionMusic.setPan((_x / 2.25) - 100);
_root[_name].explosionMusic.start(0, 1);
_root.yellIt(shooter._x, shooter._y, "win");
_root.killerX = shooter._x;
_root.killerY = shooter._y;
_root.killerType = shooter.tankType;
_root.killerRotation = shooter._rotation;
_root.killerBarrelRotation = shooter.barrel2._rotation;
_root.CannonBottom.die();
removeMovieClip();
} else {
temp++;
}
if ((_root.wall.sideWallR.hitTest(_x - xSpeed, _y - ySpeed, true) || (_root.wall.sideWallL.hitTest(_x - xSpeed, _y - ySpeed, true))) && (bounceCounter > 5)) {
LRBounce();
} else if ((_root.wall.sideWallU.hitTest(_x - xSpeed, _y - ySpeed, true) || (_root.wall.sideWallD.hitTest(_x - xSpeed, _y - ySpeed, true))) && (bounceUDCounter > 5)) {
UDBounce();
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x + xSpeed, _y, true)) {
LRBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x - xSpeed, _y, true)) {
LRBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y + ySpeed, true)) {
UDBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y - ySpeed, true)) {
UDBounce();
wallBounceCounter = 0;
}
if ((_y < 0) || (bounces >= tankBounces)) {
explode();
}
if ((frameShot != _root.currentLevel) && (frameShot != undefined)) {
_root.CannonBottom.totalBullets = 0;
removeMovieClip();
}
}
}
var bounces = 0;
var bounceCounter = 10;
var bounceUDCounter = 10;
var temp = 0;
var wallBounceCounter = 10;
}
Symbol 517 MovieClip [__Packages.Missile3] Frame 0
class Missile3 extends MovieClip
{
var bulletNum, ySpeed, _rotation, xSpeed, _x, _y, removeMovieClip, frameShot, _name, firstBulletShot, hitTest;
function Missile3 () {
super();
}
function findBulletNumber() {
var _local3 = 0;
while (_local3 <= 20) {
if (_root.CannonBottom.bulletNumbers[_local3] == false) {
_root.CannonBottom.bulletNumbers[_local3] = true;
bulletNum = _local3;
return(_local3);
}
_local3++;
}
}
function UDBounce() {
ySpeed = ySpeed * -1;
_rotation = 180 - _rotation;
bounces++;
bounceUDCounter = 0;
}
function LRBounce() {
xSpeed = xSpeed * -1;
_rotation = _rotation * -1;
bounces++;
bounceCounter = 0;
}
function bulletCollision() {
var _local3 = 0;
while (_local3 <= 20) {
if ((_root.CannonBottom.bulletNumbers[_local3] == true) && (_local3 != bulletNum)) {
if (_root["bullet" + _local3].hitTest(_x + (xSpeed / 2), _y + (ySpeed / 2), true)) {
_root["bullet" + _local3].explode();
explode();
break;
}
if (_root["bullet" + _local3].hitTest(_x - (xSpeed / 2), _y - (ySpeed / 2), true)) {
_root.totalShots--;
if (_root["bullet" + _local3].missileOne == true) {
_root.totalShots--;
}
_root["bullet" + _local3].explode();
explode();
break;
}
}
_local3++;
}
}
function explode() {
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("smallExplosion", "smallExplosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
if (_root.cratersOnOff == "on") {
_root.leaveSmallCrater(_x, _y);
}
_root.CannonBottom.totalBullets--;
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
}
function explodeNoExplosion() {
_root.CannonBottom.totalBullets--;
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
}
function onLoad() {
var _local3 = 7;
_root.totalShots++;
frameShot = _root.currentLevel;
_name = "bullet" + findBulletNumber();
_root.noShots = false;
firstBulletShot = false;
if (_root.firstShot == true) {
firstBulletShot = true;
_root.firstShot = false;
}
_rotation = (180 + ((Math.atan2(_root._ymouse - _root.CannonBottom._y, _root._xmouse - _root.CannonBottom._x) * 180) / Math.PI)) - 90;
xSpeed = (Math.sin(_rotation * (Math.PI/180)) * _local3) * -1;
ySpeed = Math.cos(_rotation * (Math.PI/180)) * _local3;
}
function onEnterFrame() {
if ((_root.pauseGame == false) || (_root.transitionLevel == true)) {
bounceCounter++;
bounceUDCounter++;
wallBounceCounter++;
_y = _y - ySpeed;
_x = _x - xSpeed;
bulletCollision();
var _local3 = 1;
while (_local3 <= (_root.totalTanks + 1)) {
if (hitTest(_root["tank" + _local3]) && (temp > 3)) {
_root.hitShots++;
if (firstBulletShot == true) {
_root.firstBlood = true;
}
if (bounces > 0) {
_root.oneRicochet = true;
_root.totalRichochets++;
} else {
_root.allRicochet = false;
}
_root.yellIt(_root["tank" + _local3]._x, _root["tank" + _local3]._y, "die");
_root.CannonBottom.totalBullets--;
_root.CannonBottom.bulletNumbers[bulletNum] = false;
_root[_name].gotoAndStop(2);
removeMovieClip();
_root["tank" + _local3].die();
break;
}
_local3++;
}
if (hitTest(_root.CannonBottom) && (temp > 3)) {
explode();
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
} else {
temp++;
}
if ((_root.wall.sideWallR.hitTest(_x - xSpeed, _y - ySpeed, true) || (_root.wall.sideWallL.hitTest(_x - xSpeed, _y - ySpeed, true))) && (bounceCounter > 5)) {
LRBounce();
} else if ((_root.wall.sideWallU.hitTest(_x - xSpeed, _y - ySpeed, true) || (_root.wall.sideWallD.hitTest(_x - xSpeed, _y - ySpeed, true))) && (bounceUDCounter > 5)) {
UDBounce();
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x + xSpeed, _y, true)) {
LRBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x - xSpeed, _y, true)) {
LRBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y + ySpeed, true)) {
UDBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y - ySpeed, true)) {
UDBounce();
wallBounceCounter = 0;
}
if ((_y < 0) || (bounces >= 2)) {
explode();
}
if ((frameShot != _root.currentLevel) && (frameShot != undefined)) {
_root.CannonBottom.totalBullets = 0;
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
}
}
}
var missileOne = true;
var bounces = 0;
var bounceCounter = 10;
var bounceUDCounter = 10;
var temp = 0;
var wallBounceCounter = 10;
}
Symbol 518 MovieClip [__Packages.Cannon7] Frame 0
class Cannon7 extends MovieClip
{
var _name, _x, _y, swapDepths, removeMovieClip;
function Cannon7 () {
super();
}
function onLoad() {
var _local3 = 0;
while (_local3 <= 10) {
if (_root.CannonBottom.tankNumbers[_local3] == false) {
_root.CannonBottom.tankNumbers[_local3] = true;
_name = "tank" + (_local3 + 1);
break;
}
_local3++;
}
_root[_name].barrel2.tank = _name;
_root.totalTanks++;
if (_root[_name + "Alive"] == false) {
dieNoExplosion();
}
}
function die() {
if (_root.cratersOnOff == "on") {
_root.leaveCrater(_x, _y);
}
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("Explosion", "Explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.gameScoreChange("Cannon7");
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
function dieNoExplosion() {
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
var speed = 2;
var shootlimit = 0;
var killerVariable = false;
var startCount = false;
var tankType = 7;
}
Symbol 519 MovieClip [__Packages.Cannon4] Frame 0
class Cannon4 extends MovieClip
{
var _name, _x, _y, swapDepths, removeMovieClip;
function Cannon4 () {
super();
}
function onLoad() {
var _local3 = 0;
while (_local3 <= 10) {
if (_root.CannonBottom.tankNumbers[_local3] == false) {
_root.CannonBottom.tankNumbers[_local3] = true;
_name = "tank" + (_local3 + 1);
break;
}
_local3++;
}
_root[_name].barrel2.tank = _name;
_root.totalTanks++;
if (_root[_name + "Alive"] == false) {
dieNoExplosion();
}
}
function die() {
if (_root.cratersOnOff == "on") {
_root.leaveCrater(_x, _y);
}
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("Explosion", "Explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.gameScoreChange("Cannon4");
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
function dieNoExplosion() {
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
var speed = 2;
var shootlimit = 0;
var killerVariable = false;
var startCount = false;
var tankType = 4;
}
Symbol 520 MovieClip [__Packages.Cannon6] Frame 0
class Cannon6 extends MovieClip
{
var _name, choice, choice2, moveRL, moveUD, moveBool, _x, speedRL, _y, speedUD, swapDepths, removeMovieClip, anchX, anchY, offsetX, offsetY, _rotation;
function Cannon6 () {
super();
}
function onLoad() {
var _local3 = 0;
while (_local3 <= 10) {
if (_root.CannonBottom.tankNumbers[_local3] == false) {
_root.CannonBottom.tankNumbers[_local3] = true;
_name = "tank" + (_local3 + 1);
break;
}
_local3++;
}
_root[_name].barrel2.tank = _name;
_root.totalTanks++;
if (_root[_name + "Alive"] == false) {
dieNoExplosion();
}
}
function onEnterFrame() {
if (_root.pauseGame == false) {
mover();
frameCount++;
frameCount2++;
if (frameCount > 30) {
choice = random(2);
frameCount = 0;
}
if ((frameCount2 > 30) && (changer == true)) {
choice2 = random(3);
frameCount2 = 0;
}
if (moveRL < 0) {
leftCollision();
} else if (moveRL > 0) {
rightCollision();
}
if (moveUD < 0) {
upCollision();
} else if (moveUD > 0) {
downCollision();
}
if (moveBool) {
_x = _x + speedRL;
_y = _y + speedUD;
}
}
}
function die() {
if (_root.cratersOnOff == "on") {
_root.leaveCrater(_x, _y);
}
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("Explosion", "Explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.gameScoreChange("Cannon6");
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
function dieNoExplosion() {
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
function clean() {
anchX = _x;
anchY = _y;
offsetX = 0;
offsetY = 0;
}
function leftCollision() {
if (_root.wall.hitTest(_x - 12.5, _y, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 12.5, _y, true))) {
if (speedRL < 0) {
speedRL = 0;
}
} else if (_root.wall.hitTest(_x - 12.5, _y - 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 12.5, _y - 11, true))) {
if (speedRL < 0) {
speedRL = 0;
}
} else if (_root.wall.hitTest(_x - 12.5, _y + 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 12.5, _y + 11, true))) {
if (speedRL < 0) {
speedRL = 0;
}
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_name != ("tank" + _local3)) {
if (_root["tank" + _local3].hitTest(_x - 12.5, _y, true)) {
if (speedRL < 0) {
speedRL = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x - 12.5, _y - 11, true)) {
if (speedRL < 0) {
speedRL = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x - 12.5, _y + 11, true)) {
if (speedRL < 0) {
speedRL = 0;
break;
}
}
}
_local3++;
}
if (_root.CannonBottom.hitTest(_x - 12.5, _y, true)) {
if (speedRL < 0) {
speedRL = 0;
}
}
if (_root.CannonBottom.hitTest(_x - 12.5, _y - 11, true)) {
if (speedRL < 0) {
speedRL = 0;
}
}
if (_root.CannonBottom.hitTest(_x - 12.5, _y + 11, true)) {
if (speedRL < 0) {
speedRL = 0;
}
}
}
function rightCollision() {
if (_root.wall.hitTest(_x + 12.5, _y, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 12.5, _y, true))) {
if (speedRL > 0) {
speedRL = 0;
}
} else if (_root.wall.hitTest(_x + 12.5, _y - 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 12.5, _y - 11, true))) {
if (speedRL > 0) {
speedRL = 0;
}
} else if (_root.wall.hitTest(_x + 12.5, _y + 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 12.5, _y + 11, true))) {
if (speedRL > 0) {
speedRL = 0;
}
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_name != ("tank" + _local3)) {
if (_root["tank" + _local3].hitTest(_x + 12.5, _y, true)) {
if (speedRL > 0) {
speedRL = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x + 12.5, _y - 11, true)) {
if (speedRL > 0) {
speedRL = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x + 12.5, _y + 11, true)) {
if (speedRL > 0) {
speedRL = 0;
break;
}
}
}
_local3++;
}
if (_root.CannonBottom.hitTest(_x + 12.5, _y, true)) {
if (speedRL > 0) {
speedRL = 0;
}
}
if (_root.CannonBottom.hitTest(_x + 12.5, _y - 11, true)) {
if (speedRL > 0) {
speedRL = 0;
}
}
if (_root.CannonBottom.hitTest(_x + 12.5, _y + 11, true)) {
if (speedRL > 0) {
speedRL = 0;
}
}
}
function upCollision() {
if (_root.wall.hitTest(_x, _y - 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y - 12.5, true))) {
if (speedUD < 0) {
speedUD = 0;
}
} else if (_root.wall.hitTest(_x - 11, _y - 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 11, _y - 12.5, true))) {
if (speedUD < 0) {
speedUD = 0;
}
} else if (_root.wall.hitTest(_x + 11, _y - 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 11, _y - 12.5, true))) {
if (speedUD < 0) {
speedUD = 0;
}
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_name != ("tank" + _local3)) {
if (_root["tank" + _local3].hitTest(_x, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x - 11, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x + 11, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
break;
}
}
}
_local3++;
}
if (_root.CannonBottom.hitTest(_x, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
}
}
if (_root.CannonBottom.hitTest(_x - 11, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
}
}
if (_root.CannonBottom.hitTest(_x + 11, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
}
}
}
function downCollision() {
if (_root.wall.hitTest(_x, _y + 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y + 12.5, true))) {
if (speedUD > 0) {
speedUD = 0;
}
} else if (_root.wall.hitTest(_x - 11, _y + 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 11, _y + 12.5, true))) {
if (speedUD > 0) {
speedUD = 0;
}
} else if (_root.wall.hitTest(_x + 11, _y + 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 11, _y + 12.5, true))) {
if (speedUD > 0) {
speedUD = 0;
}
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_name != ("tank" + _local3)) {
if (_root["tank" + _local3].hitTest(_x, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x - 11, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x + 11, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
break;
}
}
}
_local3++;
}
if (_root.CannonBottom.hitTest(_x, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
}
}
if (_root.CannonBottom.hitTest(_x - 11, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
}
}
if (_root.CannonBottom.hitTest(_x + 11, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
}
}
}
function mover() {
clean();
moveRL = Math.sin(moveRot * (Math.PI/180));
moveUD = -Math.cos(moveRot * (Math.PI/180));
var _local4 = 0;
while (_local4 < 30) {
var _local5 = false;
if ((_local4 % 10) == 0) {
var _local3 = 0;
while (_local3 < (_root.totalTanks + 1)) {
if (_root["tank" + _local3].hitTest((anchX + offsetX) + moveRL, (anchY + offsetY) + moveUD, true)) {
if (_name != ("tank" + _local3)) {
_local5 = true;
}
}
_local3++;
}
}
if ((_root.wall.hitTest((anchX + offsetX) + moveRL, (anchY + offsetY) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest((anchX + offsetX) + moveRL, (anchY + offsetY) + moveUD, true))) || (_local5 == true)) {
clean();
if (choice == 0) {
moveRot = moveRot + 15;
choice2 = 0;
frameCount = 0;
frameCount2 = 0;
} else if (choice == 1) {
moveRot = moveRot - 15;
choice2 = 1;
frameCount = 0;
frameCount2 = 0;
}
changer = false;
moveBool = false;
break;
}
offsetX = offsetX + moveRL;
offsetY = offsetY + moveUD;
moveBool = true;
changer = true;
if (choice2 == 0) {
moveRot = moveRot + (1 / (random(100) + 1));
} else if (choice2 == 1) {
moveRot = moveRot - (1 / (random(100) + 1));
}
_local4++;
}
speedRL = speed * Math.sin(moveRot * (Math.PI/180));
speedUD = speed * (-Math.cos(moveRot * (Math.PI/180)));
_rotation = moveRot;
}
var speed = 2;
var shootlimit = 0;
var frameCounter = 0;
var moveRot = 0;
var frameCount = 0;
var frameCount2 = 0;
var changer = true;
var killerVariable = false;
var startCount = false;
var tankType = 6;
}
Symbol 521 MovieClip [__Packages.Cannon3] Frame 0
class Cannon3 extends MovieClip
{
var _name, _x, _y, swapDepths, removeMovieClip;
function Cannon3 () {
super();
}
function onLoad() {
var _local3 = 0;
while (_local3 <= 10) {
if (_root.CannonBottom.tankNumbers[_local3] == false) {
_root.CannonBottom.tankNumbers[_local3] = true;
_name = "tank" + (_local3 + 1);
break;
}
_local3++;
}
_root[_name].barrel2.tank = _name;
_root.totalTanks++;
if (_root[_name + "Alive"] == false) {
dieNoExplosion();
}
}
function die() {
if (_root.cratersOnOff == "on") {
_root.leaveCrater(_x, _y);
}
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("Explosion", "Explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.gameScoreChange("Cannon3");
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
function dieNoExplosion() {
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
var shootlimit = 0;
var frameCounter = 0;
var killerVariable = false;
var startCount = false;
var tankType = 3;
}
Symbol 522 MovieClip [__Packages.Cannon5] Frame 0
class Cannon5 extends MovieClip
{
var _name, choice, choice2, moveRL, moveUD, moveBool, _x, speedRL, _y, speedUD, swapDepths, removeMovieClip, anchX, anchY, offsetX, offsetY, _rotation;
function Cannon5 () {
super();
}
function onLoad() {
var _local3 = 0;
while (_local3 <= 10) {
if (_root.CannonBottom.tankNumbers[_local3] == false) {
_root.CannonBottom.tankNumbers[_local3] = true;
_name = "tank" + (_local3 + 1);
break;
}
_local3++;
}
_root[_name].barrel2.tank = _name;
_root.totalTanks++;
if (_root[_name + "Alive"] == false) {
dieNoExplosion();
}
}
function onEnterFrame() {
if (_root.pauseGame == false) {
mover();
frameCount++;
frameCount2++;
if (frameCount > 30) {
choice = random(2);
frameCount = 0;
}
if ((frameCount2 > 30) && (changer == true)) {
choice2 = random(3);
frameCount2 = 0;
}
if (moveRL < 0) {
leftCollision();
} else if (moveRL > 0) {
rightCollision();
}
if (moveUD < 0) {
upCollision();
} else if (moveUD > 0) {
downCollision();
}
if (moveBool) {
_x = _x + speedRL;
_y = _y + speedUD;
}
}
}
function die() {
if (_root.cratersOnOff == "on") {
_root.leaveCrater(_x, _y);
}
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("Explosion", "Explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.gameScoreChange("Cannon5");
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
function dieNoExplosion() {
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
function clean() {
anchX = _x;
anchY = _y;
offsetX = 0;
offsetY = 0;
}
function leftCollision() {
if (_root.wall.hitTest(_x - 12.5, _y, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 12.5, _y, true))) {
if (speedRL < 0) {
speedRL = 0;
}
} else if (_root.wall.hitTest(_x - 12.5, _y - 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 12.5, _y - 11, true))) {
if (speedRL < 0) {
speedRL = 0;
}
} else if (_root.wall.hitTest(_x - 12.5, _y + 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 12.5, _y + 11, true))) {
if (speedRL < 0) {
speedRL = 0;
}
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_name != ("tank" + _local3)) {
if (_root["tank" + _local3].hitTest(_x - 12.5, _y, true)) {
if (speedRL < 0) {
speedRL = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x - 12.5, _y - 11, true)) {
if (speedRL < 0) {
speedRL = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x - 12.5, _y + 11, true)) {
if (speedRL < 0) {
speedRL = 0;
break;
}
}
}
_local3++;
}
if (_root.CannonBottom.hitTest(_x - 12.5, _y, true)) {
if (speedRL < 0) {
speedRL = 0;
}
}
if (_root.CannonBottom.hitTest(_x - 12.5, _y - 11, true)) {
if (speedRL < 0) {
speedRL = 0;
}
}
if (_root.CannonBottom.hitTest(_x - 12.5, _y + 11, true)) {
if (speedRL < 0) {
speedRL = 0;
}
}
}
function rightCollision() {
if (_root.wall.hitTest(_x + 12.5, _y, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 12.5, _y, true))) {
if (speedRL > 0) {
speedRL = 0;
}
} else if (_root.wall.hitTest(_x + 12.5, _y - 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 12.5, _y - 11, true))) {
if (speedRL > 0) {
speedRL = 0;
}
} else if (_root.wall.hitTest(_x + 12.5, _y + 11, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 12.5, _y + 11, true))) {
if (speedRL > 0) {
speedRL = 0;
}
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_name != ("tank" + _local3)) {
if (_root["tank" + _local3].hitTest(_x + 12.5, _y, true)) {
if (speedRL > 0) {
speedRL = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x + 12.5, _y - 11, true)) {
if (speedRL > 0) {
speedRL = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x + 12.5, _y + 11, true)) {
if (speedRL > 0) {
speedRL = 0;
break;
}
}
}
_local3++;
}
if (_root.CannonBottom.hitTest(_x + 12.5, _y, true)) {
if (speedRL > 0) {
speedRL = 0;
}
}
if (_root.CannonBottom.hitTest(_x + 12.5, _y - 11, true)) {
if (speedRL > 0) {
speedRL = 0;
}
}
if (_root.CannonBottom.hitTest(_x + 12.5, _y + 11, true)) {
if (speedRL > 0) {
speedRL = 0;
}
}
}
function upCollision() {
if (_root.wall.hitTest(_x, _y - 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y - 12.5, true))) {
if (speedUD < 0) {
speedUD = 0;
}
} else if (_root.wall.hitTest(_x - 11, _y - 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 11, _y - 12.5, true))) {
if (speedUD < 0) {
speedUD = 0;
}
} else if (_root.wall.hitTest(_x + 11, _y - 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 11, _y - 12.5, true))) {
if (speedUD < 0) {
speedUD = 0;
}
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_name != ("tank" + _local3)) {
if (_root["tank" + _local3].hitTest(_x, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x - 11, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x + 11, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
break;
}
}
}
_local3++;
}
if (_root.CannonBottom.hitTest(_x, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
}
}
if (_root.CannonBottom.hitTest(_x - 11, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
}
}
if (_root.CannonBottom.hitTest(_x + 11, _y - 12.5, true)) {
if (speedUD < 0) {
speedUD = 0;
}
}
}
function downCollision() {
if (_root.wall.hitTest(_x, _y + 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y + 12.5, true))) {
if (speedUD > 0) {
speedUD = 0;
}
} else if (_root.wall.hitTest(_x - 11, _y + 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x - 11, _y + 12.5, true))) {
if (speedUD > 0) {
speedUD = 0;
}
} else if (_root.wall.hitTest(_x + 11, _y + 12.5, true) || (_root["wallLvl" + _root.currentLevel].hitTest(_x + 11, _y + 12.5, true))) {
if (speedUD > 0) {
speedUD = 0;
}
}
var _local3 = 1;
while (_local3 < (_root.totalTanks + 1)) {
if (_name != ("tank" + _local3)) {
if (_root["tank" + _local3].hitTest(_x, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x - 11, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
break;
}
}
if (_root["tank" + _local3].hitTest(_x + 11, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
break;
}
}
}
_local3++;
}
if (_root.CannonBottom.hitTest(_x, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
}
}
if (_root.CannonBottom.hitTest(_x - 11, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
}
}
if (_root.CannonBottom.hitTest(_x + 11, _y + 12.5, true)) {
if (speedUD > 0) {
speedUD = 0;
}
}
}
function mover() {
clean();
moveRL = Math.sin(moveRot * (Math.PI/180));
moveUD = -Math.cos(moveRot * (Math.PI/180));
var _local4 = 0;
while (_local4 < 30) {
var _local5 = false;
if ((_local4 % 10) == 0) {
var _local3 = 0;
while (_local3 < (_root.totalTanks + 1)) {
if (_root["tank" + _local3].hitTest((anchX + offsetX) + moveRL, (anchY + offsetY) + moveUD, true)) {
if (_name != ("tank" + _local3)) {
_local5 = true;
}
}
_local3++;
}
}
if ((_root.wall.hitTest((anchX + offsetX) + moveRL, (anchY + offsetY) + moveUD, true) || (_root["wallLvl" + _root.currentLevel].hitTest((anchX + offsetX) + moveRL, (anchY + offsetY) + moveUD, true))) || (_local5 == true)) {
clean();
if (choice == 0) {
moveRot = moveRot + 15;
choice2 = 0;
frameCount = 0;
frameCount2 = 0;
} else if (choice == 1) {
moveRot = moveRot - 15;
choice2 = 1;
frameCount = 0;
frameCount2 = 0;
}
changer = false;
moveBool = false;
break;
}
offsetX = offsetX + moveRL;
offsetY = offsetY + moveUD;
moveBool = true;
changer = true;
if (choice2 == 0) {
moveRot = moveRot + (1 / (random(100) + 1));
} else if (choice2 == 1) {
moveRot = moveRot - (1 / (random(100) + 1));
}
_local4++;
}
speedRL = speed * Math.sin(moveRot * (Math.PI/180));
speedUD = speed * (-Math.cos(moveRot * (Math.PI/180)));
_rotation = moveRot;
}
var speed = 1.5;
var shootlimit = 0;
var frameCounter = 0;
var moveRot = 0;
var frameCount = 0;
var frameCount2 = 0;
var changer = true;
var killerVariable = false;
var startCount = false;
var tankType = 5;
}
Symbol 523 MovieClip [__Packages.Cannon2] Frame 0
class Cannon2 extends MovieClip
{
var _name, _x, _y, swapDepths, removeMovieClip;
function Cannon2 () {
super();
}
function onLoad() {
var _local3 = 0;
while (_local3 <= 10) {
if (_root.CannonBottom.tankNumbers[_local3] == false) {
_root.CannonBottom.tankNumbers[_local3] = true;
_name = "tank" + (_local3 + 1);
break;
}
_local3++;
}
_root[_name].barrel2.tank = _name;
_root.totalTanks++;
if (_root[_name + "Alive"] == false) {
dieNoExplosion();
}
}
function die() {
if (_root.cratersOnOff == "on") {
_root.leaveCrater(_x, _y);
}
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("Explosion", "Explosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
_root.gameScoreChange("Cannon2");
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
function dieNoExplosion() {
swapDepths(10000);
_root.destroyedTanks = _root.destroyedTanks + 1;
_root[_name + "Alive"] = false;
removeMovieClip();
}
var speed = 2;
var shootlimit = 0;
var killerVariable = false;
var startCount = false;
var finalXValue = 0;
var finalYValue = 0;
var tankType = 2;
}
Symbol 524 MovieClip [__Packages.Missile1] Frame 0
class Missile1 extends MovieClip
{
var bulletNum, ySpeed, _rotation, xSpeed, _x, _y, removeMovieClip, frameShot, _name, firstBulletShot, hitTest;
function Missile1 () {
super();
}
function findBulletNumber() {
var _local3 = 0;
while (_local3 <= 20) {
if (_root.CannonBottom.bulletNumbers[_local3] == false) {
_root.CannonBottom.bulletNumbers[_local3] = true;
bulletNum = _local3;
return(_local3);
}
_local3++;
}
}
function UDBounce() {
ySpeed = ySpeed * -1;
_rotation = 180 - _rotation;
bounces++;
bounceUDCounter = 0;
}
function LRBounce() {
xSpeed = xSpeed * -1;
_rotation = _rotation * -1;
bounces++;
bounceCounter = 0;
}
function bulletCollision() {
var _local3 = 0;
while (_local3 <= 20) {
if ((_root.CannonBottom.bulletNumbers[_local3] == true) && (_local3 != bulletNum)) {
if (_root["bullet" + _local3].hitTest(_x + (xSpeed / 2), _y + (ySpeed / 2), true)) {
_root["bullet" + _local3].explode();
explode();
break;
}
if (_root["bullet" + _local3].hitTest(_x - (xSpeed / 2), _y - (ySpeed / 2), true)) {
_root.totalShots--;
if (_root["bullet" + _local3].missileOne == true) {
_root.totalShots--;
}
_root["bullet" + _local3].explode();
explode();
break;
}
}
_local3++;
}
}
function explode() {
_root.explosionLocation = _x;
var _local3 = _root.attachMovie("smallExplosion", "smallExplosion" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
if (_root.cratersOnOff == "on") {
_root.leaveSmallCrater(_x, _y);
}
_root.CannonBottom.totalBullets--;
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
}
function explodeNoExplosion() {
_root.CannonBottom.totalBullets--;
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
}
function onLoad() {
var _local3 = 7;
_root.totalShots++;
frameShot = _root.currentLevel;
_name = "bullet" + findBulletNumber();
_root.noShots = false;
firstBulletShot = false;
if (_root.firstShot == true) {
firstBulletShot = true;
_root.firstShot = false;
}
_rotation = (180 + ((Math.atan2(_root._ymouse - _root.CannonBottom._y, _root._xmouse - _root.CannonBottom._x) * 180) / Math.PI)) - 90;
xSpeed = (Math.sin(_rotation * (Math.PI/180)) * _local3) * -1;
ySpeed = Math.cos(_rotation * (Math.PI/180)) * _local3;
}
function onEnterFrame() {
if ((_root.pauseGame == false) || (_root.transitionLevel == true)) {
bounceCounter++;
bounceUDCounter++;
wallBounceCounter++;
_y = _y - ySpeed;
_x = _x - xSpeed;
bulletCollision();
var _local3 = 1;
while (_local3 <= (_root.totalTanks + 1)) {
if (hitTest(_root["tank" + _local3]) && (temp > 3)) {
_root.hitShots++;
if (firstBulletShot == true) {
_root.firstBlood = true;
}
if (bounces > 0) {
_root.oneRicochet = true;
_root.totalRichochets++;
} else {
_root.allRicochet = false;
}
_root.yellIt(_root["tank" + _local3]._x, _root["tank" + _local3]._y, "die");
_root.CannonBottom.totalBullets--;
_root.CannonBottom.bulletNumbers[bulletNum] = false;
_root[_name].gotoAndStop(2);
removeMovieClip();
_root["tank" + _local3].die();
break;
}
_local3++;
}
if (hitTest(_root.CannonBottom) && (temp > 3)) {
_root[_name].gotoAndStop(2);
_root.CannonBottom.die();
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
} else {
temp++;
}
if ((_root.wall.sideWallR.hitTest(_x - xSpeed, _y - ySpeed, true) || (_root.wall.sideWallL.hitTest(_x - xSpeed, _y - ySpeed, true))) && (bounceCounter > 5)) {
LRBounce();
} else if ((_root.wall.sideWallU.hitTest(_x - xSpeed, _y - ySpeed, true) || (_root.wall.sideWallD.hitTest(_x - xSpeed, _y - ySpeed, true))) && (bounceUDCounter > 5)) {
UDBounce();
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x + xSpeed, _y, true)) {
LRBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x - xSpeed, _y, true)) {
LRBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y + ySpeed, true)) {
UDBounce();
wallBounceCounter = 0;
} else if (_root["wallLvl" + _root.currentLevel].hitTest(_x, _y - ySpeed, true)) {
UDBounce();
wallBounceCounter = 0;
}
if ((_y < 0) || (bounces >= 2)) {
explode();
}
if ((frameShot != _root.currentLevel) && (frameShot != undefined)) {
_root.CannonBottom.totalBullets = 0;
_root.CannonBottom.bulletNumbers[bulletNum] = false;
removeMovieClip();
}
}
}
var missileOne = true;
var bounces = 0;
var bounceCounter = 10;
var bounceUDCounter = 10;
var temp = 0;
var wallBounceCounter = 10;
}
Symbol 525 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
options.clip = mochi.as2.MochiServices.clip;
if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) {
mochi.as2.MochiServices.disconnect();
trace("WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!");
trace("make sure MochiServices.connect is called as early in the application runtime as possible.");
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.as2.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.as2.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.as2.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 526 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 2
stop();
Symbol 118 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 2
stop();
Symbol 121 MovieClip Frame 1
stop();
Symbol 121 MovieClip Frame 2
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 2
stop();
Symbol 129 MovieClip Frame 1
stop();
Instance of Symbol 155 MovieClip "barrel" in Symbol 156 MovieClip Frame 1
onClipEvent (enterFrame) {
pointAt = function (x, y, offset) {
var _local3 = x - _root.CannonBottom._x;
var _local4 = y - _root.CannonBottom._y;
var _local6 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
var _local5;
if (_local4 < 0) {
_local5 = (Math.PI*2) - Math.acos(_local3 / _local6);
} else {
_local5 = Math.acos(_local3 / _local6);
}
rotationPoint = offset + ((_local5 * 180) / Math.PI);
this._rotation = rotationPoint;
};
if (_root.pauseGame == false) {
}
}
Symbol 228 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 2
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 334 MovieClip Frame 1
stop();
Symbol 343 MovieClip Frame 1
stop();
Symbol 352 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 1
stop();
Symbol 425 MovieClip [smallExplosion] Frame 1
smallExplosionMusic = new Sound(this);
smallExplosionMusic.attachSound("smallBoom");
this.smallExplosionMusic.setPan((_root.explosionLocation / 2.25) - 100);
this.smallExplosionMusic.setVolume(_root.effectsVolume);
this.smallExplosionMusic.start(0, 1);
this._xscale = 70;
this._yscale = 70;
Symbol 425 MovieClip [smallExplosion] Frame 55
stop();
this.removeMovieClip();
Symbol 475 MovieClip Frame 1
explosionMusic = new Sound(this);
explosionMusic.attachSound("boom");
this.explosionMusic.setPan((_root.explosionLocation / 2.25) - 100);
this.explosionMusic.setVolume(_root.effectsVolume);
this.explosionMusic.start(0, 1);
Symbol 475 MovieClip Frame 55
stop();
this.removeMovieClip();
Instance of Symbol 475 MovieClip in Symbol 476 MovieClip [Explosion] Frame 1
onClipEvent (load) {
this._rotation = random(360);
}
Symbol 481 MovieClip Frame 1
stop();