Frame 2
if (_framesloaded >= _totalframes) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 30
gotoAndPlay (31);
Frame 31
function buildBricks() {
numBalls = 2;
theRow = 1;
while (theRow < 10) {
i = 1;
while (i < 10) {
attachMovie("brick", (("a" + theRow) + "-") + i, (10 * theRow) + i);
clip = _root[(("a" + theRow) + "-") + i];
clip._x = (leftColLoc + (i * horizSpace)) - 28;
clip._y = topRowLoc + (theRow * vertSpace);
clip.active = true;
layBricks = "no";
i++;
}
theRow++;
}
}
var leftColLoc = 5;
var topRowLoc = 42;
var horizSpace = 61;
var row = 6;
var vertSpace = 34;
var theRow;
if (level == null) {
var level = 1;
}
var ballCount = 1;
var splashSeen = "no";
if (gameType == null) {
var gameType = "free";
}
var originalDy = 16;
var limitDy = 36;
var dy = originalDY;
var thePlaymates = new Array();
thePlaymates.push("playmate3.swf");
thePlaymates.push("playmate2.swf");
thePlaymates.push("playmate1.swf");
thePlaymates.push("playmate0.swf");
i = 1;
while (i < level) {
_root.thePlaymates.pop();
dy = Math.abs(dy) + 3;
i++;
}
stop();
Instance of Symbol 37 MovieClip "thePlayButton" in Frame 31
onClipEvent (load) {
this.stop();
dy = 3;
dy1 = 20;
dy2 = 20;
splashDY = 16;
_root.thePlaymate.loadMovie(_root.thePlaymates.pop());
_root.activatePlayButton = "no";
_root.setTimeSwitch = true;
_root.paddleX = _root.paddle._x;
_root.paddleDy = 6;
var hitBrickSound = new Sound();
hitBrickSound.attachSound("hitBrick");
hitBrickSound.setVolume(100);
}
onClipEvent (enterFrame) {
if (_root.playItNow != "yes") {
_root.theStartBall._x = _root.theStartBall._x + 30;
_root.theStartBall._y = _root.theStartBall._y - splashDY;
if (_root.theStartBall._y < 310) {
_root.theTitle.nextFrame();
hitBrickSound.start();
splashDY = splashDY * -1;
}
if (600 < _root.theStartBall._x) {
_root.playItNow = "yes";
}
}
if (_root.playItNow == "yes") {
_root.theOpeningPlaymate._alpha = 0;
this._alpha = 100;
buttonPosition = 480;
titlePosition = 5;
if (int(_root.thePlayButton._y) != buttonPosition) {
if ((buttonPosition - dy1) < _root.thePlayButton._y) {
dy1 = 1;
}
_root.thePlayButton._y = _root.thePlayButton._y + dy1;
}
if (int(_root.theTitle._y) != titlePosition) {
if (_root.theTitle._y < (titlePosition + dy2)) {
dy2 = 1;
}
_root.theTitle._y = _root.theTitle._y - dy2;
}
if ((int(_root.theTitle._y) == titlePosition) && (int(_root.thePlayButton._y) == buttonPosition)) {
if (_root.setTimeSwitch) {
_root.timeForPlaymate = getTimer() + 2000;
_root.timeForPaddle = getTimer() + 3000;
_root.timeForPaddleStop = getTimer() + 6000;
_root.timeForBricks = getTimer() + 500;
_root.setTimeSwitch = false;
}
if (_root.timeForBricks < getTimer()) {
_root.buildBricks();
}
if (_root.timeForPlaymate < getTimer()) {
_root.thePlaymate._alpha = 100;
}
if ((_root.timeForPaddle < getTimer()) && (getTimer() < _root.timeForPaddleStop)) {
_root.paddle._alpha = 100;
_root.paddle._x = _root.paddle._x + _root.paddleDy;
if (((_root.paddleX + (3 * _root.PaddleDy)) < _root.paddle._x) && (0 < _root.paddleDy)) {
((_root.paddleDy = _root.paddleDy * -1));// not popped
}
if ((_root.paddle._x < (_root.paddleX + (3 * _root.PaddleDy))) && (_root.paddleDy < 0)) {
((_root.paddleDy = _root.paddleDy * -1));// not popped
}
}
if (_root.timeForPaddleStop < getTimer()) {
_root.paddle._x = _root.paddleX;
_root.startText._alpha = 100;
_root.thePlayButton.gotoAndStop(2);
_root.activatePlayButton = "yes";
}
}
}
}
Instance of Symbol 48 MovieClip "paddle" in Frame 31
/* no clip actions */
Frame 32
stop();
Instance of Symbol 56 MovieClip in Frame 32
onClipEvent (load) {
if (_root.gameType == "cyber") {
this._alpha = "0";
}
}
Instance of Symbol 57 MovieClip in Frame 32
onClipEvent (load) {
if (_root.gameType == "cyber") {
this.gotoAndStop(3);
_root.activatePlayButton = "yes";
}
if (_root.gameType == "free") {
this.gotoAndStop(1);
_root.activatePlayButton = "no";
}
}
Frame 33
stop();
Frame 34
function startBall() {
x = ball._x;
y = ball._y;
dx = 3;
Mouse.hide();
rightWall = 550;
leftWall = 0;
topWall = 0;
bottomWall = 500;
ballRadius = ball._width / 2;
paddleTop = paddle._y - (paddle._height / 2);
paddleBottom = paddle._y + (paddle._height / 2);
}
function movePaddle() {
paddle._x = _xmouse;
}
function moveBall() {
x = x + dx;
y = y + dy;
if (rightWall < (x + ballRadius)) {
hitWallSound.start();
overshoot = (x + ballRadius) - rightWall;
x = x - (overShoot * 2);
dx = dx * -1;
}
if ((x - ballRadius) < leftWall) {
hitWallSound.start();
overshoot = leftWall - (x - ballRadius);
x = x + (overShoot * 2);
dx = dx * -1;
}
if ((y - ballRadius) < topWall) {
hitWallSound.start();
overshoot = topWall - (y - ballRadius);
y = y + (overShoot * 2);
dy = dy * -1;
}
if ((paddleTop < (y + ballRadius)) and ((y - ballRadius) < paddleBottom)) {
paddleLeft = paddle._x - (paddle._width / 2);
paddleRight = paddle._x + (paddle._width / 2);
if ((paddleLeft < (x + ballRadius)) and ((x - ballRadius) < paddleRight)) {
hitPaddleSound.start();
overshoot = paddleTop - (y + ballRadius);
y = y + (overShoot * 2);
dy = dy * -1;
trace(dy);
dx = (ball._x - paddle._x) / 4;
} else {
passedPaddle = true;
}
}
if (bottomWall < y) {
ballMissedSound.start();
Mouse.show();
if (numBalls == 0) {
gotoAndPlay (35);
} else {
numBalls--;
gotoAndPlay (33);
}
}
ball._x = x;
ball._y = y;
}
function checkCollisions() {
ballTop = ball._y - (ball._height / 2);
ballBottom = ball._y + (ball._height / 2);
ballLeft = ball._x - (ball._width / 2);
ballRight = ball._x + (ball._width / 2);
leveldone = true;
theRow = 1;
while (theRow < 10) {
i = 1;
while (i < 10) {
brick = _root[(("a" + theRow) + "-") + i];
if (brick._x != -1000) {
if (brickHit(brick)) {
hitBrickSound.start();
brick._x = -1000;
dy = dy * -1;
} else {
leveldone = false;
}
}
i++;
}
theRow++;
}
if (leveldone) {
if (_root.thePlaymates.length == 0) {
_root.gotoAndStop("six");
} else {
playerWinsSound.start();
Mouse.show();
gotoAndPlay (32);
dy = math.abs(dy) + 3;
if (_root.limitDy < dy) {
dy = _root.limitDy;
}
}
}
}
function brickHit(brick) {
if ((brick._y + (brick._height / 2)) >= ballTop) {
if (ballBottom >= (brick._y - (brick._height / 2))) {
if (ballRight >= (brick._x - (brick._width / 2))) {
if ((brick._x + (brick._width / 2)) >= ballLeft) {
return(true);
}
}
}
}
return(false);
}
var hitPaddleSound = new Sound();
hitPaddleSound.attachSound("hitPaddle");
hitPaddleSound.setVolume(100);
var hitWallSound = new Sound();
hitWallSound.attachSound("hitWall");
hitWallSound.setVolume(100);
var hitBrickSound = new Sound();
hitBrickSound.attachSound("hitBrick");
hitBrickSound.setVolume(100);
var ballMissedSound = new Sound();
ballMissedSound.attachSound("ballMissed");
hallMissedSound.setVolume(100);
var newBallSound = new Sound();
newBallSound.attachSound("newBall");
newBallSound.setVolume(100);
var playerWinsSound = new Sound();
playerWinsSound.attach("playerWIns");
playerWinsSound.setVolume(100);
stop();
Instance of Symbol 60 MovieClip in Frame 34
onClipEvent (load) {
_root.startBall();
}
onClipEvent (enterFrame) {
_root.moveBall();
_root.movePaddle();
_root.checkCollisions();
}
Instance of Symbol 95 MovieClip "levelCounter" in Frame 34
onClipEvent (load) {
this.stop();
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.level);
}
Instance of Symbol 96 MovieClip "ballCounter" in Frame 34
onClipEvent (load) {
this.stop();
}
onClipEvent (enterFrame) {
this.gotoAndStop(_root.ballCount);
}
Frame 35
stop();
Symbol 12 MovieClip Frame 24
gotoAndPlay (1);
Symbol 29 MovieClip Frame 1
stop();
Symbol 35 Button
on (release) {
if (_root.activatePlayButton == "yes") {
_root.gotoAndPlay("play");
}
}
Symbol 36 Button
on (release) {
_root.buildBricks();
_root.thePlaymate.loadMovie(_root.thePlaymates.pop());
_root.levelCount++;
_root.gotoAndPlay("Play");
}
Symbol 53 Button
on (release) {
getURL ("http://cyber.playboy.com/members/lounge/", "_blank");
}
Symbol 54 Button
on (release) {
getURL ("http://cyber.playboy.com/join", "_blank");
}
Symbol 55 Button
on (release) {
getURL ("http://www.playboy.com/cyberclub/tour/index.html?tour", "_blank");
}
Symbol 58 Button
on (press) {
_root.ballCount++;
gotoAndPlay (34);
}
Symbol 99 Button
on (press) {
gotoAndPlay (31);
}