Frame 1
local_data = SharedObject.getLocal("stacks_data");
Stage.showMenu = false;
Instance of Symbol 3 MovieClip "spinball" in Frame 1
onClipEvent (load) {
spin = 0;
spinadjust = 5;
this.gotoAndStop(random(20));
}
onClipEvent (enterFrame) {
_rotation = ((Math.round((Math.atan2(_root._ymouse - _y, _root._xmouse - _x) / Math.PI) * 180) - 90) + spin);
spin = spin + spinadjust;
this.play();
xpos = _root._xmouse;
ypos = _root._ymouse;
if (_root._currentframe != 1) {
this.swapDepths(0);
this.removeMovieClip();
}
}
Instance of Symbol 5 MovieClip in Frame 1
onClipEvent (load) {
i = 0;
while (i < 200) {
_root.spinball.duplicateMovieClip("blur" + i, i, i);
_root["blur" + i]._x = random(1000);
_root["blur" + i]._y = random(1000);
i++;
}
}
Instance of Symbol 26 MovieClip in Frame 1
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Frame 2
stop();
Instance of Symbol 37 MovieClip "fader" in Frame 2
onClipEvent (load) {
active = false;
dest = "";
counter = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(_root.ii + 50000);
counter = _alpha;
if (active == true) {
_alpha = (_alpha + 10);
if (_alpha > 99) {
_root.gotoAndStop(dest);
active = false;
}
} else if (_alpha > 0) {
_alpha = (_alpha - 10);
} else {
_alpha = 0;
}
}
Instance of Symbol 46 MovieClip "sound" in Frame 2
onClipEvent (load) {
stop();
}
Frame 3
_root.pauseScreen.removeMovieClip();
_root.victory.removeMovieClip();
_root.hud.removeMovieClip();
_root.leftPlayer.removeMovieClip();
_root.rightPlayer.removeMovieClip();
stopAllSounds();
i = _root.ii;
while (i > 0) {
_root["clone" + i].removeMovieClip();
i--;
}
stop();
Instance of Symbol 63 MovieClip in Frame 3
onClipEvent (load) {
this.gotoAndStop(1);
_root.sound.gotoAndStop("title");
}
onClipEvent (enterFrame) {
this._x = 550 - _root._xmouse;
}
Instance of Symbol 63 MovieClip in Frame 3
onClipEvent (load) {
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
}
Instance of Symbol 63 MovieClip in Frame 3
onClipEvent (load) {
this.gotoAndStop(3);
}
onClipEvent (enterFrame) {
this._x = 550 - _root._xmouse;
}
Instance of Symbol 63 MovieClip in Frame 3
onClipEvent (load) {
this.gotoAndStop(4);
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
}
Instance of Symbol 63 MovieClip in Frame 3
onClipEvent (load) {
this.gotoAndStop(5);
}
onClipEvent (enterFrame) {
this._x = 550 - _root._xmouse;
}
Instance of Symbol 63 MovieClip in Frame 3
onClipEvent (load) {
this.gotoAndStop(6);
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
}
Instance of Symbol 26 MovieClip in Frame 3
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Frame 5
_root.sound.gotoAndStop("title");
_root.sound.gotoAndStop(1);
_root.victory.removeMovieClip();
_root.pauseScreen.removeMovieClip();
_root.hud.removeMovieClip();
_root.leftPlayer.removeMovieClip();
_root.rightPlayer.removeMovieClip();
i = _root.ii;
while (i > 0) {
_root["clone" + i].removeMovieClip();
i--;
}
if (local_data.data.rating == undefined) {
player1name = "Player1";
player2name = "Player2";
player1 = "Human";
player2 = "CPU";
player1skill = 5;
player2skill = 5;
bumpers = "off";
blockWeight = 8;
timer = "";
rating = 10;
handicap = false;
maxScore = 1;
blockSwitch = false;
} else {
player1 = local_data.data.player1;
player2 = local_data.data.player2;
player1name = local_data.data.player1name;
player1skill = local_data.data.player1skill;
player2name = local_data.data.player2name;
player2skill = local_data.data.player2skill;
bumpers = local_data.data.bumpers;
blockWeight = local_data.data.weight;
timer = local_data.data.timer;
rating = local_data.data.rating;
handicap = local_data.data.handicap;
maxScore = local_data.data.maxScore;
blockSwitch = local_data.data.blockSwitch;
}
stop();
Instance of Symbol 77 MovieClip "player1skilladjust" in Frame 5
onClipEvent (load) {
helptext = "The skill level of the player 1 CPU";
mess = "SKILL";
active = false;
if (_root.player1 == "CPU") {
_visible = true;
} else {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.player1 == "CPU") {
_visible = true;
} else {
_visible = false;
}
if (active == false) {
if (output < _root.player1skill) {
bobble._y = bobble._y - 2;
} else {
active = true;
}
} else {
_root.player1skill = output;
}
}
Instance of Symbol 65 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.player1 == "Human") {
this._alpha = 100;
} else {
this._alpha = 25;
}
}
on (release) {
_root.player1 = "Human";
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Player 1 to be controlled by a human.";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Player 1 to be controlled by a human.";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 65 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.player1 == "CPU") {
this._alpha = 100;
} else {
this._alpha = 25;
}
}
on (release) {
_root.player2name = "CPU 1";
_root.player1 = "CPU";
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Player 1 to be controlled by the CPU";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Player 1 to be controlled by the CPU";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 83 MovieClip in Frame 5
onClipEvent (load) {
inputBox.text = _root.player1name;
}
onClipEvent (enterFrame) {
_root.player1name = inputBox.text;
if (_root.player1 == "Human") {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 77 MovieClip "player2skilladjust" in Frame 5
onClipEvent (load) {
helptext = "The skill level of the player 2 CPU";
mess = "SKILL";
active = false;
if (_root.player1 == "CPU") {
_visible = true;
} else {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.player2 == "CPU") {
_visible = true;
} else {
_visible = false;
}
if (active == false) {
if (output < _root.player2skill) {
bobble._y = bobble._y - 2;
} else {
active = true;
}
} else {
_root.player2skill = output;
}
}
Instance of Symbol 65 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.player2 == "Human") {
this._alpha = 100;
} else {
this._alpha = 25;
}
}
on (release) {
_root.player2 = "Human";
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Player 2 to be controlled by a human.";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Player 2 to be controlled by a human.";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 65 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.player2 == "CPU") {
this._alpha = 100;
} else {
this._alpha = 25;
}
}
on (release) {
_root.player2name = "CPU 2";
_root.player2 = "CPU";
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Player 2 to be controlled by the CPU.";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Player 2 to be controlled by the CPU.";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 83 MovieClip in Frame 5
onClipEvent (load) {
inputBox.text = _root.player2name;
}
onClipEvent (enterFrame) {
_root.player2name = inputBox.text;
if (_root.player2 == "Human") {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 65 MovieClip in Frame 5
onClipEvent (load) {
if (_root.handicap == false) {
_alpha = 50;
}
}
on (release) {
if (_root.handicap == true) {
_root.handicap = false;
_alpha = 50;
} else {
_root.handicap = true;
_alpha = 100;
}
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "The player in the lead charges more slowly when True";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "The player in the lead charges more slowly when True";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 65 MovieClip in Frame 5
onClipEvent (load) {
if (_root.bumpers == undefined) {
_root.bumpers = "off";
}
stateArray = "off:on:leader:random";
stateArray = stateArray.split(":");
counter = 0;
}
on (release) {
counter++;
_alpha = ((counter * 25) + 20);
if (counter == 4) {
counter = 0;
}
_root.bumpers = stateArray[counter];
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Determines when bumpers are used in game";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Determines when bumpers are used in game";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 65 MovieClip "blockswitcher" in Frame 5
onClipEvent (load) {
if (_root.blockSwitch == false) {
blocks = "Static";
_alpha = 50;
} else {
blocks = "Random";
_alpha = 100;
}
}
on (release) {
if (_root.blockSwitch == true) {
_root.blockSwitch = false;
blocks = "Static";
if (_root.maxScore > 3) {
_root.maxScore = 3;
}
_alpha = 50;
} else {
_root.blockSwitch = true;
blocks = "Random";
_alpha = 100;
}
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "When RANDOM, blocks change activity at random intervals";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "When RANDOM, blocks change activity at random intervals";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 77 MovieClip "graphicsadjust" in Frame 5
onClipEvent (load) {
helptext = "Manually adjust the level of graphics";
mess = "GRAPHICS";
active = false;
output = 0;
}
onClipEvent (enterFrame) {
if (active == false) {
if (output < _root.rating) {
bobble._y = bobble._y - 2;
} else {
active = true;
}
} else {
_root.rating = output;
}
}
Instance of Symbol 65 MovieClip "test" in Frame 5
onClipEvent (load) {
function saveData() {
_root.local_data.data.player1name = _root.player1name;
_root.local_data.data.player1 = _root.player1;
_root.local_data.data.player1skill = _root.player1skill;
_root.local_data.data.player2name = _root.player2name;
_root.local_data.data.player2 = _root.player2;
_root.local_data.data.player2skill = _root.player2skill;
_root.local_data.data.bumpers = _root.bumpers;
_root.local_data.data.weight = _root.blockWeight;
_root.local_data.data.limit = _root.limit;
_root.local_data.data.timer = _root.timer;
_root.local_data.data.rating = _root.rating;
_root.local_data.data.handicap = _root.handicap;
_root.local_data.data.maxScore = _root.maxScore;
_root.local_data.data.blockSwitch = _root.blockSwitch;
_root.local_data.flush();
}
}
on (release) {
stopAllSounds();
saveData();
_root.fader.active = true;
_root.fader.dest = "test";
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Quick test to find level of graphics you should use.";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Set the skill level of Player1's AI";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 77 MovieClip "weightadjust" in Frame 5
onClipEvent (load) {
helptext = "Adjusts how heavy each block is.";
mess = "WEIGHT";
active = false;
output = 0;
}
onClipEvent (enterFrame) {
if (active == false) {
if (output < _root.blockWeight) {
bobble._y = bobble._y - 2;
} else {
active = true;
}
} else {
_root.blockWeight = output;
}
}
Instance of Symbol 65 MovieClip in Frame 5
on (release) {
if (_root.timer != "") {
_root.timer = _root.timer - 20;
}
if (_root.timer == 0) {
_root.timer = "";
_root.infsymbol._visible = true;
}
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Decrease game time limit.";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Decrease game time limit.";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 65 MovieClip in Frame 5
on (release) {
if (_root.timer == "") {
_root.timer = 20;
_root.infsymbol._visible = false;
} else if (_root.timer < 200) {
_root.timer = _root.timer + 20;
}
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Increase game time limit.";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Increase game time limit.";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 106 MovieClip "infsymbol" in Frame 5
onClipEvent (load) {
if (_root.timer != "") {
this._visible = false;
}
}
Instance of Symbol 65 MovieClip in Frame 5
on (release) {
if (_root.maxScore > 1) {
_root.maxScore--;
}
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Decrease game score limit.";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Decrease game score limit.";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 65 MovieClip in Frame 5
on (release) {
if ((_root.maxScore < 5) and (_root.blockSwitch == true)) {
_root.maxScore++;
} else if ((_root.maxScore < 3) and (_root.blockSwitch == false)) {
_root.maxScore++;
}
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Increase game score limit.";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Increase game score limit.";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 119 MovieClip "helpbox" in Frame 5
onClipEvent (load) {
_visible = false;
_alpha = 80;
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
if (this._x > 275) {
if (this._y > 250) {
this.gotoAndStop("tl");
} else {
this.gotoAndStop("bl");
}
} else if (this._y > 250) {
this.gotoAndStop("tr");
} else {
this.gotoAndStop("br");
}
}
Frame 8
_root.activeBlock = 1;
_root.bumperTimer = 200;
_root.slowDown = 1;
_root.sound.gotoAndStop("music");
_root.sound.gotoAndStop(1);
stop();
_root.staticBlock = 2;
_root.score1 = 0;
_root.score2 = 0;
_quality = "medium";
var t = getTimer();
_root.onEnterFrame = function () {
fps = (1 / (getTimer() - t)) * 1000;
t = getTimer();
};
Instance of Symbol 131 MovieClip "pauseScreen" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 2 MovieClip "ball" in Frame 8
onClipEvent (load) {
ySpeed = 0;
timer = 100;
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
if (_name != "ball") {
this._x = this._x + xSpeed;
this._y = this._y + ySpeed;
ySpeed = ySpeed + _root.gravity;
if (xSpeed != 0) {
xSpeed = xSpeed / (1 + (_root.gravity / 10));
}
if (_root.stack.hitTest(_x, _y, true)) {
i = 0;
while (i < _root.rating) {
_root.ii++;
this.swapDepths(_root.ii + 20000);
_root.explosion.duplicateMovieClip("clone" + _root.ii, _root.ii, _root.ii);
_root["clone" + _root.ii]._x = this._x;
_root["clone" + _root.ii]._y = this._y;
_root["clone" + _root.ii].xSpeed = ((((random(200) / 10) * (-xSpeed)) / 20) + random(10)) - 5;
_root["clone" + _root.ii].ySpeed = (((random(200) / 10) * (-ySpeed)) / 20) - random(10);
_root["clone" + _root.ii].colour = colour;
i++;
}
_root.hitSpot._x = this._x;
_root.hitSpot._y = this._y;
_root.hitCharge = xSpeed / 10;
_root.sound.gotoAndStop("explosion");
_root.sound.gotoAndStop(1);
this.removeMovieClip();
}
if (_name != "ball") {
_root.ii++;
this.swapDepths(_root.ii + 20000);
_root.blur.duplicateMovieClip("clone" + _root.ii, _root.ii, _root.ii);
_root["clone" + _root.ii]._x = (this._x + random(10)) - 5;
_root["clone" + _root.ii]._y = (this._y + random(10)) - 5;
_root["clone" + _root.ii]._alpha = 30;
_root["clone" + _root.ii].gotoAndStop(colour);
}
if ((this._y > 500) and (_name != "ball")) {
this.removeMovieClip();
}
if (timer > 0) {
timer--;
} else if (_name != "ball") {
if (this._xscale > 0) {
this._xscale = this._xscale - 10;
this._yscale = this._yscale - 10;
} else {
this.removeMovieClip();
}
}
}
}
}
Instance of Symbol 5 MovieClip "hitSpot" in Frame 8
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 138 MovieClip "blur" in Frame 8
onClipEvent (load) {
if (_alpha > 50) {
_alpha = 50;
}
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
if (_alpha > 0) {
this._alpha = this._alpha - Math.ceil(60 / _root.rating);
} else {
this.removeMovieClip();
}
}
}
Instance of Symbol 2 MovieClip "explosion" in Frame 8
onClipEvent (load) {
_alpha = 100;
_xscale = (random(50) + 20);
_yscale = _xscale;
_alpha = (_xscale + 50);
timer = _xscale;
_rotation = random(360);
bounce = 1 + ((random(10) + 1) / 10);
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
if (_name != "explosion") {
this._x = this._x + xSpeed;
this._y = this._y + ySpeed;
ySpeed = ySpeed + _root.gravity;
if (this._y > 400) {
this._y = 400;
ySpeed = (-ySpeed) / bounce;
}
if (timer > 0) {
timer--;
} else if (this._xscale > 0) {
this._xscale = this._xscale - 20;
this._yscale = this._yscale - 20;
} else {
this.removeMovieClip();
}
_root.ii++;
this.swapDepths(_root.ii + 20000);
_root.blur.duplicateMovieClip("clone" + _root.ii, _root.ii, _root.ii);
_root["clone" + _root.ii]._x = (this._x + random(10)) - 5;
_root["clone" + _root.ii]._y = (this._y + random(10)) - 5;
_root["clone" + _root.ii]._xscale = _xscale;
_root["clone" + _root.ii]._yscale = _xscale;
_root["clone" + _root.ii]._alpha = _alpha / (40 / _root.rating);
_root["clone" + _root.ii].gotoAndStop(colour);
}
}
}
Instance of Symbol 143 MovieClip "stack" in Frame 8
onClipEvent (load) {
ii = 0;
}
Instance of Symbol 145 MovieClip "tile" in Frame 8
onClipEvent (load) {
if (_name != "tile") {
timer = _root.rating * 3;
this._xscale = random(75) + 25;
this._yscale = random(75) + 25;
this._rotation = random(360);
spin = random(20) - 10;
blurswitch = false;
}
}
onClipEvent (enterFrame) {
if (_root.gamepaused == false) {
if (_name != "tile") {
this._y = this._y + (ySpeed / _root.slowDown);
if (this._y > 400) {
this._y = 400;
ySpeed = (-ySpeed) / 1.2;
xSpeed = xSpeed / 1.2;
spin = spin / 1.2;
}
ySpeed = ySpeed + (_root.gravity / _root.slowDown);
this._x = this._x + (xSpeed / _root.slowDown);
this._rotation = this._rotation + (spin / _root.slowDown);
if (timer > 0) {
timer = timer - (1 / _root.slowDown);
} else if (_alpha > 0) {
_alpha = (_alpha - (_root.rating / 2));
} else {
this.removeMovieClip();
}
if (blurswitch == true) {
blurswitch = false;
_parent.ii++;
_parent.shardblur.duplicateMovieClip("tile" + _parent.ii, _parent.ii, _parent.ii);
_parent["tile" + _parent.ii]._x = this._x;
_parent["tile" + _parent.ii]._y = this._y;
_parent["tile" + _parent.ii]._xscale = _xscale;
_parent["tile" + _parent.ii]._yscale = _yscale;
_parent["tile" + _parent.ii]._alpha = ((_alpha / 5) * _root.slowDown) / 2;
_parent["tile" + _parent.ii]._rotation = _rotation;
} else {
blurswitch = true;
}
}
}
}
Instance of Symbol 145 MovieClip "shardblur" in Frame 8
onClipEvent (enterFrame) {
if (_root.gamepaused == false) {
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
this.removeMovieClip();
}
}
}
Instance of Symbol 150 MovieClip "leftPlayer" in Frame 8
onClipEvent (load) {
function fire() {
_root.sound.gotoAndStop("shoot");
_root.sound.gotoAndStop(1);
_root.ii++;
_root.ball.duplicateMovieClip("clone" + _root.ii, _root.ii, _root.ii);
_root["clone" + _root.ii]._y = this._y;
_root["clone" + _root.ii]._x = this._x;
_root["clone" + _root.ii].xSpeed = charge;
_root["clone" + _root.ii].colour = random(4) + 1;
pauseTimer = 20;
charge = 0;
mouseClick = false;
speed = speedBase + random(speedRange);
gotoAndStop (2);
}
function chargeLaser() {
if (charge < maxCharge) {
charge = charge + chargeAccel;
if ((_root.score1 > _root.score2) and (_root.handicap == true)) {
charge = charge - (0.2 * (_root.score1 - _root.score2));
}
}
}
_root.ii = 0;
charge = 0;
chargeAccel = 1;
maxCharge = 40;
speedBase = 5;
speedRange = 5;
speed = speedBase + random(speedRange);
dirSwitch = false;
_root.gravity = 0.5;
mouseClick = false;
stop();
pauseTimer = 0;
chargetimer = 200 / _root.player1skill;
shootActive = false;
shootAccuracy = 30 / _root.player1skill;
shootTimer = 5 + random(shootAccuracy);
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
_root.ii++;
this.swapDepths(_root.ii + 25000);
_root.hud.charge1.bar._width = (100 / maxCharge) * charge;
_root.hud.charge1.bar2._xscale = pauseTimer * 5;
if (pauseTimer == 0) {
gotoAndStop (1);
if (_root.player1 == "Human") {
if (Key.isDown(65)) {
mouseClick = true;
chargeLaser();
} else if ((Key.isDown(65) == false) and (mouseClick == true)) {
fire();
}
} else if (_root.player1 == "CPU") {
if (chargetimer > 0) {
chargetimer--;
} else {
chargeLaser();
if ((shootActive == true) and (charge > (maxCharge / 1.25))) {
if (shootTimer > 0) {
shootTimer--;
} else {
shootTimer = random(5) + shootAccuracy;
fire();
chargetimer = 200 / _root.player1skill;
}
shootActive = false;
} else {
shootActive = false;
}
}
}
if (dirSwitch == false) {
cog._rotation = cog._rotation + speed;
cog2._rotation = cog2._rotation + speed;
this._y = this._y + speed;
} else {
cog._rotation = cog._rotation - speed;
cog2._rotation = cog2._rotation - speed;
this._y = this._y - speed;
}
if (this._y > 350) {
this._y = 350;
dirSwitch = true;
speed = speedBase + random(speedRange);
} else if (this._y < 50) {
this._y = 50;
dirSwitch = false;
speed = speedBase + random(speedRange);
}
} else {
pauseTimer--;
}
}
}
Instance of Symbol 150 MovieClip "rightPlayer" in Frame 8
onClipEvent (load) {
function fire() {
_root.sound.gotoAndStop("shoot");
_root.sound.gotoAndStop(1);
_root.ii++;
_root.ball.duplicateMovieClip("clone" + _root.ii, _root.ii, _root.ii);
_root["clone" + _root.ii]._y = this._y;
_root["clone" + _root.ii]._x = this._x;
_root["clone" + _root.ii].xSpeed = -charge;
_root["clone" + _root.ii].colour = random(4) + 1;
pauseTimer = 20;
charge = 0;
mouseClick = false;
speed = speedBase + random(speedRange);
gotoAndStop (2);
}
function chargeLaser() {
if (charge < maxCharge) {
charge = charge + chargeAccel;
if ((_root.score2 > _root.score1) and (_root.handicap == true)) {
charge = charge - (0.2 * (_root.score2 - _root.score1));
}
}
}
_root.ii = 0;
charge = 0;
chargeAccel = 1;
maxCharge = 40;
speedBase = 5;
speedRange = 5;
speed = speedBase + random(speedRange);
dirSwitch = false;
_root.gravity = 0.5;
mouseClick = false;
stop();
pauseTimer = 0;
chargetimer = 200 / _root.player2skill;
shootActive = false;
shootAccuracy = 30 / _root.player2skill;
shootTimer = 5 + random(shootAccuracy);
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
_root.ii++;
this.swapDepths(_root.ii + 25000);
_root.hud.charge2.bar._width = (100 / maxCharge) * charge;
_root.hud.charge2.bar2._xscale = pauseTimer * 5;
if (pauseTimer == 0) {
gotoAndStop (1);
if (_root.player2 == "Human") {
if (Key.isDown(76)) {
mouseClick = true;
chargeLaser();
} else if ((Key.isDown(76) == false) and (mouseClick == true)) {
fire();
}
} else if (_root.player2 == "CPU") {
if (chargetimer > 0) {
chargetimer--;
} else {
chargeLaser();
if ((shootActive == true) and (charge > (maxCharge / 1.25))) {
if (shootTimer > 0) {
shootTimer--;
} else {
shootTimer = random(5) + shootAccuracy;
fire();
chargetimer = 200 / _root.player2skill;
}
shootActive = false;
} else {
shootActive = false;
}
}
}
if (dirSwitch == false) {
cog._rotation = cog._rotation + speed;
cog2._rotation = cog2._rotation + speed;
this._y = this._y + speed;
} else {
cog._rotation = cog._rotation - speed;
cog2._rotation = cog2._rotation - speed;
this._y = this._y - speed;
}
if (this._y > 350) {
this._y = 350;
dirSwitch = true;
speed = speedBase + random(speedRange);
} else if (this._y < 50) {
this._y = 50;
dirSwitch = false;
speed = speedBase + random(speedRange);
}
} else {
pauseTimer--;
}
}
}
Instance of Symbol 167 MovieClip "hud" in Frame 8
onClipEvent (load) {
_root.gamepaused = false;
_root.gamefroze = false;
timer = _root.timer;
keySpace = false;
}
onClipEvent (enterFrame) {
if ((timer < 0) and (_root.timer != "")) {
_root.timer = 0;
if (_root.score1 > _root.score2) {
_root.gamefroze = true;
_root.victory.active = true;
_root.victory.swapDepths(_root.ii + 50000);
_root.victory.mess2 = ("TIME'S UP! " + _root.player1name) + " WINS!";
} else if (_root.score2 > _root.score1) {
_root.gamefroze = true;
_root.victory.active = true;
_root.victory.swapDepths(_root.ii + 50000);
_root.victory.mess2 = ("TIME'S UP! " + _root.player1name) + " WINS!";
} else {
_root.gamefroze = true;
_root.victory.active = true;
_root.victory.swapDepths(_root.ii + 50000);
_root.victory.mess2 = "TIME'S UP! THIS MATCH IS A DRAW!";
}
}
if (_root.score1 > (_root.maxScore / 2)) {
_root.gamefroze = true;
_root.victory.active = true;
_root.victory.swapDepths(_root.ii + 50000);
_root.victory.mess = _root.player1name + " WINS!";
} else if (_root.score2 > (_root.maxScore / 2)) {
_root.victory.swapDepths(_root.ii + 50000);
_root.gamefroze = true;
_root.victory.active = true;
_root.victory.mess = _root.player2name + " WINS!";
}
if (_root.gamefroze == false) {
if (_root.gamepaused == false) {
this.swapDepths(_root.ii + 20000);
timer = timer - 0.0333333333333333;
_root.timer = Math.ceil(timer);
if ((_root.timer / _root.timer) != 1) {
_root.timer = "";
}
}
if (Key.isDown(32) and (keySpace == false)) {
keySpace = true;
if (_root.gamepaused == false) {
_root.gamepaused = true;
_root.pauseScreen._visible = true;
_root.pauseScreen.swapDepths(_root.ii + 30000);
stopAllSounds();
} else {
_root.gamepaused = false;
_root.pauseScreen._visible = false;
_root.sound.gotoAndStop("music");
_root.sound.gotoAndStop(1);
}
} else if (Key.isDown(32) == false) {
keySpace = false;
}
}
}
Instance of Symbol 173 MovieClip "victory" in Frame 8
onClipEvent (load) {
_alpha = 0;
active = false;
mess = "";
}
onClipEvent (enterFrame) {
if (active == true) {
fader._alpha = fader._alpha + 5;
_alpha = (_alpha + 10);
} else {
fader._alpha = 0;
_alpha = 0;
}
}
Instance of Symbol 179 MovieClip "precounter" in Frame 8
onClipEvent (load) {
counter = 80;
}
onClipEvent (enterFrame) {
if (counter > 0) {
counter--;
timer = Math.ceil(counter / 20);
_root.gamefroze = true;
} else {
_root.gamefroze = false;
this.swapDepths(0);
this.removeMovieClip();
}
}
Instance of Symbol 2 MovieClip "testdot" in Frame 9
onClipEvent (enterFrame) {
this._y = this._y + 30;
if (this._y > 600) {
this.removeMovieClip();
}
}
Instance of Symbol 65 MovieClip "ball" in Frame 9
onClipEvent (load) {
_root.ii = 0;
counter = 10;
begin = getTimer();
_root.testdot._visible = false;
}
onClipEvent (enterFrame) {
if (counter != 0) {
i = 0;
while (i < 600) {
_root.ii++;
_root.testdot.duplicateMovieClip("dot" + _root.ii, _root.ii, _root.ii);
_root["dot" + _root.ii]._x = random(550);
_root["dot" + _root.ii]._y = 0;
_root["dot" + _root.ii]._visible = 0;
i++;
}
counter--;
if (counter == 0) {
end = getTimer();
_root.rating = (100 / ((end - begin) / 300)) + 4;
_root.local_data.data.rating = _root.rating;
i = _root.ii;
while (i > 0) {
_root["dot" + i].removeMovieClip();
i--;
}
_root.fader.active = true;
_root.fader.dest = "options";
}
}
}
on (press) {
counter = 0;
i = _root.ii;
while (i > 0) {
_root["dot" + i].removeMovieClip();
i--;
}
_root.fader.active = true;
_root.fader.dest = "options";
}
Frame 10
_root.fader.active = true;
_root.fader.dest = "options";
Frame 11
Instance of Symbol 2 MovieClip "ball" in Symbol 3 MovieClip Frame 1
/* no clip actions */
Symbol 5 MovieClip Frame 1
_visible = false;
Symbol 14 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 19 Button
on (release) {
_root.play();
}
Symbol 20 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 20 MovieClip Frame 2
gotoAndPlay (1);
Symbol 29 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 36 MovieClip Frame 81
_root.fader.active = true;
_root.fader.dest = "title";
stop();
Instance of Symbol 57 MovieClip in Symbol 63 MovieClip Frame 1
onClipEvent (load) {
bg.gotoAndStop(random(2) + 1);
}
Symbol 66 Button
on (press) {
_root.fader.active = true;
_root.fader.dest = "options";
}
Symbol 68 Button
on (press) {
_root.fader.active = true;
_root.fader.dest = "instructions";
}
Instance of Symbol 65 MovieClip "bobble" in Symbol 77 MovieClip Frame 1
onClipEvent (load) {
ypos = this._y;
xpos = this._x;
}
on (press) {
drag = true;
}
onClipEvent (mouseUp) {
drag = false;
}
onClipEvent (enterFrame) {
_parent.output = Math.ceil(((((ypos - _parent._y) - (this._y - _parent._y)) + 10) / 10) * 2);
if (_parent._visible == true) {
if (drag == true) {
this._y = _root._ymouse - _parent._y;
}
this._x = xpos;
if (this._y > ypos) {
this._y = ypos;
} else if (this._y < (ypos - 90)) {
this._y = ypos - 90;
}
}
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = _parent.helptext;
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = _parent.helptext;
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Symbol 107 Button
on (press) {
_root.test.saveData();
_root.fader.active = true;
_root.fader.dest = "title";
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Return to the main menu";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Return to the main menu";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Symbol 109 Button
on (press) {
player1skill = 5;
player2skill = 5;
bumpers = "off";
blockWeight = 8;
timer = "";
rating = 10;
handicap = false;
maxScore = 1;
blockSwitch = false;
_root.test.saveData();
_root.fader.active = true;
_root.fader.dest = "blank";
stopAllSounds();
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Rules to the default settings";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "Set Rules to the default settings";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Symbol 119 MovieClip Frame 1
stop();
Symbol 120 Button
on (press) {
_root.test.saveData();
_root.fader.active = true;
_root.fader.dest = "game";
stopAllSounds();
}
on (rollOver) {
_root.helpbox._visible = true;
_root.helptext = "START THE MATCH!";
}
on (dragOver) {
_root.helpbox._visible = true;
_root.helptext = "START THE MATCH!";
}
on (rollOut) {
_root.helpbox._visible = false;
}
on (dragOut) {
_root.helpbox._visible = false;
}
Instance of Symbol 123 MovieClip in Symbol 124 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
_parent.star._visible = false;
ii = 0;
speed = 20;
count = 30;
timer = count;
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
if (timer > 0) {
timer = timer - _root.rating;
} else {
timer = count + timer;
ii++;
_parent.star.duplicateMovieClip("star" + ii, ii, ii);
_parent["star" + ii].xSpeed = random(speed) + 5;
if (random(2) == 0) {
_parent["star" + ii].xSpeed = _parent["star" + ii].xSpeed * -1;
}
_parent["star" + ii].ySpeed = random(speed) + 5;
if (random(2) == 0) {
_parent["star" + ii].ySpeed = _parent["star" + ii].ySpeed * -1;
}
_parent["star" + ii]._xscale = random(50) + 5;
_parent["star" + ii]._yscale = _parent["star" + ii]._xscale;
_parent["star" + ii]._alpha = 0;
}
}
}
Instance of Symbol 123 MovieClip "star" in Symbol 124 MovieClip Frame 1
onClipEvent (load) {
timer = 20;
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
if (timer < 0) {
this.removeMovieClip();
}
timer--;
_alpha = (_alpha + 10);
this._x = this._x + xSpeed;
this._y = this._y + ySpeed;
}
}
Instance of Symbol 65 MovieClip in Symbol 131 MovieClip Frame 1
on (release) {
if (_parent._visible == true) {
_root.fader.active = true;
_root.fader.dest = "options";
stopAllSounds();
}
}
Symbol 141 MovieClip Frame 1
_visible = false;
Instance of Symbol 57 MovieClip "block" in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
activeTimerBase = 100;
activeTimerRange = 100;
balance = 1;
activeTimer = activeTimerBase + random(activeTimerRange);
if (_root.blockSwitch == true) {
active = random(2);
}
if (_name == "block") {
active = false;
}
bg.gotoAndStop(1);
xPos = this._x;
xSpeed = 0;
ySpeed = 0;
_root.blockWidth = this._width;
this._width = _root.blockWidth;
ymove = this._height;
fall = false;
}
onClipEvent (enterFrame) {
if (_root.blockSwitch == false) {
activeTimer = 5;
}
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
if ((active == true) or (fall == true)) {
if (this.hitTest(_root.leftPlayer.hit)) {
_root.leftPlayer.shootActive = true;
}
if (this.hitTest(_root.rightPlayer.hit)) {
_root.rightPlayer.shootActive = true;
}
bg.gotoAndStop(1);
if (activeTimer == 0) {
active = false;
activeTimer = (activeTimerBase + random(activeTimerRange)) / balance;
} else {
activeTimer--;
}
this._x = this._x + xSpeed;
if (xSpeed != 0) {
xSpeed = xSpeed / 1.1;
}
if ((xSpeed < 0.1) and (xSpeed > -0.1)) {
xSpeed = 0;
}
if ((this._x > (xPos + _root.blockWidth)) or (this._x < (xPos - _root.blockWidth))) {
this._y = this._y + ySpeed;
_parent.ii++;
_parent.blockblur.duplicateMovieClip("tile" + _parent.ii, _parent.ii, _parent.ii);
_parent["tile" + _parent.ii]._x = this._x;
_parent["tile" + _parent.ii]._y = this._y;
if (ySpeed == 0) {
_root.sound.gotoAndStop("fall");
_root.sound.gotoAndStop(1);
}
ySpeed++;
fall = true;
} else if (this.hitTest(_root.hitSpot) and (fall == false)) {
_root.hitSpot._y = 1000;
_root.sound.gotoAndStop("boxmove");
_root.sound.gotoAndStop(1);
xSpeed = xSpeed + (_root.hitCharge / (_root.blockWeight / 10));
}
if (this.hitTest(_parent.base)) {
while (this.hitTest(_parent.base)) {
this._y--;
}
point = {x:this._x, y:this._y};
localToGlobal(point);
i = 0;
while (i < (_root.rating * 2)) {
_root.ii++;
_root.tile.duplicateMovieClip("tile" + _root.ii, _root.ii, _root.ii);
_root["tile" + _root.ii]._x = (this._x + random(120)) + 220;
_root["tile" + _root.ii]._y = this._y + _height;
_root["tile" + _root.ii].ySpeed = ((-ySpeed) / 2) + ((random(100) - 50) / 10);
_root["tile" + _root.ii].xSpeed = random(ySpeed) - (ySpeed / 2);
i++;
}
if (point.x < 225) {
_root.score2++;
} else {
_root.score1++;
}
_root.sound.gotoAndStop("break");
_root.sound.gotoAndStop(1);
this.swapDepths(0);
this.removeMovieClip();
}
} else {
if (this.hitTest(_root.hitSpot)) {
_root.hitSpot._y = 1000;
xSpeed = _root.hitCharge * 2;
}
xSpeed = 0;
bg.gotoAndStop(2);
if (activeTimer == 0) {
active = true;
activeTimer = activeTimerBase + random(activeTimerRange);
} else if (_name != "block") {
activeTimer--;
} else {
bg.gotoAndStop(3);
}
}
play();
} else {
stop();
}
}
Instance of Symbol 141 MovieClip "base" in Symbol 143 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(_parent.ii + 10000);
}
Instance of Symbol 57 MovieClip "blockblur" in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
_alpha = 15;
bg.gotoAndStop(_root.activeBlock);
}
onClipEvent (enterFrame) {
if (_root.gamepaused == false) {
stop();
if (_alpha > 0) {
_alpha = (_alpha - (20 / _root.rating));
} else {
this.removeMovieClip();
}
}
}
Instance of Symbol 57 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
_parent.ii++;
_parent.block.duplicateMovieClip("block" + _parent.ii, _parent.ii, _parent.ii);
_parent["block" + _parent.ii]._x = this._x;
_parent["block" + _parent.ii]._y = this._y;
if (_root.blockSwitch == false) {
_parent["block" + _parent.ii].active = true;
}
this.swapDepths(0);
this.removeMovieClip();
}
Instance of Symbol 57 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
_parent.ii++;
_parent.block.duplicateMovieClip("block" + _parent.ii, _parent.ii, _parent.ii);
_parent["block" + _parent.ii]._x = this._x;
_parent["block" + _parent.ii]._y = this._y;
if (_root.blockSwitch == false) {
_parent["block" + _parent.ii].active = false;
}
this.swapDepths(0);
this.removeMovieClip();
}
Instance of Symbol 57 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
_parent.ii++;
_parent.block.duplicateMovieClip("block" + _parent.ii, _parent.ii, _parent.ii);
_parent["block" + _parent.ii]._x = this._x;
_parent["block" + _parent.ii]._y = this._y;
if (_root.blockSwitch == false) {
_parent["block" + _parent.ii].active = true;
}
this.swapDepths(0);
this.removeMovieClip();
}
Instance of Symbol 57 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
_parent.ii++;
_parent.block.duplicateMovieClip("block" + _parent.ii, _parent.ii, _parent.ii);
_parent["block" + _parent.ii]._x = this._x;
_parent["block" + _parent.ii]._y = this._y;
if (_root.blockSwitch == false) {
_parent["block" + _parent.ii].active = false;
}
this.swapDepths(0);
this.removeMovieClip();
}
Instance of Symbol 57 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
_parent.ii++;
_parent.block.duplicateMovieClip("block" + _parent.ii, _parent.ii, _parent.ii);
_parent["block" + _parent.ii]._x = this._x;
_parent["block" + _parent.ii]._y = this._y;
if (_root.blockSwitch == false) {
_parent["block" + _parent.ii].active = true;
}
this.swapDepths(0);
this.removeMovieClip();
}
Instance of Symbol 141 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(_parent.ii + 10000);
}
Instance of Symbol 141 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (enterFrame) {
this.swapDepths(_parent.ii + 10000);
}
Instance of Symbol 57 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
bg.stop();
dirSwitch = true;
speedBase = 5;
speedRange = 10;
speed = speedBase + random(speedRange);
if (_root.bumpers == "off") {
this.swapDepths(0);
this.removeMovieClip();
} else if ((_root.bumpers == "random") or (_root.bumpers == "leader")) {
xpos = this._x;
this._x = -1000;
bumperTimer = _root.bumperTimer;
_root.bumperActive = false;
}
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
if ((_root.bumpers == "leader") and (_root.score1 > _root.score2)) {
this._x = xpos;
} else if (_root.bumpers == "leader") {
this._x = -1000;
} else if (_root.bumpers == "random") {
if (_root.bumperActive == true) {
this._x = xpos;
} else {
this._x = -1000;
}
if (bumperTimer > 0) {
bumperTimer--;
} else {
bumperTimer = _root.bumperTimer;
if (_root.bumperActive == false) {
_root.bumperActive = true;
} else {
_root.bumperActive = false;
}
}
} else if (_root.bumpers == "random") {
}
if (dirSwitch == false) {
this._y = this._y + speed;
} else {
this._y = this._y - speed;
}
if (this._y > 390) {
this._y = 390;
dirSwitch = true;
speed = speedBase + random(speedRange);
} else if (this._y < 10) {
this._y = 10;
dirSwitch = false;
speed = speedBase + random(speedRange);
}
}
}
Instance of Symbol 57 MovieClip in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
bg.stop();
dirSwitch = true;
speedBase = 5;
speedRange = 10;
speed = speedBase + random(speedRange);
if (_root.bumpers == "off") {
this.swapDepths(0);
this.removeMovieClip();
} else if ((_root.bumpers == "random") or (_root.bumpers == "leader")) {
xpos = this._x;
this._x = -1000;
bumperTimer = _root.bumperTimer;
_root.bumperActive = false;
}
}
onClipEvent (enterFrame) {
if ((_root.gamepaused == false) and (_root.gamefroze == false)) {
if ((_root.bumpers == "leader") and (_root.score2 > _root.score1)) {
this._x = xpos;
} else if (_root.bumpers == "leader") {
this._x = -1000;
} else if (_root.bumpers == "random") {
if (_root.bumperActive == true) {
this._x = xpos;
} else {
this._x = -1000;
}
if (bumperTimer > 0) {
bumperTimer--;
} else {
bumperTimer = _root.bumperTimer;
if (_root.bumperActive == false) {
}
}
} else if (_root.bumpers == "random") {
}
if (dirSwitch == false) {
this._y = this._y + speed;
} else {
this._y = this._y - speed;
}
if (this._y > 390) {
this._y = 390;
dirSwitch = true;
speed = speedBase + random(speedRange);
} else if (this._y < 10) {
this._y = 10;
dirSwitch = false;
speed = speedBase + random(speedRange);
}
}
}
Instance of Symbol 65 MovieClip in Symbol 173 MovieClip Frame 1
on (release) {
if (_parent._visible == true) {
_root.fader.active = true;
_root.fader.dest = "options";
stopAllSounds();
}
}
Symbol 202 Button
on (press) {
_root.fader.active = true;
_root.fader.dest = "title";
stopAllSounds();
_root.sound.gotoAndStop(1);
}