Section 1
//button (buttons.button)
package buttons {
import general.*;
import flash.media.*;
import entities.*;
public class button extends entity {
public var pressSound:Sound;
public var hoverSound:Sound;
public function button(){
hoverSound = new paddleHitSound();
pressSound = new menuSelectSound();
super();
stop();
}
public function onMouseRelease(){
}
public function btnUpdate():Boolean{
return (true);
}
override public function update():Boolean{
var _local1:Boolean;
if (!(btnUpdate())){
return (false);
};
_local1 = hitTestObject(input.mouse);
if (_local1){
if (input.mouseDown){
if (currentFrame != 3){
onMousePress();
};
gotoAndStop(3);
} else {
if (input.mouseReleased){
gotoAndStop(4);
onMouseRelease();
pressSound.play();
} else {
if (currentFrame != 4){
if (currentFrame != 2){
hoverSound.play();
};
gotoAndStop(2);
};
};
};
} else {
gotoAndStop(1);
};
return (true);
}
public function onMousePress(){
}
}
}//package buttons
Section 2
//buttonAndre (buttons.buttonAndre)
package buttons {
import flash.net.*;
public class buttonAndre extends button {
override public function onMouseRelease(){
navigateToURL(new URLRequest("http://www.girlshavecooties.com"), "_blank");
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 3
//buttonArmor (buttons.buttonArmor)
package buttons {
import flash.net.*;
public class buttonArmor extends button {
override public function onMouseRelease(){
navigateToURL(new URLRequest("http://www.armorgames.com"), "_blank");
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 4
//buttonContinue (buttons.buttonContinue)
package buttons {
public class buttonContinue extends button {
override public function onMouseRelease(){
main.mState = "game";
main.mGame.loadLevel(++main.mGame.currLevel);
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 5
//buttonDustin (buttons.buttonDustin)
package buttons {
import flash.net.*;
public class buttonDustin extends button {
override public function onMouseRelease(){
navigateToURL(new URLRequest("http://www.dustfilms.com"), "_blank");
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 6
//buttonFxOff (buttons.buttonFxOff)
package buttons {
import flash.display.*;
public class buttonFxOff extends button {
public var bool:Sprite;
public function buttonFxOff(){
bool.visible = !(main.effectsEnabled);
}
override public function onMouseRelease(){
main.effectsEnabled = false;
}
override public function btnUpdate():Boolean{
bool.visible = !(main.effectsEnabled);
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 7
//buttonFxOn (buttons.buttonFxOn)
package buttons {
import flash.display.*;
public class buttonFxOn extends button {
public var bool:Sprite;
public function buttonFxOn(){
bool.visible = main.effectsEnabled;
}
override public function onMouseRelease(){
main.effectsEnabled = true;
}
override public function btnUpdate():Boolean{
bool.visible = main.effectsEnabled;
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 8
//buttonLvl1 (buttons.buttonLvl1)
package buttons {
public class buttonLvl1 extends button {
override public function onMouseRelease(){
main.mLevelSelect.unload = true;
main.mLevelSelect.lvl = 1;
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 9
//buttonLvl10 (buttons.buttonLvl10)
package buttons {
public class buttonLvl10 extends button {
override public function onMouseRelease(){
main.mLevelSelect.unload = true;
main.mLevelSelect.lvl = 10;
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 10
//buttonLvl15 (buttons.buttonLvl15)
package buttons {
public class buttonLvl15 extends button {
override public function onMouseRelease(){
main.mLevelSelect.unload = true;
main.mLevelSelect.lvl = 15;
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 11
//buttonLvl20 (buttons.buttonLvl20)
package buttons {
public class buttonLvl20 extends button {
override public function onMouseRelease(){
main.mLevelSelect.unload = true;
main.mLevelSelect.lvl = 20;
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 12
//buttonLvl25 (buttons.buttonLvl25)
package buttons {
public class buttonLvl25 extends button {
override public function onMouseRelease(){
main.mLevelSelect.unload = true;
main.mLevelSelect.lvl = 25;
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 13
//buttonLvl6 (buttons.buttonLvl6)
package buttons {
public class buttonLvl6 extends button {
override public function onMouseRelease(){
main.mLevelSelect.unload = true;
main.mLevelSelect.lvl = 6;
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 14
//buttonMarathon (buttons.buttonMarathon)
package buttons {
public class buttonMarathon extends button {
override public function onMouseRelease(){
main.mGameType.unload = true;
main.mGameType.mode = "marathon";
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 15
//buttonMarathonTab (buttons.buttonMarathonTab)
package buttons {
import general.*;
public class buttonMarathonTab extends button {
override public function onMouseRelease(){
menu.currTab = "marathon";
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 16
//buttonNormal (buttons.buttonNormal)
package buttons {
public class buttonNormal extends button {
override public function onMouseRelease(){
main.mGameType.unload = true;
main.mGameType.mode = "normal";
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 17
//buttonNormalTab (buttons.buttonNormalTab)
package buttons {
import general.*;
public class buttonNormalTab extends button {
override public function onMouseRelease(){
menu.currTab = "normal";
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 18
//buttonQuit (buttons.buttonQuit)
package buttons {
public class buttonQuit extends button {
override public function onMouseRelease(){
main.mMenu = null;
main.mState = "menu";
main.mGame = null;
main.startTransition();
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 19
//buttonRestartLevel (buttons.buttonRestartLevel)
package buttons {
import general.*;
public class buttonRestartLevel extends button {
override public function onMouseRelease(){
game.scoreCounter.score = game.lastScore;
game.comboCounter.count = 0;
main.mGame.loadLevel(main.mGame.currLevel);
main.mState = "game";
main.mPauseMenu = null;
main.startTransition();
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 20
//buttonRetry (buttons.buttonRetry)
package buttons {
import general.*;
public class buttonRetry extends button {
override public function onMouseRelease(){
main.mState = "game";
game.scoreCounter.score = game.lastScore;
main.mGame.loadLevel(main.mGame.currLevel);
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 21
//buttonScores (buttons.buttonScores)
package buttons {
import general.*;
public class buttonScores extends button {
override public function onMouseRelease(){
menu.showScores = !(menu.showScores);
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 22
//buttonStart (buttons.buttonStart)
package buttons {
public class buttonStart extends button {
override public function onMouseRelease(){
main.mMenu.unload = true;
}
override public function btnUpdate():Boolean{
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 23
//buttonSubmit (buttons.buttonSubmit)
package buttons {
public class buttonSubmit extends button {
private var submitted:Boolean;// = false
public function buttonSubmit(){
submitted = false;
super();
}
override public function onMouseRelease(){
submitted = true;
}
override public function btnUpdate():Boolean{
if (submitted){
return (false);
};
return (true);
}
override public function onMousePress(){
}
}
}//package buttons
Section 24
//ball (entities.ball)
package entities {
import flash.display.*;
import general.*;
import flash.media.*;
public class ball extends entity {
private const numPoints:int = 16;
private const smashSpd:Number = 20;
public var active:Boolean;// = false
private var oldY:Number;
public var xSpd:Number;// = 0
private var oldX:Number;
public var ySpd:Number;// = 5
public var paddleSmash:Sound;
private var maxSpd:Number;// = 100
private var maxIter:Number;// = 10
public var paddleHit:Sound;
public static var trailSprite:Sprite = new Sprite();
private static var offsetArr:Array = null;
public function ball(_arg1:Number, _arg2:Number){
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Number;
paddleHit = new paddleHitSound();
paddleSmash = new paddleHitHardSound();
active = false;
maxIter = 10;
maxSpd = 100;
xSpd = 0;
ySpd = 5;
oldX = x;
oldY = y;
super();
game.ballCount++;
x = _arg1;
y = _arg2;
oldX = x;
oldY = y;
if (offsetArr == null){
offsetArr = new Array(numPoints);
_local3 = 0;
while (_local3 < numPoints) {
_local4 = ((_local3 / numPoints) * (Math.PI * 2));
_local5 = Math.sin(_local4);
_local6 = Math.cos(_local4);
offsetArr[_local3] = [_local5, _local6];
_local3++;
};
};
}
private function iterateUpdate():Boolean{
var _local1:Number;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:Number;
var _local7:Number;
_local1 = Math.sqrt(((xSpd * xSpd) + (ySpd * ySpd)));
if (_local1 > maxSpd){
xSpd = (xSpd / _local1);
ySpd = (ySpd / _local1);
xSpd = (xSpd * maxSpd);
ySpd = (ySpd * maxSpd);
_local1 = Math.sqrt(((xSpd * xSpd) + (ySpd * ySpd)));
};
_local2 = Math.ceil((_local1 / maxIter));
_local3 = (xSpd / _local2);
_local4 = (ySpd / _local2);
_local5 = 0;
while (_local5 < _local2) {
_local6 = x;
_local7 = y;
x = (x + _local3);
y = (y + _local4);
if (!(bounds())){
return (false);
};
_local3 = (xSpd / _local2);
_local4 = (ySpd / _local2);
if (paddleCol()){
if (Math.sqrt(((game.mPaddle.xSpd * game.mPaddle.xSpd) + (game.mPaddle.ySpd * game.mPaddle.ySpd))) < 10){
if (game.channelArray[13][0] == false){
game.channelArray[13][0] = true;
game.channelArray[13][1] = paddleHit.play();
if (game.channelArray[13][1] != null){
game.channelArray[13][1].soundTransform = main.mGame.sfxTrans;
};
game.channelArray[13][2] = -1000;
break;
};
} else {
if (game.channelArray[13][0] == false){
game.channelArray[13][0] = true;
game.channelArray[13][1] = paddleSmash.play();
if (game.channelArray[13][1] != null){
game.channelArray[13][1].soundTransform = main.mGame.sfxTrans;
};
game.channelArray[13][2] = -1000;
break;
};
};
if (game.mBullets > 0){
game.mPaddle.gotoAndPlay("gunhit");
} else {
game.mPaddle.gotoAndPlay("hit");
};
};
if (active){
if (brickCol(_local1, _local6, _local7)){
_local3 = (xSpd / _local2);
_local4 = (ySpd / _local2);
break;
};
};
_local5++;
};
return (true);
}
private function lerp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (((_arg2 * Math.min(_arg3, 1)) + (_arg1 * (1 - Math.min(_arg3, 1)))));
}
public function brickCol(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Number;
var _local10:Number;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:Boolean;
var _local15:int;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local4 = new Array(numPoints);
_local5 = 0;
while (_local5 < numPoints) {
_local4[_local5] = false;
_local5++;
};
_local6 = Math.floor(((x / main.gameWidth) * game.xBlocks));
_local7 = Math.floor(((y / main.gameHeight) * game.yBlocks));
_local8 = -3;
while (_local8 < 4) {
if (game.blockArray[(_local6 + _local8)] != undefined){
_local13 = -3;
while (_local13 < 4) {
if (game.blockArray[(_local6 + _local8)][(_local7 + _local13)] != undefined){
if (((this.hitTestObject(game.blockArray[(_local6 + _local8)][(_local7 + _local13)].hit)) && ((game.blockArray[(_local6 + _local8)][(_local7 + _local13)].mHealth > 0)))){
_local14 = false;
_local15 = 0;
while (_local15 < numPoints) {
_local16 = ((offsetArr[_local15][0] * width) / 2);
_local17 = ((offsetArr[_local15][1] * width) / 2);
if (game.blockArray[(_local6 + _local8)][(_local7 + _local13)].hit.hitTestPoint((x + _local16), (y + _local17), false)){
if (((((game.blockArray[(_local6 + _local8)][(_local7 + _local13)].mHealth - ((_arg1 * 7) + 100)) > 0)) || ((_arg1 < smashSpd)))){
_local4[_local15] = true;
_local14 = true;
main.mGame.spawnParticles((x + _local16), (y + _local17), 2);
} else {
game.blockArray[(_local6 + _local8)][(_local7 + _local13)].smashed = true;
xSpd = (xSpd * 0.9);
ySpd = (ySpd * 0.9);
_local14 = true;
main.mGame.spawnParticles((x + _local16), (y + _local17), 2);
break;
};
};
_local15++;
};
if (_local14){
game.blockArray[(_local6 + _local8)][(_local7 + _local13)].mHealth = (game.blockArray[(_local6 + _local8)][(_local7 + _local13)].mHealth - ((_arg1 * 7) + 100));
};
};
};
_local13++;
};
};
_local8++;
};
_local9 = 0;
_local10 = 0;
_local11 = 0;
_local12 = 0;
while (_local12 < numPoints) {
if (_local4[_local12] == true){
_local11++;
_local9 = (_local9 + offsetArr[_local12][0]);
_local10 = (_local10 + offsetArr[_local12][1]);
};
_local12++;
};
if (_local11 > 0){
_local18 = (Math.atan2(_local10, _local9) * (180 / Math.PI));
_local18 = (-(_local18) - 90);
_local18 = (180 - _local18);
_local19 = ((Math.atan2(ySpd, xSpd) * (180 / Math.PI)) + 90);
if (Math.cos(((_local19 - _local18) / (180 / Math.PI))) >= 0){
_local20 = _local18;
} else {
_local20 = ((_local19 + 180) - (((_local19 - _local18) - 180) * 2));
};
xSpd = (((Math.sin((_local20 / (180 / Math.PI))) * _arg1) + (Math.random() * 0.5)) - 0.25);
ySpd = (-(Math.cos((_local20 / (180 / Math.PI)))) * _arg1);
xSpd = (xSpd * 0.95);
ySpd = (ySpd * 0.95);
x = _arg2;
y = _arg3;
return (true);
};
return (false);
}
private function bounds():Boolean{
if (x < 0){
x = 0;
xSpd = (xSpd * (-0.8 + (Math.random() * 0.1)));
} else {
if (x > main.gameWidth){
x = main.gameWidth;
xSpd = (xSpd * (-0.8 + (Math.random() * 0.1)));
};
};
if (y < 0){
y = 0;
ySpd = (ySpd * (-0.8 + (Math.random() * 0.1)));
} else {
if (((game.mLifeLine.active) && ((y > (main.gameHeight - 25))))){
game.mLifeLine.active = false;
game.mLifeLine.gotoAndPlay("hit");
y = (main.gameHeight - 25);
ySpd = (ySpd * (-0.8 + (Math.random() * 0.1)));
} else {
if ((((y > main.gameHeight)) && (!(active)))){
y = main.gameHeight;
ySpd = (ySpd * (-0.8 + (Math.random() * 0.1)));
} else {
if (y > main.gameHeight){
game.ballCount--;
return (false);
};
};
};
};
return (true);
}
public function paddleCol():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:Number;
if (this.hitTestObject(game.mPaddle)){
_local1 = game.mPaddle.x;
_local2 = game.mPaddle.y;
_local3 = (1 + Math.max(Math.abs((game.mPaddle.xSpd / (game.mPaddle.hit.width / 2))), Math.abs((game.mPaddle.ySpd / (game.mPaddle.hit.height / 2)))));
game.mPaddle.x = (game.mPaddle.x - game.mPaddle.xSpd);
game.mPaddle.y = (game.mPaddle.y - game.mPaddle.ySpd);
_local4 = (game.mPaddle.xSpd / _local3);
_local5 = (game.mPaddle.ySpd / _local3);
_local6 = 0;
while (_local6 < _local3) {
game.mPaddle.x = (game.mPaddle.x + _local4);
game.mPaddle.y = (game.mPaddle.y + _local5);
if (this.hitTestObject(game.mPaddle.hit)){
active = true;
x = (x + (_local1 - game.mPaddle.x));
y = ((_local2 - (height / 2)) - (game.mPaddle.hit.height / 2));
_local7 = (Math.min(Math.sqrt(((game.mPaddle.xSpd * game.mPaddle.xSpd) + (game.mPaddle.ySpd * game.mPaddle.ySpd))), maxSpd) / maxSpd);
ySpd = Math.min(-10, lerp(-(Math.abs((ySpd * 0.8))), game.mPaddle.ySpd, _local7));
xSpd = lerp(xSpd, game.mPaddle.xSpd, _local7);
game.mPaddle.x = _local1;
game.mPaddle.y = _local2;
return (true);
};
_local6++;
};
game.mPaddle.x = _local1;
game.mPaddle.y = _local2;
};
return (false);
}
override public function update():Boolean{
if (Math.abs(ySpd) < 10){
if (ySpd < 0){
ySpd = -10;
} else {
ySpd = 10;
};
};
if (!(iterateUpdate())){
return (false);
};
if (main.effectsEnabled){
trailSprite.graphics.lineStyle(15, 0);
trailSprite.graphics.moveTo(oldX, oldY);
trailSprite.graphics.lineTo(x, y);
};
oldX = x;
oldY = y;
return (true);
}
}
}//package entities
Section 25
//brick (entities.brick)
package entities {
import general.*;
import flash.media.*;
import flash.display.*;
public class brick extends entity {
public var brickSmash:Sound;
public var mHealth:int;// = 100
public var brickBreak:Sound;
public var brickType:int;// = 0
public var smashed;// = false
public var oldHealth:int;
public var brickHit:Sound;
public var hit:Sprite;
public var exploded:Boolean;// = true
public var alive:Boolean;// = true
public function brick(){
brickHit = new brickBounceSound();
brickBreak = new brickBreakSound();
brickSmash = new brickSmashSound();
mHealth = 100;
smashed = false;
oldHealth = mHealth;
alive = true;
exploded = true;
brickType = 0;
super();
hit.visible = false;
stop();
}
public function deadUpdate():Boolean{
return (true);
}
override public function update():Boolean{
var _local1:int;
if (((alive) && (!((mHealth == oldHealth))))){
gotoAndPlay("hit");
if (mHealth > 0){
_local1 = 5;
while (_local1 < 9) {
if (game.channelArray[_local1][0] == false){
game.channelArray[_local1][0] = true;
game.channelArray[_local1][1] = brickHit.play();
if (game.channelArray[_local1][1] != null){
game.channelArray[_local1][1].soundTransform = main.mGame.sfxTrans;
};
game.channelArray[_local1][2] = -1000;
break;
};
_local1++;
};
};
};
if (mHealth <= 0){
if (alive){
game.scoreCounter.score = (game.scoreCounter.score + 100);
game.comboCounter.count = (game.comboCounter.count + 1);
game.comboCounter.timer = 0;
if (!(smashed)){
if (brickBreak != null){
_local1 = 9;
while (_local1 < 13) {
if (game.channelArray[_local1][0] == false){
game.channelArray[_local1][0] = true;
game.channelArray[_local1][1] = brickBreak.play();
if (game.channelArray[_local1][1] != null){
game.channelArray[_local1][1].soundTransform = main.mGame.sfxTrans;
};
game.channelArray[_local1][2] = -1000;
break;
};
_local1++;
};
};
} else {
if (brickSmash != null){
_local1 = 9;
while (_local1 < 13) {
if (game.channelArray[_local1][0] == false){
game.channelArray[_local1][0] = true;
game.channelArray[_local1][1] = brickSmash.play();
if (game.channelArray[_local1][1] != null){
game.channelArray[_local1][1].soundTransform = main.mGame.sfxTrans;
};
game.channelArray[_local1][2] = -1000;
break;
};
_local1++;
};
};
};
};
alive = false;
if (!(deadUpdate())){
game.blockArray[Math.floor(((x / main.gameWidth) * game.xBlocks))][Math.floor(((y / main.gameHeight) * game.yBlocks))] = undefined;
return (false);
};
};
if (currentFrame == 1){
visible = false;
} else {
visible = true;
};
oldHealth = mHealth;
return (true);
}
}
}//package entities
Section 26
//brick1 (entities.brick1)
package entities {
import general.*;
public class brick1 extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brick1(){
deadFor = 0;
mState = "";
super();
addFrameScript(17, frame18, 34, frame35, 47, frame48, 64, frame65, 76, frame77, 86, frame87);
brickType = 1;
mHealth = 100;
oldHealth = mHealth;
game.brickCount++;
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame87(){
stop();
}
function frame18(){
stop();
}
function frame35(){
stop();
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
if (smashed){
switch (((Math.random() * 100) % 5)){
case 0:
mState = "smash1";
break;
case 1:
mState = "smash2";
break;
case 2:
mState = "smash3";
break;
case 3:
mState = "smash4";
break;
case 4:
mState = "smash5";
break;
default:
mState = "smash1";
break;
};
} else {
mState = "break";
};
gotoAndPlay(mState);
};
deadFor++;
if (deadFor > 15){
game.brickCount--;
return (false);
};
return (true);
}
function frame48(){
stop();
}
}
}//package entities
Section 27
//brick2 (entities.brick2)
package entities {
import general.*;
public class brick2 extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brick2(){
deadFor = 0;
mState = "";
super();
addFrameScript(19, frame20, 32, frame33, 49, frame50, 62, frame63, 79, frame80, 91, frame92, 101, frame102);
brickType = 2;
mHealth = 200;
oldHealth = mHealth;
game.brickCount++;
}
function frame80(){
stop();
}
function frame102(){
stop();
}
function frame20(){
gotoAndStop("idle");
}
function frame33(){
stop();
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
if (smashed){
switch (((Math.random() * 100) % 5)){
case 0:
mState = "smash1";
break;
case 1:
mState = "smash2";
break;
case 2:
mState = "smash3";
break;
case 3:
mState = "smash4";
break;
case 4:
mState = "smash5";
break;
default:
mState = "smash1";
break;
};
} else {
mState = "break";
};
gotoAndPlay(mState);
};
deadFor++;
if (deadFor > 15){
game.brickCount--;
return (false);
};
return (true);
}
function frame92(){
stop();
}
function frame50(){
stop();
}
function frame63(){
stop();
}
}
}//package entities
Section 28
//brick3 (entities.brick3)
package entities {
import general.*;
public class brick3 extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brick3(){
deadFor = 0;
mState = "";
super();
addFrameScript(19, frame20, 32, frame33, 49, frame50, 62, frame63, 79, frame80, 91, frame92, 101, frame102);
brickType = 3;
mHealth = 400;
oldHealth = mHealth;
game.brickCount++;
}
function frame80(){
stop();
}
function frame102(){
stop();
}
function frame20(){
gotoAndStop("idle");
}
function frame33(){
stop();
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
if (smashed){
switch (((Math.random() * 100) % 5)){
case 0:
mState = "smash1";
break;
case 1:
mState = "smash2";
break;
case 2:
mState = "smash3";
break;
case 3:
mState = "smash4";
break;
case 4:
mState = "smash5";
break;
default:
mState = "smash1";
break;
};
} else {
mState = "break";
};
gotoAndPlay(mState);
};
deadFor++;
if (deadFor > 15){
game.brickCount--;
return (false);
};
return (true);
}
function frame92(){
stop();
}
function frame50(){
stop();
}
function frame63(){
stop();
}
}
}//package entities
Section 29
//brick4 (entities.brick4)
package entities {
import general.*;
public class brick4 extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brick4(){
deadFor = 0;
mState = "";
super();
addFrameScript(19, frame20, 32, frame33, 49, frame50, 62, frame63, 79, frame80, 91, frame92, 101, frame102);
brickType = 4;
mHealth = 800;
oldHealth = mHealth;
game.brickCount++;
}
function frame80(){
stop();
}
function frame102(){
stop();
}
function frame20(){
gotoAndStop("idle");
}
function frame33(){
stop();
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
if (smashed){
switch (((Math.random() * 100) % 5)){
case 0:
mState = "smash1";
break;
case 1:
mState = "smash2";
break;
case 2:
mState = "smash3";
break;
case 3:
mState = "smash4";
break;
case 4:
mState = "smash5";
break;
default:
mState = "smash1";
break;
};
} else {
mState = "break";
};
gotoAndPlay(mState);
};
deadFor++;
if (deadFor > 15){
game.brickCount--;
return (false);
};
return (true);
}
function frame92(){
stop();
}
function frame50(){
stop();
}
function frame63(){
stop();
}
}
}//package entities
Section 30
//brick5 (entities.brick5)
package entities {
public class brick5 extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brick5(){
deadFor = 0;
mState = "";
super();
addFrameScript(4, frame5, 17, frame18, 34, frame35, 47, frame48, 64, frame65, 76, frame77, 86, frame87);
brickType = 5;
mHealth = 3200;
oldHealth = mHealth;
brickHit = new blackBrickBounceSound();
brickBreak = new blackBrickBreakSound();
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame87(){
stop();
}
function frame18(){
stop();
}
function frame5(){
gotoAndStop("idle");
}
function frame35(){
stop();
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
if (smashed){
switch (((Math.random() * 100) % 5)){
case 0:
mState = "smash1";
break;
case 1:
mState = "smash2";
break;
case 2:
mState = "smash3";
break;
case 3:
mState = "smash4";
break;
case 4:
mState = "smash5";
break;
default:
mState = "smash1";
break;
};
} else {
mState = "break";
};
gotoAndPlay(mState);
};
deadFor++;
if (deadFor > 15){
return (false);
};
return (true);
}
function frame48(){
stop();
}
}
}//package entities
Section 31
//brickBomb (entities.brickBomb)
package entities {
import general.*;
public class brickBomb extends brick {
private var mState:String;// = ""
private var exploDist:Number;// = 115
private var bombSound:bombPickupSound;
private var deadFor:int;// = 0
public function brickBomb(){
deadFor = 0;
mState = "";
exploDist = 115;
bombSound = new bombPickupSound();
super();
addFrameScript(3, frame4, 15, frame16);
brickType = 6;
exploded = false;
mHealth = 100;
oldHealth = mHealth;
brickBreak = null;
brickSmash = null;
}
function frame4(){
gotoAndStop("idle");
}
function frame16(){
stop();
}
override public function deadUpdate():Boolean{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:brick;
var _local7:Number;
if (deadFor == 0){
_local1 = 0;
while (_local1 < 5) {
if (game.channelArray[_local1][0] == false){
game.channelArray[_local1][0] = true;
game.channelArray[_local1][1] = bombSound.play();
if (game.channelArray[_local1][1] != null){
game.channelArray[_local1][1].soundTransform = main.mGame.sfxTrans;
};
game.channelArray[_local1][2] = -1000;
break;
};
_local1++;
};
mState = "break";
gotoAndPlay(mState);
};
deadFor++;
if (deadFor == 4){
_local2 = Math.floor(((x / main.gameWidth) * game.xBlocks));
_local3 = Math.floor(((y / main.gameHeight) * game.yBlocks));
_local4 = -4;
while (_local4 < 5) {
if (game.blockArray[(_local2 + _local4)] != undefined){
_local5 = -4;
while (_local5 < 5) {
if (game.blockArray[(_local2 + _local4)][(_local3 + _local5)] != undefined){
if (game.blockArray[(_local2 + _local4)][(_local3 + _local5)].mHealth > 0){
_local6 = game.blockArray[(_local2 + _local4)][(_local3 + _local5)];
_local7 = Math.sqrt((((x - _local6.x) * (x - _local6.x)) + (((y - _local6.y) * 2) * ((y - _local6.y) * 2))));
if (_local7 < exploDist){
_local6.exploded = true;
_local6.mHealth = 0;
};
};
};
_local5++;
};
};
_local4++;
};
main.mGame.screenShake = (main.mGame.screenShake + 3);
};
if (deadFor > 15){
return (false);
};
return (true);
}
}
}//package entities
Section 32
//brickBombLine (entities.brickBombLine)
package entities {
import general.*;
public class brickBombLine extends brick {
private var mState:String;// = ""
private var exploDist:Number;// = 5
private var bombSound:bombPickupSound;
private var deadFor:int;// = 0
public function brickBombLine(){
deadFor = 0;
mState = "";
exploDist = 5;
bombSound = new bombPickupSound();
super();
addFrameScript(3, frame4, 15, frame16);
brickType = 7;
exploded = false;
mHealth = 100;
oldHealth = mHealth;
brickBreak = null;
brickSmash = null;
}
function frame4(){
gotoAndStop("idle");
}
function frame16(){
stop();
}
override public function deadUpdate():Boolean{
var _local1:int;
var _local2:int;
var _local3:lineBomb;
var _local4:int;
var _local5:int;
var _local6:brick;
var _local7:Number;
if (deadFor == 0){
mState = "break";
gotoAndPlay(mState);
_local1 = 0;
while (_local1 < 5) {
if (game.channelArray[_local1][0] == false){
game.channelArray[_local1][0] = true;
game.channelArray[_local1][1] = bombSound.play();
if (game.channelArray[_local1][1] != null){
game.channelArray[_local1][1].soundTransform = main.mGame.sfxTrans;
};
game.channelArray[_local1][2] = -1000;
break;
};
_local1++;
};
};
deadFor++;
if (deadFor == 5){
_local2 = Math.floor(((y / main.gameHeight) * game.yBlocks));
_local3 = new lineBomb();
_local3.x = x;
_local3.y = y;
main.mGame.entMc.addChildAt(_local3, main.mGame.entMc.numChildren);
_local4 = 0;
while (_local4 < game.blockArray.length) {
if (game.blockArray[_local4] != undefined){
_local5 = -3;
while (_local5 < 4) {
if (game.blockArray[_local4][(_local2 + _local5)] != undefined){
if (game.blockArray[_local4][(_local2 + _local5)].mHealth > 0){
_local6 = game.blockArray[_local4][(_local2 + _local5)];
_local7 = Math.abs((y - _local6.y));
if (_local7 < exploDist){
_local6.exploded = true;
_local6.mHealth = 0;
};
};
};
_local5++;
};
};
_local4++;
};
main.mGame.screenShake = (main.mGame.screenShake + 3);
};
if (deadFor > 15){
return (false);
};
return (true);
}
}
}//package entities
Section 33
//brickElongate (entities.brickElongate)
package entities {
import general.*;
public class brickElongate extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brickElongate(){
deadFor = 0;
mState = "";
super();
addFrameScript(3, frame4, 17, frame18);
brickType = 8;
exploded = false;
mHealth = 100;
oldHealth = mHealth;
brickBreak = null;
brickSmash = null;
}
function frame18(){
stop();
}
function frame4(){
gotoAndStop("idle");
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
mState = "break";
gotoAndPlay(mState);
if (!(exploded)){
game.mPaddle.scaleX = 1.3;
};
};
deadFor++;
if (deadFor > 15){
return (false);
};
return (true);
}
}
}//package entities
Section 34
//brickGun (entities.brickGun)
package entities {
import general.*;
public class brickGun extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brickGun(){
deadFor = 0;
mState = "";
super();
addFrameScript(3, frame4, 17, frame18);
brickType = 9;
exploded = false;
mHealth = 100;
oldHealth = mHealth;
brickBreak = null;
brickSmash = null;
}
function frame18(){
stop();
}
function frame4(){
gotoAndStop("idle");
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
mState = "break";
gotoAndPlay(mState);
if (!(exploded)){
game.mBullets = (game.mBullets + 3);
game.mPaddle.gotoAndPlay("gunspawn");
};
};
deadFor++;
if (deadFor > 15){
return (false);
};
return (true);
}
}
}//package entities
Section 35
//brickLife (entities.brickLife)
package entities {
import general.*;
public class brickLife extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brickLife(){
deadFor = 0;
mState = "";
super();
addFrameScript(3, frame4, 23, frame24);
brickType = 10;
exploded = false;
mHealth = 100;
oldHealth = mHealth;
brickBreak = null;
brickSmash = null;
}
function frame4(){
gotoAndStop("idle");
}
function frame24(){
stop();
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
mState = "break";
gotoAndPlay(mState);
if (!(exploded)){
game.mLifeLine.active = true;
game.mLifeLine.visible = true;
game.mLifeLine.gotoAndPlay("spawn");
};
};
deadFor++;
if (deadFor > 15){
return (false);
};
return (true);
}
}
}//package entities
Section 36
//brickMulti (entities.brickMulti)
package entities {
public class brickMulti extends brick {
private var mState:String;// = ""
private var deadFor:int;// = 0
public function brickMulti(){
deadFor = 0;
mState = "";
super();
addFrameScript(3, frame4, 17, frame18);
brickType = 11;
exploded = false;
mHealth = 100;
oldHealth = mHealth;
brickBreak = new multiballPickupSound();
brickSmash = brickBreak;
}
function frame18(){
stop();
}
function frame4(){
gotoAndStop("idle");
}
override public function deadUpdate():Boolean{
if (deadFor == 0){
mState = "break";
gotoAndPlay(mState);
main.mGame.addBall(x, y, ((Math.random() * 3) + 5), ((Math.random() * 20) - 10), true);
main.mGame.addBall(x, y, ((Math.random() * -3) - 5), ((Math.random() * 20) - 10), true);
};
deadFor++;
if (deadFor > 15){
return (false);
};
return (true);
}
}
}//package entities
Section 37
//counterCombo (entities.counterCombo)
package entities {
import general.*;
import flash.text.*;
public class counterCombo extends entity {
public var count:int;// = 0
public var timer:int;// = 0
public var counterText:String;// = ""
public var txt:TextField;
public var maxCombo:int;// = 0
public function counterCombo(){
counterText = "";
count = 0;
timer = 0;
maxCombo = 0;
super();
}
override public function update():Boolean{
if (main.mGame.noBallTimer > 120){
if (main.mGame.msgPlayed[0] == undefined){
main.mGame.addMessage("post mortem recovery!");
main.mGame.msgPlayed[0] = true;
};
};
if (count > game.totalBricks){
if (main.mGame.msgPlayed[2] == undefined){
main.mGame.addMessage("superb!");
main.mGame.msgPlayed[2] = true;
};
};
if (count >= 20){
if (main.mGame.msgPlayed[3] == undefined){
main.mGame.addMessage("nice!");
main.mGame.msgPlayed[3] = true;
};
};
if (count >= 50){
if (main.mGame.msgPlayed[4] == undefined){
main.mGame.addMessage("impressive!");
main.mGame.msgPlayed[4] = true;
};
};
if (count >= 100){
if (main.mGame.msgPlayed[5] == undefined){
main.mGame.addMessage("amazing!");
main.mGame.msgPlayed[5] = true;
};
};
if (count >= 130){
if (main.mGame.msgPlayed[6] == undefined){
main.mGame.addMessage("incredible!");
main.mGame.msgPlayed[6] = true;
};
};
if (count >= 150){
if (main.mGame.msgPlayed[7] == undefined){
main.mGame.addMessage("spectacular!");
main.mGame.msgPlayed[7] = true;
};
};
if (count >= 170){
if (main.mGame.msgPlayed[8] == undefined){
main.mGame.addMessage("mind blowing! =O");
main.mGame.msgPlayed[8] = true;
};
};
timer++;
if (timer > 30){
if (count > 1){
game.scoreCounter.score = (game.scoreCounter.score + ((100 * count) * 1.5));
};
game.maxCombo = Math.max(game.maxCombo, count);
maxCombo = Math.max(maxCombo, count);
count = 0;
};
counterText = (count + " hit combo");
txt.text = counterText;
return (true);
}
}
}//package entities
Section 38
//counterScore (entities.counterScore)
package entities {
import flash.text.*;
public class counterScore extends entity {
public var counterText:String;// = "score"
public var txt:TextField;
public var score;// = 0
public function counterScore(){
counterText = "score";
score = 0;
super();
}
override public function update():Boolean{
counterText = ("score: " + score);
txt.text = counterText;
return (true);
}
}
}//package entities
Section 39
//entity (entities.entity)
package entities {
import flash.display.*;
public class entity extends MovieClip {
public var playing:Boolean;// = true
public function entity(){
playing = true;
super();
}
override public function stop():void{
super.stop();
playing = false;
}
override public function play():void{
super.play();
playing = true;
}
public function preUpdate():Boolean{
return (true);
}
public function takeMessage(_arg1:entity, _arg2:String, _arg3:Array){
}
override public function gotoAndStop(_arg1:Object, _arg2:String=null):void{
super.gotoAndStop(_arg1);
playing = false;
}
override public function gotoAndPlay(_arg1:Object, _arg2:String=null):void{
super.gotoAndPlay(_arg1);
playing = true;
}
public function update():Boolean{
return (true);
}
}
}//package entities
Section 40
//fireWorks (entities.fireWorks)
package entities {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
public class fireWorks extends entity {
public var bgBmp:BitmapData;
public var bmp:BitmapData;
public var bOffset:Boolean;// = true
public function fireWorks(){
bOffset = true;
bmp = new BitmapData(351, 301, true, 0);
bgBmp = new BitmapData(700, 600, false, 0);
super();
bgBmp.draw(new fwBg());
addChild(new fireWorksBall());
addChild(new fireWorksBall());
addChild(new fireWorksBall());
}
override public function update():Boolean{
var _local1:Sprite;
var _local2:int;
var _local3:*;
var _local4:Number;
if (Math.random() > 0.95){
addChild(new fireWorksBall());
};
_local1 = new Sprite();
_local2 = (numChildren - 1);
while (_local2 >= 0) {
_local3 = getChildAt(_local2);
if ((_local3 is entity)){
if (!(_local3.update())){
removeChildAt(_local2);
bmp.draw(_local3, new Matrix(0.5, 0, 0, 0.5, (_local3.x / 2), (_local3.y / 2)));
if ((_local3 is fireWorksBall)){
_local4 = ((Math.random() * 10) + 10);
_local2 = 0;
while (_local2 < 30) {
addChild(new fireWorksSpark(_local3.x, _local3.y, _local4, _local3.colour));
_local2++;
};
};
} else {
if ((_local3 is fireWorksBall)){
_local1.graphics.lineStyle(6, _local3.colour);
_local1.graphics.moveTo((_local3.x - _local3.xSpd), (_local3.y - _local3.ySpd));
_local1.graphics.lineTo(_local3.x, _local3.y);
} else {
_local1.graphics.lineStyle(3, _local3.colour);
_local1.graphics.moveTo((_local3.x - _local3.xSpd), (_local3.y - _local3.ySpd));
_local1.graphics.lineTo(_local3.x, _local3.y);
};
};
};
_local2--;
};
bOffset = !(bOffset);
if (bOffset){
bmp.scroll(1, 1);
};
bmp.draw(_local1, new Matrix(0.5, 0, 0, 0.5, 0, 0));
_local1.graphics.clear();
bmp.applyFilter(bmp, bmp.rect, new Point(), new BlurFilter(2, 2, 1));
bmp.applyFilter(bmp, bmp.rect, new Point(), new ColorMatrixFilter([0.9, 0, 0, 0, 10, 0, 0.9, 0, 0, 10, 0, 0, 0.9, 0, 10, 0, 0, 0, 1.01, -2]));
return (true);
}
}
}//package entities
Section 41
//fireWorksBall (entities.fireWorksBall)
package entities {
public class fireWorksBall extends entity {
public var xSpd:Number;
private var timer:int;
public var ySpd:Number;
public var colour:int;
public function fireWorksBall(){
colour = (Math.random() * ((0x0100 * 0x0100) * 0x0100));
super();
xSpd = ((Math.random() * 10) - 5);
ySpd = ((Math.random() * -12) - 10);
timer = ((Math.random() * 40) + 20);
x = ((Math.random() * 400) + 100);
y = 600;
}
override public function update():Boolean{
timer--;
if (timer < 1){
return (false);
};
ySpd = (ySpd + 0.3);
x = (x + xSpd);
y = (y + ySpd);
return (true);
}
}
}//package entities
Section 42
//fireWorksSpark (entities.fireWorksSpark)
package entities {
public class fireWorksSpark extends entity {
public var xSpd:Number;
private var timer:int;
public var ySpd:Number;
public var colour:int;
public function fireWorksSpark(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int){
var _local5:Number;
var _local6:Number;
super();
_local5 = (Math.random() * (Math.PI * 2));
_local6 = (Math.random() * 3);
xSpd = (Math.sin(_local5) * (_arg3 + _local6));
ySpd = (Math.cos(_local5) * (_arg3 + _local6));
timer = 0;
x = _arg1;
y = _arg2;
colour = _arg4;
}
override public function update():Boolean{
if (Math.random() < 0.5){
gotoAndStop(1);
} else {
gotoAndStop(2);
};
timer++;
if ((((Math.abs(xSpd) < 0.3)) && ((Math.abs(ySpd) < 0.3)))){
return (false);
};
ySpd = (ySpd * 0.9);
xSpd = (xSpd * 0.9);
x = (x + (xSpd + 1));
y = (y + (ySpd + 1));
return (true);
}
}
}//package entities
Section 43
//gunHit (entities.gunHit)
package entities {
public class gunHit extends entity {
public function gunHit(){
if (Math.random() < 0.5){
if (Math.random() < 0.5){
gotoAndPlay(1);
} else {
gotoAndPlay(10);
};
} else {
gotoAndPlay(20);
};
}
override public function update():Boolean{
if ((((((currentFrame == 5)) || ((currentFrame == 15)))) || ((currentFrame == 25)))){
return (false);
};
return (true);
}
}
}//package entities
Section 44
//gunLine (entities.gunLine)
package entities {
public class gunLine extends entity {
override public function update():Boolean{
if (currentFrame > 4){
return (false);
};
return (true);
}
}
}//package entities
Section 45
//hitParticle (entities.hitParticle)
package entities {
public class hitParticle extends entity {
private var xSpd:Number;
private var ySpd:Number;
public function hitParticle(){
scaleX = ((Math.random() * 0.5) + 0.7);
scaleY = scaleX;
gotoAndPlay((int((Math.random() * 4)) + 1));
xSpd = ((Math.random() * 10) - 5);
ySpd = ((Math.random() * 10) - 5);
}
override public function update():Boolean{
x = (x + xSpd);
y = (y + ySpd);
if (currentFrame > 8){
return (false);
};
return (true);
}
}
}//package entities
Section 46
//lifeLine (entities.lifeLine)
package entities {
public class lifeLine extends entity {
public var active:Boolean;// = false
public function lifeLine(){
active = false;
super();
addFrameScript(6, frame7, 20, frame21);
}
function frame7(){
stop();
}
function frame21(){
stop();
}
override public function update():Boolean{
if (currentFrame > 20){
visible = false;
};
return (true);
}
}
}//package entities
Section 47
//lineBomb (entities.lineBomb)
package entities {
public class lineBomb extends entity {
override public function update():Boolean{
if (currentFrame > 5){
return (false);
};
return (true);
}
}
}//package entities
Section 48
//mousePointer (entities.mousePointer)
package entities {
public class mousePointer extends entity {
override public function update():Boolean{
x = (parent.mouseX - 50);
y = parent.mouseY;
return (true);
}
}
}//package entities
Section 49
//paddle (entities.paddle)
package entities {
import flash.geom.*;
import flash.ui.*;
import flash.display.*;
public class paddle extends entity {
private const yLimit:Number = 445;
public var aabbMax:Point;
private var oldY:Number;
private var oldMY:Number;
public var xSpd:Number;// = 0
private var oldX:Number;
private var oldMX:Number;
public var ySpd:Number;// = 0
public var bXSpd:Number;// = 0
public var hit:Sprite;
public var aabbMin:Point;
public var bYSpd:Number;// = 0
public function paddle(_arg1:Number, _arg2:Number){
aabbMin = new Point();
aabbMax = new Point();
oldX = x;
oldY = y;
oldMX = x;
oldMY = y;
xSpd = 0;
ySpd = 0;
bXSpd = 0;
bYSpd = 0;
super();
addFrameScript(14, frame15, 25, frame26, 32, frame33, 41, frame42);
stop();
x = _arg1;
y = _arg2;
oldX = x;
oldY = y;
oldMX = x;
oldMY = y;
}
function frame15(){
stop();
}
function frame26(){
gotoAndStop("gun");
}
function frame33(){
gotoAndStop("idle");
}
function frame42(){
gotoAndStop("gun");
}
override public function update():Boolean{
if (((!((xSpd == 0))) && (!((ySpd == 0))))){
Mouse.hide();
};
if ((((parent.mouseX < 50)) || ((parent.mouseX > 750)))){
Mouse.show();
};
x = (parent.mouseX - 50);
y = parent.mouseY;
if (y < yLimit){
y = yLimit;
};
if (y > main.gameHeight){
y = main.gameHeight;
};
if (x < 0){
x = 0;
};
if (x > main.gameWidth){
x = main.gameWidth;
};
aabbMin.x = (Math.min(x, oldX) - (width / 2));
aabbMin.y = (Math.min(y, oldY) - (height / 2));
aabbMax.x = (Math.max(x, oldX) + (width / 2));
aabbMax.y = (Math.max(y, oldY) + (height / 2));
graphics.lineStyle(5);
graphics.drawRect((aabbMin.x - x), (aabbMin.y - y), (aabbMax.x - aabbMin.x), (aabbMax.y - aabbMin.y));
xSpd = ((parent.mouseX - 50) - oldMX);
ySpd = (parent.mouseY - oldMY);
bXSpd = (x - oldX);
bYSpd = (y - oldY);
oldX = x;
oldY = y;
oldMX = (parent.mouseX - 50);
oldMY = parent.mouseY;
return (true);
}
}
}//package entities
Section 50
//popUpMessage (entities.popUpMessage)
package entities {
import flash.text.*;
public class popUpMessage extends entity {
private var timer:int;// = 0
public var txt:TextField;
public function popUpMessage(_arg1:String){
timer = 0;
super();
txt.text = _arg1;
}
public function resetMsg(_arg1:String){
y = main.gameHeight;
timer = 0;
txt.text = _arg1;
}
override public function update():Boolean{
timer++;
if (timer > 28){
return (false);
};
if ((((((((timer == 18)) || ((timer == 21)))) || ((timer == 26)))) || ((timer > 27)))){
alpha = 0;
} else {
alpha = 1;
};
if (timer < 5){
y = (y - (50 / timer));
alpha = (20 + (timer * 15));
};
if (timer == 27){
alpha = 0.4;
};
return (true);
}
}
}//package entities
Section 51
//endLevel (general.endLevel)
package general {
import flash.geom.*;
import flash.text.*;
import buttons.*;
import flash.display.*;
public class endLevel extends Sprite {
public var txtScore:TextField;
public var txtCombo:TextField;
public var txtReq:TextField;
public var txtLvlScore:TextField;
public var btnContinue:buttonContinue;
public var btnRetry:buttonRetry;
public var unload:Boolean;// = false
public function endLevel(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
unload = false;
super();
txtCombo.text = ("best combo: " + _arg1);
txtLvlScore.text = ("level score: " + _arg3);
txtScore.text = ("total score: " + _arg4);
txtReq.text = ("required bricks: " + _arg2);
}
public function update(){
btnRetry.update();
btnContinue.update();
main.bmp.copyPixels(game.bgBmp, game.bgBmp.rect, new Point());
main.bmp.draw(this);
if (unload){
main.mState = "game";
main.mEndLevel = null;
main.startTransition();
};
}
}
}//package general
Section 52
//failLevel (general.failLevel)
package general {
import flash.geom.*;
import flash.text.*;
import buttons.*;
import flash.display.*;
public class failLevel extends Sprite {
public var txtLives:TextField;
public var btnRetry:buttonRetry;
public var unload:Boolean;// = false
public function failLevel(_arg1:int){
unload = false;
super();
txtLives.text = ("lives left: " + _arg1);
}
public function update(){
btnRetry.update();
main.bmp.copyPixels(game.bgBmp, game.bgBmp.rect, new Point());
main.bmp.draw(this);
if (unload){
main.mState = "game";
main.mEndLevel = null;
main.startTransition();
};
}
}
}//package general
Section 53
//finishGameMarathon (general.finishGameMarathon)
package general {
import entities.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import buttons.*;
import flash.text.*;
import flash.display.*;
public class finishGameMarathon extends MovieClip {
private var mFireWorks:fireWorks;
public var comboTxt:TextField;
private var submitted:Boolean;// = false
public var enterName:TextField;
public var btnSubmit:buttonSubmit;
public var scoreTxt:TextField;
public var btnQuit:buttonQuit;
public var unload:Boolean;// = false
public function finishGameMarathon(){
unload = false;
mFireWorks = new fireWorks();
submitted = false;
super();
addFrameScript(25, frame26);
scoreTxt.text = "";
comboTxt.text = "";
main.stageMc.addChild(enterName);
enterName.x = (enterName.x + 50);
}
function frame26(){
stop();
}
public function update(){
var _local1:URLVariables;
var _local2:URLRequest;
if (currentFrame == 22){
scoreTxt.text = String(game.scoreCounter.score);
comboTxt.text = String(game.comboCounter.maxCombo);
};
if (currentFrame < 26){
btnQuit.visible = false;
btnSubmit.visible = false;
enterName.visible = false;
} else {
btnQuit.visible = true;
btnSubmit.visible = true;
enterName.visible = true;
};
main.bmp.copyPixels(mFireWorks.bgBmp, mFireWorks.bgBmp.rect, new Point());
mFireWorks.update();
if (mFireWorks.bOffset){
main.bmp.draw(mFireWorks.bmp, new Matrix(2, 0, 0, 2, -1, -1));
} else {
main.bmp.draw(mFireWorks.bmp, new Matrix(2, 0, 0, 2, 0, 0));
};
main.bmp.draw(mFireWorks);
btnQuit.update();
if (!(submitted)){
if (!(btnSubmit.update())){
enterName.alpha = 0.5;
btnSubmit.alpha = 0.5;
submitted = true;
_local1 = new URLVariables();
_local1.z = enterName.text;
_local1.x = ab20.encodeNum(game.scoreCounter.score);
_local1.c = 987;
_local1.v = "JPPBLL";
_local2 = new URLRequest("http://armorbot.com/s_b");
_local2.method = "POST";
_local2.data = _local1;
sendToURL(_local2);
};
};
main.bmp.draw(this);
if (main.mState == "menu"){
main.stageMc.removeChild(enterName);
};
}
}
}//package general
Section 54
//finishGameNormal (general.finishGameNormal)
package general {
import entities.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
import buttons.*;
import flash.text.*;
import flash.display.*;
public class finishGameNormal extends MovieClip {
private var mFireWorks:fireWorks;
public var comboTxt:TextField;
private var submitted:Boolean;// = false
public var enterName:TextField;
public var btnSubmit:buttonSubmit;
public var scoreTxt:TextField;
public var btnQuit:buttonQuit;
public var unload:Boolean;// = false
public function finishGameNormal(){
unload = false;
mFireWorks = new fireWorks();
submitted = false;
super();
addFrameScript(25, frame26);
scoreTxt.text = "";
comboTxt.text = "";
main.stageMc.addChild(enterName);
enterName.x = (enterName.x + 50);
}
function frame26(){
stop();
}
public function update(){
var _local1:URLVariables;
var _local2:URLRequest;
if (currentFrame == 22){
scoreTxt.text = String(game.scoreCounter.score);
comboTxt.text = String(game.comboCounter.maxCombo);
};
if (currentFrame < 26){
btnQuit.visible = false;
btnSubmit.visible = false;
enterName.visible = false;
} else {
btnQuit.visible = true;
btnSubmit.visible = true;
enterName.visible = true;
};
main.bmp.copyPixels(mFireWorks.bgBmp, mFireWorks.bgBmp.rect, new Point());
mFireWorks.update();
if (mFireWorks.bOffset){
main.bmp.draw(mFireWorks.bmp, new Matrix(2, 0, 0, 2, -1, -1));
} else {
main.bmp.draw(mFireWorks.bmp, new Matrix(2, 0, 0, 2, 0, 0));
};
main.bmp.draw(mFireWorks);
btnQuit.update();
if (!(submitted)){
if (!(btnSubmit.update())){
enterName.alpha = 0.5;
btnSubmit.alpha = 0.5;
submitted = true;
_local1 = new URLVariables();
_local1.z = enterName.text;
_local1.x = ab20.encodeNum(game.scoreCounter.score);
_local1.c = 985;
_local1.v = "BNQUHP";
_local2 = new URLRequest("http://armorbot.com/s_b");
_local2.method = "POST";
_local2.data = _local1;
sendToURL(_local2);
};
};
main.bmp.draw(this);
if (main.mState == "menu"){
main.stageMc.removeChild(enterName);
};
}
}
}//package general
Section 55
//finishGameOver (general.finishGameOver)
package general {
import flash.text.*;
import buttons.*;
import flash.display.*;
public class finishGameOver extends MovieClip {
public var comboTxt:TextField;
public var scoreTxt:TextField;
public var btnQuit:buttonQuit;
public var unload:Boolean;// = false
public function finishGameOver(){
unload = false;
super();
addFrameScript(25, frame26);
scoreTxt.text = "";
comboTxt.text = "";
}
function frame26(){
stop();
}
public function update(){
if (currentFrame == 22){
scoreTxt.text = String(game.scoreCounter.score);
comboTxt.text = String(game.comboCounter.maxCombo);
};
if (currentFrame < 26){
btnQuit.visible = false;
} else {
btnQuit.visible = true;
};
btnQuit.update();
main.bmp.draw(this);
if (unload){
main.mState = "menu";
main.mGame = null;
main.startTransition();
};
}
}
}//package general
Section 56
//frameLimiter (general.frameLimiter)
package general {
import flash.utils.*;
public class frameLimiter {
static var newT:uint = oldT;
static var oldT:uint = getTimer();
public static function limitFrame(_arg1:uint){
var _local2:uint;
_local2 = (1000 / _arg1);
while (Math.abs((newT - oldT)) < _local2) {
newT = getTimer();
};
oldT = getTimer();
}
}
}//package general
Section 57
//game (general.game)
package general {
import flash.display.*;
import entities.*;
import flash.media.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.ui.*;
public class game {
public var bP3Bmp:BitmapData;
public var musicTrans:SoundTransform;
public var b4Bmp:BitmapData;
public var bP6Bmp:BitmapData;
private var spToPause:spaceToPause;
public var bP2Bmp:BitmapData;
public var mode:String;
public var music:smashLoopSound;
public var sfxTrans:SoundTransform;
public var b3Bmp:BitmapData;
public var msgPlayed:Array;
private var msgTimer:int;// = 0
public var musicChannel:SoundChannel;
public var noBallTimer:int;// = 0
public var bP5Bmp:BitmapData;
public var b2Bmp:BitmapData;
public var bP1Bmp:BitmapData;
public var bP4Bmp:BitmapData;
public var entMc:Sprite;
public var mLoader:levelLoader;
private var popMsg:popUpMessage;
public var currLevel:int;// = 1
public var b1Bmp:BitmapData;
public var b5Bmp:BitmapData;
public var screenShake:Number;// = 0
public static const xBlocks:int = 20;
public static const yBlocks:int = 40;
public static var bgBmp:BitmapData = new BitmapData(700, 600, false, 0);
public static var mBullets:int = 0;
public static var scoreCounter:counterScore;
public static var blockArray:Array;
public static var brickCount:int = 0;
public static var ballCount:int;
public static var maxCombo:int;
public static var channelArray:Array = new Array(13);
public static var comboCounter:counterCombo;
public static var numLives:int;
public static var mLifeLine:lifeLine;
public static var trailBmp:BitmapData;
public static var mouseDown:Boolean = false;
public static var lastScore:int;
public static var totalBricks:int;
public static var mPaddle:paddle;
public function game(){
var _local1:int;
var _local2:ball;
var _local3:int;
spToPause = new spaceToPause();
msgTimer = 0;
popMsg = new popUpMessage("");
msgPlayed = new Array();
entMc = new Sprite();
mLoader = new levelLoader(entMc);
currLevel = 1;
noBallTimer = 0;
music = new smashLoopSound();
musicTrans = new SoundTransform(main.musicVol, 0);
sfxTrans = new SoundTransform(main.sfxVol, 0);
screenShake = 0;
super();
_local1 = 0;
while (_local1 < 14) {
channelArray[_local1] = new Array(3);
channelArray[_local1][0] = false;
_local1++;
};
musicChannel = music.play(0, int.MAX_VALUE);
musicChannel.soundTransform = musicTrans;
cacheBricks();
numLives = 9;
ballCount = 0;
brickCount = 0;
scoreCounter = new counterScore();
comboCounter = new counterCombo();
trailBmp = new BitmapData(350, 300, true, 0);
mPaddle = new paddle(350, 500);
entMc.addChild(mPaddle);
mBullets = 0;
mLifeLine = new lifeLine();
mLifeLine.x = 350;
mLifeLine.y = 580;
mLifeLine.visible = false;
entMc.addChild(mLifeLine);
entMc.addChild(new mousePointer());
_local2 = new ball(350, 0);
entMc.addChildAt(_local2, 0);
blockArray = new Array(xBlocks);
_local3 = 0;
while (_local3 < blockArray.length) {
blockArray[_local3] = new Array(yBlocks);
_local3++;
};
mLoader.loadLevel(currLevel);
addMessage(("level " + currLevel));
maxCombo = 0;
totalBricks = brickCount;
lastScore = 0;
}
private function shake(){
screenShake = Math.min(10, screenShake);
main.mainBmp.x = (((Math.random() * screenShake) - (screenShake / 2)) + 50);
main.mainBmp.y = ((Math.random() * screenShake) - (screenShake / 2));
screenShake = (screenShake - (screenShake / 10));
screenShake = Math.max(0, screenShake);
}
public function finished(){
if ((((ballCount < 1)) && ((comboCounter.count == 0)))){
mBullets = 0;
};
if ((((ballCount < 1)) && ((scoreCounter.score == lastScore)))){
if (msgPlayed[1] == undefined){
addMessage("humiliating");
msgPlayed[1] = true;
};
};
if (brickCount < 1){
comboCounter.timer = 30;
comboCounter.update();
};
if (ballCount < 1){
noBallTimer++;
} else {
noBallTimer = 0;
};
if (mode == "normal"){
if ((((((brickCount < 1)) && ((comboCounter.count == 0)))) && ((msgTimer < 1)))){
Mouse.show();
main.mEndLevel = new endLevel(maxCombo, totalBricks, (scoreCounter.score - lastScore), scoreCounter.score);
main.mState = "endLevel";
main.startTransition();
main.mainBmp.x = 50;
main.mainBmp.y = 0;
} else {
if ((((((ballCount < 1)) && ((comboCounter.count == 0)))) && ((msgTimer < 1)))){
Mouse.show();
main.mFailLevel = new failLevel(--numLives);
main.mState = "failLevel";
main.startTransition();
main.mainBmp.x = 50;
main.mainBmp.y = 0;
};
};
} else {
if (mode == "marathon"){
if ((((((((brickCount < 1)) || ((ballCount < 1)))) && ((comboCounter.count == 0)))) && ((msgTimer < 1)))){
loadLevel(++currLevel);
main.startTransition();
main.mainBmp.x = 50;
main.mainBmp.y = 0;
screenShake = 0;
};
};
};
if ((((((((numLives < 1)) && ((ballCount < 1)))) && ((comboCounter.count == 0)))) && ((msgTimer < 1)))){
if (mode == "normal"){
main.mState = "finishGameOver";
main.mFinishGameNormal = null;
};
};
}
public function spawnParticles(_arg1:Number, _arg2:Number, _arg3:int){
var _local4:int;
var _local5:hitParticle;
if (main.effectsEnabled){
_local4 = 0;
while (_local4 < _arg3) {
_local5 = new hitParticle();
_local5.x = _arg1;
_local5.y = _arg2;
entMc.addChild(_local5);
_local4++;
};
};
}
private function render(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:BitmapData;
var _local6:Number;
main.bmp.copyPixels(bgBmp, bgBmp.rect, new Point());
if (main.effectsEnabled){
_local1 = Math.atan2(mPaddle.bYSpd, mPaddle.bXSpd);
_local2 = (mPaddle.bXSpd / 160);
if (_local2 < -0.5){
_local2 = -0.5;
};
if (_local2 > 0.5){
_local2 = 0.5;
};
mPaddle.rotation = (_local1 * 57.3);
_local3 = Math.min((100 + Math.abs(mPaddle.bXSpd)), 500);
_local4 = Math.min((100 + Math.abs(mPaddle.bYSpd)), 200);
_local5 = new BitmapData(_local3, _local4, true, 0);
_local5.draw(mPaddle, new Matrix((Math.cos((-(_local1) + _local2)) * mPaddle.scaleX), (Math.sin((-(_local1) + _local2)) * mPaddle.scaleX), -(Math.sin((-(_local1) + _local2))), Math.cos((-(_local1) + _local2)), (_local3 / 2), (_local4 / 2)));
_local6 = Math.sqrt(((mPaddle.bXSpd * mPaddle.bXSpd) + (mPaddle.bYSpd * mPaddle.bYSpd)));
_local5.applyFilter(_local5, _local5.rect, new Point(), new BlurFilter(_local6, 0, 1));
main.bmp.draw(_local5, new Matrix(Math.cos(_local1), Math.sin(_local1), -(Math.sin(_local1)), Math.cos(_local1), (((mPaddle.x - (mPaddle.bXSpd / 2)) - ((Math.cos(-(_local1)) * _local3) / 2)) - ((Math.sin(-(_local1)) * _local4) / 2)), (((mPaddle.y - (mPaddle.bYSpd / 2)) + ((Math.sin(-(_local1)) * _local3) / 2)) - ((Math.cos(-(_local1)) * _local4) / 2))), null, null, null, true);
mPaddle.rotation = (_local2 * 57.3);
mPaddle.visible = false;
} else {
mPaddle.visible = true;
};
drawBricks();
main.bmp.draw(entMc);
mPaddle.visible = true;
if (main.effectsEnabled){
trailBmp.draw(ball.trailSprite, new Matrix(0.5, 0, 0, 0.5, 0, 0));
trailBmp.applyFilter(trailBmp, trailBmp.rect, new Point(), new BlurFilter(2, 2, 1));
trailBmp.applyFilter(trailBmp, trailBmp.rect, new Point(), new ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, -20]));
main.bmp.draw(trailBmp, new Matrix(2, 0, 0, 2, 0, 0));
};
main.bmp.draw(scoreCounter, new Matrix(1, 0, 0, 1, 20, 560));
if (comboCounter.count > 1){
main.bmp.draw(comboCounter, new Matrix(((1 + (comboCounter.count / 100)) - ((comboCounter.timer / 30) * (comboCounter.count / 100))), 0, 0, ((1 + (comboCounter.count / 100)) - ((comboCounter.timer / 30) * (comboCounter.count / 100))), 20, 20));
};
popMsg.update();
main.bmp.draw(popMsg, popMsg.transform.matrix, popMsg.transform.colorTransform);
main.bmp.draw(spToPause, new Matrix(1, 0, 0, 1, 700, 0));
}
public function shoot(){
var _local1:gunLine;
var _local2:gunFlash;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:brick;
var _local7:gunHit;
if (((((input.mouseDown) && (((input.mouseHold % 10) == 0)))) && ((mBullets > 0)))){
mPaddle.gotoAndPlay("shoot");
_local1 = new gunLine();
_local1.x = mPaddle.x;
_local1.y = mPaddle.y;
entMc.addChildAt(_local1, entMc.numChildren);
_local2 = new gunFlash();
_local2.gotoAndStop((int((Math.random() * 5)) + 1));
main.bmp.draw(_local2, new Matrix(1, 0, 0, 1, mPaddle.x, mPaddle.y));
_local3 = Math.floor(((_local1.x / main.gameWidth) * game.xBlocks));
_local4 = -3;
_local5 = (game.yBlocks - 1);
while (_local5 >= 0) {
_local4 = -3;
while (_local4 < 4) {
if (game.blockArray[(_local3 + _local4)] != undefined){
if (game.blockArray[(_local3 + _local4)][_local5] != undefined){
if (game.blockArray[(_local3 + _local4)][_local5].mHealth > 0){
_local6 = game.blockArray[(_local3 + _local4)][_local5];
_local1.scaleX = 0.1;
if (_local1.hitTestObject(_local6.hit)){
_local1.scaleY = (-(((_local6.y + 10) - _local1.y)) / _local1.height);
main.bmp.draw(_local1, new Matrix(1, 0, 0, _local1.scaleY, mPaddle.x, mPaddle.y));
_local7 = new gunHit();
_local7.x = mPaddle.x;
_local7.y = (_local6.y + 10);
entMc.addChildAt(_local7, entMc.numChildren);
main.bmp.draw(_local7, new Matrix(1, 0, 0, 1, mPaddle.x, (_local6.y + 10)));
_local6.gotoAndPlay("hit");
_local6.mHealth = (_local6.mHealth - 100);
_local1.scaleX = 1;
return;
};
};
};
};
_local4++;
};
_local5--;
};
_local1.scaleX = 1;
main.bmp.draw(_local1, new Matrix(1, 0, 0, 1, mPaddle.x, mPaddle.y));
};
}
public function addMessage(_arg1:String){
popMsg.resetMsg(_arg1);
msgTimer = 30;
}
private function drawBricks(){
var _local1:int;
var _local2:int;
var _local3:brick;
var _local4:BitmapData;
_local1 = 0;
while (_local1 < xBlocks) {
_local2 = 0;
while (_local2 < yBlocks) {
_local3 = blockArray[_local1][_local2];
if (_local3 != undefined){
if (_local3.currentFrame == 1){
switch (_local3.brickType){
case 1:
_local4 = b1Bmp;
break;
case 2:
_local4 = b2Bmp;
break;
case 3:
_local4 = b3Bmp;
break;
case 4:
_local4 = b4Bmp;
break;
case 5:
_local4 = b5Bmp;
break;
case 6:
_local4 = bP1Bmp;
break;
case 7:
_local4 = bP2Bmp;
break;
case 8:
_local4 = bP3Bmp;
break;
case 9:
_local4 = bP4Bmp;
break;
case 10:
_local4 = bP5Bmp;
break;
case 11:
_local4 = bP6Bmp;
break;
default:
_local4 = new BitmapData(1, 1, false, 0);
break;
};
main.bmp.copyPixels(_local4, main.bmp.rect, new Point((_local3.x - (_local4.width / 2)), (_local3.y - (_local4.height / 2))));
};
};
_local2++;
};
_local1++;
};
}
public function loadLevel(_arg1:int){
var _local2:ball;
var _local3:int;
msgPlayed = new Array();
noBallTimer = 0;
screenShake = 0;
main.startTransition();
while (entMc.numChildren > 0) {
entMc.removeChildAt(0);
};
trailBmp = new BitmapData(350, 300, true, 0);
mLifeLine = new lifeLine();
mLifeLine.x = 350;
mLifeLine.y = 580;
mLifeLine.visible = false;
entMc.addChild(mLifeLine);
mPaddle = new paddle(350, 500);
entMc.addChild(mPaddle);
mBullets = 0;
entMc.addChild(new mousePointer());
ballCount = 0;
_local2 = new ball(350, 0);
entMc.addChildAt(_local2, 0);
blockArray = new Array(xBlocks);
_local3 = 0;
while (_local3 < blockArray.length) {
blockArray[_local3] = new Array(yBlocks);
_local3++;
};
if (!(mLoader.loadLevel(_arg1))){
if (mode == "normal"){
main.mState = "finishGameNormal";
main.mFinishGameNormal = null;
};
if (mode == "marathon"){
main.mState = "finishGameMarathon";
main.mFinishGameMarathon = null;
};
Mouse.show();
};
addMessage(("level " + _arg1));
maxCombo = 0;
totalBricks = brickCount;
lastScore = scoreCounter.score;
}
public function addBall(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Boolean){
var _local6:ball;
_local6 = new ball(_arg1, _arg2);
_local6.xSpd = _arg3;
_local6.ySpd = _arg4;
_local6.active = _arg5;
entMc.addChildAt(_local6, 0);
}
public function update(){
if (input.isKeyPressed(32)){
main.mState = "pauseMenu";
main.startTransition();
};
msgTimer--;
levelToggle();
updateSounds();
ball.trailSprite.graphics.clear();
updateEnts();
mPaddle.graphics.clear();
render();
shake();
shoot();
finished();
}
private function drawPaddle(){
}
private function updateEnts(){
var _local1:int;
var _local2:*;
_local1 = (entMc.numChildren - 1);
while (_local1 >= 0) {
_local2 = entMc.getChildAt(_local1);
if ((_local2 is entity)){
if (!(_local2.update())){
entMc.removeChildAt(_local1);
};
};
_local1--;
};
scoreCounter.update();
comboCounter.update();
}
private function updateSounds(){
var _local1:int;
_local1 = 0;
while (_local1 < 14) {
if ((((channelArray[_local1][0] == true)) && (!((channelArray[_local1][1] == null))))){
if (channelArray[_local1][1].position == channelArray[_local1][2]){
channelArray[_local1][0] = false;
};
channelArray[_local1][2] = channelArray[_local1][1].position;
} else {
channelArray[_local1][0] = false;
};
_local1++;
};
}
private function cacheBricks(){
var _local1:brick;
_local1 = new brick1();
b1Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
b1Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brick2();
b2Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
b2Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brick3();
b3Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
b3Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brick4();
b4Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
b4Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brick5();
b5Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
b5Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brickBomb();
bP1Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
bP1Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brickBombLine();
bP2Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
bP2Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brickElongate();
bP3Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
bP3Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brickGun();
bP4Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
bP4Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brickLife();
bP5Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
bP5Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
_local1 = new brickMulti();
bP6Bmp = new BitmapData(_local1.width, _local1.height, true, 0);
bP6Bmp.draw(_local1, new Matrix(1, 0, 0, 1, (_local1.width / 2), (_local1.height / 2)));
}
public function levelToggle(){
if (input.isKeyDown(49)){
if (input.isKeyPressed(39)){
loadLevel(++currLevel);
};
if (input.isKeyPressed(37)){
loadLevel(--currLevel);
};
};
}
}
}//package general
Section 58
//gameType (general.gameType)
package general {
import buttons.*;
import flash.display.*;
public class gameType extends Sprite {
public var btnMarathon:buttonMarathon;
public var btnNormal:buttonNormal;
public var norText:MovieClip;
public var marText:MovieClip;
public var mode:String;// = "normal"
public var unload:Boolean;// = false
public function gameType(){
unload = false;
mode = "normal";
super();
norText.visible = false;
marText.visible = false;
}
public function update(){
btnNormal.update();
btnMarathon.update();
if (btnNormal.currentFrame > 1){
if (norText.visible == false){
norText.gotoAndPlay(1);
};
norText.visible = true;
} else {
norText.visible = false;
};
if (btnMarathon.currentFrame > 1){
if (marText.visible == false){
marText.gotoAndPlay(1);
};
marText.visible = true;
} else {
marText.visible = false;
};
main.bmp.draw(this);
if (unload){
if (mode == "marathon"){
main.mState = "game";
main.mGame = new game();
main.mGame.mode = mode;
} else {
main.mGame = null;
main.mState = "levelSelect";
main.mLevelSelect = null;
};
main.mMenu = null;
main.startTransition();
};
}
}
}//package general
Section 59
//input (general.input)
package general {
import flash.display.*;
import flash.events.*;
public class input {
public static var mouseReleased:Boolean = false;
public static var mouseHold:int = 0;
public static var ascii:Array;
public static var mouseX:Number = 0;
public static var mouseY:Number = 0;
public static var mouse:Sprite = new Sprite();
public static var mouseDown:Boolean = false;
public static var lastKey:int = 0;
private static var keyState:Array;
public static var timeSinceLastKey = 0;
public static var mousePressed:Boolean = false;
public function input(){
var _local1:int;
super();
ascii = new Array(222);
fillAscii();
keyState = new Array(222);
_local1 = 0;
while (_local1 < 222) {
keyState[_local1] = new int(0);
_local1++;
};
main.stageMc.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPress, false, 0, true);
main.stageMc.stage.addEventListener(KeyboardEvent.KEY_UP, keyRelease, false, 0, true);
main.stageMc.stage.addEventListener(MouseEvent.MOUSE_DOWN, mousePress, false, 0, true);
main.stageMc.stage.addEventListener(MouseEvent.CLICK, mouseRelease, false, 0, true);
main.stageMc.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove, false, 0, true);
mouse.graphics.lineStyle(1, 0, 100);
mouse.graphics.moveTo(0, 0);
mouse.graphics.lineTo(0, 1);
}
public function mouseRelease(_arg1:MouseEvent){
mouseDown = false;
mouseReleased = true;
mouseHold = -1;
}
public function keyPress(_arg1:KeyboardEvent){
keyState[_arg1.keyCode] = Math.max(keyState[_arg1.keyCode], 1);
lastKey = _arg1.keyCode;
}
private function fillAscii(){
ascii[65] = "A";
ascii[66] = "B";
ascii[67] = "C";
ascii[68] = "D";
ascii[69] = "E";
ascii[70] = "F";
ascii[71] = "G";
ascii[72] = "H";
ascii[73] = "I";
ascii[74] = "J";
ascii[75] = "K";
ascii[76] = "L";
ascii[77] = "M";
ascii[78] = "N";
ascii[79] = "O";
ascii[80] = "P";
ascii[81] = "Q";
ascii[82] = "R";
ascii[83] = "S";
ascii[84] = "T";
ascii[85] = "U";
ascii[86] = "V";
ascii[87] = "W";
ascii[88] = "X";
ascii[89] = "Y";
ascii[90] = "Z";
ascii[48] = "0";
ascii[49] = "1";
ascii[50] = "2";
ascii[51] = "3";
ascii[52] = "4";
ascii[53] = "5";
ascii[54] = "6";
ascii[55] = "7";
ascii[56] = "8";
ascii[57] = "9";
ascii[32] = "Spacebar";
ascii[17] = "Ctrl";
ascii[16] = "Shift";
ascii[192] = "~";
ascii[38] = "up";
ascii[40] = "down";
ascii[37] = "left";
ascii[39] = "right";
ascii[96] = "Numpad 0";
ascii[97] = "Numpad 1";
ascii[98] = "Numpad 2";
ascii[99] = "Numpad 3";
ascii[100] = "Numpad 4";
ascii[101] = "Numpad 5";
ascii[102] = "Numpad 6";
ascii[103] = "Numpad 7";
ascii[104] = "Numpad 8";
ascii[105] = "Numpad 9";
ascii[111] = "Numpad /";
ascii[106] = "Numpad *";
ascii[109] = "Numpad -";
ascii[107] = "Numpad +";
ascii[110] = "Numpad .";
ascii[45] = "Insert";
ascii[46] = "Delete";
ascii[33] = "Page Up";
ascii[34] = "Page Down";
ascii[35] = "End";
ascii[36] = "Home";
ascii[112] = "F1";
ascii[113] = "F2";
ascii[114] = "F3";
ascii[115] = "F4";
ascii[116] = "F5";
ascii[117] = "F6";
ascii[118] = "F7";
ascii[119] = "F8";
ascii[188] = ",";
ascii[190] = ".";
ascii[186] = ";";
ascii[222] = "'";
ascii[219] = "[";
ascii[221] = "]";
ascii[189] = "-";
ascii[187] = "+";
ascii[220] = "\\";
ascii[191] = "/";
ascii[9] = "TAB";
ascii[8] = "Backspace";
}
public function mouseMove(_arg1:MouseEvent){
mouseX = (_arg1.stageX - 50);
mouseY = _arg1.stageY;
mouse.x = mouseX;
mouse.y = mouseY;
}
public function keyRelease(_arg1:KeyboardEvent){
keyState[_arg1.keyCode] = -1;
}
public function mousePress(_arg1:MouseEvent){
mouseDown = true;
mousePressed = true;
mouseHold = 0;
}
public static function getKeyHold(_arg1:int):int{
return (Math.max(0, keyState[_arg1]));
}
public static function update(){
var _local1:Array;
var _local2:int;
_local1 = new Array(37, 39, 32);
_local2 = 0;
while (_local2 < _local1.length) {
if (keyState[_local1[_local2]] != 0){
var _local3 = keyState;
var _local4 = _local1[_local2];
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
};
_local2++;
};
if (mouseHold > -1){
mouseHold++;
};
mouseReleased = false;
mousePressed = false;
}
public static function isKeyPressed(_arg1:int):Boolean{
timeSinceLastKey = 0;
return ((keyState[_arg1] == 1));
}
public static function isKeyDown(_arg1:int):Boolean{
return ((keyState[_arg1] > 0));
}
public static function getKeyString(_arg1:uint):String{
return (ascii[_arg1]);
}
public static function isKeyReleased(_arg1:int):Boolean{
return ((keyState[_arg1] == -1));
}
}
}//package general
Section 60
//levelLoader (general.levelLoader)
package general {
import flash.display.*;
import flash.utils.*;
import entities.*;
public class levelLoader {
private var entMc:Sprite;
public function levelLoader(_arg1:Sprite){
entMc = _arg1;
}
public function loadLevel(_arg1:int):Boolean{
var i:int;
var classDef:Object;
var tStage:*;
var tObj:*;
var lvl = _arg1;
game.brickCount = 0;
i = 0;
while (i < game.xBlocks) {
game.blockArray[i] = new Array(game.yBlocks);
i = (i + 1);
};
classDef = null;
try {
classDef = getDefinitionByName(("level" + lvl));
} catch(e) {
return (false);
};
tStage = new (classDef);
i = 0;
while (i < tStage.numChildren) {
tObj = tStage.getChildAt(i);
if ((tObj is brick)){
i = (i - 1);
tObj.x = int(tObj.x);
tObj.y = int(tObj.y);
entMc.addChildAt(tObj, 0);
game.blockArray[Math.floor(((tObj.x / main.gameWidth) * game.xBlocks))][Math.floor(((tObj.y / main.gameHeight) * game.yBlocks))] = tObj;
};
i = (i + 1);
};
game.bgBmp.draw(tStage);
return (true);
}
}
}//package general
Section 61
//levelSelect (general.levelSelect)
package general {
import buttons.*;
import flash.display.*;
public class levelSelect extends MovieClip {
public var lvl:int;// = 1
public var btn6:button;
public var btn1:button;
public var btn10:button;
public var btn15:button;
public var btn20:button;
public var btn25:button;
public var unload:Boolean;// = false
public function levelSelect(){
unload = false;
lvl = 1;
super();
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
public function update(){
if (currentFrame < 26){
btn1.visible = false;
btn6.visible = false;
btn10.visible = false;
btn15.visible = false;
btn20.visible = false;
btn25.visible = false;
} else {
btn1.visible = true;
btn6.visible = true;
btn10.visible = true;
btn15.visible = true;
btn20.visible = true;
btn25.visible = true;
};
btn1.update();
btn6.update();
btn10.update();
btn15.update();
btn20.update();
btn25.update();
main.bmp.draw(this);
if (unload){
main.mState = "game";
main.mLevelSelect = null;
main.mGame = new game();
main.mGame.mode = "normal";
main.mGame.currLevel = lvl;
main.mGame.loadLevel(lvl);
main.startTransition();
};
}
}
}//package general
Section 62
//menu (general.menu)
package general {
import flash.net.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import buttons.*;
import flash.events.*;
import flash.display.*;
public class menu extends Sprite {
public var btnMarathonTab:buttonMarathonTab;
public var btnNormalTab:buttonNormalTab;
public var btnArmor:buttonArmor;
public var btnStart:buttonStart;
public var btnArmor2:buttonArmor;
private var loadScores2:URLLoader;
public var scoresNormal:highscoresnormal;
public var btnAndre:buttonAndre;
public var btnScores:buttonScores;
private var loadScores:URLLoader;
public var scoresMarathon:highscoresmarathon;
public var btnDustin:buttonDustin;
public var unload:Boolean;// = false
public static var currTab:String = "normal";
public static var showScores:Boolean;
public function menu(){
var _local1:URLVariables;
var _local2:URLRequest;
var _local3:URLVariables;
var _local4:URLRequest;
unload = false;
super();
showScores = false;
SoundMixer.stopAll();
loadScores = new URLLoader();
_local1 = new URLVariables();
_local1.hid = 985;
_local1.kid = "BNQUHP";
_local2 = new URLRequest("http://www.armorbot.com/flashcomm/top10_b");
_local2.method = "POST";
_local2.data = _local1;
loadScores.addEventListener("complete", loadComplete, false, 0, true);
loadScores.dataFormat = "text";
loadScores.load(_local2);
loadScores2 = new URLLoader();
_local3 = new URLVariables();
_local3.hid = 987;
_local3.kid = "JPPBLL";
_local4 = new URLRequest("http://www.armorbot.com/flashcomm/top10_b");
_local4.method = "POST";
_local4.data = _local3;
loadScores2.addEventListener("complete", loadComplete2, false, 0, true);
loadScores2.dataFormat = "text";
loadScores2.load(_local4);
}
public function loadComplete(_arg1:Event){
var _local2:String;
var _local3:int;
_local2 = loadScores.data;
_local3 = 1;
while (_local3 < 11) {
scoresNormal[("name" + _local3)].text = getVar(("name" + _local3), _local2);
scoresNormal[("score" + _local3)].text = getVar(("score" + _local3), _local2);
_local3++;
};
}
public function update(){
if (!(showScores)){
scoresMarathon.visible = false;
btnMarathonTab.visible = false;
btnNormalTab.visible = false;
} else {
scoresMarathon.visible = true;
btnMarathonTab.visible = true;
btnNormalTab.visible = true;
};
if ((((currTab == "normal")) && (showScores))){
scoresNormal.visible = true;
} else {
scoresNormal.visible = false;
};
btnStart.update();
btnAndre.update();
btnArmor.update();
btnArmor2.update();
btnDustin.update();
btnScores.update();
btnNormalTab.update();
btnMarathonTab.update();
main.bmp.draw(this);
if (unload){
main.mState = "gameType";
main.mGameType = null;
main.mMenu = null;
main.mGame = null;
main.startTransition();
};
}
public function loadComplete2(_arg1:Event){
var _local2:String;
var _local3:int;
_local2 = loadScores2.data;
_local3 = 1;
while (_local3 < 11) {
scoresMarathon[("name" + _local3)].text = getVar(("name" + _local3), _local2);
scoresMarathon[("score" + _local3)].text = getVar(("score" + _local3), _local2);
_local3++;
};
}
private function getVar(_arg1:String, _arg2:String):String{
var _local3:String;
var _local4:int;
var _local5:int;
var _local6:int;
_local3 = "";
_local4 = _arg2.search((("&" + _arg1) + "="));
if (_local4 == -1){
return ("");
};
_local4 = (_local4 + (_arg1.length + 2));
_local5 = _local4;
_local6 = _local4;
while (_local6 < _arg2.length) {
if (_arg2.charAt(_local6) == "&"){
_local5 = _local6;
break;
};
_local6++;
};
return (_arg2.slice(_local4, _local5));
}
}
}//package general
Section 63
//pauseMenu (general.pauseMenu)
package general {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
import flash.ui.*;
import buttons.*;
public class pauseMenu extends Sprite {
private var pauseTime:int;// = 0
public var btnRestart:button;
public var btnFxOff:button;
public var musicSlider:slider;
private var tBmp:BitmapData;
public var btnQuit:buttonQuit;
public var btnFxOn:button;
public var sfxSlider:slider;
public var unload:Boolean;// = false
public function pauseMenu(){
pauseTime = 0;
unload = false;
tBmp = new BitmapData(700, 600, false, 0);
super();
tBmp.copyPixels(main.bmp, main.bmp.rect, new Point());
tBmp.applyFilter(tBmp, tBmp.rect, new Point(), new BlurFilter(20, 0, 1));
musicSlider.handle.x = (main.musicVol * 200);
sfxSlider.handle.x = (main.sfxVol * 200);
}
public function update(){
pauseTime++;
if (pauseTime < 10){
tBmp.applyFilter(tBmp, tBmp.rect, new Point(), new BlurFilter(20, 0, 1));
};
if (((input.isKeyPressed(32)) && ((main.transTime < 1)))){
unload = true;
};
main.musicVol = musicSlider.update();
main.sfxVol = sfxSlider.update();
main.mGame.musicTrans.volume = main.musicVol;
main.mGame.musicChannel.soundTransform = main.mGame.musicTrans;
main.mGame.sfxTrans.volume = main.sfxVol;
Mouse.show();
btnFxOn.update();
btnFxOff.update();
btnQuit.update();
btnRestart.update();
main.bmp.copyPixels(tBmp, tBmp.rect, new Point());
main.bmp.draw(this);
if (unload){
main.mState = "game";
main.mPauseMenu = null;
main.startTransition();
main.transTime = 100;
};
}
}
}//package general
Section 64
//preLoader (general.preLoader)
package general {
import flash.geom.*;
import flash.net.*;
import flash.display.*;
public class preLoader extends MovieClip {
private var logoFinished:int;
private var mRoot:MovieClip;
public function preLoader(){
x = 351;
y = 392;
stop();
mRoot = main.stageMc;
}
public function update(){
var _local1:int;
main.bmp.draw(this, new Matrix(1, 0, 0, 1, x, y));
_local1 = Math.ceil(((mRoot.loaderInfo.bytesLoaded / mRoot.loaderInfo.bytesTotal) * 200));
if (mRoot.loaderInfo.bytesTotal == 0){
main.stageMc.gotoAndPlay(2);
main.mState = "menu";
};
if ((mRoot.loaderInfo.bytesLoaded / mRoot.loaderInfo.bytesTotal) == 1){
_local1 = 233;
};
if ((((currentFrame < _local1)) && ((((logoFinished > 80)) || (!((currentFrame == 201))))))){
gotoAndStop((currentFrame + 1));
};
if (currentFrame == 201){
logoFinished++;
if (input.mouseReleased){
navigateToURL(new URLRequest("http://www.armorgames.com"), "_blank");
};
};
if (currentFrame > 232){
main.stageMc.gotoAndPlay(2);
main.mState = "menu";
};
}
}
}//package general
Section 65
//slider (general.slider)
package general {
import flash.display.*;
public class slider extends Sprite {
public var handle:Sprite;
public function update():Number{
var _local1:Boolean;
_local1 = hitTestObject(input.mouse);
if (_local1){
if (input.mouseDown){
handle.x = (mouseX - 50);
};
};
handle.x = Math.max(0, handle.x);
handle.x = Math.min(200, handle.x);
return ((handle.x / 200));
}
}
}//package general
Section 66
//ab20 (ab20)
package {
import flash.utils.*;
import flash.net.*;
public class ab20 {
public static function encodeNum(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local2 = getTimer();
_local3 = ["aZ", "Zy", "Zx"];
_local4 = ["zH", "jY", "uH"];
_local5 = ["Ah", "Xh", "hO"];
_local6 = ["Ub", "Bu", "Cb"];
_local7 = ["Qc", "Pc", "Pe"];
_local8 = ["Ei", "Ie", "Ef"];
_local9 = ["Fk", "kG", "Kg"];
_local10 = ["Jl", "Lm", "Mn"];
_local11 = ["No", "Np", "Qp"];
_local12 = ["Rs", "St", "Sw"];
_local13 = rand(3);
_arg1 = String(_arg1);
_arg1 = fr(_arg1, "9", _local3[rand(3)], 1);
_arg1 = fr(_arg1, "9", _local3[rand(3)], 1);
_arg1 = fr(_arg1, "9", _local3[rand(3)], 1);
_arg1 = fr(_arg1, "9", _local3[rand(3)], 1);
_arg1 = fr(_arg1, "9", _local3[rand(3)], 1);
_arg1 = fr(_arg1, "9", _local3[rand(3)], 1);
_arg1 = fr(_arg1, "8", _local4[rand(3)], 1);
_arg1 = fr(_arg1, "8", _local4[rand(3)], 1);
_arg1 = fr(_arg1, "8", _local4[rand(3)], 1);
_arg1 = fr(_arg1, "8", _local4[rand(3)], 1);
_arg1 = fr(_arg1, "8", _local4[rand(3)], 1);
_arg1 = fr(_arg1, "7", _local5[rand(3)], 1);
_arg1 = fr(_arg1, "7", _local5[rand(3)], 1);
_arg1 = fr(_arg1, "7", _local5[rand(3)], 1);
_arg1 = fr(_arg1, "7", _local5[rand(3)], 1);
_arg1 = fr(_arg1, "7", _local5[rand(3)], 1);
_arg1 = fr(_arg1, "7", _local5[rand(3)], 1);
_arg1 = fr(_arg1, "7", _local5[rand(3)], 1);
_arg1 = fr(_arg1, "7", _local5[rand(3)], 1);
_arg1 = fr(_arg1, "6", _local6[rand(3)], 1);
_arg1 = fr(_arg1, "6", _local6[rand(3)], 1);
_arg1 = fr(_arg1, "6", _local6[rand(3)], 1);
_arg1 = fr(_arg1, "6", _local6[rand(3)], 1);
_arg1 = fr(_arg1, "6", _local6[rand(3)], 1);
_arg1 = fr(_arg1, "6", _local6[rand(3)], 1);
if (_local13 == 1){
_arg1 = fr(_arg1, "5", _local7[0], undefined);
} else {
_arg1 = fr(_arg1, "5", _local7[rand(3)], undefined);
};
_arg1 = fr(_arg1, "4", _local8[rand(3)], undefined);
_arg1 = fr(_arg1, "3", _local9[rand(3)], 1);
_arg1 = fr(_arg1, "3", _local9[rand(3)], 1);
_arg1 = fr(_arg1, "3", _local9[rand(3)], 1);
_arg1 = fr(_arg1, "3", _local9[rand(3)], 1);
_arg1 = fr(_arg1, "3", _local9[rand(3)], 1);
_arg1 = fr(_arg1, "3", _local9[rand(3)], 1);
_arg1 = fr(_arg1, "3", _local9[rand(3)], 1);
_arg1 = fr(_arg1, "3", _local9[rand(3)], 1);
_arg1 = fr(_arg1, "2", _local10[rand(3)], undefined);
_arg1 = fr(_arg1, "1", _local11[rand(3)], undefined);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_arg1 = fr(_arg1, "0", _local12[rand(3)], 1);
_local14 = (getTimer() - _local2);
_arg1 = ((_arg1 + "Dd") + _local14);
return (_arg1);
}
private static function rand(_arg1:int):int{
return (int((Math.random() * _arg1)));
}
public static function decodeStr8bytes(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_arg1 = (("PIE" + _arg1) + "PIE");
_arg1 = fr(_arg1, "%", "D", undefined);
_arg1 = fr(_arg1, "$", "D", undefined);
_arg1 = fr(_arg1, "#", "D", undefined);
_arg1 = fr(_arg1, "@", "D", undefined);
_arg1 = fr(_arg1, "PIED", "", undefined);
_arg1 = fr(_arg1, "DPIE", "", undefined);
_local2 = _arg1.split("D");
_local3 = "";
_local4 = 0;
_local5 = _local2.length;
while (_local4 < _local5) {
_local3 = (_local3 + String(String.fromCharCode(_local2[_local4])));
_local4++;
};
return (_local3);
}
public static function decodeNum(_arg1){
var _local2:*;
var _local3:*;
_local2 = ["aZ", "Zy", "Zx", "zH", "jY", "uH", "Ah", "Xh", "hO", "Ub", "Bu", "Cb", "Qc", "Pc", "Pe", "Ei", "Ie", "Ef", "Fk", "kG", "Kg", "Jl", "Lm", "Mn", "No", "Np", "Qp", "Rs", "St", "Sw"];
_arg1 = String(_arg1);
_arg1 = _arg1.split("Dd");
_arg1 = _arg1[0];
_arg1 = fr(_arg1, _local2[0], "9", undefined);
_arg1 = fr(_arg1, _local2[1], "9", undefined);
_arg1 = fr(_arg1, _local2[2], "9", undefined);
_arg1 = fr(_arg1, _local2[3], "8", undefined);
_arg1 = fr(_arg1, _local2[4], "8", undefined);
_arg1 = fr(_arg1, _local2[5], "8", undefined);
_arg1 = fr(_arg1, _local2[6], "7", undefined);
_arg1 = fr(_arg1, _local2[7], "7", undefined);
_arg1 = fr(_arg1, _local2[8], "7", undefined);
_arg1 = fr(_arg1, _local2[9], "6", undefined);
_arg1 = fr(_arg1, _local2[10], "6", undefined);
_arg1 = fr(_arg1, _local2[11], "6", undefined);
_arg1 = fr(_arg1, _local2[12], "5", undefined);
_arg1 = fr(_arg1, _local2[13], "5", undefined);
_arg1 = fr(_arg1, _local2[14], "5", undefined);
_arg1 = fr(_arg1, _local2[15], "4", undefined);
_arg1 = fr(_arg1, _local2[16], "4", undefined);
_arg1 = fr(_arg1, _local2[17], "4", undefined);
_arg1 = fr(_arg1, _local2[18], "3", undefined);
_arg1 = fr(_arg1, _local2[19], "3", undefined);
_arg1 = fr(_arg1, _local2[20], "3", undefined);
_arg1 = fr(_arg1, _local2[21], "2", undefined);
_arg1 = fr(_arg1, _local2[22], "2", undefined);
_arg1 = fr(_arg1, _local2[23], "2", undefined);
_arg1 = fr(_arg1, _local2[24], "1", undefined);
_arg1 = fr(_arg1, _local2[25], "1", undefined);
_arg1 = fr(_arg1, _local2[26], "1", undefined);
_arg1 = fr(_arg1, _local2[27], "0", undefined);
_arg1 = fr(_arg1, _local2[28], "0", undefined);
_arg1 = fr(_arg1, _local2[29], "0", undefined);
_local3 = Number(_arg1);
return (_local3);
}
private static function fr(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
_local5 = _arg1;
if (typeof(_arg2) !== "string"){
if (_arg3 === undefined){
_arg3 = [""];
} else {
if (typeof(_arg3) === "string"){
_arg3 = [_arg3];
};
};
} else {
_arg2 = [_arg2];
_arg3 = [_arg3];
};
_local8 = _arg2.length;
_local9 = 0;
_local10 = 0;
while (_local9 < _local8) {
while ((_local7 = _local5.indexOf(_arg2[_local9])) !== -1) {
if (((!((_arg4 === undefined))) && ((_local10 >= _arg4)))){
break;
};
_local6 = new Array(_local5.substring(0, _local7), _local5.substr(_local7, _arg2[_local9].length), _local5.substr((_local7 + _arg2[_local9].length)));
_local6[1] = ((_arg3[_local9])===undefined) ? "" : _arg3[_local9];
_local5 = ((_local6[0] + _local6[1]) + _local6[2]);
_local10++;
};
_local9++;
_local10 = 0;
};
return (_local5);
}
public static function encodeStr8bytes(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = 0;
_local3 = _arg1.length;
_local4 = "%";
_local5 = ["%", "$", "#", "@"];
while (_local2 < _local3) {
_local4 = (_local4 + (_arg1.charCodeAt(_local2) + _local5[rand(_local5.length)]));
_local2++;
};
return (_local4);
}
}
}//package
Section 67
//blackBrickBounceSound (blackBrickBounceSound)
package {
import flash.media.*;
public dynamic class blackBrickBounceSound extends Sound {
}
}//package
Section 68
//blackBrickBreakSound (blackBrickBreakSound)
package {
import flash.media.*;
public dynamic class blackBrickBreakSound extends Sound {
}
}//package
Section 69
//bombPickupSound (bombPickupSound)
package {
import flash.media.*;
public dynamic class bombPickupSound extends Sound {
}
}//package
Section 70
//brickBounceSound (brickBounceSound)
package {
import flash.media.*;
public dynamic class brickBounceSound extends Sound {
}
}//package
Section 71
//brickBreakSound (brickBreakSound)
package {
import flash.media.*;
public dynamic class brickBreakSound extends Sound {
}
}//package
Section 72
//brickSmashSound (brickSmashSound)
package {
import flash.media.*;
public dynamic class brickSmashSound extends Sound {
}
}//package
Section 73
//cMenuFix (cMenuFix)
package {
import flash.display.*;
public dynamic class cMenuFix extends MovieClip {
}
}//package
Section 74
//fwBg (fwBg)
package {
import flash.display.*;
public dynamic class fwBg extends BitmapData {
public function fwBg(){
super(0, 0);
}
}
}//package
Section 75
//gunFlash (gunFlash)
package {
import flash.display.*;
public dynamic class gunFlash extends MovieClip {
}
}//package
Section 76
//highscoresmarathon (highscoresmarathon)
package {
import flash.text.*;
import flash.display.*;
public dynamic class highscoresmarathon extends MovieClip {
public var score1:TextField;
public var score5:TextField;
public var name1:TextField;
public var name3:TextField;
public var name4:TextField;
public var name6:TextField;
public var name8:TextField;
public var name2:TextField;
public var name5:TextField;
public var name7:TextField;
public var score10:TextField;
public var score6:TextField;
public var name9:TextField;
public var score2:TextField;
public var score3:TextField;
public var score7:TextField;
public var score8:TextField;
public var score4:TextField;
public var score9:TextField;
public var name10:TextField;
}
}//package
Section 77
//highscoresnormal (highscoresnormal)
package {
import flash.text.*;
import flash.display.*;
public dynamic class highscoresnormal extends MovieClip {
public var score1:TextField;
public var score5:TextField;
public var name1:TextField;
public var name3:TextField;
public var name4:TextField;
public var name6:TextField;
public var name8:TextField;
public var name2:TextField;
public var name5:TextField;
public var name7:TextField;
public var score10:TextField;
public var score6:TextField;
public var name9:TextField;
public var score2:TextField;
public var score3:TextField;
public var score7:TextField;
public var score8:TextField;
public var score4:TextField;
public var score9:TextField;
public var name10:TextField;
}
}//package
Section 78
//level1 (level1)
package {
import flash.display.*;
public dynamic class level1 extends MovieClip {
}
}//package
Section 79
//level10 (level10)
package {
import flash.display.*;
public dynamic class level10 extends MovieClip {
}
}//package
Section 80
//level11 (level11)
package {
import flash.display.*;
public dynamic class level11 extends MovieClip {
}
}//package
Section 81
//level12 (level12)
package {
import flash.display.*;
public dynamic class level12 extends MovieClip {
}
}//package
Section 82
//level13 (level13)
package {
import flash.display.*;
public dynamic class level13 extends MovieClip {
}
}//package
Section 83
//level14 (level14)
package {
import flash.display.*;
public dynamic class level14 extends MovieClip {
}
}//package
Section 84
//level15 (level15)
package {
import flash.display.*;
public dynamic class level15 extends MovieClip {
}
}//package
Section 85
//level16 (level16)
package {
import flash.display.*;
public dynamic class level16 extends MovieClip {
}
}//package
Section 86
//level17 (level17)
package {
import flash.display.*;
public dynamic class level17 extends MovieClip {
}
}//package
Section 87
//level18 (level18)
package {
import flash.display.*;
public dynamic class level18 extends MovieClip {
}
}//package
Section 88
//level19 (level19)
package {
import flash.display.*;
public dynamic class level19 extends MovieClip {
}
}//package
Section 89
//level2 (level2)
package {
import flash.display.*;
public dynamic class level2 extends MovieClip {
}
}//package
Section 90
//level20 (level20)
package {
import flash.display.*;
public dynamic class level20 extends MovieClip {
}
}//package
Section 91
//level21 (level21)
package {
import flash.display.*;
public dynamic class level21 extends MovieClip {
}
}//package
Section 92
//level22 (level22)
package {
import flash.display.*;
public dynamic class level22 extends MovieClip {
}
}//package
Section 93
//level23 (level23)
package {
import flash.display.*;
public dynamic class level23 extends MovieClip {
}
}//package
Section 94
//level24 (level24)
package {
import flash.display.*;
public dynamic class level24 extends MovieClip {
}
}//package
Section 95
//level25 (level25)
package {
import flash.display.*;
public dynamic class level25 extends MovieClip {
}
}//package
Section 96
//level26 (level26)
package {
import flash.display.*;
public dynamic class level26 extends MovieClip {
}
}//package
Section 97
//level27 (level27)
package {
import flash.display.*;
public dynamic class level27 extends MovieClip {
}
}//package
Section 98
//level28 (level28)
package {
import flash.display.*;
public dynamic class level28 extends MovieClip {
}
}//package
Section 99
//level29 (level29)
package {
import flash.display.*;
public dynamic class level29 extends MovieClip {
}
}//package
Section 100
//level3 (level3)
package {
import flash.display.*;
public dynamic class level3 extends MovieClip {
}
}//package
Section 101
//level30 (level30)
package {
import flash.display.*;
public dynamic class level30 extends MovieClip {
}
}//package
Section 102
//level4 (level4)
package {
import flash.display.*;
public dynamic class level4 extends MovieClip {
}
}//package
Section 103
//level5 (level5)
package {
import flash.display.*;
public dynamic class level5 extends MovieClip {
}
}//package
Section 104
//level6 (level6)
package {
import flash.display.*;
public dynamic class level6 extends MovieClip {
}
}//package
Section 105
//level7 (level7)
package {
import flash.display.*;
public dynamic class level7 extends MovieClip {
}
}//package
Section 106
//level8 (level8)
package {
import flash.display.*;
public dynamic class level8 extends MovieClip {
}
}//package
Section 107
//level9 (level9)
package {
import flash.display.*;
public dynamic class level9 extends MovieClip {
}
}//package
Section 108
//main (main)
package {
import flash.display.*;
import flash.ui.*;
import flash.events.*;
import general.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
public class main extends MovieClip {
private var mInput:input;
public static const gameHeight:Number = 600;
public static const halfWidth:Number = 350;
public static const halfHeight:Number = 300;
public static const gameWidth:Number = 700;
public static var mLevelSelect:levelSelect;
public static var transBmp:BitmapData = new BitmapData(700, 600, true, 0);
public static var bmp:BitmapData = new BitmapData(gameWidth, gameHeight, false, 0);
public static var mainBmp:Bitmap;
public static var sfxVol:Number = 0.75;
public static var mPauseMenu:pauseMenu;
public static var mFinishGameNormal:finishGameNormal;
public static var transTime:int = 0;
public static var mGameType:gameType;
public static var mFailLevel:failLevel;
public static var mState:String = "preLoader";
public static var effectsEnabled:Boolean = true;
public static var mPreLoader:preLoader;
public static var mMenu:menu;
public static var musicVol:Number = 0.75;
public static var stageMc:MovieClip;
public static var mFinishGameOver:finishGameOver;
public static var mEndLevel:endLevel;
public static var mFinishGameMarathon:finishGameMarathon;
public static var mGame:game;
public function main(){
var _local1:ContextMenu;
var _local2:ContextMenuItem;
var _local3:cMenuFix;
super();
addFrameScript(0, frame1, 2, frame3);
stop();
_local1 = new ContextMenu();
_local1.hideBuiltInItems();
contextMenu = _local1;
_local2 = new ContextMenuItem("ArmorGames.com");
_local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, openOWN, false, 0, true);
contextMenu.customItems.push(_local2);
_local2 = new ContextMenuItem("GirlsHaveCooties.com");
_local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, openGHC, false, 0, true);
contextMenu.customItems.push(_local2);
_local2 = new ContextMenuItem("DustFilms.com");
_local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, openCDR, false, 0, true);
contextMenu.customItems.push(_local2);
stageMc = this;
mainBmp = new Bitmap(bmp);
mainBmp.x = 50;
addChild(mainBmp);
_local3 = new cMenuFix();
_local3.alpha = 0;
addChild(_local3);
mInput = new input();
addEventListener(Event.ENTER_FRAME, update, false, 0, true);
}
public function openOWN(_arg1:Event){
navigateToURL(new URLRequest("http://www.armorgames.com"), "_blank");
}
function frame3(){
stop();
}
function frame1(){
stop();
}
public function openCDR(_arg1:Event){
navigateToURL(new URLRequest("http://www.dustfilms.com"), "_blank");
}
public function update(_arg1:Event){
switch (mState){
case "game":
if (mGame == null){
mGame = new game();
};
mGame.update();
break;
case "preLoader":
if (mPreLoader == null){
mPreLoader = new preLoader();
};
mPreLoader.update();
break;
case "pauseMenu":
if (mPauseMenu == null){
mPauseMenu = new pauseMenu();
};
mPauseMenu.update();
break;
case "endLevel":
if (mEndLevel == null){
mEndLevel = new endLevel(0, 0, 0, 0);
};
mEndLevel.update();
break;
case "failLevel":
if (mFailLevel == null){
mFailLevel = new failLevel(0);
};
mFailLevel.update();
break;
case "menu":
if (mMenu == null){
mMenu = new menu();
};
mMenu.update();
break;
case "levelSelect":
if (mLevelSelect == null){
mLevelSelect = new levelSelect();
};
mLevelSelect.update();
break;
case "gameType":
if (mGameType == null){
mGameType = new gameType();
};
mGameType.update();
break;
case "finishGameNormal":
if (mFinishGameNormal == null){
mFinishGameNormal = new finishGameNormal();
};
mFinishGameNormal.update();
break;
case "finishGameMarathon":
if (mFinishGameMarathon == null){
mFinishGameMarathon = new finishGameMarathon();
};
mFinishGameMarathon.update();
break;
case "finishGameOver":
if (mFinishGameOver == null){
mFinishGameOver = new finishGameOver();
};
mFinishGameOver.update();
break;
};
if (transTime > 0){
transTime = (transTime - ((1 / (transTime / 100)) * 5));
bmp.draw(transBmp, null, new ColorTransform(1, 1, 1, (transTime / 100), 0, 0, 0, 0));
transBmp.applyFilter(transBmp, transBmp.rect, new Point(), new BlurFilter(20, 0, 1));
};
input.update();
frameLimiter.limitFrame(30);
}
public function openGHC(_arg1:Event){
navigateToURL(new URLRequest("http://www.girlshavecooties.com"), "_blank");
}
public static function startTransition(){
transTime = 110;
transBmp.draw(bmp);
}
}
}//package
Section 109
//menuSelectSound (menuSelectSound)
package {
import flash.media.*;
public dynamic class menuSelectSound extends Sound {
}
}//package
Section 110
//multiballPickupSound (multiballPickupSound)
package {
import flash.media.*;
public dynamic class multiballPickupSound extends Sound {
}
}//package
Section 111
//paddleHitHardSound (paddleHitHardSound)
package {
import flash.media.*;
public dynamic class paddleHitHardSound extends Sound {
}
}//package
Section 112
//paddleHitSound (paddleHitSound)
package {
import flash.media.*;
public dynamic class paddleHitSound extends Sound {
}
}//package
Section 113
//smashLoopSound (smashLoopSound)
package {
import flash.media.*;
public dynamic class smashLoopSound extends Sound {
}
}//package
Section 114
//snfd (snfd)
package {
import flash.display.*;
public dynamic class snfd extends MovieClip {
}
}//package
Section 115
//spaceToPause (spaceToPause)
package {
import flash.display.*;
public dynamic class spaceToPause extends MovieClip {
}
}//package
Section 116
//Timeline1_4aef32ba649ab942a5999c5c778fdbed (Timeline1_4aef32ba649ab942a5999c5c778fdbed)
package {
import flash.display.*;
public dynamic class Timeline1_4aef32ba649ab942a5999c5c778fdbed extends MovieClip {
public function Timeline1_4aef32ba649ab942a5999c5c778fdbed(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
visible = false;
}
}
}//package
Section 117
//Timeline108_788c6c89132e742b217f7dd2cad17c7 (Timeline108_788c6c89132e742b217f7dd2cad17c7)
package {
import flash.display.*;
public dynamic class Timeline108_788c6c89132e742b217f7dd2cad17c7 extends MovieClip {
public function Timeline108_788c6c89132e742b217f7dd2cad17c7(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package
Section 118
//Timeline110_2cec98bcb821994c9db96c1ee8c4dc17 (Timeline110_2cec98bcb821994c9db96c1ee8c4dc17)
package {
import flash.display.*;
public dynamic class Timeline110_2cec98bcb821994c9db96c1ee8c4dc17 extends MovieClip {
public function Timeline110_2cec98bcb821994c9db96c1ee8c4dc17(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package
Section 119
//Timeline152_486f6cad5f481f45b567f4553af3f58e (Timeline152_486f6cad5f481f45b567f4553af3f58e)
package {
import flash.display.*;
public dynamic class Timeline152_486f6cad5f481f45b567f4553af3f58e extends MovieClip {
public function Timeline152_486f6cad5f481f45b567f4553af3f58e(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package