Frame 1
stop();
Instance of Symbol 13 MovieClip in Frame 1
onClipEvent (load) {
_xscale = 0;
}
onClipEvent (enterFrame) {
trace(counter);
var counter = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_xscale = counter;
if (counter >= 100) {
_root.loadin._visible = false;
_root.playBtn._visible = true;
} else {
_xscale = counter;
}
}
Instance of Symbol 31 MovieClip "playBtn" in Frame 1
onClipEvent (load) {
_visible = false;
}
on (release) {
_root.play();
}
Frame 4
stopAllSounds();
var muteMusic = 0;
var muteSound = 0;
loopSound = new Sound(this);
loopSound.attachSound("loopSound");
loopSound.start(0, 999);
popSound = new Sound(this);
popSound.attachSound("pop");
pop2Sound = new Sound(this);
pop2Sound.attachSound("pop2");
upgradeBallSound = new Sound(this);
upgradeBallSound.attachSound("upgradeBall");
upgradeSound = new Sound(this);
upgradeSound.attachSound("upgrade");
creditSound = new Sound(this);
creditSound.attachSound("credit");
explosionSound = new Sound(this);
explosionSound.attachSound("explosion");
Frame 5
stop();
Instance of Symbol 67 MovieClip in Frame 5
onClipEvent (load) {
if (_root.muteMusic) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (release) {
if (_currentframe == 1) {
stopAllSounds();
_root.muteMusic = true;
gotoAndStop (2);
} else if (_currentframe == 2) {
_root.loopSound.start(0, 999);
_root.muteMusic = false;
gotoAndStop (1);
}
}
Instance of Symbol 70 MovieClip in Frame 5
onClipEvent (load) {
if (_root.muteSound) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (release) {
if (_currentframe == 1) {
_root.muteSound = true;
gotoAndStop (2);
} else if (_currentframe == 2) {
_root.muteSound = false;
gotoAndStop (1);
}
}
Instance of Symbol 74 MovieClip in Frame 5
onClipEvent (load) {
if (_root._quality == "HIGH") {
this.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
this.gotoAndStop(2);
} else if (_root._quality == "LOW") {
this.gotoAndStop(3);
}
}
on (release) {
if (_currentframe == 1) {
_root._quality = "medium";
gotoAndStop (2);
} else if (_currentframe == 2) {
_root._quality = "low";
gotoAndStop (3);
} else if (_currentframe == 3) {
_root._quality = "high";
gotoAndStop (1);
}
}
Instance of Symbol 85 MovieClip "gun" in Frame 5
onClipEvent (enterFrame) {
var dx = (_x - _root._xmouse);
var dy = (_y - _root._ymouse);
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_rotation = (myDegrees - 90);
}
Instance of Symbol 89 MovieClip in Frame 5
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Instance of Symbol 92 MovieClip in Frame 5
on (release) {
getURL ("http://www.kchampgames.com/", "_blank");
}
Instance of Symbol 128 MovieClip "instructions" in Frame 5
onClipEvent (load) {
_visible = false;
}
Frame 6
function cleanUp() {
i = 0;
while (i < (enemyC + 2)) {
removeMovieClip(_root["enemy" + i]);
i++;
}
i = 0;
while (i < (shotC + 2)) {
removeMovieClip(_root["shot" + i]);
i++;
}
i = 0;
while (i < (creditC + 2)) {
removeMovieClip(_root["credit" + i]);
i++;
}
i = 0;
while (i < (upgradeBallC + 2)) {
removeMovieClip(_root["upgradeBall" + i]);
i++;
}
i = 0;
while (i < (ELC + 2)) {
removeMovieClip(_root["extraLife" + i]);
i++;
}
removeMovieClip(_root.bomb1);
removeMovieClip(_root.upgradeMenu);
removeMovieClip(_root.quitPrompt);
}
function shoot() {
_root.tank.flash.play();
if (_root.muteSound == 0) {
_root.popSound.start(0, 0);
}
duplicateMovieClip (shot, "shot" + _root.shotC, _root.getNextHighestDepth());
_root.shotC++;
if (_root.shotC > 50) {
_root.shotC = 0;
}
}
function spawnEnemy() {
duplicateMovieClip (enemy, "enemy" + enemyC, _root.getNextHighestDepth());
enemyC++;
}
function spawnBomb() {
_root.bomb1.play();
duplicateMovieClip (bomb, "bomb1", _root.getNextHighestDepth());
}
function spawnEL() {
duplicateMovieClip (extraLife, "extraLife" + ELC, _root.getNextHighestDepth());
ELC++;
}
stop();
var score = 0;
var rateOfFire = 20;
var rateOfFireLevel = 1;
var speed = 1;
var speedLevel = 1;
var recoil = 3;
var recoilLevel = 1;
var damage = 20;
var damageLevel = 1;
var shieldRate = 1000;
var shieldLevel = 1;
var shotSpeed = 10;
var tankLevel = 1;
var lives = 5;
var enemySize = 10;
var buffer = 10;
var enemySpeed = 5;
var shotC = 0;
var enemyC = 0;
var creditC = 0;
var upgradeBallC = 0;
var ELC = 0;
var sparkC = 0;
var StageHeight = 400;
var StageWidth = 600;
var upgradePoints = 0;
var overflowPoints = 0;
var nextUpgrade = 5;
var numberOfUpgrades = 0;
var pauseGame = 0;
var spawnTimer = 0;
var EMS = 150;
var EMSTimer = 0;
var ELTimer = 0;
var ELThreshold = 20;
var bombTimer = 0;
var bombThreshold = 15;
spawnEnemy();
onEnterFrame = function () {
if (_root.pauseGame == 0) {
EMSTimer++;
spawnTimer++;
enemySpeed = enemySpeed + 0.0005;
}
if (EMSTimer > 350) {
EMS = EMS * 0.98;
EMSTimer = 0;
enemySize++;
}
if (spawnTimer > EMS) {
spawnEnemy();
spawnTimer = 0;
ELTimer++;
bombTimer++;
}
if (ELTimer > ELThreshold) {
spawnEL();
ELThreshold = ELThreshold + 5;
ELTimer = 0;
}
if (bombTimer > bombThreshold) {
spawnBomb();
bombThreshold = bombThreshold + 5;
bombTimer = 0;
}
if (lives <= 0) {
lives = 5;
cleanUp();
_root.gotoAndStop("results");
}
};
Instance of Symbol 133 MovieClip "shot" in Frame 6
onClipEvent (load) {
if (_name != "shot") {
var damage = _root.damage;
var xspeed = (_root.shotSpeed * Math.sin(_root.tank.gun._rotation * (Math.PI/180)));
var yspeed = ((-1 * _root.shotSpeed) * Math.cos(_root.tank.gun._rotation * (Math.PI/180)));
_root.tank.xspeed = _root.tank.xspeed - (xspeed / _root.recoil);
_root.tank.yspeed = _root.tank.yspeed - (yspeed / _root.recoil);
_x = (_root.tank._x + ((xspeed / _root.shotSpeed) * 30));
_y = (_root.tank._y + ((yspeed / _root.shotSpeed) * 30));
_xscale = (50 + ((5 * damage) / 2));
_yscale = (50 + ((5 * damage) / 2));
}
}
onClipEvent (enterFrame) {
if (_name != "shot") {
_x = (_x + xspeed);
_y = (_y + yspeed);
if (_y < -50) {
removeMovieClip(this);
}
if (_y > _root.StageHeight) {
removeMovieClip(this);
}
if (_x < -50) {
removeMovieClip(this);
}
if (_x > (_root.StageWidth + 50)) {
removeMovieClip(this);
}
}
}
Instance of Symbol 136 MovieClip "enemy" in Frame 6
onClipEvent (load) {
if (_name != "enemy") {
var sizeAddition = (Math.random() * _root.enemySize);
var startHealth = (100 + sizeAddition);
var health = (100 + sizeAddition);
var xspeed = ((Math.random() * _root.enemySpeed) - (_root.enemySpeed / 2));
var yspeed = ((Math.random() * _root.enemySpeed) - (_root.enemySpeed / 2));
_xscale = (_xscale + sizeAddition);
_yscale = (_yscale + sizeAddition);
_x = (random(_root.StageWidth + 200) - 100);
_y = (random(_root.StageHeight + 100) - 100);
if ((((_x + (_width / 2)) > 0) && ((_x - (_width / 2)) < _root.StageWidth)) && ((_y + (_height / 2)) > 0)) {
_root.spawnEnemy();
removeMovieClip(this);
}
}
}
onClipEvent (enterFrame) {
if (_name != "enemy") {
if (_root.pauseGame == 0) {
_x = (_x + xspeed);
_y = (_y + yspeed);
if ((_y - (_height / 2)) < (0 + _root.buffer)) {
yspeed = Math.abs(yspeed);
yspeed = yspeed + 0.005;
}
if ((_y + (_height / 2)) > (_root.StageHeight - _root.buffer)) {
yspeed = Math.abs(yspeed) * -1;
}
if ((_x - (_width / 2)) < (0 + _root.buffer)) {
xspeed = Math.abs(xspeed);
xspeed = xspeed + 0.005;
}
if ((_x + (_width / 2)) > (_root.StageWidth - _root.buffer)) {
xspeed = Math.abs(xspeed) * -1;
xspeed = xspeed - 0.005;
}
}
if (Math.sqrt(Math.pow(Math.abs(_y - _root.tank._y), 2) + Math.pow(Math.abs(_x - _root.tank._x), 2)) < ((_width / 2) + (_root.tank.base._width / 2))) {
if (_root.tank.flicker == 0) {
_root.lives--;
_root.tank.flicker = 1;
_root.fakeTank.play();
health = 0;
}
}
if (Math.sqrt(Math.pow(Math.abs(_y - _root.bomb1._y), 2) + Math.pow(Math.abs(_x - _root.bomb1._x), 2)) < ((_width / 2) + (_root.bomb1._width / 2))) {
if (_root.bomb1._currentframe > 1) {
health = 0;
}
}
if (Math.sqrt(Math.pow(Math.abs(_y - _root.shield._y), 2) + Math.pow(Math.abs(_x - _root.shield._x), 2)) < ((_width / 2) + (_root.shield._width / 2))) {
if (_root.shield.activated == 1) {
health = 0;
_root.shield.activated = 0;
}
}
i = 0;
while (i < 51) {
if (Math.sqrt(Math.pow(Math.abs(_y - _root["shot" + i]._y), 2) + Math.pow(Math.abs(_x - _root["shot" + i]._x), 2)) < ((_width / 2) + (_root.shot._width / 2))) {
health = health - _root["shot" + i].damage;
duplicateMovieClip (_root.sparklet, "sparklet" + _root.sparkC, _root.getNextHighestDepth());
_root["sparklet" + _root.sparkC]._x = _root["shot" + i]._x;
_root["sparklet" + _root.sparkC]._y = _root["shot" + i]._y;
var dx = (_x - _root["shot" + i]._x);
var dy = (_y - _root["shot" + i]._y);
_root["sparklet" + _root.sparkC]._xscale = 100 + ((Math.random() * 40) - 20);
_root["sparklet" + _root.sparkC]._yscale = _root["sparklet" + _root.sparkC]._xscale;
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_root["sparklet" + _root.sparkC]._rotation = (myDegrees - 90) + ((Math.random() * 120) - 60);
_root.sparkC++;
duplicateMovieClip (_root.sparklet, "sparklet" + _root.sparkC, _root.getNextHighestDepth());
_root["sparklet" + _root.sparkC]._x = _root["shot" + i]._x;
_root["sparklet" + _root.sparkC]._y = _root["shot" + i]._y;
var dx = (_x - _root["shot" + i]._x);
var dy = (_y - _root["shot" + i]._y);
_root["sparklet" + _root.sparkC]._xscale = 100 + ((Math.random() * 40) - 20);
_root["sparklet" + _root.sparkC]._yscale = _root["sparklet" + _root.sparkC]._xscale;
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_root["sparklet" + _root.sparkC]._rotation = (myDegrees - 90) + ((Math.random() * 120) - 60);
_root.sparkC++;
duplicateMovieClip (_root.sparklet, "sparklet" + _root.sparkC, _root.getNextHighestDepth());
_root["sparklet" + _root.sparkC]._x = _root["shot" + i]._x;
_root["sparklet" + _root.sparkC]._y = _root["shot" + i]._y;
var dx = (_x - _root["shot" + i]._x);
var dy = (_y - _root["shot" + i]._y);
_root["sparklet" + _root.sparkC]._xscale = 100 + ((Math.random() * 40) - 20);
_root["sparklet" + _root.sparkC]._yscale = _root["sparklet" + _root.sparkC]._xscale;
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_root["sparklet" + _root.sparkC]._rotation = (myDegrees - 90) + ((Math.random() * 120) - 60);
_root.sparkC++;
duplicateMovieClip (_root.sparklet, "sparklet" + _root.sparkC, _root.getNextHighestDepth());
_root["sparklet" + _root.sparkC]._x = _root["shot" + i]._x;
_root["sparklet" + _root.sparkC]._y = _root["shot" + i]._y;
var dx = (_x - _root["shot" + i]._x);
var dy = (_y - _root["shot" + i]._y);
_root["sparklet" + _root.sparkC]._xscale = 100 + ((Math.random() * 40) - 20);
_root["sparklet" + _root.sparkC]._yscale = _root["sparklet" + _root.sparkC]._xscale;
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_root["sparklet" + _root.sparkC]._rotation = (myDegrees - 90) + ((Math.random() * 120) - 60);
_root.sparkC++;
duplicateMovieClip (_root.sparklet, "sparklet" + _root.sparkC, _root.getNextHighestDepth());
_root["sparklet" + _root.sparkC]._x = _root["shot" + i]._x;
_root["sparklet" + _root.sparkC]._y = _root["shot" + i]._y;
var dx = (_x - _root["shot" + i]._x);
var dy = (_y - _root["shot" + i]._y);
_root["sparklet" + _root.sparkC]._xscale = 100 + ((Math.random() * 40) - 20);
_root["sparklet" + _root.sparkC]._yscale = _root["sparklet" + _root.sparkC]._xscale;
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_root["sparklet" + _root.sparkC]._rotation = (myDegrees - 90) + ((Math.random() * 120) - 60);
_root.sparkC++;
removeMovieClip(_root["shot" + i]);
}
i++;
}
if (health <= 0) {
if (_root.muteSound == 0) {
_root.pop2Sound.start(0.1, 1);
}
if (_root.upgradePoints < _root.nextUpgrade) {
duplicateMovieClip (_root.credit, "credit" + _root.creditC, _root.getNextHighestDepth());
_root["credit" + _root.creditC]._x = this._x;
_root["credit" + _root.creditC]._y = this._y;
_root.creditC++;
_root.score++;
removeMovieClip(this);
} else {
duplicateMovieClip (_root.upgradeBall, "upgradeBall" + _root.upgradeBallC, _root.getNextHighestDepth());
_root["upgradeBall" + _root.upgradeBallC]._x = this._x;
_root["upgradeBall" + _root.upgradeBallC]._y = this._y;
_root.upgradeBallC++;
_root.nextUpgrade = _root.nextUpgrade * 2;
_root.upgradePoints = _root.overflowPoints;
_root.overflowPoints = 0;
_root.score++;
removeMovieClip(this);
}
}
}
}
Instance of Symbol 142 MovieClip "credit" in Frame 6
onClipEvent (load) {
if (_x < (0 + _root.buffer)) {
removeMovieClip(this);
}
if (_x > (_root.StageWidth - _root.buffer)) {
removeMovieClip(this);
}
if (_y < (0 + _root.buffer)) {
removeMovieClip(this);
}
}
onClipEvent (enterFrame) {
if (_name != "credit") {
_rotation = (_rotation + 1);
if (Math.sqrt(Math.pow(Math.abs(_y - _root.tank._y), 2) + Math.pow(Math.abs(_x - _root.tank._x), 2)) < ((_width / 2) + (_root.tank.base._width / 2))) {
if (_root.muteSound == 0) {
_root.creditSound.start(0, 0);
}
if (_root.upgradePoints < _root.nextUpgrade) {
_root.upgradePoints++;
} else {
_root.overflowPoints++;
}
_root.fakeCredit.play();
removeMovieClip(this);
}
}
}
Instance of Symbol 144 MovieClip in Frame 6
onClipEvent (enterFrame) {
ratio_txt.text = (_root.upgradePoints + "/") + _root.nextUpgrade;
}
Instance of Symbol 146 MovieClip "upgradeBall" in Frame 6
onClipEvent (enterFrame) {
if (_name != "upgradeBall") {
if (Math.sqrt(Math.pow(Math.abs(_y - _root.tank._y), 2) + Math.pow(Math.abs(_x - _root.tank._x), 2)) < ((_width / 2) + (_root.tank.base._width / 2))) {
if (_root.muteSound == 0) {
_root.upgradeBallSound.start(0, 0);
}
_root.numberOfUpgrades++;
_root.fakeUpgradeBall.play();
removeMovieClip(this);
}
}
}
Instance of Symbol 148 MovieClip in Frame 6
onClipEvent (enterFrame) {
numberOfUpgrades_txt.text = _root.numberOfUpgrades;
}
Instance of Symbol 152 MovieClip in Frame 6
onClipEvent (load) {
var go = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
if (go == 1) {
if (_root.upgradeMenu._visible == true) {
_root.upgradeMenu._visible = false;
_root.pauseGame = 0;
} else {
_root.upgradeMenu._visible = true;
_root.upgradeMenu.swapDepths(_root.getNextHighestDepth());
_root.pauseGame = 1;
}
go = 0;
}
} else {
go = 1;
}
}
Instance of Symbol 154 MovieClip "shield" in Frame 6
onClipEvent (load) {
var activated = 1;
var i = 0;
}
onClipEvent (enterFrame) {
if (_root.shieldLevel > 1) {
_x = _root.tank._x;
_y = _root.tank._y;
}
if (activated == 0) {
_alpha = 20;
i++;
if (i > _root.shieldRate) {
_alpha = 100;
i = 0;
activated = 1;
}
}
}
Instance of Symbol 186 MovieClip "tank" in Frame 6
onClipEvent (load) {
var i = 0;
var xspeed = 0;
var yspeed = 0;
var friction = 0.75;
var flicker = 0;
var flickerCounter = 0;
var mouseListener = new Object();
mouseListener.onMouseDown = function () {
this.isDown = true;
};
mouseListener.onMouseUp = function () {
this.isDown = false;
};
Mouse.addListener(mouseListener);
}
onClipEvent (enterFrame) {
if (_root.pauseGame == 0) {
_x = (_x + xspeed);
_y = (_y + yspeed);
xspeed = xspeed * friction;
yspeed = yspeed * friction;
if (Key.isDown(87)) {
yspeed = yspeed - _root.speed;
}
if (Key.isDown(83)) {
yspeed = yspeed + _root.speed;
}
if (Key.isDown(65)) {
xspeed = xspeed - _root.speed;
}
if (Key.isDown(68)) {
xspeed = xspeed + _root.speed;
}
if ((_y - (base._height / 2)) < (0 + _root.buffer)) {
_y = ((0 + _root.buffer) + (base._height / 2));
}
if ((_y + (base._height / 2)) > (_root.StageHeight - _root.buffer)) {
_y = ((_root.StageHeight - _root.buffer) - (base._height / 2));
}
if ((_x - (base._width / 2)) < (0 + _root.buffer)) {
_x = ((0 + _root.buffer) + (base._height / 2));
}
if ((_x + (base._width / 2)) > (_root.StageWidth - _root.buffer)) {
_x = ((_root.StageWidth - _root.buffer) - (base._width / 2));
}
i++;
if (i > _root.rateOfFire) {
if (mouseListener.isDown) {
_root.shoot();
i = 0;
}
}
if (flicker == 1) {
_alpha = 20;
flickerCounter++;
}
if (flickerCounter > 100) {
_alpha = 100;
flicker = 0;
flickerCounter = 0;
}
}
}
Instance of Symbol 188 MovieClip in Frame 6
onClipEvent (enterFrame) {
tankLevel_txt.text = "Tank Level: " + _root.tankLevel;
}
Instance of Symbol 190 MovieClip in Frame 6
onClipEvent (enterFrame) {
lives_txt.text = _root.lives;
}
Instance of Symbol 195 MovieClip "extraLife" in Frame 6
onClipEvent (load) {
if (_name != "extraLife") {
var xspeed = ((Math.random() * _root.enemySpeed) - (_root.enemySpeed / 2));
var yspeed = ((Math.random() * _root.enemySpeed) - (_root.enemySpeed / 2));
_x = (random(_root.StageWidth + 200) - 100);
_y = (random(_root.StageHeight + 100) - 100);
if ((((_x + (_width / 2)) > 0) && ((_x - (_width / 2)) < _root.StageWidth)) && ((_y + (_height / 2)) > 0)) {
_root.spawnEL();
removeMovieClip(this);
}
trace(_name);
}
}
onClipEvent (enterFrame) {
if (_name != "extraLife") {
if (_root.pauseGame == 0) {
_rotation = (_rotation + 5);
_x = (_x + xspeed);
_y = (_y + yspeed);
if ((_y - (_height / 2)) < (0 + _root.buffer)) {
yspeed = Math.abs(yspeed);
yspeed = yspeed + 0.005;
}
if ((_y + (_height / 2)) > (_root.StageHeight - _root.buffer)) {
yspeed = Math.abs(yspeed) * -1;
}
if ((_x - (_width / 2)) < (0 + _root.buffer)) {
xspeed = Math.abs(xspeed);
xspeed = xspeed + 0.005;
}
if ((_x + (_width / 2)) > (_root.StageWidth - _root.buffer)) {
xspeed = Math.abs(xspeed) * -1;
xspeed = xspeed - 0.005;
}
}
if (Math.sqrt(Math.pow(Math.abs(_y - _root.tank._y), 2) + Math.pow(Math.abs(_x - _root.tank._x), 2)) < ((_width / 2) + (_root.tank.base._width / 2))) {
_root.lives++;
if (_root.muteSound == 0) {
_root.creditSound.start(0, 0);
}
removeMovieClip(this);
}
}
}
Instance of Symbol 235 MovieClip "bomb" in Frame 6
onClipEvent (load) {
if (_name != "bomb") {
var xspeed = ((Math.random() * _root.enemySpeed) - (_root.enemySpeed / 2));
var yspeed = ((Math.random() * _root.enemySpeed) - (_root.enemySpeed / 2));
_x = (random(_root.StageWidth + 200) - 100);
_y = (random(_root.StageHeight + 100) - 100);
if ((((_x + (_width / 2)) > 0) && ((_x - (_width / 2)) < _root.StageWidth)) && ((_y + (_height / 2)) > 0)) {
_root.spawnBomb();
removeMovieClip(this);
}
}
}
onClipEvent (enterFrame) {
if (_currentframe == 1) {
if (_root.pauseGame == 0) {
_x = (_x + xspeed);
_y = (_y + yspeed);
if ((_y - (_height / 2)) < (0 + _root.buffer)) {
yspeed = Math.abs(yspeed);
yspeed = yspeed + 0.005;
}
if ((_y + (_height / 2)) > (_root.StageHeight - _root.buffer)) {
yspeed = Math.abs(yspeed) * -1;
}
if ((_x - (_width / 2)) < (0 + _root.buffer)) {
xspeed = Math.abs(xspeed);
xspeed = xspeed + 0.005;
}
if ((_x + (_width / 2)) > (_root.StageWidth - _root.buffer)) {
xspeed = Math.abs(xspeed) * -1;
xspeed = xspeed - 0.005;
}
}
i = 0;
while (i < 51) {
if (Math.sqrt(Math.pow(Math.abs(_y - _root["shot" + i]._y), 2) + Math.pow(Math.abs(_x - _root["shot" + i]._x), 2)) < ((_width / 2) + (_root.shot._width / 2))) {
if (_currentframe == 1) {
if (_root.muteSound == 0) {
_root.explosionSound.start(0, 1);
}
play();
removeMovieClip(_root["shot" + i]);
}
}
i++;
}
}
}
Instance of Symbol 237 MovieClip in Frame 6
onClipEvent (enterFrame) {
score_txt.text = "Score: " + _root.score;
}
Instance of Symbol 287 MovieClip "upgradeMenu" in Frame 6
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 294 MovieClip "quitPrompt" in Frame 6
onClipEvent (load) {
_visible = false;
}
Frame 7
stop();
_root.playerName = "No name";
Instance of Symbol 307 MovieClip in Frame 7
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Instance of Symbol 310 MovieClip in Frame 7
on (release) {
getURL ("http://www.kchampgames.com/", "_blank");
}
Frame 8
function __rankz_send__(par1, par2, par3, par4) {
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
par227.flashkey = par227.flashkey.split("=").join("");
par227.SU0249 = par227.SU0249.split("=").join("");
par228.onLoad = function (success) {
if (success) {
trace(par228.msg);
} else {
trace(par228.loaded);
}
};
par227.sendAndLoad("http://rankz.armorbot.com/submit/", par228, "POST");
}
bXlnYW1lX25hbWVfdmFyaWFibGU = _root.playerName;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = _root.score;
__rankz_send__("MzA0MWolZSVhJW4lcw==", "enVnZnNZZlc=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
getURL ("http://rankz.armorbot.com/PowerTank/", "_blank");
Frame 9
gotoAndStop ("menu");
Symbol 9 MovieClip [sparklet] Frame 1
if (_name == "sparklet") {
stop();
}
Symbol 9 MovieClip [sparklet] Frame 11
removeMovieClip(this);
Symbol 26 MovieClip Frame 1
stop();
Symbol 311 MovieClip [__Packages.ab3.rankz.Armor_Bot_30_En_AS1] Frame 0
class ab3.rankz.Armor_Bot_30_En_AS1 extends Object
{
static var _CharsReverseLookup;
var _Armor_Bot_30_En_AS1Str, _Armor_Bot_30_En_AS1Count;
function Armor_Bot_30_En_AS1 () {
super();
}
static function Encode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.encodeArmor_Bot_30_En_AS1(str));
}
static function Decode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.decodeArmor_Bot_30_En_AS1(str));
}
static function StringReplaceAll(source, find, replacement) {
return(source.split(find).join(replacement));
}
static function InitReverseChars() {
_CharsReverseLookup = new Array();
var _local1 = 0;
while (_local1 < _Chars.length) {
_CharsReverseLookup[_Chars[_local1]] = _local1;
_local1++;
}
return(true);
}
static function UrlDecode(str) {
str = StringReplaceAll(str, "\\", " ");
str = unescape(str);
return(str);
}
static function UrlEncode(str) {
str = escape(str);
str = StringReplaceAll(str, "\\", "%2B");
str = StringReplaceAll(str, "%20", "+");
return(str);
}
function setArmor_Bot_30_En_AS1Str(str) {
_Armor_Bot_30_En_AS1Str = str;
_Armor_Bot_30_En_AS1Count = 0;
}
function readArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charCodeAt(_Armor_Bot_30_En_AS1Count) & 255;
_Armor_Bot_30_En_AS1Count++;
return(_local2);
}
function encodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(3);
var _local5 = 0;
var _local4 = false;
while ((!_local4) && (((_local2[0] = readArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[1] = readArmor_Bot_30_En_AS1();
_local2[2] = readArmor_Bot_30_En_AS1();
_local3 = _local3 + _Chars[_local2[0] >> 2];
if (_local2[1] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[0] << 4) & 48) | (_local2[1] >> 4)];
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[1] << 2) & 60) | (_local2[2] >> 6)];
_local3 = _local3 + _Chars[_local2[2] & 63];
} else {
_local3 = _local3 + _Chars[(_local2[1] << 2) & 60];
_local3 = _local3 + "=";
_local4 = true;
}
} else {
_local3 = _local3 + _Chars[(_local2[0] << 4) & 48];
_local3 = _local3 + "=";
_local3 = _local3 + "=";
_local4 = true;
}
_local5 = _local5 + 4;
if (_local5 >= 76) {
_local3 = _local3 + newline;
_local5 = 0;
}
}
return(_local3);
}
function readReverseArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
while (true) {
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charAt(_Armor_Bot_30_En_AS1Count);
_Armor_Bot_30_En_AS1Count++;
if (_CharsReverseLookup[_local2]) {
return(_CharsReverseLookup[_local2]);
}
if (_local2 == "A") {
return(0);
}
}
}
function ntos(n) {
var _local1 = n.toString(16);
if (_local1.length == 1) {
_local1 = "0" + _local1;
}
_local1 = "%" + _local1;
return(unescape(_local1));
}
function decodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(4);
var _local4 = false;
while (((!_local4) && (((_local2[0] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) && (((_local2[1] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[2] = readReverseArmor_Bot_30_En_AS1();
_local2[3] = readReverseArmor_Bot_30_En_AS1();
_local3 = _local3 + ntos(((_local2[0] << 2) & 255) | (_local2[1] >> 4));
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[1] << 4) & 255) | (_local2[2] >> 2));
if (_local2[3] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[2] << 6) & 255) | _local2[3]);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
}
return(_local3);
}
function toHex(n) {
var _local4 = "";
var _local3 = true;
var _local1 = 32;
while (_local1 > 0) {
_local1 = _local1 - 4;
var _local2 = (n >> _local1) & 15;
if ((!_local3) || (_local2 != 0)) {
_local3 = false;
_local4 = _local4 + _Digits[_local2];
}
}
return(((_local4 == "") ? "0" : (_local4)));
}
function pad(str, len, pad) {
var _local2 = str;
var _local1 = str.length;
while (_local1 < len) {
_local2 = pad + _local2;
_local1++;
}
return(_local2);
}
function encodeHex(str) {
var _local4 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local4 = _local4 + pad(toHex(str.charCodeAt(_local2) & 255), 2, "0");
_local2++;
}
return(_local4);
}
function decodeHex(str) {
var _local5 = "";
var _local3 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local3 = _local3 + str.charAt(_local2);
if (_local3.length == 2) {
_local5 = _local5 + ntos(parseInt("0x" + _local3));
_local3 = "";
}
_local2++;
}
return(_local5);
}
static var _EndOfInput = -1;
static var _Chars = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
static var _CharsReverseLookupInited = InitReverseChars();
static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
}
Symbol 45 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 48 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Symbol 48 MovieClip Frame 218
_root.play();
Symbol 60 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Instance of Symbol 56 MovieClip in Symbol 60 MovieClip Frame 26
on (release) {
getURL ("http://www.kchampgames.com", "_blank");
}
Symbol 60 MovieClip Frame 181
_root.play();
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 2
stop();
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
stop();
Symbol 78 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 81 Button
on (release) {
_root.instructions._visible = true;
}
Symbol 99 Button
on (release) {
nextFrame();
}
Symbol 103 Button
on (release) {
gotoAndStop(_currentframe - 1);
}
Symbol 124 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 2
stop();
Symbol 124 MovieClip Frame 3
stop();
Symbol 124 MovieClip Frame 4
stop();
Symbol 124 MovieClip Frame 5
stop();
Symbol 124 MovieClip Frame 6
stop();
Symbol 127 Button
on (release) {
_root.instructions._visible = false;
}
Symbol 131 MovieClip Frame 20
_x = 1000;
Instance of Symbol 135 MovieClip in Symbol 136 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (100 - ((_parent.health / _parent.startHealth) * 100));
}
Instance of Symbol 138 MovieClip "bar" in Symbol 140 MovieClip Frame 1
onClipEvent (load) {
_xscale = 0;
}
onClipEvent (enterFrame) {
_xscale = (_xscale + ((((_root.upgradePoints / _root.nextUpgrade) * 100) - _xscale) / 10));
}
Instance of Symbol 151 MovieClip in Symbol 152 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.numberOfUpgrades > 0) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 160 MovieClip Frame 1
stop();
Instance of Symbol 160 MovieClip "flash" in Symbol 186 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pauseGame == 0) {
var dx = ((_root.tank._x + _x) - _root._xmouse);
var dy = ((_root.tank._y + _y) - _root._ymouse);
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_rotation = (myDegrees - 90);
}
}
Instance of Symbol 165 MovieClip in Symbol 186 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pauseGame == 0) {
var dx = ((_root.tank._x + _x) - _root._xmouse);
var dy = ((_root.tank._y + _y) - _root._ymouse);
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_rotation = (myDegrees - 90);
}
gotoAndStop(_root.speedLevel);
}
Instance of Symbol 173 MovieClip "damage_addon" in Symbol 186 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pauseGame == 0) {
var dx = ((_root.tank._x + _x) - _root._xmouse);
var dy = ((_root.tank._y + _y) - _root._ymouse);
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_rotation = (myDegrees - 90);
}
gotoAndStop(_root.damageLevel);
}
Instance of Symbol 179 MovieClip in Symbol 186 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pauseGame == 0) {
var dx = ((_root.tank._x + _x) - _root._xmouse);
var dy = ((_root.tank._y + _y) - _root._ymouse);
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_rotation = (myDegrees - 90);
}
gotoAndStop(_root.rateOfFireLevel);
}
Instance of Symbol 85 MovieClip "gun" in Symbol 186 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pauseGame == 0) {
var dx = ((_root.tank._x + _x) - _root._xmouse);
var dy = ((_root.tank._y + _y) - _root._ymouse);
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_rotation = (myDegrees - 90);
}
}
Instance of Symbol 185 MovieClip in Symbol 186 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pauseGame == 0) {
var dx = ((_root.tank._x + _x) - _root._xmouse);
var dy = ((_root.tank._y + _y) - _root._ymouse);
var myRadians = Math.atan2(dy, dx);
var myDegrees = (myRadians * 57.2957795130823);
_rotation = (myDegrees - 90);
}
gotoAndStop(_root.recoilLevel);
}
Symbol 192 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 40
removeMovieClip(this);
Symbol 242 Button
on (rollOver) {
_root.upgradeMenu.description_mc.descriptionNumber = 1;
}
on (rollOut) {
_root.upgradeMenu.description_mc.descriptionNumber = 0;
}
on (release) {
if (_root.numberOfUpgrades >= 1) {
if (_root.muteSound == 0) {
_root.upgradeSound.start(0, 0);
}
if (_root.rateOfFireLevel < 3) {
_root.rateOfFire = _root.rateOfFire * (0.4 + (_root.rateOfFireLevel / 10));
} else {
_root.rateOfFire = _root.rateOfFire * 0.8;
}
_root.rateOfFireLevel++;
_root.numberOfUpgrades--;
_root.tankLevel++;
}
}
Symbol 245 Button
on (rollOver) {
_root.upgradeMenu.description_mc.descriptionNumber = 2;
}
on (rollOut) {
_root.upgradeMenu.description_mc.descriptionNumber = 0;
}
on (release) {
if (_root.numberOfUpgrades >= 1) {
if (_root.muteSound == 0) {
_root.upgradeSound.start(0, 0);
}
_root.damage = _root.damage + 10;
_root.recoil = _root.recoil * 0.8;
_root.damageLevel++;
_root.numberOfUpgrades--;
_root.tankLevel++;
}
}
Symbol 248 Button
on (rollOver) {
_root.upgradeMenu.description_mc.descriptionNumber = 3;
}
on (rollOut) {
_root.upgradeMenu.description_mc.descriptionNumber = 0;
}
on (release) {
if (_root.numberOfUpgrades >= 1) {
if (_root.muteSound == 0) {
_root.upgradeSound.start(0, 0);
}
_root.speed = _root.speed + 0.5;
_root.speedLevel++;
_root.numberOfUpgrades--;
_root.tankLevel++;
}
}
Symbol 251 Button
on (rollOver) {
_root.upgradeMenu.description_mc.descriptionNumber = 4;
}
on (rollOut) {
_root.upgradeMenu.description_mc.descriptionNumber = 0;
}
on (release) {
if (_root.numberOfUpgrades >= 1) {
if (_root.muteSound == 0) {
_root.upgradeSound.start(0, 0);
}
_root.shieldRate = _root.shieldRate * 0.6;
_root.shieldLevel++;
_root.numberOfUpgrades--;
_root.tankLevel++;
}
}
Symbol 254 Button
on (rollOver) {
_root.upgradeMenu.description_mc.descriptionNumber = 5;
}
on (rollOut) {
_root.upgradeMenu.description_mc.descriptionNumber = 0;
}
on (release) {
if (_root.numberOfUpgrades >= 1) {
if (_root.muteSound == 0) {
_root.upgradeSound.start(0, 0);
}
_root.recoil = _root.recoil * 5;
_root.recoilLevel++;
_root.numberOfUpgrades--;
_root.tankLevel++;
}
}
Instance of Symbol 278 MovieClip in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
if (_root.muteMusic) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (release) {
if (_currentframe == 1) {
stopAllSounds();
_root.muteMusic = true;
gotoAndStop (2);
} else if (_currentframe == 2) {
_root.loopSound.start(0, 999);
_root.muteMusic = false;
gotoAndStop (1);
}
}
Instance of Symbol 281 MovieClip in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
if (_root.muteSound) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (release) {
if (_currentframe == 1) {
_root.muteSound = true;
gotoAndStop (2);
} else if (_currentframe == 2) {
_root.muteSound = false;
gotoAndStop (1);
}
}
Instance of Symbol 285 MovieClip in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
if (_root._quality == "HIGH") {
this.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
this.gotoAndStop(2);
} else if (_root._quality == "LOW") {
this.gotoAndStop(3);
}
}
on (release) {
if (_currentframe == 1) {
_root._quality = "medium";
gotoAndStop (2);
} else if (_currentframe == 2) {
_root._quality = "low";
gotoAndStop (3);
} else if (_currentframe == 3) {
_root._quality = "high";
gotoAndStop (1);
}
}
Instance of Symbol 148 MovieClip in Symbol 287 MovieClip Frame 1
onClipEvent (enterFrame) {
numberOfUpgrades_txt.text = _root.numberOfUpgrades;
}
Instance of Symbol 263 MovieClip "description_mc" in Symbol 287 MovieClip Frame 1
onClipEvent (load) {
var descriptionNumber = 0;
}
onClipEvent (enterFrame) {
if (descriptionNumber == 0) {
description_txt.text = "Roll over an upgrade to see the description.";
}
if (descriptionNumber == 1) {
description_txt.text = "Increases the rate of fire.";
}
if (descriptionNumber == 2) {
description_txt.text = "Increases the damage each shot does.";
}
if (descriptionNumber == 3) {
description_txt.text = "Increases the speed of your tank.";
}
if (descriptionNumber == 4) {
description_txt.text = "Gives you a shield. Higher levels make the shield recharge faster.";
}
if (descriptionNumber == 5) {
description_txt.text = "Decreases the recoil of each shot.";
}
}
Instance of Symbol 272 MovieClip in Symbol 287 MovieClip Frame 1
on (release) {
_root.quitPrompt._visible = true;
_root.quitPrompt.swapDepths(_root.getNextHighestDepth());
}
Instance of Symbol 291 MovieClip in Symbol 294 MovieClip Frame 1
on (release) {
_root.gotoAndStop("menu");
_root.cleanUp();
}
Instance of Symbol 293 MovieClip in Symbol 294 MovieClip Frame 1
on (release) {
_parent._visible = false;
}
Symbol 300 Button
on (release) {
_root.playerName = _root.playerNameField.text;
_root.gotoAndPlay("highScores");
}
Symbol 302 Button
on (release) {
_root.gotoAndStop("game");
}