Frame 1
function Init() {
if (this.inited != undefined) {
return(undefined);
}
this.inited = true;
Game = new TGame();
Game.NewGame();
}
function TGame() {
this.PlaySounds = true;
this.Level = "novice";
this.OldLevel = this.Level;
this.LComp = true;
this.OldLComp = this.LComp;
this.WSetupVisible = false;
this.WHelpVisible = false;
this.WRestartVisible = false;
this.WGameOverVisible = false;
this.SMove = new Sound();
this.SMove.attachSound("sndMove");
this.SHit = new Sound();
this.SHit.attachSound("sndHit");
this.SGameOver = new Sound();
this.SGameOver.attachSound("sndGameOver");
this.SOnOff = new Sound();
this.SOnOff.attachSound("sndOnOff");
this.SButtonClick = new Sound();
this.SButtonClick.attachSound("sndButtonClick");
}
HELP_X = 267;
HELP_Y = 182;
GAMEOVER_x = 260;
GAMEOVER_Y = 190;
RESTART_X = 260;
RESTART_Y = 190;
SETUP_X = 260;
SETUP_Y = 190;
X1_MIN = 52;
X1_MAX = 229;
X2_MIN = 292;
X2_MAX = 468;
Y_MAX = 300.5;
X1_START = (X1_MIN + X1_MAX) / 2;
X2_START = (X2_MIN + X2_MAX) / 2;
BALL_XSTART1 = X1_START + 5;
BALL_YSTART1 = Y_MAX - 50;
BALL_XSTART2 = X2_START - 5;
BALL_YSTART2 = Y_MAX - 50;
BALL_X1MIN = 48;
BALL_X1MAX = 240;
BALL_X2MIN = 281;
BALL_X2MAX = 473;
BALL_YMIN = 52;
BALL_YMAX = 313;
BALL_YMID = 171;
P1_LKEY = 65;
P1_RKEY = 68;
P1_UKEY = 87;
P2_LKEY = 37;
P2_RKEY = 39;
P2_UKEY = 38;
PAUSE_KEY = 80;
HIT_STOP = 0.75;
JUMP_V = 12;
WALK_V = 8.5;
G_BALL = 0.6;
G_MAN = 1.4;
m1 = 70;
m2 = 1;
R_MAN = (Ball._width / 2) * 1.25;
R_BALL = Ball._width / 2;
MAX_SCORE = 15;
MAX_HITS = 3;
TGame.prototype.NewGame = function () {
if (this.WHelpVisible || (this.WSetupVisible)) {
return(undefined);
}
this.WGameOverHide();
this.WWinnerHide();
this.GameOver = false;
this.GameStarted = false;
this.Depth = 0;
LScore.m0.gotoAndStop(2);
LScore.m1.gotoAndStop(1);
RScore.m0.gotoAndStop(2);
RScore.m1.gotoAndStop(1);
this.State = "nothing";
LBoy._x = X1_START;
LBoy._y = Y_MAX;
RBoy._x = X2_START;
RBoy._y = Y_MAX;
Ball._x = BALL_XSTART2;
Ball._y = BALL_YSTART2;
lPause._visible = false;
this.BallVX = 0;
this.BallVY = 0;
this.LVx = 0;
this.LVy = 0;
this.RVx = 0;
this.RVy = 0;
this.MoveBall = false;
this.LDir = "";
this.RDir = "";
this.LJump = false;
this.RJump = false;
this.RCanReflect = true;
this.LCanReflect = true;
this.RScore = 0;
this.LScore = 0;
this.RHits = 0;
this.LHits = 0;
this.RHit = false;
this.LHit = false;
this.Set = "R";
this.Blocked = false;
this.Paused = false;
this.showLevel();
this.ShowGameMode();
this.RDirect = "S";
RBoy.Legs.gotoAndStop("Stop");
this.LDirect = "S";
LBoy.Legs.gotoAndStop("Stop");
this.RefreshLegs = false;
this.MaxTicks = 3;
this.Ticks = this.MaxTicks;
};
TGame.prototype.ShowLevel = function () {
lNovice._visible = false;
lExpert._visible = false;
lMaster._visible = false;
if (this.LComp) {
if (this.Level == "novice") {
lNovice._visible = true;
}
if (this.Level == "expert") {
lExpert._visible = true;
}
if (this.Level == "master") {
lMaster._visible = true;
}
}
};
TGame.prototype.ShowGameMode = function () {
if (this.LComp) {
lComp._visible = true;
lHum._visible = true;
lHum1._visible = false;
lHum2._visible = false;
} else {
lComp._visible = false;
lHum._visible = false;
lHum1._visible = true;
lHum2._visible = true;
}
};
TGame.prototype.onTime = function () {
if (this.RefreshLegs) {
if (this.RDirect == "R") {
RBoy.Legs.gotoAndPlay("WalkRight");
} else if (this.RDirect == "L") {
RBoy.Legs.gotoAndPlay("WalkLeft");
}
if (this.LDirect == "R") {
LBoy.Legs.gotoAndPlay("WalkRight");
} else if (this.LDirect == "L") {
LBoy.Legs.gotoAndPlay("WalkLeft");
}
this.RefreshLegs = false;
}
if (this.State == "refresh") {
this.ShowGameMode();
this.ShowLevel();
this.State = "nothing";
}
if (this.State == "pause on") {
this.State = "nothing";
this.Paused = true;
lPause._visible = this.Paused;
LBoy.Legs.gotoAndStop("Stop");
RBoy.Legs.gotoAndStop("Stop");
return(undefined);
}
if (this.State == "pause off") {
this.State = "nothing";
this.Paused = false;
lPause._visible = this.Paused;
this.RefreshLegs = true;
return(undefined);
}
if (((!this.Blocked) && (!this.GameOver)) && (!this.Paused)) {
this.Ticks++;
this.ProcessKeys();
this.MakeMoveBall();
this.CheckHit();
}
if (this.State == "nothing") {
return(undefined);
}
if (this.State == "restart") {
this.State = "nothing";
this.RestartGame();
return(undefined);
}
};
TGame.prototype.RestartGame = function () {
if (this.GameOver || (!this.GameStarted)) {
this.NewGame();
} else {
this.WRestartShow();
}
};
TGame.prototype.ProcessKeys = function () {
if (!this.RJump) {
if (Key.isDown(P2_LKEY) && (!Key.isDown(P2_RKEY))) {
if ((this.RDirect != "L") && (X2_MIN < RBoy._x)) {
RBoy.Legs.gotoAndPlay("WalkLeft");
this.RDirect = "L";
}
if (X2_MIN >= RBoy._x) {
this.RDirect = "S";
RBoy.Legs.gotoAndStop("Stop");
}
} else if ((!Key.isDown(P2_LKEY)) && (Key.isDown(P2_RKEY))) {
if ((this.RDirect != "R") && (RBoy._x < X2_MAX)) {
RBoy.Legs.gotoAndPlay("WalkRight");
this.RDirect = "R";
}
if (RBoy._x >= X2_MAX) {
this.RDirect = "S";
RBoy.Legs.gotoAndStop("Stop");
}
} else {
if (this.RDirect != "S") {
RBoy.Legs.gotoAndStop("Stop");
}
this.RDirect = "S";
}
this.RDir = "";
this.RVx = 0;
if (Key.isDown(P2_UKEY)) {
RBoy.Legs.gotoAndStop("Stop");
this.JumpT2 = getTimer();
this.RJump = true;
if (Key.isDown(P2_LKEY) && (!Key.isDown(P2_RKEY))) {
this.RDir = "LU";
this.RVx = -WALK_V;
this.RVy = -JUMP_V;
} else if ((!Key.isDown(P2_LKEY)) && (Key.isDown(P2_RKEY))) {
this.RDir = "RU";
this.RVx = WALK_V;
this.RVy = -JUMP_V;
} else if (!(Key.isDown(P2_LKEY) ^ Key.isDown(P2_RKEY))) {
this.RDir = "U";
this.RVy = -JUMP_V;
}
} else if (Key.isDown(P2_LKEY) && (!Key.isDown(P2_RKEY))) {
this.RDir = "L";
} else if ((!Key.isDown(P2_LKEY)) && (Key.isDown(P2_RKEY))) {
this.RDir = "R";
}
}
if (this.RDir == "R") {
this.RVx = WALK_V;
} else if (this.RDir == "L") {
this.RVx = -WALK_V;
}
this.RMakeMove();
if (!this.LJump) {
if (!this.LComp) {
if (Key.isDown(P1_LKEY) && (!Key.isDown(P1_RKEY))) {
if ((this.LDirect != "L") && (X1_MIN < LBoy._x)) {
LBoy.Legs.gotoAndPlay("WalkLeft");
this.LDirect = "L";
}
if (X1_MIN >= LBoy._x) {
this.LDirect = "S";
LBoy.Legs.gotoAndStop("Stop");
}
} else if ((!Key.isDown(P1_LKEY)) && (Key.isDown(P1_RKEY))) {
if ((this.LDirect != "R") && (LBoy._x < X1_MAX)) {
LBoy.Legs.gotoAndPlay("WalkRight");
this.LDirect = "R";
}
if (LBoy._x >= X1_MAX) {
this.LDirect = "S";
LBoy.Legs.gotoAndStop("Stop");
}
} else {
if (this.LDirect != "S") {
LBoy.Legs.gotoAndStop("Stop");
}
this.LDirect = "S";
}
this.LDir = "";
this.LVx = 0;
if (Key.isDown(P1_UKEY)) {
LBoy.Legs.gotoAndStop("Stop");
this.JumpT1 = getTimer();
this.LJump = true;
if (Key.isDown(P1_LKEY) && (!Key.isDown(P1_RKEY))) {
this.LDir = "LU";
this.LVx = -WALK_V;
this.LVy = -JUMP_V;
} else if ((!Key.isDown(P1_LKEY)) && (Key.isDown(P1_RKEY))) {
this.LDir = "RU";
this.LVx = WALK_V;
this.LVy = -JUMP_V;
} else if (!(Key.isDown(P1_LKEY) ^ Key.isDown(P1_RKEY))) {
this.LDir = "U";
this.LVy = -JUMP_V;
}
} else if (Key.isDown(P1_LKEY) && (!Key.isDown(P1_RKEY))) {
this.LDir = "L";
} else if ((!Key.isDown(P1_LKEY)) && (Key.isDown(P1_RKEY))) {
this.LDir = "R";
}
} else if (this.LComp) {
if (this.Level == "master") {
if ((!this.MoveBall) && (this.Set == "L")) {
var DeltaX = (R_MAN * 2.5);
if (DeltaX < (Ball._x - LBoy._x)) {
this.LDir = "R";
} else if ((Ball._x - LBoy._x) < (DeltaX - WALK_V)) {
this.LDir = "L";
} else {
this.LDir = "RU";
this.LVx = WALK_V;
this.LVy = -JUMP_V;
this.LJump = true;
}
}
if ((this.MoveBall || ((!this.MoveBall) && (this.Set == "R"))) && (((3 * BALL_X2MIN) - (2 * BALL_X1MAX)) < Ball._x)) {
Center = (X1_MIN + X1_MAX) / 2;
if (0 < (LBoy._x - Center)) {
this.LDir = "L";
} else if ((LBoy._x - Center) < (-WALK_V)) {
this.LDir = "R";
}
} else if (this.MoveBall && (((3 * BALL_X2MIN) - (2 * BALL_X1MAX)) >= Ball._x)) {
var x = (Ball._x + ((((Y_MAX - R_BALL) - Ball._y) * this.BallVX) / (Math.abs(this.BallVY) + G_BALL)));
x = x - Math.abs((R_BALL * this.ballvx) / walk_v);
if (0 < (LBoy._x - X)) {
this.LDir = "L";
} else if ((LBoy._x - x) < (-WALK_V)) {
this.LDir = "R";
}
var delta = r_ball;
if (BALL_X1MAX >= Ball._x) {
if ((((LBoy._y - Ball._y) - (R_BALL + R_MAN)) < delta) && (0 < this.BallVy)) {
var len = ((X1_MAX - X1_MIN) / 3);
var x1_mid0 = (x1_min + (len / 4));
var x1_mid1 = (x1_min + len);
var x1_mid2 = ((x1_max - len) - (len / 3));
var x1_mid3 = (x1_max - (len / 2));
var xx = LBoy._x;
x = Ball._x + ((((Y_MAX - R_BALL) - Ball._y) * this.BallVX) / (Math.abs(this.BallVY) + G_BALL));
if (xx < x1_mid0) {
if ((0 < this.ballvx) && (Math.abs(this.ballvx) < WALK_V)) {
this.ldir = "RU";
} else {
this.ldir = "U";
}
} else if ((xx >= x1_mid0) && (xx < x1_mid1)) {
if (0 >= this.ballvx) {
this.ldir = "RU";
} else if ((Ball._x < LBoy._x) && (this.ballvx >= 0)) {
this.ldir = "LU";
} else {
this.ldir = "U";
}
} else if (x1_mid3 < xx) {
if (x < (LBoy._x - (2 * R_MAN))) {
this.ldir = "LU";
} else {
this.ldir = "U";
}
} else if ((x1_mid2 < xx) && (x1_mid3 >= xx)) {
if (x < (LBoy._x - (2 * R_MAN))) {
this.ldir = "LU";
} else if (x >= (LBoy._x + (2 * R_MAN))) {
this.ldir = "RU";
} else {
this.ldir = "U";
}
} else if ((xx >= x1_mid1) && (x1_mid2 >= xx)) {
if (x < (LBoy._x - (2 * R_MAN))) {
this.ldir = "LU";
} else if (x >= (LBoy._x + (2 * R_MAN))) {
this.ldir = "RU";
} else {
this.ldir = "U";
}
}
if (this.ldir == "U") {
this.ljump = true;
this.lvx = 0;
this.lvy = -jump_v;
} else if (this.ldir == "LU") {
this.ljump = true;
this.lvx = -walk_v;
this.lvy = -jump_v;
} else if (this.ldir == "RU") {
this.ljump = true;
this.lvx = walk_v;
this.lvy = -jump_v;
}
}
}
}
} else if (this.Level == "expert") {
if ((!this.MoveBall) && (this.Set == "L")) {
var DeltaX = (R_MAN * 2.5);
if (DeltaX < (Ball._x - LBoy._x)) {
this.LDir = "R";
} else if ((Ball._x - LBoy._x) < (DeltaX - WALK_V)) {
this.LDir = "L";
} else {
this.LDir = "RU";
this.LVx = WALK_V;
this.LVy = -JUMP_V;
this.LJump = true;
}
}
if ((this.MoveBall || ((!this.MoveBall) && (this.Set == "R"))) && (((2 * BALL_X2MIN) - BALL_X1MAX) < Ball._x)) {
Center = (X1_MIN + X1_MAX) / 2;
if (0 < (LBoy._x - Center)) {
this.LDir = "L";
} else if ((LBoy._x - Center) < (-WALK_V)) {
this.LDir = "R";
}
} else if (this.MoveBall && (((2 * BALL_X2MIN) - BALL_X1MAX) >= Ball._x)) {
var x = (Ball._x + ((((Y_MAX - R_BALL) - Ball._y) * this.BallVX) / (Math.abs(this.BallVY) + G_BALL)));
x = x - Math.abs((R_BALL * this.ballvx) / walk_v);
if (0 < (LBoy._x - X)) {
this.LDir = "L";
} else if ((LBoy._x - x) < (-WALK_V)) {
this.LDir = "R";
}
var delta = r_ball;
if (BALL_X1MAX >= Ball._x) {
if ((((LBoy._y - Ball._y) - (R_BALL + R_MAN)) < delta) && (0 < this.BallVy)) {
var len = ((X1_MAX - X1_MIN) / 3);
var x1_mid0 = (x1_min + (len / 4));
var x1_mid1 = (x1_min + len);
var x1_mid2 = ((x1_max - len) - (len / 3));
var x1_mid3 = (x1_max - (len / 2));
var xx = LBoy._x;
x = Ball._x + ((((Y_MAX - R_BALL) - Ball._y) * this.BallVX) / (Math.abs(this.BallVY) + G_BALL));
t = 1.5;
if (xx < x1_mid0) {
if ((0 < this.ballvx) && (Math.abs(this.ballvx) < WALK_V)) {
this.ldir = "RU";
} else {
this.ldir = "U";
}
} else if ((xx >= x1_mid0) && (xx < x1_mid1)) {
if (0 >= this.ballvx) {
this.ldir = "RU";
} else if ((Ball._x < LBoy._x) && (this.ballvx >= 0)) {
this.ldir = "LU";
} else {
this.ldir = "U";
}
} else if (x1_mid3 < xx) {
if (x < (LBoy._x - (2 * R_MAN))) {
this.ldir = "LU";
} else {
this.ldir = "U";
}
} else if ((x1_mid2 < xx) && (x1_mid3 >= xx)) {
if (x < (LBoy._x - (t * R_MAN))) {
this.ldir = "LU";
} else if (x >= (LBoy._x + (t * R_MAN))) {
this.ldir = "RU";
} else {
this.ldir = "U";
}
} else if ((xx >= x1_mid1) && (x1_mid2 >= xx)) {
if (x < (LBoy._x - (t * R_MAN))) {
this.ldir = "LU";
} else if (x >= (LBoy._x + (t * R_MAN))) {
this.ldir = "RU";
} else {
this.ldir = "U";
}
}
if (this.ldir == "U") {
this.ljump = true;
this.lvx = 0;
this.lvy = -jump_v;
} else if (this.ldir == "LU") {
this.ljump = true;
this.lvx = -walk_v;
this.lvy = -jump_v;
} else if (this.ldir == "RU") {
this.ljump = true;
this.lvx = walk_v;
this.lvy = -jump_v;
}
}
}
}
} else if (this.Level == "novice") {
if ((!this.MoveBall) && (this.Set == "L")) {
var DeltaX = (R_MAN * 2.5);
if (DeltaX < (Ball._x - LBoy._x)) {
this.LDir = "R";
} else if ((Ball._x - LBoy._x) < (DeltaX - WALK_V)) {
this.LDir = "L";
} else {
this.LDir = "RU";
this.LVx = WALK_V;
this.LVy = -JUMP_V;
this.LJump = true;
}
}
if ((this.MoveBall || ((!this.MoveBall) && (this.Set == "R"))) && (BALL_X2MIN < Ball._x)) {
Center = (X1_MIN + X1_MAX) / 2;
if (0 < (LBoy._x - Center)) {
this.LDir = "L";
} else if ((LBoy._x - Center) < (-WALK_V)) {
this.LDir = "R";
}
} else if (this.MoveBall && (BALL_X2MIN >= Ball._x)) {
var x = (Ball._x + ((((Y_MAX - R_BALL) - Ball._y) * this.BallVX) / (Math.abs(this.BallVY) + G_BALL)));
x = x + ((R_BALL * this.ballvx) / walk_v);
if (0 < (LBoy._x - X)) {
this.LDir = "L";
} else if ((LBoy._x - x) < (-WALK_V)) {
this.LDir = "R";
}
var delta = r_man;
if (BALL_X1MAX >= Ball._x) {
if ((((LBoy._y - Ball._y) - (R_BALL + R_MAN)) < delta) && (0 < this.BallVy)) {
var len = ((X1_MAX - X1_MIN) / 3);
var x1_mid0 = (x1_min + (len / 4));
var x1_mid1 = (x1_min + len);
var x1_mid2 = ((x1_max - len) - (len / 3));
var x1_mid3 = (x1_max - (len / 2));
var xx = LBoy._x;
if (xx < x1_mid0) {
this.ldir = "U";
} else if ((xx >= x1_mid0) && (xx < x1_mid1)) {
if (0 >= this.ballvx) {
this.ldir = "RU";
} else if ((Ball._x < LBoy._x) && (this.ballvx >= 0)) {
this.ldir = "LU";
} else {
this.ldir = "U";
}
} else if (x1_mid3 < xx) {
if ((0 >= this.ballvx) && (Math.abs(this.ballvx) < WALK_V)) {
this.ldir = "LU";
} else {
this.ldir = "U";
}
} else if ((x1_mid2 < xx) && (x1_mid3 >= xx)) {
if ((Ball._x < LBoy._x) && (0 >= this.ballvx)) {
this.ldir = "LU";
} else if ((Ball._x < LBoy._x) && (0 < this.ballvx)) {
this.ldir = "LU";
} else if ((Ball._x >= LBoy._x) && (this.ballvx >= 0)) {
this.ldir = "RU";
} else if ((Ball._x >= LBoy._x) && (this.ballvx < 0)) {
this.ldir = "RU";
}
} else if ((xx >= x1_mid1) && (x1_mid2 >= xx)) {
if ((Ball._x < LBoy._x) && (0 >= this.ballvx)) {
this.ldir = "LU";
} else if ((Ball._x >= LBoy._x) && (this.ballvx >= 0)) {
this.ldir = "RU";
} else {
this.ldir = "U";
}
}
if (this.ldir == "U") {
this.ljump = true;
this.lvx = 0;
this.lvy = -jump_v;
} else if (this.ldir == "LU") {
this.ljump = true;
this.lvx = -walk_v;
this.lvy = -jump_v;
} else if (this.ldir == "RU") {
this.ljump = true;
this.lvx = walk_v;
this.lvy = -jump_v;
}
}
}
}
}
if (this.LDir == "L") {
if ((this.LDirect != "L") && (X1_MIN < LBoy._x)) {
LBoy.Legs.gotoAndPlay("WalkLeft");
this.LDirect = "L";
}
if (X1_MIN >= LBoy._x) {
this.LDirect = "S";
LBoy.Legs.gotoAndStop("Stop");
}
} else if (this.LDir == "R") {
if ((this.LDirect != "R") && (LBoy._x < X1_MAX)) {
LBoy.Legs.gotoAndPlay("WalkRight");
this.LDirect = "R";
}
if (LBoy._x >= X1_MAX) {
this.LDirect = "S";
LBoy.Legs.gotoAndStop("Stop");
}
} else {
if (this.LDirect != "S") {
LBoy.Legs.gotoAndStop("Stop");
}
this.LDirect = "S";
}
}
}
if (this.LDir == "R") {
this.LVx = WALK_V;
} else if (this.LDir == "L") {
this.LVx = -WALK_V;
}
this.LMakeMove();
};
TGame.prototype.RMakeMove = function () {
if (this.RJump) {
var NewY = (RBoy._y + this.RVy);
this.RVy = this.RVy + G_MAN;
if (this.RDir == "LU") {
RBoy._x = Math.max(X2_MIN, RBoy._x - WALK_V);
} else if (this.RDir == "RU") {
RBoy._x = Math.min(X2_MAX, RBoy._x + WALK_V);
}
if (NewY >= Y_MAX) {
this.RJump = false;
this.RDir = "";
this.RVx = 0;
this.RVy = 0;
NewY = Y_MAX;
}
RBoy._y = NewY;
} else {
if (this.RDir == "L") {
RBoy._x = Math.max(X2_MIN, RBoy._x - WALK_V);
} else if (this.RDir == "R") {
RBoy._x = Math.min(X2_MAX, RBoy._x + WALK_V);
}
this.RDir = "";
}
};
TGame.prototype.LMakeMove = function () {
if (this.LJump) {
var NewY = (LBoy._y + this.LVy);
this.LVy = this.LVy + G_MAN;
if (this.LDir == "LU") {
LBoy._x = Math.max(X1_MIN, LBoy._x - WALK_V);
} else if (this.LDir == "RU") {
LBoy._x = Math.min(X1_MAX, LBoy._x + WALK_V);
}
if (NewY >= Y_MAX) {
this.LJump = false;
this.LDir = "";
this.LVx = 0;
this.LVy = 0;
NewY = Y_MAX;
}
LBoy._y = NewY;
} else {
if (this.LDir == "L") {
LBoy._x = Math.max(X1_MIN, LBoy._x - WALK_V);
} else if (this.LDir == "R") {
LBoy._x = Math.min(X1_MAX, LBoy._x + WALK_V);
}
this.LDir = "";
}
};
TGame.prototype.MakeMoveBall = function () {
if (!this.MoveBall) {
return(undefined);
}
var NewX = (Ball._x + this.BallVX);
var NewY = (Ball._y + this.BallVY);
var NewVY = (this.BallVY + G_BALL);
var NewVX = this.BallVX;
if ((NewY < BALL_YMIN) && (NewVY < 0)) {
NewVY = (-NewVY) * HIT_STOP;
NewVX = NewVX * HIT_STOP;
NewY = BALL_YMIN;
} else if (BALL_YMAX < NewY) {
if (BALL_X1MAX >= NewX) {
this.RScore++;
Ball._x = BALL_XSTART2;
Ball._y = BALL_YSTART2;
this.Set = "R";
} else {
this.LScore++;
Ball._x = BALL_XSTART1;
Ball._y = BALL_YSTART1;
this.Set = "L";
}
this.SetToStart();
this.CheckScore();
return(undefined);
}
if ((BALL_X2MAX < NewX) && (0 < NewVX)) {
NewVX = (-Math.abs(NewVX)) * HIT_STOP;
NewVY = NewVY * HIT_STOP;
NewX = BALL_X2MAX;
} else if ((NewX < BALL_X1MIN) && (NewVX < 0)) {
NewVX = Math.abs(NewVX) * HIT_STOP;
NewVY = NewVY * HIT_STOP;
NewX = BALL_X1MIN;
}
var x1 = Ball._x;
var y1 = Ball._y;
var x2 = NewX;
var y2 = NewY;
var dx = (x2 - x1);
var dy = (y2 - y1);
var K = (dy / dx);
var ratio = (R_BALL / Math.sqrt((dx * dx) + (dy * dy)));
var R = R_BALL;
var R2 = (R * R);
var xA = (BALL_X1MAX + R);
var yA = (BALL_YMID + R);
var xB = (BALL_X2MIN - R);
var yB = yA;
var KK = 1.01;
if ((BALL_X1MAX >= x1) && (0 < dx)) {
if (y1 >= BALL_YMID) {
if (x2 >= BALL_X1MAX) {
if (dy < 0) {
y = y1 + ((xA - x1) * K);
if (BALL_YMID < y) {
x = x1 + ((yA - y1) / K);
if ((BALL_X1MAX < x) && (x < xA)) {
var y1_ = (y1 - yA);
var A = ((K * K) + 1);
var B = (((K * y1_) - xA) - ((K * K) * x1));
var C = (((((xA * xA) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
NewX = ((-B) - Math.sqrt(D)) / A;
NewY = y1 + ((NewX - x1) * K);
var pX = (xA - NewX);
var pY = (yA - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
NewVY = -Math.abs(NewVY);
} else {
NewVX = -Math.abs(NewVX * HIT_STOP);
NewVY = NewVY * HIT_STOP;
NewX = BALL_X1MAX;
NewY = y1 + ((BALL_X1MAX - x1) * K);
}
}
} else {
NewVX = -Math.abs(NewVX * HIT_STOP);
NewVY = NewVY * HIT_STOP;
NewX = BALL_X1MAX;
NewY = y1 + ((BALL_X1MAX - x1) * K);
}
}
} else if (y1 < BALL_YMID) {
if (((0 < dy) && (x2 >= BALL_X1MAX)) && (BALL_YMID < y2)) {
y = y1 + ((xA - x1) * K);
if (BALL_YMID >= y) {
ddx = -Math.abs(dy * ratio);
ddy = Math.abs(dx * ratio);
x = (x1 + ddx) + (((yB - y1) - ddy) / K);
if (x < xB) {
NewVY = -Math.abs(NewVY * HIT_STOP);
NewVX = NewVX * HIT_STOP;
NewY = BALL_YMID;
NewX = x1 + ((BALL_YMID - y1) / K);
}
} else if ((yA >= y) && (BALL_YMID < y)) {
var y1_ = (y1 - yA);
var A = ((K * K) + 1);
var B = (((K * y1_) - xA) - ((K * K) * x1));
var C = (((((xA * xA) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
NewX = ((-B) - Math.sqrt(D)) / A;
NewY = y1 + ((NewX - x1) * K);
var pX = (xA - NewX);
var pY = (yA - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
} else if (yA < y) {
x = x1 + ((yA - y1) / K);
if (BALL_X1MAX < x) {
var y1_ = (y1 - yA);
var A = ((K * K) + 1);
var B = (((K * y1_) - xA) - ((K * K) * x1));
var C = (((((xA * xA) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
NewX = ((-B) - Math.sqrt(D)) / A;
NewY = y1 + ((NewX - x1) * K);
var pX = (xA - NewX);
var pY = (yA - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
} else {
NewVX = -Math.abs(NewVX * HIT_STOP);
NewVY = NewVY * HIT_STOP;
NewX = BALL_X1MAX;
NewY = y1 + ((BALL_X1MAX - x1) * K);
}
}
}
}
} else if (((((x1 >= BALL_X1MAX) && (BALL_X2MIN >= x1)) && (0 < dy)) && (BALL_YMID >= y1)) && (y2 >= BALL_YMID)) {
if (0 < dx) {
ddx = -Math.abs(dy * ratio);
ddy = Math.abs(dx * ratio);
x = (x1 + ddx) + (((yB - y1) - ddy) / K);
if (x < xB) {
y = y1 + ((xB - x1) * K);
if (y < BALL_YMID) {
var y1_ = (y1 - yB);
var A = ((K * K) + 1);
var B = (((K * y1_) - xB) - ((K * K) * x1));
var C = (((((xB * xB) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
NewX = ((-B) - Math.sqrt(D)) / A;
NewY = y1 + ((NewX - x1) * K);
var pX = (xB - NewX);
var pY = (yB - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
} else {
NewVY = (-Math.abs(NewVY)) * KK;
NewVX = NewVX * KK;
NewY = BALL_YMID;
NewX = x1 + ((BALL_YMID - y1) / K);
}
}
} else if (dx < 0) {
ddx = Math.abs(dy * ratio);
ddy = Math.abs(dx * ratio);
x = (x1 + ddx) + ((((yB - y1) - ddy) * dx) / dy);
if (xA < x) {
y = y1 + (((xA - x1) * dy) / dx);
if (y < BALL_YMID) {
var y1_ = (y1 - yA);
var A = ((K * K) + 1);
var B = (((K * y1_) - xA) - ((K * K) * x1));
var C = (((((xA * xA) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
NewX = ((-B) + Math.sqrt(D)) / A;
NewY = y1 + ((NewX - x1) * K);
var pX = (xA - NewX);
var pY = (yA - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
} else {
NewVY = (-Math.abs(NewVY)) * KK;
NewVX = NewVX * KK;
NewY = BALL_YMID;
NewX = x1 + ((BALL_YMID - y1) / K);
}
}
} else if (dx == 0) {
NewVY = (-Math.abs(NewVY)) * KK;
if (Ball._x < ((BALL_X1MAX / 2) + (BALL_X2MIN / 2))) {
NewVX = -0.05;
} else {
NewVX = 0.05;
}
NewY = BALL_YMID;
NewX = x1;
}
} else if (((x1 >= BALL_X2MIN) && (dx < 0)) && (BALL_X2MIN >= x2)) {
if (y1 >= BALL_YMID) {
ddx = -Math.abs(dy * ratio);
ddy = Math.abs(dx * ratio);
y = (y1 + ddy) + (((xB - x1) - ddx) * K);
if ((yB < y) || (0 < dy)) {
NewVX = Math.abs(NewVX * HIT_STOP);
NewVY = NewVY * HIT_STOP;
NewX = BALL_X2MIN;
NewY = y1 + ((BALL_X2MIN - x1) * K);
}
} else if (y1 < BALL_YMID) {
if ((0 < dy) && (BALL_YMID < y2)) {
y = y1 + ((xB - x1) * K);
if (BALL_YMID >= y) {
ddx = Math.abs(dy * ratio);
ddy = Math.abs(dx * ratio);
x = (x1 + ddx) + (((yB - y1) - ddy) / K);
if (xA < x) {
NewVY = Math.abs(NewVY * HIT_STOP);
NewVX = NewVX * HIT_STOP;
NewY = BALL_YMID;
NewX = x1 + ((BALL_YMID - y1) / K);
}
} else if ((yB >= y) && (BALL_YMID < y)) {
var y1_ = (y1 - yB);
var A = ((K * K) + 1);
var B = (((K * y1_) - xB) - ((K * K) * x1));
var C = (((((xB * xB) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
NewX = ((-B) + Math.sqrt(D)) / A;
NewY = y1 + ((NewX - x1) * K);
var pX = (xB - NewX);
var pY = (yB - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
} else if (yB < y) {
x = x1 + ((yB - y1) / K);
if (BALL_X1MAX < x) {
var y1_ = (y1 - yB);
var A = ((K * K) + 1);
var B = (((K * y1_) - xB) - ((K * K) * x1));
var C = (((((xB * xB) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
NewX = ((-B) + Math.sqrt(D)) / A;
NewY = y1 + ((NewX - x1) * K);
var pX = (xB - NewX);
var pY = (yB - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
} else {
NewVX = Math.abs(NewVX * HIT_STOP);
NewVY = NewVY * HIT_STOP;
NewX = BALL_X2MIN;
NewY = y1 + ((BALL_X2MIN - x1) * K);
}
}
}
}
} else if (((BALL_X1MAX < x1) && (x1 < xA)) && (BALL_YMID < y1)) {
var y1_ = (y1 - yA);
var A = ((K * K) + 1);
var B = (((K * y1_) - xA) - ((K * K) * x1));
var C = (((((xA * xA) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
if (D >= 0) {
root1 = ((-B) - Math.sqrt(D)) / A;
root2 = ((-B) + Math.sqrt(D)) / A;
xMin = Math.min(x1, x2);
xMax = Math.max(x1, x2);
if ((((root1 >= xMin) && (xMax >= root1)) && (dx >= 0)) || (((root2 >= xMin) && (xMax >= root2)) && (0 >= dx))) {
if (0 < dx) {
NewX = root1;
} else {
NewX = root2;
}
NewY = y1 + ((NewX - x1) * K);
var pX = (xA - NewX);
var pY = (yA - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
if ((dy < 0) && (0 < dx)) {
NewVY = -Math.abs(NewVY);
}
}
}
} else if (((x1 < BALL_X2MIN) && (xB < x1)) && (BALL_YMID < y1)) {
var y1_ = (y1 - yB);
var A = ((K * K) + 1);
var B = (((K * y1_) - xB) - ((K * K) * x1));
var C = (((((xB * xB) + (y1_ * y1_)) - (((2 * y1_) * x1) * k)) + (((k * k) * x1) * x1)) - R2);
var D = ((B * B) - (A * C));
if (D >= 0) {
root1 = ((-B) - Math.sqrt(D)) / A;
root2 = ((-B) + Math.sqrt(D)) / A;
xMin = Math.min(x1, x2);
xMax = Math.max(x1, x2);
if ((((root1 >= xMin) && (xMax >= root1)) && (dx >= 0)) || (((root2 >= xMin) && (xMax >= root2)) && (0 >= dx))) {
if (0 < dx) {
NewX = root1;
} else {
NewX = root2;
}
NewY = y1 + ((NewX - x1) * K);
var pX = (xB - NewX);
var pY = (yB - NewY);
var D2 = ((pX * pX) + (pY * pY));
var Z = (((NewVX * pX) + (NewVY * pY)) / D2);
NewVY = NewVY - ((2 * Z) * pY);
NewVX = NewVX - ((2 * Z) * pX);
if ((dy < 0) && (0 < dx)) {
NewVY = -Math.abs(NewVY);
}
}
}
}
var Rdx = (NewX - RBoy._x);
var Rdy = (NewY - RBoy._y);
var Ldx = (NewX - LBoy._x);
var Ldy = (NewY - LBoy._y);
var Rlength2 = ((Rdx * Rdx) + (Rdy * Rdy));
var Llength2 = ((Ldx * Ldx) + (Ldy * Ldy));
var BIG = 100000;
var DELTA = 0;
var show = true;
if (((Rlength2 < (4 * (R_BALL * R_MAN))) && (this.RCanReflect)) && (this.MaxTicks < this.Ticks)) {
var x0 = RBoy._x;
var y0 = RBoy._y;
var x2 = NewX;
var y2 = NewY;
var x1 = (x2 - (BIG * (this.ballVX + NewVX)));
var y1 = (y2 - (BIG * (this.ballVY + NewVY)));
var k = ((this.ballVX + NewVX) / (this.ballVY + NewVY));
var A = ((k * k) + 1);
var B = (((k * (x2 - x0)) - ((k * k) * y2)) - y0);
var temp = ((x2 - x0) - (k * y2));
var C = (((temp * temp) + (y0 * y0)) - ((4 * R_BALL) * R_MAN));
var D = ((B * B) - (A * C));
if (D >= DELTA) {
this.Ticks = 0;
this.RHit = true;
show = false;
}
}
if (((Llength2 < (4 * (R_BALL * R_MAN))) && (this.LCanReflect)) && (this.MaxTicks < this.Ticks)) {
var x0 = LBoy._x;
var y0 = LBoy._y;
var x2 = NewX;
var y2 = NewY;
var x1 = (x2 - (BIG * this.ballVX));
var y1 = (y2 - (BIG * this.ballVY));
var k = (this.ballVX / this.ballVY);
var A = ((k * k) + 1);
var B = (((k * (x2 - x0)) - ((k * k) * y2)) - y0);
var temp = ((x2 - x0) - (k * y2));
var C = (((temp * temp) + (y0 * y0)) - ((4 * R_BALL) * R_MAN));
var D = ((B * B) - (A * C));
if (D >= DELTA) {
this.Ticks = 0;
this.LHit = true;
show = false;
}
}
if (show) {
Ball._x = NewX;
Ball._y = NewY;
}
this.BallVY = NewVY;
this.BallVX = NewVX;
};
TGame.prototype.CheckScore = function () {
LScore.SetValue(this.LScore);
RScore.SetValue(this.RScore);
if ((this.LScore >= MAX_SCORE) || (this.RScore >= MAX_SCORE)) {
this.WGameOVerShow();
}
};
TGame.prototype.SetToStart = function () {
this.RHits = 0;
this.LHits = 0;
LBoy._x = X1_START;
LBoy._y = Y_MAX;
RBoy._x = X2_START;
RBoy._y = Y_MAX;
this.BallVX = 0;
this.BallVY = 0;
this.LVx = 0;
this.LVy = 0;
this.RVx = 0;
this.RVy = 0;
this.MoveBall = false;
};
TGame.prototype.CheckHit = function () {
var K = 0.7;
var dx = (Ball._x - RBoy._x);
var dy = (Ball._y - RBoy._y);
var D2 = ((dx * dx) + (dy * dy));
var BallW2 = ((4 * R_BALL) * R_MAN);
if ((((((BallW2 >= D2) && (D2 != 0)) && (this.RCanReflect)) || (this.RHit)) && (!this.MoveBall)) || (this.RHit)) {
this.LHits = 0;
this.RHits++;
this.RHit = false;
if (MAX_HITS < this.RHits) {
this.LScore++;
Ball._x = BALL_XSTART1;
Ball._y = BALL_YSTART1;
this.Set = "L";
this.SetToStart();
this.CheckScore();
return(undefined);
}
var nX = (dx / Math.sqrt(D2));
var nY = (dy / Math.sqrt(D2));
var vy = Math.min(this.rvy, (-jump_v) / 7);
var Vn = ((2 * (((this.BallVX - this.RVx) * nX) + ((this.BallVY - Vy) * nY))) / (m1 + m2));
this.BallVX = this.BallVX - ((nX * Vn) * m1);
this.BallVY = this.BallVY - ((nY * Vn) * m1);
if (this.MoveBall) {
this.BallVX = this.BallVX * (HIT_STOP * K);
this.BallVY = this.BallVY * (HIT_STOP * K);
}
this.RVx = this.RVx + ((nX * Vn) * m2);
this.RVy = this.RVy + ((nY * Vn) * m2);
Ball._x = RBoy._x + ((nX * (R_MAN + r_ball)) * 1.01);
Ball._y = RBoy._y + ((nY * (R_MAN + r_ball)) * 1.01);
Ball._x = Math.min(Math.max(Ball._x, X2_MIN), X2_MAX);
this.MoveBall = true;
this.GameStarted = true;
this.RCanReflect = false;
if (this.PlaySounds) {
balance = ((200 * (RBoy._x - X1_MIN)) / (X2_MAX - X1_MIN)) - 100;
Game.SHit.setPan(balance);
Game.SHit.start();
}
return(undefined);
}
if (BallW2 < D2) {
this.RCanReflect = true;
}
var dx = (Ball._x - LBoy._x);
var dy = (Ball._y - LBoy._y);
var D2 = ((dx * dx) + (dy * dy));
if ((((((BallW2 >= D2) && (D2 != 0)) && (this.LCanReflect)) || (this.LHit)) && (!this.MoveBall)) || (this.LHit)) {
this.RHits = 0;
this.LHits++;
this.LHit = false;
if (MAX_HITS < this.LHits) {
this.RScore++;
Ball._x = BALL_XSTART2;
Ball._y = BALL_YSTART2;
this.Set = "R";
this.SetToStart();
this.CheckScore();
return(undefined);
}
var nX = (dx / Math.sqrt(D2));
var nY = (dy / Math.sqrt(D2));
var vy = Math.min(this.lvy, (-jump_v) / 7);
var Vn = ((2 * (((this.BallVX - this.LVx) * nX) + ((this.BallVY - Vy) * nY))) / (m1 + m2));
this.BallVX = this.BallVX - ((nX * Vn) * m1);
this.BallVY = this.BallVY - ((nY * Vn) * m1);
if (this.MoveBall) {
this.BallVX = this.BallVX * (HIT_STOP * K);
this.BallVY = this.BallVY * (HIT_STOP * K);
}
this.LVx = this.LVx + ((nX * Vn) * m2);
this.LVy = this.LVy + ((nY * Vn) * m2);
Ball._x = LBoy._x + ((nX * (R_MAN + r_ball)) * 1.01);
Ball._y = LBoy._y + ((nY * (R_MAN + r_ball)) * 1.01);
Ball._x = Math.min(Math.max(Ball._x, X1_MIN), X1_MAX);
this.MoveBall = true;
this.GameStarted = true;
this.LCanReflect = false;
if (this.PlaySounds) {
balance = ((200 * (LBoy._x - X1_MIN)) / (X2_MAX - X1_MIN)) - 100;
Game.SHit.setPan(balance);
Game.SHit.start();
}
return(undefined);
}
if (BallW2 < D2) {
this.LCanReflect = true;
}
};
TGame.prototype.WHelpShow = function () {
if (this.WSetupVisible) {
return(undefined);
}
if (this.WRestartVisible) {
return(undefined);
}
if (this.WHelpVisible) {
return(undefined);
}
this.Blocked = true;
LBoy.Legs.gotoAndStop("Stop");
RBoy.Legs.gotoAndStop("Stop");
attachMovie("wHelp", "wndHelp", this.Depth);
this.WHelp = wndHelp;
this.WHelp._x = HELP_X;
this.WHelp._y = HELP_Y;
this.WHelpVisible = true;
this.Depth++;
};
TGame.prototype.WHelpHide = function () {
removeMovieClip(this.WHelp);
this.WHelpVisible = false;
if (!this.GameOver) {
this.Blocked = false;
}
this.RefreshLegs = true;
};
TGame.prototype.WRestartShow = function () {
if (this.WSetupVisible) {
return(undefined);
}
if (this.WRestartVisible) {
return(undefined);
}
if (this.WHelpVisible) {
return(undefined);
}
this.Blocked = true;
LBoy.Legs.gotoAndStop("Stop");
RBoy.Legs.gotoAndStop("Stop");
attachMovie("wRestart", "wndRestart", this.Depth);
this.WRestart = wndRestart;
this.WRestart._x = RESTART_X;
this.WRestart._y = RESTART_Y;
this.WRestartVisible = true;
this.Depth++;
};
TGame.prototype.WRestartHide = function (mustRestart) {
removeMovieClip(this.WRestart);
this.WRestartVisible = false;
this.Blocked = false;
if (mustRestart) {
this.OldLevel = this.Level;
this.OldLComp = this.LComp;
this.NewGame();
} else {
this.Level = this.OldLevel;
this.LComp = this.OldLComp;
this.RefreshLegs = true;
}
};
TGame.prototype.WSetupShow = function () {
if (this.WSetupVisible) {
return(undefined);
}
if (this.WRestartVisible) {
return(undefined);
}
if (this.WHelpVisible) {
return(undefined);
}
LBoy.Legs.gotoAndStop("Stop");
RBoy.Legs.gotoAndStop("Stop");
this.Blocked = true;
attachMovie("wSetup", "wndSetup", this.Depth);
this.WSetup = wndSetup;
if (this.Level == "novice") {
this.WSetup.mRCheckNovice._visible = true;
this.WSetup.mRCheckExpert._visible = false;
this.WSetup.mRCheckMaster._visible = false;
} else if (this.Level == "expert") {
this.WSetup.mRCheckNovice._visible = false;
this.WSetup.mRCheckExpert._visible = true;
this.WSetup.mRCheckMaster._visible = false;
} else if (this.Level == "master") {
this.WSetup.mRCheckNovice._visible = false;
this.WSetup.mRCheckExpert._visible = false;
this.WSetup.mRCheckMaster._visible = true;
}
if (this.LComp) {
this.WSetup.mRCheckHumanPC._visible = true;
this.WSetup.mRCheckHumanHuman._visible = false;
} else if (!this.LComp) {
this.WSetup.mRCheckHumanPC._visible = false;
this.WSetup.mRCheckHumanHuman._visible = true;
}
this.WSetup.mCheck._visible = this.PlaySounds;
this.WSetup._x = SETUP_X;
this.WSetup._y = SETUP_Y;
this.WSetupVisible = true;
this.Depth++;
};
TGame.prototype.WSetupHide = function () {
removeMovieClip(this.WSetup);
this.WSetupVisible = false;
if (((((this.Level != this.OldLevel) && (this.OldLComp)) || (this.LComp != this.OldLComp)) && (!this.GameOver)) && (this.GameStarted)) {
this.State = "restart";
} else {
this.Blocked = false;
this.RefreshLegs = true;
this.OldLevel = this.Level;
this.OldLComp = this.LComp;
this.State = "refresh";
}
};
TGame.prototype.WGameOverShow = function () {
if (this.WGameOverVisible) {
return(undefined);
}
if (this.PlaySounds) {
Game.SGameOver.setPan(0);
Game.SGameOver.start();
}
this.Blocked = true;
LBoy.Legs.gotoAndStop("Stop");
RBoy.Legs.gotoAndStop("Stop");
attachMovie("wGameOver", "wndGameOver", this.Depth);
this.WGameOver = wndGameOver;
this.WGameOver._x = GAMEOVER_X;
this.WGameOver._y = GAMEOVER_Y;
this.WGameOverVisible = true;
this.GameOver = true;
this.Depth++;
};
TGame.prototype.WGameOverHide = function () {
if (!this.WGameOverVisible) {
return(undefined);
}
removeMovieClip(this.WGameOver);
this.WGameOverVisible = false;
this.Blocked = false;
this.RefreshLegs = true;
};
this.Init();
Instance of Symbol 76 MovieClip "Ball" in Frame 1
onClipEvent (keyDown) {
if (((((((!_parent.Game.Paused) && (Key.getCode() == _parent.PAUSE_KEY)) && (!_parent.Game.WHelpVisible)) && (!_parent.Game.WSetupVisible)) && (!_parent.Game.WGameOvervisible)) && (_parent.Game.GameStarted)) && (0 < (_parent.Game.RHits + _parent.Game.LHits))) {
_parent.Game.State = "pause on";
} else if (_parent.Game.Paused) {
_parent.Game.State = "pause off";
}
}
Frame 2
Game.onTime();
Frame 3
gotoAndPlay (2);
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 5
stop();
Symbol 41 MovieClip Frame 8
gotoAndStop (1);
Symbol 41 MovieClip Frame 12
gotoAndStop (1);
Symbol 43 Button
on (rollOver) {
this.knop3.gotoAndPlay(2);
}
on (rollOut) {
this.knop3.gotoAndPlay(6);
}
on (release) {
if (_parent.Game.PlaySounds) {
_parent.Game.SButtonClick.setPan(0);
_parent.Game.SButtonClick.start();
}
_parent.Game.WSetupHide();
}
Instance of Symbol 48 MovieClip in Symbol 53 MovieClip [wSetup] Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_parent._parent._xmouse, _parent._parent._ymouse)) {
_parent._parent.Game.SOnOff.start();
_parent._parent.Game.PlaySounds = !_parent._parent.Game.PlaySounds;
_parent.mCheck._visible = _parent._parent.Game.PlaySounds;
}
}
Instance of Symbol 51 MovieClip in Symbol 53 MovieClip [wSetup] Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_parent._parent._xmouse, _parent._parent._ymouse)) {
if (_parent._parent.Game.PlaySounds) {
_parent._parent.Game.SMove.setPan(0);
_parent._parent.Game.SMove.start();
}
_parent.mRCheckNovice._visible = true;
_parent.mRCheckExpert._visible = false;
_parent.mRCheckMaster._visible = false;
_parent._parent.Game.Level = "novice";
}
}
Instance of Symbol 51 MovieClip in Symbol 53 MovieClip [wSetup] Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_parent._parent._xmouse, _parent._parent._ymouse)) {
if (_parent._parent.Game.PlaySounds) {
_parent._parent.Game.SMove.setPan(0);
_parent._parent.Game.SMove.start();
}
_parent.mRCheckNovice._visible = false;
_parent.mRCheckExpert._visible = true;
_parent.mRCheckMaster._visible = false;
_parent._parent.Game.Level = "expert";
}
}
Instance of Symbol 51 MovieClip in Symbol 53 MovieClip [wSetup] Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_parent._parent._xmouse, _parent._parent._ymouse)) {
if (_parent._parent.Game.PlaySounds) {
_parent._parent.Game.SMove.setPan(0);
_parent._parent.Game.SMove.start();
}
_parent.mRCheckNovice._visible = false;
_parent.mRCheckExpert._visible = false;
_parent.mRCheckMaster._visible = true;
_parent._parent.Game.Level = "master";
}
}
Instance of Symbol 51 MovieClip in Symbol 53 MovieClip [wSetup] Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_parent._parent._xmouse, _parent._parent._ymouse)) {
if (_parent._parent.Game.PlaySounds) {
_parent._parent.Game.SMove.setPan(0);
_parent._parent.Game.SMove.start();
}
_parent.mRCheckHumanPC._visible = true;
_parent.mRCheckHumanHuman._visible = false;
_parent._parent.Game.LComp = true;
}
}
Instance of Symbol 51 MovieClip in Symbol 53 MovieClip [wSetup] Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_parent._parent._xmouse, _parent._parent._ymouse)) {
if (_parent._parent.Game.PlaySounds) {
_parent._parent.Game.SMove.setPan(0);
_parent._parent.Game.SMove.start();
}
_parent.mRCheckHumanPC._visible = false;
_parent.mRCheckHumanHuman._visible = true;
_parent._parent.Game.LComp = false;
}
}
Symbol 57 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 5
stop();
Symbol 57 MovieClip Frame 8
gotoAndStop (1);
Symbol 57 MovieClip Frame 12
gotoAndStop (1);
Symbol 58 Button
on (rollOver) {
this.knopx.gotoAndPlay(2);
}
on (rollOut) {
this.knopx.gotoAndPlay(6);
}
on (release) {
if (_parent.Game.PlaySounds) {
_parent.Game.SButtonClick.start();
}
_parent.Game.State = "restart";
}
Symbol 64 Button
on (release) {
if (_parent.Game.PlaySounds) {
_parent.Game.SButtonClick.start();
}
_parent.Game.WRestartHide(true);
}
Symbol 66 Button
on (release) {
if (_parent.Game.PlaySounds) {
_parent.Game.SButtonClick.start();
}
_parent.Game.WRestartHide(false);
}
Symbol 72 Button
on (rollOver) {
this.knop3.gotoAndPlay(2);
}
on (rollOut) {
this.knop3.gotoAndPlay(6);
}
on (release) {
if (_parent.Game.PlaySounds) {
_parent.Game.SButtonClick.setPan(0);
_parent.Game.SButtonClick.start();
}
_parent.Game.WHelpHide();
}
Symbol 85 Button
on (release) {
if (Game.PlaySounds) {
Game.SButtonClick.setPan(0);
Game.SButtonClick.start();
}
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=avol";
getURL (sd, "blank");
}
Symbol 96 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 1
function SetValue(value) {
var s = value;
if (99 < s) {
s = 99;
}
this.m0.gotoAndStop((s % 10) + 2);
if (s >= 10) {
this.m1.gotoAndStop((int(s / 10) % 10) + 2);
} else {
this.m1.gotoAndStop(1);
}
}
Symbol 112 Button
on (rollOver) {
_root.knop1.gotoAndPlay(2);
}
on (rollOut) {
_root.knop1.gotoAndPlay(6);
}
on (release) {
if (Game.Blocked && (!Game.GameOver)) {
return(undefined);
}
if (Game.PlaySounds) {
Game.SButtonClick.setPan(0);
Game.SButtonClick.start();
}
Game.State = "restart";
}
Symbol 113 Button
on (release) {
if (Game.Blocked && (!Game.GameOver)) {
return(undefined);
}
if (Game.PlaySounds) {
Game.SButtonClick.setPan(0);
Game.SButtonClick.start();
}
Game.WHelpShow();
}
Symbol 120 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 5
stop();
Symbol 121 Button
on (rollOver) {
_root.knop2.gotoAndPlay(2);
}
on (rollOut) {
_root.knop2.gotoAndPlay(6);
}
on (release) {
if (Game.PlaySounds) {
Game.SButtonClick.setPan(0);
Game.SButtonClick.start();
}
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=avol";
getURL (sd, "blank");
}
Symbol 123 Button
on (release) {
if (Game.Blocked && (!Game.GameOver)) {
return(undefined);
}
if (Game.PlaySounds) {
Game.SButtonClick.setPan(0);
Game.SButtonClick.start();
}
Game.WSetupShow();
}
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 6
gotoAndPlay (2);
Symbol 136 MovieClip Frame 11
gotoAndPlay (7);
Symbol 151 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 6
gotoAndPlay (2);
Symbol 151 MovieClip Frame 11
gotoAndPlay (7);