Frame 1
stop();
ball.ySpeed = -8;
ball.xSpeed = 6;
Stage.showMenu = false;
Stage.scaleMode = "noScale";
ball.onEnterFrame = function () {
var _local2 = this._parent.getBytesTotal();
var _local3 = this._parent.getBytesLoaded();
if ((_local2 > 0) && (_local2 == _local3)) {
this._parent.gotoAndStop("me");
delete this.onEnterFrame;
} else {
loader.gotoAndStop(Math.ceil((100 / _local2) * _local3));
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
if ((this._x > 405) && (this.xSpeed > 0)) {
this.xSpeed = this.xSpeed * -1;
} else if ((this._x < 5) && (this.xSpeed < 0)) {
this.xSpeed = this.xSpeed * -1;
}
if ((this._y > 391) && (this.ySpeed > 0)) {
this.ySpeed = this.ySpeed * -1;
this._y = 391;
} else if ((this._y < 182) && (this.ySpeed < 0)) {
this.ySpeed = this.ySpeed * -1;
this._y = 182;
}
if ((this._x > 24) && (this._x < 386)) {
bat._x = this._x;
}
}
};
Frame 4
stop();
meInt = setInterval(function () {
gotoAndStop ("game");
clearInterval(meInt);
}, 3500);
Frame 45
function Point(x, y) {
this.x = x;
this.y = y;
}
function Vector(x, y) {
this.x = x;
this.y = y;
}
function dotProduct(v1, v2) {
return((v1.x * v2.x) + (v1.y * v2.y));
}
function addVectors(v1, v2) {
var _local1 = new Vector(v1.x + v2.x, v1.y + v2.y);
return(_local1);
}
function subVectors(v1, v2) {
var _local1 = new Vector(v1.x - v2.x, v1.y - v2.y);
return(_local1);
}
function scaleVector(v, scale) {
var _local1 = new Vector(v.x * scale, v.y * scale);
return(_local1);
}
function doLinesCross(p1, p2, p3, p4) {
return(((CCW(p1, p2, p3) * CCW(p1, p2, p4)) <= 0) && ((CCW(p3, p4, p1) * CCW(p3, p4, p2)) <= 0));
}
function CCW(p0, p1, p2) {
var _local5 = p1.x - p0.x;
var _local3 = p2.x - p0.x;
var _local4 = p1.y - p0.y;
var _local2 = p2.y - p0.y;
return((((_local5 * _local2) > (_local4 * _local3)) ? 1 : -1));
}
function showStart() {
theScreen.removeMovieClip();
gameover._visible = false;
top._visible = false;
intraLevel._visible = false;
pauseScreen._visible = false;
instructions._visible = false;
startScreen.startB.onRelease = newGame;
startScreen.creditsButton.onRelease = function () {
getURL ("http://www.utterlysuperb.com", _blank);
};
delete gameover.playAgain.onRelease;
startScreen._visible = true;
}
function startLevel() {
soundSetup();
instructions._visible = false;
delete instructions.onMouseDown;
intraLevel._visible = false;
theScreen = createEmptyMovieClip("screen", screenDepth);
theScreen._x = screenX;
theScreen._y = screenY;
balls = [];
rBumpers = [];
lBumpers = [];
numBalls = 0;
starNum = 0;
ballsInPlay = 0;
topSpeed = 4;
minSpeed = 1;
powerUpsArray = [];
pad = new Paddle();
makeBlocks();
mainBall = new DefaultBall(numBalls++, pad.x, pad.topY - 8);
mainBall.xSpeed = -2 + (Math.random() * 4);
mainBall.ySpeed = ((-Math.random()) * 4) - 1;
theScreen.onEnterFrame = startStuff;
theScreen.onMouseDown = function () {
this.onEnterFrame = screenStuff;
delete this.onMouseDown;
};
fps = 31;
frames = 0;
comboNum = 0;
reps = 3;
slowCount = 151;
shootWait = 0;
shaking = -1;
inGame = true;
canPause = true;
clearInterval(nextLev);
}
function newGame() {
padPower = 0;
score = 0;
lives = 2;
makesounds();
startScreen._visible = false;
delete startScreen.startB.onRelease;
delete startScreen.creditsButton.onRelease;
top._visible = true;
level = 1;
top.sToggle.onPress = soundToggle;
timeP = 30;
top.tBar.gotoAndStop(timeP + 1);
top.lives.gotoAndStop(lives + 1);
instructions._visible = true;
instructions.onMouseDown = startLevel;
}
function startStuff() {
pad.movePaddle2();
mainBall.x = (mainBall.mc._x = pad.x);
for (var _local1 in powerUpsArray) {
powerUpsArray[_local1].movePU();
}
}
function nextLevel(cBonus) {
tSound.stop();
theScreen._x = (bg._x = screenX);
theScreen._y = (bg._y = screenY);
inGame = false;
themeSounds[cSound].stop();
if (soundOn) {
var _local3 = new Sound();
_local3.attachSound("levelFin");
_local3.start();
}
intraLevel._visible = true;
var _local1 = 0;
for (var _local2 in balls) {
if (!balls[_local2].isFake) {
_local1++;
}
}
if (_local1 < 1) {
_local1 = 1;
}
intraLevel.bBonus = ((_local1 - 1) * level) * 1000;
intraLevel.cBonus = ((cBonus - 1) * level) * 1000;
intraLevel.levDes = ("LEVEL " + level) + " FINISHED";
score = score + intraLevel.bBonus;
score = score + intraLevel.cBonus;
level++;
nextLev = setInterval(startLevel, 2500);
}
function screenStuff() {
if (Key.isDown(32) && (timeP > 0)) {
if ((reps == 3) && (soundOn)) {
tSound = new Sound(pad.mc);
tSound.attachSound("shootCharge");
tSound.start(0, 1000);
}
timeP--;
reps = 1;
} else {
if (reps == 1) {
tSound.stop();
}
reps = 3;
}
top.tBar.gotoAndStop(timeP + 1);
top.tBarInstr.gotoAndStop(timeP + 1);
pad.movePaddle2();
for (var _local4 in balls) {
balls[_local4].myEF();
}
for (var _local4 in powerUpsArray) {
powerUpsArray[_local4].movePU();
}
if (ballShowerNum > 0) {
ballShowerNum--;
if ((ballShowerNum % 10) == 0) {
var _local9 = new FakeBall(numBalls++, 50 + (Math.random() * 300), 465);
_local9.xSpeed = -4 + (Math.random() * 8);
_local9.ySpeed = ((-Math.random()) * 4) - 2;
}
}
if (shootWait > 0) {
shootWait--;
shot._x = pad.x;
if (shootWait == 0) {
sCharge.stop();
if (soundOn) {
var _local8 = new Sound(shot);
_local8.attachSound("shoot");
_local8.start();
}
var _local7 = Math.floor(((pad.x - 10) - firstX) / blockCWidth) - 1;
var _local6 = Math.ceil(((pad.x + 10) - firstX) / blockCWidth) + 1;
var _local5 = Math.floor(level / 5);
var _local4 = _local7;
while (_local4 < _local6) {
var _local2 = 0;
while (_local2 < (rowY + _local5)) {
var _local3 = blockArray[_local4][_local2];
if (_local3.isABLock) {
var _local1 = {};
_local1.power = 3;
_local1.hits = 0;
_local1.blocksDestroyed = 0;
_local3.hit(_local1);
}
_local2++;
}
_local4++;
}
}
}
if ((getTimer() - cTime) >= 1000) {
fps = frames;
cTime = getTimer();
frames = 1;
} else {
frames++;
}
if (shaking > 0) {
shaking--;
theScreen._x = (bg._x = (screenX + 2) - (Math.random() * 4));
theScreen._y = (bg._y = (screenY + 2) - (Math.random() * 4));
var _local5 = Math.floor(level / 5);
var _local4 = 0;
while (_local4 < (2 * numHalfCols)) {
var _local2 = 0;
while (_local2 < (rowY + _local5)) {
var _local3 = blockArray[_local4][_local2];
if (_local3.isABLock && (Math.random() > 0.5)) {
var _local1 = {};
_local1.power = Math.ceil(Math.random() * 4);
_local1.hits = 0;
_local1.blocksDestroyed = 0;
_local3.hit(_local1);
}
_local2++;
}
_local4++;
}
} else if (shaking == 0) {
shaking--;
theScreen._x = (bg._x = screenX);
theScreen._y = (bg._y = screenY);
}
}
function gameOver() {
tSound.stop();
pnconnector.storeScore(score);
theScreen._x = (bg._x = screenX);
theScreen._y = (bg._y = screenY);
inGame = false;
themeSounds[cSound].stop();
delete theScreen.onEnterFrame;
gameover._visible = true;
gameover.playAgain.onRelease = showStart;
}
function pauseGame() {
if (canPause) {
if (inGame) {
if (!paused) {
tSound.stop();
screenEF = theScreen.onEnterFrame;
delete theScreen.onEnterFrame;
pauseScreen._visible = true;
pauseScreen.onMouseDown = pauseGame;
paused = true;
} else {
paused = false;
theScreen.onEnterFrame = screenEF;
pauseScreen._visible = false;
delete pauseScreen.onMouseDown;
if (startStuff == screenEF) {
theScreen.onMouseDown = function () {
this.onEnterFrame = screenStuff;
delete this.onMouseDown;
};
}
}
}
}
}
function Sprite() {
}
function getAngle(x1, y1, x2, y2) {
return(Math.atan2(y2 - y1, x2 - x1) / PiRads);
}
function getDistance(x1, y1, x2, y2) {
return(Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))));
}
function Ball(num, x, y) {
}
function DefaultBall() {
this.ballType = 2;
this.rad = 8;
this.mass = 0.6;
this.power = 1;
this.topSpeed = (this.baseSpeed = 4);
this.hitSounds = tinkSounds;
this.init(arguments[0], arguments[1], arguments[2]);
}
function ExtraBall() {
this.ballType = 0;
this.rad = 6;
this.mass = 0.5;
this.power = 1;
this.topSpeed = (this.baseSpeed = 4);
this.hitSounds = tinkSounds;
this.init(arguments[0], arguments[1], arguments[2]);
}
function FakeBall() {
this.ballType = 0;
this.rad = 6;
this.mass = 0.9;
this.power = 1;
this.topSpeed = (this.baseSpeed = 5);
this.hitSounds = tinkSounds;
this.init(arguments[0], arguments[1], arguments[2]);
this.isFake = true;
}
function BasketBall() {
this.ballType = 3;
this.rad = 15;
this.mass = 0.7;
this.power = 1;
this.topSpeed = (this.baseSpeed = 4.5);
this.hitSounds = bounceSounds;
this.init(arguments[0], arguments[1], arguments[2]);
}
function BowlingBall() {
this.ballType = 1;
this.rad = 13;
this.mass = 0.3;
this.power = 3;
this.topSpeed = (this.baseSpeed = 4.5);
this.hitSounds = tinkSounds;
this.init(arguments[0], arguments[1], arguments[2]);
}
function FireBall() {
this.ballType = 4;
this.rad = 10;
this.mass = 0.1;
this.power = 8;
this.topSpeed = (this.baseSpeed = 10);
this.hitSounds = tinkSounds;
this.init(arguments[0], arguments[1], arguments[2]);
this.myEF = this.fireColCheck;
this.numHits = 0;
}
function Block(num, blockType, x, y) {
this.init(num, blockType, x, y);
}
function makeBlocks() {
numBlocks = 0;
numBlocksDestroyed = 0;
numBumpers = 0;
numHalfCols = 13;
firstX = (screenWidth / 2) - (blockCWidth * numHalfCols);
blockArray = [];
var _local2 = 0;
while (_local2 < colX) {
blockArray[_local2] = [];
_local2++;
}
var _local13 = new LBumptLeftbRight(numBumpers++, 0, 140, 0, -140, 60, 1, 1);
var _local12 = new LBumptLeftbRight(numBumpers++, 0, 400, 60, -140, -60, -1, 1);
var _local11 = new LBumptLeftbRight(numBumpers++, 0, 0, 115, 25, 110, 1, -1);
var _local10 = new LBumptLeftbRight(numBumpers++, 0, 400, 115, -25, 110, -1, -1);
var _local9 = new LBumptLeftbRight(numBumpers++, 0, 25, 225, -25, 15, 1, 1);
var _local8 = new LBumptLeftbRight(numBumpers++, 0, 400, 240, -25, -15, -1, 1);
var _local14 = new RBumper(numBumpers++, 0, 95, 70);
_local14 = new RBumper(numBumpers++, 0, 305, 70);
_local14 = new RBumper(numBumpers++, 0, 200, 55);
var _local6 = 1 + Math.ceil(Math.random() * 3);
var _local4 = 0;
var _local7 = Math.floor(level / 5);
if (_local7 > 10) {
_local7 = 10;
}
_local2 = 0;
while (_local2 < (rowY + _local7)) {
if (Math.random() > (0.1 - (level / 500))) {
if (Math.random() > 0.5) {
var _local5 = 0;
} else {
var _local5 = 1;
}
var _local1 = _local5;
while (_local1 < numHalfCols) {
if (Math.random() > (0.6 - (level / 100))) {
var _local3 = Math.random() * (level / 10);
if (_local3 < 0.18) {
ty = 0;
} else if (_local3 < 0.4) {
ty = 1;
} else if (_local3 < 0.6) {
ty = 2;
} else if (_local3 < 0.8) {
ty = 3;
} else if (_local3 < 1) {
ty = 4;
} else {
ty = 5;
}
if ((Math.random() > 0.94) && (_local4 < _local6)) {
_local4++;
ty = 99;
}
if (!blockArray[_local1 + numHalfCols][_local2]) {
if (ty >= 99) {
ty = 99 + Math.floor(Math.random() * 6);
}
blockArray[_local1 + numHalfCols][_local2] = new Block(numBlocks++, ty, _local1 + numHalfCols, _local2);
}
if (_local1 != 0) {
if (!blockArray[numHalfCols - _local1][_local2]) {
if (ty >= 99) {
ty = 99 + Math.floor(Math.random() * 6);
}
blockArray[numHalfCols - _local1][_local2] = new Block(numBlocks++, ty, numHalfCols - _local1, _local2);
}
}
}
_local1 = _local1 + 2;
}
}
_local2++;
}
}
function Paddle() {
this.maxPower = 1;
this.endCirclesRad = 7.5;
this.mainCircleRad = 45;
this.endCirclesY = 0;
this.mainCircleYsA = [35, 31.4];
this.mainCircleY = this.mainCircleYsA[padPower];
this.mainCircleW = 24;
this.endCirclesXDispsA = [15, 21];
this.endCirclesXDisp = this.endCirclesXDispsA[padPower];
this.halfWdth = this.endCirclesRad + this.endCirclesXDisp;
this.centerToTop = this.mainCircleRad - this.mainCircleY;
this.mc = theScreen.attachMovie("_lpaddle" + padPower, "paddle", paddleDepth);
this.mc.myObject = this;
this.mc._x = (this.x = 200);
this.mc._y = (this.y = 420);
this.bottom = this.y + this.endCirclesRad;
this.topY = this.y - this.endCirclesRad;
this.leftX = this.x - this.halfWdth;
this.rightX = this.x + this.halfWdth;
this.rightBall = new Point(this.x + this.endCirclesXDisp, this.y);
this.leftBall = new Point(this.x - this.endCirclesXDisp, this.y);
this.paddleArray = [200];
}
function RBumper() {
this.init(arguments[0], arguments[1], arguments[2], arguments[3]);
}
function LineBumper() {
this.init(arguments[0], arguments[1], arguments[2], arguments[3]);
}
function LBumptLeftbRight() {
this.init(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]);
}
function PowerUp(pType, x, y, num) {
this.pType = pType;
this.num = num;
this.mc = theScreen.attachMovie("powerUp" + pType, "powerup" + num, puDepth + num);
this.mc.myObject = this;
this.mc._x = (this.x = x);
this.mc._y = (this.y = y);
this.hWid = 11;
this.hHei = 7;
powerUpsArray[num] = this;
}
function makesounds() {
tinkSounds = [];
var _local1 = 0;
while (_local1 < 2) {
tinkSounds[_local1] = new Sound();
tinkSounds[_local1].attachSound("tink" + _local1);
_local1++;
}
bounceSounds = [];
_local1 = 0;
while (_local1 < 2) {
bounceSounds[_local1] = new Sound();
bounceSounds[_local1].attachSound("bounce" + _local1);
_local1++;
}
}
function soundSetup() {
soundMC = createEmptyMovieClip("smc", 45478959433);
if (musicOn) {
themeSounds = [];
maxReps = [0, 2, 4, 2, 2, 2, 4, 2, 2];
clips = [0, 1, 3, 2, 1, 2, 0];
var _local1 = 0;
while (_local1 < clips.length) {
themeSounds[_local1] = new Sound(soundMC);
themeSounds[_local1].attachSound("music" + clips[_local1]);
themeSounds[_local1].onSoundComplete = doNextSound;
_local1++;
}
themeSounds[0].setVolume(musicVol);
themeSounds[0].start(0, 2);
themeSounds[0].onSoundComplete = doNextSound;
cSound = 0;
}
}
function doNextSound() {
var _local1 = Math.ceil(Math.random() * 6);
while (_local1 == cSound) {
_local1 = Math.ceil(Math.random() * 6);
}
cSound = _local1;
var _local2 = maxReps[cSound];
themeSounds[cSound].start(0, _local2);
}
function soundToggle() {
if (!soundOn) {
musicOn = true;
soundOn = true;
top.sToggle.gotoAndStop("soundOn");
if (inGame) {
soundSetup();
}
} else if (!musicOn) {
soundOn = false;
stopAllSounds();
top.sToggle.gotoAndStop("soundOff");
} else {
musicOn = false;
themeSounds[cSound].stop();
top.sToggle.gotoAndStop("musicOff");
}
}
function ballShower() {
ballShowerNum = 100;
}
function makeFireBall() {
var _local2 = new FireBall(numBalls++, pad.x, pad.topY - 8);
_local2.xSpeed = -6 + (Math.random() * 12);
_local2.ySpeed = -20;
if (soundOn) {
var _local1 = new Sound(shot);
_local1.attachSound("shoot");
_local1.start();
}
}
function tableShake() {
shaking = 5;
if (soundOn) {
var _local1 = new Sound();
_local1.attachSound("ba bam");
_local1.start();
}
}
Function.prototype.extend = function (superClass) {
this.prototype.__proto__ = superClass.prototype;
this.prototype.__constructor__ = superClass;
ASSetPropFlags(this.prototype, ["__constructor__"], 1);
};
ASSetPropFlags(Function.prototype, ["extend"], 1);
MovieClip.prototype.mcExtends = function (superClass) {
if (typeof(superClass) == "function") {
this.__proto__ = superClass.prototype;
if (typeof(this.attachMovie) == "undefined") {
var _local4 = this.__proto__;
var _local3 = _local4.__proto__.__proto__;
while (_local3 != null) {
_local3 = _local3.__proto__;
_local4 = _local4.__proto__;
}
_local4.__proto__ = MovieClip.prototype;
}
arguments.splice(0, 1);
superClass.apply(this, arguments);
} else {
trace("mcExtends: Incorrect superClass type or path - " + typeof(superClass));
}
};
ASSetPropFlags(MovieClip.prototype, ["mcExtends"], 1);
num = 0;
PiRads = (Math.PI/180);
startScreenDepth = 2;
gameOverDepth = 3;
pauseDepth = 4;
instructionsDepths = 5;
topMarginY = 130;
screenDepth = 0;
blockDepth = 100;
bumpersDepth = 500;
starsDepth = 1000;
ballDepth = 2000;
blockExplodeDepth = 2500;
paddleDepth = 3000;
shotDepth = 3010;
puDepth = 4000;
comboDepth = 5000;
intraLevelDepth = 10000;
topDepth = 200000 /* 0x030D40 */;
elasticity = 1.01;
screenWidth = 400;
screenHeight = 500;
rowY = 10;
colX = 29;
screenY = 45;
screenX = 5;
soundOn = true;
gameover.swapDepths(gameOverDepth);
startScreen.swapDepths(startScreenDepth);
intraLevel.swapDepths(intraLevelDepth);
pauseScreen.swapDepths(pauseDepth);
instructions.swapDepths(instructionsDepths);
top.swapDepths(topDepth);
top._x = 5;
top._y = screenY;
myListener = new Object();
myListener.onKeyDown = function () {
var _local1 = Key.getCode();
if (_local1 == 13) {
if (timeP >= 50) {
if (timeP < 100) {
timeP = 0;
ballShower();
} else if (timeP < 150) {
timeP = 0;
makeFireBall();
} else if (timeP < 200) {
timeP = 0;
tableShake();
} else if (lives < 4) {
timeP = 0;
lives++;
top.lives.gotoAndStop(lives + 1);
}
}
} else if (_local1 == 83) {
soundToggle();
} else if (_local1 == 80) {
pauseGame();
}
};
Key.addListener(myListener);
Sprite.prototype.getAngle = function (x, y) {
return(Math.atan2(y - this.y, x - this.x) / PiRads);
};
Ball.extend(Sprite);
Ball.prototype.init = function (num, x, y) {
this.num = num;
this.mc = theScreen.attachMovie("_lball" + this.ballType, "ball" + num, ballDepth + num);
this.mc.myObject = this;
this.mc._x = (this.x = x);
this.mc._y = (this.y = y);
balls[this.num] = this;
ballsInPlay++;
this.myEF = this.ballMove;
this.hits = 0;
this.blocksDestroyed = 0;
};
DefaultBall.extend(Ball);
ExtraBall.extend(Ball);
FakeBall.extend(Ball);
BasketBall.extend(Ball);
BowlingBall.extend(Ball);
FireBall.extend(Ball);
Ball.prototype.ballMove = function () {
this.notHit = true;
var _local2 = 0;
while (_local2 < reps) {
if (this.notHit) {
this.colCheck();
}
_local2++;
}
};
Ball.prototype.speedCheck = function () {
var _local2 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed));
if (_local2 > this.topSpeed) {
var _local3 = Math.atan2(this.ySpeed, this.xSpeed) / PiRads;
this.xSpeed = this.topSpeed * Math.cos(_local3 * PiRads);
this.ySpeed = this.topSpeed * Math.sin(_local3 * PiRads);
} else if (_local2 < minSpeed) {
var _local3 = Math.atan2(this.ySpeed, this.xSpeed) / PiRads;
this.xSpeed = minSpeed * Math.cos(_local3 * PiRads);
this.ySpeed = minSpeed * Math.sin(_local3 * PiRads);
}
};
Ball.prototype.makeVector = function (xV, yV) {
this.vectorSpeed = new Vector(xV, yV);
this.xSpeed = xV;
};
Ball.prototype.colCheck = function () {
var _local4 = this.x + this.xSpeed;
var _local2 = this.y + this.ySpeed;
var _local33 = Math.floor((((_local4 - 5) - this.rad) - firstX) / blockCWidth) - 1;
var _local31 = Math.ceil((((5 + _local4) + this.rad) - firstX) / blockCWidth) + 1;
var _local28 = Math.floor(((_local2 - this.rad) - topMarginY) / blockrHeight) - 1;
var _local26 = Math.ceil(((_local2 + this.rad) - topMarginY) / blockrHeight) + 1;
var _local57 = true;
var _local12 = [];
var _local10 = [];
var _local11 = [];
var _local15 = false;
var _local14 = _local33;
while (_local14 < _local31) {
var _local13 = _local28;
while (_local13 < _local26) {
var _local3 = blockArray[_local14][_local13];
if (_local3.isABLock) {
var _local9 = _local3.x0;
var _local8 = _local3.x1;
var _local6 = _local3.y0;
var _local5 = _local3.y1;
if (_local4 < _local9) {
if (_local2 < _local6) {
if (this.testCorner(_local4, _local2, _local9, _local6)) {
_local12.push(_local3);
_local11.push(new Point(_local9, _local6));
}
} else if (_local2 > _local5) {
if (this.testCorner(_local4, _local2, _local9, _local5)) {
_local12.push(_local3);
_local11.push(new Point(_local9, _local5));
}
} else if ((_local4 + this.rad) > _local9) {
_local10.push(_local3);
}
} else if (_local4 > _local8) {
if (_local2 < _local6) {
if (this.testCorner(_local4, _local2, _local8, _local6)) {
_local12.push(_local3);
_local11.push(new Point(_local8, _local6));
}
} else if (_local2 > _local5) {
if (this.testCorner(_local4, _local2, _local8, _local5)) {
_local12.push(_local3);
_local11.push(new Point(_local8, _local5));
}
} else if ((_local4 - this.rad) < _local8) {
_local10.push(_local3);
}
} else if (_local2 < _local6) {
if ((_local2 + this.rad) > _local6) {
_local10.push(_local3);
}
} else if (_local2 > _local5) {
if ((_local2 - this.rad) < _local5) {
_local10.push(_local3);
}
} else {
_local15 = _local3;
}
}
_local13++;
}
_local14++;
}
if (!this.isFake) {
var _local7 = [];
for (_local14 in balls) {
if (balls[_local14] != this) {
var _local16 = Math.ceil(getDistance(_local4, _local2, balls[_local14].x, balls[_local14].y));
if (_local16 < (this.rad + balls[_local14].rad)) {
_local7.push(balls[_local14]);
this.notHit = false;
}
}
}
}
var _local32 = false;
if ((((_local2 + this.rad) > pad.topY) && ((_local4 + this.rad) > (pad.x - pad.halfWdth))) && ((_local4 - this.rad) < (pad.x + pad.halfWdth))) {
if ((_local4 >= (pad.x - pad.halfWdth)) && (_local4 <= (pad.x + pad.halfWdth))) {
_local32 = -1;
this.notHit = false;
} else if (Math.ceil(getDistance(_local4, _local2, lbx, pad.y)) < (this.rad + pad.endCirclesRad)) {
_local32 = 1;
this.notHit = false;
} else if (Math.ceil(getDistance(_local4, _local2, rbx, pad.y)) < (this.rad + pad.endCirclesRad)) {
_local32 = 2;
this.notHit = false;
}
}
var _local25 = [];
for (_local14 in rBumpers) {
if (Math.ceil(getDistance(_local4, _local2, rBumpers[_local14].x, rBumpers[_local14].y)) < (this.rad + rBumpers[_local14].rad)) {
_local25.push(rBumpers[_local14]);
this.notHit = false;
}
}
lBumperHit = false;
for (_local14 in lBumpers) {
var _local24 = new Point(_local4 - lBumpers[_local14].xds[this.rad], _local2 - lBumpers[_local14].yds[this.rad]);
var _local23 = new Point(_local4 + lBumpers[_local14].xds[this.rad], _local2 + lBumpers[_local14].yds[this.rad]);
if (doLinesCross(_local24, _local23, lBumpers[_local14].startP, lBumpers[_local14].endP)) {
lBumperHit = lBumpers[_local14];
this.notHit = false;
}
}
if (_local15 != false) {
var _local38 = new Point(this.x, this.y);
var _local36 = new Point(_local4, _local2);
if (doLinesCross(_local38, _local36, _local15.topLeft, _local15.topRight)) {
this.y = (this.mc._y = _local15.y0 - this.rad);
this.x = (this.mc._x = _local4);
this.ySpeed = this.ySpeed * -1;
var _local46 = new Point(this.x, _local15.y0);
} else if (doLinesCross(_local38, _local36, _local15.botLeft, _local15.botRight)) {
this.y = (this.mc._y = _local15.y1 + this.rad);
this.x = (this.mc._x = _local4);
this.ySpeed = this.ySpeed * -1;
var _local46 = new Point(this.x, _local15.y1);
} else if (doLinesCross(_local38, _local36, _local15.topLeft, _local15.botLeft)) {
this.x = (this.mc._x = _local15.x0 - this.rad);
this.y = (this.mc._y = _local2);
this.xSpeed = this.xSpeed * -1;
var _local46 = new Point(_local15.x0, this.y);
} else {
this.x = (this.mc._x = _local15.x1 + this.rad);
this.y = (this.mc._y = _local2);
this.xSpeed = this.xSpeed * -1;
var _local46 = new Point(_local15.x1, this.y);
}
var _local52 = theScreen.attachMovie("_lstar", "star" + starNum, starsDepth + starNum);
if ((starNum++) > 100) {
starNum = 0;
}
_local52._x = _local46.x;
_local52._y = _local46.y;
_local15.hit(this);
this.notHit = false;
} else if (_local32 != false) {
pad.mc.gotoAndPlay("hit");
if (soundOn) {
var _local54 = new Sound();
_local54.attachSound("boing");
_local54.start();
}
this.topSpeed = this.baseSpeed + (0.2 * (31 - fps));
if (_local32 == -1) {
var _local56 = pad.mainCircleY + pad.y;
var _local35 = getAngle(_local4, _local2, pad.x, _local56);
this.x = (this.mc._x = pad.x - ((this.rad + pad.mainCircleRad) * Math.cos(_local35 * PiRads)));
this.y = (this.mc._y = (pad.topY - this.rad) - 1);
var _local43 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed));
this.xSpeed = -(_local43 * Math.cos(_local35 * PiRads));
this.ySpeed = -(_local43 * Math.sin(_local35 * PiRads));
this.notHit = false;
} else if (_local32 == 1) {
var _local49 = pad.x - pad.endCirclesXDisp;
var _local35 = getAngle(_local4, _local2, _local49, pad.y);
this.x = (this.mc._x = _local49 - (((this.rad + pad.endCirclesRad) + 1) * Math.cos(_local35 * PiRads)));
this.y = (this.mc._y = pad.y - (((this.rad + pad.endCirclesRad) + 1) * Math.sin(_local35 * PiRads)));
var _local43 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed));
this.xSpeed = -(_local43 * Math.cos(_local35 * PiRads));
this.ySpeed = -(_local43 * Math.sin(_local35 * PiRads));
this.notHit = false;
} else {
var _local55 = pad.x + pad.endCirclesXDisp;
var _local35 = getAngle(_local4, _local2, _local55, pad.y);
this.x = (this.mc._x = _local55 - (((this.rad + pad.endCirclesRad) + 1) * Math.cos(_local35 * PiRads)));
this.y = (this.mc._y = pad.y - (((this.rad + pad.endCirclesRad) + 1) * Math.sin(_local35 * PiRads)));
var _local43 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed));
this.xSpeed = -(_local43 * Math.cos(_local35 * PiRads));
this.ySpeed = -(_local43 * Math.sin(_local35 * PiRads));
this.notHit = false;
}
this.hits = 0;
this.blocksDestroyed = 0;
if (this.ySpeed > -1) {
this.ySpeed = -1;
}
} else if (_local25.length > 0) {
var _local35 = getAngle(_local4, _local2, _local25[0].x, _local25[0].y);
this.x = (this.mc._x = _local25[0].x - (((this.rad + _local25[0].rad) + 1) * Math.cos(_local35 * PiRads)));
this.y = (this.mc._y = _local25[0].y - (((this.rad + _local25[0].rad) + 1) * Math.sin(_local35 * PiRads)));
var _local43 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed)) * _local25[0].elast;
this.xSpeed = -(_local43 * Math.cos(_local35 * PiRads));
this.ySpeed = -(_local43 * Math.sin(_local35 * PiRads));
this.notHit = false;
_local25[0].mc.gotoAndPlay("hit");
if (soundOn) {
var _local53 = new Sound();
_local53.attachSound("bumper" + Math.floor(Math.random() * 3));
_local53.start();
}
score = score + level;
} else if (lBumperHit != false) {
var _local29 = new Point(_local4 - lBumperHit.xds[this.rad], _local2 - lBumperHit.yds[this.rad]);
var _local34 = new Point(_local4 + lBumperHit.xds[this.rad], _local2 + lBumperHit.yds[this.rad]);
var _local30 = lBumperHit.startP;
var _local16 = lBumperHit.endP;
var _local45 = (((_local29.y - _local30.y) * (_local16.x - _local30.x)) - ((_local29.x - _local30.x) * (_local16.y - _local30.y))) / (((_local34.x - _local29.x) * (_local16.y - _local30.y)) - ((_local34.y - _local29.y) * (_local16.x - _local30.x)));
var _local50 = _local29.x + (_local45 * (_local34.x - _local29.x));
var _local47 = _local29.y + (_local45 * (_local34.y - _local29.y));
var _local37 = this.rad * Math.sin(lBumperHit.angle * PiRads);
var _local39 = this.rad * Math.cos(lBumperHit.angle * PiRads);
if ((_local37 * lBumperHit.validX) >= 0) {
this.mc._x = (this.x = _local50 + _local37);
} else {
this.mc._x = (this.x = _local50 - _local37);
}
if ((_local39 * lBumperHit.validY) >= 0) {
this.mc._y = (this.y = _local47 + _local39);
} else {
this.mc._y = (this.y = _local47 - _local39);
}
var _local43 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed)) * lBumperHit.elast;
var _local40 = _local43 * Math.sin(lBumperHit.angle * PiRads);
var _local41 = _local43 * Math.cos(lBumperHit.angle * PiRads);
if ((_local40 * lBumperHit.validX) > 0) {
this.xSpeed = _local40;
} else {
this.xSpeed = -_local40;
}
if ((_local41 * lBumperHit.validY) > 0) {
this.ySpeed = _local41;
} else {
this.ySpeed = -_local41;
}
if (soundOn) {
if (soundOn) {
var _local53 = new Sound();
_local53.attachSound("bumper" + Math.floor(Math.random() * 3));
_local53.start();
}
}
lBumperHit.mc.gotoAndPlay("hit");
score = score + level;
} else if (_local7.length > 0) {
_local14 = 0;
while (_local14 < _local7.length) {
var _local21 = new Vector(_local4 - _local7[_local14].x, _local2 - _local7[_local14].y);
var _local42 = subVectors(new Vector(this.xSpeed, this.ySpeed), new Vector(_local7[_local14].xSpeed, _local7[_local14].ySpeed));
var _local19 = scaleVector(_local21, dotProduct(_local42, _local21));
var _local22 = subVectors(_local42, _local19);
var _local20 = scaleVector(addVectors(_local22, _local19), -(1 + elasticity));
var _local18 = scaleVector(_local20, this.mass / (this.mass + _local7[_local14].mass));
var _local17 = scaleVector(_local20, _local7[_local14].mass / (_local7[_local14].mass + this.mass));
this.xSpeed = this.xSpeed + _local18.x;
this.ySpeed = this.ySpeed + _local18.y;
_local7[_local14].xSpeed = _local7[_local14].xSpeed - _local17.x;
_local7[_local14].ySpeed = _local7[_local14].ySpeed - _local17.y;
var _local35 = getAngle(_local4, _local2, _local7[_local14].x, _local7[_local14].y);
this.x = (this.mc._x = _local7[_local14].x - (((this.rad + _local7[_local14].rad) + 1) * Math.cos(_local35 * PiRads)));
this.y = (this.mc._y = _local7[_local14].y - (((this.rad + _local7[_local14].rad) + 1) * Math.sin(_local35 * PiRads)));
this.notHit = false;
_local7[_local14].speedCheck();
_local14++;
}
} else if (_local10.length > 0) {
if (_local4 < _local10[0].x0) {
this.x = (this.mc._x = _local10[0].x0 - this.rad);
this.xSpeed = this.xSpeed * (-1 * _local10[0].accel);
var _local46 = new Point(_local10[0].x0, this.y);
} else if (_local4 > _local10[0].x1) {
this.x = (this.mc._x = _local10[0].x1 + this.rad);
this.xSpeed = this.xSpeed * (-1 * _local10[0].accel);
var _local46 = new Point(_local10[0].x1, this.y);
} else if (_local2 < _local10[0].y0) {
this.y = (this.mc._y = _local10[0].y0 - this.rad);
this.ySpeed = this.ySpeed * (-1 * _local10[0].accel);
var _local46 = new Point(this.x, _local10[0].y0);
} else {
this.y = (this.mc._y = _local10[0].y1 + this.rad);
this.ySpeed = this.ySpeed * (-1 * _local10[0].accel);
var _local46 = new Point(this.x, _local10[0].y1);
}
var _local52 = theScreen.attachMovie("_lstar", "star" + starNum, starsDepth + starNum);
if ((starNum++) > 100) {
starNum = 0;
}
_local52._x = _local46.x;
_local52._y = _local46.y;
_local10[0].hit(this);
this.notHit = false;
} else if (_local12.length > 0) {
if (_local12.length > 1) {
var _local27 = 100000 /* 0x0186A0 */;
_local14 = 0;
while (_local14 < _local12.length) {
var _local16 = getDistance(_local4, _local2, _local11[_local14].x, _local11[_local14].y);
if (_local16 < _local27) {
_local27 = _local16;
cNum = _local14;
}
_local14++;
}
} else {
cNum = 0;
}
var _local51 = _local11[cNum].x;
var _local48 = _local11[cNum].y;
var _local35 = getAngle(_local4, _local2, _local51, _local48);
var _local42 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed)) * _local12[cNum].accel;
this.x = (this.mc._x = _local51 - (this.rad * Math.cos(_local35 * PiRads)));
this.y = (this.mc._y = _local48 - (this.rad * Math.sin(_local35 * PiRads)));
this.xSpeed = (-_local42) * Math.cos(_local35 * PiRads);
this.ySpeed = (-_local42) * Math.sin(_local35 * PiRads);
_local12[cNum].hit(this);
var _local52 = theScreen.attachMovie("_lstar", "star" + starNum, starsDepth + starNum);
if ((starNum++) > 100) {
starNum = 0;
}
_local52._x = _local11[cNum].x;
_local52._y = _local11[cNum].y;
this.notHit = false;
} else {
this.x = (this.mc._x = _local4);
this.y = (this.mc._y = _local2);
}
if ((this.x - this.rad) < 0) {
this.x = this.rad;
if (this.xSpeed < 0) {
this.xSpeed = this.xSpeed * -1;
if ((this.ySpeed < 0.8) && (this.ySpeed > -0.8)) {
this.ySpeed = this.ySpeed * 2;
}
if (soundOn) {
this.hitSounds[Math.floor(Math.random() * this.hitSounds.length)].start();
}
}
} else if ((this.x + this.rad) > screenWidth) {
this.x = screenWidth - this.rad;
if (this.xSpeed > 0) {
this.xSpeed = this.xSpeed * -1;
if ((this.ySpeed < 0.8) && (this.ySpeed > -0.8)) {
this.ySpeed = this.ySpeed * 2;
}
if (soundOn) {
this.hitSounds[Math.floor(Math.random() * this.hitSounds.length)].start();
}
}
}
if ((this.y - this.rad) < 0) {
this.y = this.rad;
if (this.ySpeed < 0) {
this.ySpeed = this.ySpeed * -1;
if (soundOn) {
this.hitSounds[Math.floor(Math.random() * this.hitSounds.length)].start();
}
}
} else if ((this.y - this.rad) > pad.bottom) {
if (this.ySpeed > 0) {
if (soundOn && (!this.isFake)) {
var _local44 = new Sound();
_local44.attachSound("die");
_local44.start();
}
this.myEF = this.floatDown;
}
}
this.speedCheck();
};
Ball.prototype.floatDown = function () {
this.y = (this.mc._y = this.mc._y + 5);
if (this.y > 530) {
this.mc.removeMovieClip();
delete balls[this.num];
this.outOfPlay();
}
};
Ball.prototype.outOfPlay = function () {
if ((--ballsInPlay) <= 0) {
sCharge.stop();
shot.removeMovieClip();
shootWait = 0;
for (var _local2 in powerUpsArray) {
powerUpsArray[_local2].mc.gotoAndPlay("give");
delete powerUpsArray[_local2];
}
if ((lives--) > 0) {
pad.powerDown();
mainBall = new DefaultBall(numBalls++, pad.x, pad.topY - 8);
mainBall.xSpeed = -2 + (Math.random() * 4);
mainBall.ySpeed = ((-Math.random()) * 4) - 1;
theScreen.onEnterFrame = startStuff;
theScreen.onMouseDown = function () {
this.onEnterFrame = screenStuff;
delete this.onMouseDown;
};
top.lives.gotoAndStop(lives + 1);
} else {
gameOver();
}
}
};
Ball.prototype.testCorner = function (tx, ty, x, y) {
if (this.rad > Math.sqrt(((tx - x) * (tx - x)) + ((ty - y) * (ty - y)))) {
return(true);
}
return(false);
};
Block.extend(Sprite);
blockrHeight = 12;
blockCWidth = 12;
Block.prototype.init = function (num, blockType, x, y) {
this.blockType = blockType;
this.num = num;
this.mc = theScreen.attachMovie("_lblock" + blockType, "block" + num, blockDepth + num);
this.mc.myObject = this;
this.col = x;
this.row = y;
this.mc._x = (this.x = firstX + (x * blockCWidth));
this.mc._y = (this.y = topMarginY + (y * blockrHeight));
this.hght = 12;
this.wdth = 24;
this.x0 = this.x - (this.wdth / 2);
this.x1 = this.x + (this.wdth / 2);
this.y0 = this.y - (this.hght / 2);
this.y1 = this.y + (this.hght / 2);
this.topLeft = new Point(this.x0, this.y0);
this.topRight = new Point(this.x1, this.y0);
this.botLeft = new Point(this.x0, this.y1);
this.botRight = new Point(this.x1, this.y1);
if (blockType > 98) {
this.hp = 2;
this.points = 100;
} else {
this.hp = (blockType / 1.5) + 1;
this.points = 10 * (blockType + 1);
}
this.isABLock = true;
this.accel = 1.1;
};
Block.prototype.hit = function (b) {
this.hp = this.hp - b.power;
b.hits++;
score = score + (b.hits + level);
if (soundOn) {
b.hitSounds[Math.floor(Math.random() * b.hitSounds.length)].start();
}
if (this.hp > 0) {
this.mc.gotoAndPlay("hit");
} else {
b.blocksDestroyed++;
score = score + ((b.blocksDestroyed * this.points) + (level * this.points));
if (this.blockType > 98) {
var _local6 = new PowerUp(this.blockType - 99, this.x, this.y, this.num);
if (soundOn) {
var _local5 = new Sound();
_local5.attachSound("explosion0");
_local5.start();
}
} else if (soundOn) {
var _local4 = new Sound();
_local4.attachSound("shatter" + Math.floor(Math.random() * 4));
_local4.start();
}
this.remove();
if ((--numBlocks) <= 0) {
delete theScreen.onEnterFrame;
nextLevel(b.blocksDestroyed);
}
if (b.blocksDestroyed > 1) {
timeP = timeP + Math.ceil(b.blocksDestroyed / 25);
if ((b.blocksDestroyed % 2) == 0) {
var _local3 = theScreen.attachMovie("combo", "combo" + comboNum, comboDepth + (comboNum++));
_local3.combo.gotoAndStop(b.blocksDestroyed);
_local3._x = this.x;
_local3._y = this.y;
}
}
}
};
Block.prototype.remove = function () {
this.mc.gotoAndPlay("destroy");
this.mc.swapDepths(blockExplodeDepth + (numBlocksDestroyed++));
delete blockArray[this.col][this.row];
};
Paddle.extend(Sprite);
Paddle.prototype.powerUp = function () {
if (padPower < this.maxPower) {
padPower++;
this.mc = theScreen.attachMovie("_lpaddle" + padPower, "paddle", paddleDepth);
this.mc._y = 420;
this.mc._x = this.x;
this.mc.myObject = this;
this.mainCircleY = this.mainCircleYsA[padPower];
this.endCirclesXDisp = this.endCirclesXDispsA[padPower];
this.rightBall = new Point(this.x + this.endCirclesXDisp, this.y);
this.leftBall = new Point(this.x - this.endCirclesXDisp, this.y);
this.halfWdth = this.endCirclesRad + this.endCirclesXDisp;
this.centerToTop = this.mainCircleRad - this.mainCircleY;
} else {
timeP = timeP + 15;
}
};
Paddle.prototype.powerDown = function () {
padPower = 0;
this.mc = theScreen.attachMovie("_lpaddle" + padPower, "paddle", paddleDepth);
this.mc._y = 420;
this.mc._x = this.x;
this.mc.myObject = this;
this.mainCircleY = this.mainCircleYsA[padPower];
this.endCirclesXDisp = this.endCirclesXDispsA[padPower];
this.rightBall = new Point(this.x + this.endCirclesXDisp, this.y);
this.leftBall = new Point(this.x - this.endCirclesXDisp, this.y);
this.halfWdth = this.endCirclesRad + this.endCirclesXDisp;
this.centerToTop = this.mainCircleRad - this.mainCircleY;
};
Paddle.prototype.movePaddle = function () {
var _local2 = this.x + this.xSpeed;
if ((_local2 - this.halfWdth) < 0) {
_local2 = this.halfWdth;
} else if ((_local2 + this.halfWdth) > screenWidth) {
_local2 = screenWidth - this.halfWdth;
}
this.xSpeed = this.xSpeed + ((_xmouse - this.x) / 20);
if (this.xSpeed > 10) {
this.xSpeed = 10;
} else if (this.xSpeed < -10) {
this.xSpeed = -10;
}
this.x = (this.mc._x = _local2);
};
Paddle.prototype.movePaddle2 = function () {
this.paddleArray.push(_xmouse);
var _local2 = this.paddleArray.shift();
_local2 = _xmouse;
if ((_local2 - this.halfWdth) < 0) {
_local2 = this.halfWdth;
} else if ((_local2 + this.halfWdth) > screenWidth) {
_local2 = screenWidth - this.halfWdth;
}
this.x = (this.mc._x = _local2);
};
RBumper.extend(Sprite);
RBumper.prototype.init = function (num, bType, x, y) {
this.bType = bType;
this.mc = theScreen.attachMovie("_lrBumper" + this.bType, "b" + num, bumpersDepth + num);
this.mc.myObject = this;
this.num = num;
this.mc._x = (this.x = x);
this.mc._y = (this.y = y);
this.rad = 15;
this.points = 10 * (bType + 1);
this.elast = 1.5;
rBumpers[num] = this;
var _local7 = Math.floor(((this.x - this.rad) - firstX) / blockCWidth);
var _local6 = Math.ceil(((this.x + this.rad) - firstX) / blockCWidth) + 1;
var _local5 = Math.floor(((this.y - this.rad) - topMarginY) / blockrHeight) - 1;
var _local4 = Math.ceil(((this.y + this.rad) - topMarginY) / blockrHeight) + 1;
var _local3 = _local7;
while (_local3 < _local6) {
var _local2 = _local5;
while (_local2 < _local4) {
blockArray[_local3][_local2] = true;
_local2++;
}
_local3++;
}
};
LineBumper.prototype.init = function (num, bType, x, y, endX, endY, validX, validY) {
this.bType = bType;
this.mc = top["b" + num];
this.mc.myObject = this;
this.num = (this.mc.num = num);
this.x = x;
this.y = y;
this.points = 10 * (bType + 1);
this.elast = 1.5;
lBumpers[num] = this;
this.startP = new Point(x, y);
this.endP = new Point(x + endX, y + endY);
this.validX = validX;
this.validY = validY;
this.angle = getAngle(this.x, this.y, this.endP.x, this.endP.y);
if ((this.angle < 90) && (this.angle > 0)) {
}
this.normal = this.angle + 90;
this.xds = [];
this.yds = [];
var _local2 = 5;
while (_local2 < 21) {
this.xds[_local2] = _local2 * Math.cos(this.normal * PiRads);
this.yds[_local2] = _local2 * Math.sin(this.normal * PiRads);
_local2++;
}
};
LBumptLeftbRight.extend(LineBumper);
PowerUp.prototype.movePU = function () {
this.mc._y = (this.y = this.y + 3);
if (((((this.y + this.hHei) > (pad.topY + 3)) && (((this.y - this.hHei) - 30) < pad.topY)) && ((this.x + this.hWid) > (pad.x - pad.halfWdth))) && ((this.x - this.hWid) < (pad.x + pad.halfWdth))) {
this.mc.gotoAndPlay("give");
if (soundOn && (this.pType != 5)) {
pu = new Sound();
pu.attachSound("pUpSound");
pu.start();
}
switch (this.pType) {
case 0 :
var _local2 = new DefaultBall(numBalls++, pad.x, pad.topY - 8);
_local2.xSpeed = -4 + (Math.random() * 8);
_local2.ySpeed = ((-Math.random()) * 4) - 1;
break;
case 1 :
_local2 = new BowlingBall(numBalls++, pad.x, pad.topY - 13);
_local2.xSpeed = -4 + (Math.random() * 8);
_local2.ySpeed = ((-Math.random()) * 4) - 1;
break;
case 2 :
_local2 = new BasketBall(numBalls++, pad.x, pad.topY - 15);
_local2.xSpeed = -4 + (Math.random() * 8);
_local2.ySpeed = ((-Math.random()) * 4) - 1;
break;
case 3 :
pad.powerUp();
break;
case 4 :
timeP = timeP + 15;
break;
case 5 :
if (shootWait != 0) {
break;
}
shootWait = 27;
shot = theScreen.attachMovie("shot", "sht", shotDepth);
shot._x = pad.x;
shot._y = pad.y;
if (soundOn) {
sCharge = new Sound(shot);
sCharge.attachSound("shootCharge");
sCharge.start(0, 1000);
}
shot.play();
}
delete powerUpsArray[this.num];
} else if (this.y > 500) {
this.mc.removeMovieClip();
delete powerUpsArray[this.num];
}
};
musicVol = 100;
musicOn = true;
Ball.prototype.fireColCheck = function () {
var _local3 = this.x + this.xSpeed;
var _local2 = this.y + this.ySpeed;
var _local26 = Math.floor((((_local3 - 5) - this.rad) - firstX) / blockCWidth) - 1;
var _local24 = Math.ceil((((5 + _local3) + this.rad) - firstX) / blockCWidth) + 1;
var _local21 = Math.floor(((_local2 - this.rad) - topMarginY) / blockrHeight) - 1;
var _local19 = Math.ceil(((_local2 + this.rad) - topMarginY) / blockrHeight) + 1;
var _local45 = true;
var _local10 = [];
var _local11 = [];
var _local8 = [];
var _local18 = false;
this.blocksDestroyed = 0;
var _local13 = _local26;
while (_local13 < _local24) {
var _local9 = _local21;
while (_local9 < _local19) {
var _local12 = blockArray[_local13][_local9];
if (_local12.isABLock) {
var _local7 = _local12.x0;
var _local6 = _local12.x1;
var _local5 = _local12.y0;
var _local4 = _local12.y1;
if (_local3 < _local7) {
if (_local2 < _local5) {
if (this.testCorner(_local3, _local2, _local7, _local5)) {
_local10.push(_local12);
_local8.push(new Point(_local7, _local5));
}
} else if (_local2 > _local4) {
if (this.testCorner(_local3, _local2, _local7, _local4)) {
_local10.push(_local12);
_local8.push(new Point(_local7, _local4));
}
} else if ((_local3 + this.rad) > _local7) {
_local11.push(_local12);
}
} else if (_local3 > _local6) {
if (_local2 < _local5) {
if (this.testCorner(_local3, _local2, _local6, _local5)) {
_local10.push(_local12);
_local8.push(new Point(_local6, _local5));
}
} else if (_local2 > _local4) {
if (this.testCorner(_local3, _local2, _local6, _local4)) {
_local10.push(_local12);
_local8.push(new Point(_local6, _local4));
}
} else if ((_local3 - this.rad) < _local6) {
_local11.push(_local12);
}
} else if (_local2 < _local5) {
if ((_local2 + this.rad) > _local5) {
_local11.push(_local12);
}
} else if (_local2 > _local4) {
if ((_local2 - this.rad) < _local4) {
_local11.push(_local12);
}
} else {
_local18 = _local12;
}
}
_local9++;
}
_local13++;
}
var _local25 = false;
if ((((_local2 + this.rad) > pad.topY) && ((_local3 + this.rad) > (pad.x - pad.halfWdth))) && ((_local3 - this.rad) < (pad.x + pad.halfWdth))) {
if ((_local3 >= (pad.x - pad.halfWdth)) && (_local3 <= (pad.x + pad.halfWdth))) {
_local25 = -1;
this.notHit = false;
} else if (Math.ceil(getDistance(_local3, _local2, lbx, pad.y)) < (this.rad + pad.endCirclesRad)) {
_local25 = 1;
this.notHit = false;
} else if (Math.ceil(getDistance(_local3, _local2, rbx, pad.y)) < (this.rad + pad.endCirclesRad)) {
_local25 = 2;
this.notHit = false;
}
}
var _local17 = [];
for (_local13 in rBumpers) {
if (Math.ceil(getDistance(_local3, _local2, rBumpers[_local13].x, rBumpers[_local13].y)) < (this.rad + rBumpers[_local13].rad)) {
_local17.push(rBumpers[_local13]);
this.notHit = false;
}
}
lBumperHit = false;
for (_local13 in lBumpers) {
var _local16 = new Point(_local3 - lBumpers[_local13].xds[this.rad], _local2 - lBumpers[_local13].yds[this.rad]);
var _local15 = new Point(_local3 + lBumpers[_local13].xds[this.rad], _local2 + lBumpers[_local13].yds[this.rad]);
if (doLinesCross(_local16, _local15, lBumpers[_local13].startP, lBumpers[_local13].endP)) {
lBumperHit = lBumpers[_local13];
this.notHit = false;
}
}
if (_local18 != false) {
_local18.hit(this);
this.x = (this.mc._x = _local3);
this.y = (this.mc._y = _local2);
this.numHits++;
} else if (_local25 != false) {
this.numHits++;
pad.mc.gotoAndPlay("hit");
if (soundOn) {
var _local42 = new Sound();
_local42.attachSound("boing");
_local42.start();
}
this.topSpeed = this.baseSpeed + (0.2 * (31 - fps));
if (_local25 == -1) {
var _local44 = pad.mainCircleY + pad.y;
var _local28 = getAngle(_local3, _local2, pad.x, _local44);
this.x = (this.mc._x = pad.x - ((this.rad + pad.mainCircleRad) * Math.cos(_local28 * PiRads)));
this.y = (this.mc._y = (pad.topY - this.rad) - 1);
var _local34 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed));
this.xSpeed = -(_local34 * Math.cos(_local28 * PiRads));
this.ySpeed = -(_local34 * Math.sin(_local28 * PiRads));
this.notHit = false;
} else if (_local25 == 1) {
var _local38 = pad.x - pad.endCirclesXDisp;
var _local28 = getAngle(_local3, _local2, _local38, pad.y);
this.x = (this.mc._x = _local38 - (((this.rad + pad.endCirclesRad) + 1) * Math.cos(_local28 * PiRads)));
this.y = (this.mc._y = pad.y - (((this.rad + pad.endCirclesRad) + 1) * Math.sin(_local28 * PiRads)));
var _local34 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed));
this.xSpeed = -(_local34 * Math.cos(_local28 * PiRads));
this.ySpeed = -(_local34 * Math.sin(_local28 * PiRads));
this.notHit = false;
} else {
var _local43 = pad.x + pad.endCirclesXDisp;
var _local28 = getAngle(_local3, _local2, _local43, pad.y);
this.x = (this.mc._x = _local43 - (((this.rad + pad.endCirclesRad) + 1) * Math.cos(_local28 * PiRads)));
this.y = (this.mc._y = pad.y - (((this.rad + pad.endCirclesRad) + 1) * Math.sin(_local28 * PiRads)));
var _local34 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed));
this.xSpeed = -(_local34 * Math.cos(_local28 * PiRads));
this.ySpeed = -(_local34 * Math.sin(_local28 * PiRads));
this.notHit = false;
}
this.hits = 0;
this.blocksDestroyed = 0;
if (this.ySpeed > -1) {
this.ySpeed = -1;
}
} else if (_local17.length > 0) {
this.numHits++;
var _local28 = getAngle(_local3, _local2, _local17[0].x, _local17[0].y);
this.x = (this.mc._x = _local17[0].x - (((this.rad + _local17[0].rad) + 1) * Math.cos(_local28 * PiRads)));
this.y = (this.mc._y = _local17[0].y - (((this.rad + _local17[0].rad) + 1) * Math.sin(_local28 * PiRads)));
var _local34 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed)) * _local17[0].elast;
this.xSpeed = -(_local34 * Math.cos(_local28 * PiRads));
this.ySpeed = -(_local34 * Math.sin(_local28 * PiRads));
this.notHit = false;
_local17[0].mc.gotoAndPlay("hit");
if (soundOn) {
var _local40 = new Sound();
_local40.attachSound("bumper" + Math.floor(Math.random() * 3));
_local40.start();
}
score = score + level;
} else if (lBumperHit != false) {
this.numHits++;
var _local22 = new Point(_local3 - lBumperHit.xds[this.rad], _local2 - lBumperHit.yds[this.rad]);
var _local27 = new Point(_local3 + lBumperHit.xds[this.rad], _local2 + lBumperHit.yds[this.rad]);
var _local23 = lBumperHit.startP;
var _local14 = lBumperHit.endP;
var _local36 = (((_local22.y - _local23.y) * (_local14.x - _local23.x)) - ((_local22.x - _local23.x) * (_local14.y - _local23.y))) / (((_local27.x - _local22.x) * (_local14.y - _local23.y)) - ((_local27.y - _local22.y) * (_local14.x - _local23.x)));
var _local39 = _local22.x + (_local36 * (_local27.x - _local22.x));
var _local37 = _local22.y + (_local36 * (_local27.y - _local22.y));
var _local30 = this.rad * Math.sin(lBumperHit.angle * PiRads);
var _local31 = this.rad * Math.cos(lBumperHit.angle * PiRads);
if ((_local30 * lBumperHit.validX) >= 0) {
this.mc._x = (this.x = _local39 + _local30);
} else {
this.mc._x = (this.x = _local39 - _local30);
}
if ((_local31 * lBumperHit.validY) >= 0) {
this.mc._y = (this.y = _local37 + _local31);
} else {
this.mc._y = (this.y = _local37 - _local31);
}
var _local34 = Math.sqrt((this.xSpeed * this.xSpeed) + (this.ySpeed * this.ySpeed)) * lBumperHit.elast;
var _local32 = _local34 * Math.sin(lBumperHit.angle * PiRads);
var _local33 = _local34 * Math.cos(lBumperHit.angle * PiRads);
if ((_local32 * lBumperHit.validX) > 0) {
this.xSpeed = _local32;
} else {
this.xSpeed = -_local32;
}
if ((_local33 * lBumperHit.validY) > 0) {
this.ySpeed = _local33;
} else {
this.ySpeed = -_local33;
}
if (soundOn) {
if (soundOn) {
var _local40 = new Sound();
_local40.attachSound("bumper" + Math.floor(Math.random() * 3));
_local40.start();
}
}
lBumperHit.mc.gotoAndPlay("hit");
score = score + level;
} else if (_local11.length > 0) {
this.numHits++;
_local11[0].hit(this);
this.x = (this.mc._x = _local3);
this.y = (this.mc._y = _local2);
} else if (_local10.length > 0) {
this.numHits++;
if (_local10.length > 1) {
var _local20 = 100000 /* 0x0186A0 */;
_local13 = 0;
while (_local13 < _local10.length) {
var _local14 = getDistance(_local3, _local2, _local8[_local13].x, _local8[_local13].y);
if (_local14 < _local20) {
_local20 = _local14;
cNum = _local13;
}
_local13++;
}
} else {
cNum = 0;
}
_local10[cNum].hit(this);
this.x = (this.mc._x = _local3);
this.y = (this.mc._y = _local2);
} else {
this.x = (this.mc._x = _local3);
this.y = (this.mc._y = _local2);
}
if ((this.x - this.rad) < 0) {
this.x = this.rad;
if (this.xSpeed < 0) {
this.xSpeed = this.xSpeed * -1;
if ((this.ySpeed < 0.8) && (this.ySpeed > -0.8)) {
this.ySpeed = this.ySpeed * 2;
}
if (soundOn) {
this.hitSounds[Math.floor(Math.random() * this.hitSounds.length)].start();
}
}
} else if ((this.x + this.rad) > screenWidth) {
this.x = screenWidth - this.rad;
if (this.xSpeed > 0) {
this.xSpeed = this.xSpeed * -1;
if ((this.ySpeed < 0.8) && (this.ySpeed > -0.8)) {
this.ySpeed = this.ySpeed * 2;
}
if (soundOn) {
this.hitSounds[Math.floor(Math.random() * this.hitSounds.length)].start();
}
}
}
if ((this.y - this.rad) < 0) {
this.y = this.rad;
if (this.ySpeed < 0) {
this.ySpeed = this.ySpeed * -1;
if (soundOn) {
this.hitSounds[Math.floor(Math.random() * this.hitSounds.length)].start();
}
}
} else if ((this.y - this.rad) > pad.bottom) {
if (this.ySpeed > 0) {
if (soundOn && (!this.isFake)) {
var _local35 = new Sound();
_local35.attachSound("die");
_local35.start();
}
this.myEF = this.floatDown;
}
}
this.speedCheck();
if (this.numHits > 25) {
delete balls[this.num];
if (soundOn) {
var _local35 = new Sound();
_local35.attachSound("explosion0");
_local35.start();
}
this.mc.gotoAndPlay("explode");
var _local29 = 50;
_local26 = Math.floor((((_local3 - 5) - _local29) - firstX) / blockCWidth) - 1;
_local24 = Math.ceil((((5 + _local3) + _local29) - firstX) / blockCWidth) + 1;
_local21 = Math.floor(((_local2 - _local29) - topMarginY) / blockrHeight) - 1;
_local19 = Math.ceil(((_local2 + _local29) - topMarginY) / blockrHeight) + 1;
_local13 = _local26;
while (_local13 < _local24) {
var _local9 = _local21;
while (_local9 < _local19) {
var _local12 = blockArray[_local13][_local9];
if (_local12.isABLock) {
_local12.hit(this);
}
_local9++;
}
_local13++;
}
var _local41 = new DefaultBall(numBalls++, this.x, this.y);
_local41.xSpeed = this.xSpeed;
_local41.ySpeed = this.ySpeed;
this.outOfPlay();
}
};
showStart();
Symbol 3 MovieClip [pnFlashGames] Frame 1
#initclip 1
function bitOR(a, b) {
var _local1 = (a & 1) | (b & 1);
var _local2 = (a >>> 1) | (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitXOR(a, b) {
var _local1 = (a & 1) ^ (b & 1);
var _local2 = (a >>> 1) ^ (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitAND(a, b) {
var _local1 = (a & 1) & (b & 1);
var _local2 = (a >>> 1) & (b >>> 1);
return((_local2 << 1) | _local1);
}
function addme(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function rhex(num) {
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt((num >> ((j * 8) + 4)) & 15) + hex_chr.charAt((num >> (j * 8)) & 15));
j++;
}
return(str);
}
function str2blks_MD5(str) {
nblk = ((str.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < str.length) {
blks[i >> 2] = blks[i >> 2] | (str.charCodeAt(i) << ((((str.length * 8) + i) % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((((str.length * 8) + i) % 4) * 8));
var _local2 = str.length * 8;
blks[(nblk * 16) - 2] = _local2 & 255;
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 8) & 255) << 8);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 16) & 255) << 16);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 24) & 255) << 24);
return(blks);
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, c), bitAND(~b, d)), a, b, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, d), bitAND(c, ~d)), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn(bitXOR(bitXOR(b, c), d), a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(bitXOR(c, bitOR(b, ~d)), a, b, x, s, t));
}
function calcMD5(str) {
x = str2blks_MD5(str);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
var _local1;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
_local1 = 0;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
}
var hex_chr = "0123456789abcdef";
pnFlashGames = function () {
this.gid = _root.pn_gid;
this.uname = _root.pn_uname;
this.License = _root.pn_license;
this.CheckSum = _root.pn_checksum;
this.Domain = _root.pn_domain;
this._modvalue = "pnFlashGames";
this._modvar = "module";
this._script = "index.php";
if (_root.pn_modvalue != null) {
this._modvalue = _root.pn_modvalue;
}
if (_root.pn_modvar != null) {
this._modvar = _root.pn_modvar;
}
if (_root.pn_script != null) {
this._script = _root.pn_script;
}
this._autoupdate = false;
if (_root.pn_autoupdate == "true") {
this._autoupdate = true;
}
if (_root.pn_extravars != null) {
this._extravars = new Array();
temppairs = _root.pn_extravars.split("|");
x = 0;
while (x < temppairs.length) {
tempset = temppairs[x].split("~");
this._extravars.push(tempset);
x++;
}
} else {
this._extravars = null;
}
this.busy = false;
this.gameSaved = null;
this.gameLoaded = null;
this.gameScoresLoaded = null;
this.gameScores = null;
this.scoreStored = null;
this.gameData = "";
this.buildKey();
this.confirmKey();
};
pnFlashGames.prototype = new MovieClip();
pnFlashGames.prototype.saveGame = function (gameData) {
this.busy = true;
varsObj = new LoadVars();
varsObj.func = "saveGame";
varsObj.gid = this.gid;
varsObj.gameData = gameData;
varsObj.type = "user";
varsObj[this._modvar] = this._modvalue;
varsObj.parent = this;
varsObj.onLoad = this.saveGame_Result;
if (this._extravars != null) {
x = 0;
while (x < this._extravars.length) {
varsObj[this._extravars[x][0]] = this._extravars[x][1];
x++;
}
}
if (this.debugMode) {
this.debugOutput(varsObj);
} else {
varsObj.sendAndLoad(this._script, varsObj, "POST");
}
};
pnFlashGames.prototype.saveGame_Result = function (success) {
this.parent._parent.incoming = this.opSuccess;
if (this.opSuccess == "true") {
this.parent.gameSaved = true;
} else {
this.parent.gameSaved = false;
}
this.parent.busy = false;
};
pnFlashGames.prototype.loadGame = function () {
this.busy = true;
varsObj = new LoadVars();
varsObj.func = "loadGame";
varsObj.gid = this.gid;
varsObj.type = "user";
varsObj[this._modvar] = this._modvalue;
varsObj.parent = this;
varsObj.onLoad = this.loadGame_Result;
if (this._extravars != null) {
x = 0;
while (x < this._extravars.length) {
varsObj[this._extravars[x][0]] = this._extravars[x][1];
x++;
}
}
if (this.debugMode) {
this.debugOutput(varsObj);
} else {
varsObj.sendAndLoad(this._script, varsObj, "POST");
}
};
pnFlashGames.prototype.loadGame_Result = function (success) {
if (this.opSuccess == "true") {
this.parent.gameLoaded = true;
this.parent.gameData = gameData;
} else {
this.parent.gameLoaded = false;
}
if (this.parent.onLoadGame != null) {
this.parent.onLoadGame(this.gameData);
}
this.parent.busy = false;
};
pnFlashGames.prototype.storeScore = function (score) {
this.busy = true;
varsObj = new LoadVars();
varsObj.score = score;
varsObj.func = "storeScore";
varsObj.gid = this.gid;
varsObj.type = "user";
varsObj[this._modvar] = this._modvalue;
varsObj.parent = this;
varsObj.onLoad = this.storeScore_Result;
if (this._extravars != null) {
x = 0;
while (x < this._extravars.length) {
varsObj[this._extravars[x][0]] = this._extravars[x][1];
x++;
}
}
if (this.debugMode) {
this.debugOutput(varsObj);
} else {
varsObj.sendAndLoad(this._script, varsObj, "POST");
}
};
pnFlashGames.prototype.storeScore_Result = function (success) {
if (this.opSuccess == "true") {
this.parent.scoreStored = true;
if (this.parent._autoupdate) {
_root.getURL("javascript:refreshScores();");
}
} else {
this.parent.scoreStored = false;
}
this.parent.busy = false;
};
pnFlashGames.prototype.loadGameScores = function () {
this.busy = true;
varsObj = new LoadVars();
varsObj.func = "loadGameScores";
varsObj.gid = this.gid;
varsObj.type = "user";
varsObj[this._modvar] = this._modvalue;
varsObj.parent = this;
varsObj.onLoad = this.loadGameScores_Result;
if (this._extravars != null) {
x = 0;
while (x < this._extravars.length) {
varsObj[this._extravars[x][0]] = this._extravars[x][1];
x++;
}
}
if (this.debugMode) {
this.debugOutput(varsObj);
} else {
varsObj.sendAndLoad(this._script, varsObj, "POST");
}
};
pnFlashGames.prototype.loadGameScores_Result = function (success) {
if (this.opSuccess == "true") {
this.parent.gameScoresLoaded = true;
this.parent.gameScores = new XML(this.gameScores);
} else {
this.parent.gameScoresLoaded = false;
}
if (this.parent.onLoadGameScores != null) {
this.parent.onLoadGameScores(this.gameScores);
}
this.parent.busy = false;
};
pnFlashGames.prototype.debugOutput = function (vars) {
debug = "";
debug = debug + (("Function: " + vars.func) + newline);
switch (vars.func) {
case "storeScore" :
debug = debug + ("Score: " + vars.score);
break;
case "saveGame" :
debug = debug + ("Saving: " + vars.gameData);
break;
case "loadGame" :
debug = debug + "Loading data....";
break;
case "getGameScores" :
debug = debug + "Getting scores for this game....";
}
trace(debug);
};
pnFlashGames.prototype.buildKey = function () {
domainparts = this.Domain.split(".");
tempkey = (((domainparts[1] + "*") + this.CheckSum) + "*") + domainparts[0];
this.CheckKey = calcMD5(tempkey);
tempkey = "";
return(undefined);
};
pnFlashGames.prototype.confirmKey = function () {
if (!this.debugMode) {
if (this.License == this.CheckKey) {
return(true);
}
this.swapDepths(999999);
stopAllSounds();
_root.getURL("http://pnflashgames.com/licensefail.php", "_blank", "POST");
this.gotoAndStop("error");
} else {
return(true);
}
};
Object.registerClass("pnFlashGames", pnFlashGames);
#endinitclip
stop();
Symbol 3 MovieClip [pnFlashGames] Frame 5
stop();
stopAllSounds();
_root.gotoAndStop(1);
delete _root.enterFrame;
for (i in _root) {
if (i != _name) {
_root[i].removeMovieClip();
_root[i].unloadMovie();
}
}
blocker.useHandCursor = false;
_root.createEmptyMovieClip("errScreen", 5000000);
_root.errScreen.createTextField("message", 1, 0, 0, 300, 500);
_root.errScreen.message.type = "dynamic";
_root.errScreen.message.autoSize = "center";
_root.errScreen.message.textColor = 6710886 /* 0x666666 */;
_root.errScreen.message.html = true;
_root.errScreen.message.wordWrap = true;
_root.errScreen.message._width = Stage.width - 10;
_root.errScreen.message.htmlText = ("<b>This game is released under the Common Game License (CGL). Altering of its source code and distribution of this .swf file is strictly forbidden. Please review the requirements on the page that just loaded. If you suspect software piracy, please report it by email: <font color='#0000FF'><u><a href='mailto:piracy@pnflashgames.com?subject=Possible%20piracy%20on%20" + this.Domain) + "'>piracy@pnflashgames.com</a></u></font></b>";
_root.errScreen.message._x = (Stage.width / 2) - (_root.errScreen.message._width / 2);
_root.errScreen.message._y = (Stage.height / 2) - (_root.errScreen.message._height / 2);
Symbol 18 MovieClip Frame 1
stop();
Symbol 75 MovieClip [_lblock0] Frame 1
stop();
Symbol 75 MovieClip [_lblock0] Frame 2
play();
Symbol 75 MovieClip [_lblock0] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 75 MovieClip [_lblock0] Frame 7
play();
Symbol 75 MovieClip [_lblock0] Frame 14
this.removeMovieClip();
stop();
Symbol 91 MovieClip [_lblock1] Frame 1
stop();
Symbol 91 MovieClip [_lblock1] Frame 2
play();
Symbol 91 MovieClip [_lblock1] Frame 7
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 91 MovieClip [_lblock1] Frame 8
play();
Symbol 91 MovieClip [_lblock1] Frame 15
this.removeMovieClip();
stop();
Symbol 105 MovieClip [_lblock2] Frame 1
stop();
Symbol 105 MovieClip [_lblock2] Frame 2
play();
Symbol 105 MovieClip [_lblock2] Frame 7
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 105 MovieClip [_lblock2] Frame 8
play();
Symbol 105 MovieClip [_lblock2] Frame 15
this.removeMovieClip();
stop();
Symbol 119 MovieClip [_lblock3] Frame 1
stop();
Symbol 119 MovieClip [_lblock3] Frame 2
play();
Symbol 119 MovieClip [_lblock3] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 119 MovieClip [_lblock3] Frame 7
play();
Symbol 119 MovieClip [_lblock3] Frame 14
this.removeMovieClip();
stop();
Symbol 135 MovieClip [_lblock4] Frame 1
stop();
Symbol 135 MovieClip [_lblock4] Frame 2
play();
Symbol 135 MovieClip [_lblock4] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 135 MovieClip [_lblock4] Frame 7
play();
Symbol 135 MovieClip [_lblock4] Frame 14
this.removeMovieClip();
stop();
Symbol 151 MovieClip [_lblock5] Frame 1
stop();
Symbol 151 MovieClip [_lblock5] Frame 2
play();
Symbol 151 MovieClip [_lblock5] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 151 MovieClip [_lblock5] Frame 7
play();
Symbol 151 MovieClip [_lblock5] Frame 14
this.removeMovieClip();
stop();
Symbol 176 MovieClip [_lblock99] Frame 1
stop();
Symbol 176 MovieClip [_lblock99] Frame 2
play();
Symbol 176 MovieClip [_lblock99] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 176 MovieClip [_lblock99] Frame 7
play();
Symbol 176 MovieClip [_lblock99] Frame 18
this.removeMovieClip();
stop();
Symbol 179 MovieClip [_lblock100] Frame 1
stop();
Symbol 179 MovieClip [_lblock100] Frame 2
play();
Symbol 179 MovieClip [_lblock100] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 179 MovieClip [_lblock100] Frame 7
play();
Symbol 179 MovieClip [_lblock100] Frame 18
this.removeMovieClip();
stop();
Symbol 182 MovieClip [_lblock101] Frame 1
stop();
Symbol 182 MovieClip [_lblock101] Frame 2
play();
Symbol 182 MovieClip [_lblock101] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 182 MovieClip [_lblock101] Frame 7
play();
Symbol 182 MovieClip [_lblock101] Frame 18
this.removeMovieClip();
stop();
Symbol 185 MovieClip [_lblock102] Frame 1
stop();
Symbol 185 MovieClip [_lblock102] Frame 2
play();
Symbol 185 MovieClip [_lblock102] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 185 MovieClip [_lblock102] Frame 7
play();
Symbol 185 MovieClip [_lblock102] Frame 18
this.removeMovieClip();
stop();
Symbol 188 MovieClip [_lblock103] Frame 1
stop();
Symbol 188 MovieClip [_lblock103] Frame 2
play();
Symbol 188 MovieClip [_lblock103] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 188 MovieClip [_lblock103] Frame 7
play();
Symbol 188 MovieClip [_lblock103] Frame 18
this.removeMovieClip();
stop();
Symbol 191 MovieClip [_lblock104] Frame 1
stop();
Symbol 191 MovieClip [_lblock104] Frame 2
play();
Symbol 191 MovieClip [_lblock104] Frame 6
if (this.myObject.hp > 0) {
gotoAndStop (1);
}
Symbol 191 MovieClip [_lblock104] Frame 7
play();
Symbol 191 MovieClip [_lblock104] Frame 18
this.removeMovieClip();
stop();
Symbol 210 MovieClip [_lpaddle0] Frame 1
stop();
Symbol 210 MovieClip [_lpaddle0] Frame 2
play();
Symbol 215 MovieClip [_lpaddle1] Frame 1
stop();
Symbol 215 MovieClip [_lpaddle1] Frame 2
play();
Symbol 220 MovieClip [_lrBumper0] Frame 1
stop();
Symbol 220 MovieClip [_lrBumper0] Frame 2
play();
Symbol 224 MovieClip [_lstar] Frame 6
this.removeMovieClip();
Symbol 249 MovieClip Frame 1
stop();
Symbol 250 MovieClip [combo] Frame 13
this.removeMovieClip();
Symbol 280 MovieClip [shot] Frame 31
this.removeMovieClip();
Symbol 295 MovieClip [powerUp0] Frame 5
stop();
Symbol 295 MovieClip [powerUp0] Frame 15
this.removeMovieClip();
Symbol 310 MovieClip [powerUp1] Frame 5
stop();
Symbol 310 MovieClip [powerUp1] Frame 15
this.removeMovieClip();
Symbol 325 MovieClip [powerUp2] Frame 5
stop();
Symbol 325 MovieClip [powerUp2] Frame 15
this.removeMovieClip();
Symbol 340 MovieClip [powerUp3] Frame 5
stop();
Symbol 340 MovieClip [powerUp3] Frame 15
this.removeMovieClip();
Symbol 355 MovieClip [powerUp4] Frame 5
stop();
Symbol 355 MovieClip [powerUp4] Frame 15
this.removeMovieClip();
Symbol 370 MovieClip [powerUp5] Frame 5
stop();
Symbol 370 MovieClip [powerUp5] Frame 15
this.removeMovieClip();
Symbol 389 MovieClip [_lball4] Frame 1
stop();
Symbol 389 MovieClip [_lball4] Frame 2
play();
Symbol 389 MovieClip [_lball4] Frame 18
this.removeMovieClip();
Symbol 408 MovieClip Frame 1
stop();
Symbol 413 Button
on (release) {
getURL ("http://www.pnflashgames.com", "_blank");
}
Symbol 429 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 2
play();
Symbol 432 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 2
play();
Symbol 439 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 2
stop();
Symbol 463 MovieClip Frame 3
stop();
Symbol 468 MovieClip Frame 1
stop();
Symbol 482 MovieClip Frame 1
stop();
Symbol 482 MovieClip Frame 2
stop();
Symbol 482 MovieClip Frame 3
stop();